Etherlink: compatibility for launch
This is a sub-milestone of %Etherlink: main launch, dedicated to implementing the remaining EVM compatibility features for main launch.
While we based our previous implementation of RPCs on ethereum.org, it seems that ethereum.github.io is also a conventionally adopted API. But they differ in some ways: some RPCs are present in one and not the other, some fields are different sometimes.
This milestone is mainly about adapting our RPCs to the latter specification.
The Missing RPCs document provides an analysis of the differences between the two APIs, specialized for Etherlink. The tasks below reflect the conclusions of the document.
Assumptions to be confirmed
- We don’t do blobs.
- We don’t do engine API.
- We don’t do create access list until access list are implemented in the kernel (if ever) and
debug_traceTransaction, in the meantimeeth_createAccessListis set as "not implemented". - We support only standard RPC spec plus
debug_traceTransaction. - We set
debug_*namespace to not implemented until someone asks for it.
Tasks
Global progress
(These are mostly the items from the following sub-sections.)
-
Gas issue with Uniswap v2 - Solved with the rework of the tick model.
-
debug_traceTransaction -
eth_feeHistory -
eth_getBlockReceipts -
eth_maxPriorityFeePerGas -
Add "not implemented" RPCs -
Update block fields #7178 (closed) -
Update transactions receipt #7179 (closed) -
Update transaction objects? To Be discussed #7179 (closed) -
Update a field? #7183 (closed) -
Gas issue with ThirdWeb deployment. - Wrong gas supplied deep in the process, because our gas price is adaptive.
- Worked around by posting to the delayed inbox.
debug_traceTransaction
2024-04-29 - 2024-05-24
Implementation of structLogger.
Node:
-
Implement replay blockinto an RPC. (!13196 (merged)) -
AllowreplayBlockbypassing stage 1 by writing the blueprint directly into the storage.- This actually doesn't make sense, as the blueprint is stored as chunks in the store of the node. It is simpler to reuse the full kernel process.
-
Implement the configuration of the tracer and write it in the storage. (!13321 (merged)) -
IndexableStoragedecoder. (!13378 (merged)) -
Opcodesdecoder. (!13378 (merged)) -
Implement debug_traceTransaction, calling the replay mechanism and reading the result in the storage. (!13268 (merged), !13321 (merged))
Kernel:
- Encodings
-
New entrypoint for tracing:kernel_trace.- Same conclusion as for the alternative entrypoint for
replayBlock/
- Same conclusion as for the alternative entrypoint for
-
Reading configuration from the storage. (!13321 (merged), !13185 (merged)) -
Logging information in Handler::execute(!13185 (merged))
Deliverable: debug_traceTransaction supported by Etherlink with the struct logger tracer, so that it unblocks the Tenderly partner.
Other RPCs
2024-04-29 - 2024-05-24
@pe.cornilleau @hantang.sun @pikatos
New ones
-
eth_feeHistory #7174 (closed) (#7178 (closed) is a prerequisite) (!13259 (merged)) -
eth_getBlockReceipts #7175 (closed) (!13370 (merged)) -
eth_maxPriorityFeePerGas #7176 (closed) (!13161 (merged)) -
add "not implemented" RPCs #7177 (closed) (!13155 (merged))
Old ones
-
update block fields #7178 (closed) (!13159 (merged)) -
update transactions receipt #7179 (closed) -
update transaction objects? To Be discussed #7179 (closed) -
update a field? #7183 (closed)
Note: setting new fields as optional, at least as a first step, side steps the migration of data.
Deliverable: better support for the RPCs specified in ethereum.github.io, thus improving the EVM compatibility of Etherlink.
Tasks to be confirmed
- Storage burn
Next potential projects
- Dencun integration
- hot/cold access feature
- gas refund for freeing space
- implement debug_getRaw*
- implement eth_createAccessList
- test the RPCs of the evm node in sequencer node using official test suite
- implement eth_call geth additionnal spec
- go over debug_* RPCs defined in geth or erigon