// For listening from blockchain network.
P2pListenAddrs []string`toml:"p2p_listen_addrs"`// To connect other hosts as a p2p network.
Bootnodes []string`toml:"bootnodes"`
ProtocolID string`toml:"protocol_id"`// 0: RSA// 1: Ed25519// 2: Secp256k1// 3: ECDSA
NodeKeyType int`toml:"node_key_type"`
NodeKeyRandSeed int64`toml:"node_key_rand_seed"`
NodeKey string`toml:"node_key"`// Only RSA has this param.
NodeKeyBits int`toml:"node_key_bits"`// When use param 'NodeKey', 'NodeKeyFile' will not work.
NodeKeyFile string`toml:"node_key_file"`
P2pListenAddrs: Indicates the address of the P2P protocol that the blockchain node listens to
Bootnodes: Link other blockchain nodes in the P2P network to synchronize historical blocks
ProtocolID: Customized protocol name in P2P network
NodeKeyType: The encryption type of the key of the P2P node, which is used to generate the key of the p2p address.
Four encryption algorithms are currently supported:
0: RSA
1: Ed25519
2: Secp256k1
3: ECDSA
NodeKeyRandSeed: Generate the seed of the key of the p2p node, which is used to generate the key of the P2P address. When this item is not empty, there is no need to configure NodeKey.
NodeKey:The key of the P2P address, used to generate the p2p address. When NodeKeyRandSeed is not empty, this item can be left blank.
NodeKeyBits: The bits of the key. This configuration is only required for the encryption algorithm RSA. Other types of encryption algorithms do not need to configure this parameter.
NodeKeyFile: Read the key file of the p2p address. Only when NodeKey is empty, the system will read this configuration item.