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

SoV networking support #2951

Merged
merged 86 commits into from
Aug 19, 2024
Merged

SoV networking support #2951

merged 86 commits into from
Aug 19, 2024

Conversation

StephenButtolph
Copy link
Contributor

@StephenButtolph StephenButtolph commented Apr 18, 2024

Why this should be merged

Currently, the Avalanche network topology is a combination of strongly connected and a hub-spoke networks.

The Avalanche Primary Network validators form a strongly connected network. This enables Snow* consensus to rapidly confirm blocks.

Non-validators also connect to all Primary Network validators (but not other non-valdiators). This ends up looking like the Primary Network acting like the hub and all non-validators acting as spokes.

In order to connect to a Subnet, no additional connectivity logic is required because Subnet validators are required to also be Primary Network validators. This means that by just re-using the Primary Network's peer discovery, the Subnet will also have its own strongly connected validator hub and non-validator spokes.

However, ACP 13 and later ACP 77 suggest to remove the requirement that Subnet validators must also be Primary Network validators. In order to remove the restriction we must extend the peer discovery mechanism to understand Subnets.

How this works

The PR extends the IPs that Primary Network validators are tracking to include all Subnets. Subnets will utilize the Primary Network to bootstrap their connections.

When peers connect they already communicate the Subnets they are tracking. When a Primary Network validator is sent a GetPeerList message, they will respond to the request for IPs that are validators of Subnets that are tracked by the requester.

How this was tested

  • Unit Tests
  • CI
  • Modifying the node to support SoV and verifying that a subnet without primary network validators can be efficiently connected to and synced.

@StephenButtolph StephenButtolph self-assigned this Apr 18, 2024
@StephenButtolph StephenButtolph changed the title Expose all validator sets to IP tracking SoV networking support Apr 18, 2024
@StephenButtolph StephenButtolph added this to the v1.11.5 milestone Apr 18, 2024
@StephenButtolph StephenButtolph added the networking This involves networking label Apr 18, 2024
Base automatically changed from add-manager-validator-set-callbacks to master April 18, 2024 19:48
@StephenButtolph StephenButtolph modified the milestones: v1.11.5, v1.11.6 Apr 29, 2024
@StephenButtolph StephenButtolph changed the base branch from master to track-peer-subnets April 29, 2024 21:53
network/network.go Show resolved Hide resolved
network/ip_tracker.go Show resolved Hide resolved
Copy link
Contributor

@marun marun left a comment

Choose a reason for hiding this comment

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

The code changes LGTM. The test changes are so big though.

@StephenButtolph StephenButtolph added this pull request to the merge queue Aug 19, 2024
Merged via the queue into master with commit eea2b00 Aug 19, 2024
21 checks passed
@StephenButtolph StephenButtolph deleted the sov-networking-support branch August 19, 2024 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
acp77 networking This involves networking
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants