You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TransactionalStream fails with PartialReorgError when resuming after a reorg inside its last watermark #36
With #35, ProtocolStream detects reorgs that happened while a stream was stopped. But when TransactionalStream resumes after a reorg that starts inside its last watermark's range, it fails with PartialReorgError instead of recovering.
Versions: amp-typescript ca6978e (the #35 branch), ampd v0.0.42 over an Anvil chain.
To reproduce:
Stream a dataset with TransactionalStream until it commits a multi-block watermark. For me, [0-50] and [51-53].
Stop the stream, reorg the chain 2 blocks back with anvil_reorg, and mine a block.
Resume with the same state store. Amp re-sends from block 52, the first reorged block, and the stream fails with PartialReorgError.
A 3-block reorg works, because it starts at the watermark's first block.
Within a session this doesn't happen, because Amp re-sends the whole microbatch from the start of the affected range. On resume it starts at the first reorged block, so any reorg that starts inside a multi-block last watermark hits this. Wide watermarks are common after a catch-up, or when several blocks land at once.
Activity