The information on this page is for people who will help launch and validate on the RChain public mainnet.
CPU: 4-8 Cores
Memory: 16-32 GB
This is the setup for non-docker rnode, but rnode for docker (windows) works equivalent:
Remove cache (do this always, when you switch the network)
rm -Rf ~/.rnode/
Create Validator (-s means standalone)
./rnode run -s --map-size 1099511627776
This creates a new DAG with a new genesis block having 5 validators in bonds list, as you can observe if you look into RNode output. You always need at least 5 validators, otherwise the genesis ceremony wont start. You can find private and public keys for these validators in ~/.rnode/genesis/. The name of *.sk file is a public key and private key is residing inside.
Now you can kill (Ctrl+C) your node and restart it in validator mode using one of private keys.
./rnode run -s --map-size 1099511627776 --validator-private-key $(cat ~/.rnode/genesis/*.sk | tail -1)
As the private key used to start a node matches the public key of a bonded validator in existing genesis block, your node is allowed to add new blocks on top of it. Deploy some code to your node.
./rnode deploy --private-key <deployer_private_key> --phlo-limit <value> --phlo-price <value> <file.rho>
Do not confuse deployer_private_key
with validator key used to start a node. This should be a different key which will pay for deploy execution. For testing purposes you can set --phlo-limit
1000000 and --phlo-price 1
.
You should see response with a deployID DeployId is: 3044022100a65b2c5d890ed53174fcd9f53f150756c9ff4b37e0a4137f025d53ec418c1894021f18c42eccf307b27e6159606e92ca4e96f4b9688b6b95ee05944c8794b0dd76
And call your node to propose a block.
./rnode propose
You should see a hash of block created. Response: Success! Block 8b70f0c681... created and added.
RNode features integration with Prometheus. These instructions describe a method for getting started with RNode metrics collection and display using Prometheus via Docker-compose.
To support debugging we have a process to collect information from the node and use it in graphviz to create a visualization of the DAG. Below are instructions for two methods for using this tool.
Once an active network has been running for a few hours, your call to vdag will likely generate >6,000 lines of output. In this scenario, you will need to have installed the Graphviz software and use it to create a .png file. Please see https://www.graphviz.org/download/ for information about installing and running Graphviz.
Once installed use the following command to generate a .png file based on vdag output.
rnode vdag | dot -Tpng >vdag.png
You can create your own blockchain network.
Prerequisites for a private blockchain
Steps to create a private blockchain