I am trying to set a private chain with one bootnode.I have some question during the process:

Firstly, I follow the guide How do I set up a private ethereum network?:

create a bootnode

devnet$ bootnode -genkey boot.key

start your bootnode

devnet$ bootnode -nodekey boot.key -verbosity 9 -addr :30310

when I run "bootnode -nodekey boot.key -verbosity 9 -addr :30310", I got:

[root@localhost bneth]# bootnode -nodekey boot.key -verbosity 9 -addr :30310
INFO [05-08|23:53:42.564] New local node record seq=1 id=48fda805bb4e7fa0 ip=<nil> udp=0 tcp=0

I think i should be incorrect output, how to fix the problem?**

Then, I also tried method of geth --bootnodes [enode url], I found the port after launch is not the one I configured:

I set the port is 30301, but the listening port is set to 30303 itself.

[root@localhost bneth]# bootnode -nodekey=boot.key -writeaddress
[root@localhost bneth]# geth --bootnodes enode://6f08bdf8c91644ed9c325affa734d45aa13337f74bb10ca73e9f557a034352a9cc1f4c35342b595e785f5f688d855c45d63910bc0de3cbf8a7321709a31e3ac4@
WARN [05-09|00:22:24.834] Sanitizing cache to Go's GC limits       provided=1024 updated=612
INFO [05-09|00:22:24.834] Maximum peer count                       ETH=25 LES=0 total=25
INFO [05-09|00:22:24.836] Starting peer-to-peer node               instance=Geth/v1.8.27-stable-4bcc0a37/linux-amd64/go1.11.9
INFO [05-09|00:22:24.837] Allocated cache and file handles         database=/root/.ethereum/geth/chaindata cache=306 handles=2048
INFO [05-09|00:22:24.848] Initialised chain configuration          config="{ChainID: 1 Homestead: 1150000 DAO: 1920000 DAOSupport: true EIP150: 2463000 EIP155: 2675000 EIP158: 2675000 Byzantium: 4370000 Constantinople: 7280000  ConstantinopleFix: 7280000 Engine: ethash}"
INFO [05-09|00:22:24.848] Disk storage enabled for ethash caches   dir=/root/.ethereum/geth/ethash count=3
INFO [05-09|00:22:24.848] Disk storage enabled for ethash DAGs     dir=/root/.ethash               count=2
INFO [05-09|00:22:24.848] Initialising Ethereum protocol           versions="[63 62]" network=1
INFO [05-09|00:22:24.876] Loaded most recent local header          number=0 hash=d4e567…cb8fa3 td=17179869184 age=50y3w4d
INFO [05-09|00:22:24.876] Loaded most recent local full block      number=0 hash=d4e567…cb8fa3 td=17179869184 age=50y3w4d
INFO [05-09|00:22:24.876] Loaded most recent local fast block      number=0 hash=d4e567…cb8fa3 td=17179869184 age=50y3w4d
INFO [05-09|00:22:24.877] Loaded local transaction journal         transactions=0 dropped=0
INFO [05-09|00:22:24.877] Regenerated local transaction journal    transactions=0 accounts=0
INFO [05-09|00:22:24.894] New local node record                    seq=4 id=3372442f435934fc ip= udp=30303 tcp=30303
INFO [05-09|00:22:24.896] Started P2P networking                   self=enode://269271d07a6fd449dce2c8e06288eacaba05c1c5dafaa382f9cb414aa386c56253cfdfc1cfd522bbdf6c70fb9f815cdebd85b1f4b5c8999785b71cf0e90d6f96@**30303**
INFO [05-09|00:22:24.896] IPC endpoint opened                      url=/root/.ethereum/geth.ipc

What's the difference between bootnode command and "geth --bootnodes enode://ip:port"?

By the way, before launch a node as boot node, how to know its enode url? it should be not a good way to use admin.nodeInfo command to get it, because it requires to exec geth console first.

For system safety consideration, can we have more than one boot node, if permitted, what's the method to set up?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.