nonce staking guards, iter close#922
Merged
xmariachi merged 1 commit intoalek/restructure-emissions-keeperfrom Mar 3, 2026
Merged
nonce staking guards, iter close#922xmariachi merged 1 commit intoalek/restructure-emissions-keeperfrom
xmariachi merged 1 commit intoalek/restructure-emissions-keeperfrom
Conversation
|
Too many files changed for review. ( |
ba66a11 to
903d5df
Compare
xmariachi
added a commit
that referenced
this pull request
Mar 9, 2026
<!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺ v ✰ Thanks for creating a PR! You're awesome! ✰ v Please note that maintainers will only review those PRs with a completed PR template. ☺ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --> ## Purpose of Changes and their Description Includes: nil guards in nonce paths, safer reputer nonce deref, prune-worker no-op consistency, missing iter.Close(). ## Are these changes tested and documented? - [x] If tested, please describe how. If not, why tests are not needed. -- unit tests modified accordingly - [ ] If documented, please describe where. If not, describe why docs are not needed. -- no need, no func change - [ ] Added to `Unreleased` section of `CHANGELOG.md`? -- no need , no func change <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Modularized the emissions keeper into focused sub-keepers and added robust nonce/staking guards to prevent nil derefs and window inconsistencies. No external message or query API changes; improves safety, clarity, and testability. - **Refactors** - Split monolithic Keeper into sub-keepers: Params, Topic, Staking, Scores, Nonce, Regrets, ReputerLoss, Weights, Banking, and ActorPenalties. - Rewired Msg/Query servers and tests to use injected sub-keepers and simple getters (e.g., GetParamsKeeper()). - Moved EMA score logic, weights, staking, topics, regrets, and nonce management into dedicated files with constructor funcs. - **Bug Fixes** - Added nil input checks and nil-safe iteration across nonce methods (Fulfill/Add/Is*/Prune) to prevent panics; PruneWorkerNonces now no-ops when empty. - Closed a missing iterator in staking (GetDelegateStakeRemovalForDelegatorReputerAndTopicId). <sup>Written for commit 903d5df. Summary will update on new commits.</sup> <!-- End of auto-generated description by cubic. -->
xmariachi
added a commit
that referenced
this pull request
Mar 9, 2026
<!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺ v ✰ Thanks for creating a PR! You're awesome! ✰ v Please note that maintainers will only review those PRs with a completed PR template. ☺ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --> ## Purpose of Changes and their Description Includes: nil guards in nonce paths, safer reputer nonce deref, prune-worker no-op consistency, missing iter.Close(). ## Are these changes tested and documented? - [x] If tested, please describe how. If not, why tests are not needed. -- unit tests modified accordingly - [ ] If documented, please describe where. If not, describe why docs are not needed. -- no need, no func change - [ ] Added to `Unreleased` section of `CHANGELOG.md`? -- no need , no func change <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Modularized the emissions keeper into focused sub-keepers and added robust nonce/staking guards to prevent nil derefs and window inconsistencies. No external message or query API changes; improves safety, clarity, and testability. - **Refactors** - Split monolithic Keeper into sub-keepers: Params, Topic, Staking, Scores, Nonce, Regrets, ReputerLoss, Weights, Banking, and ActorPenalties. - Rewired Msg/Query servers and tests to use injected sub-keepers and simple getters (e.g., GetParamsKeeper()). - Moved EMA score logic, weights, staking, topics, regrets, and nonce management into dedicated files with constructor funcs. - **Bug Fixes** - Added nil input checks and nil-safe iteration across nonce methods (Fulfill/Add/Is*/Prune) to prevent panics; PruneWorkerNonces now no-ops when empty. - Closed a missing iterator in staking (GetDelegateStakeRemovalForDelegatorReputerAndTopicId). <sup>Written for commit 903d5df. Summary will update on new commits.</sup> <!-- End of auto-generated description by cubic. -->
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Purpose of Changes and their Description
Includes: nil guards in nonce paths, safer reputer nonce deref, prune-worker no-op consistency, missing iter.Close().
Are these changes tested and documented?
Unreleasedsection ofCHANGELOG.md? -- no need , no func changeSummary by cubic
Modularized the emissions keeper into focused sub-keepers and added robust nonce/staking guards to prevent nil derefs and window inconsistencies. No external message or query API changes; improves safety, clarity, and testability.
Refactors
Bug Fixes
Written for commit 903d5df. Summary will update on new commits.