Limit generation/windowed-nonce growth#3032
Merged
theodorebugnet merged 2 commits intoJul 20, 2026
Merged
Conversation
theodorebugnet
force-pushed
the
theodore/multisig-upgrade
branch
from
July 8, 2026 21:13
d256a83 to
675f818
Compare
theodorebugnet
force-pushed
the
theodore/limit-nonce-growth
branch
2 times, most recently
from
July 8, 2026 21:21
f3a789a to
26d5dc7
Compare
…single transaction, to prevent accidental major changes to account state.
theodorebugnet
force-pushed
the
theodore/limit-nonce-growth
branch
3 times, most recently
from
July 9, 2026 17:15
d7182b5 to
a1ad288
Compare
bkolad
approved these changes
Jul 17, 2026
bkolad
left a comment
Member
There was a problem hiding this comment.
The PR LGTM. One question, generation uniqueness now rejects jumps above max(latest * 2, latest + PAST_TRANSACTION_GENERATIONS + 1) but if last is let's say 1000_0000 so the gap can be 1000_0000 and it grows as latest grows is that ok?
Contributor
Author
|
Yep, the main idea is that you can't do 1000x e.g. when accidentally submitting ms time instead of s time. That's been Zeta's main issue |
theodorebugnet
force-pushed
the
theodore/limit-nonce-growth
branch
from
July 20, 2026 00:39
a1ad288 to
127a1f5
Compare
theodorebugnet
merged commit Jul 20, 2026
a63b65a
into
theodore/multisig-upgrade
11 of 14 checks passed
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.
Description
Add a sane limit to how much a generation or windowed nonce can grow in a single transaction, to prevent accidental major changes to account state.
The limit is 2x the current value, with exceptions for low values (at least the minimum required for pruning in generations, and at least PAST_WINDOWS for windowed nonces) to avoid excessive friction when the current value is small.
Also updates the module README which was out of date.
CHANGELOG.mdwith a new entry if my PR makes any breaking changes or fixes a bug. If my PR removes a feature or changes its behavior, I provide help for users on how to migrate to the new behavior.Cargo.tomlchanges before opening the PRs. (Are all new dependencies necessary? Is any module dependency leaked into the full-node (hint: it shouldn't)?)Linked Issues
Testing
Describe how these changes were tested. If you've added new features, have you added unit tests?
Docs
Describe where this code is documented. If it changes a documented interface, have the docs been updated?
Rendered docs are available at
https://sovlabs-ci-rustdoc-artifacts.us-east-1.amazonaws.com/<BRANCH_NAME>/index.html