Skip to content

Gloas state storage design #8893

@michaelsproul

Description

@michaelsproul

Just collecting some thoughts as I work on DB stuff for Gloas.

Storage of states for Full blocks

Option 1: always use ReplayFrom(same_slot)

When storing state summaries for Full states (post-payload states), always use a storage strategy of ReplayFrom(slot) with slot == summary.slot (i.e. replay from the Pending state at the same slot -- just apply the payload).

Option 2: use ReplayFrom(prior_slot)

Similar to option 1, but use the same slot in ReplayFrom that we would use for a regular (Pending) state. In the case where the regular pending state would be stored as a snapshot or diff, fallback to ReplayFrom(same_slot) to replay just the payload on the state.


I think option (1) is probably simpler from a conceptual & implementation PoV. The only downside is that it involves potentially 2 replay_blocks calls rather than just 1 (although the same number of blocks+payloads are processed in total).

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions