status-go/peers
Andrea Franz 874a3e8151
Feature/mailserver registry smart contract (#1135)
* add verifier and test using simulated backend

* add ContractCaller

* commit simulated backend after deploy and after smart contract writes

* use bind.NewKeyedTransactor for all transactions in tests

* rename RegistryVerifier to Verifier

* initialize contract verifier if MailServerRegistryAddress config is set

* use contractAddress.Hash()

* refactoring

* use fmt.Sprintf to format contract address in logs

* fix test and lint warnings

* update Gopkg.lock

* update Gopkg.lock once more
2018-08-20 15:55:43 +02:00
..
verifier Add interface to verify trusted MailServers (#1112) 2018-07-25 16:48:02 +02:00
README.md [#856] move geth subpackages to root level (#1007) 2018-06-08 13:29:50 +02:00
cache.go Enforce isolation between different buckets and topics 2018-07-12 10:03:37 +03:00
cache_test.go Enforce isolation between different buckets and topics 2018-07-12 10:03:37 +03:00
cotopicpool.go Add interface to verify trusted MailServers (#1112) 2018-07-25 16:48:02 +02:00
cotopicpool_test.go Add interface to verify trusted MailServers (#1112) 2018-07-25 16:48:02 +02:00
peerpool.go Feature/mailserver registry smart contract (#1135) 2018-08-20 15:55:43 +02:00
peerpool_test.go Feature/mailserver registry smart contract (#1135) 2018-08-20 15:55:43 +02:00
signal.go [#856] move geth subpackages to root level (#1007) 2018-06-08 13:29:50 +02:00
topic_peer_queue.go [#856] move geth subpackages to root level (#1007) 2018-06-08 13:29:50 +02:00
topic_peer_queue_test.go [#856] move geth subpackages to root level (#1007) 2018-06-08 13:29:50 +02:00
topic_register.go Add rendezvous implementation for discovery interface 2018-07-25 15:10:57 +03:00
topicpool.go Add rendezvous implementation for discovery interface 2018-07-25 15:10:57 +03:00
topicpool_test.go Add interface to verify trusted MailServers (#1112) 2018-07-25 16:48:02 +02:00

README.md

Peer pool signals

Peer pool sends 3 types of signals.

Discovery started signal will be sent once discovery server is started. And every time node will have to re-start discovery server because peer number dropped too low.

{
  "type": "discovery.started",
  "event": null
}

Discovery stopped signal will be sent once discovery found max limit of peers for every registered topic.

{
  "type": "discovery.stopped",
  "event": null
}

Discovery summary signal will be sent every time new peer is added or removed from a cluster. It will contain a map with capability as a key and total numbers of peers with that capability as a value.

{
  "type": "discovery.summary",
  "event": [
    {
      "id": "339c84c816b5f17a622c8d7ab9498f9998e942a274f70794af934bf5d3d02e14db8ddca2170e4edccede29ea6d409b154c141c34c01006e76c95e17672a27454",
      "name": "peer-0/v1.0/darwin/go1.10.1",
      "caps": [
        "shh/6"
      ],
      "network": {
        "localAddress": "127.0.0.1:61049",
        "remoteAddress": "127.0.0.1:33732",
        "inbound": false,
        "trusted": false,
        "static": true
      },
      "protocols": {
        "shh": "unknown"
      }
    }
  ]
}

Or if we don't have any peers:

{
  "type": "discovery.summary",
  "event": []
}