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

Weight push peers by how long we haven't pushed to them #12620

Merged
merged 1 commit into from
Oct 2, 2020

Conversation

sakridge
Copy link
Member

@sakridge sakridge commented Oct 1, 2020

Problem

If a node goes offline, everyone starts to weight them in push because their contact info local_timestamp is not updated. This causes a DOS on the node.

Summary of Changes

Weight the nodes according to when we actually last sent them a push.

Fixes #12409

behzadnouri
behzadnouri previously approved these changes Oct 2, 2020
core/src/crds_gossip_push.rs Outdated Show resolved Hide resolved
core/src/crds_gossip_push.rs Outdated Show resolved Hide resolved
@sakridge sakridge force-pushed the push-peers-weighting branch from 5c6aa32 to fca6c96 Compare October 2, 2020 00:22
@mergify mergify bot dismissed behzadnouri’s stale review October 2, 2020 00:23

Pull request has been modified.

@sakridge sakridge force-pushed the push-peers-weighting branch from fca6c96 to e8e9456 Compare October 2, 2020 00:29
@codecov
Copy link

codecov bot commented Oct 2, 2020

Codecov Report

Merging #12620 into master will decrease coverage by 0.0%.
The diff coverage is 56.2%.

@@            Coverage Diff            @@
##           master   #12620     +/-   ##
=========================================
- Coverage    82.0%    82.0%   -0.1%     
=========================================
  Files         356      356             
  Lines       83140    83162     +22     
=========================================
+ Hits        68197    68207     +10     
- Misses      14943    14955     +12     

carllin
carllin previously approved these changes Oct 2, 2020
@behzadnouri behzadnouri self-requested a review October 2, 2020 12:39
behzadnouri
behzadnouri previously approved these changes Oct 2, 2020
@sakridge sakridge force-pushed the push-peers-weighting branch from e8e9456 to 290004f Compare October 2, 2020 17:23
@mergify mergify bot dismissed stale reviews from behzadnouri and carllin October 2, 2020 17:23

Pull request has been modified.

@sakridge sakridge merged commit 71c469c into solana-labs:master Oct 2, 2020
@sakridge sakridge deleted the push-peers-weighting branch October 2, 2020 20:57
@sakridge sakridge added v1.3 and removed v1.3 labels Oct 2, 2020
mergify bot pushed a commit that referenced this pull request Oct 2, 2020
mergify bot added a commit that referenced this pull request Oct 2, 2020
)

(cherry picked from commit 71c469c)

Co-authored-by: sakridge <sakridge@gmail.com>
behzadnouri added a commit to behzadnouri/solana that referenced this pull request Oct 5, 2020
solana-labs#12620
patched the DDOS issue with nodes which go offline:
solana-labs#12409

However, offline nodes still see some traffic spike which is likely
because no origins are pruned from their bloom filter in active set, and
so multiple nodes push redundant duplicate messages to them
simultaneously.
https://github.com/solana-labs/solana/blob/aaf3790d8/core/src/crds_gossip_push.rs#L276-L286

This commit will filter out inactive peers from potential push targets
entirely. To mitigate eclipse attacks, staked nodes are retried
periodically.
behzadnouri added a commit to behzadnouri/solana that referenced this pull request Oct 5, 2020
solana-labs#12620
patched the DDOS issue with nodes which go offline:
solana-labs#12409

However, offline nodes still see some traffic spike which is likely
because no origins are pruned from their bloom filter in active set:
https://github.com/solana-labs/solana/blob/aaf3790d8/core/src/crds_gossip_push.rs#L276-L286
and so multiple nodes push redundant duplicate messages to them
simultaneously:
https://github.com/solana-labs/solana/blob/aaf3790d8/core/src/crds_gossip_push.rs#L254-L255

This commit will filter out inactive peers from potential push targets
entirely. To mitigate eclipse attacks, staked nodes are retried
periodically.
behzadnouri added a commit to behzadnouri/solana that referenced this pull request Oct 5, 2020
solana-labs#12620
patched the DDOS issue with nodes which go offline:
solana-labs#12409

However, offline nodes still see (much lesser) traffic spike, likely
because no origins are pruned from their bloom filter in active set:
https://github.com/solana-labs/solana/blob/aaf3790d8/core/src/crds_gossip_push.rs#L276-L286
and so multiple nodes push redundant duplicate messages to them
simultaneously:
https://github.com/solana-labs/solana/blob/aaf3790d8/core/src/crds_gossip_push.rs#L254-L255

