Bitcoin block validation

Source: Internet
Author: User

Directory

    • Generation of chunks
    • Validation links for Blocks
      • Validation process
      • Merkle tree structure
Generation of chunks
    • Miners build blocks before they dig the mines.

      • Package Coinbase transactions into chunks

      • Package high-priority trades in a trading pool into chunks

        • 优先级 = 交易的额度 * UTXO的深度/交易的size
        • Anti-dust attack
      • Create a chunk header

        版本号|父区块哈希|Merkle树根|时间戳|难度值|Nonce

        ?

    • After the mining is successful, the calculated random number noncet is filled into the block head to propagate to the adjacent nodes.

Validation link validation process for chunks
    • After the neighboring node receives the new district fast, does the following check immediately
      • Verify that the nonce value of the POW matches the difficulty value
      • Check if the timestamp is less than 2 hours (10 minutes a block) of the current time
      • Check Merkle root is correct
      • Check chunk size to be less than the upper limit of chunk size
      • The first deal must be a coinbase transaction.
      • Validate each transaction
Merkle tree structure Two forks
    • Tree--a data structure composed of multiple nodes

      • Each node stores data
      • root node rooted
      • Parent node, child node, sibling node
    • Build binary Search number

      • 125 2 18 19 15 17 169

        ?

Merkle Tree
    • Prevent data tampering

    • Quickly verify that a transaction exists

    • Node stores hash value

    • Constructing a tree from a child node

Merkle Path-Verify Path
    • Just log2 (N) Known quantity to verify that K is included in the chunk

      • H[^k] to find transactions

      • H[^ABCDEFGH] and H[^mnop] and H[^ij] are near the known parent node

      • H[^L] Trading hash for neighboring nodes

        ?

Bitcoin block validation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.