paradigmxyz / reth

Modular, contributor-friendly and blazing-fast implementation of the Ethereum protocol, in Rust
https://reth.rs/
Apache License 2.0
3.81k stars 1.07k forks source link

Improve OP payload builder #11040

Open mattsse opened 8 hours ago

mattsse commented 8 hours ago

Describe the feature

this https://github.com/paradigmxyz/reth/pull/10904 attempted to restructure the OP payload builder. this now has a few sub functions that are hard to follow and some redundant arguments.

imo this should be reverted and go through review again.

Additional context

No response

0xKitsune commented 7 hours ago

Hello I am happy to take this in a different direction or simply leave optimism_payload() unchanged.

The initial goal was to create smaller, reusuable functions that can be used by custom OP Stack builders rather than reimplementing optimism_payload() with small changes.

I agree that a single optimism_payload() function is much more readable here. Let me know if you have any thoughts on a direction or if you would prefer to leave this unchanged!

mattsse commented 6 hours ago

yeah definitely want to make this nicer, so please simply reopen revert of #11041 again and we take it from there

0xKitsune commented 4 hours ago

Sounds good, I reopened a draft PR for further feedback/revisions.

11052