-
Notifications
You must be signed in to change notification settings - Fork 983
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
Refactor loading of gov proposals for execution #2630
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2630 +/- ##
==========================================
+ Coverage 53.44% 53.48% +0.03%
==========================================
Files 310 310
Lines 101574 101604 +30
==========================================
+ Hits 54288 54340 +52
+ Misses 47286 47264 -22 ☔ View full report in Codecov by Sentry. |
I think the current behavior is correct. The changes should be activated on the epoch after the grace epoch ends. |
@adrianbrink this is kind of arbitrary though right, since we could just increase the |
20ebc2d
to
3c0cf18
Compare
@Fraccaman @adrianbrink what do you think of the changes in 9a354f4? I think renaming makes things much clearer to understand upon reading code and in general going forward, but we can remove this commit if there are objections. |
9a354f4
to
30317de
Compare
299a19b
to
80024ca
Compare
80024ca
to
3b3ae91
Compare
* brent/refactor-proposal-loading: changelog: add #2630 fmt rename `grace_epoch` to `activation_epoch` refactor loading of gov proposals for execution
looks like the e2e tests are actually broken here |
it just needed |
* origin/brent/refactor-proposal-loading: changelog: add #2630 fmt rename `grace_epoch` to `activation_epoch` refactor loading of gov proposals for execution # Conflicts: # crates/apps/src/lib/node/ledger/shell/finalize_block.rs
Describe your changes
Governance proposals were previously loaded every single block, which was a pointless operation. This logic is now coupled more tightly with the execution of the proposals, occurring only once per epoch within a function that loads and then executes.
Proposals are now clearly executed at the beginning of the grace epoch. The previously decoupled logic made it such that proposals were actually executed at the begging of
grace_epoch + 1
.This logic is removed from the
Shell
and reimplemented in the governance crate.Indicate on which release or other PRs this topic is based on
v0.32.1
Checklist before merging to
draft