Skip to content

Conversation

@vgonkivs
Copy link
Member

@vgonkivs vgonkivs commented Sep 2, 2025

Added a specification for the peer discovery in shrex.

Rendered

@vgonkivs vgonkivs self-assigned this Sep 2, 2025
@vgonkivs vgonkivs added the kind:docs For solely documentation PRs label Sep 2, 2025
@codecov-commenter
Copy link

codecov-commenter commented Sep 2, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (shrex_spec@1751a5c). Learn more about missing BASE report.

Additional details and impacted files
@@              Coverage Diff              @@
##             shrex_spec    #4516   +/-   ##
=============================================
  Coverage              ?   35.41%           
=============================================
  Files                 ?      304           
  Lines                 ?    24297           
  Branches              ?        0           
=============================================
  Hits                  ?     8605           
  Misses                ?    14745           
  Partials              ?      947           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@Wondertan Wondertan left a comment

Choose a reason for hiding this comment

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

First pass. Please add a link to the rendered markdown to see the rendered diagram.

Directionally, the spec is alright. My main concern is that implementation details are mixed into the part of specification. Particularly, parts that have to be specified in main body of the doc with words are somewhere hidden in implementation details in code, like tags, params and rationale for them.

@vgonkivs vgonkivs requested a review from Wondertan September 4, 2025 11:12
Copy link
Member

@renaynay renaynay left a comment

Choose a reason for hiding this comment

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

We should make it very clear that from a discovery standpoint - full and bridge nodes are identical in the services they can provide to light nodes and that is the rationale for both advertising under full tag. I think even though we specify that full nodes are deprecated, it's a bit confusing to follow in this doc.

Also mention the connectedness of the peers and what kind of connectedness we expect peers to have that we maintain in our limited peer set. Make sure to specify that the criteria for staying in the limited peer set is that it is actively connected to the node at all times, and once that changes, that we kick peer + discover new one that meets connectedness criteria.

Copy link
Member

Choose a reason for hiding this comment

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

one thing is we need to mention connectedness status and that the peers in the limited set must active connections - otherwise they must drop the peer for which connectedness changes to anything but connected and discover a new active connection.

@vgonkivs vgonkivs requested a review from renaynay September 8, 2025 14:32
Copy link
Member

@renaynay renaynay left a comment

Choose a reason for hiding this comment

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

Besides these comments, I think it's pretty good coverage of discovery!

Copy link
Member

Choose a reason for hiding this comment

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

sentence here is duplicated

Copy link
Member

Choose a reason for hiding this comment

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

The discovery service maintains a limited peer set in which all peers MUST have active connections with the host service. When connectedness changes from active to any other state, the peer MUST be immediately dropped and replaced through new discovery. The dropped peer SHOULD be added to a cache with backoff so it will not be prematurely re-connected to through discovery.

Copy link
Member

Choose a reason for hiding this comment

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

we can use active here to be clear, as we use it elsewhere.

Copy link
Member Author

Choose a reason for hiding this comment

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

removed a limited set everywhere and changed to Active Set in glossary

@vgonkivs vgonkivs requested a review from renaynay September 9, 2025 10:24
@vgonkivs vgonkivs changed the base branch from main to shrex_spec September 9, 2025 10:28
@walldiss
Copy link
Member

walldiss commented Sep 9, 2025

Need to add network level params for dht configuration (per node type etc)

Comment on lines 37 to 40
DHT Configuration: The kad-dht is configured with default libp2p parameters and operates in different modes based on node type:

Light Nodes: dht.ModeClient - consume DHT services without serving DHT queries
Bridge/Full Nodes: dht.ModeServer - both consume and serve DHT queries to support network infrastructure
Copy link
Member

Choose a reason for hiding this comment

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

When rendered, this looks like a single paragraph. Also the overview is not section to put DHT configuration and modes.

@vgonkivs vgonkivs merged commit 11ee55b into celestiaorg:shrex_spec Sep 11, 2025
28 of 30 checks passed
vgonkivs added a commit that referenced this pull request Oct 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind:docs For solely documentation PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants