chore: add TODO doc about transient apply failures [skip ci]

This commit is contained in:
erhant 2026-07-10 22:43:41 +03:00
parent b21049bc28
commit f0d2ef660e
3 changed files with 9 additions and 4 deletions

View File

@ -6,10 +6,6 @@ backs decentralized sequencing. Status: **interface freeze** — the
contract the produce-on-turn and follow-blocks tracks build against. Changing
them after the tracks split forces rework in both.
Branch: `erhant/lez-two-tip-chain-state` (off `erhant/indexer-recoverable-invalid-blocks`).
---
## 1. Motivation
Decentralized sequencing requires every honest node — sequencer or indexer — to

View File

@ -30,6 +30,9 @@ pub enum AcceptOutcome {
/// Chained but failed to apply, possibly transiently
/// ([`BlockIngestError::is_retryable`]); nothing recorded, tip and state
/// untouched. The caller retries and parks once it gives up.
///
/// TODO: Only the indexer's `accept_block` emits this today; the sequencer's
/// `ChainState` parks on all failures without retrying (see `on_follow`).
RetryableFailure(BlockIngestError),
}

View File

@ -343,6 +343,12 @@ impl<BP: BlockPublisherTrait> SequencerCore<BP> {
/// Feed one channel delta into the follow state and mirror it to the store:
/// revert orphaned, then apply and persist adopted and finalized blocks.
/// Production builds on this same head.
///
/// TODO: unlike the indexer's ingest loop, this path does not retry
/// `is_retryable` (transient) apply failures — a failed block just parks and
/// relies on a valid successor or a restart. `ChainState` never emits
/// `AcceptOutcome::RetryableFailure` yet; adding retry parity here is a
/// follow-up.
fn on_follow(
dbio: Arc<RocksDBIO>,
chain: Arc<Mutex<ChainState>>,