This repository has been archived by the owner on Mar 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
adlerjohn
added
documentation
Improvements or additions to documentation
enhancement
New feature or request
consensus
labels
Jan 3, 2021
Note: markdown-link-check is failing with this link https://www.secg.org/sec1-v2.pdf which is a bit unstable for me (sometimes fails to load) but isn't dead. |
liamsi
reviewed
Jan 12, 2021
liamsi
reviewed
Jan 14, 2021
liamsi
reviewed
Jan 14, 2021
liamsi
reviewed
Jan 14, 2021
liamsi
reviewed
Jan 14, 2021
musalbas
reviewed
Jan 15, 2021
musalbas
reviewed
Jan 15, 2021
musalbas
approved these changes
Jan 15, 2021
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
consensus
documentation
Improvements or additions to documentation
enhancement
New feature or request
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Represent the validator queue as a singly linked list. This allows us to collect the top
MAX_VALIDATORS
validators in linear time to theMAX_VALIDATORS
, independent of the number of queued validators. Each modification to the validator queue can be done in logarithmic time w.r.t. the number of queued validators if a local tree data structure is used to store the queue (which clients are expected to actually do). In other words, the linked list representation is primarily for light clients/fraud proofs.Add an end block state implicit transition to make use of the queue to collect the top
MAX_VALIDATORS
trivially by walking through the linked list.Also refactored the layout of delegations in the state tree just to make things a bit simpler. Instead of storing the delegation data with each account, store it in a dedicated delegations subtree.