This command creates a 4-node network using the realio-network/node Docker image. The ports for each node are found in this table:
Node ID
P2P Port
Tendermint RPC Port
REST/ Ethereum JSON-RPC Port
WebSocket Port
realionetworknode0
26656
26657
8545
8546
realionetworknode1
26659
26660
8547
8548
realionetworknode2
26661
26662
8549
8550
realionetworknode3
26663
26664
8551
8552
To update the binary, just rebuild it and restart the nodes
make localnet-start
The command above command will run containers in the background using Docker compose. You will see the network being created:
...
Network realio-network_localnet Created
Container realionetworknode1 Started
Container realionetworknode2 Started
Container realionetworknode3 Started
Container realionetworknode4 Started
Once you are done, execute:
make localnet-stop
The make localnet-start creates files for a 4-node testnet in ./build by calling the realio-networkd testnet command. This outputs a handful of files in the ./build directory:
Whereas the logs for the REST & RPC server would look like:
I[2020-07-30|09:39:17.488] Starting application REST service (chain-id: "7305661614933169792")... module=rest-server
I[2020-07-30|09:39:17.488] Starting RPC HTTP server on 127.0.0.1:8545 module=rest-server
...
To interact with the testnet via WebSockets or RPC/API, you will send your request to the corresponding ports:
EVM JSON-RPC
Eth Websocket
8545
8546
You can send a curl command such as:
curl -X POST --data '{"jsonrpc":"2.0","method":"eth_accounts","params":[],"id":1}' -H "Content-Type: application/json" 192.162.10.1:8545
TIP
The IP address will be the public IP of the docker container.
To interact with realio-networkd and start querying state or creating txs, you use the realio-network directory of any given node as your home, for example:
realio-networkd keys list --home ./build/node0/realio-network
Now that accounts exists, you may create new accounts and send those accounts funds!
TIPNote: Each node's seed is located at ./build/nodeN/realio-network/key_seed.json and can be restored to the CLI using the realio-networkd keys add --restore command
If you have multiple binaries with different names, you can specify which one to run with the BINARY environment variable. The path of the binary is relative to the attached volume. For example:
# Run with custom binary
BINARY=realio-networkd make localnet-start