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

Remove TTD Bellatrix merge configuration option #8951

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
a0ce521
Hardcode Bellatrix TTD blocks for all known networks
zilm13 Dec 19, 2024
b085281
reset should affect total difficult overrides
zilm13 Dec 20, 2024
8cccf01
fix test for default (mainnet)
zilm13 Dec 20, 2024
c118e70
Add verification EL is never called when transition block hash set
zilm13 Dec 20, 2024
baf23a5
Remove TTD Bellatrix merge configuration option
zilm13 Dec 20, 2024
a722ded
Fix PowMonitor test
zilm13 Dec 23, 2024
8f46715
Fix chiado transition epoch
zilm13 Jan 6, 2025
c12b91e
Merge branch 'master' into remove-ttd-check
zilm13 Jan 6, 2025
51293ed
Change failure style in case of Bellatrix misconfiguration to be fatal
zilm13 Jan 7, 2025
5e09905
Remove ttd test, fix other acceptance tests
zilm13 Jan 8, 2025
596daf4
Fix test for M4 OpenJDK 23
zilm13 Jan 8, 2025
64c0fdf
Fix test for earlier throw than before on PowBlockMonitor
zilm13 Jan 8, 2025
b586aeb
Fix acceptance tests + remove outdated bellatrix merge
zilm13 Jan 8, 2025
68989d4
Remove warning for terminal block hash and epoch network defaults
zilm13 Jan 8, 2025
b264112
Merge branch 'remove-ttd-check' into pow-block-no-td
zilm13 Jan 8, 2025
02c6626
Remove unused td
zilm13 Jan 8, 2025
9647ad7
Cleanup
zilm13 Jan 8, 2025
bda7bdc
Temporary disable
zilm13 Jan 8, 2025
dd90d52
Deprecate TTD reference tests
zilm13 Jan 8, 2025
9198a96
Merge branch 'master' into pow-block-no-td
zilm13 Jan 9, 2025
5cc0895
Rollback fatal exit on service delayed start failure (detaching)
zilm13 Jan 9, 2025
0a0fac1
not needed import
zilm13 Jan 9, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ void shouldHaveCorrectFeeRecipientAndGraffiti(final boolean useSszBlocks) throws
.network(networkName)
.withAltairEpoch(UInt64.ZERO)
.withBellatrixEpoch(UInt64.ZERO)
.validatorKeys(validatorKeystores, validatorKeystores)
.withCapellaEpoch(UInt64.ZERO)
.validatorKeys(validatorKeystores)
.generate();

