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

Dynamic snapshot period based on validator set size #552

Open
kmlbgn opened this issue Aug 28, 2023 · 0 comments · May be fixed by #654
Open

Dynamic snapshot period based on validator set size #552

kmlbgn opened this issue Aug 28, 2023 · 0 comments · May be fixed by #654
Assignees
Labels

Comments

@kmlbgn
Copy link
Collaborator

kmlbgn commented Aug 28, 2023

Status Quo

Currently, the snapshot period used for calculating the performance metric P for validators is hardcoded to 1000 blocks at genesis. The static nature of the snapshot period lacks the flexibility to adapt to the dynamic conditions of the validator set, such as its size. While this approach has been functional, it's not fully optimized for a network that can grow or shrink in terms of active validators.

Proposed Change

The proposed change involves making the snapshot period dynamic, adjusting it to equal the current size of the validator set. This period would auto-update at intervals also determined by the size of the validator set. Specifically, every N blocks, where N is the size of the validator set, the snapshot period should be updated. This auto-update should only occur if there has been a change in the validator set (either addition or removal of validators).

This dynamic approach has 2 advantages:

  • It creates a strong incentive for validators to include more validators in the set: A larger validator set would result in a larger snapshot period, which in turn would reduce the impact of missing a single block on a validator's performance metric.
  • It removes the need for governance intervention to adjust the snapshot period, making the system more autonomous and efficient. This is particularly beneficial as it enables the network to adapt to changes without manual oversight.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants