This repository has been archived by the owner on Jun 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Update a config of gossipsub
based on Lisk network needs
#18
Labels
Comments
33 tasks
shuse2
pushed a commit
that referenced
this issue
Dec 19, 2022
### What was the problem? - This PR resolves #12. ### How was it solved? - `AutoNAT` feature is implemented (peer tries to detect if it has public IP or is inside a private network without public IP). - `Circuit-relay` feature is implemented (peer offers a circuit relay service to other peers so that peers behind NAT can be called by other peers in the network). - `holepunching` feature is implemented (If a peer which calls another peer via its relayer address has a public IP, then called peer drops this connection and directly call peer by its public IP address and they can communicate directly without any relayer peer inbetween. If both peers are behind NAT then `holepunching` is executed and if it is successfully performed, peers can communicate directly between each other without a relayer peer in between.). ### How was it tested? - New unit tests were implemented. - Existing and new unit tests passed. ### Note **All configuration options have default values from `libp2p` library. In issue #18 we might change them.** Logs for `holepunching` feature execution: - A peer which called another peer via relayer node has a public IP address (no `holepunching` is needed): ``` 2022-12-14T11:30:45.526+0100 DEBUG p2p-holepunch holepunch/svc.go:95 waiting until we have at least one public addresspeer12D3KooWByJ2D6Rv7oe8oUAYTYARiszCAXWUgqkxNp1KbJTqL67E 2022-12-14T11:30:45.776+0100 DEBUG p2p-holepunch holepunch/svc.go:107 Host now has a public address. Starting holepunch protocol. 2022-12-14T11:32:07.240+0100 DEBUG p2p-holepunch holepunch/holepuncher.go:126 direct connection to peer successful, no need for a hole punch {"peer": "12D3KooWNfXwDY2xjCF3BJDZniqKRHDZZNQMuVC3gQ1sYzVHvAVx"} ``` - Both peers are behind NAT so `holepunching` is needed: ``` 2022-12-14T11:36:31.526+0100 DEBUG p2p-holepunch holepunch/svc.go:95 waiting until we have at least one public addresspeer12D3KooWByJ2D6Rv7oe8oUAYTYARiszCAXWUgqkxNp1KbJTqL67E 2022-12-14T11:36:32.776+0100 DEBUG p2p-holepunch holepunch/svc.go:107 Host now has a public address. Starting holepunch protocol. 2022-12-14T11:36:33.467+0100 DEBUG p2p-holepunch holepunch/holepuncher.go:131 got inbound proxy conn {"peer": "12D3KooWC9T9yjhAzhjJg48yTosrGxUvTPLm2mtimGZqxeCCdy99"} 2022-12-14T11:36:33.669+0100 DEBUG p2p-holepunch holepunch/holepuncher.go:142 peer RTT is 201.757382ms; starting hole punch in 100.878691ms 2022-12-14T11:36:34.066+0100 DEBUG p2p-holepunch holepunch/util.go:68 hole punch successful {"peer": "12D3KooWC9T9yjhAzhjJg48yTosrGxUvTPLm2mtimGZqxeCCdy99"} 2022-12-14T11:36:34.066+0100 DEBUG p2p-holepunch holepunch/holepuncher.go:159 hole punching with successful {"peer": "12D3KooWC9T9yjhAzhjJg48yTosrGxUvTPLm2mtimGZqxeCCdy99", "time": 0.296361071} ```
The following tables describe the number of nodes for each execution of the All values for config parameters are based on
Builder=docker:go
Builder=exec:go Note: It would be better to do more execution of the |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Description
A
libp2p
andgossipsub
have an extensive list of parameters to set. They need to be set in a way that they will best fit for the Lisk network.gossipsub
parameters for best possible network performance and usage.Acceptance Criteria
Additional Information
The text was updated successfully, but these errors were encountered: