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

Remove trackedSubnet check for explicitly named peers in network.Send() #3258

Merged
merged 4 commits into from
Aug 2, 2024

Conversation

iansuvak
Copy link
Contributor

@iansuvak iansuvak commented Aug 1, 2024

Why this should be merged

This would close ava-labs/awm-relayer#400 . This removes the requirement for an explicitly named peer in common.SendConfig to be actively tracking the relevant subnet. This doesn't affect the allower functionality or any sampled peers.

The particular case this would solve is let nodes respond to SignatureRequest AppRequests from nodes that haven't explicitly declared that they are tracking the relevant subnet which seems like a valid usecase.

The function comment was also updated since it seemed to be out of date, but the update isn't relevant to the functional change since filtering out peers based on their tracked subnets was undocumented functionality.

How this works

It removes the trackedSubnet check when checking explicitly named peers supplied to getPeers function which is called from network.Send

How this was tested

CI + confirmed that it allows signature aggregation on the awm-relayer E2E tests (both relayer and signature aggregator)

Comment on lines -701 to -703
if trackedSubnets := peer.TrackedSubnets(); !trackedSubnets.Contains(subnetID) {
continue
}
Copy link
Contributor

Choose a reason for hiding this comment

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

After going through the code - the one potential downside to this PR is:

If a subnet validator forgets to --track-subnet the subnet that it is validating, the nodes querying them will now need to timeout the request rather than immediately marking the request as failed.

I think that is sufficiently niche that it isn't a concern to merge this PR... But it could be something to keep in mind as a future optimization. This is not a change in any security assumptions, as byzantine nodes could always report that they are tracking the subnet but then just never respond to the request.

network/network.go Outdated Show resolved Hide resolved
@StephenButtolph StephenButtolph added this pull request to the merge queue Aug 2, 2024
Merged via the queue into master with commit 5282943 Aug 2, 2024
20 checks passed
@StephenButtolph StephenButtolph deleted the isuvak/skip-tracked-subnets-check branch August 2, 2024 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
networking This involves networking Warp Signature API
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Find a solution to the trackedSubnets networking issue.
3 participants