-
Notifications
You must be signed in to change notification settings - Fork 229
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add experimental optimistic provide (#783)
* feat: netsize package * feat: initialize netsize estimator * fix: move estimator tracking top get closest peers * feat: OptimisticProvide method * feat: improve go-routine handling * fix: use correct add provider rpc context * feat: debug logs * feat: complex context handling * chore: remove debug directives * chore: remove obsolete least square fit * fix: staticcheck error * fix: don't recalculate return threshold * feat: limit asynchronicity for optimistic provide * optprov: make weight function configurable * remove: case of completed optprov lookup I observed that the network size estimation is not correct for the optprov case in comparison to the classic-only measurement. I think the reason lies in the function that got removed here. * Revert "optprov: make weight function configurable" This reverts commit 0e77534. * refactor: remove unnecessary variable * test: add rudimentary netsize test * Revert "remove: case of completed optprov lookup" This reverts commit f6da739. * improve: weight calculation for non-full buckets * Update dht_options.go Co-authored-by: Jorropo <[email protected]> * incorporate pr feedback * fix: tests * Expose DHT network size estimation * Fix deprecated API * Expose network size estimation metric * add optimistic provide smoke test * un-export optimistic provide constants * Mark optimistic provide as experimental * clarify optimistic provide code comments --------- Co-authored-by: Jorropo <[email protected]>
- Loading branch information
1 parent
dd27ddd
commit 32fbe47
Showing
13 changed files
with
901 additions
and
49 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
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.