diff --git a/docker-compose-local-parity-node.yml b/docker-compose-local-parity-node.yml index 1f46ab1..4b29fc0 100644 --- a/docker-compose-local-parity-node.yml +++ b/docker-compose-local-parity-node.yml @@ -9,7 +9,8 @@ services: - "27017:27017" command: mongod networks: - - backend + backend: + ipv4_address: 172.15.0.11 parity-node: image: parity/parity:stable @@ -25,7 +26,6 @@ services: --unsafe-expose --jsonrpc-cors all --unlock 0x00bd138abd70e2f00903268f3db08f2d25677c9e - # entrypoint: tail -f /dev/null volumes: - ./parity/parity/config:/home/parity/parity/config - parity-node:/home/parity/.local/share/io.parity.ethereum/ @@ -36,12 +36,30 @@ services: ports: - 8545:8545 networks: - - backend + backend: + ipv4_address: 172.15.0.12 + + secret-store: + image: oceanprotocol/parity-ethereum:master + # entrypoint: tail -f /dev/null + entrypoint: /opt/parity/parity + command: + --config /etc/parity/secretstore/config.toml --jsonrpc-cors all --jsonrpc-interface all --jsonrpc-hosts all --jsonrpc-apis all + volumes: + - ./parity/secret_store/config/:/etc/parity/secretstore/ + - secret-store:/parity_data/ + - ./parity/secret_store/keys/:/parity_data/keys/ocean-network/ + ports: + - 12000:12000 + networks: + backend: + ipv4_address: 172.15.0.13 keeper-contracts: image: oceanprotocol/keeper-contracts:${OCEAN_VERSION:-stable} networks: - - backend + backend: + ipv4_address: 172.15.0.14 environment: LOCAL_CONTRACTS: "true" DEPLOY_CONTRACTS: ${DEPLOY_CONTRACTS} @@ -58,7 +76,8 @@ services: ports: - 5000:5000 networks: - - backend + backend: + ipv4_address: 172.15.0.15 depends_on: - keeper-contracts environment: @@ -71,6 +90,13 @@ services: networks: backend: + driver: bridge + ipam: + driver: default + config: + - subnet: 172.15.0.1/24 + gateway: 172.15.0.1 volumes: parity-node: + secret-store: diff --git a/parity/secret_store/config/chain.json b/parity/secret_store/config/chain.json new file mode 100644 index 0000000..a069cca --- /dev/null +++ b/parity/secret_store/config/chain.json @@ -0,0 +1,102 @@ +{ + "name": "ocean-network", + "engine": { + "authorityRound": { + "params": { + "stepDuration": "1", + "validators": { + "list": [ + "0x00Bd138aBD70e2F00903268F3Db08f2D25677C9e", + "0x00Aa39d30F0D20FF03a22cCfc30B7EfbFca597C2", + "0x002e28950558fbede1a9675cb113f0bd20912019" + ] + }, + "validateScoreTransition": 1000000000, + "validateStepTransition": 1500000000, + "maximumUncleCount": 1000000000 + } + } + }, + "params": { + "maximumExtraDataSize": "0x20", + "minGasLimit": "0x1388", + "networkID": "0x2323", + "gasLimitBoundDivisor": "0x400", + "eip140Transition": 0, + "eip211Transition": 0, + "eip214Transition": 0, + "eip658Transition": 0 + + }, + "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 + } + } + } + }, + "0x6B0c56d1Ad5144b4d37fa6e27DC9afd5C2435c3B": { + "balance": "1000" + }, + "0x0011598De1016A350ad719D23586273804076774": { + "balance": "100500" + }, + + + "0x00Bd138aBD70e2F00903268F3Db08f2D25677C9e": { + "balance": "10000000111000111000111000" + } + } +} diff --git a/parity/secret_store/config/config.toml b/parity/secret_store/config/config.toml new file mode 100644 index 0000000..07ff86b --- /dev/null +++ b/parity/secret_store/config/config.toml @@ -0,0 +1,60 @@ +[parity] +chain = "/etc/parity/secretstore/chain.json" +base_path = "/parity_data" + +[ui] +disable = true + +[rpc] +disable = false +port = 8545 +interface = "all" +cors = ["all"] +apis = ["web3", "eth", "pubsub", "net", "parity", "parity_pubsub", "traces", "rpc", "shh", "shh_pubsub"] +hosts = ["all"] + +[ipc] +disable = true + +[dapps] +disable = true + +[websockets] +disable = true + +[mining] +engine_signer = "0xa1345ed0b2d1e193aead673e33dac56515af128a" +reseal_on_txs = "none" +usd_per_tx = "0" + +[network] +port = 30303 +bootnodes = [ + "enode://16bddd0215f9bb8a9328671b7b1554a7811cf310065fde04248ce4cea92fe2831412894c912e6b9e45019d5011631452055a5c1873f2d6760baa95f51c449787@172.15.0.13:30303", + "enode://bd97feab0fdd069c3fe1f260285053f6a6fa6eaa840bfd6730a1ce6b0b9eccef616bfca7b498fb04c02f5fb9ecd8c40617c32acbdd4b55d306a3f4468b6885f2@172.15.0.12:30303" +] + +[ipfs] +enable = false + +[snapshots] +disable_periodic = true + +[secretstore] +self_secret = "a1345ed0b2d1e193aead673e33dac56515af128a" +disable = false +disable_http = false # This node will expose a Secret Store HTTP API +http_interface = "all" # The HTTP API is available locally only +http_port = 12001 # The Secret Store HTTP API is available at this port +acl_contract = "none" # Insecure, will be changed later on +server_set_contract = "none" +nodes = [ + "7cb22f9a17e8880f8009b519b3506fa9d52fe0ff315f68d0dc0be9576f116818be5f3843c3e4e57aecea40bdd14c8539f5714a51d3254c2955d8a9f1ea9723dc@172.15.0.13:12000" +] +interface = "all" +port = 12000 # port used to communicated with other Secret Store nodes +path = "/parity_data/secret_store" + +[account] +password = ["/etc/parity/secretstore/password"] + diff --git a/parity/secret_store/config/password b/parity/secret_store/config/password new file mode 100644 index 0000000..d57794b --- /dev/null +++ b/parity/secret_store/config/password @@ -0,0 +1 @@ +8Ng6sVDLE5GW diff --git a/parity/secret_store/keys/address_book.json b/parity/secret_store/keys/address_book.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/parity/secret_store/keys/address_book.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/parity/secret_store/keys/ss1.json b/parity/secret_store/keys/ss1.json new file mode 100644 index 0000000..f89169c --- /dev/null +++ b/parity/secret_store/keys/ss1.json @@ -0,0 +1,23 @@ +{ + "id": "cb4f3330-9f0f-cd4d-d554-5aa6442b10be", + "version": 3, + "crypto": { + "cipher": "aes-128-ctr", + "cipherparams": { + "iv": "937c23da18782823c3a44b33a48f5422" + }, + "ciphertext": "10573d6899aee16f08ad747d70ffdd3df46a515b1a346f1456fe9ecf4e0771e5", + "kdf": "pbkdf2", + "kdfparams": { + "c": 10240, + "dklen": 32, + "prf": "hmac-sha256", + "salt": "838feb11a3e307cf9e5677e061e3fbd322dcb202e96a824d14c9b10d3147d1f1" + }, + "mac": "15ff1a017d21dca4dd2d10064665ea14f9ccab91fd4337c7b00a564bb333fffe" + }, + "address": "a1345ed0b2d1e193aead673e33dac56515af128a", + "name": "", + "meta": "{}" +} +