How to add a static node to private ethereum network?

0 votes
I want to add a static node to the network that will get reconnected automatically whenever disconnected. How to do this?
Jan 10 in Blockchain by digger
• 27,620 points
18 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

There are two ways to do this.

1. Configuring permanent static nodes by adding the below entry to <datadir>/static-nodes.json file:

[
      "enode://f4642fa65af50cfdea8fa7414a5def7bb7991478b768e296f5e4a54e8b995de102e0ceae2e826f293c481b5325f89be6d207b003382e18a8ecba66fbaf6416c0@33.4.2.1:30303",
      "enode://pubkey@ip:port"
]

2. Run this command in the geth console:

> admin.addPeer("enode://f4642fa65af50cfdea8fa7414a5def7bb7991478b768e296f5e4a54e8b995de102e0ceae2e826f293c481b5325f89be6d207b003382e18a8ecba66fbaf6416c0@33.4.2.1:30303")

Note:  Replace the enode ID with your enode ID

answered Jan 10 by Omkar
• 66,910 points

Related Questions In Blockchain

0 votes
1 answer

How to make sure transactions take no fee in a private Ethereum blockchain?

In a private ethereum network you have ...READ MORE

answered Mar 26, 2018 in Blockchain by Christine
• 15,790 points

edited Mar 26, 2018 by Christine 64 views
+3 votes
4 answers

How do I add a new node on a Hyperledger network?

You can do this by generating the crypto ...READ MORE

answered Apr 6, 2018 in Blockchain by Christine
• 15,790 points
1,288 views
+1 vote
1 answer

How can I initiate a transaction on ethereum private network using mobile device?

There is no android wallet to connect ...READ MORE

answered Apr 18, 2018 in Blockchain by Shashank
• 10,330 points
37 views
0 votes
1 answer

How to monitor Ethereum private network?

geth should be started with --metrics. try the ...READ MORE

answered Jul 11, 2018 in Blockchain by slayer
• 29,040 points
97 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
81 views
0 votes
1 answer
0 votes
0 answers

Error: Unexpected token o in JSON at position 1

I have been working with Interacting a ...READ MORE

Mar 6 in Blockchain by saeedi
• 120 points

edited Mar 6 by Omkar 160 views
0 votes
1 answer

How to get Node URL in private ethereum network?

You have already noticed that  admin.peers does ...READ MORE

answered Jan 10 in Blockchain by Omkar
• 66,910 points
14 views
0 votes
1 answer

How to add peer to ethereum private network?

To connect a node to already existing ...READ MORE

answered Jan 22 in Blockchain by Omkar
• 66,910 points
75 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.