A simple lite-server that can be used for block streaming and serving account states.
Install dependencies:
sudo apt install build-essential git libssl-dev zlib1g-dev pkg-config clangBuild and run the node:
# Install.
git clone https://github.com/broxus/tycho-tonapi.git
cd tycho-tonapi
cargo install --path . --locked
# Generate and edit the default config.
tycho-tonapi run --init-config config.json
# Download the latest global config (e.g. for tycho testnet).
wget -O global-config.json https://testnet.tychoprotocol.com/global-config.json
# Start the node.
tycho-tonapi run \
--config config.json \
--global-config global-config.json \
--keys keys.json \
--cold-boot latest-persistent # or `genesis` to sync from the zerostateBy default the node will listen on the following addresses:
0.0.0.0:30000/UDPfor the node itself (.local_ipand.portfields in the config);127.0.0.1:10000/TCPfor prometheus exporter (.metrics.listen_addrfield in the config);127.0.0.1:50051/TCPfor the gRPC server (.grpc.listen_addrfield in the config).
python -m venv .venv
source .venv/bin/activate
pip install -r ./scripts/requirements.txt
python ./scripts/gen-dashboard.py > dashboard.jsonThe node can pull archives not only from the blockchain, but also from a custom S3 bucket. To use this feature, you need to specify the S3 client settings in the config:
{
...
"s3_client": {
"region": "europe-west1",
"endpoint": "https://storage.googleapis.com",
"bucket": "your-archives-bucket",
"credentials": {
"access_key": "GOOG1EACCESSKEY123",
"secret_key": "verySecretKey"
}
}
...
}We welcome contributions to the project! If you notice any issues or errors, feel free to open an issue or submit a pull request.
Licensed under MIT license (LICENSE or https://opensource.org/licenses/MIT).