-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
Goal: Is to read the nodes that are members of a pool from blockchain API and then create a mesh so that they can exchange messages with each other.
The function below is called when blox starts and performs the needed operation:
go-fula/blockchain/blockchain.go
Line 617 in 5efbc4c
| func (bl *FxBlockchain) FetchUsersAndPopulateSets(ctx context.Context, topicString string, initiate bool) error { |
Description: We have two types of messages:
1- IExist: This is the one you did (TYPE 1)
2-PoolJoinRequet: This is to notify the peers that are members of the pool that a new node want to join and that they should vote on it (TYPE 2)
And Topic is poolID ("1" for example)
Issue: Since on the blockchain we store the peerIDs and there is no ip4 address (as it changes) we need to connect with relay. Now I tried two ways to exchange messages and both failed:
1- I tried to add the peers that are read from blockchain to peerstore and without calling host.connect which seems it does not create a mesh as it sometimes complaints that the relay does not support mesh protocols
2- I tried connecting the host peer to each other peer in the same pool. but connection fails with :
2023-11-15T20:48:44.561-0500 DEBUG fula/blockchain blockchain/blockchain.go:807 Not Connected to peer {"from": "QmUg1bGBZ1rSNt3LZR7kKf9RDy3JtJLZZDZGKrzSP36TMe", "to": "QmPNZMi2LAhczsN2FoXXQng6YFYbSHApuP6RpKuHbBH9eF", "err": "failed to dial QmPNZMi2LAhczsN2FoXXQng6YFYbSHApuP6RpKuHbBH9eF:\n * [/ip4/3.18.250.172/tcp/4001/p2p/12D3KooWDRrBaAfPwsGJivBoUw5fE7ZpDiyfUjqgiURq2DEcL835/p2p-circuit] error opening hop stream to relay: failed to dial 12D3KooWDRrBaAfPwsGJivBoUw5fE7ZpDiyfUjqgiURq2DEcL835:\n * [/ip4/3.18.250.172/tcp/4001] dial backoff\n * [/ip4/3.21.220.84/tcp/4001] dial backoff\n * [/ip4/18.117.52.73/tcp/4001] dial backoff\n * [/ip4/18.117.52.73/tcp/4001/p2p/12D3KooWDRrBaAfPwsGJivBoUw5fE7ZpDiyfUjqgiURq2DEcL835/p2p-circuit] error opening hop stream to relay: failed to dial 12D3KooWDRrBaAfPwsGJivBoUw5fE7ZpDiyfUjqgiURq2DEcL835:\n * [/ip4/3.18.250.172/tcp/4001] dial backoff\n * [/ip4/3.21.220.84/tcp/4001] dial backoff\n * [/ip4/18.117.52.73/tcp/4001] dial backoff\n * [/ip4/3.21.220.84/tcp/4001/p2p/12D3KooWDRrBaAfPwsGJivBoUw5fE7ZpDiyfUjqgiURq2DEcL835/p2p-circuit] error opening hop stream to relay: failed to dial 12D3KooWDRrBaAfPwsGJivBoUw5fE7ZpDiyfUjqgiURq2DEcL835:\n * [/ip4/3.18.250.172/tcp/4001] dial backoff\n * [/ip4/3.21.220.84/tcp/4001] dial backoff\n * [/ip4/18.117.52.73/tcp/4001] dial backoff"}or
2023-11-15T20:52:33.897-0500 DEBUG fula/blockchain blockchain/blockchain.go:807 Not Connected to peer {"from": "QmaUMRTBMoANXqpUbfARnXkw9esfz9LP2AjXRRr7YknDAT", "to": "QmUg1bGBZ1rSNt3LZR7kKf9RDy3JtJLZZDZGKrzSP36TMe", "err": "failed to dial QmUg1bGBZ1rSNt3LZR7kKf9RDy3JtJLZZDZGKrzSP36TMe:\n * [/ip4/3.18.250.172/tcp/4001/p2p/12D3KooWDRrBaAfPwsGJivBoUw5fE7ZpDiyfUjqgiURq2DEcL835/p2p-circuit] error opening relay circuit: NO_RESERVATION (204)\n * [/ip4/18.117.52.73/tcp/4001/p2p/12D3KooWDRrBaAfPwsGJivBoUw5fE7ZpDiyfUjqgiURq2DEcL835/p2p-circuit] concurrent active dial through the same relay failed with a protocol error\n * [/ip4/3.21.220.84/tcp/4001/p2p/12D3KooWDRrBaAfPwsGJivBoUw5fE7ZpDiyfUjqgiURq2DEcL835/p2p-circuit] concurrent active dial through the same relay failed with a protocol error"}Metadata
Metadata
Assignees
Labels
No labels