CodeChain-io / CodeChain-io/foundry
ConnectionEstablished is called in an already established connection
- Langage dominant
- Rust
- Étoiles
- 36
- Forks
- 11
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
Recently, discovery5 tests failed occasionally.
I read the failed test log and found that a connection established event is fired in the already existing connection. It made Foundry crash.
## Why this error found nowadays
Recently when we implementing a peer DB, we added an assertion that the same peer is not added twice in the DB. The assertion made Foundry panic.
It seems that the duplicated connection established event bug is aged, but recently found by the assertion.
## How should we fix it
The "connection established" event should not be called in an existing connection.
## ErrorLog
[2020_03_18T01_56_17_226Z.1.log](https://github.com/CodeChain-io/foundry/files/4346655/2020_03_18T01_56_17_226Z.1.log)
[2020_03_18T01_56_17_226Z.4.log](https://github.com/CodeChain-io/foundry/files/4346656/2020_03_18T01_56_17_226Z.4.log)
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par reproduire l’échec intermittent du test discovery5 et examiner les journaux d’erreurs liés. Suivez l’endroit où l’événement ConnectionEstablished est émis pour une connexion existante, ainsi que l’assertion de doublon de la peer DB. Le travail est terminé lorsqu’une connexion existante n’émet plus l’événement et que les tests discovery5 passent sans que Foundry ne plante.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- rust
- Domaine
- networking
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 38/100