Close Menu
binanceplan.blog
    What's Hot

    Speculation on dogecoin is back to October 2025 levels. The price is down 70%

    August 13, 2026

    Trade the S&P 500 with our money using Kraken Prop

    August 13, 2026

    Empery Digital Sells 1,635 Bitcoin As Treasury Buffer Shrinks

    August 13, 2026
    Facebook X (Twitter) Instagram
    binanceplan.blog
    • Home
    • Binance
    • Cryptocurrency
      • Altcoin
      • Litecoin
      • Bitcoin
    • Crowdfunding
    • Crypto Mining
    • Ethereum
    • Fintech
    • Forex
      • Mompreneur
      • Venture Capital
    binanceplan.blog
    Home»Bitcoin»bitcoin core – What is the endianness of the hex strings returned by getblockhash and getblockheader?
    Bitcoin

    bitcoin core – What is the endianness of the hex strings returned by getblockhash and getblockheader?

    币安计划官方By 币安计划官方June 24, 2026No Comments2 Mins Read
    Facebook Twitter Pinterest LinkedIn Tumblr Email
    bitcoin core – What is the endianness of the hex strings returned by getblockhash and getblockheader?
    Share
    Facebook Twitter LinkedIn Pinterest Email


    is this correct?

    Yes, the observation about leading and trailing zeroes corresponding to endianness looks correct to me.

    So does getblockheader (verbose = false) return little-endian hex:

    I think it returns the header in Bitcoin’s network serialization, which has most integer values in little-endian byte-order. This conflicts with Internet standards but that’s the way Satoshi Nakamoto wanted it.

    and getblockhash […] return big-endian hex,

    Yes. I believe Satoshi Nakamoto and other developers preferred to present individual integers in big-endian as that makes most sense to conventionally educated people where fifteen is written as 15 not 51 because ten is bigger than five.

    Why isn’t everything the same endianness?

    I doubt anyone really knows Satoshi Nakamoto’s intent here. He was aware of endianness problems in porting Bitcoin code between architectures (and I think discouraged use of PPC for this reason).

    I suspect some of this springs from characteristics of C and C++ programming and habits widespread in that community. These issues might not arise in network applications written in other programming languages and written to conform to Internet RFC standards.

    RFC1700 by Reynolds and Postel in 1994 says

    When a multi-octet quantity is transmitted the most significant octet is transmitted first.

    Bitcoin violates that rule.


    The consequence is that, in Bitcoin, I find you have to pay special attention to endianness and carefully code around it. I also find that many people are tripped up by this.



    Source link

    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email

    Related Posts

    Trade the S&P 500 with our money using Kraken Prop

    August 13, 2026

    Change Log: Version 1.136 – Bitfinex blog

    August 13, 2026

    BlackRock Cuts IBIT In-Kind Conversion Minimum To $1M

    August 12, 2026

    Regulators To Push Pro-Crypto Initiatives Following Clarity Act Delay

    August 12, 2026
    Add A Comment
    Leave A Reply Cancel Reply

    TOP POSTS

    Speculation on dogecoin is back to October 2025 levels. The price is down 70%

    August 13, 2026

    Trade the S&P 500 with our money using Kraken Prop

    August 13, 2026

    Empery Digital Sells 1,635 Bitcoin As Treasury Buffer Shrinks

    August 13, 2026

    How To Place Stop Losses Like a Pro Trader » Learn To Trade The Market

    August 13, 2026

    Subscribe to Updates

    Get the latest creative news from Binanceplan about Altcoin, Binance and Bitcoin.

    Please enable JavaScript in your browser to complete this form.
    Loading

    Welcome to BinancePlan.blog — your trusted source for learning, strategies, and insights in the world of cryptocurrency, with a strong focus on Binance and digital asset growth.At BinancePlan, our mission is simple: to make crypto easy, understandable, and profitable for everyone — whether you’re a complete beginner or an experienced trader.

    Top Insights

    Speculation on dogecoin is back to October 2025 levels. The price is down 70%

    August 13, 2026

    Trade the S&P 500 with our money using Kraken Prop

    August 13, 2026

    Empery Digital Sells 1,635 Bitcoin As Treasury Buffer Shrinks

    August 13, 2026
    Get Informed

    Subscribe to Updates

    Get the latest creative news from Binanceplan about Altcoin, Binance and Bitcoin.

    Please enable JavaScript in your browser to complete this form.
    Loading
    • About Us
    • Contact Us
    • Disclaimer
    • Privacy Policy
    • Terms and Conditions
    Copyright© 2026 Binanceplan All Rights Reserved.

    Type above and press Enter to search. Press Esc to cancel.