From 31d565456785dda53bfa62e1781424c25d025511 Mon Sep 17 00:00:00 2001 From: Leon Prouger Date: Thu, 13 Aug 2020 13:08:57 +0300 Subject: [PATCH 01/14] save --- package.json | 1 + truffle-config.js | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/package.json b/package.json index 8bfddd1..ff537a1 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "flatten": "scripts/flatten.sh", "abi": "scripts/abi.sh", "deploy:fuse": "node_modules/.bin/truffle migrate --reset --network fuse", + "deploy:testnet": "node_modules/.bin/truffle migrate --reset --network testnet", "deploy:local": "node_modules/.bin/truffle migrate --reset --network local", "app": "node app/index.js" }, diff --git a/truffle-config.js b/truffle-config.js index 7f35e9e..bf44845 100644 --- a/truffle-config.js +++ b/truffle-config.js @@ -42,6 +42,14 @@ module.exports = { // gas: 10000000, gasPrice: 1000000000 // 1 gwei }, + testnet: { + provider: walletProvider, + network_id: 123, + host: 'localhost', + port: 8545, + gas: 30000000, + gasPrice: 1000000000 // 1 gwei + }, local: { provider: walletProvider, network_id: 999, From 8a9a730570232b07ad82de435185165327978d99 Mon Sep 17 00:00:00 2001 From: Leon Prouger Date: Sat, 15 Aug 2020 12:03:25 +0300 Subject: [PATCH 02/14] Testnet changes --- app/Dockerfile | 6 +- config/spec.json | 124 ++++++++++++++++++++------------ contracts/ConsensusUtils.sol | 2 +- migrations/2_deploy_contract.js | 7 ++ scripts/parity_wrapper.sh | 2 +- scripts/quickstart.sh | 10 +-- scripts/setup.sh | 6 +- truffle-config.js | 2 +- 8 files changed, 99 insertions(+), 60 deletions(-) diff --git a/app/Dockerfile b/app/Dockerfile index 11c2b9b..ca1ba7a 100644 --- a/app/Dockerfile +++ b/app/Dockerfile @@ -2,9 +2,9 @@ FROM node:10 ENV POLLING_INTERVAL=5000 ENV LOG_LEVEL=debug -ENV RPC=https://rpc.fuse.io -ENV CONSENSUS_ADDRESS=0x3014ca10b91cb3D0AD85fEf7A3Cb95BCAc9c0f79 -ENV BLOCK_REWARD_ADDRESS=0x63D4efeD2e3dA070247bea3073BCaB896dFF6C9B +ENV RPC=https://testrpc.fuse.io +ENV CONSENSUS_ADDRESS=0xF5C4782d61611e12CD9651355841716ea1801d5c +ENV BLOCK_REWARD_ADDRESS=0x3b8C048DdEC04709125aF939360BDD619Ec6e9E3 COPY ./ ./ RUN npm install --only=prod diff --git a/config/spec.json b/config/spec.json index c15cd56..a6a2297 100644 --- a/config/spec.json +++ b/config/spec.json @@ -1,30 +1,30 @@ { - "name": "FuseNetwork", - "engine": { - "authorityRound": { - "params": { - "stepDuration": "5", - "blockReward": "0x0", - "blockRewardContractAddress": "0x63D4efeD2e3dA070247bea3073BCaB896dFF6C9B", - "blockRewardContractTransition": 100, - "validators": { - "multi": { - "0": { - "list": ["0xd9176e84898a0054680aec3f7c056b200c3d96c3"] - }, + "name": "FuseTestNetwork", + "engine": { + "authorityRound": { + "params": { + "stepDuration": "5", + "blockReward": "0x0", + "blockRewardContractAddress": "0x3b8C048DdEC04709125aF939360BDD619Ec6e9E3", + "blockRewardContractTransition": 100, + "validators": { + "multi": { + "0": { + "list": [ "0xbb79a903f699f2e54c970ac7ab30403a56f67804" ] + }, "100": { - "safeContract": "0x3014ca10b91cb3D0AD85fEf7A3Cb95BCAc9c0f79" + "safeContract": "0xF5C4782d61611e12CD9651355841716ea1801d5c" } - } - } - } - } - }, - "params": { + } + } + } + } + }, + "params": { "gasLimitBoundDivisor": "0x400", "maximumExtraDataSize": "0x20", "minGasLimit": "0x1388", - "networkID" : "0x07a", + "networkID" : "0x07b", "eip155Transition": 0, "validateChainIdTransition": 0, "eip140Transition": 0, @@ -36,31 +36,63 @@ "eip161abcTransition": "0x0", "eip161dTransition": "0x0", "eip98Transition": "0x7fffffffffffff", - "eip145Transition": "0x38ada7", - "eip1014Transition": "0x38ada7", - "eip1052Transition": "0x38ada7", + "eip145Transition": "0x6bf64", + "eip1014Transition": "0x6bf64", + "eip1052Transition": "0x6bf64", "maxCodeSize": 24576, "maxCodeSizeTransition": "0x0" - }, - "genesis": { - "seal": { - "authorityRound": { - "step": "0x0", - "signature": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - } - }, - "difficulty": "0x20000", - "gasLimit": "0x989680" - }, - "accounts": { - "0x0000000000000000000000000000000000000001": { "balance": "1", "builtin": { "name": "ecrecover", "pricing": { "linear": { "base": 3000, "word": 0 } } } }, - "0x0000000000000000000000000000000000000002": { "balance": "1", "builtin": { "name": "sha256", "pricing": { "linear": { "base": 60, "word": 12 } } } }, - "0x0000000000000000000000000000000000000003": { "balance": "1", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } }, - "0x0000000000000000000000000000000000000004": { "balance": "1", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } }, - "0x0000000000000000000000000000000000000005": { "builtin": { "name": "modexp", "activate_at": 0, "pricing": { "modexp": { "divisor": 20 } } } }, - "0x0000000000000000000000000000000000000006": { "builtin": { "name": "alt_bn128_add", "activate_at": 0, "pricing": { "linear": { "base": 500, "word": 0 } } } }, - "0x0000000000000000000000000000000000000007": { "builtin": { "name": "alt_bn128_mul", "activate_at": 0, "pricing": { "linear": { "base": 40000, "word": 0 } } } }, - "0x0000000000000000000000000000000000000008": { "builtin": { "name": "alt_bn128_pairing", "activate_at": 0, "pricing": { "alt_bn128_pairing": { "base": 100000, "pair": 80000 } } } }, - "0xd9176e84898a0054680aec3f7c056b200c3d96c3": { "balance": "300000000000000000000000000" } - } + }, + "genesis": { + "seal": { + "authorityRound": { + "step": "0x0", + "signature": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + } + }, + "difficulty": "0x20000", + "gasLimit": "0x5F5E100" + }, + "accounts": { + "0x0000000000000000000000000000000000000001": { + "balance": "1", + "builtin": { "name": "ecrecover", "pricing": { "linear": { "base": 3000, "word": 0 } } } + }, + "0x0000000000000000000000000000000000000002": { + "balance": "1", + "builtin": { "name": "sha256", "pricing": { "linear": { "base": 60, "word": 12 } } } + }, + "0x0000000000000000000000000000000000000003": { + "balance": "1", + "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } + }, + "0x0000000000000000000000000000000000000004": { + "balance": "1", + "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } + }, + "0x0000000000000000000000000000000000000005": { + "builtin": { "name": "modexp", "activate_at": 0, "pricing": { "modexp": { "divisor": 20 } } } + }, + "0x0000000000000000000000000000000000000006": { + "builtin": { + "name": "alt_bn128_add", + "activate_at": 0, + "pricing": { "linear": { "base": 500, "word": 0 } } + } + }, + "0x0000000000000000000000000000000000000007": { + "builtin": { + "name": "alt_bn128_mul", + "activate_at": 0, + "pricing": { "linear": { "base": 40000, "word": 0 } } + } + }, + "0x0000000000000000000000000000000000000008": { + "builtin": { + "name": "alt_bn128_pairing", + "activate_at": 0, + "pricing": { "alt_bn128_pairing": { "base": 100000, "pair": 80000 } } + } + }, + "0xbb79a903f699f2e54c970ac7ab30403a56f67804": { "balance": "300000000000000000000000000" } + } } diff --git a/contracts/ConsensusUtils.sol b/contracts/ConsensusUtils.sol index 90f73be..56c6baf 100644 --- a/contracts/ConsensusUtils.sol +++ b/contracts/ConsensusUtils.sol @@ -16,7 +16,7 @@ contract ConsensusUtils is EternalStorage, ValidatorSet { uint256 public constant DECIMALS = 10 ** 18; uint256 public constant MAX_VALIDATORS = 100; uint256 public constant MIN_STAKE = 1e23; // 100,000 - uint256 public constant CYCLE_DURATION_BLOCKS = 120960; // 7 days [7*24*60*60/5] + uint256 public constant CYCLE_DURATION_BLOCKS = 720; // 1 hour [60*60/5] uint256 public constant SNAPSHOTS_PER_CYCLE = 10; // snapshot each 1008 minutes [120960/10/60*5] uint256 public constant DEFAULT_VALIDATOR_FEE = 1e17; // 10% diff --git a/migrations/2_deploy_contract.js b/migrations/2_deploy_contract.js index 7842e40..4be9406 100644 --- a/migrations/2_deploy_contract.js +++ b/migrations/2_deploy_contract.js @@ -32,6 +32,13 @@ module.exports = function(deployer, network, accounts) { let voting, votingImpl deployer.then(async function() { + /* + In case the consensus implementation fails to deploy with truffle, + use other tool like remix and put the address here in the following way: + consensusImpl = { + address: '0x789b5f79EAd29C4dc39b22C12602D59f6c613e4C' + } + */ // Consensus consensusImpl = await Consensus.new() debug(`consensusImpl: ${consensusImpl.address}`) diff --git a/scripts/parity_wrapper.sh b/scripts/parity_wrapper.sh index 47241de..a02b4ab 100755 --- a/scripts/parity_wrapper.sh +++ b/scripts/parity_wrapper.sh @@ -125,7 +125,7 @@ cors = ["all"] port = 8545 interface = "all" hosts = ["all"] -apis = ["web3", "eth", "net", "parity", "traces", "rpc", "secretstore"] +apis = ["web3", "eth", "net", "parity", "parity_set", "traces", "rpc", "secretstore"] [websockets] disable = true diff --git a/scripts/quickstart.sh b/scripts/quickstart.sh index dccce58..4f0e29f 100755 --- a/scripts/quickstart.sh +++ b/scripts/quickstart.sh @@ -5,15 +5,15 @@ set -e OLDIFS=$IFS ENV_FILE=".env" -DOCKER_IMAGE_PARITY="fusenet/node" +DOCKER_IMAGE_PARITY="fusenet/testnet-node" DOCKER_CONTAINER_PARITY="fusenet" -DOCKER_IMAGE_APP="fusenet/validator-app" +DOCKER_IMAGE_APP="fusenet/testnet-validator-app" DOCKER_CONTAINER_APP="fuseapp" -DOCKER_IMAGE_NETSTAT="fusenet/netstat" +DOCKER_IMAGE_NETSTAT="fusenet/testnet-netstat" DOCKER_CONTAINER_NETSTAT="fusenetstat" -DOCKER_COMPOSE_ORACLE="https://raw.githubusercontent.com/fuseio/fuse-bridge/master/native-to-erc20/oracle/docker-compose.keystore.yml" +DOCKER_COMPOSE_ORACLE="https://raw.githubusercontent.com/fuseio/fuse-bridge/testnet-v2/native-to-erc20/oracle/docker-compose.keystore.yml" DOCKER_IMAGE_ORACLE_VERSION="2.0.5" -DOCKER_IMAGE_ORACLE="fusenet/native-to-erc20-oracle:$DOCKER_IMAGE_ORACLE_VERSION" +DOCKER_IMAGE_ORACLE="fusenet/testnet-native-to-erc20-oracle:$DOCKER_IMAGE_ORACLE_VERSION" DOCKER_CONTAINER_ORACLE="fuseoracle" DOCKER_LOG_OPTS="--log-opt max-size=10m --log-opt max-file=100 --log-opt compress=true" BASE_DIR=$(pwd)/fusenet diff --git a/scripts/setup.sh b/scripts/setup.sh index 832ac22..c44072d 100644 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -42,13 +42,13 @@ function docker-compose { function config { echo -e "\nDowloading config files and scripts..." - wget -O quickstart.sh "https://raw.githubusercontent.com/fuseio/fuse-network/master/scripts/quickstart.sh" + wget -O quickstart.sh "https://raw.githubusercontent.com/fuseio/fuse-network/testnet-v2/scripts/quickstart.sh" chmod +x quickstart.sh - wget -O .env "https://raw.githubusercontent.com/fuseio/fuse-network/master/scripts/examples/.env.validator.example" + wget -O .env "https://raw.githubusercontent.com/fuseio/fuse-network/testnet-v2/scripts/examples/.env.validator.example" - wget -O clean-docker.sh "https://raw.githubusercontent.com/fuseio/fuse-network/master/scripts/clean-docker.sh" + wget -O clean-docker.sh "https://raw.githubusercontent.com/fuseio/fuse-network/testnet-v2/scripts/clean-docker.sh" chmod +x clean-docker.sh } diff --git a/truffle-config.js b/truffle-config.js index bf44845..8a7c59e 100644 --- a/truffle-config.js +++ b/truffle-config.js @@ -47,7 +47,7 @@ module.exports = { network_id: 123, host: 'localhost', port: 8545, - gas: 30000000, + // gas: 10000000, gasPrice: 1000000000 // 1 gwei }, local: { From a0b8c9ada2ca9d8612eb42c0d9ef5b2e24badc51 Mon Sep 17 00:00:00 2001 From: Leon Prouger Date: Sat, 15 Aug 2020 12:55:23 +0300 Subject: [PATCH 03/14] adding bootnode --- config/bootnodes.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/config/bootnodes.txt b/config/bootnodes.txt index 27544eb..bb2500a 100644 --- a/config/bootnodes.txt +++ b/config/bootnodes.txt @@ -1,3 +1 @@ -enode://557d1daafb34627822b7934e864beded775534e28818365b03f2dd75490ab7deb2e3166bbf821e878046f5209cbaab46e5ce99d9f8313e8cf319a0a1b2b257ec@18.184.21.11:30303 -enode://19fb95a31a00479209511e61fb7f46316069a6a282a57155071c4bd6774c03be211d3d2c5a761756563cbeae2ef023d8800c53d9a6e65b97a0665bbb3461b89c@18.184.223.179:30303 -enode://7bc2e851cad345437984d6550b1b98d7029b694f2793e2c592637a793b243760060a5a3e00d6212b75f1c534a97b41d532221071242d01116e9ff3c8dcc95672@95.217.1.4:30303 +enode://05fc4b227f5e40e8078f57bada50ec9af3b558c11d485d9ad7181e155fddc3534350d34cde0cffe20ca5a26e95df7e7fb80c7e26b8e51a73421ee6bc854e9f04@18.197.97.224:30303 From 45383d399399f5d675d504d277086299cdfb3131 Mon Sep 17 00:00:00 2001 From: Leon Prouger Date: Sun, 16 Aug 2020 14:02:52 +0300 Subject: [PATCH 04/14] setup changes --- README.md | 50 ++++++++++++++++++++++--------------------- config/bootnodes.txt | 2 +- scripts/quickstart.sh | 12 +++++------ 3 files changed, 33 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index d9e9fd4..8a6f4b8 100644 --- a/README.md +++ b/README.md @@ -1,27 +1,29 @@ # Fuse Network -- [General](#general) - - [Clone Repository](#clone-repository) - - [Install Dependencies](#install-dependencies) - - [Run Unit Tests](#run-unit-tests) -- [Contracts](#contracts) - - [Documentation](https://github.com/fuseio/fuse-network/blob/master/CONTRACTS.md) - - [Compile](#compile) - - [Flatten](#flatten) - - [Deploy](#deploy) -- [Run Local Node](#run-local-node) - - [Pre-Requisites](#pre-requisites) - - [Hardware](#hardware) - - [Quickstart](#using-quickstart) - - [Using Docker](#using-docker) - - [Usage](#usage) - - [Examples](#examples) - - [Bootnode](#bootnode) - - [Node](#node) - - [Validator](#validator) - - [Create New Account](#create-new-account) - - [Explorer node](#explorer-node) -- [Validators App](https://github.com/fuseio/fuse-network/tree/master/app/README.md) +- [Fuse Network](#fuse-network) + - [General](#general) + - [Clone Repository](#clone-repository) + - [Install Dependencies](#install-dependencies) + - [Run Unit Tests](#run-unit-tests) + - [Contracts](#contracts) + - [Compile](#compile) + - [ABIs](#abis) + - [Flatten](#flatten) + - [Deploy](#deploy) + - [Run Local Node](#run-local-node) + - [Pre-Requisites](#pre-requisites) + - [Hardware](#hardware) + - [Bootnode, Node or Explorer Node](#bootnode-node-or-explorer-node) + - [Validator](#validator) + - [Using Quickstart](#using-quickstart) + - [Using Docker](#using-docker) + - [Usage](#usage) + - [Examples](#examples) + - [Bootnode](#bootnode) + - [Node](#node) + - [Validator](#validator-1) + - [Create New Account](#create-new-account) + - [Explorer node](#explorer-node) ## General ### Clone Repository @@ -132,9 +134,9 @@ The script will make sure you have everything that is necessary, create a new ac The script can be called multiple times without problems, so it checks what is already there and will at least update all service processes. ```sh -$ wget -O quickstart.sh https://raw.githubusercontent.com/fuseio/fuse-network/master/scripts/quickstart.sh +$ wget -O quickstart.sh https://raw.githubusercontent.com/fuseio/fuse-network/testnet-v2/scripts/quickstart.sh $ chmod 777 quickstart.sh -$ wget -O .env https://raw.githubusercontent.com/fuseio/fuse-network/master/scripts/examples/.env..example +$ wget -O .env https://raw.githubusercontent.com/fuseio/fuse-network/testnet-v2/scripts/examples/.env..example $ ./quickstart.sh ``` diff --git a/config/bootnodes.txt b/config/bootnodes.txt index bb2500a..8849bb9 100644 --- a/config/bootnodes.txt +++ b/config/bootnodes.txt @@ -1 +1 @@ -enode://05fc4b227f5e40e8078f57bada50ec9af3b558c11d485d9ad7181e155fddc3534350d34cde0cffe20ca5a26e95df7e7fb80c7e26b8e51a73421ee6bc854e9f04@18.197.97.224:30303 +enode://4b0591a5050caca6c2ae4ec9f7f0bcc1297862793f84268bbac15e91dab089a73531ba6c84b702630d32846a8064fe3d445c4167d5a29730066203f7c6a33438@18.156.82.209:30303 diff --git a/scripts/quickstart.sh b/scripts/quickstart.sh index 4f0e29f..4437e65 100755 --- a/scripts/quickstart.sh +++ b/scripts/quickstart.sh @@ -13,7 +13,7 @@ DOCKER_IMAGE_NETSTAT="fusenet/testnet-netstat" DOCKER_CONTAINER_NETSTAT="fusenetstat" DOCKER_COMPOSE_ORACLE="https://raw.githubusercontent.com/fuseio/fuse-bridge/testnet-v2/native-to-erc20/oracle/docker-compose.keystore.yml" DOCKER_IMAGE_ORACLE_VERSION="2.0.5" -DOCKER_IMAGE_ORACLE="fusenet/testnet-native-to-erc20-oracle:$DOCKER_IMAGE_ORACLE_VERSION" +DOCKER_IMAGE_ORACLE="fusenet/native-to-erc20-oracle:$DOCKER_IMAGE_ORACLE_VERSION" DOCKER_CONTAINER_ORACLE="fuseoracle" DOCKER_LOG_OPTS="--log-opt max-size=10m --log-opt max-file=100 --log-opt compress=true" BASE_DIR=$(pwd)/fusenet @@ -266,7 +266,7 @@ function setup { if [[ $ROLE == validator ]] ; then echo -e "\nPull additional docker images..." $PERMISSION_PREFIX docker pull $DOCKER_IMAGE_APP - $PERMISSION_PREFIX docker pull $DOCKER_IMAGE_ORACLE + # $PERMISSION_PREFIX docker pull $DOCKER_IMAGE_ORACLE echo -e "\nDownload oracle docker-compose.yml" wget -O docker-compose.yml $DOCKER_COMPOSE_ORACLE @@ -471,10 +471,10 @@ function run { $DOCKER_IMAGE_APP ## Start oracle container with all necessary arguments. - $PERMISSION_PREFIX docker-compose up \ - --build \ - -d - ;; + # $PERMISSION_PREFIX docker-compose up \ + # --build \ + # -d + # ;; "explorer") INSTANCE_NAME=$NODE_KEY From 28d06621cd2d948a14eb664aaf8946a34264b690 Mon Sep 17 00:00:00 2001 From: Leon Prouger Date: Sun, 16 Aug 2020 14:08:11 +0300 Subject: [PATCH 05/14] fix typo --- scripts/quickstart.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/quickstart.sh b/scripts/quickstart.sh index 4437e65..4bba640 100755 --- a/scripts/quickstart.sh +++ b/scripts/quickstart.sh @@ -474,7 +474,7 @@ function run { # $PERMISSION_PREFIX docker-compose up \ # --build \ # -d - # ;; + ;; "explorer") INSTANCE_NAME=$NODE_KEY From 7a24dc8bd9e41e6db799136f8ad4b0d4277ec37a Mon Sep 17 00:00:00 2001 From: Leon Prouger Date: Sun, 16 Aug 2020 14:12:50 +0300 Subject: [PATCH 06/14] small error fix --- scripts/quickstart.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/quickstart.sh b/scripts/quickstart.sh index 4bba640..6893a25 100755 --- a/scripts/quickstart.sh +++ b/scripts/quickstart.sh @@ -11,7 +11,7 @@ DOCKER_IMAGE_APP="fusenet/testnet-validator-app" DOCKER_CONTAINER_APP="fuseapp" DOCKER_IMAGE_NETSTAT="fusenet/testnet-netstat" DOCKER_CONTAINER_NETSTAT="fusenetstat" -DOCKER_COMPOSE_ORACLE="https://raw.githubusercontent.com/fuseio/fuse-bridge/testnet-v2/native-to-erc20/oracle/docker-compose.keystore.yml" +DOCKER_COMPOSE_ORACLE="https://raw.githubusercontent.com/fuseio/fuse-bridge/master/native-to-erc20/oracle/docker-compose.keystore.yml" DOCKER_IMAGE_ORACLE_VERSION="2.0.5" DOCKER_IMAGE_ORACLE="fusenet/native-to-erc20-oracle:$DOCKER_IMAGE_ORACLE_VERSION" DOCKER_CONTAINER_ORACLE="fuseoracle" @@ -471,9 +471,9 @@ function run { $DOCKER_IMAGE_APP ## Start oracle container with all necessary arguments. - # $PERMISSION_PREFIX docker-compose up \ - # --build \ - # -d + $PERMISSION_PREFIX docker-compose up \ + --build \ + -d ;; "explorer") From 8bbde9188e807944bf28eb0bc8165319eacf3786 Mon Sep 17 00:00:00 2001 From: Leon Prouger Date: Sun, 16 Aug 2020 15:14:43 +0300 Subject: [PATCH 07/14] updating network name --- config/spec.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/spec.json b/config/spec.json index a6a2297..4af678c 100644 --- a/config/spec.json +++ b/config/spec.json @@ -1,5 +1,5 @@ { - "name": "FuseTestNetwork", + "name": "FuseNetwork", "engine": { "authorityRound": { "params": { From 45ce62dba359a59a0d5a467b2a5d4f72eb8a266b Mon Sep 17 00:00:00 2001 From: Leon Prouger Date: Mon, 17 Aug 2020 12:26:15 +0300 Subject: [PATCH 08/14] quick fix --- scripts/quickstart.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/quickstart.sh b/scripts/quickstart.sh index 6893a25..72ec7d3 100755 --- a/scripts/quickstart.sh +++ b/scripts/quickstart.sh @@ -471,9 +471,9 @@ function run { $DOCKER_IMAGE_APP ## Start oracle container with all necessary arguments. - $PERMISSION_PREFIX docker-compose up \ - --build \ - -d + # $PERMISSION_PREFIX docker-compose up \ + # --build \ + # -d ;; "explorer") From be56c2f74a096e342d029b8790a19eb608afeb9f Mon Sep 17 00:00:00 2001 From: Leon Prouger Date: Mon, 17 Aug 2020 12:27:38 +0300 Subject: [PATCH 09/14] fix --- scripts/quickstart.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/quickstart.sh b/scripts/quickstart.sh index 72ec7d3..97dfd08 100755 --- a/scripts/quickstart.sh +++ b/scripts/quickstart.sh @@ -469,12 +469,12 @@ function run { --restart=always \ --memory="250m" \ $DOCKER_IMAGE_APP - + ;; ## Start oracle container with all necessary arguments. # $PERMISSION_PREFIX docker-compose up \ # --build \ # -d - ;; + # ;; "explorer") INSTANCE_NAME=$NODE_KEY From 02acd07decc10050b1554d72f0aa8e424912bf11 Mon Sep 17 00:00:00 2001 From: Leon Prouger Date: Tue, 18 Aug 2020 15:43:12 +0300 Subject: [PATCH 10/14] small changes --- config/bootnodes.txt | 2 +- migrations/2_deploy_contract.js | 5 +++-- truffle-config.js | 2 -- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/config/bootnodes.txt b/config/bootnodes.txt index 8849bb9..36145f7 100644 --- a/config/bootnodes.txt +++ b/config/bootnodes.txt @@ -1 +1 @@ -enode://4b0591a5050caca6c2ae4ec9f7f0bcc1297862793f84268bbac15e91dab089a73531ba6c84b702630d32846a8064fe3d445c4167d5a29730066203f7c6a33438@18.156.82.209:30303 +enode://abeec9512cffcb9e6097991ed76b87df95cf21ff95c9e5e732fbecafd6dd7c03c2d65fc3a819dce28d6743d009151a3d85d7e8833e24b23d255fbae2bf3bdb57@172.17.0.2:30300 diff --git a/migrations/2_deploy_contract.js b/migrations/2_deploy_contract.js index 4be9406..14ceb58 100644 --- a/migrations/2_deploy_contract.js +++ b/migrations/2_deploy_contract.js @@ -33,12 +33,13 @@ module.exports = function(deployer, network, accounts) { deployer.then(async function() { /* - In case the consensus implementation fails to deploy with truffle, - use other tool like remix and put the address here in the following way: + // In case the consensus implementation fails to deploy with truffle, + // use other tool like remix and put the address here in the following way: consensusImpl = { address: '0x789b5f79EAd29C4dc39b22C12602D59f6c613e4C' } */ + // Consensus consensusImpl = await Consensus.new() debug(`consensusImpl: ${consensusImpl.address}`) diff --git a/truffle-config.js b/truffle-config.js index 8a7c59e..113a09e 100644 --- a/truffle-config.js +++ b/truffle-config.js @@ -45,8 +45,6 @@ module.exports = { testnet: { provider: walletProvider, network_id: 123, - host: 'localhost', - port: 8545, // gas: 10000000, gasPrice: 1000000000 // 1 gwei }, From 5ce6d17739d71b5c176ae10110b7500eb34e83d4 Mon Sep 17 00:00:00 2001 From: Leon Prouger Date: Tue, 18 Aug 2020 16:37:22 +0300 Subject: [PATCH 11/14] change bootnode --- config/bootnodes.txt | 2 +- scripts/examples/.env.bootnode.example | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/bootnodes.txt b/config/bootnodes.txt index 36145f7..6f40735 100644 --- a/config/bootnodes.txt +++ b/config/bootnodes.txt @@ -1 +1 @@ -enode://abeec9512cffcb9e6097991ed76b87df95cf21ff95c9e5e732fbecafd6dd7c03c2d65fc3a819dce28d6743d009151a3d85d7e8833e24b23d255fbae2bf3bdb57@172.17.0.2:30300 +enode://abeec9512cffcb9e6097991ed76b87df95cf21ff95c9e5e732fbecafd6dd7c03c2d65fc3a819dce28d6743d009151a3d85d7e8833e24b23d255fbae2bf3bdb57@18.156.82.209:30300 diff --git a/scripts/examples/.env.bootnode.example b/scripts/examples/.env.bootnode.example index eb08c92..ba2f104 100644 --- a/scripts/examples/.env.bootnode.example +++ b/scripts/examples/.env.bootnode.example @@ -1,7 +1,7 @@ # general ROLE=bootnode NODE_KEY= -BOOTNODES=enode://557d1daafb34627822b7934e864beded775534e28818365b03f2dd75490ab7deb2e3166bbf821e878046f5209cbaab46e5ce99d9f8313e8cf319a0a1b2b257ec@18.184.21.11:30303,enode://19fb95a31a00479209511e61fb7f46316069a6a282a57155071c4bd6774c03be211d3d2c5a761756563cbeae2ef023d8800c53d9a6e65b97a0665bbb3461b89c@18.184.223.179:30303,enode://7bc2e851cad345437984d6550b1b98d7029b694f2793e2c592637a793b243760060a5a3e00d6212b75f1c534a97b41d532221071242d01116e9ff3c8dcc95672@95.217.1.4:30303 +BOOTNODES=enode://abeec9512cffcb9e6097991ed76b87df95cf21ff95c9e5e732fbecafd6dd7c03c2d65fc3a819dce28d6743d009151a3d85d7e8833e24b23d255fbae2bf3bdb57@172.17.0.2:30300 # in case `sudo` is needed PERMISSION_PREFIX="" From 682d80411e1d63899fe902d4ccae8f4a2e4bb9f3 Mon Sep 17 00:00:00 2001 From: Leon Prouger Date: Wed, 19 Aug 2020 16:44:58 +0300 Subject: [PATCH 12/14] save bootnode --- config/bootnodes.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/bootnodes.txt b/config/bootnodes.txt index 6f40735..232dc42 100644 --- a/config/bootnodes.txt +++ b/config/bootnodes.txt @@ -1 +1,2 @@ -enode://abeec9512cffcb9e6097991ed76b87df95cf21ff95c9e5e732fbecafd6dd7c03c2d65fc3a819dce28d6743d009151a3d85d7e8833e24b23d255fbae2bf3bdb57@18.156.82.209:30300 +enode://abeec9512cffcb9e6097991ed76b87df95cf21ff95c9e5e732fbecafd6dd7c03c2d65fc3a819dce28d6743d009151a3d85d7e8833e24b23d255fbae2bf3bdb57@18.156.82.209:30303 +enode://35ace80df7579130470aadceaae789f6397d4b1c3eebd60071a59a1172afaae1c644e51590b4174d963aac0f9925354161988558b17d3e14d06c5b6bf8ad4390@18.197.97.224:30303 \ No newline at end of file From 3e1d539633f493422e297d0405244735f592c5ea Mon Sep 17 00:00:00 2001 From: Leon Prouger Date: Tue, 29 Sep 2020 09:48:14 +0300 Subject: [PATCH 13/14] moving to consensus --- config/spec.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/config/spec.json b/config/spec.json index 4af678c..7cda3b2 100644 --- a/config/spec.json +++ b/config/spec.json @@ -6,7 +6,7 @@ "stepDuration": "5", "blockReward": "0x0", "blockRewardContractAddress": "0x3b8C048DdEC04709125aF939360BDD619Ec6e9E3", - "blockRewardContractTransition": 100, + "blockRewardContractTransition": 635638, "validators": { "multi": { "0": { @@ -14,6 +14,12 @@ }, "100": { "safeContract": "0xF5C4782d61611e12CD9651355841716ea1801d5c" + }, + "435638": { + "list": [ "0xbb79a903f699f2e54c970ac7ab30403a56f67804" ] + }, + "473200": { + "safeContract": "0xF5C4782d61611e12CD9651355841716ea1801d5c" } } } From ba2e9beb469d4784f7c3609c8e6ab23eefa6fe64 Mon Sep 17 00:00:00 2001 From: Leon Prouger Date: Mon, 5 Oct 2020 12:30:13 +0300 Subject: [PATCH 14/14] returning to original spec.json --- config/reserved_peers.txt | 4 ++++ config/spec.json | 8 +------- 2 files changed, 5 insertions(+), 7 deletions(-) create mode 100644 config/reserved_peers.txt diff --git a/config/reserved_peers.txt b/config/reserved_peers.txt new file mode 100644 index 0000000..367d2e6 --- /dev/null +++ b/config/reserved_peers.txt @@ -0,0 +1,4 @@ +enode://124f58ce10979932f559550f109fdc0360eab224a379297cc3d7ed5689b0a65163704c451138fe847fd06208b1056c75ef9f07ebf24fdb2138cc89031d5a4a50@172.17.0.2:30300 +enode://abeec9512cffcb9e6097991ed76b87df95cf21ff95c9e5e732fbecafd6dd7c03c2d65fc3a819dce28d6743d009151a3d85d7e8833e24b23d255fbae2bf3bdb57@18.156.82.209:30303 +enode://35ace80df7579130470aadceaae789f6397d4b1c3eebd60071a59a1172afaae1c644e51590b4174d963aac0f9925354161988558b17d3e14d06c5b6bf8ad4390@18.197.97.224:30303 +enode://f4513ebef64b1314bf43ceadb6bbe3d99c895cc8f560ccc1136118a8c705d49102dd9f73349585c437ae019cb357ded7103b71d96a7609c4e47bf5a774ec9f9e@172.17.0.2:30300 \ No newline at end of file diff --git a/config/spec.json b/config/spec.json index 7cda3b2..4af678c 100644 --- a/config/spec.json +++ b/config/spec.json @@ -6,7 +6,7 @@ "stepDuration": "5", "blockReward": "0x0", "blockRewardContractAddress": "0x3b8C048DdEC04709125aF939360BDD619Ec6e9E3", - "blockRewardContractTransition": 635638, + "blockRewardContractTransition": 100, "validators": { "multi": { "0": { @@ -14,12 +14,6 @@ }, "100": { "safeContract": "0xF5C4782d61611e12CD9651355841716ea1801d5c" - }, - "435638": { - "list": [ "0xbb79a903f699f2e54c970ac7ab30403a56f67804" ] - }, - "473200": { - "safeContract": "0xF5C4782d61611e12CD9651355841716ea1801d5c" } } }