diff --git a/.circleci/config.yml b/.circleci/config.yml index eb5c38b23b7..38c2560c4dc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -363,7 +363,7 @@ jobs: path: build/test-results acceptanceTests: - parallelism: 5 + parallelism: 4 executor: machine_large_executor_amd64 steps: - install_java_21 diff --git a/acceptance-tests/src/acceptance-test/java/tech/pegasys/teku/test/acceptance/validatorslashing/MultiPeersStandAloneVcBlocksAcceptanceTest.java b/acceptance-tests/src/acceptance-test/java/tech/pegasys/teku/test/acceptance/validatorslashing/MultiPeersStandAloneVcBlocksAcceptanceTest.java index abe7d557cb7..c63f5532783 100644 --- a/acceptance-tests/src/acceptance-test/java/tech/pegasys/teku/test/acceptance/validatorslashing/MultiPeersStandAloneVcBlocksAcceptanceTest.java +++ b/acceptance-tests/src/acceptance-test/java/tech/pegasys/teku/test/acceptance/validatorslashing/MultiPeersStandAloneVcBlocksAcceptanceTest.java @@ -17,7 +17,6 @@ import org.junit.jupiter.params.provider.MethodSource; import tech.pegasys.teku.bls.BLSKeyPair; import tech.pegasys.teku.infrastructure.unsigned.UInt64; -import tech.pegasys.teku.spec.SpecMilestone; import tech.pegasys.teku.test.acceptance.dsl.TekuBeaconNode; import tech.pegasys.teku.test.acceptance.dsl.TekuNodeConfigBuilder; import tech.pegasys.teku.test.acceptance.dsl.TekuValidatorNode; @@ -39,8 +38,7 @@ public class MultiPeersStandAloneVcBlocksAcceptanceTest shouldShutDownWhenOwnedValidatorSlashed_StandAloneVC_MultiplePeers_SlashingThroughBlock_NoSlashingEventsGossip( final SlashingEventType slashingEventType) throws Exception { - final int genesisTime = timeProvider.getTimeInSeconds().plus(10).intValue(); - final UInt64 altairEpoch = UInt64.valueOf(100); + final int genesisTime = timeProvider.getTimeInSeconds().plus(30).intValue(); final TekuBeaconNode firstTekuNode = createTekuBeaconNode( @@ -48,34 +46,17 @@ public class MultiPeersStandAloneVcBlocksAcceptanceTest .withGenesisTime(genesisTime) .withNetwork(network) .withRealNetwork() - .withAltairEpoch(altairEpoch) + .withSubscribeAllSubnetsEnabled() .withInteropValidators(0, 32) .build()); - firstTekuNode.start(); - - firstTekuNode.waitForEpochAtOrAbove(2); - - final int slashedValidatorIndex = 34; - final BLSKeyPair slashedValidatorKeyPair = getBlsKeyPair(slashedValidatorIndex); - final int slotInThirdEpoch = - firstTekuNode.getSpec().forMilestone(SpecMilestone.ALTAIR).getSlotsPerEpoch() * 2 + 3; - - postSlashing( - firstTekuNode, - UInt64.valueOf(slotInThirdEpoch), - UInt64.valueOf(slashedValidatorIndex), - slashedValidatorKeyPair.getSecretKey(), - slashingEventType); - final TekuBeaconNode secondBeaconNode = createTekuBeaconNode( TekuNodeConfigBuilder.createBeaconNode() .withGenesisTime(genesisTime) .withNetwork(network) .withRealNetwork() - .withRealNetwork() - .withAltairEpoch(altairEpoch) + .withSubscribeAllSubnetsEnabled() .withPeers(firstTekuNode) .build()); @@ -89,10 +70,23 @@ public class MultiPeersStandAloneVcBlocksAcceptanceTest .withBeaconNodes(secondBeaconNode) .build()); + firstTekuNode.start(); secondBeaconNode.start(); - secondValidatorClient.start(); + firstTekuNode.waitForEpochAtOrAbove(1); + + final int slashedValidatorIndex = 34; + final BLSKeyPair slashedValidatorKeyPair = getBlsKeyPair(slashedValidatorIndex); + final int slotInSecondEpoch = firstTekuNode.getSpec().getGenesisSpec().getSlotsPerEpoch() + 3; + + postSlashing( + firstTekuNode, + UInt64.valueOf(slotInSecondEpoch), + UInt64.valueOf(slashedValidatorIndex), + slashedValidatorKeyPair.getSecretKey(), + slashingEventType); + secondValidatorClient.waitForLogMessageContaining( String.format(slashingActionLog, slashedValidatorKeyPair.getPublicKey().toHexString())); diff --git a/acceptance-tests/src/acceptance-test/java/tech/pegasys/teku/test/acceptance/validatorslashing/ValidatorSlashingDetectionAcceptanceTest.java b/acceptance-tests/src/acceptance-test/java/tech/pegasys/teku/test/acceptance/validatorslashing/ValidatorSlashingDetectionAcceptanceTest.java index c177ddc9053..7259cdbd201 100644 --- a/acceptance-tests/src/acceptance-test/java/tech/pegasys/teku/test/acceptance/validatorslashing/ValidatorSlashingDetectionAcceptanceTest.java +++ b/acceptance-tests/src/acceptance-test/java/tech/pegasys/teku/test/acceptance/validatorslashing/ValidatorSlashingDetectionAcceptanceTest.java @@ -47,7 +47,7 @@ public class ValidatorSlashingDetectionAcceptanceTest extends AcceptanceTestBase final String slashingActionLog = "Validator slashing detection is enabled and validator(s) with public key(s) %s detected as slashed. " + "Shutting down..."; - final int shutdownWaitingSeconds = 60; + final int shutdownWaitingSeconds = 90; enum SlashingEventType { PROPOSER_SLASHING, diff --git a/acceptance-tests/src/testFixtures/java/tech/pegasys/teku/test/acceptance/dsl/TekuBeaconNode.java b/acceptance-tests/src/testFixtures/java/tech/pegasys/teku/test/acceptance/dsl/TekuBeaconNode.java index cb0f1852276..40cc58845aa 100644 --- a/acceptance-tests/src/testFixtures/java/tech/pegasys/teku/test/acceptance/dsl/TekuBeaconNode.java +++ b/acceptance-tests/src/testFixtures/java/tech/pegasys/teku/test/acceptance/dsl/TekuBeaconNode.java @@ -226,6 +226,7 @@ public void postProposerSlashing( randomSignedBeaconBlockHeader(slot, index, secretKey, signingRootUtil, forkInfo); final SignedBeaconBlockHeader header2 = randomSignedBeaconBlockHeader(slot, index, secretKey, signingRootUtil, forkInfo); + LOG.debug("Inserting proposer slashing for index {} at slot {}", index, slot); final String body = JsonUtil.serialize( new ProposerSlashing(header1, header2), @@ -256,6 +257,7 @@ public void postAttesterSlashing( spec.getGenesisSchemaDefinitions() .getAttesterSlashingSchema() .create(indexedAttestation1, indexedAttestation2); + LOG.debug("Inserting attester slashing for index {} at slot {}", slashedIndex, slashingSlot); final String body = JsonUtil.serialize( attesterSlashing, diff --git a/acceptance-tests/src/testFixtures/java/tech/pegasys/teku/test/acceptance/dsl/TekuNodeConfigBuilder.java b/acceptance-tests/src/testFixtures/java/tech/pegasys/teku/test/acceptance/dsl/TekuNodeConfigBuilder.java index b1947a653be..b931a600a78 100644 --- a/acceptance-tests/src/testFixtures/java/tech/pegasys/teku/test/acceptance/dsl/TekuNodeConfigBuilder.java +++ b/acceptance-tests/src/testFixtures/java/tech/pegasys/teku/test/acceptance/dsl/TekuNodeConfigBuilder.java @@ -417,6 +417,12 @@ public TekuNodeConfigBuilder withDoppelgangerDetectionEnabled() { return this; } + public TekuNodeConfigBuilder withSubscribeAllSubnetsEnabled() { + LOG.debug("p2p-subscribe-all-subnets-enabled=true"); + configMap.put("p2p-subscribe-all-subnets-enabled", true); + return this; + } + public TekuNodeConfigBuilder withDepositsFrom(final BesuNode eth1Node) { mustBe(NodeType.BEACON_NODE); configMap.put("Xinterop-enabled", false);