final String defaultFeeRecipient = "0xFE3B557E8Fb62b89F4916B721be55cEb828dBd73";
Expand All @@ -62,6 +63,7 @@ void shouldHaveCorrectFeeRecipientAndGraffiti(final boolean useSszBlocks) throws
.withInitialState(genesis)
.withAltairEpoch(UInt64.ZERO)
.withBellatrixEpoch(UInt64.ZERO)
.withCapellaEpoch(UInt64.ZERO)
.withValidatorProposerDefaultFeeRecipient(defaultFeeRecipient)
.build());
final TekuValidatorNode validatorClient =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ private static TekuNodeConfigBuilder beaconNodeWithMilestones(final UInt64 capel
.withAltairEpoch(UInt64.ZERO)
.withBellatrixEpoch(UInt64.ZERO)
.withCapellaEpoch(capellaActivationEpoch)
.withTotalTerminalDifficulty(0)
.withStubExecutionEngine(
"0x14e88057b0b7538a8205cb07726a0de03dd69d9a70e88bcffae15ca3fc6b5215");
.withTerminalBlockHash(DEFAULT_EL_GENESIS_HASH, 0)
.withStubExecutionEngine(DEFAULT_EL_GENESIS_HASH);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ private static TekuNodeConfigBuilder beaconNodeConfigWithForks(
.withAltairEpoch(UInt64.ZERO)
.withBellatrixEpoch(UInt64.ZERO)
.withCapellaEpoch(UInt64.ONE)
.withTotalTerminalDifficulty(0)
.withTerminalBlockHash(DEFAULT_EL_GENESIS_HASH, 0)
.withGenesisTime(genesisTime)
.withExecutionEngine(besuNode)
.withJwtSecretFile(JWT_FILE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,6 @@ private static TekuNodeConfigBuilder beaconNodeWithTrustedSetup(
.withRealNetwork()
.withJwtSecretFile(JWT_FILE)
.withDenebEpoch(UInt64.valueOf(2))
.withTotalTerminalDifficulty(0);
.withTerminalBlockHash(DEFAULT_EL_GENESIS_HASH, 0);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ void setUp() {
createBesuNode(
config ->
config
.withMiningEnabled(true)
.withMergeSupport()
.withGenesisFile("besu/preMergeGenesis.json")
.withJwtTokenAuthorization(JWT_FILE));
Expand All @@ -54,7 +53,7 @@ void shouldDetectDoppelgangersViaKeyManagerAPI() throws Exception {
eth1Node.start();

final ValidatorKeystores validatorKeystores =
createTekuDepositSender(networkName).sendValidatorDeposits(eth1Node, 2);
createTekuDepositSender(networkName).generateValidatorKeys(2);

final GenesisGenerator.InitialStateData genesis =
createGenesisGenerator().network(networkName).validatorKeys(validatorKeystores).generate();
Expand All @@ -66,7 +65,7 @@ void shouldDetectDoppelgangersViaKeyManagerAPI() throws Exception {
.withValidatorLivenessTracking()
.withJwtSecretFile(JWT_FILE)
.withBellatrixEpoch(UInt64.ONE)
.withTotalTerminalDifficulty(10001)
.withTerminalBlockHash(DEFAULT_EL_GENESIS_HASH, 0)
.withValidatorProposerDefaultFeeRecipient(defaultFeeRecipient)
.withInitialState(genesis)
.build());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ void shouldMaintainValidatorsInMutableClient() throws Exception {
.withInitialState(genesis)
.withAltairEpoch(UInt64.ZERO)
.withBellatrixEpoch(UInt64.ZERO)
.withTerminalBlockHash(DEFAULT_EL_GENESIS_HASH, 0)
.withValidatorProposerDefaultFeeRecipient(defaultFeeRecipient)
.build());
final TekuValidatorNode validatorClient =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ void setup() throws Exception {
.withNetwork(NETWORK_NAME)
.withAltairEpoch(UInt64.ZERO)
.withBellatrixEpoch(UInt64.ZERO)
.withTotalTerminalDifficulty(0)
.withTerminalBlockHash(DEFAULT_EL_GENESIS_HASH, 0)
.withInitialState(initialStateData)
.withStartupTargetPeerCount(0)
.withReadOnlyKeystorePath(validatorKeys)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public void startFromMergedStatePerMilestoneUsingTerminalBlockHash(
final TekuNodeConfig config =
createTekuNodeBuilderForMilestone(specMilestone)
.withTerminalBlockHash(
"0x00000000000000000000000000000000000000000000000000000000000000aa")
"0x00000000000000000000000000000000000000000000000000000000000000aa", 0)
.withStubExecutionEngine()
.build();

Expand Down Expand Up @@ -70,7 +70,7 @@ private static TekuNodeConfigBuilder createTekuNodeBuilderForMilestone(
.withNetwork("minimal")
.withAltairEpoch(UInt64.ZERO)
.withBellatrixEpoch(UInt64.ZERO)
.withTotalTerminalDifficulty(0)
.withTerminalBlockHash(DEFAULT_EL_GENESIS_HASH, 0)
.withStartupTargetPeerCount(0)
.withInteropNumberOfValidators(64)
.withValidatorProposerDefaultFeeRecipient("0xFE3B557E8Fb62b89F4916B721be55cEb828dBd73");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ private TekuNodeConfigBuilder createBeaconNode(
final BesuNode executionEngine, final int genesisTime) throws Exception {
return TekuNodeConfigBuilder.createBeaconNode()
.withBellatrixEpoch(UInt64.ZERO)
.withTotalTerminalDifficulty(10001)
.withTerminalBlockHash(DEFAULT_EL_GENESIS_HASH, 1)
.withGenesisTime(genesisTime)
.withRealNetwork()
.withStartupTargetPeerCount(0)
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,13 @@ void shouldRespondSyncingWhenExecutionLayerIsDown() throws Exception {
createBesuNode(
config ->
config
.withMiningEnabled(true)
.withMergeSupport()
.withGenesisFile("besu/preMergeGenesis.json")
.withJwtTokenAuthorization(JWT_FILE));
eth1Node.start();

final ValidatorKeystores validatorKeystores =
createTekuDepositSender(networkName).sendValidatorDeposits(eth1Node, 8);
createTekuDepositSender(networkName).generateValidatorKeys(8);

final GenesisGenerator.InitialStateData genesis =
createGenesisGenerator().network(networkName).validatorKeys(validatorKeystores).generate();
Expand All @@ -55,7 +54,7 @@ void shouldRespondSyncingWhenExecutionLayerIsDown() throws Exception {
.withNetwork(networkName)
.withDepositsFrom(eth1Node)
.withBellatrixEpoch(UInt64.ONE)
.withTotalTerminalDifficulty(10001)
.withTerminalBlockHash(DEFAULT_EL_GENESIS_HASH, 0)
.withValidatorProposerDefaultFeeRecipient(defaultFeeRecipient)
.withExecutionEngine(eth1Node)
.withInitialState(genesis)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import tech.pegasys.teku.infrastructure.unsigned.UInt64;
import tech.pegasys.teku.test.acceptance.dsl.AcceptanceTestBase;
import tech.pegasys.teku.test.acceptance.dsl.BesuNode;
import tech.pegasys.teku.test.acceptance.dsl.GenesisGenerator;
import tech.pegasys.teku.test.acceptance.dsl.TekuBeaconNode;
import tech.pegasys.teku.test.acceptance.dsl.TekuNodeConfigBuilder;
import tech.pegasys.teku.test.acceptance.dsl.tools.deposits.ValidatorKeystores;
Expand All @@ -41,24 +42,31 @@ void setup() throws Exception {
createBesuNode(
config ->
config
.withMiningEnabled(true)
.withMergeSupport()
.withGenesisFile("besu/preMergeGenesis.json")
.withJwtTokenAuthorization(jwtFile));
eth1Node.start();

final int totalValidators = 4;
final ValidatorKeystores validatorKeystores =
createTekuDepositSender(NETWORK_NAME).sendValidatorDeposits(eth1Node, totalValidators);
createTekuDepositSender(NETWORK_NAME).generateValidatorKeys(totalValidators);
final GenesisGenerator.InitialStateData genesis =
createGenesisGenerator()
.network(NETWORK_NAME)
.withAltairEpoch(UInt64.ZERO)
.withBellatrixEpoch(UInt64.ONE)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why Bellatrix at epoch 1? So essentially the EL remains waiting at genesis block (which is known and is DEFAULT_EL_GENESIS_HASH until CL reaches epoch 1 and then it merges using that genesis block?

.validatorKeys(validatorKeystores)
.generate();
tekuNode =
createTekuBeaconNode(
configureTekuNode(genesisTime)
.withDepositsFrom(eth1Node)
.withStartupTargetPeerCount(0)
.withValidatorProposerDefaultFeeRecipient(
"0xFE3B557E8Fb62b89F4916B721be55cEb828dBd73")
.withExecutionEngine(eth1Node)
.withExecutionEngineEndpoint(eth1Node.getInternalEngineWebsocketsRpcUrl())
.withJwtSecretFile(jwtFile)
.withInitialState(genesis)
.withReadOnlyKeystorePath(validatorKeystores)
.build());
tekuNode.start();
Expand All @@ -74,7 +82,7 @@ void shouldPassMergeTransitionUsingWebsocketsEngine() {

private TekuNodeConfigBuilder configureTekuNode(final int genesisTime) throws IOException {
return TekuNodeConfigBuilder.createBeaconNode()
.withTotalTerminalDifficulty(10001)
.withTerminalBlockHash(DEFAULT_EL_GENESIS_HASH, 1)
.withBellatrixEpoch(UInt64.ONE)
.withGenesisTime(genesisTime);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ public class AcceptanceTestBase {
System.setProperty("org.apache.tuweni.crypto.useSodium", "false");
}

public static final String DEFAULT_EL_GENESIS_HASH =
"0x14e88057b0b7538a8205cb07726a0de03dd69d9a70e88bcffae15ca3fc6b5215";

private final List<Node> nodes = new ArrayList<>();
private final Network network = Network.newNetwork();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,10 @@ public String getInternalEngineJsonRpcUrl() {
return "http://" + nodeAlias + ":" + ENGINE_JSON_RPC_PORT;
}

public String getInternalEngineWebsocketsRpcUrl() {
return "ws://" + nodeAlias + ":" + ENGINE_JSON_RPC_PORT;
}

private String getInternalP2pUrl(final String nodeId) {
return "enode://" + nodeId + "@" + getInternalIpAddress() + ":" + P2P_PORT;
}
Expand Down
Loading
Loading