Skip to content

feat(exithatch): Admit Forced Exit requests into the ZonePortal - #1445

Draft
adityapk00 wants to merge 4 commits into
mainfrom
aditya/exit_hatch_structs
Draft

adityapk00 wants to merge 4 commits into
mainfrom
aditya/exit_hatch_structs

Conversation

@adityapk00

Copy link
Copy Markdown
Collaborator

Implements the first part of TIP-1012: protocol types, root authorization, and admission of encrypted forced-exit requests through ZonePortal.

  • Adds canonical payload encoding, EIP-712 authorization, and secp256k1/P256/WebAuthn signature verification.
  • Reuses ECIES helpers for request encryption.
  • Adds requestForcedExit with admission validation, atomic compensation payment, request metadata, and events. Requests enter the existing shared deposit queue.
  • Updates Solidity/Rust bindings and storage layouts while preserving T13’s storage slot.
    Admission remains disabled until coordinated protocol activation. L1 ingestion, execution, and outcome settlement follow in stacked PRs; prover integration is deferred.

@adityapk00

Copy link
Copy Markdown
Collaborator Author

cyclops audit

@github-actions

github-actions Bot commented Sep 15, 2026

Copy link
Copy Markdown

cc @adityapk00

Cyclops audit event published. View workflow run

Config: config: default, iterations: default, hours: default

@tempoxyz-bot tempoxyz-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👁️ Cyclops Review

PR #1445 stages TIP-1012 forced-exit admission. The admission path is gated today, but the review found activation-blocking integration issues around queue observation, TIP-20 receive-policy semantics, runtime size, capacity sizing, ABI/checker coverage, and ECIES domain separation. Findings are inline.

Reviewer Callouts
  • Activation coupling: forcedExitVersion is an L1 storage gate with no production setter, not a zone-hardfork gate. The PR that activates it should make L1 ingestion, zone execution, settlement, and checker support a code-level precondition.
  • Observer asymmetry: crates/l1/src/event.rs fails open on unknown portal topics while crates/checker/src/l1/events.rs fails closed. Structurally couple these observer tables to the portal ABI/queue types.
  • Storage layout conflict resolution: _reservedT13TokenCursor at crates/contracts/src/runtime/tempo/ZonePortal.sol:231-234 is load-bearing; preserve slot 28 during the T13/TIP-1096 merge.
  • ECIES caller compatibility: encrypt_payload now accepts only SEC1 parity bytes 0x02/0x03; out-of-tree SDKs using 0/1 parity conventions will start receiving None.
  • Future settlement invariant: Keep replay protection keyed on auth.nonce and ensure future withdrawal helpers enforce the nonzero fallback nonce required by the README.

Comment thread crates/contracts/src/runtime/tempo/ZonePortal.sol
Comment thread crates/contracts/src/runtime/tempo/ZonePortal.sol Outdated
}

/// @inheritdoc IZonePortal
function requestForcedExit(

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [ISSUE] ZonePortal runtime bytecode exceeds the EIP-170 deployment limit

The forced-exit additions push the compiled deployed runtime to 24,651 bytes, which is 75 bytes over EIP-170's 24,576-byte limit. forge build --sizes fails and CREATE/CREATE2 deployment of this implementation would revert on EIP-170-enforcing EVMs, even if the current genesis/hardfork install path can bypass CREATE.

Recommended Fix:
Reduce runtime size before merge and leave headroom for the remaining TIP-1012 work; move/de-duplicate reusable forced-exit validation and re-run forge build --sizes plus ABI/storage conformance.

Comment thread crates/contracts/src/runtime/tempo/ZonePortal.sol Outdated
Comment thread crates/contracts/src/runtime/interfaces/IZone.sol
Comment thread crates/contracts/src/precompiles/zone_portal.rs Outdated
Comment thread crates/precompiles/src/ecies.rs Outdated
Add authorization codecs, encrypted request helpers, queue commitments, and
activation-gated portal admission with weighted capacity and atomic compensation.
Include checker event handling, ABI declarations, and forced-exit ECIES domain
separation while preserving legacy deposit encryption.
@adityapk00
adityapk00 force-pushed the aditya/exit_hatch_structs branch from 99e8389 to 6cb7364 Compare September 16, 2026 13:07
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