Skip to content

bug(sync): near-tip AwaitUtxo timeout is treated as an invalid block, causing a sync restart loopΒ #11168

Description

@oxarbitrage

Description

When a block's transparent input spends an output from a very recent block that is not yet committed to the state, the verifier's AwaitUtxo lookup can time out. Since #10810 the timeout is correctly classified as TransactionError::TransparentInputNotFound (in the AwaitUtxo arm of zebra-consensus/src/transaction.rs) instead of InternalDowncastError β€” but the syncer then treats that transient condition as a consensus-invalid block.

should_restart_sync() (zebrad/src/components/sync.rs) has no arm for a verify-side transient NotFound: the error falls into the catch-all and triggers a full sync restart. Under a sustained near-tip stall, each restart re-downloads the same range, hits the same not-yet-committed parent, times out again, and restarts again β€” a restart loop that keeps the node pinned just below the tip.

The catch-all's own diagnostic confirms this error class is reaching a place it was never meant to: because the debug string contains NotFound, it logs "a BlockDownloadVerifyError that should have been filtered out was detected, which possibly indicates a programming error" (see the existing TODOs referencing #2908 and #2909 at that site).

Observed

All 4 cached-state GCP jobs (rpc-submit-block, lwd-rpc-send-tx, lwd-grpc-wallet, lwd-sync-update) timed out together on the 2026-07-31 main run:

https://github.com/ZcashFoundation/zebra/actions/runs/30641561945

Log signature: AwaitUtxo timeout β†’ TransparentInputNotFound β†’ "error downloading and verifying block" WARN β†’ sync restart, repeating.

Verified unfixed on main at 392e4b5 (2026-08-01): no TransparentInputNotFound arm in should_restart_sync(), and no open PR touches the classification.

Possible fixes

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-consensusArea: Consensus rule updatesC-bugCategory: This is a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions