Skip to content

feat(solana): emergency halt switch#482

Merged
entrius merged 1 commit into
contract-v2from
feat/solana-halt
Jun 18, 2026
Merged

feat(solana): emergency halt switch#482
entrius merged 1 commit into
contract-v2from
feat/solana-halt

Conversation

@LandynDev

Copy link
Copy Markdown
Collaborator

Ports the ink! set_halted emergency halt into the Solana contract, faithfully and surgically.

Scan

Every halt touchpoint in the ink! contract was enumerated. Halt gated exactly 3 mutating entrypoints: post_collateral, vote_reserve, vote_activate.

Mapping

ink! gate Solana gate
post_collateral post_collateral
vote_activate vote_activate
vote_reserve open_or_request (the reservation-creation entry) ✅

resolve_pool is not gated — pools opened before a halt can still settle, mirroring ink! blocking only new reserve votes, not in-flight completion. vote_initiate/confirm/timeout/vote_deactivate/withdraw are not gated, matching ink!.

Changes

  • Config.halted field + halted=false at initialize
  • SystemHalted error
  • admin set_halted instruction + HaltSet event
  • require!(!config.halted, SystemHalted) on the 3 entrypoints
  • CONFIG_VERSION 4 → 5

Library type-checks clean. (Integration tests embed the built .so via include_bytes!, so they require anchor build to run.)

Halt gates exactly the three entrypoints ink! gated:
post_collateral, vote_activate, and open_or_request (the
reservation-creation entry, mirroring vote_reserve). resolve_pool
is left ungated so pools opened before a halt can still settle.

Adds Config.halted, SystemHalted error, admin set_halted + HaltSet
event; bumps CONFIG_VERSION to 5.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants