Repository: fmira21/ton-node-docker Branch: main Commit: d1a2b68f85df Files: 13 Total size: 60.5 KB Directory structure: gitextract_hchiyxsl/ ├── .gitignore ├── README.md ├── bootstrap.sh ├── build/ │ ├── Dockerfile.api │ └── Dockerfile.node ├── config/ │ ├── api-config/ │ │ ├── generate-api-key.py │ │ ├── mainnet-config-onetomany.json │ │ ├── mainnet-config-onetoone.json │ │ ├── testnet-config-onetomany.json │ │ └── testnet-config-onetoone.json │ └── node-assets/ │ ├── control.template │ └── init.sh └── docker-compose.yml ================================================ FILE CONTENTS ================================================ ================================================ FILE: .gitignore ================================================ docker-compose.aux.yml build/Dockerfile.metrics build/*-local local-build db logs ================================================ FILE: README.md ================================================ # The Open Network: Full node and Toncenter API, dockerised This repository contains TON full node and Toncenter API builds unified into one Compose definition - to run as a service on any host machine. This setup can be deployed on your host without any external dependencies: just clone this repo and run `bootstrap.sh`. Then wait for your full node to sync with the chain. ## Credentials Many thanks to **EmelyanenkoK** and **neodiX42** for the [TON node build](https://github.com/ton-blockchain/ton/blob/master/docker/Dockerfile) which is used here without major changes, as well as **dungeon-master-666** for [TON HTTP API](https://github.com/toncenter/ton-http-api). This setup has been created with the use of these sources. ## Functionality TON node works in the full mode by default. The API service can be configured to work in two modes: - one-to-one (`onetoone`) - interacting with your node only; - one-to-many (`onetomany`) - interacting with a set of nodes including your node. ## Prerequisites To bootstrap and run the node, you have to install **Docker and Docker Compose** on your host. For node system requirements, refer to the [official requirements](https://docs.ton.org/participate/run-nodes/full-node#:~:text=Hardware%20requirements%E2%80%8B&text=You%20need%20a%20machine%20with,a%20TON%20Blockchain%20Full%20Node.). For MacOS, install `gnu-sed` to run the bootstrap script adequately: ``` brew install gnu-sed ``` Then, use `gsed` instead of `sed` in `bootstrap.sh`. ## Configuration > **NB**: The `TON_NODE_IP` environment variable is fetched via an external resource. In case you need anything different, just remove the `export TON_NODE_IP` definition from `bootstrap.sh` and set `TON_NODE_IP` manually instead. Both node and API are configured via the `.env` file. In the **node part** of the file, you will find following parameters: | Variable | Description | Default value | | -------- | ----------- | ------------- | | `NODE_VERSION` | Release version of the TON node - consider specifying the latest version | `2023.12` | | `NODE_CONF_VOLUME` | External volume to store node configuration files | `${PWD}/config/node-config` | | `NODE_LOG_VOLUME` | External volume to store node logs | `${PWD}/logs` | | `NODE_STATE_VOLUME` | External volume to store the node DB | `${PWD}/db` | | `NODE_CONFIG_URL` | Node config URL to download (find current config versions for Testnet and Mainnet below) | Testnet config | | `NODE_PUBLIC_IP` | External public IP of your host to advertise the node on. This IP can be fetched automatically by `bootstrap.sh` | `TON_NODE_IP` environment variable | | `NODE_LITESERVER` | Enable liteserver mode | `true` | | `NODE_LITESERVER_PORT` | Node liteserver port | `43679` | | `NODE_CONSOLE_PORT` | Node control plane port | `43678` | In the **API part** of the file, you can set following HTTP API parameters: | Variable | Description | Default value | | -------- | ----------- | ------------- | | `API_VERSION` | Release version of TON HTTP API | `2.0.31` | | `API_NETWORK` | API network corresponding with your node | `testnet` | | `API_MODE` | API interaction mode as above: `onetoone` or `onetomany` | `onetoone` | | `API_CONF_VOLUME` | External volume to store API configs | `${PWD}/config/api-config` | | `API_CACHE_ENABLED` | Set `1` to enable API cache | `0` | | `API_LOGS_JSONIFY` | Set `1` to get logs in the JSON format | `0` | | `API_LOGS_LEVEL` | API log level | `ERROR` | | `API_TONLIB_LITESERVER_CONFIG` | Internal config path, fetched automatically from `API_NETWORK` and `API_MODE` variables | `/conf/${API_NETWORK}-config-${API_MODE}.json` | | `API_TONLIB_PARALLEL_REQUESTS_PER_LITESERVER` | Maximal number of parallel request per liteserver | `50` | | `API_TONLIB_REQUEST_TIMEOUT` | Timeout time of a request in milliseconds | `10000` | | `API_GET_METHODS_ENABLED` | Set `1` to enable `GET` API methods | `1` | | `API_JSON_RPC_ENABLED` | Set `1` to enable JSON RPC | `1` | | `API_ROOT_PATH` | API root path after your hostname or IP | `"/"` | ## Running the node To run the full node and API, change environment variables needed in the `.env` configuration and run the `bootstrap.sh` script. This script will perform following operations: 1. Set your static IP as the `TON_NODE_IP` environment variable - to be used in the `.env` file further. 2. Apply `.env` variables to your shell environment. 3. Build local node and API images. 4. Run the node container. The node will bootstrap additionally with the use of the `./config/node-config/init.sh` script. 5. Run the standard `python` Docker image to set the `NODE_API_KEY` variable containing the generated HTTP API key of the node. 6. Add the obtained node API key to the desired API config. 7. Run the HTTP API container. Then, just wait until your node is synchronised with the chain. To interact with the API, refer to the [Toncenter API reference](https://toncenter.com/api/v2/). ## Updating the node Just lift the release version in the `NODE_VERSION` variable of the `.env` file. ## Troubleshooting 1. Failed to parse config `ton-node` logs: ``` [ 1][t 1][2023-12-24 23:20:03.489683013][validator-engine.cpp:3517][!validator-engine] failed to parse config: [Error : 0 : failed to parse json: Unexpected symbol while parsing JSON Object] ``` If you see this error, check the downloaded and initialised `config.json` for syntax glitches. Change the file itself or the `init.sh` script accordingly. After this, you can either restart the node via Compose or bootstrap it again: in case you changed `init.sh`, remove the existing config and allow to reinitialise it via the script. 2. No nodes in the network `ton-node` logs: ``` [ 2][t 6][2023-12-24 23:56:21.137193799][manager-init.cpp:86][!downloadproofreq] failed to download proof link: [Error : 651 : no nodes] ``` This warning always appears during initial node start. Just wait until the node starts to sync. 3. Dead workers in `onetomany` mode `ton-api` logs: ``` 2023-12-25 10:49:47.910 | ERROR | pyTON.manager:check_children_alive:232 - TonlibWorker #XXX is dead!!! Exit code: 12 2023-12-25 10:49:57.968 | ERROR | pyTON.worker:report_last_block:118 - TonlibWorker #000 report_last_block exception of type LiteServerTimeout: LITE_SERVER_NETWORKadnl query timeout ``` If you see that some of workers other than `000` (your node) are dead - this means, these nodes are not accessible. This situation is not critical, so far there are accessible workers in the list including your node. Still, consider updating API configs from time to time. ## Checked on... This setup works correctly with following software: - Docker Compose v2.15.1 - Docker v20.10.23, build 7155243 - MacOS Sonoma 14.0 (Apple M1) ================================================ FILE: bootstrap.sh ================================================ #!/bin/bash set -e build_all () { docker compose build } add_node_assets () { mkdir -p $NODE_STATE_VOLUME cp -a config/node-assets/. $NODE_STATE_VOLUME } deploy_node () { docker compose up -d ton-node sleep 5 } set_http_api_key () { NODE_API_KEY=$(docker run --rm -v $API_CONF_VOLUME:/conf -v $NODE_STATE_VOLUME:/liteserver ton-api -c "python /conf/generate-api-key.py") sed -i "s~NODEAPIKEY~$NODE_API_KEY~g" ${API_CONF_VOLUME}/${API_NETWORK}-config-${API_MODE}.json } deploy_api () { docker compose up -d ton-api } export TON_NODE_IP=$(curl -s https://ipinfo.io/ip) source .env build_all add_node_assets deploy_node set_http_api_key deploy_api ================================================ FILE: build/Dockerfile.api ================================================ FROM python:3.9-bullseye ARG VER RUN apt-get update && \ apt-get upgrade -y && \ apt-get install -y git \ gcc \ libc-dev \ libssl1.1 RUN git clone --branch v${VER} https://github.com/toncenter/ton-http-api.git WORKDIR /ton-http-api/ton-http-api RUN pip install --no-cache-dir -r requirements.txt ENTRYPOINT [ "/bin/sh" ] ================================================ FILE: build/Dockerfile.node ================================================ FROM ubuntu:20.04 as builder ARG VER RUN sed -i s/deb.debian.org/archive.debian.org/g /etc/apt/sources.list &&\ sed -i 's|security.debian.org|archive.debian.org/|g' /etc/apt/sources.list &&\ sed -i '/stretch-updates/d' /etc/apt/sources.list &&\ apt-get update &&\ DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential \ git \ wget \ cmake \ gperf \ clang-9 \ openssl \ liblz4-dev \ libssl-dev \ zlib1g-dev \ pkg-config \ ninja-build \ libsodium-dev \ libsecp256k1-dev \ libmicrohttpd-dev &&\ rm -rf /var/lib/apt/lists/* WORKDIR /usr/src RUN git clone --recursive --branch v${VER} https://github.com/ton-blockchain/ton RUN mkdir -p /usr/bin/ton WORKDIR /usr/bin/ton RUN cmake -GNinja -DCMAKE_BUILD_TYPE=Release /usr/src/ton &&\ ninja fift \ func \ dht-server \ tonlibjson \ lite-client \ validator-engine \ generate-random-id \ validator-engine-console FROM ubuntu:20.04 RUN apt-get update &&\ apt-get install -y jq \ wget \ openssl \ libatomic1 \ libsodium-dev \ libsecp256k1-dev &&\ rm -rf /var/lib/apt/lists/* COPY --from=builder /usr/src/ton /usr/src/ton COPY --from=builder /usr/bin/ton /usr/bin/ton RUN mkdir -p /var/ton-work/db &&\ mkdir -p /var/ton-work/db/static WORKDIR /var/ton-work/db ENTRYPOINT chmod +x /var/ton-work/db/init.sh && /var/ton-work/db/init.sh ================================================ FILE: config/api-config/generate-api-key.py ================================================ import codecs; f=open('/liteserver/liteserver.pub', "rb+") pub=f.read()[4:] print(str(codecs.encode(pub,"base64")).replace("\n","")[2:46]) ================================================ FILE: config/api-config/mainnet-config-onetomany.json ================================================ { "@type": "config.global", "dht": { "@type": "dht.config.global", "k": 6, "a": 3, "static_nodes": { "@type": "dht.nodes", "nodes": [ { "@type": "dht.node", "id": { "@type": "pub.ed25519", "key": "6PGkPQSbyFp12esf1NqmDOaLoFA8i9+Mp5+cAx5wtTU=" }, "addr_list": { "@type": "adnl.addressList", "addrs": [ { "@type": "adnl.address.udp", "ip": -1185526007, "port": 22096 } ], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0 }, "version": -1, "signature": "L4N1+dzXLlkmT5iPnvsmsixzXU0L6kPKApqMdcrGP5d9ssMhn69SzHFK+yIzvG6zQ9oRb4TnqPBaKShjjj2OBg==" }, { "@type": "dht.node", "id": { "@type": "pub.ed25519", "key": "4R0C/zU56k+x2HGMsLWjX2rP/SpoTPIHSSAmidGlsb8=" }, "addr_list": { "@type": "adnl.addressList", "addrs": [ { "@type": "adnl.address.udp", "ip": -1952265919, "port": 14395 } ], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0 }, "version": -1, "signature": "0uwWyCFn2KjPnnlbSFYXLZdwIakaSgI9WyRo87J3iCGwb5TvJSztgA224A9kNAXeutOrXMIPYv1b8Zt8ImsrCg==" }, { "@type": "dht.node", "id": { "@type": "pub.ed25519", "key": "/YDNd+IwRUgL0mq21oC0L3RxrS8gTu0nciSPUrhqR78=" }, "addr_list": { "@type": "adnl.addressList", "addrs": [ { "@type": "adnl.address.udp", "ip": -1402455171, "port": 14432 } ], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0 }, "version": -1, "signature": "6+oVk6HDtIFbwYi9khCc8B+fTFceBUo1PWZDVTkb4l84tscvr5QpzAkdK7sS5xGzxM7V7YYQ6gUQPrsP9xcLAw==" }, { "@type": "dht.node", "id": { "@type": "pub.ed25519", "key": "DA0H568bb+LoO2LGY80PgPee59jTPCqqSJJzt1SH+KE=" }, "addr_list": { "@type": "adnl.addressList", "addrs": [ { "@type": "adnl.address.udp", "ip": -1402397332, "port": 14583 } ], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0 }, "version": -1, "signature": "cL79gDTrixhaM9AlkCdZWccCts7ieQYQBmPxb/R7d7zHw3bEHL8Le96CFJoB1KHu8C85iDpFK8qlrGl1Yt/ZDg==" }, { "@type": "dht.node", "id": { "@type": "pub.ed25519", "key": "fZnkoIAxrTd4xeBgVpZFRm5SvVvSx7eN3Vbe8c83YMk=" }, "addr_list": { "@type": "adnl.addressList", "addrs": [ { "@type": "adnl.address.udp", "ip": 1091897261, "port": 15813 } ], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0 }, "version": -1, "signature": "cmaMrV/9wuaHOOyXYjoxBnckJktJqrQZ2i+YaY3ehIyiL3LkW81OQ91vm8zzsx1kwwadGZNzgq4hI4PCB/U5Dw==" }, { "@type": "dht.node", "id": { "@type": "pub.ed25519", "key": "zDBLsKjns4bBqQokzY0wOzC2vwbOeiE1J7aOjfCp5mg=" }, "addr_list": { "@type": "adnl.addressList", "addrs": [ { "@type": "adnl.address.udp", "ip": -1573440928, "port": 12821 } ], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0 }, "version": -1, "signature": "qORMhem9RyG7wnNYF822YL3EXwEoTO82h2TarFbjd0jikMIGizAdir1JyxSfyKkhHdFKGcLMeoPb2dfMIvQwAA==" }, { "@type": "dht.node", "id": { "@type": "pub.ed25519", "key": "CU9ytJok8WBnpl29T740gfC/h69kgvQJp7FJMq/N60g=" }, "addr_list": { "@type": "adnl.addressList", "addrs": [ { "@type": "adnl.address.udp", "ip": 391653587, "port": 15895 } ], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0 }, "version": -1, "signature": "DKyGF2nPRxmerpIHxE5FN1Lod3zvJu728NP0iYc1hpNyPvl5epu+7amjimLy1VdzNqFzTJAoJ/gqPPMkXS/kDw==" }, { "@type": "dht.node", "id": { "@type": "pub.ed25519", "key": "MJr8xja0xpu9DoisFXBrkNHNx1XozR7HHw9fJdSyEdo=" }, "addr_list": { "@type": "adnl.addressList", "addrs": [ { "@type": "adnl.address.udp", "ip": -2018147130, "port": 6302 } ], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0 }, "version": -1, "signature": "XcR5JaWcf4QMdI8urLSc1zwv5+9nCuItSE1EDa0dSwYF15R/BtJoKU5YHA4/T8SiO18aVPQk2SL1pbhevuMrAQ==" }, { "@type": "dht.node", "id": { "@type": "pub.ed25519", "key": "Fhldu4zlnb20/TUj9TXElZkiEmbndIiE/DXrbGKu+0c=" }, "addr_list": { "@type": "adnl.addressList", "addrs": [ { "@type": "adnl.address.udp", "ip": -2018147075, "port": 6302 } ], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0 }, "version": -1, "signature": "nUGB77UAkd2+ZAL5PgInb3TvtuLLXJEJ2icjAUKLv4qIGB3c/O9k/v0NKwSzhsMP0ljeTGbcIoMDw24qf3goCg==" }, { "@type": "dht.node", "id": { "@type": "pub.ed25519", "key": "gzUNJnBJhdpooYCE8juKZo2y4tYDIQfoCvFm0yBr7y0=" }, "addr_list": { "@type": "adnl.addressList", "addrs": [ { "@type": "adnl.address.udp", "ip": 89013260, "port": 54390 } ], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0 }, "version": -1, "signature": "LCrCkjmkMn6AZHW2I+oRm1gHK7CyBPfcb6LwsltskCPpNECyBl1GxZTX45n0xZtLgyBd/bOqMPBfawpQwWt1BA==" }, { "@type": "dht.node", "id": { "@type": "pub.ed25519", "key": "jXiLaOQz1HPayilWgBWhV9xJhUIqfU95t+KFKQPIpXg=" }, "addr_list": { "@type": "adnl.addressList", "addrs": [ { "@type": "adnl.address.udp", "ip": 94452896, "port": 12485 } ], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0 }, "version": -1, "signature": "fKSZh9nXMx+YblkQXn3I/bndTD0JZ1yAtK/tXPIGruNglpe9sWMXR+8fy3YogPhLJMdjNiMom1ya+tWG7qvBAQ==" }, { "@type": "dht.node", "id": { "@type": "pub.ed25519", "key": "vhFPq+tgjJi+4ZbEOHBo4qjpqhBdSCzNZBdgXyj3NK8=" }, "addr_list": { "@type": "adnl.addressList", "addrs": [ { "@type": "adnl.address.udp", "ip": 85383775, "port": 36752 } ], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0 }, "version": -1, "signature": "kBwAIgJVkz8AIOGoZcZcXWgNmWq8MSBWB2VhS8Pd+f9LLPIeeFxlDTtwAe8Kj7NkHDSDC+bPXLGQZvPv0+wHCg==" }, { "@type": "dht.node", "id": { "@type": "pub.ed25519", "key": "sbsuMcdyYFSRQ0sG86/n+ZQ5FX3zOWm1aCVuHwXdgs0=" }, "addr_list": { "@type": "adnl.addressList", "addrs": [ { "@type": "adnl.address.udp", "ip": 759132846, "port": 50187 } ], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0 }, "version": -1, "signature": "9FJwbFw3IECRFkb9bA54YaexjDmlNBArimWkh+BvW88mjm3K2i5V2uaBPS3GubvXWOwdHLE2lzQBobgZRGMyCg==" }, { "@type": "dht.node", "id": { "@type": "pub.ed25519", "key": "aeMgdMdkkbkfAS4+n4BEGgtqhkf2/zXrVWWECOJ/h3A=" }, "addr_list": { "@type": "adnl.addressList", "addrs": [ { "@type": "adnl.address.udp", "ip": -1481887565, "port": 25975 } ], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0 }, "version": -1, "signature": "z5ogivZWpQchkS4UR4wB7i2pfOpMwX9Nd/USxinL9LvJPa+/Aw3F1AytR9FX0BqDftxIYvblBYAB5JyAmlj+AA==" }, { "@type": "dht.node", "id": { "@type": "pub.ed25519", "key": "rNzhnAlmtRn9rTzW6o2568S6bbOXly7ddO1olDws5wM=" }, "addr_list": { "@type": "adnl.addressList", "addrs": [ { "@type": "adnl.address.udp", "ip": -2134428422, "port": 45943 } ], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0 }, "version": -1, "signature": "sn/+ZfkfCSw2bHnEnv04AXX/Goyw7+StHBPQOdPr+wvdbaJ761D7hyiMNdQGbuZv2Ep2cXJpiwylnZItrwdUDg==" } ] } }, "liteservers": [ { "ip": 2886860802, "port": 43679, "id": { "@type": "pub.ed25519", "key": "NODEAPIKEY" } }, { "ip": 84478511, "port": 19949, "id": { "@type": "pub.ed25519", "key": "n4VDnSCUuSpjnCyUk9e3QOOd6o0ItSWYbTnW3Wnn8wk=" } }, { "ip": 84478479, "port": 48014, "id": { "@type": "pub.ed25519", "key": "3XO67K/qi+gu3T9v8G2hx1yNmWZhccL3O7SoosFo8G0=" } }, { "ip": -2018135749, "port": 53312, "id": { "@type": "pub.ed25519", "key": "aF91CuUHuuOv9rm2W5+O/4h38M3sRm40DtSdRxQhmtQ=" } }, { "ip": -2018145068, "port": 13206, "id": { "@type": "pub.ed25519", "key": "K0t3+IWLOXHYMvMcrGZDPs+pn58a17LFbnXoQkKc2xw=" } }, { "ip": -2018145059, "port": 46995, "id": { "@type": "pub.ed25519", "key": "wQE0MVhXNWUXpWiW5Bk8cAirIh5NNG3cZM1/fSVKIts=" } }, { "ip": 1091931625, "port": 30131, "id": { "@type": "pub.ed25519", "key": "wrQaeIFispPfHndEBc0s0fx7GSp8UFFvebnytQQfc6A=" } }, { "ip": 1091931590, "port": 47160, "id": { "@type": "pub.ed25519", "key": "vOe1Xqt/1AQ2Z56Pr+1Rnw+f0NmAA7rNCZFIHeChB7o=" } }, { "ip": 1091931623, "port": 17728, "id": { "@type": "pub.ed25519", "key": "BYSVpL7aPk0kU5CtlsIae/8mf2B/NrBi7DKmepcjX6Q=" } }, { "ip": 1091931589, "port": 13570, "id": { "@type": "pub.ed25519", "key": "iVQH71cymoNgnrhOT35tl/Y7k86X5iVuu5Vf68KmifQ=" } }, { "ip": -1539021362, "port": 52995, "id": { "@type": "pub.ed25519", "key": "QnGFe9kihW+TKacEvvxFWqVXeRxCB6ChjjhNTrL7+/k=" } }, { "ip": -1539021936, "port": 20334, "id": { "@type": "pub.ed25519", "key": "gyLh12v4hBRtyBygvvbbO2HqEtgl+ojpeRJKt4gkMq0=" } }, { "ip": -1136338705, "port": 19925, "id": { "@type": "pub.ed25519", "key": "ucho5bEkufbKN1JR1BGHpkObq602whJn3Q3UwhtgSo4=" } }, { "ip": 868465979, "port": 19434, "id": { "@type": "pub.ed25519", "key": "J5CwYXuCZWVPgiFPW+NY2roBwDWpRRtANHSTYTRSVtI=" } }, { "ip": 868466060, "port": 23067, "id": { "@type": "pub.ed25519", "key": "vX8d0i31zB0prVuZK8fBkt37WnEpuEHrb7PElk4FJ1o=" } }, { "ip": -2018147130, "port": 53560, "id": { "@type": "pub.ed25519", "key": "NlYhh/xf4uQpE+7EzgorPHqIaqildznrpajJTRRH2HU=" } }, { "ip": -2018147075, "port": 46529, "id": { "@type": "pub.ed25519", "key": "jLO6yoooqUQqg4/1QXflpv2qGCoXmzZCR+bOsYJ2hxw=" } }, { "ip": 908566172, "port": 51565, "id": { "@type": "pub.ed25519", "key": "TDg+ILLlRugRB4Kpg3wXjPcoc+d+Eeb7kuVe16CS9z8=" } }, { "ip": -1185526007, "port": 4701, "id": { "@type": "pub.ed25519", "key": "G6cNAr6wXBBByWDzddEWP5xMFsAcp6y13fXA8Q7EJlM=" } } ], "validator": { "@type": "validator.config.global", "zero_state": { "workchain": -1, "shard": -9223372036854775808, "seqno": 0, "root_hash": "F6OpKZKqvqeFp6CQmFomXNMfMj2EnaUSOXN+Mh+wVWk=", "file_hash": "XplPz01CXAps5qeSWUtxcyBfdAo5zVb1N979KLSKD24=" }, "init_block": { "root_hash": "YRkrcmZMvLBvjanwKCyL3w4oceGPtFfgx8ym1QKCK/4=", "seqno": 27747086, "file_hash": "N42xzPnJjDlE3hxPXOb+pNzXomgRtpX5AZzMPnIA41s=", "workchain": -1, "shard": -9223372036854775808 }, "hardforks": [ { "file_hash": "t/9VBPODF7Zdh4nsnA49dprO69nQNMqYL+zk5bCjV/8=", "seqno": 8536841, "root_hash": "08Kpc9XxrMKC6BF/FeNHPS3MEL1/Vi/fQU/C9ELUrkc=", "workchain": -1, "shard": -9223372036854775808 } ] } } ================================================ FILE: config/api-config/mainnet-config-onetoone.json ================================================ { "@type": "config.global", "dht": { "@type": "dht.config.global", "k": 6, "a": 3, "static_nodes": { "@type": "dht.nodes", "nodes": [ { "@type": "dht.node", "id": { "@type": "pub.ed25519", "key": "6PGkPQSbyFp12esf1NqmDOaLoFA8i9+Mp5+cAx5wtTU=" }, "addr_list": { "@type": "adnl.addressList", "addrs": [ { "@type": "adnl.address.udp", "ip": -1185526007, "port": 22096 } ], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0 }, "version": -1, "signature": "L4N1+dzXLlkmT5iPnvsmsixzXU0L6kPKApqMdcrGP5d9ssMhn69SzHFK+yIzvG6zQ9oRb4TnqPBaKShjjj2OBg==" }, { "@type": "dht.node", "id": { "@type": "pub.ed25519", "key": "4R0C/zU56k+x2HGMsLWjX2rP/SpoTPIHSSAmidGlsb8=" }, "addr_list": { "@type": "adnl.addressList", "addrs": [ { "@type": "adnl.address.udp", "ip": -1952265919, "port": 14395 } ], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0 }, "version": -1, "signature": "0uwWyCFn2KjPnnlbSFYXLZdwIakaSgI9WyRo87J3iCGwb5TvJSztgA224A9kNAXeutOrXMIPYv1b8Zt8ImsrCg==" }, { "@type": "dht.node", "id": { "@type": "pub.ed25519", "key": "/YDNd+IwRUgL0mq21oC0L3RxrS8gTu0nciSPUrhqR78=" }, "addr_list": { "@type": "adnl.addressList", "addrs": [ { "@type": "adnl.address.udp", "ip": -1402455171, "port": 14432 } ], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0 }, "version": -1, "signature": "6+oVk6HDtIFbwYi9khCc8B+fTFceBUo1PWZDVTkb4l84tscvr5QpzAkdK7sS5xGzxM7V7YYQ6gUQPrsP9xcLAw==" }, { "@type": "dht.node", "id": { "@type": "pub.ed25519", "key": "DA0H568bb+LoO2LGY80PgPee59jTPCqqSJJzt1SH+KE=" }, "addr_list": { "@type": "adnl.addressList", "addrs": [ { "@type": "adnl.address.udp", "ip": -1402397332, "port": 14583 } ], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0 }, "version": -1, "signature": "cL79gDTrixhaM9AlkCdZWccCts7ieQYQBmPxb/R7d7zHw3bEHL8Le96CFJoB1KHu8C85iDpFK8qlrGl1Yt/ZDg==" }, { "@type": "dht.node", "id": { "@type": "pub.ed25519", "key": "fZnkoIAxrTd4xeBgVpZFRm5SvVvSx7eN3Vbe8c83YMk=" }, "addr_list": { "@type": "adnl.addressList", "addrs": [ { "@type": "adnl.address.udp", "ip": 1091897261, "port": 15813 } ], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0 }, "version": -1, "signature": "cmaMrV/9wuaHOOyXYjoxBnckJktJqrQZ2i+YaY3ehIyiL3LkW81OQ91vm8zzsx1kwwadGZNzgq4hI4PCB/U5Dw==" }, { "@type": "dht.node", "id": { "@type": "pub.ed25519", "key": "zDBLsKjns4bBqQokzY0wOzC2vwbOeiE1J7aOjfCp5mg=" }, "addr_list": { "@type": "adnl.addressList", "addrs": [ { "@type": "adnl.address.udp", "ip": -1573440928, "port": 12821 } ], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0 }, "version": -1, "signature": "qORMhem9RyG7wnNYF822YL3EXwEoTO82h2TarFbjd0jikMIGizAdir1JyxSfyKkhHdFKGcLMeoPb2dfMIvQwAA==" }, { "@type": "dht.node", "id": { "@type": "pub.ed25519", "key": "CU9ytJok8WBnpl29T740gfC/h69kgvQJp7FJMq/N60g=" }, "addr_list": { "@type": "adnl.addressList", "addrs": [ { "@type": "adnl.address.udp", "ip": 391653587, "port": 15895 } ], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0 }, "version": -1, "signature": "DKyGF2nPRxmerpIHxE5FN1Lod3zvJu728NP0iYc1hpNyPvl5epu+7amjimLy1VdzNqFzTJAoJ/gqPPMkXS/kDw==" }, { "@type": "dht.node", "id": { "@type": "pub.ed25519", "key": "MJr8xja0xpu9DoisFXBrkNHNx1XozR7HHw9fJdSyEdo=" }, "addr_list": { "@type": "adnl.addressList", "addrs": [ { "@type": "adnl.address.udp", "ip": -2018147130, "port": 6302 } ], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0 }, "version": -1, "signature": "XcR5JaWcf4QMdI8urLSc1zwv5+9nCuItSE1EDa0dSwYF15R/BtJoKU5YHA4/T8SiO18aVPQk2SL1pbhevuMrAQ==" }, { "@type": "dht.node", "id": { "@type": "pub.ed25519", "key": "Fhldu4zlnb20/TUj9TXElZkiEmbndIiE/DXrbGKu+0c=" }, "addr_list": { "@type": "adnl.addressList", "addrs": [ { "@type": "adnl.address.udp", "ip": -2018147075, "port": 6302 } ], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0 }, "version": -1, "signature": "nUGB77UAkd2+ZAL5PgInb3TvtuLLXJEJ2icjAUKLv4qIGB3c/O9k/v0NKwSzhsMP0ljeTGbcIoMDw24qf3goCg==" }, { "@type": "dht.node", "id": { "@type": "pub.ed25519", "key": "gzUNJnBJhdpooYCE8juKZo2y4tYDIQfoCvFm0yBr7y0=" }, "addr_list": { "@type": "adnl.addressList", "addrs": [ { "@type": "adnl.address.udp", "ip": 89013260, "port": 54390 } ], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0 }, "version": -1, "signature": "LCrCkjmkMn6AZHW2I+oRm1gHK7CyBPfcb6LwsltskCPpNECyBl1GxZTX45n0xZtLgyBd/bOqMPBfawpQwWt1BA==" }, { "@type": "dht.node", "id": { "@type": "pub.ed25519", "key": "jXiLaOQz1HPayilWgBWhV9xJhUIqfU95t+KFKQPIpXg=" }, "addr_list": { "@type": "adnl.addressList", "addrs": [ { "@type": "adnl.address.udp", "ip": 94452896, "port": 12485 } ], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0 }, "version": -1, "signature": "fKSZh9nXMx+YblkQXn3I/bndTD0JZ1yAtK/tXPIGruNglpe9sWMXR+8fy3YogPhLJMdjNiMom1ya+tWG7qvBAQ==" }, { "@type": "dht.node", "id": { "@type": "pub.ed25519", "key": "vhFPq+tgjJi+4ZbEOHBo4qjpqhBdSCzNZBdgXyj3NK8=" }, "addr_list": { "@type": "adnl.addressList", "addrs": [ { "@type": "adnl.address.udp", "ip": 85383775, "port": 36752 } ], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0 }, "version": -1, "signature": "kBwAIgJVkz8AIOGoZcZcXWgNmWq8MSBWB2VhS8Pd+f9LLPIeeFxlDTtwAe8Kj7NkHDSDC+bPXLGQZvPv0+wHCg==" }, { "@type": "dht.node", "id": { "@type": "pub.ed25519", "key": "sbsuMcdyYFSRQ0sG86/n+ZQ5FX3zOWm1aCVuHwXdgs0=" }, "addr_list": { "@type": "adnl.addressList", "addrs": [ { "@type": "adnl.address.udp", "ip": 759132846, "port": 50187 } ], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0 }, "version": -1, "signature": "9FJwbFw3IECRFkb9bA54YaexjDmlNBArimWkh+BvW88mjm3K2i5V2uaBPS3GubvXWOwdHLE2lzQBobgZRGMyCg==" }, { "@type": "dht.node", "id": { "@type": "pub.ed25519", "key": "aeMgdMdkkbkfAS4+n4BEGgtqhkf2/zXrVWWECOJ/h3A=" }, "addr_list": { "@type": "adnl.addressList", "addrs": [ { "@type": "adnl.address.udp", "ip": -1481887565, "port": 25975 } ], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0 }, "version": -1, "signature": "z5ogivZWpQchkS4UR4wB7i2pfOpMwX9Nd/USxinL9LvJPa+/Aw3F1AytR9FX0BqDftxIYvblBYAB5JyAmlj+AA==" }, { "@type": "dht.node", "id": { "@type": "pub.ed25519", "key": "rNzhnAlmtRn9rTzW6o2568S6bbOXly7ddO1olDws5wM=" }, "addr_list": { "@type": "adnl.addressList", "addrs": [ { "@type": "adnl.address.udp", "ip": -2134428422, "port": 45943 } ], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0 }, "version": -1, "signature": "sn/+ZfkfCSw2bHnEnv04AXX/Goyw7+StHBPQOdPr+wvdbaJ761D7hyiMNdQGbuZv2Ep2cXJpiwylnZItrwdUDg==" } ] } }, "liteservers": [ { "ip": 2886860802, "port": 43679, "id": { "@type": "pub.ed25519", "key": "NODEAPIKEY" } } ], "validator": { "@type": "validator.config.global", "zero_state": { "workchain": -1, "shard": -9223372036854775808, "seqno": 0, "root_hash": "F6OpKZKqvqeFp6CQmFomXNMfMj2EnaUSOXN+Mh+wVWk=", "file_hash": "XplPz01CXAps5qeSWUtxcyBfdAo5zVb1N979KLSKD24=" }, "init_block": { "root_hash": "YRkrcmZMvLBvjanwKCyL3w4oceGPtFfgx8ym1QKCK/4=", "seqno": 27747086, "file_hash": "N42xzPnJjDlE3hxPXOb+pNzXomgRtpX5AZzMPnIA41s=", "workchain": -1, "shard": -9223372036854775808 }, "hardforks": [ { "file_hash": "t/9VBPODF7Zdh4nsnA49dprO69nQNMqYL+zk5bCjV/8=", "seqno": 8536841, "root_hash": "08Kpc9XxrMKC6BF/FeNHPS3MEL1/Vi/fQU/C9ELUrkc=", "workchain": -1, "shard": -9223372036854775808 } ] } } ================================================ FILE: config/api-config/testnet-config-onetomany.json ================================================ { "liteservers": [ { "ip": 2886860802, "port": 43679, "id": { "@type": "pub.ed25519", "key": "NODEAPIKEY" } }, { "ip": 1592601963, "port": 13833, "id": { "@type": "pub.ed25519", "key": "QpVqQiv1u3nCHuBR3cg3fT6NqaFLlnLGbEgtBRukDpU=" } }, { "ip": 1097649206, "port": 29296, "id": { "@type": "pub.ed25519", "key": "p2tSiaeSqX978BxE5zLxuTQM06WVDErf5/15QToxMYA=" } }, { "ip": 1162057690, "port": 35939, "id": { "@type": "pub.ed25519", "key": "97y55AkdzXWyyVuOAn+WX6p66XTNs2hEGG0jFUOkCIo=" } }, { "ip": -1304477830, "port": 20700, "id": { "@type": "pub.ed25519", "key": "dGLlRRai3K9FGkI0dhABmFHMv+92QEVrvmTrFf5fbqA=" } }, { "ip": 1959453117, "port": 20700, "id": { "@type": "pub.ed25519", "key": "24RL7iVI20qcG+j//URfd/XFeEG9qtezW2wqaYQgVKw=" } }, { "ip": -809760973, "port": 20700, "id": { "@type": "pub.ed25519", "key": "vunMV7K35yPlTQPx/Fqk6s+4/h5lpcbP+ao0Cy3M2hw=" } }, { "ip": -1177439932, "port": 4695, "id": { "@type": "pub.ed25519", "key": "cZpMFqy6n0Lsu8x/z2Jq0wh/OdM1WAVJJKSb2CvDECQ=" } }, { "ip": -809760945, "port": 41718, "id": { "@type": "pub.ed25519", "key": "jA1X1pNB+ihJ4tziHTD8KxKWdQESRXjDb79TgvFFOZg=" } }, { "ip": 1162057633, "port": 59672, "id": { "@type": "pub.ed25519", "key": "WqVn3UcFKCLaGCVp1FOZ09duh13tRqUR+rTaA9Q9sW0=" } }, { "ip": -2018162320, "port": 22277, "id": { "@type": "pub.ed25519", "key": "1runGS/h6Pel2LRC46suIEKaOtAYWaDGA+cXeI4HXGo=" } }, { "ip": -2018162357, "port": 47938, "id": { "@type": "pub.ed25519", "key": "tmnh97x53cR/oejeISkTxkTyWznvIwUQrd2nZFpkbWE=" } }, { "ip": 1091914382, "port": 21335, "id": { "@type": "pub.ed25519", "key": "O8PmvAwKM7n5JAQaW+q8NWKiip89eh1u9FuJZWrGvgs=" } }, { "ip": 1091914380, "port": 46427, "id": { "@type": "pub.ed25519", "key": "JhXt7H1dZTgxQTIyGiYV4f9VUARuDxFl/1kVBjLSMB8=" } }, { "ip": 1097633201, "port": 17439, "id": { "@type": "pub.ed25519", "key": "0MIADpLH4VQn+INHfm0FxGiuZZAA8JfTujRqQugkkA8=" } }, { "ip": 1091956407, "port": 16351, "id": { "@type": "pub.ed25519", "key": "Mf/JGvcWAvcrN3oheze8RF/ps6p7oL6ifrIzFmGQFQ8=" } }, { "ip": -1185526389, "port": 64842, "id": { "@type": "pub.ed25519", "key": "cmpsvK5tBuW029x0WnLHV4NAzf5F0wxEagtbODtRvjI=" } }, { "ip": -1185526601, "port": 14321, "id": { "@type": "pub.ed25519", "key": "5AF8Wzaf+Kz9+6iPJ1JYdTwzA5n5j2hKaHRy6KAX1Sk=" } } ], "dht": { "a": 3, "k": 3, "static_nodes": { "nodes": [ { "@type": "dht.node", "id": { "@type": "pub.ed25519", "key": "K2AWu8leN2RjYmhMpYAaGX/F6nGVk9oZw9c09RX3yyc=" }, "addr_list": { "@type": "adnl.addressList", "addrs": [ { "@type": "adnl.address.udp", "ip": 1592601963, "port": 38723 } ], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0 }, "version": -1, "signature": "21g16jxnqbb2ENAijrZFccHqLQcmmpkAI1HA46DaPvnVYvMkATFNEyHTy2R1T1jgU5M7CCLGJN+MxhwZfl/ZDA==" }, { "@type": "dht.node", "id": { "@type": "pub.ed25519", "key": "fVIJzD9ATMilaPd847eFs6PtGSB67C+D9b4R+nf1+/s=" }, "addr_list": { "@type": "adnl.addressList", "addrs": [ { "@type": "adnl.address.udp", "ip": 1097649206, "port": 29081 } ], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0 }, "version": -1, "signature": "wH0HEVT6yAfZZAoD5bF6J3EZWdSFwBGl1ZpOfhxZ0Bp2u52tv8OzjeH8tlZ+geMLTG50Csn5nxSKP1tswTWwBg==" }, { "@type": "dht.node", "id": { "@type": "pub.ed25519", "key": "gu+woR+x7PoRmaMqAP7oeOjK2V4U0NU8ofdacWZ34aY=" }, "addr_list": { "@type": "adnl.addressList", "addrs": [ { "@type": "adnl.address.udp", "ip": 1162057690, "port": 41578 } ], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0 }, "version": -1, "signature": "0PwDLXpN3IbRQuOTLkZBjkbT6+IkeUcvlhWrUY9us3IfSehmCfQjScR9mkVYsQ6cQHF+JeaFmqzV4GAiUcgjAg==" }, { "@type": "dht.node", "id": { "@type": "pub.ed25519", "key": "WC4BO1eZ916FnLBSKmt07Pn5NP4D3/1wary1VjaCLaY=" }, "addr_list": { "@type": "adnl.addressList", "addrs": [ { "@type": "adnl.address.udp", "ip": -1304477830, "port": 9670 } ], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0 }, "version": -1, "signature": "cvpzkGeuEuKV+d92qIVkln9ngm8qeDnmYtK5rq8uSet0392hAZcIv2IniDzTw0rN42NaOHL9A4KEelwKu1N2Ag==" }, { "@type": "dht.node", "id": { "@type": "pub.ed25519", "key": "nC8dcxV+EV2i0ARvub94IFJKKZUYACfY4xFj1NaG7Pw=" }, "addr_list": { "@type": "adnl.addressList", "addrs": [ { "@type": "adnl.address.udp", "ip": 1959453117, "port": 63625 } ], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0 }, "version": -1, "signature": "AHF6joNvQhyFFE0itV4OMA9n3Q8CEHVKapCLqazP7QJ4arsn4pdVkRYiGFEyQkngx+cm8izU4gB0JIaxF6PiBg==" }, { "@type": "dht.node", "id": { "@type": "pub.ed25519", "key": "dqsRZLzTg/P7uxUlQpgl4VyTBNYBRMc4js3mnRiolBk=" }, "addr_list": { "@type": "adnl.addressList", "addrs": [ { "@type": "adnl.address.udp", "ip": -809760973, "port": 40398 } ], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0 }, "version": -1, "signature": "mJxLrAv5RamN5B9mDz6MhQwFjF92D3drJ5efOSZryDaazil0AR4bRHh4vxzZlYiPhi/X/NyG6WwNvKBz+1ntBw==" }, { "@type": "dht.node", "id": { "@type": "pub.ed25519", "key": "+U2zJXltAQVbgOepQdkam7sJAAdDboxlwvkTG4Oih04=" }, "addr_list": { "@type": "adnl.addressList", "addrs": [ { "@type": "adnl.address.udp", "ip": 1959448750, "port": 60982 } ], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0 }, "version": -1, "signature": "sVdFJxk2SG/Wjh35x4yKnuZzzXyQgmuK/FLy0wge3qGHCs6Wg5HhhxU1WnpgXPLIGXfjVKN7Ud0L1APlgVmuDg==" }, { "@type": "dht.node", "id": { "@type": "pub.ed25519", "key": "VFerQdFbdGKfJ8srPW0FpHoB6DJUTnHaRYifYfPqXzE=" }, "addr_list": { "@type": "adnl.addressList", "addrs": [ { "@type": "adnl.address.udp", "ip": -1177439932, "port": 3133 } ], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0 }, "version": -1, "signature": "QKgnmn4H1iQTR6QEOMyp8rV37NedgUHahYJvTKRwTYAOGiFXGu1reRrRaq7mzM+zgKXi8v9kqILtKObT48MEDg==" }, { "@type": "dht.node", "id": { "@type": "pub.ed25519", "key": "xaRwNOh8z5Wqanm0N9QfUTORDlBnsKSZkmO1x+7WhBE=" }, "addr_list": { "@type": "adnl.addressList", "addrs": [ { "@type": "adnl.address.udp", "ip": -809760945, "port": 3471 } ], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0 }, "version": -1, "signature": "XreTKe+83259q5eVazVnir4HVJEKEIqOHY7Spq1xaRQlSvZ7r4kAtoOiZyC8fWPUJL0wATCNlWKbpQI17pZuCA==" }, { "@type": "dht.node", "id": { "@type": "pub.ed25519", "key": "agRR8dvLfWljbv9gTaRMz0d6rBW/B7ctU/Iuju9vWyE=" }, "addr_list": { "@type": "adnl.addressList", "addrs": [ { "@type": "adnl.address.udp", "ip": 1162057633, "port": 14512 } ], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0 }, "version": -1, "signature": "s+fgBe5JdJ7mp+kNqz+8IymONylKHvyw/4V2X3YaVSQVTwoGoPaHnsWClgKlcR9rQlGh08uvBfva5ag6B+cvCQ==" }, { "@type": "dht.node", "id": { "@type": "pub.ed25519", "key": "g3TiYRaF9TiBN3nVcC24RxQ5cWZof1SiMBPFA1U0S/s=" }, "addr_list": { "@type": "adnl.addressList", "addrs": [ { "@type": "adnl.address.udp", "ip": -1185526389, "port": 42157 } ], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0 }, "version": -1, "signature": "JmhNp8zAcSHFuCY/s8YlOA913PGMgnFkw9+46PgdLl0TNly954utbSi6kmjzUtZrgtJpADpDWjPMsZMs229KCQ==" }, { "@type": "dht.node", "id": { "@type": "pub.ed25519", "key": "qD1h6vP4bV7V4iVumMewyLW0nU0Kq63Ibmk6Yb+TO4I=" }, "addr_list": { "@type": "adnl.addressList", "addrs": [ { "@type": "adnl.address.udp", "ip": -1185526601, "port": 56373 } ], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0 }, "version": -1, "signature": "yUcNKXgIBBSV4kXszvkyggltBdqS+PmD9Sc+8tGRkTv+oCQJsueCEEfuIWu2Rbh4KI6oHREI7artXAI+gP3cDQ==" }, { "@type": "dht.node", "id": { "@type": "pub.ed25519", "key": "fO6cFYRCRrD+yQzOJdHcNWpRFwu+qLhQnddLq0gGbTs=" }, "addr_list": { "@type": "adnl.addressList", "addrs": [ { "@type": "adnl.address.udp", "ip": 1097633201, "port": 7201 } ], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0 }, "version": -1, "signature": "o/rhtiUL3rvA08TKBcCn0DCiSjsNQdAv41aw7VVUig7ubaqJzYMv1cW3qMjxvsXn1BOugIheJm7voA1/brbtCg==" }, { "provided": "disintar", "@type": "dht.node", "id": { "@type": "pub.ed25519", "key": "GB1pg7eomnjKAGIts8okGw1Whe2zgie/+fTEWG7Q13g=" }, "addr_list": { "@type": "adnl.addressList", "addrs": [ { "@type": "adnl.address.udp", "ip": 1336806917, "port": 30224 } ], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0 }, "version": -1, "signature": "w4yGCNvlFdHef0TWF5jPb1gfTnOmhQ58Z6kxbbx2LOjnyISuKIk9jHHMWnFS63J+Nw/R71rhRVtO2pcMwXLjBw==" } ], "@type": "dht.nodes" }, "@type": "dht.config.global" }, "@type": "config.global", "validator": { "zero_state": { "file_hash": "Z+IKwYS54DmmJmesw/nAD5DzWadnOCMzee+kdgSYDOg=", "seqno": 0, "root_hash": "gj+B8wb/AmlPk1z1AhVI484rhrUpgSr2oSFIh56VoSg=", "workchain": -1, "shard": -9223372036854775808 }, "@type": "validator.config.global", "init_block": { "file_hash": "xRaxgUwgTXYFb16YnR+Q+VVsczLl6jmYwvzhQ/ncrh4=", "seqno": 5176527, "root_hash": "SoPLqMe9Dz26YJPOGDOHApTSe5i0kXFtRmRh/zPMGuI=", "workchain": -1, "shard": -9223372036854775808 }, "hardforks": [ { "file_hash": "jF3RTD+OyOoP+OI9oIjdV6M8EaOh9E+8+c3m5JkPYdg=", "seqno": 5141579, "root_hash": "6JSqIYIkW7y8IorxfbQBoXiuY3kXjcoYgQOxTJpjXXA=", "workchain": -1, "shard": -9223372036854775808 }, { "file_hash": "WrNoMrn5UIVPDV/ug/VPjYatvde8TPvz5v1VYHCLPh8=", "seqno": 5172980, "root_hash": "054VCNNtUEwYGoRe1zjH+9b1q21/MeM+3fOo76Vcjes=", "workchain": -1, "shard": -9223372036854775808 }, { "file_hash": "xRaxgUwgTXYFb16YnR+Q+VVsczLl6jmYwvzhQ/ncrh4=", "seqno": 5176527, "root_hash": "SoPLqMe9Dz26YJPOGDOHApTSe5i0kXFtRmRh/zPMGuI=", "workchain": -1, "shard": -9223372036854775808 } ] } } ================================================ FILE: config/api-config/testnet-config-onetoone.json ================================================ { "liteservers": [ { "ip": 2886860802, "port": 43679, "id": { "@type": "pub.ed25519", "key": "NODEAPIKEY" } } ], "dht": { "a": 3, "k": 3, "static_nodes": { "nodes": [ { "@type": "dht.node", "id": { "@type": "pub.ed25519", "key": "K2AWu8leN2RjYmhMpYAaGX/F6nGVk9oZw9c09RX3yyc=" }, "addr_list": { "@type": "adnl.addressList", "addrs": [ { "@type": "adnl.address.udp", "ip": 1592601963, "port": 38723 } ], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0 }, "version": -1, "signature": "21g16jxnqbb2ENAijrZFccHqLQcmmpkAI1HA46DaPvnVYvMkATFNEyHTy2R1T1jgU5M7CCLGJN+MxhwZfl/ZDA==" }, { "@type": "dht.node", "id": { "@type": "pub.ed25519", "key": "fVIJzD9ATMilaPd847eFs6PtGSB67C+D9b4R+nf1+/s=" }, "addr_list": { "@type": "adnl.addressList", "addrs": [ { "@type": "adnl.address.udp", "ip": 1097649206, "port": 29081 } ], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0 }, "version": -1, "signature": "wH0HEVT6yAfZZAoD5bF6J3EZWdSFwBGl1ZpOfhxZ0Bp2u52tv8OzjeH8tlZ+geMLTG50Csn5nxSKP1tswTWwBg==" }, { "@type": "dht.node", "id": { "@type": "pub.ed25519", "key": "gu+woR+x7PoRmaMqAP7oeOjK2V4U0NU8ofdacWZ34aY=" }, "addr_list": { "@type": "adnl.addressList", "addrs": [ { "@type": "adnl.address.udp", "ip": 1162057690, "port": 41578 } ], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0 }, "version": -1, "signature": "0PwDLXpN3IbRQuOTLkZBjkbT6+IkeUcvlhWrUY9us3IfSehmCfQjScR9mkVYsQ6cQHF+JeaFmqzV4GAiUcgjAg==" }, { "@type": "dht.node", "id": { "@type": "pub.ed25519", "key": "WC4BO1eZ916FnLBSKmt07Pn5NP4D3/1wary1VjaCLaY=" }, "addr_list": { "@type": "adnl.addressList", "addrs": [ { "@type": "adnl.address.udp", "ip": -1304477830, "port": 9670 } ], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0 }, "version": -1, "signature": "cvpzkGeuEuKV+d92qIVkln9ngm8qeDnmYtK5rq8uSet0392hAZcIv2IniDzTw0rN42NaOHL9A4KEelwKu1N2Ag==" }, { "@type": "dht.node", "id": { "@type": "pub.ed25519", "key": "nC8dcxV+EV2i0ARvub94IFJKKZUYACfY4xFj1NaG7Pw=" }, "addr_list": { "@type": "adnl.addressList", "addrs": [ { "@type": "adnl.address.udp", "ip": 1959453117, "port": 63625 } ], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0 }, "version": -1, "signature": "AHF6joNvQhyFFE0itV4OMA9n3Q8CEHVKapCLqazP7QJ4arsn4pdVkRYiGFEyQkngx+cm8izU4gB0JIaxF6PiBg==" }, { "@type": "dht.node", "id": { "@type": "pub.ed25519", "key": "dqsRZLzTg/P7uxUlQpgl4VyTBNYBRMc4js3mnRiolBk=" }, "addr_list": { "@type": "adnl.addressList", "addrs": [ { "@type": "adnl.address.udp", "ip": -809760973, "port": 40398 } ], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0 }, "version": -1, "signature": "mJxLrAv5RamN5B9mDz6MhQwFjF92D3drJ5efOSZryDaazil0AR4bRHh4vxzZlYiPhi/X/NyG6WwNvKBz+1ntBw==" }, { "@type": "dht.node", "id": { "@type": "pub.ed25519", "key": "+U2zJXltAQVbgOepQdkam7sJAAdDboxlwvkTG4Oih04=" }, "addr_list": { "@type": "adnl.addressList", "addrs": [ { "@type": "adnl.address.udp", "ip": 1959448750, "port": 60982 } ], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0 }, "version": -1, "signature": "sVdFJxk2SG/Wjh35x4yKnuZzzXyQgmuK/FLy0wge3qGHCs6Wg5HhhxU1WnpgXPLIGXfjVKN7Ud0L1APlgVmuDg==" }, { "@type": "dht.node", "id": { "@type": "pub.ed25519", "key": "VFerQdFbdGKfJ8srPW0FpHoB6DJUTnHaRYifYfPqXzE=" }, "addr_list": { "@type": "adnl.addressList", "addrs": [ { "@type": "adnl.address.udp", "ip": -1177439932, "port": 3133 } ], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0 }, "version": -1, "signature": "QKgnmn4H1iQTR6QEOMyp8rV37NedgUHahYJvTKRwTYAOGiFXGu1reRrRaq7mzM+zgKXi8v9kqILtKObT48MEDg==" }, { "@type": "dht.node", "id": { "@type": "pub.ed25519", "key": "xaRwNOh8z5Wqanm0N9QfUTORDlBnsKSZkmO1x+7WhBE=" }, "addr_list": { "@type": "adnl.addressList", "addrs": [ { "@type": "adnl.address.udp", "ip": -809760945, "port": 3471 } ], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0 }, "version": -1, "signature": "XreTKe+83259q5eVazVnir4HVJEKEIqOHY7Spq1xaRQlSvZ7r4kAtoOiZyC8fWPUJL0wATCNlWKbpQI17pZuCA==" }, { "@type": "dht.node", "id": { "@type": "pub.ed25519", "key": "agRR8dvLfWljbv9gTaRMz0d6rBW/B7ctU/Iuju9vWyE=" }, "addr_list": { "@type": "adnl.addressList", "addrs": [ { "@type": "adnl.address.udp", "ip": 1162057633, "port": 14512 } ], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0 }, "version": -1, "signature": "s+fgBe5JdJ7mp+kNqz+8IymONylKHvyw/4V2X3YaVSQVTwoGoPaHnsWClgKlcR9rQlGh08uvBfva5ag6B+cvCQ==" }, { "@type": "dht.node", "id": { "@type": "pub.ed25519", "key": "g3TiYRaF9TiBN3nVcC24RxQ5cWZof1SiMBPFA1U0S/s=" }, "addr_list": { "@type": "adnl.addressList", "addrs": [ { "@type": "adnl.address.udp", "ip": -1185526389, "port": 42157 } ], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0 }, "version": -1, "signature": "JmhNp8zAcSHFuCY/s8YlOA913PGMgnFkw9+46PgdLl0TNly954utbSi6kmjzUtZrgtJpADpDWjPMsZMs229KCQ==" }, { "@type": "dht.node", "id": { "@type": "pub.ed25519", "key": "qD1h6vP4bV7V4iVumMewyLW0nU0Kq63Ibmk6Yb+TO4I=" }, "addr_list": { "@type": "adnl.addressList", "addrs": [ { "@type": "adnl.address.udp", "ip": -1185526601, "port": 56373 } ], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0 }, "version": -1, "signature": "yUcNKXgIBBSV4kXszvkyggltBdqS+PmD9Sc+8tGRkTv+oCQJsueCEEfuIWu2Rbh4KI6oHREI7artXAI+gP3cDQ==" }, { "@type": "dht.node", "id": { "@type": "pub.ed25519", "key": "fO6cFYRCRrD+yQzOJdHcNWpRFwu+qLhQnddLq0gGbTs=" }, "addr_list": { "@type": "adnl.addressList", "addrs": [ { "@type": "adnl.address.udp", "ip": 1097633201, "port": 7201 } ], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0 }, "version": -1, "signature": "o/rhtiUL3rvA08TKBcCn0DCiSjsNQdAv41aw7VVUig7ubaqJzYMv1cW3qMjxvsXn1BOugIheJm7voA1/brbtCg==" }, { "provided": "disintar", "@type": "dht.node", "id": { "@type": "pub.ed25519", "key": "GB1pg7eomnjKAGIts8okGw1Whe2zgie/+fTEWG7Q13g=" }, "addr_list": { "@type": "adnl.addressList", "addrs": [ { "@type": "adnl.address.udp", "ip": 1336806917, "port": 30224 } ], "version": 0, "reinit_date": 0, "priority": 0, "expire_at": 0 }, "version": -1, "signature": "w4yGCNvlFdHef0TWF5jPb1gfTnOmhQ58Z6kxbbx2LOjnyISuKIk9jHHMWnFS63J+Nw/R71rhRVtO2pcMwXLjBw==" } ], "@type": "dht.nodes" }, "@type": "dht.config.global" }, "@type": "config.global", "validator": { "zero_state": { "file_hash": "Z+IKwYS54DmmJmesw/nAD5DzWadnOCMzee+kdgSYDOg=", "seqno": 0, "root_hash": "gj+B8wb/AmlPk1z1AhVI484rhrUpgSr2oSFIh56VoSg=", "workchain": -1, "shard": -9223372036854775808 }, "@type": "validator.config.global", "init_block": { "file_hash": "xRaxgUwgTXYFb16YnR+Q+VVsczLl6jmYwvzhQ/ncrh4=", "seqno": 5176527, "root_hash": "SoPLqMe9Dz26YJPOGDOHApTSe5i0kXFtRmRh/zPMGuI=", "workchain": -1, "shard": -9223372036854775808 }, "hardforks": [ { "file_hash": "jF3RTD+OyOoP+OI9oIjdV6M8EaOh9E+8+c3m5JkPYdg=", "seqno": 5141579, "root_hash": "6JSqIYIkW7y8IorxfbQBoXiuY3kXjcoYgQOxTJpjXXA=", "workchain": -1, "shard": -9223372036854775808 }, { "file_hash": "WrNoMrn5UIVPDV/ug/VPjYatvde8TPvz5v1VYHCLPh8=", "seqno": 5172980, "root_hash": "054VCNNtUEwYGoRe1zjH+9b1q21/MeM+3fOo76Vcjes=", "workchain": -1, "shard": -9223372036854775808 }, { "file_hash": "xRaxgUwgTXYFb16YnR+Q+VVsczLl6jmYwvzhQ/ncrh4=", "seqno": 5176527, "root_hash": "SoPLqMe9Dz26YJPOGDOHApTSe5i0kXFtRmRh/zPMGuI=", "workchain": -1, "shard": -9223372036854775808 } ] } } ================================================ FILE: config/node-assets/control.template ================================================ "control" : [ { "id" : SERVER-ID, "port" : CONSOLE-PORT, "allowed" : [ { "id" : CLIENT-ID, "permissions" : 15 } ] } ================================================ FILE: config/node-assets/init.sh ================================================ #!/usr/bin/env bash # Handling for the initial node setup # Download the global config if [ -f "./ton-global.config" ]; then echo -e "\e[1;33m[=]\e[0m Found existing global config, skipping" else echo -e "\e[1;32m[+]\e[0m Downloading provided global config." wget -q $GCONFURL -O /var/ton-work/db/ton-global.config fi # Init local config with IP:PORT if [ -f "./config.json" ]; then echo -e "\e[1;33m[=]\e[0m Found existing local config, skipping" else echo -e "\e[1;32m[+]\e[0m Using provided IP: $PUBLIC_IP:$CONSOLE_PORT" /usr/bin/ton/validator-engine/validator-engine -C /var/ton-work/db/ton-global.config --db /var/ton-work/db --ip "$PUBLIC_IP:$CONSOLE_PORT" fi # Generating server certificate if [ -f "./server" ]; then echo -e "\e[1;33m[=]\e[0m Found existing server certificate, skipping" else echo -e "\e[1;32m[+]\e[0m Generating and installing server certificate for remote control" read -r SERVER_ID1 SERVER_ID2 <<< $(/usr/bin/ton/utils/generate-random-id -m keys -n server) echo "Server IDs: $SERVER_ID1 $SERVER_ID2" cp server /var/ton-work/db/keyring/$SERVER_ID1 fi # Generating client certificate if [ -f "./client" ]; then echo -e "\e[1;33m[=]\e[0m Found existing client certificate, skipping" else read -r CLIENT_ID1 CLIENT_ID2 <<< $(/usr/bin/ton/utils/generate-random-id -m keys -n client) echo -e "\e[1;32m[+]\e[0m Generated client private certificate $CLIENT_ID1 $CLIENT_ID2" echo -e "\e[1;32m[+]\e[0m Generated client public certificate" # Adding client permissions sed -e "s/CONSOLE-PORT/\"$(printf "%q" $CONSOLE_PORT)\"/g" -e "s~SERVER-ID~\"$(printf "%q" $SERVER_ID2)\"~g" -e "s~CLIENT-ID~\"$(printf "%q" $CLIENT_ID2)\"~g" /var/ton-work/db/control.template > /var/ton-work/db/control.new sed -e "s~\"control\"\ \:\ \[~$(printf "%q" $(cat control.new))~g" /var/ton-work/db/config.json > /var/ton-work/db/config.json.new mv /var/ton-work/db/config.json.new /var/ton-work/db/config.json fi # Liteserver if [ -z "$LITESERVER" ]; then echo -e "\e[1;33m[=]\e[0m Liteserver disabled" else if [ -f "./liteserver" ]; then echo -e "\e[1;33m[=]\e[0m Found existing liteserver certificate, skipping" else echo -e "\e[1;32m[+]\e[0m Generating and installing liteserver certificate for remote control" read -r LITESERVER_ID1 LITESERVER_ID2 <<< $(/usr/bin/ton/utils/generate-random-id -m keys -n liteserver) echo "Liteserver IDs: $LITESERVER_ID1 $LITESERVER_ID2" cp liteserver /var/ton-work/db/keyring/$LITESERVER_ID1 if [ -z "$LITE_PORT" ]; then LITE_PORT="43679" fi LITESERVERS=$(printf "%q" "\"liteservers\":[{\"id\":\"$LITESERVER_ID2\",\"port\":\"$LITE_PORT\"}") sed -e "s~\"liteservers\"\ \:\ \[~$LITESERVERS~g" config.json > config.json.liteservers mv config.json.liteservers config.json fi fi echo -e "\e[1;32m[+]\e[0m Running validator-engine" exec /usr/bin/ton/validator-engine/validator-engine -c /var/ton-work/db/config.json -C /var/ton-work/db/ton-global.config --db /var/ton-work/db ================================================ FILE: docker-compose.yml ================================================ version: '3.7' services: ton-node: build: context: build dockerfile: Dockerfile.node args: VER: ${NODE_VERSION} image: ton-node:${NODE_VERSION} restart: always ports: - ${NODE_CONSOLE_PORT}:${NODE_CONSOLE_PORT} - ${NODE_CONSOLE_PORT}:${NODE_CONSOLE_PORT}/udp - ${NODE_LITESERVER_PORT}:${NODE_LITESERVER_PORT} - ${NODE_LITESERVER_PORT}:${NODE_LITESERVER_PORT}/udp volumes: - ${NODE_STATE_VOLUME}:/var/ton-work/db - ${NODE_LOG_VOLUME}:/var/ton-work/log environment: GCONFURL: ${NODE_CONFIG_URL} PUBLIC_IP: ${NODE_PUBLIC_IP} LITESERVER: ${NODE_LITESERVER} LITE_PORT: ${NODE_LITESERVER_PORT} CONSOLE_PORT: ${NODE_CONSOLE_PORT} networks: ton-network: ipv4_address: 172.18.0.2 ton-api: build: context: build dockerfile: Dockerfile.api args: VER: ${API_VERSION} image: ton-api restart: always ports: - 8081:8081 volumes: - ${API_CONF_VOLUME}:/conf environment: TON_API_CACHE_ENABLED: ${API_CACHE_ENABLED} TON_API_LOGS_JSONIFY: ${API_LOGS_JSONIFY} TON_API_LOGS_LEVEL: ${API_LOGS_LEVEL} TON_API_TONLIB_LITESERVER_CONFIG: ${API_TONLIB_LITESERVER_CONFIG} TON_API_TONLIB_PARALLEL_REQUESTS_PER_LITESERVER: ${API_TONLIB_PARALLEL_REQUESTS_PER_LITESERVER} TON_API_TONLIB_REQUEST_TIMEOUT: ${API_TONLIB_REQUEST_TIMEOUT} TON_API_GET_METHODS_ENABLED: ${API_GET_METHODS_ENABLED} TON_API_JSON_RPC_ENABLED: ${API_JSON_RPC_ENABLED} TON_API_ROOT_PATH: ${API_ROOT_PATH} command: -c "gunicorn -k uvicorn.workers.UvicornWorker -w 1 --bind 0.0.0.0:8081 pyTON.main:app" networks: ton-network: ipv4_address: 172.18.0.3 networks: ton-network: driver: bridge ipam: config: - subnet: 172.18.0.0/24