Skip to content

Conversation

@marioevz
Copy link
Member

This PR adds test cases where a ForkchoiceUpdated directive is sent to the EL with invalid payload attributes, timestamp==0.

The expected behavior remains undecided with two options proposed, as per @mkalinin:

Option 1

  1. Check headBlock is known and there is no missing data, if not respond with SYNCING
  2. Check headBlock is VALID, if not respond with INVALID
  3. Apply forkchoiceState
  4. Check payloadAttributes, if invalid respond with error: code: Invalid payload attributes
  5. Start payload build process and respond with VALID

Option 2

  1. Check headBlock is known and there is no missing data, if not respond with SYNCING
  2. Check payloadAttributes (requires a lookup to database to get a timestamp of yet to be applied headBlock), if invalid respond with error: code: Invalid payload attributes
  3. Check headBlock is VALID, if not respond with INVALID
  4. Start payload build process and respond with VALID

Currently in this test case Option 2 check is implemented but can be changed as necessary.

Current outcome per client:

  • Geth: Error but forkchoice is applied
  • Nethermind: Error and forkchoice is rolled back
  • Erigon: No error on any timestamp value
  • EthJS: No error on any timestamp value

cc @MariusVanDerWijden @MarekM25

@mkalinin
Copy link

Thanks a lot for making this scenario into tests! The spec work is pending. I need to think more about this case in terms of the spec, which option to go with. It's on the list and probably will be done this week

@MariusVanDerWijden
Copy link
Member

I think Option 1 makes the most sense, we want to apply the fork choice even if we are unable to produce a payload (How that might happen is irrelevant imo).
And if we get payload params we should make sure that invalid timestamps produce an error imo

@mkalinin
Copy link

The corresponding PR to the spec ethereum/execution-apis#211

@marioevz
Copy link
Member Author

I have updated to the test case to match the option in the updated spec.
Let me know if this is ok.

@marioevz marioevz marked this pull request as ready for review May 3, 2022 17:48
@holiman holiman merged commit 98779cb into ethereum:master May 5, 2022
racytech pushed a commit to racytech/hive that referenced this pull request Apr 4, 2025
This config with mixed Grandine BN <> Lighthouse VC, Grandine BN <> Teku
VC passes:

```
participants:
  - el_type: erigon
    cl_type: grandine
    cl_image: grandine:local
    use_separate_vc: true
    vc_type: lighthouse
    vc_image: sigp/lighthouse:latest
  - el_type: geth
    cl_type: grandine
    cl_image: grandine:local
    use_separate_vc: true
    vc_type: teku
    vc_image: consensys/teku:latest
  - el_type: reth
    cl_type: grandine
    cl_image: grandine:local
    use_separate_vc: true
    vc_type: lighthouse
    vc_image: sigp/lighthouse:latest
    count: 1
network_params:
  deneb_fork_epoch: 1
  min_validator_withdrawability_delay: 1
  shard_committee_period: 1
  num_validator_keys_per_node: 250
launch_additional_services: true
additional_services:
  - dora
  - assertoor
#snooper_enabled: true
disable_peer_scoring: true
assertoor_params:
  image: "ethpandaops/assertoor:master"
  run_stability_check: false
  run_block_proposal_check: false
  tests:
    - https://raw.githubusercontent.com/ethpandaops/assertoor-test/master/assertoor-tests/stability-check.yaml
    - https://raw.githubusercontent.com/ethpandaops/assertoor-test/master/assertoor-tests/block-proposal-check.yaml
    - https://raw.githubusercontent.com/ethpandaops/assertoor-test/master/assertoor-tests/eoa-transactions-test.yaml
    - https://raw.githubusercontent.com/ethpandaops/assertoor-test/master/assertoor-tests/all-opcodes-test.yaml
    - https://raw.githubusercontent.com/ethpandaops/assertoor-test/master/assertoor-tests/validator-withdrawal-test.yaml
    - https://raw.githubusercontent.com/ethpandaops/assertoor-test/master/assertoor-tests/validator-exit-test.yaml
    - https://raw.githubusercontent.com/ethpandaops/assertoor-test/master/assertoor-tests/validator-slashing-test.yaml
    - https://raw.githubusercontent.com/ethpandaops/assertoor-test/master/assertoor-tests/dencun-opcodes-test.yaml
    - https://raw.githubusercontent.com/ethpandaops/assertoor-test/master/assertoor-tests/blob-transactions-test.yaml
 ```
racytech pushed a commit to racytech/hive that referenced this pull request Apr 4, 2025
🤖 I have created a release *beep* *boop*
---


##
[2.1.0](ethpandaops/ethereum-package@2.0.0...2.1.0)
(2024-03-28)


### Features

* add beacon snooper
([ethereum#520](ethpandaops/ethereum-package#520))
([7e36191](ethpandaops/ethereum-package@7e36191))
* add BN&lt;&gt;CL compatibility matrix to readme
([ethereum#519](ethpandaops/ethereum-package#519))
([177beeb](ethpandaops/ethereum-package@177beeb))
* add grandine
([ethereum#517](ethpandaops/ethereum-package#517))
([3ac4d2a](ethpandaops/ethereum-package@3ac4d2a))
* enable preset to be set, mainnet/minimal
([ethereum#524](ethpandaops/ethereum-package#524))
([f6e1b13](ethpandaops/ethereum-package@f6e1b13))
* make deneb genesis default
([ethereum#518](ethpandaops/ethereum-package#518))
([49509b9](ethpandaops/ethereum-package@49509b9))
* make keymanager optional
([ethereum#523](ethpandaops/ethereum-package#523))
([969012c](ethpandaops/ethereum-package@969012c))
* update verkle genesis + add besu support to verkle testing
([ethereum#512](ethpandaops/ethereum-package#512))
([0615cd1](ethpandaops/ethereum-package@0615cd1))


### Bug Fixes

* architecture.md
([ethereum#514](ethpandaops/ethereum-package#514))
([f0ec4f0](ethpandaops/ethereum-package@f0ec4f0))
* blobscan network name
([ethereum#516](ethpandaops/ethereum-package#516))
([83c2a55](ethpandaops/ethereum-package@83c2a55))
* **blobscan:** update healthcheck endpoint
([ethereum#513](ethpandaops/ethereum-package#513))
([8b2fc61](ethpandaops/ethereum-package@8b2fc61))
* separate vc
([ethereum#526](ethpandaops/ethereum-package#526))
([baa04e9](ethpandaops/ethereum-package@baa04e9))
* Updated Readme with VCs supported by Grandine BN
([ethereum#527](ethpandaops/ethereum-package#527))
([9cbe0b3](ethpandaops/ethereum-package@9cbe0b3))
* use correct dora & assertoor images
([ethereum#522](ethpandaops/ethereum-package#522))
([2a8d73a](ethpandaops/ethereum-package@2a8d73a))
* use new validator names in assertoor config
([ethereum#521](ethpandaops/ethereum-package#521))
([f595eb9](ethpandaops/ethereum-package@f595eb9))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants