Skip to content

Skip validation of the EIP7702 Authority signature when EstimateGas #31617

@peekpi

Description

@peekpi

Rationale

When EstimateGas is called, if the authorizationList field is provided, its signature is verified during execution. If the signature is invalid, the sender's code is not updated.
Example request on sepolia:

{
    "jsonrpc": "2.0",
    "method": "eth_estimateGas",
    "params": [
        {
            "from": "0x0338f81BEDcE242929Fad9b6e7379B0295211577",
            "to": "0x0338f81BEDcE242929Fad9b6e7379B0295211577",
            "value": "0x0",
            "data": "0x61461954",
            "authorizationList": [
                {
                    "chainId": "0xaa36a7",
                    "nonce": "0x1",
                    "address": "0x6587f125a2626d59c2600ae058ffb62c8651ed33",
                    "yParity": "0x0",
                    "r": "0x0",
                    "s": "0x0"
                }
            ]
        }
    ],
    "id": 71
}

The alternative is to override the sender's code with a third argument, which works, but feels a little weird.
The third parameter is import by #30695 .

{
    "jsonrpc": "2.0",
    "method": "eth_estimateGas",
    "params": [
        {
            "from": "0x0338f81BEDcE242929Fad9b6e7379B0295211577",
            "to": "0x0338f81BEDcE242929Fad9b6e7379B0295211577",
            "value": "0x0",
            "data": "0x61461954",
            "authorizationList": [
                {
                    "chainId": "0xaa36a7",
                    "nonce": "0x1",
                    "address": "0x6587f125a2626d59c2600ae058ffb62c8651ed33",
                    "yParity": "0x0",
                    "r": "0x0",
                    "s": "0x0"
                }
            ]
        },
        "latest",
        {
                "0x0338f81BEDcE242929Fad9b6e7379B0295211577":{
                    "code": "0xef0100e22f5f1a03db3af7bdc7b40c146524ad19a7e513"
                }
        }
    ],
    "id": 71
}

Implementation

Skip authorityList validation when calling EstiamteGas.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions