Determine how to efficiently index Beacon State with proof #77

Open
opened 2022-09-14 23:01:51 +00:00 by dboreham · 1 comment
Owner

Beacon state is a 60MB structured record that significantly changes every slot (12 seconds). If we want to represent this historical state in a hash-linked form, similar to our approach with ipld-eth, we need to be able to split the SSZ tree into changed and non-changed components that have their own hashes, then store the resulting pieces in a way that allows them to be found for a given block height, and also stitched together again to make a whole Beacon State record.

Beacon state is a 60MB structured record that significantly changes every slot (12 seconds). If we want to represent this historical state in a hash-linked form, similar to our approach with ipld-eth, we need to be able to split the SSZ tree into changed and non-changed components that have their own hashes, then store the resulting pieces in a way that allows them to be found for a given block height, and also stitched together again to make a whole Beacon State record.
Member

Difference iteration statediffing approach (analogous to what we do in the execution layer):

  1. Materialize SSZ serialized beacon states at n and n-1 into SSZ Merkle trees
  2. Perform difference iteration of the two trees to collect only the nodes which form the symmetric difference set between the two trees
  3. Index the individual nodes in the difference set
Difference iteration statediffing approach (analogous to what we do in the execution layer): 1. Materialize SSZ serialized beacon states at n and n-1 into SSZ Merkle trees 2. Perform difference iteration of the two trees to collect only the nodes which form the symmetric difference set between the two trees 3. Index the individual nodes in the difference set
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cerc-io/ipld-eth-beacon-indexer#77
No description provided.