DAL/Node: improve/fix (re)connection to bootstrap nodes
Context
This MR fixes an issue reported by @Ochem on weeklynet. If a DAL node doesn't manage to connect to provided bootstrap points at startup, no other attempt will be made (attempts were made on already known peers identities, not on peers' points).
To do so, we remember the list of bootstrap points in Gossipsub worker and regularly attempt to (re)connect to them.
Manually testing the MR
make
dune build tezt/tests
_build/default/tezt/tests/main.exe --file tezt/tests/dal.ml --title 'Alpha: Testing DAL node (peer discovery via bootstrap node)' --info --loop
Locally, the --loop succeeded during ~60 + ~105 iterations, while the test was hanging quite immediately without the fix.
Checklist
-
Document the interface of any function added or modified (see the coding guidelines) -
Document any change to the user interface, including configuration parameters (see node configuration) -
Provide automatic testing (see the testing guide). -
For new features and bug fixes, add an item in the appropriate changelog ( docs/protocols/alpha.rstfor the protocol and the environment,CHANGES.rstat the root of the repository for everything else). -
Select suitable reviewers using the Reviewersfield below. -
Select as Assigneethe next person who should take action on that MR
Edited by Mohamed IGUERNLALA