Skip to content

Latest commit

 

History

History
138 lines (94 loc) · 5.04 KB

step7-add-seed-and-peer-nodes.md

File metadata and controls

138 lines (94 loc) · 5.04 KB

STEP7 - Add Seed and Peer Nodes

A seed node is used as an initial peer on the network. The seed node will provide a list of peers which can be used going forward. In this step we will configure a seed node to connect with.

Seed Nodes

List Current Seed Nodes

curl -s "$AKASH_NET/seed-nodes.txt" | paste -d, -s

Expected Output of Seed Node List

root@ip-10-0-10-101:~# curl -s "$AKASH_NET/seed-nodes.txt" | paste -d, -s

[email protected]:26656,[email protected]:26656,[email protected]:26656

Include the Seed Nodes in Config Files

Seed Nodes

  • Open the config.toml file in an editor

    vi $HOME/.akash/config/config.toml
    
  • Within the editor find the seeds field as shown at the bottom of this output

#######################################################
###           P2P Configuration Options             ###
#######################################################
[p2p]

# Address to listen for incoming connections
laddr = "tcp://0.0.0.0:26656"

# Address to advertise to peers for them to dial
# If empty, will use the same port as the laddr,
# and will introspect on the listener or use UPnP
# to figure out the address.
external_address = ""

# Comma separated list of seed nodes to connect to
seeds = ""
  • Copy and paste the seed nodes returned via the “List Current Seed Nodes” part of this section

  • Following update the seeds field should appear like this:

    # Comma separated list of seed nodes to connect to
    seeds = "[email protected]:26656,[email protected]:26656,[email protected]:26656"
    

Peer Nodes

List Current Peer Nodes

curl -s "$AKASH_NET/peer-nodes.txt" | paste -d, -s

Expected Output of Peer Node List

root@ip-10-0-10-146:~# curl -s "$AKASH_NET/peer-nodes.txt" | paste -d, -s

[email protected]:26656,[email protected]:51656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656

Include the Peer Nodes in Config Files

Persistent Peers

  • Open the config.toml file in an editor

    vi $HOME/.akash/config/config.toml
    
  • Within the editor find the persistent_peers field as shown at the bottom of this output

#######################################################
###           P2P Configuration Options             ###
#######################################################
[p2p]

# Address to listen for incoming connections
laddr = "tcp://0.0.0.0:26656"

# Address to advertise to peers for them to dial
# If empty, will use the same port as the laddr,
# and will introspect on the listener or use UPnP
# to figure out the address. ip and port are required
# example: 159.89.10.97:26656
external_address = ""

# Comma separated list of seed nodes to connect to
seeds = "429d14fe2ab411e946623c20b060efdf230a5a8a@p2p.edgenet-1.ewr1.aksh.pw:26656,174e186ab7ef0aa8add457fecc5cca41b52cc031@p2p.edgenet-1.ewr1.aksh.pw:26652,a0dcc96946847f8bee74ffabd7d6d4809d030829@p2p.edgenet-1.ewr1.aksh.pw:26653,49c15444a04187b46db5e35b428b93bda42885e8@p2p.edgenet-1.ewr1.aksh.pw:26654,[email protected]:26656"

# Comma separated list of nodes to keep persistent connections to
persistent_peers = ""
  • Copy and paste the seed nodes returned via the “List Current Peer Nodes” part of this section
  • Following update the persistent_peers field should appear like this:
# Comma separated list of nodes to keep persistent connections to

persistent_peers = "[email protected]:26656,[email protected]:51656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656"

RPC Listening Address

  • Open the config.toml file in an editor

    vi $HOME/.akash/config/config.toml
    
  • Within the editor find the RPC listening address field as shown in this output

  • Update the listening address field to "tcp://0.0.0.0:26657" as shown

  • This setting will ensure listening occurs on all interfaces

[rpc]

# TCP or UNIX socket address for the RPC server to listen on
laddr = "tcp://0.0.0.0:26657"