EVM/Node: prevalidation of authorizations (EIP-7702)
Context
Closes L2-292.
Some checks can be added regarding authorizations from EIP-7702 before at prevalidation to avoid faulty blueprints. In particular regarding nonces and chain ids.
The way we tackle this is pretty straightforward:
- the chain id can easily be checked because we have access to the context
- we recover the signer's address thanks to the signature (
r,s,y_parity) and we can retrieve the current nonce of the signer through the context as well
This will allow to reject invalid EIP-7702 transactions at an early stage.
Testing
Already existing EIP-7702 scenario:
dune exec etherlink/tezt/tests/main.exe -- evm eip7702 /dal /multichain_enabled alpha --file evm_sequencer.ml
Edited by Rodi-Can Bozman