Open emostov opened 1 month ago
Do you mind me working on this one?
the way this should be done is by extending
with checks for payload against header and then plugged into the engine impl
@mattsse thanks for the response! I think I might be missing something. From my read, implementing EngineValidator
will allow me to add custom validation at the RPC level but will not allow me bypass the timestamp validation done by the engine.
Specifically in the case of forkchoice updated, the ensure_well_formed_attributes
is called here
which then uses the consensus engine handle to normally call the new engine-tree logic here:
In the engine-tree logic it appears the payload is still unconditionally subject to the timestamp check here
Which is executed by the BeaconEngineMessage::ForkchoiceUpdated
request handler
Is my understanding correct here?
EDIT: rereading your comment again, is your suggestion to create a PR that adds a method to the EngineValidator
trait for checking the payload against the header and then calling that new method in process_payload_attributes
instead of doing the timestamp check? If so, I can work on that
ereading your comment again, is your suggestion to create a PR that adds a method to the EngineValidator trait for
I thought about this a bit, and I think we could start introducing a different trait for this entirely like a new validator trait or similar
Makes sense. I will try and work on something later this week. Feel free to assign it to me
This issue is stale because it has been open for 21 days with no activity.
This issue is stale because it has been open for 21 days with no activity.
Still relevant. Waiting for feedback on #11948
thanks for the ping, sorry for being unresponsive... taking a look asap
Describe the feature
To support sub second block times, it would be helpful to disable the timestamp check here
https://github.com/paradigmxyz/reth/blob/1ba631ba9581973e7c6cadeea92cfe1802aceb4a/crates/consensus/beacon/src/engine/mod.rs#L1174-L1176
The Ethereum engine api spec enforces that the timestamp on new execution block must be greater then the previous block. Execution block timestamps are denominated in seconds, so if blocks are being requested within a second of each other they are likely to have the exact same timestamp and Reth will not create/validate the block.
To quickly fix this I propose allowing a way to opt out of the timestamp check - either with a runtime configuration or compilation feature gate. @mattsse mentioned here that they have some pointers on how to tackle this.
Additional context
No response