Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Abstract over U: UpdateMap more #61

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

michaelsproul
Copy link
Member

We had only partly abstracted over the type U used for storing pending updates to lists/vectors. This PR updates several of the trait implementations so that they work with any choice of U, not just the default VecMap.

It may be advantageous to use a different map type now that the validator set has grown. The size of a VecMap is O(largest index), so I suspect we are allocating a lot of very large vecs on networks with millions of validators (mainnet, Holesky). A BTreeMap may be more efficient in terms of speed and memory usage at this point. I will do some benchmarks with Lighthouse against this branch before merging.

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.

2 participants