1

How are the blocks traversed? Is it using a linked list concept to traverse?

If I need to see all block details, will it traverse from the genesis block to the requested block or will it traverse from the last block to the requested block?

What is the next or previous link in all the blocks?

In case of mining, then from which block will it start to traverse to get the requested block?

1 Answer 1

1

The logical data structure is that each new block commits to the hash of the previous block, so you can think of it like a singly linked list. See What is the exact data structure of each block?, or Ethereum block architecture for some nice diagrams.

If you sync and validate the blockchain from scratch you will also follow this order, so you start with the genesis block, and add each new block on top of it.

However, the data structures for storing this in any given piece of software will depend on that particular software.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.