Page Content

Tutorials

Proof of Inclusion: Improves Transparency & Blockchain Trust

What is PoI Proof of Inclusion

Proof of Inclusion
Proof of Inclusion

Blockchain technology uses Proof of Inclusion (PoI), a basic cryptographic technique, to show that a certain transaction or piece of data is indeed a part of a certain blockchain block. Without processing or downloading the contents of the complete block, it enables verifiable verification. “Can you prove that this transaction is part of this block?” is the basic question it attempts to answer.

Why Proof of Inclusion is Important

In decentralized ledgers, Proof of Inclusion is essential for security, integrity, and effective verification. Every block on a blockchain has a lot of transactions, and users frequently need to confirm that their transaction was recorded accurately without downloading the whole blockchain or block. It permits:

Efficient verification: Enabling users with constrained bandwidth or resources, such as light clients (sometimes called SPV clients or Simple Payment Verification clients), to confirm that their transactions are recorded on the blockchain. For some transactions, they can request Merkle Proofs and just require the block headers.

Data integrity: It guarantees that the data has not been altered because doing so would render the proof void.

Scalability: It helps the network become more decentralized and scalable overall by making efficient verification possible for more users.

Trustless verification: With cryptography, users may independently confirm inclusion without having to rely on a middleman.

How Proof of Inclusion Works: The Merkle Tree Mechanism

In blockchains such as Ethereum and Bitcoin, the Merkle tree, which ends in a Merkle root, is the main technique for obtaining Proof of Inclusion.

Merkle Tree Construction:

  • Transactions as Leaves: Within a block, each individual transaction serves as the Merkle tree’s “leaves” or basic data pieces.
  • Hashing: First, every transaction is cryptographically hashed (SHA 256, for example). These distinct transaction hashes (such as H1, H2, H3, and H4) make up the tree’s lowest level.
  • Pairing and Hashing Upwards: These separate hashes are then hashed together in pairs. Up the tree, this procedure iteratively hashes pairs of parent hashes until the very top produces a single final hash. For instance, H3 and H4 combine to make H34, whereas H1 and H2 combine to form H12. The last root is then created by combining H12 and H34.
  • The Merkle Root: We call this last hash at the very top the Merkle root. It shows the total hash of all the transactions in a block.

Merkle Root in the Block Header:

The block header contains information about the Merkle root. This implies that the block header serves as a condensed, cryptographic synopsis of every transaction that is contained therein. A root hash is a representation of the whole dataset.

Generating a Proof of Inclusion (Merkle Proof):

Merkle Root (H_ABCD)
         /               \
    H_AB                 H_CD
   /    \               /    \
  H_A    H_B           H_C    H_D
  |      |             |      |
Tx_A   Tx_B          Tx_C   Tx_D

If you want to prove the inclusion of Tx_A, your Merkle Proof would include:

  1. Tx_A
  2. H_B (sibling of H_A)
  3. H_CD (sibling of H_AB)
  • The purpose of a Merkle Proof is to demonstrate that a certain transaction (such as “Transaction X” or “Tx_A”) is part of a certain block.
  • A limited selection of intermediary hashes from the Merkle tree plus the transaction’s hash (or the original transaction itself) make up a Merkle Proof for a transaction. The terms “Merkle path” and “sibling hashes” are frequently used to describe these intermediate ones.
  • To demonstrate that Tx_A is a part of a simple tree, for instance, the evidence would comprise Tx_A, its sister hash H_B, and the sibling of their combined hash, H_CD. Likewise, in order to prove T2, the prover would transmit H2, its uncle H34, and its brother H1.

Verifying the Proof Process:

  • It is not necessary for a verifier to download or analyze the complete block in order to validate the evidence. Instead, they employ the intermediate hashes from the Merkle proof and the hash of the transaction.
  • Using the same hashing method used during creation, the verifier may recalculate the Merkle root by taking the transaction’s hash and merging it with the intermediate/sibling hashes that were supplied.
  • The legitimacy of the transaction is cryptographically shown if the recalculated Merkle root precisely matches the Merkle root that is contained in the block’s header (which is known to the public and accepted by the network’s consensus).

