⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Conversation

@sieniven
Copy link
Contributor

@sieniven sieniven commented Jan 15, 2026

Summary

This PR separates out original fixes from PR #334. The original handler handles both flashblock payloads vs full built payloads with the same transmitter. This PR separates the handling logic on the 2 different triggers:

  1. Built flashblock payload execution - used for builder p2p
  2. Full built flashblocks sequence - used for pre-warming the local execution cache to optimize subsequent engine_newPayload calls to advance chainstate

Note that since the subsequent PR #334 will be based on this fixes, there is no optimization done here and it maintains the same logic - full built payloads are sent after every flashblock execution. The subsequent SR optimization PR will only send the full built payloads (with SR calculated) on async payload resolution.

✅ I have completed the following steps:

  • [✅ ] Run make lint
  • [✅ ] Run make test
  • Added tests (if applicable)

Copy link
Contributor Author

@sieniven sieniven left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SozinM Hey, this PR should be ready for review. 4b58264 fixes the previous build issue.

@sieniven
Copy link
Contributor Author

@SozinM @akundaz @avalonche hey guys, any updates regarding this PR?

@sieniven sieniven force-pushed the niven/separate-full-payload-handler branch from 3d71fd3 to 24ab125 Compare January 28, 2026 10:04
@sieniven
Copy link
Contributor Author

sieniven commented Feb 2, 2026

@avalonche @SozinM hey! any updates wrt this PR?

Comment on lines +414 to +423
self.built_fb_payload_tx
.try_send(payload.clone())
.map_err(PayloadBuilderError::other)?;
if let Err(e) = self.built_payload_tx.try_send(payload.clone()) {
warn!(
target: "payload_builder",
error = %e,
"Failed to send updated payload"
);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'm a bit confused on what the point of the two separate channels is, in both spots where we send on the channels we send the exact same thing on both channels. then inside the payload handler, it's going to call the same code on the payload twice, since it receives the same thing on both branches. am i missing something here? did you mean to only send on built_payload_tx for the final flashblock?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make sense, let me revert the fixes from the above comments to the original version.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@noot resolved in fa0fb5b

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks! i'm still not sure i understand the change, the logic is the same as previously, as the same data is being sent on both channels?

Copy link
Contributor Author

@sieniven sieniven Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@noot this PR was meant to be a refactor and was originally inside the async SR calculation PR here which resolves the logic issue on the flashblocks builder when no SR calculation flag is set. From the comments by @SozinM here - #334 (comment), this PR separates it out from that fixes for better clarity.

The reason for the separation is because there is no reason to commit execution payloads with missing state roots since it will result in 100% cache misses on the subsequent payload commits on engine_newPayload. This will cause the locally built payloads to still go through payload re-validation regardless, which takes up precious sequencing time.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i see, with the context of the other PR then this makes sense. thanks for clarifying!

@avalonche avalonche merged commit 937612b into flashbots:main Feb 9, 2026
4 checks passed
sieniven added a commit to okx/op-rbuilder that referenced this pull request Feb 10, 2026
…n handler (flashbots#354) (#82)

* Fix payload handler for p2p flashblocks and full built payloads

* Update

* Fix

* Revert default behaviour

* Revert "Revert default behaviour"

This reverts commit 24ab125.
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.

3 participants