Source Anchors
bridge-withdrawals-spec
Bridge withdrawals spec
Canonical bridge withdrawal spec for peer-canonical proposals, sequencer authorization, submission, confirmation, and kernel reconciliation.
crates/bridge/docs/bridge-withdrawals.md
bridge-withdrawals, peer-canonical, kernel reconciliation
L199-L280
withdrawalId, proposalHash, sequencerState, confirmedHeight, confirmedBlockId, kernelReconciliationStatus
runtime-loop-bootstrap
Runtime loop bootstrap
Bootstraps withdrawal restore and starts activation-gated assembly, signing, and submission loops.
crates/bridge/src/withdrawal/runtime.rs
bootstrap_runtime, spawn_runtime_loops, WithdrawalRuntimeContext
L25-L101
withdrawalActivationCutoff, activationRestored, assemblyLoopStarted, signingLoopStarted, submissionLoopStarted
execution-driver-effects
Execution driver effects
Consumes withdrawal-related kernel effects and converts them into durable Rust proposal state, peer broadcasts, or local stop on durable conflict.
crates/bridge/src/withdrawal/assembly.rs
create_withdrawal_execution_driver, WithdrawalExecutionEffect
L529-L789
withdrawalProposalBuilt, withdrawalTxSigned, baseBlockWithdrawalsPending, acceptedPeers, canonicalized, localStopReason
assembly-tick
Assembly tick
Selects the next stageable withdrawal, enforces deterministic proposer ownership, refreshes the bridge note snapshot, subtracts sequencer-reserved inputs, and asks the kernel to build a proposal.
crates/bridge/src/withdrawal/assembly.rs
withdrawal_assembly_tick_once, WithdrawalAssemblyTickOutcome
L864-L940
withdrawalId, withdrawalEpoch, selectedInputs, snapshotHeight, snapshotBlockId, reservedInputNames
submission-tick
Submission tick
Bridge-side tick registers the sequencer frontier, authorizes fully signed peer-canonical proposals, and asks the sequencer to submit authorized proposals.
crates/bridge/src/withdrawal/submission.rs
withdrawal_submission_tick_once, WithdrawalSubmissionTickOutcome
L660-L796
sequencerAuthorizationState, commitCertificate, mempoolAccepted, frontierNonce, callerNodeId
public-submitter
Public Nockchain submitter
Submits authorized raw transactions through the public Nockchain API and separately checks tx acceptance, block inclusion, and tip height.
crates/bridge/src/withdrawal/submission.rs
PublicNockchainWithdrawalSubmitter, WithdrawalSubmitPort
L380-L611
publicApiEndpoint, submittedRawTxId, txAccepted, includedBlock, tipHeight
confirmation-loop
Sequencer confirmation loop
Sequencer-owned confirmation poll checks included block and current tip height, then records confirmed lifecycle state when confirmation depth is satisfied.
crates/bridge/src/withdrawal/submission.rs
withdrawal_sequencer_confirmation_tick_once, run_withdrawal_sequencer_confirmation_loop
L849-L949
confirmedHeight, confirmedBlockId, includedHeight, includedBlockId, confirmationDepth
orphan-retry-loop
Orphan retry loop
Resubmits exact authorized raw transactions for stale mempool-accepted withdrawals that have not appeared in an included block.
crates/bridge/src/withdrawal/submission.rs
withdrawal_sequencer_orphan_retry_tick_once, run_withdrawal_sequencer_orphan_retry_loop
L951-L1076
retryAfterBaseBlocks, lastSubmitAttemptBaseHeight, mempoolRetryAttempted, retryError, submittedRawTxId
sequencer-rpc-service
Sequencer RPC service
API-node-hosted private sequencer RPC service that validates caller turn, Base withdrawal facts, and submission retry windows.
crates/bridge/src/withdrawal/sequencer/rpc.rs
WithdrawalSequencerRpcService, register_withdrawal
L92-L230
sequencerEndpoint, callerNodeId, expectedProposer, baseWithdrawalVerified, handoffWindowBlocks
sequencer-store
Sequencer store
SQLite projection plus journal-backed sequencer state for ordered withdrawals, reserved inputs, authorization, submit outcome, mempool acceptance, retries, and confirmation.
crates/bridge/src/withdrawal/sequencer/store.rs
WithdrawalSequencerStore, sequencer_authorize_proposal, record_tx_confirmed
L437-L940
singleFlightWithdrawal, reservedInputNames, withdrawalNonce, proposalHash, sequencerState, confirmedHeight, confirmedBlockId
sequencer-journal
Sequencer journal
Append-only journal record identity for sequencer events, previous-event linkage, record hashes, optional signature, and event type.
crates/bridge/src/withdrawal/sequencer/journal.rs
SequencerJournalRecord, SequencerJournalEventType, SequencerJournal
L28-L123
sequencerJournalId, journalSequence, previousEventId, recordHash, eventType, signature
bridge-dev-scenario-readme
Bridge-dev scenario README
Ignored bridge-dev scenarios run against fresh Tenderly VNET state and release-built bridge binaries; they are opt-in external-state fixtures, not default CI.
crates/bridge-dev/tests/README.md
bridge-dev Scenario Tests, BRIDGE_DEV_RUN_E2E, BRIDGE_R2_RUN_E2E
L1-L66
scenarioName, scenarioRunRootHash, scenarioPortOffset, tenderlyVnetId, bridgeDevRunE2e, r2JournalEventPrefixHash, scenarioArtifactHash
bridge-dev-withdrawal-scenarios
Bridge-dev withdrawal scenarios
Opt-in withdrawal scenarios cover happy path execution, bridge restart, sequencer restart, R2 journal replay after SQLite wipe, full bridge downtime recovery, and degraded two-node execution.
crates/bridge-dev/tests/scenarios.rs
withdrawal_happy_path_reaches_executed, withdrawal_sequencer_rebuilds_from_r2_after_sqlite_wipe, two_node_degraded_withdrawal_still_executes
L953-L1125
withdrawalScenarioPhase, proposalHash, authorizedTransactionName, sequencedState, handoffOwner, scenarioRecoveryMode, componentStopSet
withdrawal-kernel-port
Withdrawal kernel port
Typed Rust boundary for poking create-withdrawal-tx/sign-tx and peeking/acking Base withdrawal state in the Hoon bridge kernel.
crates/bridge/src/withdrawal/assembly.rs
WithdrawalKernelPort, BridgeRuntimeHandle
L70-L162
baseBlockWithdrawalsPending, baseBlockWithdrawalsCommitted, createWithdrawalTx, signTx, kernelProjectionCursor