How to set up a Tosi node
This section explains how to set up, run, and verify Tosi nodes. Before you begin, reading Introduction to Tosi is highly recommended.
Objectives
Set up Tosi node
Run and verify Tosi node
Prerequisites
Docker and docker-compose
A stable internet connection
Linux Virtual Machine
Setting up
Before running the node, you must set up the following:
Clone Tosi repo from GitHub
Navigate to the tosi folder
Update and initialize all submodules
Starting and running a node
After successfully completing the setup steps outlined above, you can begin running the Mainnet node by executing the following commands:
Build containers
Generate key
To generate your private key, run the commands below:
Next, create an .env
file at the root directory, and add the following line: TOSI_CLIENT_BLS_SEC_KEY=xxxxxxxxx
, where xxxxxxxxx
is the BLS_SEC_KEY you generated above.
Starting the node
Once all the services have started up, they should report a status of 'Healthy'. If any of the services fail to start up, you can use the 'docker logs' to investigate and diagnose the issue.
To stop the node from running, use the command below:
Node sync status
After all the services are running successfully, you can check the node sync status by running the command:
After, the output will look like this example:
Test token/staking
Send your BLS Public Key output to get test tokens on our Discord channel. Staking on TosichainTestnet
You can choose to stake as either a DA verifier or a State verifier. As a DA verifier, you're in a waiting position to be selected for two tasks: to confirm if the data is accessible (data availability), and to compute the Merkle tree roots for the data. To stake, run the command:
Replace <amount>
with the number of tokens you want to stake, and <nonce>
with your account's nonce value incremented by 1.
And to unstake, use the command:
Alternatively, if you stake as a State verifier, your role involves downloading the necessary data, executing calculations on this data, and standing ready to confirm the validity of your results if challenged.
To stake as a state verifier, run:
And to unstake, run:
You can check your account balance and the status of your stake by running this command:
Replace <address>
with your BLS public key
Last updated