From 8ad849b26e457b97a72c44bab23a80464fc68352 Mon Sep 17 00:00:00 2001 From: paolocappelletti Date: Tue, 7 Nov 2023 17:47:04 +0100 Subject: [PATCH] fork config un pregobi + release notes --- CHANGELOG.md | 3 +- doc/index.md | 3 +- doc/release/1.1.0.md | 8 ++++ .../io/horizen/eon/EonForkConfigurator.java | 37 ++++++++++++++++++- 4 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 doc/release/1.1.0.md diff --git a/CHANGELOG.md b/CHANGELOG.md index c29461c..0c22d2a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Changelog -## 1.1.0-SNAPSHOT +## 1.1.0 * SDK dependency updated to version 0.9.0 +* Fork configuration to enable Native<>Real smart contract interoperability ## 1.0.0 * SDK dependency updated to version 0.8.0 diff --git a/doc/index.md b/doc/index.md index 2638e57..d62199b 100644 --- a/doc/index.md +++ b/doc/index.md @@ -1,3 +1,4 @@ # EON Release Notes -## Version [1.0.0](/doc/release/1.0.0.md) \ No newline at end of file +## Version [1.1.0](/doc/release/1.1.0.md) +## Version [1.0.0](/doc/release/1.0.0.md) diff --git a/doc/release/1.1.0.md b/doc/release/1.1.0.md new file mode 100644 index 0000000..02406ea --- /dev/null +++ b/doc/release/1.1.0.md @@ -0,0 +1,8 @@ +# Release notes - version 1.1.0 +--- + +## Notes about new/updated Features +The 1.1.0 version has been updated to the 0.9.0 SDK version, which introduces the support to Native<>Real smart contract interoperability: refer to [SDK release notes](https://github.com/HorizenOfficial/Sidechains-SDK/tree/master/doc/release/0.9.0.md) for a detailed explanation. + +--- +Full [Changelog](/CHANGELOG.md) available. \ No newline at end of file diff --git a/node/src/main/java/io/horizen/eon/EonForkConfigurator.java b/node/src/main/java/io/horizen/eon/EonForkConfigurator.java index 041dabd..423c7d4 100644 --- a/node/src/main/java/io/horizen/eon/EonForkConfigurator.java +++ b/node/src/main/java/io/horizen/eon/EonForkConfigurator.java @@ -1,5 +1,6 @@ package io.horizen.eon; +import io.horizen.account.fork.ContractInteroperabilityFork; import io.horizen.account.fork.GasFeeFork; import io.horizen.account.fork.ZenDAOFork; import io.horizen.fork.*; @@ -25,6 +26,14 @@ public class EonForkConfigurator extends ForkConfigurator { static final int F2_TESTNET_FORKPOINT = 800; static final int F2_MAINNET_FORKPOINT = 1109; ///estimated start: Thu 19 Oct 2023 15:55 Milano time + //EON fork 3: Native <> Real smart contract interoperability + static final int F3_REGTEST_FORKPOINT = 7; + static final int F3_PREGOBI_TESTNET_FORKPOINT = 1815; //estimated start: Mon 13 Nov 2023 13:01 Milano time + static final int F3_GOBI_TESTNET_FORKPOINT = 500000000; ///TODO: to be estimated + static final int F3_TESTNET_FORKPOINT = 500000000; //not used + static final int F3_MAINNET_FORKPOINT = 500000000; ///TODO: to be estimated + + private final SidechainForkConsensusEpoch mandatorySidechainFork1; @@ -72,7 +81,15 @@ public EonForkConfigurator(Optional sidechainId) { F2_REGTEST_FORKPOINT, getFork2TestnetActivation(sidechainId), F2_MAINNET_FORKPOINT), - activeSlotCoefficientFork) + activeSlotCoefficientFork), + + new Pair<>( + new SidechainForkConsensusEpoch( + F3_REGTEST_FORKPOINT, + getFork3TestnetActivation(sidechainId), + F3_MAINNET_FORKPOINT), + new ContractInteroperabilityFork(true) + ) ); mandatorySidechainFork1 = new SidechainForkConsensusEpoch(0, 0, 0); @@ -114,6 +131,24 @@ private int getFork2TestnetActivation(Optional sidechainId){ } } + private int getFork3TestnetActivation(Optional sidechainId){ + if (sidechainId.isPresent()){ + switch (sidechainId.get()){ + case ApplicationConstants.PREGOBI_SIDECHAINID: + //Pre-Gobi (parallel testnet) fork configuration + return F3_PREGOBI_TESTNET_FORKPOINT; + case ApplicationConstants.GOBI_SIDECHAINID: + //Gobi (official testnet) fork configuration + return F3_GOBI_TESTNET_FORKPOINT; + default: + //any other testnet + return F3_TESTNET_FORKPOINT; + } + } else { + return F3_TESTNET_FORKPOINT; + } + } + @Override public SidechainForkConsensusEpoch fork1activation() { return mandatorySidechainFork1;