Skip to content

Implement structurally shared validator list#763

Open
ArtiomTr wants to merge 2 commits into
grandinetech:developfrom
ArtiomTr:feature/structurally-shared-validator-list
Open

Implement structurally shared validator list#763
ArtiomTr wants to merge 2 commits into
grandinetech:developfrom
ArtiomTr:feature/structurally-shared-validator-list

Conversation

@ArtiomTr

Copy link
Copy Markdown
Collaborator

This PR employs Structure of Arrays (SoA) pattern for implementing validator list container. The validator fields are split into three lists - pubkeys, effective balances, and rest of fields. Because pubkey list is strictly append-only, such validator list structure saves memory when loading historical state from disk - instead of copying every public key from finalized state into a newly loaded one, we can attach whole pubkey list at once, re-using memory for all keys.

@ArtiomTr ArtiomTr force-pushed the feature/structurally-shared-validator-list branch from 994045f to 6159588 Compare June 18, 2026 17:46
This commit employs Structure of Arrays (SoA) pattern for implementing
validator list container. The validator fields are split into three
lists - pubkeys, effective balances, and rest of fields. Because pubkey
list is strictly append-only, such validator list structure saves memory
when loading historical state from disk - instead of copying every
public key from finalized state into a newly loaded one, we can attach
whole pubkey list at once, re-using memory for all keys.
@ArtiomTr ArtiomTr force-pushed the feature/structurally-shared-validator-list branch from 6159588 to 7b02b50 Compare June 18, 2026 18:28
This change moves index_of_pubkey cache to the PubkeyList container. It
allows to re-use index cache when restoring validator keys to state
loaded from disk, reducing memory usage and increasing performance.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant