Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pectra Engine API Validation #8179

Closed
siladu opened this issue Jan 27, 2025 · 3 comments
Closed

Pectra Engine API Validation #8179

siladu opened this issue Jan 27, 2025 · 3 comments
Assignees
Labels

Comments

@siladu
Copy link
Contributor

siladu commented Jan 27, 2025

One known issue with engine_newPayload: we don't invalidate when V4 data (executionRequests) is sent to engine_newPayloadV3, we only validate if V4 data is missing from engine_newPayloadV4.

Spec says: https://github.com/ethereum/execution-apis/blob/main/src/engine/cancun.md#engine_newpayloadv3

Client software MUST check that provided set of parameters and their fields strictly matches the expected one and return -32602: Invalid params error if this check fails.

I expect this error would show up in the hive tests, see #8177


Also check against spec for other inconsistencies.

https://github.com/ethereum/execution-apis/blob/main/src/engine/prague.md

@siladu
Copy link
Contributor Author

siladu commented Jan 30, 2025

Maybe need to run the cancun hive tests to check this?

@siladu
Copy link
Contributor Author

siladu commented Feb 3, 2025

newPayloadV3 containing V4's executionRequests incorrectly responds with VALID...

{
  "jsonrpc": "2.0",
  "method": "engine_newPayloadV3",
  "params": [
    {
      "parentHash": "0x2397e53b2fbc121aed6818727f9807db7ec148f7f88ecdf87096cc815efa012b",
      "feeRecipient": "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
      "stateRoot": "0x6a27f38c55291493aa87c02bbd574a92537fdefa1ae7b48c649fe4aeb6a17123",
      "receiptsRoot": "0xd07470c1abfad9d95f8766951f169046967afce22ae7ec9890b49418c62c9c85",
      "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "blockNumber": "0x1",
      "gasLimit": "0x16345785d8a0000",
      "gasUsed": "0x1c790",
      "timestamp": "0xfffffffffffffffe",
      "extraData": "0x",
      "prevRandao": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "baseFeePerGas": "0x7",
      "blobGasUsed": "0x0",
      "excessBlobGas": "0x0",
      "blockHash": "0x3fa4802876dc2d01c056aae4be651618efd7219ec8c965d263803643ec72a71d",
      "transactions": [
        "0x02f88301808007830f424094000000000000000000000000000000000000100080a0000000000000000000000000000000000000000000000000fffffffffffffffec080a0536fb04c01ae7771b9ff69f58a83ca31d47c32d8588f9ad779adb4b19ddf0faaa02b8fb1173c25bda1fbc160633f38a5607c519aca757fd13c59a2c6952f82ff45"
      ],
      "withdrawals": []
    },
    [],
    "0x000000000000000000000000000000000000000000000000fffffffffffffffe",
    []
  ],
  "id": 2
}

@siladu
Copy link
Contributor Author

siladu commented Feb 20, 2025

We are passing all hive tests

@siladu siladu closed this as completed Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants