Changes needed for the merge

Chris Hobcroft asked me today about the changes in go-ethereum that are needed for the merge. And I promised to compile a list. So here we go:

Update to amphora spec

Our master branch still contains the changes from the rayonism hackathon. There’s a branch dormant to update the engine API to the Amphora spec. The PR for that is here:

Update to kintsugi v.1.0.0-alpha.4

After we merged the updates to Amphora, we need to update to the new Kintsugi spec. Doing it in two steps reduces the cognitive load on the reviewer. The PR for that is here:

Refactor the downloader

One change that needs to go in soon is the refactor of the downloader. Since we dropped old eth protocols (<eth/66) we can simplify the downloader. The PR for that is here:

Implement the Reverse Header Sync

Post-merge we will sync the headerchain from head back to genesis, since the head is decided by the beacon chain not by difficulty. The Reverse Header Sync was already implemented for the Amphora testnets. So the changes need to be rebased once the downloader refactor goes in. A commit implementing it can be found here:

Implement support for EIP-4399

The only significant EIP going into the merge fork is EIP-4399 exposing the RANDOM opcode to the EVM. The data for that is passed to the EL by the consensus layer client. The PR for that is here:

Extend the state test format for post-merge tests

The state test format defines a common format which is used to test that different implementations of ethereum compute the same state. The format needs to be extended for EIP-4399 and other post-merge tests PR for EIP-4399: Great project by Mario Havel to run engine api vectors:

Fuzzing the Engine API

It is important that all execution layer clients behave identically when called from the engine API. Thus I created merge-fuzz to differential fuzz different clients against each other. Repo:

Add pairing tests to Hive

Hive is a tool that continuously tests the ethereum implementations for regressions. It also tests if different implementations can connect to each other and sync from each other. This is really important as it can find problems really quickly. PR to add post-merge testing to Hive:

Manual testing

In addition to a lot of automatic testing, a lot of manual testing has to be performed. Once the longer running testnets are launched (end of November) you can help. Just running a node on one of the merge testnets and providing feedback to the client teams is incredibly valuable I’ve written down some ideas I had which we should test here:

1000 other small things

There are incredibly many small things that still need to be done before we’re ready to merge. But we’re working on it, day and night, tirelessly to merge as soon as possible without compromising the security of ethereum!

Here is another checklist that is being worked on with some more technical details: