Skip to content

Bootnodes

Bootnodes are used to initially discover peers.

Mainnet and Public Testnets

For mainnet, Rinkeby, Ropsten, and Görli, Pantheon predefines a list of enode URLs.

Private Networks

Start Bootnode

To start a bootnode for a private network:

  1. Export the public key to a file:

    Example

    pantheon --genesis-file=privateNetworkGenesis.json --data-path=nodeDataPath public-key export --to=bootnode
    
    Where privateNetworkGenesis.json and nodeDataPath are changed to the relevant values for your private network.

    The node public key is exported to the bootnode file.

    Note

    The --data-path and --genesis-file options are not used when running Pantheon from the Docker image. Use a bind mount to specify a configuration file with Docker and volume to specify the data directory.

  2. Start the bootnode, specifying:

    • Genesis file and data directory as in the previous step.
    • No arguments for the --bootnodes option because this is your bootnode.

    Example

    pantheon --genesis-file=privateNetworkGenesis.json --data-path=nodeDataPath --bootnodes

To specify this bootnode for another node, specify the enode URL using the --bootnodes option.

Info

The default host and port for P2P peer discovery is 127.0.0.1:30303. Use the --p2p-host and --p2p-port option to specify a host and port.

Start Node Specifying the Bootnode

To start a node specifying the bootnode for P2P discovery:

Example

pantheon --genesis-file=privateNetworkGenesis.json --data-path=nodeDataPath --p2p-host=127.0.0.1 --p2p-port=30301 --network-id=123 --bootnodes=enode://c35c3ec90a8a51fd5703594c6303382f3ae6b2ecb99bab2c04b3794f2bc3fc2[email protected]127.0.0.1:30303

Source

rinkeby.json
Questions or feedback? You can discuss issues and obtain free support on Pantheon Gitter channel.
For paid professional support by PegaSys, contact us at [email protected]