[CI] Ensure that the devnet always uses IPv4 #4040
Merged
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.
The following changes are part of #4039. However, they are independent of the proposed block sync changes, so a separate PR will make reviewing easier.
Recently, I ran into an in issue where nodes resolve
localhostof a peer address to[::1]instead of127.0.0.1. In the future, we may want to try both addresses, but it is fine to just force IPv4 for CI/testing.To do this, this PR ensures
127.0.0.1is passed instead oflocalhostthroughout the script.Additionally, this PR changes the trusted peers setup slightly. The old version created an array
$trusted_peersbut then treated it as a string when trimming the trailing comma and when passing it to the validator in--peers "$trusted_peers". The proposed change always treatstrusted_peersas a simple string.I noticed this error, when some clients did not sync and
shellcheckhelped with debugging. In the future, it would e great if we ranshellcheckor another linter on the bash script in CI.Finally, the PR also prints clients log on failure, which was helpful in the specific problem I had above.