-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #97 from HorizenOfficial/development
1.3.0 to master
- Loading branch information
Showing
36 changed files
with
1,699 additions
and
213 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,25 @@ | ||
[< 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" | ||
} | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,22 @@ | ||
[< 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" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
[< 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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
[< 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. | ||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} |
Oops, something went wrong.