Skip to content

Fix protocol schedule for devnets#7429

Merged
macfarla merged 14 commits intobesu-eth:mainfrom
daniellehrner:fix/issue-7413/fix_protocol_schedule_devnets
Aug 12, 2024
Merged

Fix protocol schedule for devnets#7429
macfarla merged 14 commits intobesu-eth:mainfrom
daniellehrner:fix/issue-7413/fix_protocol_schedule_devnets

Conversation

@daniellehrner
Copy link
Copy Markdown
Contributor

@daniellehrner daniellehrner commented Aug 6, 2024

PR description

Introduces a hard fork id into the protocol schedule and keeps track of all the hardforks in the genesis file. This allows correct checks in the engine API if certain hardforks have already occured or not.

Fixed Issue(s)

fixes #7413

Testing

After running ./gradlew distDocker the PR can be tested with the following Kurtosis config:

participants:
  - el_type: besu
    el_image: hyperledger/besu:24.8-develop-6fd65ec
    cl_type: teku
    cl_image: ethpandaops/teku:master
    count: 1
  - el_type: besu
    el_image: hyperledger/besu:24.8-develop-6fd65ec
    cl_type: nimbus
    cl_image: statusim/nimbus-eth2:amd64-latest
    count: 1
network_params:
  electra_fork_epoch: 1
  min_validator_withdrawability_delay: 1
  shard_committee_period: 1
additional_services:
  - dora
snooper_enabled: true

To get the log output of the Besu instances in Kurtosis use:

# 1. instance
docker logs `docker ps | grep besu: | sed -n 1p | cut -d " " -f1`

# 2. instance
docker logs `docker ps | grep besu: | sed -n 2p | cut -d " " -f1`

Thanks for sending a pull request! Have you done the following?

  • Checked out our contribution guidelines?
  • Considered documentation and added the doc-change-required label to this PR if updates are required.
  • Considered the changelog and included an update if required.
  • For database changes (e.g. KeyValueSegmentIdentifier) considered compatibility and performed forwards and backwards compatibility tests

Locally, you can run these tests to catch failures early:

  • unit tests: ./gradlew build
  • acceptance tests: ./gradlew acceptanceTest
  • integration tests: ./gradlew integrationTest
  • reference tests: ./gradlew ethereum:referenceTests:referenceTests

… hardfork in the genesis file

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
…k ids

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
daniellehrner and others added 6 commits August 6, 2024 16:41
…rt of the Shanghai spec. The previous checks for Cancun seem not to have worked and therefore didn't cause the tests to fail. Now that those checks work correctly the test were failing.

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
…been introduced in the Cancun spec, now they work correctly

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
…ED_FORK past Cancun

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
@macfarla
Copy link
Copy Markdown
Contributor

verified successful block production using kurtosis provided above.


2024-08-12 09:32:45.102+00:00 | vert.x-worker-thread-0 | INFO  | MergeCoordinator | Start building proposals for block 12 identified by 0x0342148f02e3e038
2024-08-12 09:32:57.048+00:00 | vert.x-worker-thread-0 | INFO  | AbstractEngineNewPayload | Imported #12 / 0 tx / 0 ws / 0 blobs / base fee 201.42 mwei / 0 (0.0%) gas / (0x1ca204099b11549a813a9b56087f5004098009da933184958a4deada23d89dab) in 0.002s. Peers: 1
2024-08-12 09:33:09.084+00:00 | vert.x-worker-thread-0 | INFO  | AbstractEngineNewPayload | Imported #13 / 0 tx / 0 ws / 0 blobs / base fee 176.24 mwei / 0 (0.0%) gas / (0xcae3e37b14b0b76d35add2702165a652ba6222fe8ddd2680eb53ee424a6e92e0) in 0.002s. Peers: 1
2024-08-12 09:33:09.091+00:00 | vert.x-worker-thread-0 | INFO  | AbstractEngineForkchoiceUpdated | VALID for fork-choice-update: head: 0xcae3e37b14b0b76d35add2702165a652ba6222fe8ddd2680eb53ee424a6e92e0, finalized: 0x95cd143de892722f42572cb89308c9f055664ff613b01ec38a4fe9fed43a2d67, safeBlockHash: 0x95cd143de892722f42572cb89308c9f055664ff613b01ec38a4fe9fed43a2d67
2024-08-12 09:33:21.096+00:00 | vert.x-worker-thread-0 | INFO  | AbstractEngineNewPayload | Imported #14 / 0 tx / 0 ws / 0 blobs / base fee 154.21 mwei / 0 (0.0%) gas / (0x8cbd215ed19d6e2608a1203969c117582ad5c8a46898024bdea6695e0a7f2f22) in 0.001s. Peers: 1
2024-08-12 09:33:21.105+00:00 | vert.x-worker-thread-0 | INFO  | MergeCoordinator | Start building proposals for block 15 identified by 0x4f6c8d91ddcb8dec
2024-08-12 09:33:33.045+00:00 | vert.x-worker-thread-0 | INFO  | AbstractEngineNewPayload | Imported #15 / 0 tx / 0 ws / 0 blobs / base fee 134.93 mwei / 0 (0.0%) gas

@macfarla macfarla merged commit 2158a68 into besu-eth:main Aug 12, 2024
@daniellehrner daniellehrner deleted the fix/issue-7413/fix_protocol_schedule_devnets branch August 13, 2024 07:11
gconnect pushed a commit to gconnect/besu that referenced this pull request Aug 26, 2024
* add `ProtocolSchedule::milestoneFor` to retrieve milestones for every hardfork in the genesis file
* add `setMilestones` and `milestoneFor` to TransitionProtocolSchedule
* refactored all checks for hardforks in the engine API to use hard fork ids
* added tests to test that the engine API v2 endpoints return UNSUPPORTED_FORK past Cancun

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>

---------

Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: gconnect <agatevureglory@gmail.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.

Protocol schedule should be correct for devnets

2 participants