Nockchain evidence

Bridge withdrawal runtime

Nockchain Bridge

A withdrawal execution trace for the new bridge runtime, sequencer authorization, journal persistence, Hoon kernel seams, and the default-branch-ahead-of-release state.

Commit
33ba97b1e206
Release
33ba97b1e206
Sources
7
Released
true

Release Drift

The latest public build release contains the bridge withdrawal execution commit, so receipts can cite a matching commit/build pair while still preserving sequencer authorization, proposal, and journal provenance.

latestCommitReleased

true

releaseCommit

33ba97b1e206dd89b15c61b72b7802caf2136c18

Priority Sources

bridge-withdrawals-spec

path

crates/bridge/docs/bridge-withdrawals.md

authority

canonical-bridge-withdrawal-spec

role

End-to-end withdrawal protocol and implementation status.

evidence

Defines Base burn ingestion, kernel pending/commit effects, proposal assembly, sequencer authorization, confirmation, and journal persistence.

bridge-runtime

path

crates/bridge/src/withdrawal/runtime.rs

authority

rust-runtime-source

role

Runtime loop orchestration for withdrawal activation, assembly, signing, and submission.

evidence

Spawns activation restore, assembly, signing, and submission loops after activation readiness is proven.

bridge-sequencer-crate

path

crates/nockchain-bridge-sequencer/src/main.rs

authority

sequencer-binary-source

role

Dedicated Nockchain API node hosted withdrawal sequencer service.

evidence

New sequencer crate owns withdrawal ordering, authorization, in-flight state, and confirmation polling from the colocated public API.

Withdrawal Flow

base-burn

Base contracts

User burns wrapped NOCK through Nock.sol::burn and MessageInbox.notifyBurn records the burn-side initiation.

receiptEvidence

Base tx hash, log index, lock root, amount, Base block hash, and bridge contract addresses.

kernel-pending

Hoon bridge kernel

Base observer feeds the burn batch into the kernel, which emits base-block-withdrawals-pending and requires an explicit commit ack.

receiptEvidence

as_of Base hash, base_event_id, pending request count, and base-block-withdrawals-committed ack.

proposal-built

Rust withdrawal assembly plus kernel tx-builder

Runtime selects bridge-owned notes, pokes create-withdrawal-tx, and persists the exact withdrawal-proposal-built envelope.

receiptEvidence

withdrawal id, epoch, snapshot height/block id, proposal hash, transaction name, selected input note commitments.

sequencer-authorized

Withdrawal sequencer

Peer canonicalization is not submit-ready; the sequencer authorizes one fully signed proposal and owns in-flight ordering.

receiptEvidence

commit certificate, signer set, authorized transaction name, sequencer journal object id, and in-flight state.

confirmed-settlement

Nockchain API node and bridge kernel

Sequencer observes confirmed inclusion from the public API and the kernel later reconciles counterpart identity, destination, and amount bounds.

receiptEvidence

confirmed height, confirmed block id, tx acceptance vs confirmation distinction, and kernel reconciliation status.

Safety Invariants

A local submitted event is advisory; confirmed inclusion is chain-observable.
Withdrawal execution fails closed if blockchain constants cannot be fetched or do not match kernel state.
Do not treat peer-canonical as submit-ready; sequencer authorization requires full witness signatures.
Only one withdrawal may be sequencer-authorized, submitted, and unconfirmed at a time.
Reserved input notes are released only after sequencer-confirmed settlement, not after local submit attempts.
The withdrawal journal is append-only; mutable projections must be rebuildable from the journal.

Additional Sources

bridge-architecture

path

crates/bridge/docs/architecture.md

authority

scoped-runtime-architecture

role

Bridge component map and deposit/withdrawal runtime boundaries.

evidence

Documents contracts, Hoon kernel, Rust observers, gRPC interfaces, signing/posting loops, and withdrawal effect handling.

withdrawal-submission

path

crates/bridge/src/withdrawal/submission.rs

authority

rust-submission-source

role

Sequencer-owned authorization/submission/confirmation lifecycle.

evidence

Submission is downstream of sequencer authorization and must not be treated as consensus finality until confirmation is observed.

wallet-tx-builder-fixture

path

crates/wallet-tx-builder/tests/fixtures/withdrawal_tx_fixtures.jam

authority

tx-builder-fixture

role

Fixture coverage for bridge-owned withdrawal transaction construction.

evidence

Withdrawal transaction fixtures anchor planner/fee/signature behavior that settlement evidence should cite.

hoon-bridge-kernel

path

hoon/apps/bridge/bridge.hoon

authority

deterministic-kernel-source

role

Hoon bridge state machine that reconciles withdrawal settlement with kernel state.

evidence

Kernel seams include pending withdrawal requests, proposal-building causes, signing causes, and settlement reconciliation.

Receipt Fields

nockchainCommit
nockchainBuild
latestCommitReleased
bridgeWithdrawalId
baseEventId
baseBatchEnd
lockRoot
withdrawalProposalHash
withdrawalEpoch
snapshotHeight
snapshotBlockId
sequencerAuthorizationState
sequencerJournalObject
sequencerJournalId
withdrawalJournalMirror
blockchainConstantsSource
colocatedPublicApiEndpoint
confirmedHeight
confirmedBlockId
inclusionConfirmationDepth
kernelReconciliationStatus

Sequencer Operational Contract

service

nockchain-bridge-sequencer

mustRunOn

designated Nockchain API node

bindings

requires --bind-public-grpc-addr for the colocated public Nockchain API, withdrawal sequencer listens on private gRPC port + 100, public Nockchain client endpoint is derived from the public gRPC bind address, Base confirmed-height watcher must initialize before sequencer RPC serves

cliFlags

--base-ws-url, --base-confirmation-depth, --withdrawal-handoff-window-blocks, --withdrawal-retry-after-base-blocks, --authorized-submit-retry-after-base-blocks, --sequencer-config-path, --sequencer-journal-object-store-endpoint, --sequencer-journal-object-store-bucket, --sequencer-journal-object-store-region, --sequencer-journal-object-store-prefix, --sequencer-journal-id, --sequencer-journal-object-store-access-key-id, --sequencer-journal-object-store-secret-access-key

journalEnv

WITHDRAWAL_SEQUENCER_JOURNAL_SIGNING_KEY, WITHDRAWAL_SEQUENCER_JOURNAL_OBJECT_STORE_ENDPOINT, WITHDRAWAL_SEQUENCER_JOURNAL_OBJECT_STORE_BUCKET, WITHDRAWAL_SEQUENCER_JOURNAL_OBJECT_STORE_REGION, WITHDRAWAL_SEQUENCER_JOURNAL_OBJECT_STORE_PREFIX, WITHDRAWAL_SEQUENCER_JOURNAL_ID, WITHDRAWAL_SEQUENCER_JOURNAL_OBJECT_STORE_ACCESS_KEY_ID, WITHDRAWAL_SEQUENCER_JOURNAL_OBJECT_STORE_SECRET_ACCESS_KEY

confirmationEvidence

tx-accepted is diagnostic; confirmed inclusion requires get_transaction_block plus confirmation depth. The sequencer confirmation loop reads the colocated public Nockchain API and records confirmation before clearing in-flight state. Kernel reconciliation is a second check after confirmed Nockchain settlement, not the first owner of block inclusion.

Sequencer Lifecycle

authorized

sequencer

The sequencer accepted a fully signed submit-ready proposal, not merely a peer-chosen candidate.

receiptEvidence

authorized transaction name, proposal hash, witness/signature completeness, journal event id.

mempoolAccepted

public Nockchain API

The public API reports transaction acceptance, which is diagnostic but not block inclusion.

receiptEvidence

tx-accepted result, raw tx id, observed-at, API endpoint.

confirmed

public Nockchain API plus sequencer

The authorized raw transaction was observed in a block with configured confirmation depth.

receiptEvidence

confirmed height, block id, tip height, confirmation depth, journal event id.

Additional Sequencer States

registered

sequencer

Withdrawal nonce and identity are known to the sequencer ordering frontier.

receiptEvidence

withdrawal id, withdrawal_nonce, registered-at source, sequencer endpoint.

prepared

bridge node

A local proposal was built but has not become peer-canonical.

receiptEvidence

epoch, proposal hash, transaction name, snapshot height, selected input notes.

peerCanonical

bridge peers plus sequencer

A threshold commit certificate fixes the proposal hash for the withdrawal epoch.

receiptEvidence

commit certificate, signer set, proposal hash, epoch, withdrawal id.

submitted

sequencer

A local submit RPC was attempted after authorization; this is advisory until mempool or block evidence is observed.

receiptEvidence

submitted raw tx id, submit attempt time, public API endpoint, journal event id.

kernelReconciled

Hoon bridge kernel

Kernel settlement reconciliation matched counterpart identity, destination, and amount bounds.

receiptEvidence

kernel reconciliation status, counterpart identity, destination equality, amount bound check.

Sequencer Receipt Fields

sequencerJournalId
sequencerServiceName
sequencerEndpoint
sequencerConfigPath
sequencerJournalVerifierAddress
sequencerJournalEventId
sequencerJournalEventHash
baseConfirmationDepth
withdrawalHandoffWindowBlocks
sequencerFrontierWithdrawalNonce
mempoolAcceptedAt
submittedRawTxId
colocatedPublicApiEndpoint
inclusionConfirmationDepth
Do not put sequencer journal access keys or signing key material into receipts, support bundles, or public APIs.
If the durable mirror is enabled and a lifecycle event cannot be written remotely, the local sequencer state transition must abort.
Do not configure journal object expiration until checkpoint recovery exists.
Receipts may cite journal id, object prefix, verifier address, event id, and event hash, but not secrets.