This commit will filter out inactive peers from potential push targets
entirely. To mitigate eclipse attacks, staked nodes are retried
periodically.
behzadnouri added a commit to behzadnouri/solana that referenced this pull request Oct 5, 2020
solana-labs#12620
patched the DDOS issue with nodes which go offline:
solana-labs#12409

However, offline nodes still see (much lesser) traffic spike, likely
because no origins are pruned from their bloom filter in active set:
https://github.com/solana-labs/solana/blob/aaf3790d8/core/src/crds_gossip_push.rs#L276-L286
and so multiple nodes push redundant duplicate messages to them
simultaneously:
https://github.com/solana-labs/solana/blob/aaf3790d8/core/src/crds_gossip_push.rs#L254-L255

This commit will filter out inactive peers from potential push targets
entirely. To mitigate eclipse attacks, staked nodes are retried
periodically.
behzadnouri added a commit to behzadnouri/solana that referenced this pull request Oct 5, 2020
solana-labs#12620
patched the DDOS issue with nodes which go offline:
solana-labs#12409

However, offline nodes still see (much lesser) traffic spike, likely
because no origins are pruned from their bloom filter in active set:
https://github.com/solana-labs/solana/blob/aaf3790d8/core/src/crds_gossip_push.rs#L276-L286
and so multiple nodes push redundant duplicate messages to them
simultaneously:
https://github.com/solana-labs/solana/blob/aaf3790d8/core/src/crds_gossip_push.rs#L254-L255

This commit will filter out inactive peers from potential push targets
entirely. To mitigate eclipse attacks, staked nodes are retried
periodically.
behzadnouri added a commit to behzadnouri/solana that referenced this pull request Oct 5, 2020
solana-labs#12620
patched the DDOS issue with nodes which go offline:
solana-labs#12409

However, offline nodes still see (much lesser) traffic spike, likely
because no origins are pruned from their bloom filter in active set:
https://github.com/solana-labs/solana/blob/aaf3790d8/core/src/crds_gossip_push.rs#L276-L286
and so multiple nodes push redundant duplicate messages to them
simultaneously:
https://github.com/solana-labs/solana/blob/aaf3790d8/core/src/crds_gossip_push.rs#L254-L255

This commit will filter out inactive peers from potential push targets
entirely. To mitigate eclipse attacks, staked nodes are retried
periodically.
behzadnouri added a commit that referenced this pull request Oct 6, 2020
* filters out inactive nodes from push options

#12620
patched the DDOS issue with nodes which go offline:
#12409

However, offline nodes still see (much lesser) traffic spike, likely
because no origins are pruned from their bloom filter in active set:
https://github.com/solana-labs/solana/blob/aaf3790d8/core/src/crds_gossip_push.rs#L276-L286
and so multiple nodes push redundant duplicate messages to them
simultaneously:
https://github.com/solana-labs/solana/blob/aaf3790d8/core/src/crds_gossip_push.rs#L254-L255

This commit will filter out inactive peers from potential push targets
entirely. To mitigate eclipse attacks, staked nodes are retried
periodically.

* uses current timestamp in test/crds_gossip
mergify bot pushed a commit that referenced this pull request Oct 14, 2020
* filters out inactive nodes from push options

#12620
patched the DDOS issue with nodes which go offline:
#12409

However, offline nodes still see (much lesser) traffic spike, likely
because no origins are pruned from their bloom filter in active set:
https://github.com/solana-labs/solana/blob/aaf3790d8/core/src/crds_gossip_push.rs#L276-L286
and so multiple nodes push redundant duplicate messages to them
simultaneously:
https://github.com/solana-labs/solana/blob/aaf3790d8/core/src/crds_gossip_push.rs#L254-L255

This commit will filter out inactive peers from potential push targets
entirely. To mitigate eclipse attacks, staked nodes are retried
periodically.

* uses current timestamp in test/crds_gossip

(cherry picked from commit a5c6a78)
mergify bot pushed a commit that referenced this pull request Oct 20, 2020
* filters out inactive nodes from push options

#12620
patched the DDOS issue with nodes which go offline:
#12409

