p2p: Capabilities Advertisement for Archival/Catchpoints#5702
Merged
cce merged 41 commits intoalgorand:feature/p2pfrom Nov 2, 2023
Merged
p2p: Capabilities Advertisement for Archival/Catchpoints#5702cce merged 41 commits intoalgorand:feature/p2pfrom
cce merged 41 commits intoalgorand:feature/p2pfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5702 +/- ##
==========================================
+ Coverage 55.54% 55.62% +0.08%
==========================================
Files 476 478 +2
Lines 66853 66980 +127
==========================================
+ Hits 37131 37256 +125
+ Misses 27193 27184 -9
- Partials 2529 2540 +11
... and 12 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Contributor
Author
|
Still need to add testing, merge from master, add some docs, etc. But feel free to give early feedback at this point if anyone has some. |
shiqizng
reviewed
Aug 31, 2023
shiqizng
reviewed
Aug 31, 2023
shiqizng
reviewed
Aug 31, 2023
shiqizng
reviewed
Aug 31, 2023
algorandskiy
reviewed
Sep 1, 2023
| DisableAPIAuth bool `version[30]:"false"` | ||
|
|
||
| // EnableDHT will turn on the hash table for use with capabilities advertisement | ||
| EnableDHTProviders bool `version[30]:"false"` |
| "EnableBlockService": false, | ||
| "EnableBlockServiceFallbackToArchiver": true, | ||
| "EnableCatchupFromArchiveServers": false, | ||
| "EnableDHTProviders": false, |
Contributor
There was a problem hiding this comment.
v30 should not be modified
|
|
||
| stateProofWorker *stateproof.Worker | ||
|
|
||
| capabilitiesDiscovery *p2p.CapabilitiesDiscovery |
Contributor
There was a problem hiding this comment.
is it possible to have node free of p2p dependency/implementation detail?
…creation (algorand#5672) goal network pregen [-p] [-t]: Generates genesis.json, root and part keys based on the template file [-t]. [-p] (pregendir) is where the genesis files are saved (since this is an inherited required flag), and it must be empty or command will error. goal network create [-r] [-t] [-p]: Imports files from pregendir to networkDir. Importing keys was already possible, but this explicitly copies over the keys from another directory, because network directories are wiped if there is an error during creation.
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PR is currently WIP. There are a few bits which are still being implemented.
This adds libp2p-kad-dht to go-algorand. In this PR it is wrapped in a cache and has some backoff logic included.
At a high level it is using the Content Provider interfaces in the DHT spec in a basic way. It sets up common namespaces for 2 basic capabilities (archival and catchpoints), and advertises those capabilities to bootstrap peers on node startup.
Next Steps (Not in this PR)
Integrate the peer store and provider stores with the catchup and fast catchup services in order to use them as the source of peer info (with SRV entries as a fallback).
In order for non-relay nodes to be able to use the DHT for capabilities advertisement, we'll need the relays to enable it--since the relays in the SRV list will be used as initial peers.
Test Plan
More testing to be added as the PR progresses. I'll update here.