forked from celestiaorg/celestia-node
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(p2p/discovery)!: Implement
archival
discovery + syncing of his…
…toric blocks and blobs (celestiaorg#3188) This PR introduces the discovery of nodes advertising on the `archival` topic for the purpose of being able to request blobs and blocks that are older than the sampling window. In order to do so, there are now 2 instances of discovery (one for `full` nodes -- _all nodes running full block sync within the sampling window_, and one for `archival` nodes -- _nodes that sync, store and serve all historic data_) and 2 instances of peer managers (one for `full` and one for `archival`). **This PR is _breaking_ due to changes to metrics names.** Please also note that this PR introduces the ability to perform archival sync of blobs + blocks for **LIGHT AND FULL** nodes only regardless of whether the full nodes have pruning enabled or not. **Bridge nodes that have previously had pruning enabled will NOT be able to request historic data from the consensus core node.** The bridge node must run in archival mode (without `--experimental-pruning` enabled) in order to access historic data. **Bridge and Full nodes in archival mode (without `--experimental-pruning`)** ``` 2024-05-10T15:21:44.490+0200 INFO share/discovery discovery/manager.go:30 starting discovery {"topic": "full"} 2024-05-10T15:21:44.491+0200 INFO share/discovery discovery/manager.go:33 advertising to topic {"topic": "full"} 2024-05-10T15:21:44.491+0200 INFO share/discovery discovery/manager.go:30 starting discovery {"topic": "archival"} 2024-05-10T15:21:44.491+0200 INFO share/discovery discovery/manager.go:33 advertising to topic {"topic": "archival"} ``` **Bridge and Full nodes running `--experimental-pruning`** ``` 2024-05-10T15:19:20.698+0200 INFO share/discovery discovery/manager.go:30 starting discovery {"topic": "full"} 2024-05-10T15:19:20.698+0200 INFO share/discovery discovery/manager.go:33 advertising to topic {"topic": "full"} 2024-05-10T15:19:20.698+0200 INFO share/discovery discovery/manager.go:30 starting discovery {"topic": "archival"} ``` **Light nodes** ``` 2024-05-10T15:20:42.440+0200 INFO share/discovery discovery/manager.go:30 starting discovery {"topic": "full"} 2024-05-10T15:20:42.440+0200 INFO share/discovery discovery/manager.go:30 starting discovery {"topic": "archival"} ``` ----------------------------------------------------------- **TODO** - [x] test archival request routing per node type - [x] renaming some things inside discovery away from being `full`-node-centric - [x] rebase - [x] swamp test For follow-up PR: - [x] clarify / make disc metrics generic as there will now be 2 instances of discovery happening Nice to have; - [ ] benchmarks for LN
- Loading branch information
Showing
19 changed files
with
634 additions
and
305 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.