Skip to content

feat(tests): add tests for the new stricter rules of EIP-6110 (deposit requests) #1360

@jochem-brouwer

Description

@jochem-brouwer

These tests have to do with this merged PR: ethereum/EIPs#9460

Note that the EIP does not specify the specific bytecode, it only specifies that the deposit contract, once it logs a DepositEvent (this has log topic 0 DEPOSIT_EVENT_SIGNATURE_HASH), the layout of this topic is strictly validated. If this validation fails, the block is invalid. It is therefore possible to use any deposit contract bytecode, but the log layout of the deposit event should be correct. Note that Sepolia and Mainnet/Holesky differ in bytecode from each other, and it is likely that devnets or maybe L2s introduce new bytecodes (Sepolia has permissioned deposits via an integrated ERC20 token).

The tests should test the deposit contract in the following way:

  • LOG with correct layout (VALID)
  • LOG with log data > 576
  • LOG with log data < 576
  • LOG with offsets not at the right location
  • LOG with sizes not at the right sizes
  • LOG with different topic (VALID)

These tests should be wrapped in a test which also has txs which submit the log, but where the tx (or the call) gets reverted.

This is low-prio since this will only fail for non-mainnet clients which have a deposit contract which does not use the mainnet bytecode or Sepolia bytecode, and this "custom" bytecode does not follow the log layout as specified in the EIP.

I will assign myself for this :)

Metadata

Metadata

Labels

fork:praguePrague hardforkscope:testsScope: Changes EL client test cases in `./tests`type:feattype: Feature

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions