I used the following -

geth --datadir node6/ init genesis.json

And I saw nodes=361. This is for a second node on a private network using PoA. Why is the number of nodes so high and where did geth get this figure from. I have only five nodes in the network at present.

INFO [04-16|16:21:35] Maximum peer count                       ETH=25 LES=0 total=25
INFO [04-16|16:21:35] Allocated cache and file handles         database=/home/satoshimaca/blockchain4/node6/geth/chaindata cache=16 handles=16
INFO [04-16|16:21:35] Writing custom genesis block 
INFO [04-16|16:21:35] Persisted trie from memory database      nodes=361 size=66.44kB time=2.227112ms gcnodes=0 gcsize=0.00B gctime=0s livenodes=1 livesize=0.00B
INFO [04-16|16:21:35] Successfully wrote genesis state         database=chaindata                                          hash=0ee2d8…baceba
INFO [04-16|16:21:35] Allocated cache and file handles         database=/home/satoshimaca/blockchain4/node6/geth/lightchaindata cache=16 handles=16
INFO [04-16|16:21:35] Writing custom genesis block 
INFO [04-16|16:21:35] Persisted trie from memory database      nodes=361 size=66.44kB time=2.228822ms gcnodes=0 gcsize=0.00B gctime=0s livenodes=1 livesize=0.00B
INFO [04-16|16:21:35] Successfully wrote genesis state         database=lightchaindata                                          hash=0ee2d8…baceba

Here is the first part of the genesis.json file -

{
  "config": {
    "chainId": 1520,
    "homesteadBlock": 1,
    "eip150Block": 2,
    "eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "eip155Block": 3,
    "eip158Block": 3,
    "byzantiumBlock": 4,
    "clique": {
      "period": 5,
      "epoch": 30000
    }
  },
  "nonce": "0x0",
  "timestamp": "0x5ad4a1d9",
  "extraData": "0x000000000000000000000000000000000000000000000000000000000000000010799bda8ec85f99e50861571ee8884689ebfbb816cfa8b0b01e2bbb0ebfdc49a9438a5c1368dcb6242f75170b0b38917995724bd5aef1aa07d31fffc7c776a8b564228ecca00c86d1d80b431aa9f4f3e578e38bca4f0d1bf4e90be7da9a1bd58277c5b70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
  "gasLimit": "0x47b760",
  "difficulty": "0x1",
  "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "coinbase": "0x0000000000000000000000000000000000000000",
  "alloc": {

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.