4 ms·
I appreciate the nitpick! Words do matter. I'll share my definition of these terms, for me they have very precise definitions: A merkle tree is a specific dat
by r3trohack3r 3y ago
I appreciate the nitpick! Words do matter.
I'll share my definition of these terms, for me they have very precise definitions:
A merkle tree is a specific data structure: https://en.wikipedia.org/wiki/Merkle_tree https://en.wikipedia.org/wiki/Merkle_tree
> In cryptography and computer science, a hash tree or Merkle tree is a tree in which every "leaf" (node) is labelled with the cryptographic hash of a data block, and every node that is not a leaf (called a branch, inner node, or inode) is labelled with the cryptographic hash of the labels of its child nodes. A hash tree allows efficient and secure verification of the contents of a large data structure. A hash tree is a generalization of a hash list and a hash chain.
If you have hashes co-located with data, and data spread throughout the chain, it is not a merkle tree.
A blockchain is a linear chain of hashes of the content in each block of the chain. In a blockchain, for any given block, there is only one valid next block.
When a blockchain is propagated over a network, there is a consensus algorithm used to agree on state of that chain. Bitcoin uses proof-of-work to agree on the next block. Anything that allows multiple nodes to reach consensus on the state of a blockchain is a consensus algorithm. SSB uses proof-of-signature, and the sequence number, as its consensus algorithm. The network reaches consensus on the state of any particular chain by validating the signatures and that the sequence numbers are in the correct order.
Colloquially, blockchains have been conflated with their consensus schemes. When people use the term blockchain conversationally, they generally mean a blockchain that propagates over a network using some sort of consensus algorithm. This conflation of consensus with blockchains has lead to many people in the p2p space rejecting the term blockchain to distance themselves from the crypto hype bubble, even though the data structure itself is quite useful.
Finally there is a Merkle-DAG, introduced by Juan Benet, that acts as a unifying data structure for both blockchains and merkle-trees. Merkle-DAGs can also express novel data structures that are neither a merkle-tree nor a blockchain.
tl;dr: a blockchain is not a merkle-tree, and a merkle-dag might be capable of representing a blockchain but they are separate concepts. A blockchain is independent of its consensus algorithm, although colloquially the two have been conflated.
P.S. Merkle-DAG might be capable of representing git, would be fun to give it a try sometime using something like IPLD.
- p4bl0 3y ago> The network reaches consensus on the state of any particular chain by validating the signatures Ok I can see that. It's the distributed consensus problem in a centralized setting. It still feels strange to call that a blockchain but maybe it can be qualified like "centralized blockchain" (which questions the need for such a structure to begin with).
- r3trohack3r 3y ago> "centralized blockchain" (which questions the need for such a structure to begin with). I’ve seen centralized blockchains used to great effect in ledger contexts where the chain is not synced, but references (hashes) of the chain are shared externally (I.e. transaction ids). If an external auditor has a set of transaction ids that have been communicated externally, they can later audit the centralized chain and prove it has not been tampered with without having to have the full log of blocks.
- p4bl0 3y ago> If you have hashes co-located with data, and data spread throughout the chain, it is not a merkle tree. Yes that's the theoretical structure but in practice its usage almost always implies data co-located with the intermediate hashes, if only because it's used to validate the integrity of a tree of files and directory and it's easier to manipulate a single structure with all the information. That's how it's done in Git internally, as well as in IPFS for example. I believe it's also how Merke-trees are used in some backup/synchronization tools. > In a blockchain, for any given block, there is only one valid next block. Yes, but that's just a particular kind of tree, where each node only has one child.
- r3trohack3r 3y ago> Yes, but that's just a particular kind of tree, where each node only has one child. Yes! I’m personally building a SSB data structure that forks into a tree, forking to allow writes from each new writer, to allow multi-device writes! It is a multi-writer append database that behaves like a CRDT. It’s a blocktree, not a blockchain. Which is also expressable as a merkledag.