[HOTFIX] fix boot node instability issue, refactor p2p host configurations and add new features #4674
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue
After upgrading the boot nodes to the latest version of the main branch, which includes several changes compared to the previous boot node code, the boot node service process began restarting repeatedly. This was accompanied by numerous error messages related to the QUIC protocol, noise, sessions, muxers, and various other lower layer P2P issues.
This PR addresses these issues by making the following changes:
Additionally, this PR introduces several new configurations and flags, detailed below:
NoTransportSecurity: to disable p2p security (tls and noise)
NAT: enable p2p NAT. NAT Manager takes care of setting NAT port mappings, and discovering external addresses
UserAgent: custom user agent; explicitly set the user-agent, so we can differentiate from other Go libp2p users
DialTimeout: p2p dial timeout
MuxerType: P2P multiplexer type (default:Mplex, 0:Mplex, 1:Yamux)
NoRelay: No relay services, direct connections between peers only