Repository navigation
fix(contracts): replace global dispute window with per-vault bounded … - #1750
Merged
1nonlypiece merged 2 commits intoOct 24, 2026
Merged
1nonlypiece merged 2 commits into
1nonlypiece merged 2 commits into
Conversation
|
@cleank0de Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
…licts Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
6 tasks
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.
Closes #1707
Summary
Replaces the unauthenticated, unbounded global
configure_windowsetter inAccountabilityVaultwith a per-vaultdispute_windowfixed at vault creation (create_vault), bounded to[1 hour, 30 days], and evaluated using checked arithmetic.What & Why
configure_windowandDataKey::DisputeWindow:configure_windowwas exposed as an unauthenticated public contract function that allowed any caller to overwrite the dispute window for all vaults across the deployment (e.g., setting0to disable disputes globally oru64::MAXto cause arithmetic overflow indispute_milestone).dispute_windowviaVaultOptions:VaultOptions { oracle, guardian, dispute_window }to keepcreate_vaultwithin Soroban's 10-parameter limit.[MIN_DISPUTE_WINDOW (3,600s / 1 hour), MAX_DISPUTE_WINDOW (2,592,000s / 30 days)]atcreate_vault, returningError::InvalidDisputeWindow = 32when out of range while keeping existing error numbering stable.dispute_window: u64on eachVaultrecord.CheckInguard indispute_milestone:dispute_milestonenow requires an existingDataKey::CheckIn(index)record (failing withError::MilestonesIncompleteinstead of defaultingverified_atto0).verified_at.checked_add(vault.dispute_window)sodispute_milestonereturns a typed error rather than panicking on overflow nearu64::MAX.create_vaultnow takesVaultOptions({ oracle, guardian, dispute_window }) instead of separateoracleandguardianarguments, andconfigure_windowhas been removed from the spec. Follow-up updates tocreate_vaultargument construction insrc/services/soroban.tsare out of scope for this PR.contracts/accountability_vault/spec/AccountabilityVault.spec.json, test snapshots, and the function table incontracts/README.md.spec/AccountabilityVault.spec.jsonDiffTest Output