Detect a missing message in an Arbitrum sequencer feed

The live sequencer feed carries indexed messages before parent-chain publication settles their ordering. A dropped connection can create a gap even if the socket resumes delivering traffic.

Persist the decoded message sequence

Read the feed version and decode the message objects in each broadcast. Track sequenceNumber from the messages rather than counting WebSocket packets; a broadcast can wrap multiple records.

last stored sequenceNumber = 801
next feed messages         = 802, 804

In the example, 802 follows the checkpoint but 804 leaves 803 unaccounted for. Buffer or pause contiguous processing at 802 and recover the missing sequence from a trusted feed history or node-derived data source. Deduplicate repeated messages by their protocol position and identity.

Separate feed observation from settled data

A feed sequence number identifies a sequenced message, not a parent-chain confirmation count. Reconcile persisted results with the batches accepted by the parent chain before treating the feed history as canonical. docs.arbitrum.io Arbitrum documentation