3 ms·
A very literal reading of the Merkle sentence on wikipedia could conclude that it's stating each block of a blockchain must contain a valid Merkle tree, and so
by fergazen 9y ago
A very literal reading of the Merkle sentence on wikipedia could conclude that it's stating each block of a blockchain must contain a valid Merkle tree, and so technically that sentence on the Wiki is incorrect; because, aside from re-hashing the prior hash (along with each node data), the blockchain algorithm doesn't care what the 'data' payload is. I was giving the Wiki editor the benefit of the doubt, assuming he just worded that sentence incorrectly.
The only difference between an order-one (degree-one) merkle tree (wired like a 'linked list' graph) and a blockchain, is that merkle doesn't require new data to hash on each non-leaf node, but has data only on leaf nodes. In merkle, each level up the tree is rehashing ONLY the actual child hashes below it, so that all hashes are ultimately determined only by "hashes of hashes" (recursively) of LEAF nodes.
So this means from a coding standpoint every order-one merkel is a single line of code away from being a blockchain. That is: The line of code that adds the 'node data' byte array to the SHA256 Hash Digester input stream, before outputting the node's hash. However this may also be a case where the Merkle wiki is not fully complete and accurate, because I cannot fathom that Merkle never thought of a case where each node contains data of it's own to add into the hashing. I bet the original source material from Merkle does include node data as an option, and would make him technically the actual first inventor of blockchain.
- benchaney 9y ago> A very literal reading of the Merkle sentence on wikipedia could conclude that it's stating each block of a blockchain must contain a valid Merkle tree, and so technically that sentence on the Wiki is incorrect; That is not incorrect. That is exactly what is happening. > because, aside from re-hashing the prior hash (along with each node data), the blockchain algorithm doesn't care what the 'data' payload is. I was giving the Wiki editor the benefit of the doubt, assuming he just worded that sentence incorrectly. At the blockchain level, sure. But the Merkle tree exists at a higher level of abstraction. > The only difference between an order-one (degree-one) merkle tree (wired like a 'linked list' graph) and a blockchain, is that merkle doesn't require new data to hash on each non-leaf node, but has data only on leaf nodes. Right. This means that a Merkle tree of degree one can only contain one element, because it always have one leaf. That is why I called it useless in an earlier post. > So this means from a coding standpoint every order-one merkel is a single line of code away from being a blockchain. That is: The line of code that adds the 'node data' byte array to the SHA256 Hash Digester input stream, before outputting the node's hash. However this may also be a case where the Merkle wiki is not fully complete and accurate, because I cannot fathom that Merkle never thought of a case where each node contains data of it's own to add into the hashing. I bet the original source material from Merkle does include node data as an option, and would make him technically the actual first inventor of blockchain. It is only a one line of code difference, but it is a very important line of code. Changing the Merkle Tree in that way complete breaks the two main algorithms that make it useful [0]. Data structures aren't just about the way data is organized. They are also about ways to manipulate that data in that organization that allow for algorithms that wouldn't be possible otherwise. This is why Merkle didn't patent the idea of including data in non-leaf nodes, and that is also why most people don't consider any linked list using cryptographic hashes instead of pointers to be a blockchain. Because the way data is manipulated is just as important as how it is stored. [0] https://www.certificate-transparency.org/log-proofs-work https://www.certificate-transparency.org/log-proofs-work
- fergazen 9y agoThe Anders video (below) shows an example blockchain implementation where each node payload is only plain text. https://anders.com/blockchain/ https://anders.com/blockchain/ The idea that each hashed payload need be a Merkle tree was just a typo by that Wiki author. I'm glad you finally agreed by saying "Merkle tree exists at a higher level of abstraction". Sadly though, when you said "each block in the blockchain contains a Merkle Tree", you actually meant it literally. If you think the Anders video IS INDEED actual blockchain (and properly called such), then you AGREE with me insofar as terminology. (Although Anders does include the "Proof of Work" piece, which is not in all blockchains) > You say: "A Merkle tree of degree one can only contain one element" Are you "stating a tautology" there? (lmfao) or do you genuinely not understand that a tree of order one can still be arbitrarily deep? I'll assume that was a typo or one of your "not to be taken liteally" senences. Maybe you're talking in abstractions again. BTW: I checked the actual Merkle patent (https://www.google.com/patents/US4309569 https://www.google.com/patents/US4309569) to see if i was right that he had considered the OBVIOUS tweak of including DATA from nodes. The last three sentences in his patent mention it. Direct from Merkle patent: "The present invention has been described with respect to authentication of signatures. However, its use is not limited to signatures. It may be used to authenticate a piece of information in a list of information, or one item in a list of items. Thus, although the best mode contemplated for carrying out the present invention has been herein shown and described, it will be apparent that modification and variation may be made without departing from what is regarded to be the invention"