Skip to content

messaging: collector silently drops malformed L1-handler messages #621

Description

@kariy

Summary

Both settlement collectors convert a settlement event/log into an L1HandlerTx inside an if let Ok(tx) = ... guard. When l1_handler_tx_from_event / l1_handler_tx_from_log returns Err (malformed event, unexpected shape, decode failure), the message is silently dropped — no log, no metric, no retry.

Because the settlement contract assigns a global monotonic message nonce, a silently dropped message is a hole in the sequence.

Where

  • crates/messaging/src/stream/collector/starknet.rsif let Ok(tx) = l1_handler_tx_from_event(e, chain_id) { ... } in gather.
  • crates/messaging/src/stream/collector/ethereum.rsif let Ok(tx) = l1_handler_tx_from_log(log.clone(), chain_id) { ... } in gather.

Impact

A single malformed/unexpected event is dropped with no operator-visible signal, and (before the nonce-gate fix) this would stall all later messages. At minimum this should be observable.

Fix idea

Log the conversion error at error/warn (with block + tx_index + reason) instead of silently discarding it, and consider surfacing a metric or parking the message for inspection rather than dropping it.

Follow-up split from the L1-handler nonce-gate fix (case B3b in the investigation).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions