Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix connection infos overwrite #1099

Conversation

Neylix
Copy link
Member

@Neylix Neylix commented Jun 15, 2023

Description

This issue fixes an problem when a node replicate an old node transaction with old connection informations (ip port, transport).
If this happen the active connection that may be good is killed and a new one is created with the old informations. So the node lose a good connection and may be stuck to download rest of summaries / transactions.

To fix this, there is a new control: if the connection status is connected we don't overwrite the current connection.

Also improve the connection when the node start, it was creating a new connection when loading all transaction in MemTableLoader init. Instead, we now wait for all synchronization to finish and then connect with the latest informations available

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Unit test
Start nodes, stop one and change its p2p port.
Start an other node, it should not have warning log informing a node connection is closed

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@Neylix Neylix added bug Something isn't working P2P Involve P2P networking bootstrap labels Jun 15, 2023
@Neylix Neylix added this to the 1.1.2 milestone Jun 15, 2023
@Neylix Neylix self-assigned this Jun 15, 2023
@Neylix Neylix force-pushed the Fix-connection-infos-overwrite branch from 5cd3d37 to fe904f1 Compare June 15, 2023 14:46
@samuelmanzanera samuelmanzanera merged commit 36bfe19 into archethic-foundation:1.1.2 Jun 15, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bootstrap bug Something isn't working P2P Involve P2P networking
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants