-
Notifications
You must be signed in to change notification settings - Fork 346
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix notify inactive collators failures at the end of a round (#3128)
* fix: 🐛 call ParachainStaking::on_finalize on mock blocks rolling * fix: 🐛 pass correct block number to ParachainStaking::on_finalize * test: ✅ fix happy path test for notify inactive collator * revert: 🔥 remove debug code * feat: ✨ add round length-aware block rolling functions * test: ✅ increase MaxOfflineRounds to 2 to match RewardPaymentDelay * test: ✅ call ParachainStaking::on_finalize before Balances and System on_finalize * test: ✅ add test reproducing a bug in notify_inactive_collator * refactor: 🔥 remove unused use statement * test: ✅ minimize changes to mocking framework for ParachainStaking * docs: 📝 improve comment * fix: 🐛 add historical staking information * refactor: ♻️ make roll_to_round functions round length-aware * test: ✨ improve mock fidelity * refactor: 🎨 use POINTS_PER_ROUND const in set_author invocations * docs: 📝 restore comments in tests * perf: ⚡ use a WasInactive storage to keep track of inactive collators * test: ✅ fix benchmark test * fix: 🐛 update benchmarks * fix: 🐛 correctly update weight calculation on mark_collators_as_inactive invocation * refactor: ⚡ use a more realistic upper bound to the number of collators in benchmarks * chore: 🔧 compute new weights * test: ✅ update test with new weights for operations on initialize * perf: ⚡ improve estimation of mark_collators_as_inactive weights * test: ✅ update test test_on_initialize_weights
- Loading branch information
1 parent
08ce140
commit dc75e3b
Showing
8 changed files
with
507 additions
and
197 deletions.
There are no files selected for viewing
This file contains 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 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 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.