1

I am setting up a Hyperledger Sawtooth network with four nodes on Ubuntu 16.04. I am using static peering. Here is an example validator.toml file:

bind = [
  "network:tcp://0.0.0.0:8800",
  "component:tcp://127.0.0.1:4004",
  "consensus:tcp://127.0.0.1:5050"
]
peering = "static"
endpoint = "tcp://<IP 1>:8800"
peers = ["tcp://<IP 2>:8800", "tcp://<IP 3>:8800", "tcp://<IP 4>:8800"]
scheduler = 'serial'
network_public_key = 'wFMwoOt>yFqI/ek.G[tfMMILHWw#vXB[Sv}>l>i)'
network_private_key = 'r&oJ5aQDj4+V]p2:Lz70Eu0x#m%IwzBdP(}&hWM*'
minimum_peer_connectivity = 3
maximum_peer_connectivity = 10

On server 2, I have <IP 2> as endpoint and <IP 1>, <IP 3> and <IP 4> as peers, etc.

After starting my network, I tested it using the intkey transaction family. Key/value pairs I added with intkey set <someKey> <someValue> were not reproduced when I did intkey show <someValue>. In the validator logs I saw many Can't send message PING_RESPONSE back to... and No response from... messages. Using curl localhost:8008/peers I observed that the peers lists had many repetitions.

Martijn Dirkse
  • 543
  • 7
  • 16

2 Answers2

0

In your validator.toml files, let your peers entries point only in one direction. In the example validator.toml of server 2, omit <IP 1> from the peers list. On server 3, omit <IP 1> and <IP 2>. On server 4 you do not configure peers because it is peered from the other servers.

Martijn Dirkse
  • 543
  • 7
  • 16
  • Yes. Also, what consensus mechanism are you using? I think with RAFT, it is best to turn up the validators in order backward direction with static peering, for dev. Val1 - No peers, Val2 - Val1 as peer, Val3 - Val1, Val2 as peers, Val4 - all other validators. – shonjs Apr 07 '19 at 08:18
0

That does not seem right. With static peering you list all the other peers in the network for all nodes. Here's an example with Kubernetes (note the --peers command line flags for each validator. Maybe there's a bug or other configuration problem.

Edit: I am told that setup above avoids extra connection attempts and warning messages.

Dan Anderson
  • 2,265
  • 1
  • 9
  • 20
  • Hello Dan. You refer to an example but I do not see it in your text. Maybe it is because I am reading from my phone. Can you edit your answer to include your example? – Martijn Dirkse Mar 15 '19 at 20:50