Bitcoin Forum
July 27, 2026, 02:33:34 PM *
News: Latest Bitcoin Core release: 31.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Merkle Trees Efficiency  (Read 127 times)
Sam2 (OP)
Newbie
*
Offline

Activity: 11
Merit: 1


View Profile
September 08, 2025, 03:07:24 AM
Merited by hugeblack (1)
 #1

I understand that a Merkle tree allows efficient verification of transactions, but I don’t fully get how it saves space. If there are thousands of transactions in a block, and I only need to prove one, do I just provide the hashes along the branch? How much smaller is this compared to downloading the full block?🧐
ABCbits
Legendary
*
Offline

Activity: 3682
Merit: 10227



View Profile
September 08, 2025, 08:54:53 AM
Merited by hugeblack (1), Mia Chloe (1)
 #2

If there are thousands of transactions in a block, and I only need to prove one, do I just provide the hashes along the branch?

Yes. To be exact, just the associated TX and TX hash of other TX on involved branch.

How much smaller is this compared to downloading the full block?🧐

It's much smaller since AFAIK the data you need is only,
1. Block header (80 byte).
2. The transaction itself.
3. Total branch of the merkle tree multiplied by size of TXID (32 byte). For full block, i expect it'll have 13 branch which can store up to 8192 TX. So the size should be 416 bytes (13 x 32 byte).

███████████████████████████
███████▄████████████▄██████
████████▄████████▄████████
███▀█████▀▄███▄▀█████▀███
█████▀█▀▄██▀▀▀██▄▀█▀█████
███████▄███████████▄███████
███████████████████████████
███████▀███████████▀███████
████▄██▄▀██▄▄▄██▀▄██▄████
████▄████▄▀███▀▄████▄████
██▄███▀▀█▀██████▀█▀███▄███
██▀█▀████████████████▀█▀███
███████████████████████████
.
.Duelbits PREDICT..
█████████████████████████
█████████████████████████
███████████▀▀░░░░▀▀██████
██████████░░▄████▄░░████
█████████░░████████░░████
█████████░░████████░░████
█████████▄▀██████▀▄████
████████▀▀░░░▀▀▀▀░░▄█████
██████▀░░░░██▄▄▄▄████████
████▀░░░░▄███████████████
█████▄▄█████████████████
█████████████████████████
█████████████████████████
.
.WHERE EVERYTHING IS A MARKET..
█████
██
██







██
██
██████
Will Bitcoin hit $200,000
before January 1st 2027?

    No @1.15         Yes @6.00    
█████
██
██







██
██
██████

  CHECK MORE > 
Mia Chloe
Legendary
*
Offline

Activity: 1148
Merit: 2254


Contact me for your designs...


View Profile
September 12, 2025, 09:10:21 PM
 #3

Actually to prove one transaction in a block I think you only need your transaction data and a few "sibling" hashes from the Merkle tree to prove your transaction's inclusion to the root.
You don't actually need the hashes of other full transactions rather just the specific hashes needed for your branch. For a block with thousands of transactions this proof is really tiny probably only a few hundred bytes compared to the megabytes of the full block.

███████████████████████████
███████▄████████████▄██████
████████▄████████▄████████
███▀█████▀▄███▄▀█████▀███
█████▀█▀▄██▀▀▀██▄▀█▀█████
███████▄███████████▄███████
███████████████████████████
███████▀███████████▀███████
████▄██▄▀██▄▄▄██▀▄██▄████
████▄████▄▀███▀▄████▄████
██▄███▀▀█▀██████▀█▀███▄███
██▀█▀████████████████▀█▀███
███████████████████████████
.
.Duelbits PREDICT..
█████████████████████████
█████████████████████████
███████████▀▀░░░░▀▀██████
██████████░░▄████▄░░████
█████████░░████████░░████
█████████░░████████░░████
█████████▄▀██████▀▄████
████████▀▀░░░▀▀▀▀░░▄█████
██████▀░░░░██▄▄▄▄████████
████▀░░░░▄███████████████
█████▄▄█████████████████
█████████████████████████
█████████████████████████
.
.WHERE EVERYTHING IS A MARKET..
█████
██
██







██
██
██████
Will Bitcoin hit $200,000
before January 1st 2027?

    No @1.15         Yes @6.00    
█████
██
██







██
██
██████

  CHECK MORE > 
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!