diff --git a/activation_service_poc/demo/README.md b/activation_service_poc/demo/README.md new file mode 100644 index 0000000000..5a5cc7b4cd --- /dev/null +++ b/activation_service_poc/demo/README.md @@ -0,0 +1,3 @@ +# Node split PoC + +Best to follow docs in ![here](https://docs.spacemesh.io/docs/experimental/node-split) diff --git a/activation_service_poc/demo/config.testnet-16-smesher-service.json b/activation_service_poc/demo/config.testnet-16-smesher-service.json new file mode 100644 index 0000000000..a614fc3075 --- /dev/null +++ b/activation_service_poc/demo/config.testnet-16-smesher-service.json @@ -0,0 +1,118 @@ +{ + "api": { + "grpc-public-listener": "0.0.0.0:9092", + "grpc-private-listener": "0.0.0.0:9093", + "grpc-local-services": ["smeshing_identities_v2alpha1"] + }, + "cache": { + "atx-size": 1000 + }, + "fetch": { + "streaming": true, + "servers": { + "ax/1": { + "interval": "1s", + "queue": 10, + "requests": 5 + }, + "hs/1": { + "interval": "1s", + "queue": 200, + "requests": 100 + } + }, + "servers-metrics": true + }, + "genesis": { + "genesis-time": "2024-12-21T13:00:00.000Z" + }, + "hare3": { + "enable": true, + "enable-layer": 0, + "disable-layer": 4294967295, + "committee": 800, + "committeeupgrade": { + "layer": 4860, + "size": 50 + }, + "leaders": 5, + "iterations-limit": 4, + "preround-delay": "25s", + "round-duration": "12s" + }, + "logging": {}, + "main": { + "db-prune-interval": "30m", + "db-query-cache": true, + "db-query-cache-sizes": { + "active-set-blob": 200, + "atx-blob": 1000000, + "epoch-atxs": 100 + }, + "pprof-listener": "localhost:6060", + "poet-servers": [ + { + "address": "https://testnet-16-poet-0.spacemesh.network", + "pubkey": "cBDiEhk9Q+MfVgWh5anDDgyyEKi4x2ORrSvd4YwWoX4=" + }, + { + "address": "https://testnet-16-poet-1.spacemesh.network", + "pubkey": "Yl8KPls3OSQWwfJfg6ekI5Tl4k76wgkMj3Ki6Ji3+mI=" + }, + { + "address": "https://testnet-16-poet-2.spacemesh.network", + "pubkey": "Om4YBKakqZYYtrDzmgzaGdjpj36PWoww8bJt5Mt17rY=" + } + ], + "node-service-address": "http://0.0.0.0:9099", + "data-folder": "/tmp/spacemesh-client", + "filelock": "/tmp/spacemesh-client/node.lock" + }, + "p2p": { + "auto-nat-server": { + "global-max": 1000 + }, + "autoscale-peers": true, + "high-peers": 150, + "listen": ["/ip4/0.0.0.0/tcp/7513", "/ip4/0.0.0.0/udp/7513/quic-v1"], + "enable-routing-discovery": false, + "routing-discovery-advertise": false, + "enable-quic-transport": true, + "enable-tcp-transport": true, + "relay": true, + "low-peers": 100, + "min-peers": 20, + "inbound-fraction": 1.1, + "outbound-fraction": 1.1, + "p2p-bootnode": true, + "p2p-metrics": true, + "p2p-reachability": "public", + "bootnodes": [ + "/dns4/testnet-16-bootnode-0.spacemesh.network/tcp/5000/p2p/12D3KooWQMAAL9nkgXJgTM2psJLMbWRgZLjAxJozx7dNkKYczs2V", + "/dns4/testnet-16-bootnode-4.spacemesh.network/tcp/5000/p2p/12D3KooWE1YEa3roqamhPt3CNiVRBzS7Lbv8HRbByE7fpSyLAZis", + "/dns4/testnet-16-bootnode-7.spacemesh.network/tcp/5000/p2p/12D3KooWRvAVZrK3EURQBh1wdMPRDgjtowU84div3YxWYKuGDaFU" + ] + }, + "post": { + "post-min-numunits": 2, + "post-max-numunits": 100, + "post-labels-per-unit": 1024 + }, + "tortoise": { + "tortoise-window-size": 600 + }, + "beacon": { + "beacon-rounds-number": 0 + }, + "bootstrap": { + "bootstrap-url": "https://bootstrap.spacemesh.network/testnet-16" + }, + "preset": "testnet", + "smeshing": { + "smeshing-opts": { + "smeshing-opts-datadir": "/tmp/spacemesh-client/post-data" + }, + "smeshing-coinbase": "stest1qqqqqqqpcpmljkxcscyj83uz6hl4dfhjgqjhzxqygkzwa", + "smeshing-start": true + } +} diff --git a/activation_service_poc/demo/config.testnet-16.json b/activation_service_poc/demo/config.testnet-16.json new file mode 100644 index 0000000000..9f75887b9f --- /dev/null +++ b/activation_service_poc/demo/config.testnet-16.json @@ -0,0 +1,107 @@ +{ + "api": { + "grpc-public-listener": "0.0.0.0:9092", + "grpc-private-listener": "0.0.0.0:9093" + }, + "cache": { + "atx-size": 1000 + }, + "fetch": { + "streaming": true, + "servers": { + "ax/1": { + "interval": "1s", + "queue": 10, + "requests": 5 + }, + "hs/1": { + "interval": "1s", + "queue": 200, + "requests": 100 + } + }, + "servers-metrics": true + }, + "genesis": { + "genesis-time": "2024-12-21T13:00:00.000Z" + }, + "hare3": { + "enable": true, + "enable-layer": 0, + "disable-layer": 4294967295, + "committee": 800, + "committeeupgrade": { + "layer": 4860, + "size": 50 + }, + "leaders": 5, + "iterations-limit": 4, + "preround-delay": "25s", + "round-duration": "12s" + }, + "logging": {}, + "main": { + "db-prune-interval": "30m", + "db-query-cache": true, + "db-query-cache-sizes": { + "active-set-blob": 200, + "atx-blob": 1000000, + "epoch-atxs": 100 + }, + "pprof-listener": "localhost:6060", + "poet-servers": [ + { + "address": "https://testnet-16-poet-0.spacemesh.network", + "pubkey": "cBDiEhk9Q+MfVgWh5anDDgyyEKi4x2ORrSvd4YwWoX4=" + }, + { + "address": "https://testnet-16-poet-1.spacemesh.network", + "pubkey": "Yl8KPls3OSQWwfJfg6ekI5Tl4k76wgkMj3Ki6Ji3+mI=" + }, + { + "address": "https://testnet-16-poet-2.spacemesh.network", + "pubkey": "Om4YBKakqZYYtrDzmgzaGdjpj36PWoww8bJt5Mt17rY=" + } + ] + }, + "p2p": { + "auto-nat-server": { + "global-max": 1000 + }, + "autoscale-peers": true, + "high-peers": 150, + "listen": ["/ip4/0.0.0.0/tcp/7513", "/ip4/0.0.0.0/udp/7513/quic-v1"], + "enable-routing-discovery": false, + "routing-discovery-advertise": false, + "enable-quic-transport": true, + "enable-tcp-transport": true, + "relay": true, + "low-peers": 100, + "min-peers": 20, + "inbound-fraction": 1.1, + "outbound-fraction": 1.1, + "p2p-bootnode": true, + "p2p-metrics": true, + "p2p-reachability": "public", + "bootnodes": [ + "/dns4/testnet-16-bootnode-0.spacemesh.network/tcp/5000/p2p/12D3KooWQMAAL9nkgXJgTM2psJLMbWRgZLjAxJozx7dNkKYczs2V", + "/dns4/testnet-16-bootnode-4.spacemesh.network/tcp/5000/p2p/12D3KooWE1YEa3roqamhPt3CNiVRBzS7Lbv8HRbByE7fpSyLAZis", + "/dns4/testnet-16-bootnode-7.spacemesh.network/tcp/5000/p2p/12D3KooWRvAVZrK3EURQBh1wdMPRDgjtowU84div3YxWYKuGDaFU" + ] + }, + "post": { + "post-min-numunits": 2, + "post-max-numunits": 100, + "post-labels-per-unit": 1024 + }, + "tortoise": { + "tortoise-window-size": 600 + }, + "beacon": { + "beacon-rounds-number": 0 + }, + "bootstrap": { + "bootstrap-url": "https://bootstrap.spacemesh.network/testnet-16" + }, + "preset": "testnet" +} diff --git a/activation_service_poc/demo/config.testnet-16.node-service.json b/activation_service_poc/demo/config.testnet-16.node-service.json new file mode 100644 index 0000000000..da460ad81a --- /dev/null +++ b/activation_service_poc/demo/config.testnet-16.node-service.json @@ -0,0 +1,113 @@ +{ + "api": { + "grpc-public-listener": "0.0.0.0:19092", + "grpc-private-listener": "0.0.0.0:19093", + "node-service-listener": "0.0.0.0:19099" + }, + "cache": { + "atx-size": 1000 + }, + "fetch": { + "streaming": true, + "servers": { + "ax/1": { + "interval": "1s", + "queue": 10, + "requests": 5 + }, + "hs/1": { + "interval": "1s", + "queue": 200, + "requests": 100 + } + }, + "servers-metrics": true + }, + "genesis": { + "genesis-time": "2024-12-21T13:00:00.000Z" + }, + "hare3": { + "enable": true, + "enable-layer": 0, + "disable-layer": 4294967295, + "committee": 800, + "committeeupgrade": { + "layer": 4860, + "size": 50 + }, + "leaders": 5, + "iterations-limit": 4, + "preround-delay": "25s", + "round-duration": "12s" + }, + "logging": {}, + "main": { + "db-prune-interval": "30m", + "db-query-cache": true, + "db-query-cache-sizes": { + "active-set-blob": 200, + "atx-blob": 1000000, + "epoch-atxs": 100 + }, + "pprof-listener": "localhost:6060", + "poet-servers": [ + { + "address": "https://testnet-16-poet-0.spacemesh.network", + "pubkey": "cBDiEhk9Q+MfVgWh5anDDgyyEKi4x2ORrSvd4YwWoX4=" + }, + { + "address": "https://testnet-16-poet-1.spacemesh.network", + "pubkey": "Yl8KPls3OSQWwfJfg6ekI5Tl4k76wgkMj3Ki6Ji3+mI=" + }, + { + "address": "https://testnet-16-poet-2.spacemesh.network", + "pubkey": "Om4YBKakqZYYtrDzmgzaGdjpj36PWoww8bJt5Mt17rY=" + } + ], + "data-folder": "/tmp/spacemesh-node-service", + "filelock": "/tmp/spacemesh-node-service/node.lock" + }, + "p2p": { + "auto-nat-server": { + "global-max": 1000 + }, + "autoscale-peers": true, + "high-peers": 150, + "listen": ["/ip4/0.0.0.0/tcp/7513", "/ip4/0.0.0.0/udp/7513/quic-v1"], + "enable-routing-discovery": false, + "routing-discovery-advertise": false, + "enable-quic-transport": true, + "enable-tcp-transport": true, + "relay": true, + "low-peers": 100, + "min-peers": 20, + "inbound-fraction": 1.1, + "outbound-fraction": 1.1, + "p2p-bootnode": true, + "p2p-metrics": true, + "p2p-reachability": "public", + "bootnodes": [ + "/dns4/testnet-16-bootnode-0.spacemesh.network/tcp/5000/p2p/12D3KooWQMAAL9nkgXJgTM2psJLMbWRgZLjAxJozx7dNkKYczs2V", + "/dns4/testnet-16-bootnode-4.spacemesh.network/tcp/5000/p2p/12D3KooWE1YEa3roqamhPt3CNiVRBzS7Lbv8HRbByE7fpSyLAZis", + "/dns4/testnet-16-bootnode-7.spacemesh.network/tcp/5000/p2p/12D3KooWRvAVZrK3EURQBh1wdMPRDgjtowU84div3YxWYKuGDaFU" + ] + }, + "post": { + "post-min-numunits": 2, + "post-max-numunits": 100, + "post-labels-per-unit": 1024 + }, + "tortoise": { + "tortoise-window-size": 600 + }, + "beacon": { + "beacon-rounds-number": 0 + }, + "bootstrap": { + "bootstrap-url": "https://bootstrap.spacemesh.network/testnet-16" + }, + "preset": "testnet", + "smeshing": { + "smeshing-start": false + } +} diff --git a/activation_service_poc/demo/docker-compose-testnet-both-local.yml b/activation_service_poc/demo/docker-compose-testnet-both-local.yml new file mode 100644 index 0000000000..356e4554d6 --- /dev/null +++ b/activation_service_poc/demo/docker-compose-testnet-both-local.yml @@ -0,0 +1,65 @@ +services: + activation-service-local-1: + network_mode: "host" + image: spacemeshos/go-spacemesh:node-split-poc-1.0.0 + command: + [ + "-c", + "/config.json", + "--node-service-address", + "http://127.0.0.1:19099", + "--grpc-json-listener", + "0.0.0.0:19171", + "--proxy-api-v2-address", + "http://127.0.0.1:19060", + "--grpc-public-listener", + "0.0.0.0:19282", + "--grpc-private-listener", + "0.0.0.0:19283", + "--json-cors-everywhere", + ] + volumes: + - ./spacemesh-client-local-1:/tmp/spacemesh-client + - ./config.testnet-16-smesher-service.json:/config.json + + activation-service-local-2: + network_mode: "host" + image: spacemeshos/go-spacemesh:node-split-poc-1.0.0 + command: + [ + "-c", + "/config.json", + "--node-service-address", + "http://127.0.0.1:19399", + "--grpc-json-listener", + "0.0.0.0:19371", + "--proxy-api-v2-address", + "http://127.0.0.1:19060", + "--grpc-public-listener", + "0.0.0.0:19382", + "--grpc-private-listener", + "0.0.0.0:19383", + "--json-cors-everywhere", + ] + volumes: + - ./spacemesh-client-local-2:/tmp/spacemesh-client + - ./config.testnet-16-smesher-service.json:/config.json + + node-service-local: + network_mode: "host" + image: spacemeshos/go-spacemesh:node-split-poc-1.0.0 + command: [ + "-c", + "/config.json", + "--grpc-json-listener", + "0.0.0.0:19060", + "--grpc-public-listener", + "0.0.0.0:19062", + "--grpc-private-listener", + "0.0.0.0:19063", + # "--node-service-listener", + # "0.0.0.0:19099", ## this is not exposed via CLI + ] + volumes: + - ./spacemesh-node-service-multi:/tmp/spacemesh-node-service + - ./config.testnet.node-service.json:/config.json diff --git a/activation_service_poc/demo/docker-compose-testnet-remote-node.yml b/activation_service_poc/demo/docker-compose-testnet-remote-node.yml new file mode 100644 index 0000000000..449cb46d8d --- /dev/null +++ b/activation_service_poc/demo/docker-compose-testnet-remote-node.yml @@ -0,0 +1,46 @@ +services: + activation-service-remote-1: + network_mode: "host" + image: spacemeshos/go-spacemesh:node-split-poc-1.0.0 + command: + [ + "-c", + "/config.json", + "--node-service-address", + "http://testnet-16-node-service.spacemesh.network:9099", + "--grpc-json-listener", + "0.0.0.0:19071", + "--proxy-api-v2-address", + "http://testnet-16-node-service.spacemesh.network", + "--grpc-public-listener", + "0.0.0.0:19082", + "--grpc-private-listener", + "0.0.0.0:19083", + "--json-cors-everywhere", + ] + volumes: + - ./spacemesh-client-remote-1:/tmp/spacemesh-client + - ./config.testnet-16-smesher-service.json:/config.json + + activation-service-remote-2: + network_mode: "host" + image: spacemeshos/go-spacemesh:node-split-poc-1.0.0 + command: + [ + "-c", + "/config.json", + "--node-service-address", + "http://testnet-16-node-service.spacemesh.network:9099", + "--grpc-json-listener", + "0.0.0.0:19171", + "--proxy-api-v2-address", + "http://testnet-16-node-service.spacemesh.network", + "--grpc-public-listener", + "0.0.0.0:19182", + "--grpc-private-listener", + "0.0.0.0:19183", + "--json-cors-everywhere", + ] + volumes: + - ./spacemesh-client-remote-2:/tmp/spacemesh-client + - ./config.testnet-16-smesher-service.json:/config.json