archethic-foundation / archethic-foundation/archethic-node
ConnectionSupervisor does not handle restart properly
- Dominant language
- Elixir
- Stars
- 82
- Forks
- 24
- PR merge metrics
- No merged PRs in 30d
Description
### Describe the problem you discovered
We had an issue where the module Connection was being terminated very quickly due to an issue with libsodium.
This resulted in a "reached max restart intensity" of the ConnectionSupervisor.
The ConnectionSupervisor was restarted with an empty state, which means no Connection.

(screenshot of the network view of the incriminating node)
I used `Archethic.P2P.connect_nodes(Archethic.P2P.MemTable.available_nodes)` to restart the connections.
### Describe the solution you'd like
Somehow, if the ConnectionSupervisor is restarted, we need to reconnect to the nodes
### Epic
_No response_
Contributor guide
Research direction
Start at ConnectionSupervisor and Archethic.P2P.connect_nodes/1, using Archethic.P2P.MemTable.available_nodes as the node source. Trace or reproduce the supervisor-restart scenario and inspect how connections are restored. Done means a restart no longer leaves the supervisor with an empty connection state, with a regression test covering the behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elixir
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100