Questions tagged [merkle-tree]

A hash-tree used to allow efficient and secure verification of contents of large data structures. Merkle-Trees are employed in Bitcoin to prove existence of transactions in a block.

Filter by
Sorted by
Tagged with
1
vote
0answers
28 views

Endianess of txids when calculating Merkle Root from getblocktemplate

I am trying to solve a merkle root from a previously mined block. Specifically this block... https://www.blockchain.com/en/btc/block/000000000003ba27aa200b1cecaad478d2b00432346c3f1f3986da1afd33e506 ...
0
votes
0answers
12 views

How Can i Extract a Z value of a specific Bitcoin Transaction that Belongs to a merkel tree/root transaction?

am trying to find a z value of a transaction that is signed in a merkle tree/root block , i coudn't find a raw tx id in hex of that specific transaction that signed with specific address while a raw ...
7
votes
1answer
823 views

Adding instead of concatenating hashes in Merkle trees

Why aren't the hashes combined using a commutative operation such as addition instead of concatenating them? Any possible vulnerabilities or security flaws? thanks for your time and efforts.
1
vote
1answer
137 views

Are hashes of Merkle tree roots unique throughout whole blockchain?

The "Mastering Bitcoin" book says that each block header contains a 32B long hash of the Merkle root for all the transactions it contains. If I extract all these Merkle roots from all the ...
1
vote
1answer
24 views

Why binary trees? Is there any particular benefit to using binary trees instead of some higher radix?

Bitcoin stores transactions in binary Merkle trees. They take O(log2 n) to traverse. If I used something like a ternary tree, where each node (including the root) references three branches/leaves ...
1
vote
1answer
18 views

Question about Merkle path verification

I think I understand Merkle verification, but I just want to make sure. Consider this following picture where all the blue nodes were sent to me My question : if the document that I want to verify is ...
1
vote
1answer
55 views

Do full nodes store the complete merkle tree or do they regenerate it when creating a merkle proof?

I understand what the merkle root is for. And I understand that blocks don't store the merkle tree. Question 1) Is there any place that the complete merkle trees get stored? I don't mean the merkle ...
1
vote
1answer
47 views

Is this Merkle hash root problem existent in Bitcoin?

In the Wikipedia article about Merkle trees, I was just reading this, unable to understand where the problem lies: Second preimage attack The Merkle hash root does not indicate the tree depth, ...
0
votes
1answer
19 views

How/where is the informatioin regarding the mapping of a transaction to a particular block stored?

According to the bitcoin white paper a block contains Previous Hash, Nonce and Root Hash. The root hash is a merkle tree root node of all the transactions that have been confirmed to that particular ...
1
vote
1answer
34 views

How does a Merkle proof differ from the Merkle tree?

I'm not sure how Merkle tree and Merkle proof are different. I thought Merkle proof is the same as the Merkle root in each block. However, it seems like Merkle proof contains all Merkle roots of all ...
7
votes
1answer
259 views

How do merkle trees ensure credibility to blockchain, when full node wrongly denies a presence of a txn in a block?

How can Merkle Trees ensure that a full node doesn't lie to a thin node that a txn t is not present in a block B if infact B contains t? How can a thin node tell if the full node is lying if the full ...
5
votes
0answers
85 views

CVE-2012-2459 , possible code and performance improvement, is my logic correct?

ok so, in my effort to create a fullnode from scratch both for learning purpose and need (not a topic for discussion, thanks), I was looking at the code that check Merkle Root to not be vulnerable to ...
1
vote
2answers
53 views

Merkle root with one transaction

I am trying to build a merkle root which contains only the coinbase transaction from bitcoind After creating the coinbase transaction i need to convert it to little endian, hash it twice and then put ...
4
votes
1answer
69 views

Is Merkle tree pruning described in the whitepaper feasible/useful? If not, would there be any alternative?

When I was reading bitcoin-paper-errata-and-details.md written by David A. Harding, I realized that there's probably a common misunderstanding or over-simplification about Merkle tree pruning. What ...
1
vote
1answer
56 views

A Bitcoin soft fork idea to help compress the blockchain

I've thought about a soft fork that can help storage costs. Why don't we force miners to embed the height of the TX Merkle tree in the first two bytes of the 4-byte block header version? It would ...
1
vote
1answer
42 views

How to find my transaction from root of Merkle Tree [closed]

