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_synchronization_when_node_ip_changes_#887 #930

Merged
merged 1 commit into from
Mar 31, 2023
Merged

improve_synchronization_when_node_ip_changes_#887 #930

merged 1 commit into from
Mar 31, 2023

Conversation

apoorv-2204
Copy link
Contributor

@apoorv-2204 apoorv-2204 commented Mar 13, 2023

Description

If a node's IP address changes, a new transaction (TX) is generated, but an unusual problem arises: the node becomes invisible to other nodes due to the IP change. While the node with the new IP can create a node TX, it must wait for replication and load the last node public key, which fails because it cannot access the TX it created. The solution involves manually waiting for confirmation and initiating a self-repair process.

Fixes

Type of change

Please delete options that are not relevant.

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

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

@apoorv-2204 apoorv-2204 marked this pull request as ready for review March 13, 2023 10:36
@apoorv-2204 apoorv-2204 self-assigned this Mar 15, 2023
@samuelmanzanera samuelmanzanera linked an issue Mar 20, 2023 that may be closed by this pull request
lib/archethic/utils.ex Outdated Show resolved Hide resolved
@apoorv-2204 apoorv-2204 requested a review from bchamagne March 21, 2023 07:57
Copy link
Member

@samuelmanzanera samuelmanzanera left a comment

Choose a reason for hiding this comment

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

Code seems ok


types = [:node, :oracle, :node_shared_secrets, :reward]

Task.Supervisor.async_stream_nolink(Archethic.TaskSupervisor, types, fn type ->
Copy link
Contributor

Choose a reason for hiding this comment

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

After #933 merge, you'd need to use NetworkChain.asynchronous_resync_many(network_chain_types) instead.

@Neylix Neylix merged commit 2562a04 into archethic-foundation:develop Mar 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve synchronization when node ip changes
4 participants