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

p2p: dead/solo subnets investigation #1896

Closed
wants to merge 14 commits into from

Conversation

iurii-ssv
Copy link
Contributor

No description provided.

@iurii-ssv iurii-ssv marked this pull request as draft November 29, 2024 19:59
@moshe-blox
Copy link
Contributor

moshe-blox commented Dec 4, 2024

@iurii-ssv @y0sher

Summarizing our convo:

  • This is a good direction we'd like to explore
  • We should consider switching from discoverOne->filter->connect to discoverMany->rank->selectBest loop (using a scoring function that takes into account how each peer improves our less populated subnets)
  • Being too selective in outgoing/incoming connections is (in our estimation) an attack vector, because its easy to fake subnets in discovery and become everyone's #​1 choice, so this change likely requires us to validate subnets claims by peers whereas now we trust them blindly (@y0sher @MatheusFranco99)
  • In order to not stray too far off what we know from Ethereum clients (which dont seem to filter much if at all), we should consider being less harsh in filtering incoming connections, and instead focus only on being selective in outgoing conns and rely on proper balancing to cut off the excess.

@iurii-ssv
Copy link
Contributor Author

iurii-ssv commented Dec 4, 2024

focus only on being selective in outgoing conns and rely on proper balancing to cut off the excess (unless anyone can point to why very selective incoming isn't really a risk)

Relevant note, I think at a bare minimum we probably want to have 2 separate maxPeers limit per each of connection-direction (incoming/outgoing), as opposed to a single shared one - because what I observed in my testing is we would get to maxPeers just from incoming connections very fast (and keep getting more and more of them), and hence we won't be able to open much of new outgoing connections (those "discovery" suggest). Even though we trim ~2 connections per 30s or so, it seems new/pending incoming connections quite often take those 2 slots for themselves.

@iurii-ssv iurii-ssv changed the title p2p: peering adjustments p2p: dead/solo subnets investigation Dec 4, 2024
@iurii-ssv
Copy link
Contributor Author

Closing since #1949 supersedes this one.

@iurii-ssv iurii-ssv closed this Dec 18, 2024
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.

3 participants