besu icon indicating copy to clipboard operation
besu copied to clipboard

use sepolia genesis for tests

Open macfarla opened this issue 5 months ago • 5 comments

Signed-off-by: Sally MacFarlane [email protected]

PR description

Use sepolia protocol specs for test fixtures. This should mean we catch issues earlier because hardfork changes are made to sepolia.json before mainnet.json.

Only use mainnet for the test where we're checking specific milestone values

Fixed Issue(s)

fixes #6653

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

  • [x] Checked out our contribution guidelines?
  • [x] Considered documentation and added the doc-change-required label to this PR if updates are required.
  • [x] 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:

  • [x] spotless: ./gradlew spotlessApply
  • [x] unit tests: ./gradlew build
  • [x] acceptance tests: ./gradlew acceptanceTest
  • [x] integration tests: ./gradlew integrationTest
  • [x] reference tests: ./gradlew ethereum:referenceTests:referenceTests

Signed-off-by: Sally MacFarlane [email protected]

macfarla avatar Jun 13 '25 10:06 macfarla

Why not hoodi? probably since it has less state it will be used before than sepolia so we catch issues even earlier

lu-pinto avatar Jun 17 '25 09:06 lu-pinto

Why not hoodi? probably since it has less state it will be used before than sepolia so we catch issues even earlier

happy to change this to hoodi. Still soliciting feedback on whether we want to move away from mainnet

macfarla avatar Jun 27 '25 01:06 macfarla

Downside of this is we have to change whenever the testnets change. We also lose some testing of mainnet config which is different to the testnets, so I think we trade off finding one class of issues earlier with maybe not finding a mainnet-specific issue.

Maybe we can test both?

Or use testnets here and have additional explicit mainnet config testing to mitigate this...or maybe eth_config is sufficient?

Following the Pectra testnets, I would say sepolia (and its successor) is more like to be the first testnet to fork before Hoodi since Hoodi is now seen as a stable pre-prod env for large infra operators.

siladu avatar Jun 27 '25 02:06 siladu

My main thinking was that Hoodi is going to be around for longer (unless another Holeskatastrophe :D ) so less changing around

lu-pinto avatar Jun 27 '25 08:06 lu-pinto

It's true but I think in reality hoodi will fork just before mainnet so sepolia will give more warning...depends what you want to optimise for I guess :)

siladu avatar Jun 27 '25 08:06 siladu

Maybe we could have a constant: public static final ProtocolSchedule TESTING_NETWORK = ProtocolScheduleFixture.SEPOLIA;. In the future, whenever we decide to change, it will be only one place.

Gabriel-Trintinalia avatar Jul 09 '25 03:07 Gabriel-Trintinalia

Maybe we could have a constant: public static final ProtocolSchedule TESTING_NETWORK = ProtocolScheduleFixture.SEPOLIA;. In the future, whenever we decide to change, it will be only one place.

made this change

macfarla avatar Jul 14 '25 03:07 macfarla

@Gabriel-Trintinalia @siladu any other feedback? Worth making this change?

macfarla avatar Jul 16 '25 02:07 macfarla

as discussed, changed back to mainnet but keeping the refactor to make it easier to change in the future @siladu @Gabriel-Trintinalia

macfarla avatar Jul 23 '25 01:07 macfarla