refactor(app): skip redundant newPayload for synced values - #227
Merged
Conversation
jmalicevic
reviewed
Feb 10, 2026
jmalicevic
approved these changes
Feb 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
newPayloadV4call fromProcessSyncedValuehandler during sync/catch-upnewPayloadcall inon_decided()remains, where it is required to import the block into Reth's tree state beforeforkchoiceUpdatedcan set it as canonical headContext
When a node catches up via Malachite's ValueSync protocol, each synced value was
being validated with
newPayloadV4inProcessSyncedValue. This is unnecessarybecause Malachite has already verified the commit certificate, proving the value
was accepted by 2/3+ of the validator set.
The
newPayloadcall cannot be eliminated entirely — it is the only way to importblocks into Reth's tree state (
tree_state.blocks_by_hash) beforeforkchoiceUpdatedcan set them as canonical head. Without it, Reth returns
SYNCING. This importhappens in
on_decided()where it was always needed.This change makes the intent clearer:
ProcessSyncedValuetrusts the certificate,on_decided()handles the Reth integration.