fix(contracts): reject delay_seconds >= PROPOSAL_TTL_SECONDS in multi… - #1697
Open
Aj-Kayvee wants to merge 5 commits into
Open
fix(contracts): reject delay_seconds >= PROPOSAL_TTL_SECONDS in multi…#1697Aj-Kayvee wants to merge 5 commits into
Aj-Kayvee wants to merge 5 commits into
Conversation
Aj-Kayvee
force-pushed
the
fix/1092-max-timelock-bound
branch
from
August 30, 2026 20:16
3239fc0 to
aef880b
Compare
…sig governance Add MAX_TIMELOCK_SECONDS constant and DelayTooLong error (4021) to prevent proposals with a timelock delay that would make the finalize window empty. Without this upper bound, setting delay_seconds >= PROPOSAL_TTL_SECONDS silently produces a proposal that can never be finalized because executable_after lands at or past the expiry, causing every finalize call to return ProposalExpired. - Add MAX_TIMELOCK_SECONDS = PROPOSAL_TTL_SECONDS - 1 constant - Add DelayTooLong = 4021 error variant - Reject delay_seconds > MAX_TIMELOCK_SECONDS in propose_admin_transfer - Add tests for boundary conditions: - Rejection: delay == 0, MIN - 1, TTL, TTL + 1, MAX + 1, 7x TTL - Acceptance & finalize: MIN_TIMELOCK_SECONDS, MAX_TIMELOCK_SECONDS - Finalize edge cases: 1s before executable, at expiry, 1s before expiry - executable_after arithmetic correctness Closes LabsCrypt#1092 🤖 Generated with Codebuff Co-Authored-By: Codebuff <[email protected]>
Aj-Kayvee
force-pushed
the
fix/1092-max-timelock-bound
branch
from
August 30, 2026 20:23
aef880b to
e35a2ef
Compare
added 4 commits
August 31, 2026 17:00
Set all required env vars before validating so tests don't depend on ambient CI environment, preventing spurious process.exit(1) failures.
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.
…sig governance
Add MAX_TIMELOCK_SECONDS constant and DelayTooLong error (4021) to prevent proposals with a timelock delay that would make the finalize window empty. Without this upper bound, setting delay_seconds >= PROPOSAL_TTL_SECONDS silently produces a proposal that can never be finalized because executable_after lands at or past the expiry, causing every finalize call to return ProposalExpired.
Closes #1092
🤖 Generated with Codebuff
Pull Request Checklist
Please ensure your PR follows these steps, mirroring our
CONTRIBUTING.mdguidelines.CONTRIBUTING.mddocument.