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

Improve local connection #1098

Merged
merged 8 commits into from
Jun 15, 2023

Conversation

Neylix
Copy link
Member

@Neylix Neylix commented Jun 14, 2023

Description

Since we have a node view in the bootstrap that is not inserted into the P2P MemTable, we cannot rely on the MemTable field availability_history to know if the node is currently connected or not.

So I implemented a new ets table managed by the ConnectionSupervisor and Connection module to store the current connection state of a node. So we don't rely on other thing that just the connection itself to determine if a node is connected

Type of change

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

How Has This Been Tested?

Unit test on connected? function

Running node connecting and stopping them

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 P2P Involve P2P networking enhancements labels Jun 14, 2023
@Neylix Neylix added this to the 1.1.2 milestone Jun 14, 2023
Copy link
Member

@bchamagne bchamagne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested with 3 nodes:

  • initial node ✔️
  • new node ✔️
  • node restart quick ✔️
  • node was stopped for multiple summary ✔️
  • node reset from scratch ✔️

@Neylix Neylix merged commit 249c714 into archethic-foundation:1.1.2 Jun 15, 2023
1 check passed
@Neylix Neylix deleted the Improve_local_connection branch June 15, 2023 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancements P2P Involve P2P networking
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants