-
Notifications
You must be signed in to change notification settings - Fork 239
Commit-Reveal Weight Inheritance #1789
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
Merged
Merged
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
7818cf8
Update run_epoch.rs
JohnReedV 48cccca
Update benchmark_action.sh
JohnReedV b24733d
Revert "Update benchmark_action.sh"
JohnReedV 64968cd
Update run_epoch.rs
JohnReedV 18b054d
refactor
JohnReedV 8942eb8
Merge branch 'devnet-ready' into commit-reveal-last-update-fix
JohnReedV 5b04f5a
bump spec
JohnReedV fe38a6a
add tests
JohnReedV 59cb77c
add tests
JohnReedV c46a80c
bump spec
JohnReedV d039bfa
clippy
JohnReedV 827de33
Merge branch 'devnet-ready' into commit-reveal-last-update-fix
JohnReedV b6150b1
fix logic
JohnReedV 160a617
add full test coverage
JohnReedV 1e1877a
clippy
JohnReedV bef199b
zero weights in the next peroid
JohnReedV 3de6f8a
remove unused helper
JohnReedV 8e84c47
Merge branch 'devnet-ready' into commit-reveal-last-update-fix
JohnReedV d4e3bda
update comment
JohnReedV aafa2a2
fmt
JohnReedV 8d92896
add tests
JohnReedV 7e83105
bump spec
JohnReedV cdd4aee
fix bug
JohnReedV 16a9228
fix test
JohnReedV 6bd559a
add test_epoch_masks_incoming_to_sniped_uid_prevents_inheritance
JohnReedV 31ca88e
cap reveal_periods at 100
JohnReedV 9259d5b
test RevealPeriodOutOfBounds
JohnReedV ada05e9
Merge branch 'devnet-ready' into commit-reveal-last-update-fix
JohnReedV c193cb4
change check to updated < safe_block
JohnReedV a62f7a5
update test
JohnReedV 47c6f88
add test for classic block masking
JohnReedV 47dc034
add test_get_first_block_of_epoch
JohnReedV 2617a58
add test_get_first_block_of_epoch_step_blocks
JohnReedV 86c4350
cargo clippy
JohnReedV 7234617
improve all tests
JohnReedV File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
If the reveal period is not tied to the epoch timing, then the check here should be to get the next epoch from the block after the reveal period ends.
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.
So maybe last block of epoch +1, or next epoch, with just the reveal period end block
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.
This is what the current implementation already does
safe_epoch = reg_epoch + (reveal_period * 2)
-> first block of that epoch is the block after the 2-period window.reveal_period
is in epochs.