diff --git a/README.md b/README.md index 70c6898..716381c 100644 --- a/README.md +++ b/README.md @@ -93,7 +93,8 @@ Option | Description `--elasticsearch` | Start up Ocean with ElasticSearch as DB engine for Aquarius instead of MongoDB. `--local-ganache-node` | Runs a local `ganache` node. `--local-spree-node` | Runs a node of the local `spree` network. This is the default. -`--local-nile-node` | Runs a node of the `nile` network and connects the node to the `nile` network. +`--local-duero-node` | Runs a local parity node and connects the node to the `duero` network. +`--local-nile-node` | Runs a local parity node and connects the node to the `nile` network. `--local-kovan-node` | Runs a light node of the `kovan` network and connects the node to the `kovan` network. `--reuse-ganache-database` | Configures a running `ganache` node to use a persistent database. `--acl-contract` | Configures secret-store `acl_contract` option to enable secret-store authorization. @@ -149,6 +150,7 @@ Node | Description ----------|------------- `ganache` | Runs a local [ganache-cli](https://github.com/trufflesuite/ganache-cli) node that is not persistent by default. The contracts from the desired `keeper-contracts` version will be deployed upon launch of this node. `spree` | This is the default. Runs a local node of the Spree Network. See [Spree Network](#spree-network) for details. The contracts from the desired `keeper-contracts` version will be deployed upon launch of this node. +`duero` | Runs a local node of the Duero Network and connects to the [Duero Testnet](https://docs.oceanprotocol.com/concepts/testnets/#the-duero-testnet). `nile` | Runs a local node of the Nile Network and connects to the [Nile Testnet](https://docs.oceanprotocol.com/concepts/testnets/#nile-testnet). `kovan` | Runs a local node of the Kovan Network and connects to the [Kovan Testnet](https://docs.oceanprotocol.com/concepts/testnets/#kovan-testnet). diff --git a/compose-files/nodes/duero_node.yml b/compose-files/nodes/duero_node.yml new file mode 100644 index 0000000..b525054 --- /dev/null +++ b/compose-files/nodes/duero_node.yml @@ -0,0 +1,25 @@ +version: '3' +services: + keeper-node: + image: ${PARITY_IMAGE} + command: + --config /home/parity/parity/config/config.toml + --db-path /home/parity/chains + --keys-path /home/parity/.local/share/io.parity.ethereum/keys + --base-path /home/parity/base + --ws-interface all + --jsonrpc-cors all + --jsonrpc-interface all + --jsonrpc-hosts all + --jsonrpc-apis all + volumes: + - ../networks/duero/config:/home/parity/parity/config + - keeper-node:/home/parity/.local/share/io.parity.ethereum/ + - ../networks/duero/keys:/home/parity/.local/share/io.parity.ethereum/keys + - ../networks/duero/authorities/validator0.json:/home/parity/.local/share/io.parity.ethereum/keys/duero/validator.json + - ../networks/duero/authorities/validator0.pwd:/home/parity/parity/validator.pwd + ports: + - 8545:8545 + networks: + backend: + ipv4_address: 172.15.0.12 diff --git a/networks/duero/authorities/validator0.json b/networks/duero/authorities/validator0.json new file mode 100644 index 0000000..15d6d06 --- /dev/null +++ b/networks/duero/authorities/validator0.json @@ -0,0 +1,22 @@ +{ + "id": "0902d04b-f26e-5c1f-e3ae-78d2c1cb16e7", + "version": 3, + "crypto": { + "cipher": "aes-128-ctr", + "cipherparams": { + "iv": "6a829fe7bc656d85f6c2e9fd21784952" + }, + "ciphertext": "1bfec0b054a648af8fdd0e85662206c65a4af0ed15fede4ad41ca9ab7b504ce2", + "kdf": "pbkdf2", + "kdfparams": { + "c": 10240, + "dklen": 32, + "prf": "hmac-sha256", + "salt": "95f96b5ee22dd537e06076eb8d7078eb7275d29af935782fe476696b11be50e5" + }, + "mac": "4af2215c3cd9447a5b0512d7d1c3ea5a4435981e1c8f48bf71d7a49c0e5b4986" + }, + "address": "00bd138abd70e2f00903268f3db08f2d25677c9e", + "name": "Validator0", + "meta": "{}" +} diff --git a/networks/duero/authorities/validator0.pwd b/networks/duero/authorities/validator0.pwd new file mode 100644 index 0000000..ce118da --- /dev/null +++ b/networks/duero/authorities/validator0.pwd @@ -0,0 +1 @@ +node0 diff --git a/networks/duero/config/chain.json b/networks/duero/config/chain.json new file mode 100644 index 0000000..96c9a8e --- /dev/null +++ b/networks/duero/config/chain.json @@ -0,0 +1,235 @@ +{ + "name": "duero", + "engine": { + "authorityRound": { + "params": { + "stepDuration": "5", + "validators": { + "multi": { + "0": { + "list": [ + "0xdcb7ff1b9fd738a47eaf9b2e0b3d817b1da92781", + "0x3e10ae74970da70b706e768eead37b712a698941", + "0x0179e19cd246bb7bdec2c998ae0d8307a7eddbc5", + "0x37694236ae067fc3e92b981d2f59709e5f11cd82", + "0xebb4d380b6ec9447d55f07cff86d53d716e2b0f6", + "0xe922ab6b24051db3ce048ab8dbb8a35d2e7e084b" + ] + }, + "30715": { + "contract": "0xd83f5948EaD5DF59fb8E9C22E9A390d043137c99" + }, + "40900": { + "contract": "0xdaba5eBAF2915D46F318899ae06E102F3aF04928" + }, + "40960": { + "safeContract": "0xdaba5eBAF2915D46F318899ae06E102F3aF04928" + }, + "42335": { + "contract": "0x96A00f732B5ef9b704dE31b8C6a35c667e529dCf" + }, + "42415": { + "safeContract": "0xfbbd26Cc1fA72035Ff376B2AB8b8815a2E66ebc7" + }, + "42470": { + "safeContract": "0xe34DB7AeFe509750E10CBdf486587f57A17022e3" + }, + "42640": { + "safeContract": "0xe34DB7AeFe509750E10CBdf486587f57A17022e3" + }, + "42645": { + "safeContract": "0xF98f9D6726Bf2C2E9DB9A964c1511908ac8e48E5" + }, + "43180": { + "safeContract": "0xf8632Ad4c97a8D6048003fcB4f7284068BF05580" + }, + "50500": { + "list": [ + "0xdcb7ff1b9fd738a47eaf9b2e0b3d817b1da92781", + "0x3e10ae74970da70b706e768eead37b712a698941", + "0x0179e19cd246bb7bdec2c998ae0d8307a7eddbc5", + "0x2085e4c97b0b57e1d060322820fd6d31b4e4b411" + ] + }, + "50710": { + "safeContract": "0xEA9A4F3B1186c518dA349a95fC250D1d4634e98d" + } + } + } + } + } + }, + "params": { + "maximumExtraDataSize": "0x20", + "minGasLimit": "0x1388", + "networkID": "0x897", + "gasLimitBoundDivisor": "0x400", + "eip140Transition": 0, + "eip211Transition": 0, + "eip214Transition": 0, + "eip658Transition": 0, + "wasmActivationTransition": "40840", + "eip145Transition": "40840", + "eip1014Transition": "40840", + "eip1052Transition": "40840", + "eip1283Transition": "40840", + "kip4Transition": "40840", + "kip6Transition": "40840" + }, + "hardcodedSync": { + "header": "f90243a0efe104bba35d37d09d98cacff42cb20d07a3995e9dfd0123bddff149ef38fe0da01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347943e10ae74970da70b706e768eead37b712a698941a00cfd8111303accc44e7609d6cc7b391b5fd5842a27f5d4fb1e0a76edcee7dd4ea056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b901000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000090fffffffffffffffffffffffffffffffa8298018365b9aa80845cdae1919fde830205008f5061726974792d457468657265756d86312e33332e30826c698412922d1db8418f349a8bc3ae783acab8ff54b8fa9b3cc220fd59de0febe58f9b7d86227cfba1660b2c8d004c8cfa0ec64ccc836611f6cb703ce164c581b0cfb799c98364868f00", + "totalDifficulty": "13241407743994478428750296098992396100909794", + "CHTs": [ + "0xb70d6696dc174631600c5dbdf2904e71ea8c631f7f18351694abd845be155b89", + "0x6766046356cfdb2c0ce7004bad152993816c7a4cc2cf3c36d350dfff156368ca", + "0x0d3a752df00a5e4d0b14d4d7a4f9920382a0a205e0082133c923d38d3530a579", + "0x5123e29608190e72d5507e7477144bbbbd09415ac14d37da47ab3ae301405b30", + "0xe4d413dcee26b0ae41152ecd9a294c4af73b5bf7015466487aecab5aea4d5f58", + "0x4e843431cab3757fad3ab3cea444b684ba2a829c29e65ad01f9d123d83045cbb", + "0x4ca7a629eec94e2949546de42809e968604c1a9f40c3bc3b7f3d2f02bade8d0b", + "0xc1b10f1cb6a0f1ba08174b262e98379eb43e3c335e116fed8505953af5aeb7e9", + "0x559af04515e4381823b7db5fac52fb1cf964b6739c742edff576354078e3220c", + "0x2b5c867c77e421965a94bd6513ca291e02af1685ce77740b879285af5861539f", + "0x855757cb3089df1f6aaa03516e8af86d1ac5cbfa0f78907646f90ebe27d36662", + "0x74528f44d404ae16b902961301a23b662240f1d8b0962077f2f0d00e41d54d5b", + "0x26dabe81e124dd1f7d0a1858b83aaa0892abb90e0dc8b5eef51c38753b1547c7", + "0xc1c0d013d66dead577404c15eeac3e567d9210cbda3d939f7fc1f637e987a2e6", + "0xec5708f02ab5c2957ea32e07331d62892c402b760a90503764a01d4b1fec045f", + "0x660f6525eb2d196c7d32bf80cbe314aba7df1b44ad97149e2d9a5bd4673f80ba", + "0x4f02d256ab1d07d363db26088601cee5baa2aab70e669e860f9b97d3a6d8695a", + "0xdbe3dd8be2e092550d1ac52210fe3e4c11a11689f24f855af867306c3834451d", + "0x2e0b46e935d1d9f0297df9a032f1b837a8d1259e6b0ee31407db22f225b76e45" + ] + }, + "genesis": { + "seal": { + "authorityRound": { + "step": "0x0", + "signature": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + } + }, + "difficulty": "0x20000", + "gasLimit": "0x165A0BC00" + }, + "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 + } + } + } + }, + "0xf5d60efcad44babc8d85eb8df57d9e3a5101eb93": { + "balance": "0x2000000000000000000" + }, + "0x61f9546cd2bd5e46bdb915ab9c69210c6ee043d2": { + "balance": "0x2000000000000000000" + }, + "0x8d968b9bc8fe3b1d233ae6238c771544dd7c8fb2": { + "balance": "0x2000000000000000000" + }, + "0x63132a33765fe352187c93e45fac1b9162399e5c": { + "balance": "0x2000000000000000000" + }, + "0x95a165da81359c11aafb4490fe6afeb6ee4f7c2e": { + "balance": "0x2000000000000000000" + }, + "0x9224dff492427471092d13b36866875d7e0f2dd6": { + "balance": "0x2000000000000000000" + }, + "0x9aa9bfa819800a44803dcacc514bb443a2baade6": { + "balance": "0x2000000000000000000" + }, + "0x85ef014983c1bad421cc00941c18122066da5860": { + "balance": "0x2000000000000000000" + }, + "0xc6fffcb664a60c019a335902112584829a91c0a0": { + "balance": "0x2000000000000000000" + }, + "0xdbb63fb51453714f5efed3c2846160018fb3f43c": { + "balance": "0x2000000000000000000" + }, + "0x23be64786fe4467635e65aea49f9dd7a0b05d7b5": { + "balance": "0x2000000000000000000" + }, + "0x3c80c7163c1e6730f2ba80df707178dcdee44475": { + "balance": "0x2000000000000000000" + }, + "0xe49c5f9c8a78884c8ba2aa161b8c41bf21b96751": { + "balance": "0x2000000000000000000" + }, + "0xf7f2673e854e7b33a62beec796dec5d61ac9c40a": { + "balance": "0x2000000000000000000" + }, + "0xe739ed3643970d106c4b1c51de91b7992400e50c": { + "balance": "0x2000000000000000000" + }, + "0x85a7273ff4f4ffce0c708f47ab45249867679bcf": { + "balance": "0x2000000000000000000" + }, + "0x4156e7abdfe6e08c16ef2b241661276af57f9ead": { + "balance": "0x2000000000000000000" + }, + "0x480b0e0a641ae45521377d4984d085a003934561": { + "balance": "0x200000000000000000000000" + }, + "0xb08eb95236499f072b2ae3c91a8f911d6c853b4d": { + "balance": "0x200000000000000000000000" + }, + "0x4899f06b5e60140f1885599bf3a562cb25775adc": { + "balance": "0x200000000000000000000000" + } + }, + "nodes": [ + "enode://1ac6d74bbd80a37c1dc75bddc78462922d8df6b6243c2e1b38ff250ae57d11ad37bbfcc65fcbb7c0ae22da1de5e516c00ddf98253701db18fe7280ca6b8b45d2@3.214.8.88:30303", + "enode://d081a7cebb62ba4a93cbdc96a22779168d8583266fe94a859a40ceb85cf8a056aeabf82c43f2ba35e4eeaf61c34fa8a873b1f16906dfcc0d512cb29e316d696a@3.95.88.145:30303", + "enode://d7fc9a3c23f9926321b81ff32ac130bdce185edb7be6fa33375ad18162de1faee894d0e671077e139295cbc609b036804a05d8353ea32b9c963bced2aeda951f@34.193.207.38:30303", + "enode://16baffd0d7f8ddd77c5ac21902bdb3ae6fa9e17f2449a579e5f2db0b8701e451c7d27225319cb15628791d4d19f3fcb7c2e2c6b8757ab195eb65d7c347c9530c@23.22.141.34:30303", + "enode://f05c1d338edbfbba711118a4ac8ecc37dba436289ecf86361664ef9fe4659e31f668ff23982e9afcf60e8059b23fa6b0f0bce4e8dcfef3e7507c168d62d4d98b@3.214.59.4:30303", + "enode://7d582bb66161906100679e079676f12109e5e73731c28a0d23d7c36ece46acd0a307add1b0c38931441c7dbffd5f0ae5507427523e9e3ea875b1ee43097d5b8d@3.213.32.155:30303", + "enode://7b5c615ded974a2c615c0ec204c40441756a003b822e0c1e8d9e54e48d441dd60905326475e591cc846f0ccea6020fc1020a149a96b443a919d86eedd6e879ab@3.214.8.88:30304", + "enode://bd37f49b5ad81dbf86f004a50843172d8161ec8446d5bf453ffe40f406cdad329073d4d413c5b7f6326503c2f9dd5c2058a652187e2c27ae309d2a221390c5d9@3.95.88.145:30304", + "enode://005bc9bb08a7bd22210742cb596b415cb24d9c7b9c0e69ccddd7aa9c7f8bb2f862d9de20b410fec8abf30e9f54df7341cbfebb8e13bd0d98a5aa6743de45d6ac@34.193.207.38:30304" + ] +} diff --git a/networks/duero/config/config.toml b/networks/duero/config/config.toml new file mode 100644 index 0000000..a967ee5 --- /dev/null +++ b/networks/duero/config/config.toml @@ -0,0 +1,19 @@ +# Users config file in users.toml +# This configuration file can be used for either Alice, Bob or Charlie + +[parity] +chain = "/home/parity/parity/config/chain.json" + +[rpc] +port = 8545 +interface = "0.0.0.0" +cors = ["all"] +hosts = ["all"] +apis = ["web3", "eth", "pubsub", "net", "parity", "parity_pubsub", "parity_accounts", "traces", "rpc", "shh", "shh_pubsub"] + +[network] +port = 30303 +discovery = true + +[account] +password = ["/home/parity/parity/validator.pwd"] diff --git a/networks/duero/keys/duero/account1.json b/networks/duero/keys/duero/account1.json new file mode 100755 index 0000000..2226e59 --- /dev/null +++ b/networks/duero/keys/duero/account1.json @@ -0,0 +1,22 @@ +{ + "id": "50aa801a-8d66-1402-1fa4-d8987868c2ce", + "version": 3, + "crypto": { + "cipher": "aes-128-ctr", + "cipherparams": { + "iv": "a874e6fe50a5bb088826c45560dc1b7e" + }, + "ciphertext": "2383c6aa50c744b6558e77b5dcec6137f647c81f10f71f22a87321fd1306056c", + "kdf": "pbkdf2", + "kdfparams": { + "c": 10240, + "dklen": 32, + "prf": "hmac-sha256", + "salt": "eca6ccc9fbb0bdc3a516c7576808ba5031669e6878f3bb95624ddb46449e119c" + }, + "mac": "14e9a33a45ae32f88a0bd5aac14521c1fcf14f56fd55c1a1c080b2f81ddb8d44" + }, + "address": "068ed00cf0441e4829d9784fcbe7b9e26d4bd8d0", + "name": "", + "meta": "{}" +} diff --git a/networks/spree/keys/account1.json b/networks/spree/keys/account1.json old mode 100644 new mode 100755 diff --git a/networks/spree/keys/account2.json b/networks/spree/keys/account2.json old mode 100644 new mode 100755 diff --git a/networks/spree/keys/address_book.json b/networks/spree/keys/address_book.json old mode 100644 new mode 100755 diff --git a/networks/spree/keys/validator.json b/networks/spree/keys/validator.json old mode 100644 new mode 100755 diff --git a/start_ocean.sh b/start_ocean.sh index b02dafa..6abf9b3 100755 --- a/start_ocean.sh +++ b/start_ocean.sh @@ -252,6 +252,18 @@ while :; do printf $COLOR_Y'Starting with local Nile node...\n\n'$COLOR_RESET printf $COLOR_Y'Starting without Secret Store...\n\n'$COLOR_RESET ;; + # connects you to duero ocean testnet + --local-duero-node) + export NODE_COMPOSE_FILE="${COMPOSE_DIR}/nodes/duero_node.yml" + COMPOSE_FILES="${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/keeper_contracts.yml/}" + COMPOSE_FILES="${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/secret_store.yml/}" + export KEEPER_MNEMONIC='' + export KEEPER_NETWORK_NAME="duero" + export KEEPER_DEPLOY_CONTRACTS="false" + export ACL_CONTRACT_ADDRESS="$(get_acl_address ${KEEPER_VERSION})" + printf $COLOR_Y'Starting with local Duero node...\n\n'$COLOR_RESET + printf $COLOR_Y'Starting without Secret Store...\n\n'$COLOR_RESET + ;; # spins up spree local testnet --local-spree-node) export NODE_COMPOSE_FILE="${COMPOSE_DIR}/nodes/spree_node.yml"