How could I verify my transaction from the root of Merkle Tree.
1
vote
0answers
32 views

Adding a leaf node to a merkle tree

How can I add data/transactions to a merkle tree and then efficiently re-compute the root hash as well
-1
votes
1answer
56 views

Is it possible to dynamically add transactions to a merkle tree? [closed]

When i read about merkle trees.. I saw we shall build a system wherein we could club all the transactions that happend in like 10 minutes to stay in a block. I mean.. whatever is known.. the known ...
2
votes
1answer
175 views

RSA accumulator vs Merkle Proofs

For proof of inclusion (used by SPV nodes) Bitcoin relies on Merkle proofs. Why Merkle trees were chosen and not RSA accumulators, as they can be used to provide a shorter proof? What are the ...
1
vote
1answer
50 views

Intuition for Simplicity's CheckSigHashAll

So, I downloaded Simplicity and started a REPL using cabal new-repl Simplicity. Then I enabled type applications using :set -XTypeApplications. Consider these invocations: > (pkwCheckSigHashAll @...
0
votes
0answers
63 views

Bitcoin merkle tree

I am sorry can someone help ... Does bitcoin account for forgery attack as a second pre-image attack and how is it implemented? Plus how does bitcoin avoid unbalanced merkle tree. Regards
0
votes
0answers
48 views

How to create “Merkle Path”?

Merkle path is always appeared in many examples relevant with verification of transaction. but they never explain how merkle path is generated. So, I was wondering that how merkle path is generated. ...
2
votes
3answers
194 views

Does merkle root contain hashes of transactions from previous blocks?

Every block in a blockchain contains merkle root value. So for any block, there is some list of transactions and you create a merkle tree based on these transaction. For other blocks, same process ...
0
votes
4answers
210 views

A question about full nodes, lightweight nodes and merkle trees

What is the purpose of full nodes storing merkle roots? Why don't they save the transactions only? The hashes could be calculated only when a lightnode asks for them and the merkle roots could be ...
0
votes
0answers
27 views

What is the complete process and purpose of a block validation using merkle trees?

I need the whole details please. Like does that happen only in the current block? Or at past blocks do? And how exactly does this happen? Do full nodes send the proper hashes and then a local ...
0
votes
1answer
16 views

Question about Merkle trees and blocks

There is something I cannot understand about Merkle trees. I understand how they are calculated and etc., but I cannot understand how they are used on a blockchain. If a block stores only the Merkle ...
-1
votes
1answer
42 views

Merkle Audit Proofs of Certification vs. Bitcoin Merkle Proofs [closed]

The following article explains the process of "Merkle Audit Proofs of Certification". (Link to the article) Is the process the same as "Merkle Proofs in Bitcoin" ? If their process is not the same, ...
5
votes
1answer
478 views

Is Bitcoin PoW actually SHA256 + Merkle generation? Or have I misunderstood coinbase/append?

Miners can mutate nonce (32 bits) + time (mutates once a second). This allows for 232 (~4 billion) hashes per second. That's not enough anymore for our ASICs as they perform in the TH/s now rather ...
1
vote
1answer
23 views

Doubt regarding hashing function in Merkle trees

From what I read, say in a block, there are 4 transactions. The hash value of transactions A and B are combined together to get the hash AB. Same goes for transactions C and D to get hash CD. Later AB ...
0
votes
1answer
36 views

How and why we need to validate a transaction?

I've starting doing some researches about the Bitcoin protocol and the blockchain. I'm trying to understand all the sections in the Bitcoin white-paper. So far, i couldn't understand what is the ...
1
vote
1answer
39 views

How chaining the blocks protect against altering data?

I am confused with the block chaining, as i know a block header contains a reference to the previous block header hash with the merkle root and other fields. This header hash is related (computed) to ...
0
votes
1answer
52 views

When you need to validate a transaction is in a block

So after getting here, I have forgotten why you even want to validate a transaction is in a block, and how exactly this works. Wondering if one could explain In what situation you want to validate a ...
0
votes
1answer
211 views

Why the blockchain isn't just a Merkle tree

I am reading this and now wondering why the blockchain isn't just implemented as a Merkle tree, or the reverse, why you can't just have a single data structure (i.e. a transaction chain) instead of ...
2
votes
2answers
335 views

Example of data that is hashed in the merkle tree for a transaction

So I am reading this (excellent resource) on the Bitcoin merkle tree for a transaction. The merkle tree is constructed bottom-up. In the following example, we start with four transactions, A, B, C, ...
4
votes
1answer
417 views

Why was an insecure merkle tree implementation chosen?

At risk of creating a "lets discuss politics" question, let me clarify that what I want to know is whether there is a known benefit to Satoshi's "duplicate the last hash" merkle tree implementation ...
4
votes
1answer
574 views

How do I calculate the witness commitment hash for a given block?

From my understanding, every SegWit enabled block has an added output script which is used as a place to store the "Witness commitment" specified in BIP 141. One issue I've stumbled upon was ...
1
vote
1answer
560 views

How is Merkle path derived or calculated? [duplicate]

How is Merkle path calculated? I am looking for a detailed algorithm rather than a quick one liner for this so I can implement it. Note that this is not the same as computing Merkle root or building ...
3
votes
1answer
733 views

Are number of transactions in Merkle Tree always “even”?

According to definition and structure of the Merkle Tree, apparently, the number of transactions in a block that inserted in a Merkle Tree structure must be even (and not odd), is not it? Please see ...
2
votes
1answer
269 views

How come Merkle tree is more efficient when tree branches are not stored in blockchain?

Suppose we have 8 transactions in a block X as follows and we know every node's hash value of the whole Merkle tree (that is, including intermediary nodes such as 45). Then if someone claims ...
0
votes
1answer
28 views

How to determine what's mine?

I for example own 10 BTC does that mean, in some Blocks in the valid part of the blockchain is written, that I received at some point in time a certain amount of BTC? How do I prove that the ...
0
votes
1answer
41 views

Bitcoin and Merkle Tree - is in Bitcoin the Merkle Tree actually a List (which of course is a special form of a tree)?

When I get it right, each block in Bitcoins block chain contains a prev hash and a new block hash that includes this prev hash. So the genesis block only has itself and from there on each hash of the ...
4
votes
3answers
64 views

If SPV clients didn't exist, would Bitcoin still use Merkle trees?

I understand how full nodes use Merkle proofs to convince SPV clients that certain transactions are valid / invalid. Does the Bitcoin software use Merkle trees in any other way?
3
votes
1answer
60 views

Question about identical txids/merkle tree in Developer guide

I am new to the technical details about Bitcoin and has been reading Developer guide on bitcoin.org. I have a question about below contents mentioning merkle tree, identical txids. I googled and ...
0
votes
1answer
333 views

How do you get Sibling Hashed Values in a Merkle Proof?

Merkle Proofs are one of the main reasons that people attribute Bitcoin's use of Merkle Trees. But I'm struggling to understand how these work in practice. Please explain theoretically as well as ...
2
votes
2answers
405 views

While calculating merkle proof, where are the other hashes being stored?

Consider that I have a merkle root made up of transactions a,b,c,d,e,f,g,h. The root is H( H(H(a)+H(b)) + H(H(b)+H(b)) ) + H( H(H(b)+H(b)) + H(H(b)+H(h)) ). Now, I have to verify whether transaction ...
4
votes
2answers
166 views

Can SPV clients offer “proof of absence” of a transaction?

So light SPV clients give the user the ability to obtain merkle proofs (from a full node) that a given transaction is included in a block. Is there some cryptographic mechanism by which an SPV client ...
0
votes
1answer
790 views

Why A Block have a Merkle root hash? [duplicate]

That is the question, why a block needs to have a Merkle root hash, as Iundestand, once a block is mined the hash value of this block is stored at the header of the next one so, it generates the chain....
0
votes
2answers
57 views

I want to know how I can express a phenomenon found in Merkle Trees mathematically

I want to know how I can express a phenomenon found in Merkle Trees mathematically. If I want to figure out which leaf node in a Merkle Tree has changed I can look at the authentication path to figure ...
5
votes
2answers
287 views

Does a Block contain the list of transactions? Or only the Merkle Tree?

I was wondering how a block encodes its set of transactions. I know a Merkle Tree is generated, and that it encodes a Hashed version of the transactions. But is the Merkle Tree included in the Block ...
0
votes
1answer
182 views

Merkle tree and data validation

If we want to check that data is member of it or not we will take the root, data block, and all the blocks in path between data and root. According to this picture if i want to check that data block, ...