Skip to content

refactor(app): skip redundant newPayload for synced values - #227

Merged
mpoke merged 3 commits into
mainfrom
marius/validation-on-sync
Feb 10, 2026
Merged

refactor(app): skip redundant newPayload for synced values#227
mpoke merged 3 commits into
mainfrom
marius/validation-on-sync

Conversation

@mpoke

@mpoke mpoke commented Feb 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Remove the newPayloadV4 call from ProcessSyncedValue handler during sync/catch-up
  • Synced values already have a certificate proving 2/3+ validators accepted them, making EL validation redundant
  • The newPayload call in on_decided() remains, where it is required to import the block into Reth's tree state before
    forkchoiceUpdated can set it as canonical head

Context

When a node catches up via Malachite's ValueSync protocol, each synced value was
being validated with newPayloadV4 in ProcessSyncedValue. This is unnecessary
because Malachite has already verified the commit certificate, proving the value
was accepted by 2/3+ of the validator set.

The newPayload call cannot be eliminated entirely — it is the only way to import
blocks into Reth's tree state (tree_state.blocks_by_hash) before forkchoiceUpdated
can set them as canonical head. Without it, Reth returns SYNCING. This import
happens in on_decided() where it was always needed.

This change makes the intent clearer: ProcessSyncedValue trusts the certificate,
on_decided() handles the Reth integration.

@mpoke
mpoke requested a review from a team as a code owner February 10, 2026 12:51
Comment thread app/src/app.rs
@mpoke
mpoke merged commit 05f9f1d into main Feb 10, 2026
6 checks passed
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.

2 participants