Setup WAN discovery for coordinators network. Note that right now tests are done by manually using the ENV var ADDR, however it only uses this address and successfully shares one published transaction among many coordinators (tested with two subscribed servers and publishing from my laptop).
This proofs that we have enough with on chain data to bootstrap the network.
How to test?
With at least two machines:
Machine A: FAKE_COORDNET=yes go test ./api/coordinatornetwork/... --run TestPubSubFakeServer -count=1 -v. Wait until you see the log libp2p ID: Qm...
Machine B: PUBLISH=yes FAKE_COORDNET=yes ADDR="/dns/<URL>/tcp/3598/p2p/<libp2p ID>" go test ./api/coordinatornetwork/... --run TestPubSubFakeServer -count=1 -v -count=1. Replace <URL> for the URL of Machine A and <libp2p ID> for the log from machine A (Qm...)
Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
Closes #1021
What does this PR does?
Setup WAN discovery for coordinators network. Note that right now tests are done by manually using the ENV var
ADDR
, however it only uses this address and successfully shares one published transaction among many coordinators (tested with two subscribed servers and publishing from my laptop).This proofs that we have enough with on chain data to bootstrap the network.
How to test?
With at least two machines:
Machine A:
FAKE_COORDNET=yes go test ./api/coordinatornetwork/... --run TestPubSubFakeServer -count=1 -v
. Wait until you see the loglibp2p ID: Qm...
Machine B:PUBLISH=yes FAKE_COORDNET=yes ADDR="/dns/<URL>/tcp/3598/p2p/<libp2p ID>" go test ./api/coordinatornetwork/... --run TestPubSubFakeServer -count=1 -v -count=1
. Replace<URL>
for the URL of Machine A and<libp2p ID>
for the log from machine A (Qm...
)Checklist
These are the criteria that every PR should meet, please check them off as you review them: