Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

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
1answer
31 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
40 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
25 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
87 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
45 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
25 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
15 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
25 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, ...
4
votes
1answer
439 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
16 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
29 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
36 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
37 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
119 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
148 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, ...
0
votes
0answers
20 views

Merkle hash tree

Does the Merkle hash tree always have to be a binary tree? If not then what will be the advantages if it is ternary, tertiary…or anything else?
0
votes
0answers
19 views

SPV node in local machine [duplicate]

I have fullnode in my local machine, I'd like to have SPV node to understand how SPV works with merkle tree. With Bitcoin Core 0.17.1 I can have only full node?
4
votes
1answer
402 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 ...
2
votes
1answer
281 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
264 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
352 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
133 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
26 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
34 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 ...
3
votes
3answers
60 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
48 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
217 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
250 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 ...
3
votes
2answers
134 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
634 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
45 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 ...
4
votes
2answers
176 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
92 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, ...
0
votes
2answers
130 views

How would you find the Merkle Root with a Block that contains 6 transactions?

Let's use block #100205 https://www.blockchain.com/en/btc/block/0000000000033d0de6f4ebe93b3b142424cdbecf4bd98b948e856c4a55f09f76 This block contains 6 transactions. After the second level of hashing ...
0
votes
2answers
341 views

I'm trying to hash transactions together to find the Merkle Root!

Transaction #59500 has 045c670f1c02c919 as its coinbase. Transaction 1 is 6653ad77d695752cff9fe63bbb5702a53807be534c537251d53de06aac5ca093. Transaction 2 is ...
0
votes
1answer
207 views

Why use Merkle Root (and not just concatonation of all hashes?) [duplicate]

I am studying the bitcoin protocol and do not exactly understand why a Merkle root is used to register all the transactions. What is the point of using a tree-wise structure when you can also just ...
1
vote
0answers
30 views

Why do Merkle trees have a structure such that everything is in pairs? [duplicate]

From the leaves all the way to the root, it is always a pair that is hashed together as it goes up the tree. Why is it a pair, and not three or more?
1
vote
0answers
34 views

Lightning Network: are all keys pre-generated in the base row of the merkle tree?

From the whitepaper, page 41: Keys are generated in a merkle tree and are very deep within the tree. For instance, Alice pre-generates one million keys, each key being a child of the previous ...
3
votes
1answer
303 views

How is the Leaf node weakness in Merkle Trees exploitable?

Recently a weakness in leaf nodes of merkle trees was disclosed and it is claimed that this issue is exploitable to trick SPV nodes. How does the weakness make SPV nodes vulnerable to attack? What ...
1
vote
1answer
34 views

Lite-wallet transaction confirmation procedure

BTC lite-wallet sends a bloom-filer request to bitcoin node about what is the current balance of the particular address. After that wallet will have a Merkle-tree prove that transaction is indeed on a ...
0
votes
0answers
28 views

How are transactions hashed together to form a Merkle Root? [duplicate]

In block #59,500 there are 2 transactions Transaction 1. 6653ad77d695752cff9fe63bbb5702a53807be534c537251d53de06aac5ca093 and Transaction 2. ...
1
vote
1answer
109 views

Merkle Tree computations

Assume I am running a mini-blockchain that is I only have blocks' headers but no transactions. I wish to verify a transaction of a third party. For that I need the transaction's path to the Merkle ...
1
vote
2answers
180 views

Merkle root Vs transaction hashes

It is not clear to me, why not we can simply store transaction hashes in a block header instead of storing the Merkle root. I understand that storing transactions' hashes will slightly increase size ...
2
votes
2answers
301 views

Who gives SPV nodes merkle path to do validation for small subset of transaction?

From Mastering bitcoin: Merkle trees are used extensively by SPV nodes. SPV nodes don’t have all transactions and do not download full blocks, just block headers. In order to verify that a transaction ...
0
votes
1answer
1k views

How to solve error: Incorrect or no genesis block found. Wrong datadir for network?

I am making my own alt-coin, and I have mined the first genesis block hash(after some time), Merkle hash, nnonce and time. I am running on Ubuntu14.04. But when I run ./bitcoind I get this error ...
2
votes
1answer
429 views

Is the hash of the coinbase transaction needed for the merkle root?

first time posting here. I was interested on how mining software works down to the bytes. I came across this well written article right here: http://www.righto.com/2014/02/bitcoin-mining-hard-way-...
0
votes
1answer
143 views

Confirming transactions in the Merkle root and SegWit

I'm trying to find out how exactly transactions are confirmed in a block. I understand that to confirm a transaction, you hash it with its associated transaction and then the associated hashes until ...
1
vote
2answers
153 views

Deserializing merkleblock message

I've been struggling the past couple of days to deserialize a merkleblock message. I'm writing a go app that uses the bitcoin rpc client to call gettxoutproof, but only need the merkle proof (array of ...
3
votes
2answers
1k views

What is the difference between Root Hash and Block Hash?

I was reading about how Bitcoin works from Satoshi's original paper. I had a query while going through the 7th paragraph. What is the difference between Root Hash and Block Hash? Isn't the block hash ...
1
vote
1answer
107 views

Merkle root vs message digest? [duplicate]

My question is in relation to the operational difference between a merkle root and a plain old message digest. To calculate a merkle root I need to complete the following steps : hash each ...