Skip to content

Commit

Permalink
Merge pull request #97 from HorizenOfficial/development
Browse files Browse the repository at this point in the history
1.3.0 to master
  • Loading branch information
paolocappelletti authored Mar 6, 2024
2 parents 4a1aae4 + 556cfae commit ff3d43a
Show file tree
Hide file tree
Showing 36 changed files with 1,699 additions and 213 deletions.
13 changes: 9 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
# Changelog

## 1.3.0
* SDK dependency updated to version 0.11.0 (see [SDK changelog](https://github.com/HorizenOfficial/Sidechains-SDK/blob/0.11.0/CHANGELOG.md))
* Fork configuration to enable: EVM Update, Forger stake native smart contract new methods, Pause Forging feature

## 1.2.1
* SDK dependency updated to version 0.10.1 (see [SDK changelog](https://github.com/HorizenOfficial/Sidechains-SDK/blob/master/CHANGELOG.md))
* SDK dependency updated to version 0.10.1 (see [SDK changelog](https://github.com/HorizenOfficial/Sidechains-SDK/blob/0.10.1/CHANGELOG.md))

## 1.2.0
* SDK dependency updated to version 0.10.0 (see [SDK changelog](https://github.com/HorizenOfficial/Sidechains-SDK/blob/master/CHANGELOG.md))
* SDK dependency updated to version 0.10.0 (see [SDK changelog](https://github.com/HorizenOfficial/Sidechains-SDK/blob/0.10.0/CHANGELOG.md))
* Fork configuration to enable new functionalities (ZenIP 42203/42206 support, ZenDao Multisig support)

## 1.1.0
* SDK dependency updated to version 0.9.0 (see [SDK changelog](https://github.com/HorizenOfficial/Sidechains-SDK/blob/master/CHANGELOG.md))
* SDK dependency updated to version 0.9.0 (see [SDK changelog](https://github.com/HorizenOfficial/Sidechains-SDK/blob/0.9.0/CHANGELOG.md))
* Fork configuration to enable Native<>Real smart contract interoperability
* Added endpoints documentation

Expand All @@ -19,7 +24,7 @@

## 1.0.0
* SDK dependency updated to version 0.8.0
* Fork configuration to enable decentralized governance (ZenDao) and change consensus parameters (consensus epoch slot time and lenght, acrive slot coefficient)
* Fork configuration to enable decentralized governance (ZenDao) and change consensus parameters (consensus epoch slot time and length, active slot coefficient)
* Introduced a delay of 6 blocks in the inclusion of the mainchain blocks

## 0.2.1
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Horizen EON is a public proof-of-stake sidechain and a fully EVM-compatible smar
[Changelog](/CHANGELOG.md)

### EVM compatibility
Current EVM implementation is based on go-ethereum [Paravin](https://github.com/ethereum/go-ethereum/releases/tag/v1.10.26) (`v1.10.26`).<br>
Solidity compiler is supported up to version `0.8.19`.
Current EVM implementation is based on go-ethereum [Archanes](https://github.com/ethereum/go-ethereum/releases/tag/v1.13.4) (`v1.13.4`).<br>
Solidity compiler is supported up to version `0.8.23`.

### Supported platforms

Expand Down
12 changes: 6 additions & 6 deletions api/version.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
{
"network":"mainnet",
"networkName": "eon",
"version":"1.2.1",
"dockerImages":["zencash/evmapp:1.2.1","zencash/evmapp:latest"],
"ghReleaseLink":"github.com/HorizenOfficial/eon/releases/tag/1.2.1"
"version":"1.3.0",
"dockerImages":["zencash/evmapp:1.3.0","zencash/evmapp:latest"],
"ghReleaseLink":"github.com/HorizenOfficial/eon/releases/tag/1.3.0"
},
{
"network":"testnet",
"networkName": "gobi",
"version":"1.2.1",
"dockerImages":["zencash/evmapp:1.2.1","zencash/evmapp:latest"],
"ghReleaseLink":"github.com/HorizenOfficial/eon/releases/tag/1.2.1"
"version":"1.3.0",
"dockerImages":["zencash/evmapp:1.3.0","zencash/evmapp:latest"],
"ghReleaseLink":"github.com/HorizenOfficial/eon/releases/tag/1.3.0"
}
]
6 changes: 3 additions & 3 deletions bootstraptool/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>io.horizen</groupId>
<artifactId>bootstraptool</artifactId>
<version>1.2.1</version>
<version>1.3.0</version>
<inceptionYear>2023</inceptionYear>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand All @@ -16,12 +16,12 @@
<dependency>
<groupId>io.horizen</groupId>
<artifactId>sidechains-sdk-account_sctools</artifactId>
<version>0.10.1</version>
<version>0.11.0</version>
</dependency>
<dependency>
<groupId>io.horizen</groupId>
<artifactId>eon</artifactId>
<version>1.2.1</version>
<version>1.3.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
Expand Down
17 changes: 10 additions & 7 deletions doc/api/wallet/createPrivateKey25519.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
[&lt; EON API Documentation](/doc/api/index.md)
### wallet/createPrivateKeySecp256k1
### wallet/createPrivateKey25519

Create a private key in the Secp256k1 format.\
Secp256k1 keys are the standard used in Ethereum EVMs and also by EON.\
Returns the correspondent public address.
Create a private key in the 25519 format.
25519 keys are used in EON for designating forgers.
Returns the correspondent public key.

**Parameters**

No parameters

**Example request**

curl -sX POST 'http://127.0.0.1:9085/wallet/createPrivateKeySecp256k1' -H 'Content-Type: application/json' -H 'accept: application/json'
curl -sX POST 'http://127.0.0.1:9085/wallet/createPrivateKey25519' -H 'Content-Type: application/json' -H 'accept: application/json'

**Example response**

{
"result" : {
"address" : "00c8f107a09cd4f463afc2f1e6e5bf6022ad4600"
"proposition" : {
"publicKey" : "4b50edf43fddcf29afceacfcc9c5c16edb16de6550b9172c7190bfe9fdad0f45"
}
}
}
}

14 changes: 6 additions & 8 deletions doc/api/wallet/createPrivateKeySecp256k1.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
[&lt; EON API Documentation](/doc/api/index.md)
### wallet/createPrivateKey25519
### wallet/createPrivateKeySecp256k1

Create a private key in the 25519 format.
25519 keys are used in EON for designating forgers.
Returns the correspondent public key.
Create a private key in the Secp256k1 format.\
Secp256k1 keys are the standard used in Ethereum EVMs and also by EON.\
Returns the correspondent public address.

**Parameters**

No parameters

**Example request**

curl -sX POST 'http://127.0.0.1:9085/wallet/createPrivateKey25519' -H 'Content-Type: application/json' -H 'accept: application/json'
curl -sX POST 'http://127.0.0.1:9085/wallet/createPrivateKeySecp256k1' -H 'Content-Type: application/json' -H 'accept: application/json'

**Example response**

{
"result" : {
"proposition" : {
"publicKey" : "4b50edf43fddcf29afceacfcc9c5c16edb16de6550b9172c7190bfe9fdad0f45"
}
"address" : "00c8f107a09cd4f463afc2f1e6e5bf6022ad4600"
}
}
34 changes: 34 additions & 0 deletions doc/howto/customlog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[&lt; EON Documentation index](/doc/index.md)
# EON logging configuration

## Simple logging customization

Edit the following variables in the node configuration file to customize path and level of logging:

- **sparkz.logDir**

Path of the logging directory

- **sparkz.logInfo.logFileName**

Name of the log file.
If you are running via Docker, you can also change it by setting the environment variable: **SCNODE_LOG_FILE_NAME**

- **sparkz.logInfo.logFileLevel** and **sparkz.logInfo.logConsoleLevel**

Level of logging used for file and console appenders.
Can be one of the following: off, fatal, error, warn, info, debug, trace, all
If you are running via Docker, you can also change them by setting the environment variables: **SCNODE_LOG_FILE_LEVEL** and **SCNODE_LOG_CONSOLE_LEVEL**


## Advanced logging customization

For advanced customization you can setup EON to use a totally custom log4j file instead of the default one:

- if you are running the java process directly, add the following property to the startup command:

-Dlog4j.configurationFile=filePath

- if you are running via Docker, configure an environment variable **SCNODE_LOG4J_CUSTOM_CONFIG** with the path to the log4j file, and be sure to have the file present inside the container.

Start from [this base template](https://github.com/HorizenOfficial/Sidechains-SDK/blob/master/sdk/src/main/resources/log4j2.xml) to create your cunfiguration file.
9 changes: 9 additions & 0 deletions doc/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,17 @@

Find [here documentation](/doc/api/index.md) about how to interact with a running EON node.

# EON Native smart contracts documentation

Find [here documentation](/doc/nativesc/index.md) about EON native smart contracts

# HowTOs and tutorials

- [EON logging configuration](/doc/howto/customlog.md)

# EON Release Notes

## Version [1.3.0](/doc/release/1.3.0.md)
## Version [1.2.1](/doc/release/1.2.1.md)
## Version [1.2.0](/doc/release/1.2.0.md)
## Version [1.1.0](/doc/release/1.1.0.md)
Expand Down
140 changes: 140 additions & 0 deletions doc/nativesc/contracts/CertKeyRotation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
{
"abi": [
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint32",
"name": "keyType",
"type": "uint32"
},
{
"indexed": true,
"internalType": "uint32",
"name": "keyIndex",
"type": "uint32"
},
{
"indexed": false,
"internalType": "bytes32",
"name": "newKeyValue_32",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "bytes1",
"name": "newKeyValue_1",
"type": "bytes1"
},
{
"indexed": false,
"internalType": "uint32",
"name": "epochNumber",
"type": "uint32"
}
],
"name": "SubmitKeyRotation",
"type": "event"
},
{
"inputs": [
{
"internalType": "uint32",
"name": "key_type",
"type": "uint32"
},
{
"internalType": "uint32",
"name": "index",
"type": "uint32"
},
{
"internalType": "bytes32",
"name": "newKey_1",
"type": "bytes32"
},
{
"internalType": "bytes1",
"name": "newKey_2",
"type": "bytes1"
},
{
"internalType": "bytes32",
"name": "signKeySig_1",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "signKeySig_2",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "masterKeySig_1",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "masterKeySig_2",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "newKeySig_1",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "newKeySig_2",
"type": "bytes32"
}
],
"name": "submitKeyRotation",
"outputs": [
{
"internalType": "uint32",
"name": "",
"type": "uint32"
},
{
"internalType": "uint32",
"name": "",
"type": "uint32"
},
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
},
{
"internalType": "bytes1",
"name": "",
"type": "bytes1"
},
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "nonpayable",
"type": "function"
}
]
}
25 changes: 25 additions & 0 deletions doc/nativesc/contracts/CertKeyRotation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[&lt; EON Native Smart Contracts Documentation](/doc/nativesc/index.md)
### CertKeyRotation

This native smart contract is used to rotate the master and signers keys of the EON certifiers.

| | |
| -------- | ------- |
| Contract address: | 0x0000000000000000000044444444444444444444 |
| ABI descriptor: | [Click here](/doc/nativesc/contracts/CertKeyRotation.json) |
| Solidity interface: | [Click here](/doc/nativesc/contracts/CertKeyRotation.sol) |



**Methods available**

- submitKeyRotation

function submitKeyRotation(uint32 key_type, uint32 index, bytes32 newKey_1, bytes1 newKey_2, bytes32 signKeySig_1, bytes32 signKeySig_2, bytes32 masterKeySig_1, bytes32 masterKeySig_2, bytes32 newKeySig_1, bytes32 newKeySig_2) external returns (uint32, uint32, bytes32, bytes1, bytes32, bytes32, bytes32, bytes32);

Executes a signers or masters certificate submitter key rotation.





14 changes: 14 additions & 0 deletions doc/nativesc/contracts/CertKeyRotation.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;


// contract address: 0x0000000000000000000044444444444444444444
interface CertKeyRotation {

// Event declaration
// Up to 3 parameters can be indexed.
// Indexed parameters helps you filter the logs by the indexed parameter
event SubmitKeyRotation(uint32 indexed keyType, uint32 indexed keyIndex, bytes32 newKeyValue_32, bytes1 newKeyValue_1, uint32 epochNumber);

function submitKeyRotation(uint32 key_type, uint32 index, bytes32 newKey_1, bytes1 newKey_2, bytes32 signKeySig_1, bytes32 signKeySig_2, bytes32 masterKeySig_1, bytes32 masterKeySig_2, bytes32 newKeySig_1, bytes32 newKeySig_2) external returns (uint32, uint32, bytes32, bytes1, bytes32, bytes32, bytes32, bytes32);
}
Loading

0 comments on commit ff3d43a

Please sign in to comment.