Skip to content

Commit

Permalink
Merge pull request #73 from HorizenOfficial/dev_110
Browse files Browse the repository at this point in the history
1.1.0 fork configuration
  • Loading branch information
paolocappelletti authored Nov 8, 2023
2 parents cef794f + 8ad849b commit e76be51
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 3 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 2 additions & 1 deletion doc/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# EON Release Notes

## Version [1.0.0](/doc/release/1.0.0.md)
## Version [1.1.0](/doc/release/1.1.0.md)
## Version [1.0.0](/doc/release/1.0.0.md)
8 changes: 8 additions & 0 deletions doc/release/1.1.0.md
Original file line number Diff line number Diff line change
@@ -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.
37 changes: 36 additions & 1 deletion node/src/main/java/io/horizen/eon/EonForkConfigurator.java
Original file line number Diff line number Diff line change
@@ -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.*;
Expand All @@ -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;
Expand Down Expand Up @@ -72,7 +81,15 @@ public EonForkConfigurator(Optional<String> 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);
Expand Down Expand Up @@ -114,6 +131,24 @@ private int getFork2TestnetActivation(Optional<String> sidechainId){
}
}

private int getFork3TestnetActivation(Optional<String> 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;
Expand Down

0 comments on commit e76be51

Please sign in to comment.