From db96d69d46db9ba14cc4da96a13e1b29ca30c608 Mon Sep 17 00:00:00 2001 From: Lukasz Gasior Date: Thu, 29 Jun 2023 13:23:17 +0200 Subject: [PATCH 1/2] Add stokenet shutdown fork --- .../forks/modules/StokenetForksModule.java | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/radixdlt-core/radixdlt/src/main/java/com/radixdlt/statecomputer/forks/modules/StokenetForksModule.java b/radixdlt-core/radixdlt/src/main/java/com/radixdlt/statecomputer/forks/modules/StokenetForksModule.java index c798b187eb..189bbc3a99 100644 --- a/radixdlt-core/radixdlt/src/main/java/com/radixdlt/statecomputer/forks/modules/StokenetForksModule.java +++ b/radixdlt-core/radixdlt/src/main/java/com/radixdlt/statecomputer/forks/modules/StokenetForksModule.java @@ -66,6 +66,7 @@ import static com.radixdlt.constraintmachine.REInstruction.REMicroOp.MSG; +import com.google.common.collect.ImmutableSet; import com.google.inject.AbstractModule; import com.google.inject.multibindings.ProvidesIntoSet; import com.radixdlt.application.system.FeeTable; @@ -78,6 +79,7 @@ import com.radixdlt.application.validators.state.ValidatorMetaData; import com.radixdlt.application.validators.state.ValidatorOwnerCopy; import com.radixdlt.application.validators.state.ValidatorRegisteredCopy; +import com.radixdlt.statecomputer.forks.CandidateForkConfig; import com.radixdlt.statecomputer.forks.ForkBuilder; import com.radixdlt.statecomputer.forks.RERulesConfig; import com.radixdlt.statecomputer.forks.RERulesVersion; @@ -155,4 +157,30 @@ ForkBuilder stokenetV2() { 100, // 100 max validators MSG.maxLength())); } + + @ProvidesIntoSet + ForkBuilder shutdown() { + return new ForkBuilder( + "stokenet-shtdwn", + ImmutableSet.of(new CandidateForkConfig.Threshold((short) 7900, 1)), + 16005L, + Long.MAX_VALUE, + RERulesVersion.OLYMPIA_V1, + new RERulesConfig( + RESERVED_SYMBOLS, + Pattern.compile("[a-z0-9]+"), + FeeTable.create( + Amount.ofMicroTokens(Long.MAX_VALUE), Map.of()), // Highest possible fee + 0L, // No txns allowed + OptionalInt.of(0), + Long.MAX_VALUE, // No more epochs + 1, + Amount.ofTokens(90), // Same as prev fork + Long.MAX_VALUE, // No more unstaking + Amount.ofMicroTokens(0), // No more rewards + 0, // Unused + 100, + MSG.maxLength())) + .withShutdown(); + } } From d1466e385af91d80fe6df0ee0ca39504f15aad62 Mon Sep 17 00:00:00 2001 From: Lukasz Gasior Date: Thu, 29 Jun 2023 14:14:27 +0200 Subject: [PATCH 2/2] Increase num epochs before enacted to 3 for Stokenet shutdown fork --- .../statecomputer/forks/modules/StokenetForksModule.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/radixdlt-core/radixdlt/src/main/java/com/radixdlt/statecomputer/forks/modules/StokenetForksModule.java b/radixdlt-core/radixdlt/src/main/java/com/radixdlt/statecomputer/forks/modules/StokenetForksModule.java index 189bbc3a99..756023dd90 100644 --- a/radixdlt-core/radixdlt/src/main/java/com/radixdlt/statecomputer/forks/modules/StokenetForksModule.java +++ b/radixdlt-core/radixdlt/src/main/java/com/radixdlt/statecomputer/forks/modules/StokenetForksModule.java @@ -162,7 +162,7 @@ ForkBuilder stokenetV2() { ForkBuilder shutdown() { return new ForkBuilder( "stokenet-shtdwn", - ImmutableSet.of(new CandidateForkConfig.Threshold((short) 7900, 1)), + ImmutableSet.of(new CandidateForkConfig.Threshold((short) 7900, 3)), 16005L, Long.MAX_VALUE, RERulesVersion.OLYMPIA_V1,