-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to lightchain Start multi-node ??? #197
Comments
Hi @liuqihang You can run as many local nodes as you wish but you have to manually specify different ports for each of the connectivities across inner services and across peers. You can see more about which ports are being used here. You can try to run two nodes using the following flags.
|
@ggarri ,Thank you for your answer。 |
Hi @liuqihang I am not sure of what is your issue. Are you trying to create a private network using lightchain? If so, you need to create your own:
To do that you could initialize two new nodes using:
Then you have to copy those two genesis files from node1 to node2 (or in the other way around):
And at last you need to edit the consensus config of both nodes to add the peer ids by editing
To know which is the
Then, at the output you have the "id", which corresponds to the CONSENSUS_NODE_ID. Remember that you need to repeat that process for both nodes and the ports might change depending on your lightchain run command |
I follow this method, starting the standalone mode。 ./lightchain init --datadir ${DATADIR_NODE2}/lightchain2 --standalone` Guaranteed the same genesis.json。 update ${DATADIR_NODE2}lightchain2/consensus/config/config.toml persistent_peers="[email protected]:46656" Then enter the "geth" console: admin.addPeer("enode://550481d4f08c7d6ea7bf1acd3c4ea84c04d89e36d78942e5f3c5c56feba65394f52367e34d44be6c042bbd32529bd4c2ef271fd1e13e380550875ef69f0fd4f4@121.71.185.114:30303?discport=0") net **`net.peerCount is 0 ** ${DATADIR_NODE2}lightchain2/database/geth.ipc admin Where can I operate incorrectly? ggarri。I want to see each other's information in two nodes. For example, node1 can query the account balance of node2. |
as fas as I can see there is only one incorrect step, when you added the
In addition, just to mention that the method |
I would like to ask how to start lightchain multi-node
I start mainnet or Sirius, the console will appear err="dial TCP 88.198.36.61:26656: I /o timeout"
Or err="auth failure:secret conn failed: EOF"
The text was updated successfully, but these errors were encountered: