-
Notifications
You must be signed in to change notification settings - Fork 318
[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
Changes from all commits
d30a76f
42b3e29
c6567e2
ad7ba80
df184e3
b2e4658
02f43ee
40f2773
c3fa417
dca9f44
73d1ab4
1ba4a3d
215f13b
577d62b
ff61eb3
e15d749
7a1d7a3
4c06820
82ae882
bcfe012
34bcc41
927be34
b5b4184
1fc3e88
4f97a5b
6603db7
11cb820
ec34aa1
61ef57f
be695df
e9036db
b528257
9f33cd4
231f2bf
bdf45ca
a8fee82
26dfe91
8024b7a
3e34671
8a39d86
877b41e
48d7f90
e9d8d1d
9fab749
29732bf
971ca93
14631b9
08c4d32
bf98537
43b63fa
0c6f0df
eaa4f62
c89796d
4e08638
da942cf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -38,8 +38,9 @@ impl<T: Config> Pallet<T> { | |
| /// The `reveal_crv3_commits` function is run at the very beginning of epoch `n`, | ||
| pub fn reveal_crv3_commits_for_subnet(netuid: NetUid) -> dispatch::DispatchResult { | ||
| let reveal_period = Self::get_reveal_period(netuid); | ||
| let cur_block = Self::get_current_block_as_u64(); | ||
| let cur_epoch = Self::get_epoch_index(netuid, cur_block); | ||
| // If the subnet is deferred past this block the | ||
| // commits are taken once here and the later block(s) become no-ops. | ||
| let cur_epoch = Self::current_epoch_with_lookahead(netuid); | ||
|
Comment on lines
+41
to
+43
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the case that we must defer the epoch can't we defer the reveal too? |
||
|
|
||
| // Weights revealed must have been committed during epoch `cur_epoch - reveal_period`. | ||
| let reveal_epoch = cur_epoch.saturating_sub(reveal_period); | ||
|
|
||
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.
Maybe it could be removed?