diff --git a/core-rust-bridge/src/main/java/com/radixdlt/protocol/ProtocolConfig.java b/core-rust-bridge/src/main/java/com/radixdlt/protocol/ProtocolConfig.java index 90893680d8..5c834ddd31 100644 --- a/core-rust-bridge/src/main/java/com/radixdlt/protocol/ProtocolConfig.java +++ b/core-rust-bridge/src/main/java/com/radixdlt/protocol/ProtocolConfig.java @@ -85,14 +85,16 @@ public record ProtocolConfig( public static final String GENESIS_PROTOCOL_VERSION_NAME = "babylon-genesis"; public static final String ANEMONE_PROTOCOL_VERSION_NAME = "anemone"; public static final String BOTTLENOSE_PROTOCOL_VERSION_NAME = "bottlenose"; - public static final String CUTTLEFISH_PROTOCOL_VERSION_NAME = "cuttlefish"; + public static final String CUTTLEFISH_PART1_PROTOCOL_VERSION_NAME = "cuttlefish"; + public static final String CUTTLEFISH_PART2_PROTOCOL_VERSION_NAME = "cuttlefish-part2"; public static ImmutableList VERSION_NAMES = ImmutableList.of( GENESIS_PROTOCOL_VERSION_NAME, ANEMONE_PROTOCOL_VERSION_NAME, BOTTLENOSE_PROTOCOL_VERSION_NAME, - CUTTLEFISH_PROTOCOL_VERSION_NAME); + CUTTLEFISH_PART1_PROTOCOL_VERSION_NAME, + CUTTLEFISH_PART2_PROTOCOL_VERSION_NAME); public static final String LATEST_PROTOCOL_VERSION_NAME = VERSION_NAMES.get(VERSION_NAMES.size() - 1); diff --git a/core/src/test/java/com/radixdlt/rev2/protocol/CuttlefishProtocolUpdateTest.java b/core/src/test/java/com/radixdlt/rev2/protocol/CuttlefishProtocolUpdateTest.java index 276153f9dc..68d2532ca3 100644 --- a/core/src/test/java/com/radixdlt/rev2/protocol/CuttlefishProtocolUpdateTest.java +++ b/core/src/test/java/com/radixdlt/rev2/protocol/CuttlefishProtocolUpdateTest.java @@ -88,10 +88,11 @@ public final class CuttlefishProtocolUpdateTest { private static final long ENACTMENT_EPOCH = 8; - private static final ProtocolConfig IMMEDIATELY_CUTTLEFISH = - ProtocolConfig.launchAt(ProtocolConfig.CUTTLEFISH_PROTOCOL_VERSION_NAME); - private static final ProtocolConfig CUTTLEFISH_AT_EPOCH = - ProtocolConfig.enactAtEpoch(ProtocolConfig.CUTTLEFISH_PROTOCOL_VERSION_NAME, ENACTMENT_EPOCH); + private static final ProtocolConfig IMMEDIATELY_CUTTLEFISH_PART2 = + ProtocolConfig.launchAt(ProtocolConfig.CUTTLEFISH_PART2_PROTOCOL_VERSION_NAME); + private static final ProtocolConfig CUTTLEFISH_PART1_AT_EPOCH = + ProtocolConfig.enactAtEpoch( + ProtocolConfig.CUTTLEFISH_PART1_PROTOCOL_VERSION_NAME, ENACTMENT_EPOCH); @Rule public TemporaryFolder folder = new TemporaryFolder(); @@ -121,7 +122,7 @@ private DeterministicTest createTest(ProtocolConfig protocolConfig, Module... ex @Test public void transaction_v2_behaviour_across_cuttlefish() throws ApiException { final var coreApiHelper = new CoreApiHelper(Network.INTEGRATIONTESTNET); - try (var test = createTest(CUTTLEFISH_AT_EPOCH, coreApiHelper.module())) { + try (var test = createTest(CUTTLEFISH_PART1_AT_EPOCH, coreApiHelper.module())) { final var stateComputer = test.getInstance(0, RustStateComputer.class); test.runUntilState(allAtOrOverEpoch(ENACTMENT_EPOCH - 1)); @@ -148,13 +149,13 @@ public void transaction_v2_behaviour_across_cuttlefish() throws ApiException { // Arrange: Run the protocol update: test.runUntilState( - allAtExactlyProtocolVersion(ProtocolConfig.CUTTLEFISH_PROTOCOL_VERSION_NAME)); + allAtExactlyProtocolVersion(ProtocolConfig.CUTTLEFISH_PART1_PROTOCOL_VERSION_NAME)); assertEquals( - ProtocolConfig.CUTTLEFISH_PROTOCOL_VERSION_NAME, + ProtocolConfig.CUTTLEFISH_PART1_PROTOCOL_VERSION_NAME, stateComputer.protocolState().currentProtocolVersion()); assertEquals( - ProtocolConfig.CUTTLEFISH_PROTOCOL_VERSION_NAME, + ProtocolConfig.CUTTLEFISH_PART1_PROTOCOL_VERSION_NAME, coreApiHelper.getNetworkStatus().getCurrentProtocolVersion()); // Act: Can now submit a new TransactionV2 @@ -189,7 +190,7 @@ public void transaction_v2_behaviour_across_cuttlefish() throws ApiException { @Test public void protocol_update_process_updates_status_summary() throws ApiException { final var coreApiHelper = new CoreApiHelper(Network.INTEGRATIONTESTNET); - try (var test = createTest(IMMEDIATELY_CUTTLEFISH, coreApiHelper.module())) { + try (var test = createTest(IMMEDIATELY_CUTTLEFISH_PART2, coreApiHelper.module())) { test.suppressUnusedWarning(); var latestStateVersion = @@ -208,7 +209,7 @@ public void protocol_update_process_updates_status_summary() throws ApiException .getNewValue() .getSubstateData(); assertEquals( - ProtocolConfig.CUTTLEFISH_PROTOCOL_VERSION_NAME, latestStatus.getProtocolVersion()); + ProtocolConfig.CUTTLEFISH_PART2_PROTOCOL_VERSION_NAME, latestStatus.getProtocolVersion()); assertEquals(ProtocolUpdateStatusType.COMPLETE, latestStatus.getUpdateStatus().getType()); } }