Test cases for Merge
This is a collection of edge cases we should write tests for that I thought about while reviewing our implementation in geth.
Static test cases
- Reject a block with uncles
- What should happen if we produce a block too far into the future?
- Test extradata > 32 byte
- Test ConsensusValidated/ForkChoiceUpdated with block < TTD
- Test reorging over the TTD boundary when the chain is already on (non-finalized) pos blocks
- What happens if you reexecute the same block multiple times
- Increase/decrease block gas limit
- Send 0x00 forkChoiceUpdates after the merge
- Create a header with non-0 difficulty
- Test the Random opcode
- Mine the last pow block far in the future (FutureBlock)
Geth internal tests
- Verify Headers with half pre-merge and half post-merge
- Call setThreads on Clique/Ethash
- Check blockchain with non-nil shouldPreserve function (prefer local over remote block)
Clarifications
- Verify header does not check the timestamp anymore, why?
- Test a beaconchain block without execution layer block
Ideas
- Double signing EL payloads
- Signing EL payload with invalid key
- Invalid EL signature
- Depositing pre/during/post merge
- Shutdown validators
- Split the network by voting on invalid blocks
- Split the network by voting on valid but sibling blocks
- Mining two/more competing final pow blocks
- Publishing a future pow final block