News for hackers. Stuff that matters.
Re:The Ethereum merge is done by cypress66 on Thursday September 15, 2022 @10:31AM (#32852641)
Bitcoin doesn't even use linked lists (it's merkle trees). Similar with other coins.
Re:The Ethereum merge is done by hoosieree on Thursday September 15, 2022 @01:48PM (#32855802)
I thought the transactions within a block are stored in a Merkle tree, but the blocks themselves are stored as a linked list. So if you wanted to find a particular transaction you'd still have to traverse all the blocks (O(length)) and then inspect each block (O(log(depth))). I have no idea what dominates in verifying a Bitcoin transaction, so maybe in practice the cost of finding a particular block is amortized because you're spending most of your time within a block.

But from the original bitcoin paper[1] I got the impression that to verify any particular transaction you need to traverse the whole list of blocks.

[1]: https://bitcoin.org/bitcoin.pdf

Re:The Ethereum merge is done by pshc on Thursday September 15, 2022 @02:32PM (#32856413)
In practice you can look up a tx by its hash from the transaction index (implemented with a Merkle tree)