-
Notifications
You must be signed in to change notification settings - Fork 955
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
Tune past epochs in storage #1944
Conversation
1abd194
to
bab044f
Compare
256a0bb
to
514c7b6
Compare
The PR is ready for a look for anyone who wants to check it out. Here's a summary of the main storage changes:
I've used a |
514c7b6
to
432d143
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left some nits & questions, mostly
d3048b3
to
311c192
Compare
311c192
to
d1535ac
Compare
pls update wasms |
Co-authored-by: Tiago Carvalho <sugoiuguu@tfwno.gf>
@sug0 All the epoch-length changes to the PoS data are being made in this PR, as this is the relevant topic. The eth keys have been changed in 7c7ee02. Also want to note that you are able to query the total consensus stake of any epoch in the past directly from storage without computation using the @tzemanovic the enqueued slashes are now manually cleared in 85770be. |
7337c5c
to
01b6815
Compare
01b6815
to
64e817b
Compare
pub type ValidatorProtocolKeys = crate::epoched::Epoched< | ||
common::PublicKey, | ||
crate::epoched::OffsetPipelineLen, | ||
crate::epoched::OffsetMaxProposalPeriodPlus, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the offset can be reduced in the future. I'm not sure what the appropriate value for this should be, though.
* brent/tune-storage-past-epochs: move protocol keys into epoched PoS data keep `total_deltas` for same period of time as `validator_deltas` clear old enqueued slashes when processing slashes keep validator eth keys for max proposal period fixup! pos/types: configure number of past epochs kept for PoS data fixed `epoched` tests and `test_validator_sets` [ci] wasm checksums update changelog: add #1944 PoS: refactor usages of `Epoch::checked_sub` core/types/storage:m ore flexible fn checked_sub param fixup! replace direct storage read of PosParams with an RPC fn replace direct storage read of PosParams with an RPC fn fix PoS crate standalone build fixup! Apply suggestions from code review Apply suggestions from code review docstring cleanup new impl for purging old validator sets pos/types: configure number of past epochs kept for PoS data add PosParams type with added gov param WIP want to pass `max_proposal_period` from gov params into PoS
* brent/tune-storage-past-epochs: move protocol keys into epoched PoS data keep `total_deltas` for same period of time as `validator_deltas` clear old enqueued slashes when processing slashes keep validator eth keys for max proposal period fixup! pos/types: configure number of past epochs kept for PoS data fixed `epoched` tests and `test_validator_sets` [ci] wasm checksums update changelog: add #1944 PoS: refactor usages of `Epoch::checked_sub` core/types/storage:m ore flexible fn checked_sub param fixup! replace direct storage read of PosParams with an RPC fn replace direct storage read of PosParams with an RPC fn fix PoS crate standalone build fixup! Apply suggestions from code review Apply suggestions from code review docstring cleanup new impl for purging old validator sets pos/types: configure number of past epochs kept for PoS data add PosParams type with added gov param WIP want to pass `max_proposal_period` from gov params into PoS
* brent/tune-storage-past-epochs: move protocol keys into epoched PoS data keep `total_deltas` for same period of time as `validator_deltas` clear old enqueued slashes when processing slashes keep validator eth keys for max proposal period fixup! pos/types: configure number of past epochs kept for PoS data fixed `epoched` tests and `test_validator_sets` [ci] wasm checksums update changelog: add #1944 PoS: refactor usages of `Epoch::checked_sub` core/types/storage:m ore flexible fn checked_sub param fixup! replace direct storage read of PosParams with an RPC fn replace direct storage read of PosParams with an RPC fn fix PoS crate standalone build fixup! Apply suggestions from code review Apply suggestions from code review docstring cleanup new impl for purging old validator sets pos/types: configure number of past epochs kept for PoS data add PosParams type with added gov param WIP want to pass `max_proposal_period` from gov params into PoS
* brent/tune-storage-past-epochs: move protocol keys into epoched PoS data keep `total_deltas` for same period of time as `validator_deltas` clear old enqueued slashes when processing slashes keep validator eth keys for max proposal period fixup! pos/types: configure number of past epochs kept for PoS data fixed `epoched` tests and `test_validator_sets` [ci] wasm checksums update changelog: add #1944 PoS: refactor usages of `Epoch::checked_sub` core/types/storage:m ore flexible fn checked_sub param fixup! replace direct storage read of PosParams with an RPC fn replace direct storage read of PosParams with an RPC fn fix PoS crate standalone build fixup! Apply suggestions from code review Apply suggestions from code review docstring cleanup new impl for purging old validator sets pos/types: configure number of past epochs kept for PoS data add PosParams type with added gov param WIP want to pass `max_proposal_period` from gov params into PoS
* origin/brent/tune-storage-past-epochs: move protocol keys into epoched PoS data keep `total_deltas` for same period of time as `validator_deltas` clear old enqueued slashes when processing slashes keep validator eth keys for max proposal period fixup! pos/types: configure number of past epochs kept for PoS data fixed `epoched` tests and `test_validator_sets` [ci] wasm checksums update changelog: add #1944 PoS: refactor usages of `Epoch::checked_sub` core/types/storage:m ore flexible fn checked_sub param fixup! replace direct storage read of PosParams with an RPC fn replace direct storage read of PosParams with an RPC fn fix PoS crate standalone build fixup! Apply suggestions from code review Apply suggestions from code review docstring cleanup new impl for purging old validator sets pos/types: configure number of past epochs kept for PoS data add PosParams type with added gov param WIP want to pass `max_proposal_period` from gov params into PoS
* origin/brent/tune-storage-past-epochs: move protocol keys into epoched PoS data keep `total_deltas` for same period of time as `validator_deltas` clear old enqueued slashes when processing slashes keep validator eth keys for max proposal period fixup! pos/types: configure number of past epochs kept for PoS data fixed `epoched` tests and `test_validator_sets` [ci] wasm checksums update changelog: add #1944 PoS: refactor usages of `Epoch::checked_sub` core/types/storage:m ore flexible fn checked_sub param fixup! replace direct storage read of PosParams with an RPC fn replace direct storage read of PosParams with an RPC fn fix PoS crate standalone build fixup! Apply suggestions from code review Apply suggestions from code review docstring cleanup new impl for purging old validator sets pos/types: configure number of past epochs kept for PoS data add PosParams type with added gov param WIP want to pass `max_proposal_period` from gov params into PoS
* origin/brent/tune-storage-past-epochs: move protocol keys into epoched PoS data keep `total_deltas` for same period of time as `validator_deltas` clear old enqueued slashes when processing slashes keep validator eth keys for max proposal period fixup! pos/types: configure number of past epochs kept for PoS data fixed `epoched` tests and `test_validator_sets` [ci] wasm checksums update changelog: add #1944 PoS: refactor usages of `Epoch::checked_sub` core/types/storage:m ore flexible fn checked_sub param fixup! replace direct storage read of PosParams with an RPC fn replace direct storage read of PosParams with an RPC fn fix PoS crate standalone build fixup! Apply suggestions from code review Apply suggestions from code review docstring cleanup new impl for purging old validator sets pos/types: configure number of past epochs kept for PoS data add PosParams type with added gov param WIP want to pass `max_proposal_period` from gov params into PoS
Describe your changes
Closes #1798, closes #1857, closes #1903, closes #1783. All of these relate to changing how many past epochs are kept in storage for various PoS data. A refactor is needed to communicate the
max_proposal_period
governance parameter to the data.Closes #1961. The validator's protocol keys are moved into PoS and now epoched as well.
Indicate on which release or other PRs this topic is based on
Based on #1943, which is based on v0.23.0
Checklist before merging to
draft