Skip to content
This repository has been archived by the owner on Dec 4, 2024. It is now read-only.

[FIX] Bootnode re-discovery issue #775

Merged
merged 11 commits into from
Oct 11, 2022
Merged

Conversation

ZeljkoBenovic
Copy link
Contributor

Description

Right now, in a running network, once the bootnodes lose all of its peers (server restart, network issues or similar) it does not get back any peers, without restarting all the nodes.
There is a go routine that is supposed to ping random bootnode for the list of its peers, but the bootnodes stay disconnected from the rest of the network.

One can test this very easily, run a 4-node cluster with 1 bootnode. Keep all the nodes running but restart the bootnode. Once the bootnode goes back online, it will never join the network and it will always have 0 peers.

Changes include

  • Bugfix (non-breaking change that solves an issue)
  • Hotfix (change that solves an urgent issue, and requires immediate attention)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (change that is not backwards-compatible and/or changes current functionality)

Checklist

  • I have assigned this PR to myself
  • I have added at least 1 reviewer
  • I have added the relevant labels
  • I have updated the official documentation
  • I have added sufficient documentation in code

Testing

  • I have tested this code with the official test suite
  • I have tested this code manually

Manual tests

Run a 4-node cluster with 1 bootnode. Restart or power cycle the bootnode only.
After the bootnode comes back online, after a while (no more than 60s), it should start peering with all the other nodes.

Additional comments

Fixes EDGE-790

@zivkovicmilos zivkovicmilos added the bug fix Functionality that fixes a bug label Oct 4, 2022
Copy link
Contributor

@epikichi epikichi left a comment

Choose a reason for hiding this comment

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

Great catch. Confirmed locally that peers will dial back after bootnode(s) disruption occurs.

Copy link
Contributor

@Kourin1996 Kourin1996 left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you for correcting minor things in addition to the fixes

Copy link
Contributor

@0xAleksaOpacic 0xAleksaOpacic left a comment

Choose a reason for hiding this comment

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

LGTM, tested manually everything and the issue is fixed with this

network/server.go Outdated Show resolved Hide resolved
Copy link
Contributor

@zivkovicmilos zivkovicmilos left a comment

Choose a reason for hiding this comment

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

Looks good 💯

Thank you for hunting down this bug 🙏

I've left a few small comments that need to be addressed.

Please also resolve the conflicts in the go.mod file 🙏

@zivkovicmilos zivkovicmilos linked an issue Oct 7, 2022 that may be closed by this pull request
@ZeljkoBenovic ZeljkoBenovic merged commit 9f1ce9b into develop Oct 11, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Oct 11, 2022
@ZeljkoBenovic ZeljkoBenovic deleted the fix/bootnode-discovery branch December 14, 2022 11:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug fix Functionality that fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to execute bootnode peer discovery
5 participants