However, offline nodes still see (much lesser) traffic spike, likely
because no origins are pruned from their bloom filter in active set:
https://github.com/solana-labs/solana/blob/aaf3790d8/core/src/crds_gossip_push.rs#L276-L286
and so multiple nodes push redundant duplicate messages to them
simultaneously:
https://github.com/solana-labs/solana/blob/aaf3790d8/core/src/crds_gossip_push.rs#L254-L255

This commit will filter out inactive peers from potential push targets
entirely. To mitigate eclipse attacks, staked nodes are retried
periodically.

* uses current timestamp in test/crds_gossip

(cherry picked from commit a5c6a78)
mergify bot added a commit that referenced this pull request Oct 20, 2020
* filters out inactive nodes from push options

#12620
patched the DDOS issue with nodes which go offline:
#12409

However, offline nodes still see (much lesser) traffic spike, likely
because no origins are pruned from their bloom filter in active set:
https://github.com/solana-labs/solana/blob/aaf3790d8/core/src/crds_gossip_push.rs#L276-L286
and so multiple nodes push redundant duplicate messages to them
simultaneously:
https://github.com/solana-labs/solana/blob/aaf3790d8/core/src/crds_gossip_push.rs#L254-L255

This commit will filter out inactive peers from potential push targets
entirely. To mitigate eclipse attacks, staked nodes are retried
periodically.

* uses current timestamp in test/crds_gossip

(cherry picked from commit a5c6a78)

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
behzadnouri added a commit to behzadnouri/solana that referenced this pull request Nov 11, 2020
Inactive nodes are still observing incoming gossip traffic:
https://discord.com/channels/428295358100013066/670512312339398668/776140351291260968
likely because of pull-requests.

Previous related issues and commits:
solana-labs#12409
solana-labs#12620
solana-labs#12674

This commit implements same logic as
solana-labs#12674
to exclude inactive nodes from pull options, with the same periodic
retry logic for offline staked nodes in order to mitigate eclipse
attack.
behzadnouri added a commit to behzadnouri/solana that referenced this pull request Nov 11, 2020
Inactive nodes are still observing incoming gossip traffic:
https://discord.com/channels/428295358100013066/670512312339398668/776140351291260968
likely because of pull-requests.

Previous related issues and commits:
solana-labs#12409
solana-labs#12620
solana-labs#12674

This commit implements same logic as
solana-labs#12674
to exclude inactive nodes from pull options, with the same periodic
retry logic for offline staked nodes in order to mitigate eclipse
attack.
behzadnouri added a commit that referenced this pull request Nov 12, 2020
Inactive nodes are still observing incoming gossip traffic:
https://discord.com/channels/428295358100013066/670512312339398668/776140351291260968
likely because of pull-requests.

Previous related issues and commits:
#12409
#12620
#12674

This commit implements same logic as
#12674
to exclude inactive nodes from pull options, with the same periodic
retry logic for offline staked nodes in order to mitigate eclipse
attack.
mergify bot pushed a commit that referenced this pull request Nov 12, 2020
Inactive nodes are still observing incoming gossip traffic:
https://discord.com/channels/428295358100013066/670512312339398668/776140351291260968
likely because of pull-requests.

Previous related issues and commits:
#12409
#12620
#12674

This commit implements same logic as
#12674
to exclude inactive nodes from pull options, with the same periodic
retry logic for offline staked nodes in order to mitigate eclipse
attack.

(cherry picked from commit 4e4e12b)
behzadnouri added a commit that referenced this pull request Nov 12, 2020
Inactive nodes are still observing incoming gossip traffic:
https://discord.com/channels/428295358100013066/670512312339398668/776140351291260968
likely because of pull-requests.

Previous related issues and commits:
#12409
#12620
#12674

This commit implements same logic as
#12674
to exclude inactive nodes from pull options, with the same periodic
retry logic for offline staked nodes in order to mitigate eclipse
attack.

(cherry picked from commit 4e4e12b)
mergify bot added a commit that referenced this pull request Nov 12, 2020
Inactive nodes are still observing incoming gossip traffic:
https://discord.com/channels/428295358100013066/670512312339398668/776140351291260968
likely because of pull-requests.

Previous related issues and commits:
#12409
#12620
#12674

This commit implements same logic as
#12674
to exclude inactive nodes from pull options, with the same periodic
retry logic for offline staked nodes in order to mitigate eclipse
attack.

(cherry picked from commit 4e4e12b)

Co-authored-by: behzad nouri <behzadnouri@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Large amounts of traffic are being sent to offline nodes
3 participants