Skip to content

Add validator set diff by height index #4270

@michaelkaplan13

Description

@michaelkaplan13

For both the weight diffs and pub key diffs tracking in the P-Chain state, add (height+subnet+nodeID) indexes.

These indexes will be required in order to efficiently construct the full validator set states at a given height by starting from the current validator sets (which are always kept in memory) and apply reverse diffs back to the requested height. The current indexes do not allow for this because they would require looping over all subnets that have ever been created.

Similar to the two existing indexes, the new indexes can be added on a "go forwards" basis. That is, nodes can start constructing them when they are updated, but they do not need to recreate them for historic block heights.

This is necessary for ACP-181 to all for efficient look up of all validator sets.

#4170

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Backlog 🧊

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions