[Testing guide] Redundant chain nodes #9449
Unanswered
rjan90
asked this question in
Storage Provider
Replies: 1 comment 3 replies
-
what exactly do people need to clone/merge to make this work? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
We are currently testing the Raft Consenus / Redundant Lotus nodes internally, you can see the PR here: #9294. We plan to test this feature over the next couple of weeks/month, but thought it would be a good idea to release some setup steps for testing this in a local developer network if someone feels adventurous. 🔬🧪
N.B: this tutorial is itself a WIP/was written in one go, so it might jump som prerequisite steps, some steps might be redundant, and all steps might not be necessary in your case.
Setup a lotus network consisting of a single lotus node + lotus-miner
git checkout sbansal/nonce-coordination-and-consensus-for-chain-nodes
instead of the master-branch, or a stable release.Lotus node setup
section.Now that you’ve got everything setup, you can start the first lotus daemon and the lotus-miner.
lotus
node andlotus-miner
running on a local network.config.toml
file, so we need to stop the local network. Before shutting things down, check that thelotus-miner
is not running behind the chain with thelotus-miner info
command.Stop the lotus-miner first, before you stop the lotus daemon node.
4. In the
.lotus-local-net
folder, uncomment and change the[API] ListenAddress
and the[Libp2p] ListenAddress
of the node:lotus-miner
and confirm the LibP2P multiaddress is similar to the one in the config.toml file when you runlotus net listen
.Setup the second Lotus node
lotus-local-net
folder.LOTUS_PATH=/Users/phi/.lotus-local-net2
./lotus daemon --genesis=devgen.car
. The node should initilize in the new path and you should see this error log:2022-10-07T15:21:31.980+0200 WARN peermgr peermgr/peermgr.go:205 no peers connected, and no bootstrappers configured
[API] ListenAddress
and the[Libp2p] ListenAddress
in the config.toml file in the.lotus-local-net2
folder of this second node../lotus daemon --genesis=devgen.car
./lotus net connect /ip4/127.0.0.1/tcp/2222/p2p/12D3xxxxxxxxxxsbD
lotus sync wait
.Setup the third Lotus node
LOTUS_PATH=/Users/phi/.lotus-local-net3
and configure the[API] ListenAddress
and the[Libp2p] ListenAddress
in the config.toml to this:Configuring Raft Consensus / Redundant Chain nodes
As you may have noticed, there is now a new section in the
config.toml
file for the lotus node, called[Raft]
.You can get the multiaddress for your nodes by checking the outout of
lotus net listen
for all three daemons.lotus-miner
unset any LOTUS_PATH enviroment variables, and add the full node api info for the three deamons:export FULLNODE_API_INFO=<node0_info>,<node1_info>,<node2_info>
. You can get API-keys for each node bylotus auth create-token --perm admin
. The format for each nodes info is like this:export FULLNODE_API_INFO=<api_token>:/ip4/<lotus_daemon_ip>/tcp/<lotus_daemon_port>/http
You can also check who is the leader with:
./lotus-shed rpc RaftLeader
Thats it for now, I will come back with more later, until then; Happy Testing!! 👨🔬👩🔬
Beta Was this translation helpful? Give feedback.
All reactions