feat(stellar): circuit-breaker pause for stealth-sender and wraith-names - #143
Open
Meet-hybrid wants to merge 5 commits into
Open
feat(stellar): circuit-breaker pause for stealth-sender and wraith-names#143Meet-hybrid wants to merge 5 commits into
Meet-hybrid wants to merge 5 commits into
Conversation
Add admin-gated pause/unpause to stealth-sender and wraith-names contracts, modeled after shared/src/pausable.rs pattern. Withdrawals (resolve, name_of) remain available while paused.
|
@Meet-hybrid 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! 🚀 |
Contributor
|
Merge conflicts against develop after the merge cascade. Rebase and the stellar step should behave differently against current develop. |
Contributor
|
The |
Author
Acknowledged. |
The develop merge cascade left the pause feature uncompilable: - Rebuild the mangled wraith-names test module (pause tests were interleaved with bulk tests and leftover multisig helpers). - Close the unclosed test fn brace in stealth-sender's test module. - Renumber Paused discriminants that collided with BatchTooLarge (6) and MultisigNotInitialized (21) added by the develop merge. - Thread the new admin param through the remaining StealthSender init callers in chaos integration tests and the crossover bench. - Apply cargo fmt to the reformatted pause code and fee_tests init call.
Add a dedicated stealth-sender test that withdraw_many succeeds while the contract is paused (users must always be able to exit during an incident), and correct PAUSE.md to reflect the actual guarded surface: stealth-registry is not pausable in this branch and withdraw_many is deliberately unguarded.
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
Currently, only stealth‑announcer supports a pause guard. If a live vulnerability is disclosed against stealth‑sender or wraith‑names, the only mitigation is a full upgrade—an hours‑long, multi‑sig process. This PR introduces a lightweight circuit‑breaker mechanism to allow immediate pausing of contract activity while keeping withdrawals available so users can always exit safely.
Implementation
Added Paused storage and pause(), unpause(), and is_paused() functions gated by Admin.
Wrapped all state‑mutating entrypoints (except withdraw, reveal, and lookup) with require_not_paused().
Emitted Paused and Unpaused events following the same topic pattern used in stealth‑announcer.
Updated PAUSE.md and MULTISIG.md to document the new guarded surfaces.
Referenced stealth‑announcer/src/pause.rs for consistency in event design.
Acceptance Criteria
cargo test --workspace covers pause/unpause and paused‑call rejection for both contracts.
withdraw on stealth‑sender and reveal/lookup on wraith‑names remain callable while paused (verified by dedicated tests).
SAC Smoke and Futurenet integration tests remain green.
PAUSE.md lists all guarded entrypoints per contract.
Files Touched
stealth‑announcer/src/pause.rs (reference)
stealth‑sender/src/lib.rs
wraith‑names/src/lib.rs
PAUSE.md
EVENT_TOPIC_DESIGN.md
closes #100