Close Menu
binanceplan.blog
    What's Hot

    Wirex Powers BingX’s First Visa Debit Card

    July 10, 2026

    Binance Keeps EU Plans Alive While Pursuing More Asia Licences

    July 10, 2026

    OKX, MetaMask, Matter Labs back dispute resolution court for AI agents

    July 10, 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

    Wirex Powers BingX’s First Visa Debit Card

    July 10, 2026

    Tether’s $25 Million Telecom Bet Extends Its Push Beyond Stablecoins

    July 10, 2026

    JPMorgan Says The Real Threat To Bitcoin Isn’t Strategy (MSTR) — It’s Private Blockchains

    July 10, 2026

    US Lawmaker Pushes Crypto Developer Protections as Senate Weighs CLARITY Act

    July 9, 2026
    Add A Comment
    Leave A Reply Cancel Reply

    TOP POSTS

    Wirex Powers BingX’s First Visa Debit Card

    July 10, 2026

    Binance Keeps EU Plans Alive While Pursuing More Asia Licences

    July 10, 2026

    OKX, MetaMask, Matter Labs back dispute resolution court for AI agents

    July 10, 2026

    EMA Cloud Indicator MT4 – ForexMT4Indicators.com

    July 10, 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

    Wirex Powers BingX’s First Visa Debit Card

    July 10, 2026

    Binance Keeps EU Plans Alive While Pursuing More Asia Licences

    July 10, 2026

    OKX, MetaMask, Matter Labs back dispute resolution court for AI agents

    July 10, 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.