Strengthen halt lockdown to block collateral deposits and activations#8
Merged
Strengthen halt lockdown to block collateral deposits and activations#8
Conversation
…ation The halt flag previously only blocked vote_reserve. Now it also blocks post_collateral and vote_activate, while all swap resolution paths (fulfill, confirm, timeout, extend, claim) remain allowed so in-flight swaps can safely unwind and users can always withdraw.
anderdc
approved these changes
Apr 2, 2026
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.
Strengthen halt (emergency stop) lockdown
Summary
ensure_not_halted()helper following the existingensure_owner()/ensure_validator()pattern. Refactoredvote_reserve()to use this.post_collateral(),vote_activate()when haltedDesign
The halt gates at the earliest commitment points only. Everything downstream of an existing reservation is allowed to resolve naturally:
Test plan
cargo contract build)post_collateralreturnsSystemHaltedwhen haltedvote_activatereturnsSystemHaltedwhen haltedwithdraw_collateralstill works when halted./tests/run.sh --chains btc --suite 02