Tamper Detection:

  • A key characteristic of hashing and, by extension, Merkle trees is that a single bit change in any transaction inside the block will produce a new Merkle root entirely.
  • Because the recalculated Merkle root would differ from the one in the block header, defying the established consensus of the network, any effort to manipulate transactions or make a false claim of inclusion would be readily detected. The blockchain’s transaction structure is kept intact by this approach.

PoI Benefits

There are several advantages to Proof of Inclusion.

Efficiency (Lightweight Clients): Particularly for users with constrained resources or bandwidth, such as mobile phones, it significantly lowers the quantity of data that must be downloaded and validated. Block headers and Merkle Proofs are all that light clients require. The proof size only increases logarithmically as the number of transactions increases.

Security: It uses hash functions in cryptography to guarantee data integrity.

Scalability: Effective verification without complete node capabilities is made possible, which enhances the network’s overall scalability and decentralization.

Trustless Verification: Individuals don’t need middlemen to cryptographically confirm the inclusion.

Privacy-preserving: The complete dataset is not displayed; just the information required to demonstrate inclusion is revealed.

PoI Use Cases

Several blockchain settings employ Proof of Inclusion:

Simple Payment Verification (SPV) clients: Without downloading the complete blockchain, these thin clients validate transactions.

Decentralised applications (dApps): Merkle proofs may be used to confirm user activity on the blockchain and data integrity.

Blockchain explorers: They employ it to demonstrate that a transaction is a part of a certain block.

Audits & proofs: Without disclosing the complete dataset, to verify that certain data was included.

Supply chain management: Merkle trees, which symbolize the chain of custody, are used to trace and validate the movement of commodities.

Zero-knowledge proofs: As a component of privacy-protecting measures.

Proof of Inclusion vs. Proof of Membership

There is a small difference, even though they are quite similar and frequently accomplished with Merkle Trees:

Proof of Inclusion: Focusses on demonstrating the inclusion of a particular data item (like a transaction) in a known, unchangeable collection (like a block of transactions). The set (or its root hash) is usually openly accessible. It focusses on demonstrating that a certain block or dataset did, in fact, contain an element.

Proof of Membership: Proves that an entity or data point belongs to a certain group or collection, which may be dynamic, private, or subject to particular requirements. Merkle trees are employed, but more intricate zero-knowledge proofs such as demonstrating your membership in a whitelisted group without disclosing your identity may also be utilized to preserve anonymity.

FeatureProof of InclusionProof of Membership
What it provesData is in a specific, known set (e.g., a block)Entity/data is in a defined group/set
Primary GoalData integrity, verifiable transaction recordingAccess control, identity, privacy-preserving attributes
Typical MechanismMerkle Trees (Merkle Proofs)Merkle Trees, often combined with Zero-Knowledge Proofs
Privacy ImplicationData being proven is usually publicCan offer strong privacy (especially with ZKPs)
ContextVerifying past blockchain events/transactionsAuthorizing future actions or access based on credentials

Related Concepts

In addition to demonstrating that a transaction is included in a block, the term “proof of inclusion” can also refer to related concepts like:

Proof of Existence (PoE): Verifiable evidence that a document exists at a certain moment may be obtained by storing a cryptographic digest (hash) of the document on the blockchain at that timestamp. This keeps the content of the document secret.

Proof of Ownership (PoO): An algorithm that needs a Trusted Execution Environment (TEE) for participants and use distinct pseudonyms. Only individuals who possess the private key linked to the signature may verify their ownership of a work or contract, ensuring its integrity, date of publication, and ownership.

Consensus Mechanisms: Eventually, processes like as Proof of Work (PoW) are essential for guaranteeing that blocks with legitimate transactions are approved and appended to the blockchain. All transactions within those approved blocks are implicitly confirmed to be included by this consensus on the ledger’s current state.

Agarapu Geetha
Agarapu Geetha
My name is Agarapu Geetha, a B.Com graduate with a strong passion for technology and innovation. I work as a content writer at Govindhtech, where I dedicate myself to exploring and publishing the latest updates in the world of tech.
Index