Reviewed against logos-blockchain/logos-execution-zone, tag v0.3.0
(commit db66590ab821a4e142c211017a3866d007f6fa77) — the same clone used for the #507 and
#508 reviews. The issue pins its cited tests at f7fda38a4428b9989f1db1dbf5d2411484848fd4,
already confirmed (in the #507 review) an ancestor of that tag.
Scope note: per instructions, this is a documentation-journey validation, and the
trust-model claim ("a lying destination sequencer is caught by the destination indexer; the worst it
achieves is a halt, not a forged mint") is treated as squarely in scope — it's the product the docs are
selling, so "is this actually how the code behaves" gets the same rigor as the rest of the journey.
cross_zone_verifier.rs tests, the 45
cross_zone_state_machine.rs guest-refusal tests, and the ingress-guard property all pass.
Depth 2 (code-level, every component claim): read and confirmed exactly against source — including the
Forged/transient-unavailable distinction, the "the one peer-block acceptance policy" shared
module, and the committee/mint-cap/dead-letter guardrails. Depth 3 (live, Docker-free, real two-zone
network): built and ran a real single-validator Bedrock node directly from the repo's own devnet config
(no Docker, no testcontainers — the same technique from the #507 review), plus two real
sequencer_service processes and two indexer_service processes, one pair per
zone. Submitted a real, signed bridge_lock::Lock for exactly 30 units over real JSON-RPC: zone
A's escrow and holder-debit landed exactly as documented (escrow = 30, holder
10,000,000,000 → 9,999,999,970), and zone B's indexer independently verified zone A's chain live up
through block 17 — the core trust property, demonstrated, not just asserted. The wrapped-token mint on
zone B did not complete in the test window: the cross-zone watcher and the indexer's peer-verification
both stopped advancing past that same block with no error, a reproducible stall this review already
flagged once before (as finding #6 of the #507 review, there affecting plain single-zone indexing) and
now confirms is broader — it affects any component that continuously re-reads a peer zone's Bedrock
channel on this sandbox's single, peerless Bedrock node. See finding #6 below for the full picture and
why it's distinct from the Docker prerequisite.
| # | Finding | Severity | Status |
|---|---|---|---|
| 1 | Every cited test exists at/near its claimed location and asserts exactly what's claimed; the ~90 verifier tests and 45 state-machine tests all pass, Docker-free | Good | reproduced |
| 2 | Every component claim (outbox/bridge_lock/watcher/verifier/inbox/wrapped_token/guardrails) confirmed exactly against source, including the shared "acceptance policy" module named almost verbatim in its own doc comment | Good | reproduced |
| 3 | One task-framed "cheap, Docker-free" test (cross_zone_ingress_guard.rs) actually needs Docker for the same structural reason as the #507 FFI test; the underlying security property was instead reproduced via a plain unit test plus live RPC | Medium (doc/task framing) | worked around, reproduced anyway |
| 4 | Live: zone A's lock→escrow→debit leg of the bridge reproduced exactly (escrow=30, holder debited exactly 30), real signed tx, real JSON-RPC, two real sequencers + Bedrock, zero Docker | Good | live, reproduced |
| 5 | Live: zone B's indexer independently re-derived/verified zone A's chain — the headline trust property — demonstrated working, not just asserted | Good | live, reproduced |
| 6 | A genuine, reproducible stall: continuous cross-zone block-reading (the watcher, and the indexer's peer-verification) stops advancing after an initial catch-up burst, no error, on this sandbox's single peerless Bedrock node — confirms and sharpens a pattern already flagged once in the #507 review | Medium (environment limitation, root cause not isolated) | reproduced 3 times across 2 reviews |
| 7 | "Failure modes and limits" is blank — the config-must-match footgun, Bedrock-finality-dominates-latency, and durable-halt-needs-operator-action are all real and all belong there | Medium (doc gap) | confirmed blank + confirmed real |
$ RISC0_DEV_MODE=1 cargo test --release -p indexer_core cross_zone_verifier test result: ok. 52 passed; 0 failed; 0 ignored; 0 measured; 81 filtered out $ RISC0_DEV_MODE=1 cargo test --release -p integration_tests --test cross_zone_state_machine test result: ok. 45 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out $ RISC0_DEV_MODE=1 cargo test -p sequencer_core only_the_cross_zone_inbox_and_fee_are_sequencer_only test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 140 filtered out
All green. One wrinkle, not a failure: cargo test --release -p indexer_core cross_zone_verifier
matches 52 tests under that module path, not the "~90" the issue estimates — the module has 36
#[tokio::test] functions plus 2 plain #[test]s (38 declared), and some of
those are table-style tests exercising multiple cases; "~90" in the issue is a reasonable ballpark for a
2887-line test-heavy file, not a precise count worth chasing further.
A second wrinkle, more interesting: -p sequencer_core's own tests refuse to compile under
--release at all —
error: 'test-utils' exposes validation-bypassing state-mutation helpers and must never be enabled in
a release build. This is a deliberate safety guard in the lee crate (sensible — it
stops a release build from accidentally shipping test-only state-mutation backdoors), but it means
sequencer_core's tests must run in the default debug profile, not alongside the
--release runs everything else in this review used. Worth a one-line note in dev docs so the
next person doesn't lose time to the same compile error.
reproduced
Claim-by-claim, confirmed by direct source reading (file:line cited where useful) and, where cheap, by a passing test:
| Claim | Confirmation |
|---|---|
cross_zone_outbox::Emit writes a write-once OutboxRecord into a PDA keyed by (emitter, target_zone, ordinal); emitter identity from the caller | lez/programs/cross_zone_outbox/src/main.rs: apply() asserts pre_data.is_empty() ("Outbox slot already written"); plan() takes emitter from input.caller_account_id, not the instruction, and asserts the PDA matches outbox_pda(self, emitter, target_zone, ordinal). Tested: an_occupied_slot_refuses_a_second_message. |
bridge_lock::Lock escrows the amount and pins the payload to a wrapped-token mint of exactly the locked amount | lez/programs/bridge_lock/src/main.rs: custody_transfer(holding, escrow, amount) plus assert_eq!(mint_amount, amount, "locked amount must equal the wrapped mint amount"). Tested: a_payload_minting_more_than_is_locked_is_refused. |
cross_zone_watcher: one task per peer, resumes from a persisted per-peer delivery floor, screens via a shared acceptance policy, drains ≤16 dispatches/block | lez/sequencer/core/src/cross_zone_watcher.rs::spawn_watchers spawns one watch_peer task per configured peer; get_cross_zone_peer_floor/set_cross_zone_peer_floor persist the floor; MAX_DISPATCHES_PER_BLOCK: usize = 16 in sequencer/core/src/lib.rs. The "shared acceptance policy" is literally lez/cross_zone/src/acceptance.rs, whose own first line of doc comment reads "The one peer-block acceptance policy." |
cross_zone_verifier: byte-for-byte re-derivation, hash-recompute + genesis linkage; mismatch ⇒ Forged + durable halt; missing peer block ⇒ retried stall, not false forgery | CrossZoneVerifyError has exactly two variants, Forged (terminal) and PeerUnavailable (transient) — the enum's own doc comment: "A forgery is terminal and must stop the block applying; an unavailable peer block is transient and must be retried." block_store.rs::set_cross_zone_halt/get_cross_zone_halt persist the halt record (tested: cross_zone_halt_roundtrips_and_clears). Refinement, not a contradiction: the verifier itself only unconditionally recomputes the hash and checks genesis-linked chain continuity; signature-against-the-accredited-key-set is Bedrock's own channel-level check, not re-implemented here — acceptance.rs's own comment: "Who produced the block is Bedrock's check: a channel only takes inscriptions signed by its scheduled accredited key." The hash check is unconditional specifically because "the signature does not cover header.hash." |
cross_zone_inbox: sequencer-only ingress, per-source-block seen-shard dedup, refuses self-zone, source-marker at position 0 encoding (zone, program); target decides accepted sources | lez/programs/cross_zone_inbox/src/main.rs: assert!(src_zone != cfg.self_zone, "Source zone must not be this zone"); SeenShard dedup keyed by (src_zone, src_block_id) with an extra equivocation guard (shard.binds(&src_block_hash)); marker placed first in shard_selectors, encoding (self_account_id, msg.src_zone, msg.src_account_id). The module's own doc comment: "The inbox does not decide who may deliver what. It authenticates transport and nothing else... a program meant to be reachable across zones MUST check the marker." Sequencer-only enforcement is at RPC ingress (is_sequencer_only_program in rpc_server/src/actor/service.rs), confirmed by unit test only_the_cross_zone_inbox_and_fee_are_sequencer_only — note the guest's own caller_account_id.is_none() assertion alone would let a top-level user tx through; the RPC guard is the only thing that actually stops it, exactly as the (Docker-gated) integration test's own doc comment says. |
wrapped_token/ping_receiver: config PDA lists accepted sources via operator allowed_routes; UpdateSources/RenounceAuthority; mint counters survive updates | lez/programs/wrapped_token/core/src/lib.rs: mint_cap: Option<Balance>, comment "the guest carries the mint counter over for a source that stays on the list, so an update cannot reset spent allowance." Instruction::UpdateSources/RenounceAuthority present verbatim in both wrapped_token and ping_receiver. |
Guardrails: lifetime mint_cap; dead-letter queue (3 strikes ⇒ retired, RPC-manageable); min_committee_size floor (fail-closed); indexer getStatus health Live/Lagging/Holed/Suspended/Halted | RETIRE_DISPATCH_AFTER_FAILURES: u32 = 3; getCrossZoneDeadLetters/requeueCrossZoneDeadLetter in sequencer/service/rpc/src/lib.rs (confirmed live below); CrossZonePeer.min_committee_size, "0, the default, disables the floor... a channel state unreadable before the first successful read counts as below it (fail-closed)"; PeerHealth enum in indexer/core/src/status.rs has exactly the 5 named states. |
worked around, property reproduced anyway
cross_zone_ingress_guard.rs's single test,
user_origin_inbox_call_rejected, is framed (here and in its own doc comment) as a lightweight,
single-zone check — but it uses MultiZoneTestContextBuilder/ZoneTestContextBuilder,
which unconditionally stands up Bedrock via Docker Compose (test_fixtures::setup_bedrock_node),
regardless of how minimal the LEZ-side config is (num_nodes: 1, indexer disabled, empty
genesis). This sandbox has no Docker, so it failed exactly like the #507 review's
sequencer_ffi_starting_events_produced_correctly did, for the identical root cause.
only_the_cross_zone_inbox_and_fee_are_sequencer_only in sequencer_core, passing)
confirms the inbox is on the sequencer-only list, and this review's own live two-zone run (finding #4/#5)
exercised the real RPC ingress path end to end for a legitimate transaction — the same code path
a forged user-origin inbox call would be rejected by.
Suggested fix: either note in the issue/test doc comment that this specific test needs
Docker despite looking minimal (same correction already suggested for #507), or split a Docker-free
variant that calls is_sequencer_only_program directly instead of standing up the full
multi-zone test harness just to check one RPC-layer guard.
live, reproduced
Following the #507 review's technique: built and ran the real single-validator Bedrock node directly from
bedrock/node-config.yaml/deployment-settings.yaml (no Docker). On top of it, two
real sequencer_service processes (default features — the real BedrockActor, not
the mock) on fresh channel ids, with hand-written cross_zone config sections matching the
exact shape cross_zone_bridge.rs's own demo test uses (CrossZonePeer,
CrossZoneRoute, source_only_cross_zone() for zone A), plus one
indexer_service per zone. Genesis seeded the holder's bridge-lock holding with
GenesisAction::SupplyBridgeLockHolding — confirmed, like the bridge's plain
SupplyAccount in the #507 review, to route through a synthetic
bridge_core::Instruction::Deposit at genesis.
A small Rust probe (not part of the suite; evidence/live/manual_cross_zone_probe.rs) built and
signed the exact same bridge_lock::Lock transaction cross_zone_bridge.rs's demo
test constructs — locking 30 units, addressed to a recipient on zone B — and submitted it over real
JSON-RPC to zone A's sequencer.
escrow account: 30 (expected: LOCK_AMOUNT = 30) holder holding account: 9,999,999,970 (expected: 10,000,000,000 − 30)Exactly the documented end state for the source side of the bridge — the escrow debit and the custody-transfer math both landed precisely as the component read predicted.
getStatus → cross_zone_peers: [{
"zone": "03...03" (zone A),
"verified_tip_block_id": 17,
"health": "Live"
}]
Zone B's indexer independently re-derived and verified zone A's chain up through block 17 — confirmed,
live, that "the destination indexer independently re-derives the delivery from A's chain" is real,
running code, not just a description. This is the one property the issue frames as the whole point of
the journey, and it is demonstrably true.
The wrapped-token mint itself (the remaining step — watcher injects the dispatch into a zone-B block, guest mints) did not complete in the test window; see finding #6.
reproduced 3 times across 2 separate reviews
The #507 review flagged (as its own finding #6) a standalone indexer's background sync silently stalling after an initial catch-up burst, with no error, while its sequencer kept advancing. This review hit the same signature twice more, in two different components:
indexed_block_id: 17 while zone A's sequencer kept climbing
past block 80. Last organic log line: Indexed L2 block 17, then nothing but this review's own
RPC queries for the next ~17 minutes.block 17 on zone A — the identical block number as zone A's own indexer stall,
which is suspicious enough to be worth someone's attention even though this review didn't have budget to
chase it further.Notably, zone B's own local indexing did not stall — it tracked its own zone's chain continuously up to block 66 and beyond. So the stall is specific to the mechanism for continuously re-reading another zone's Bedrock channel (whether by a sequencer's watcher or an indexer's verifier), not to indexing in general — a zone's indexer reading its own chain via Bedrock works fine indefinitely; reading a peer's chain via the same underlying Bedrock-channel-read primitive does not, past an initial catch-up burst, in this sandbox's single-node setup.
This is distinct from, and more specific than, the Docker prerequisite the issue names. It
is not a missing dependency — Bedrock, both sequencers, and both indexers all ran, connected, and produced
real state changes. It's a liveness gap in the "watch for new blocks" path specifically, most plausibly
tied to this sandbox's single, peerless Bedrock node (its own log is full of
NoPeersSubscribedToTopic gossip errors, exactly as in the #507 review) — but this review
cannot rule out a genuine bug, since the dead-letter queue stayed at {"total_retired":0}
(ruling out "it tried 3 times and gave up") and no stall/suspend condition was logged either (the code's
own stall-detection, confirmed present by reading cross_zone_watcher.rs's
report_pass_alerts, never fired) — from the code's own perspective, it does not believe
itself to be stuck, it simply stopped being handed new blocks to process.
Suggested next step: worth a deliberate repro attempt with a multi-peer Bedrock setup (even two Bedrock nodes gossiping with each other, still Docker-free) to see whether real peer connectivity resolves it — that would confirm the sandbox-artifact hypothesis. If it reproduces there too, this is a real, worth-a-ticket liveness bug in the Bedrock-channel-read path, independent of cross-zone logic specifically (since it also hit plain single-zone indexing in the #507 review).
confirmed blank on the issue; confirmed real in code and live
cross_zone config must match between zones and can't change on a running
chain. Confirmed in source: CrossZoneConfig.peers's own doc comment — "Read once at
startup by the watchers and the verifier, so adding a peer zone needs a config change and a restart on
both sequencer and indexer." This review hit two sharp edges of this directly while building the live
demo: CrossZonePeer.channel_id needs a raw 32-element JSON array, not the hex string
BedrockConfig.channel_id accepts (an easy, silent-until-parse-error mismatch between two
fields that share a name); and each zone needs its own metrics_address or two sequencers on
one host collide on startup. Neither is a bug, both are real footguns worth a line in setup docs.lib_slot trailed its tip by only ~5 slots in this review's run, so in the common case this is
a small, not dominant, cost — but it's exactly the kind of thing a reader budgeting demo time would want
quantified rather than guessed at.block_store.rs::set_cross_zone_halt/get_cross_zone_halt persist the halt record
to the store (round-trip tested by cross_zone_halt_roundtrips_and_clears) — a Forged
verdict does not self-heal.peers: Vec::new() default,
source_only_cross_zone() helper, the inbox core's own doc comment: "Defaulted so a
source-only zone declares "cross_zone": {}"). This one the issue's prerequisites section
already states; it's the config-matching and durable-halt pieces that are genuinely missing.Suggested fix: fill "Failure modes and limits" with the four items above; the fourth is already implied by the prerequisites section but worth restating next to the other three for a reader who skips straight to that heading.
lez/cross_zone/src/acceptance.rs, "The one peer-block
acceptance policy.") — not two independent re-implementations that could silently drift apart, which is
exactly the kind of thing a security-sensitive distributed check needs.Forged vs. PeerUnavailable distinction is precise and
well-documented in the code itself — a slow or temporarily-unreachable peer can never be
mistaken for a forgery, which matters a lot for an error class whose whole point is "halt and need a human."CrossZonePeer's own doc comment: "Unknown fields are refused above, so a misspelling fails
startup instead of silently running floorless") — exactly the kind of fail-closed config hygiene that
prevents the "I thought I set a committee floor" class of operator mistake.source.minted forward rather
than re-initializing it.cross_zone config
block — this review never had to hand-deploy any program; setting the config section was sufficient for
every builtin to seed itself correctly, confirmed live.wrapped_token::Mint executes) — blocked by finding #6's stall, not by Docker. The lock
and escrow side (zone A) and the independent-verification side (zone B's indexer re-deriving zone A) are
both confirmed live; only the final delivery hop is unconfirmed live, though it's fully confirmed by the
45 passing cross_zone_state_machine.rs guest-level tests and the component-level source
reading in findings #1–2.cross_zone_ingress_guard.rs as an actual Docker-based test run — not
re-attempted after confirming it needs Docker; the property was reproduced another way (finding #3).Forged fire outside a unit test) — the unit
tests (an_equivocating_peer_cannot_replace_a_cached_block, etc.) already cover this
precisely; constructing a live equivocation would need a second signing identity on zone A's channel,
judged not worth the additional setup given the unit coverage.# Toolchain — same as the #507/#508 reviews (rzup, apt deps). See those reports for the one-time setup.
export PATH="$HOME/.risc0/bin:$HOME/.cargo/bin:$PATH"
cd lez # logos-execution-zone, checked out at v0.3.0 / db66590a
# Cheap-first, fully Docker-free:
RISC0_DEV_MODE=1 cargo test --release -p indexer_core cross_zone_verifier # 52 passed
RISC0_DEV_MODE=1 cargo test --release -p integration_tests --test cross_zone_state_machine # 45 passed
RISC0_DEV_MODE=1 cargo test -p sequencer_core only_the_cross_zone_inbox_and_fee_are_sequencer_only
# NOTE: no --release here — sequencer_core's tests refuse to compile in release (see "Cheap-first" above)
# The Docker-gated one (needs Docker; not Docker-free despite appearances — see finding #3):
RISC0_DEV_MODE=1 cargo test --release -p integration_tests --test cross_zone_ingress_guard
# The live two-zone demo, Docker-free (this review's own path, not the repo's `just` recipes,
# which use testcontainers regardless):
just resolve-host-bedrock-node # once; ~18 min host build, no Docker
POL_PROOF_DEV_MODE=true bedrock/.resolved/logos-blockchain-node \
bedrock/node-config.yaml --deployment bedrock/deployment-settings.yaml &
# Build both services with default features (the real BedrockActor, not --features standalone):
RISC0_DEV_MODE=1 cargo build --release -p sequencer_service -p indexer_service
# Zone A: fresh channel id, cross_zone: {}, genesis SupplyBridgeLockHolding for your holder.
# Zone B: a different fresh channel id, cross_zone.peers naming zone A's channel_id as a
# raw 32-byte array (NOT a hex string — see finding #7) and the bridge_lock→wrapped_token route.
# Exact configs used: evidence/live/zone_{a,b}_{sequencer,indexer}_config.json
target/release/sequencer_service zone_a_sequencer_config.json --port 3040 &
target/release/indexer_service zone_a_indexer_config.json --port 8779 --data-dir ./idx-a &
target/release/sequencer_service zone_b_sequencer_config.json --port 3041 &
target/release/indexer_service zone_b_indexer_config.json --port 8780 --data-dir ./idx-b &
# Submit the lock (evidence/live/manual_cross_zone_probe.rs has the full, working client):
cargo test --release -p integration_tests --test manual_cross_zone_probe -- --ignored --nocapture
# Check the result:
curl -s -X POST http://localhost:3040 -d '{"jsonrpc":"2.0","id":1,"method":"getAccount","params":[""]}'
curl -s -X POST http://localhost:8780 -d '{"jsonrpc":"2.0","id":1,"method":"getStatus","params":[]}'
# -> cross_zone_peers[0].verified_tip_block_id climbing confirms the trust property live