Closed refcell closed 2 weeks ago
I'd like to take this! @refcell can you give a status update on the draft PR that you recently closed, to have an idea of how much work is left?
All the online stuff should be possible via direct db reads, ie should be able to skip json RPC altogether
@refcell I believe this can be closed as it evolved into a separate project?
Description
An execution extension that pulls in the
kona-derive
crate from kona and runs the derivation pipeline over newly committed L1 blocks.Once it generates
L2AttributesWithParent
from the pipeline, it can go about verifying the pipeline in a number of ways. The first, more resilient or less trustful method is to send the payload attributes over the engine api throughengine_newPayloadV2
. The block hash is now verified and can be checked against the sequencer for further redundancy.Another, more simple approach to verify kona-derive is to validate the payload attributes against a "trusted" L2 endpoint. Once the pipeline returns valid payload attributes, they can be compared to payloads retrieved by rpc. This is effectively what the
trusted-sync
example does in kona.Ideally, the execution extension can provide both methods, by toggling on a cli flag and abstracting the validation logic away from the main pipeline loop.
Pipeline Inputs
The
kona-derive
crate (Kona's derivation pipeline) provides a Pipeline Builder that exposes a builder pattern to construct the pipeline. If theonline
feature flag is enabled onkona-derive
, you can also use thenew_online_pipeline
convenience method. It requires a few inputs:superchain-bindings
crate.trusted-sync
uses the online alloy chain provider which fetches block info over RPC)trusted-sync
uses the online ethereum data source which fetches blobs and calldata online over rpc)trusted-sync
uses the online alloy l2 chain provider which fetches L2 block info over rpc - primarily used for batch validation)BlockInfo
)Prior Work
This was drafted in https://github.com/paradigmxyz/reth/pull/9030.
Metadata
Fixes https://github.com/ethereum-optimism/kona/issues/211