-
Notifications
You must be signed in to change notification settings - Fork 319
[Feature] Configurable Tempo & Owner-Triggered Epochs #2638
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
Open
evgeny-s
wants to merge
42
commits into
devnet-ready
Choose a base branch
from
feature/dynamic-tempo
base: devnet-ready
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,618
−546
Open
Changes from all commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
d30a76f
Dynamic tempo implementation
evgeny-s 42b3e29
clippy + fmt
evgeny-s c6567e2
clean up
evgeny-s ad7ba80
Renamed function + updated comment
evgeny-s df184e3
wrap set tempo + cycle reset with a helper function
evgeny-s b2e4658
tests
evgeny-s 02f43ee
clippy
evgeny-s 40f2773
Merge branch 'devnet-ready' into feature/dynamic-tempo
evgeny-s c3fa417
fixed test from devnet
evgeny-s dca9f44
Merge branch 'devnet-ready' into feature/dynamic-tempo
evgeny-s 73d1ab4
- disable dynamic tempo for subnets with CR enabled.
evgeny-s 1ba4a3d
- update migration - do not clamp tempos
evgeny-s 215f13b
fix migration test
evgeny-s 577d62b
Added benchmarks for new extrinsics
evgeny-s ff61eb3
Merge branch 'devnet-ready' into feature/dynamic-tempo
evgeny-s e15d749
fix for e2e test
evgeny-s 7a1d7a3
- Increase timeout
evgeny-s 4c06820
- updated name + timeout
evgeny-s 82ae882
increase MAX_EPOCHS_PER_BLOCK for fast-runtime
evgeny-s bcfe012
Added runtime API to get the next epoch start block
evgeny-s 34bcc41
Merge branch 'devnet-ready' into feature/dynamic-tempo
evgeny-s 927be34
Merge branch 'devnet-ready' into feature/dynamic-tempo
evgeny-s b5b4184
- fix test after dev merge
evgeny-s 1fc3e88
- Added stateful SubnetEpochIndex
evgeny-s 4f97a5b
- clean previous tempo + 1 approach
evgeny-s 6603db7
Fix merge conflict regression
evgeny-s 11cb820
updated event format
evgeny-s ec34aa1
Make EpochSkipped more generic
evgeny-s 61ef57f
Reject trigger epoch if the next auto epoch < admin freeze window
evgeny-s be695df
Added deprecation note
evgeny-s e9036db
Replaced const MAX_EPOCHS_PER_BLOCK to pallet config param: MaxEpochs…
evgeny-s b528257
Added a possibility to update activity cutoff for root
evgeny-s 9f33cd4
Move LastMechansimStepBlock insertion after the distribute_emission, …
evgeny-s 231f2bf
updated error comments
evgeny-s bdf45ca
version bump
evgeny-s a8fee82
Commented deprecation note + updated activity_cutoff_usage
evgeny-s 26dfe91
Fixed precompile test
evgeny-s 8024b7a
fmt
evgeny-s 3e34671
- Added get_activity_cutoff_factor and set_activity_cutoff_factor for…
evgeny-s 8a39d86
Merge branch 'devnet-ready' into feature/dynamic-tempo
evgeny-s 877b41e
- commented deprecation because of clippy (will be removed in the fol…
evgeny-s 48d7f90
- fix safe math warning
evgeny-s 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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,3 +7,4 @@ pub mod root; | |
| pub mod run_coinbase; | ||
| pub mod subnet_emissions; | ||
| pub mod tao; | ||
| pub mod tempo_control; | ||
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.
Here we reveal commits before knowing whether the subnet epoch will actually execute in this block. If
MaxEpochsPerBlockhas already been reached, the epoch can be deferred, leaving the revealed weights public before being used. That seems to weaken the commit-reveal property and may allow actors to react to revealed weights through other epoch-relevant state. Can we either reveal only on the successful execution path, or document/test why this gap is not exploitable?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 the edge case when we have > 2 epoch execution per block, and we we want to make it right, theoretically we could move
reveal_crv3_commitstodrain_pendingafter we 100% sure that it will be executed (is_epoch_input_state_consistent- true), but the thing is we have the testtest_reveal_crv3_commits_retry_on_missing_pulsethat checks the missing pulse and does retry, but in this case, we won't be able to retry, so I would keep it as is. What we can do is increase theMaxEpochsPerBlockto 3, which makes this edge case less achievable because it would take two subnets in collusion to manipulate this vulnerability.WDYT?