Skip to content

Replay processed input tips during peer sync - #2506

Draft
a-shannon wants to merge 1 commit into
ergoplatform:weak-blocksfrom
a-shannon:fix/matrix-input-tip-sync
Draft

Replay processed input tips during peer sync#2506
a-shannon wants to merge 1 commit into
ergoplatform:weak-blocksfrom
a-shannon:fix/matrix-input-tip-sync

Conversation

@a-shannon

@a-shannon a-shannon commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Peers at the same ordering height can reconnect after input blocks have been processed and remain unaware of that input chain while mining is idle. Replay the processed input tip during existing periodic sync and sync replies so normal parent and transaction retrieval can resume.

The replay uses InputBlockMessageSpec, the existing version/UTXO/height-proximity checks, and the existing compact weak-ID convention. It selects the processed prefix, excluding an announced descendant whose transactions are still pending.

Validation:

  • 30 direct actor properties pass on this isolated change over weak-blocks at c216c5b6, covering message identity, recipients, V1/V2 sync, processed-prefix selection and payload boundaries.
  • Linux node CI passed 1,146 tests across 105 suites, with 2 ignored and no failures, aborted suites, cancellations or pending tests, on the combined validation stack. This includes the 30 direct actor properties.
  • Final Linux lifecycle CI, at 2108a3b7, passed all 8 scenarios, with no failures, aborted suites, cancellations, ignored or pending tests. Coverage includes idle reconnection, propagation through a preconnected nonproducing relay, an orderly pending-input restart, and catch-up to a payment confirmed while the receiver was offline. Recovery checks finish before further mining. Recovered input bodies and the confirmed catch-up header and transactions are compared as complete serialized bytes. Runtime sources are unchanged from the node-validated commit.

The idle-reconnection scenario failed twice on the unchanged baseline, then passed with the replay. The extended fixture also cancels subsequent shared-state scenarios after the first failure. A local Windows lifecycle run timed out in the existing fork scenario after P2P disconnection, leaving 1 pass, 1 failure and 6 cancellations. A separate broader Windows network run ended in a native JVM error during an existing synchronizer test. These failed runs are retained separately from the successful Linux evidence.

This draft PR contains only runtime replay and direct tests. Lifecycle results apply to the combined runtime stack using the #2505 harness and #2501 dependency bootstrap. Upstream PR checks remain blocked before compilation by the unavailable sigma-state:6.0.5-22-368a860b-SNAPSHOT dependency.

The complete test extension is available on the follow-up branch at c8680dda, in three test-only commits above the unchanged #2505 head. Its two test files are identical to the final Linux validation. Existing PR heads remain unchanged for coordinated review.

#2500 and #2503 cover adjacent request admission and connection-state handling; this change covers discovery of an already processed tip.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant