besu
besu copied to clipboard
use sepolia genesis for tests
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-requiredlabel 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]
Why not hoodi? probably since it has less state it will be used before than sepolia so we catch issues even earlier
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
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.
My main thinking was that Hoodi is going to be around for longer (unless another Holeskatastrophe :D ) so less changing around
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 :)
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.
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
@Gabriel-Trintinalia @siladu any other feedback? Worth making this change?
as discussed, changed back to mainnet but keeping the refactor to make it easier to change in the future @siladu @Gabriel-Trintinalia