Fix recovery target validation at execution - #636
Open
Seunfunmi-319509 wants to merge 14 commits into
Open
Conversation
docs: add MIT LICENSE file matching Cargo.toml declaration
|
@Seunfunmi-319509 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! 🚀 |
Author
|
kindly review |
…recovery-execution
Resolve duplicate imports in admin.rs, unused variables, duplicate discriminant values (AlreadyPaused 15→17), missing deployer/executor args in tests, Symbol→IntoVal conversion, and test snapshot updates across governance and settlement contracts. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
- timelock tests: re-enable mock_all_auths before execute calls since execute now requires executor auth (issue Betta-Pay#561) - payments proptests: account for network_fee clamping when fees exceed gross amount (issue Betta-Pay#683) - reregistered_merchant test: accept that re-registration clears the ArchivedMerchant tombstone (issue Betta-Pay#685) - set_settlement_rule event test: remove incorrect bootstrap_fallback assertion since _set_settlement_rule does not emit that event 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
…ly path calculate_fee_split is a read-only path and does not emit events (issue Betta-Pay#691). Verify fee values directly instead of checking for BOOTSTRAP_FALLBACK_EVENT. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
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.
Fixes #469
Re-validate the pending recovery target immediately before changing the admin, preventing corrupted pending state from installing a zero address. Recovery execution remains intentionally permissionless: any caller may execute it once the ledger timestamp reaches
execute_after.The execution check compares the current ledger timestamp directly with the stored execution timestamp, and regression coverage demonstrates that
execute_after - 1is rejected while the exact timestamp succeeds. A corrupted zero target is also rejected at execution.Tests:
cargo test -p settlement_contract recovery_passes (3 tests).cargo test --workspacewas run in the Rust 1.85 container but currently reports unrelated pre-existing snapshot/TTL/event failures in both contracts.