-
Notifications
You must be signed in to change notification settings - Fork 7
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
Extend manifest with chain exchange configuration #810
Draft
masih
wants to merge
3
commits into
masih/pubsub-chainexchange-listener
Choose a base branch
from
masih/chainexchange-mfst
base: masih/pubsub-chainexchange-listener
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Extend manifest with chain exchange configuration #810
masih
wants to merge
3
commits into
masih/pubsub-chainexchange-listener
from
masih/chainexchange-mfst
Conversation
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
Implement chain exchange protocol over pubsub as a mechanism to propagate `ECChain` across the network with reasonable spam protection. To protect against spam the mechanism employs two separate caches for chains that are generally discovered across the network and the ones explicitly looked up or broadcasted by the local node. Both caches are capped LRU, where the LRU recent-ness is used as a way to prioritise chains we cache while keeping the total memory footprint fixed. This approach is not the most memory efficient but is simpler to implement as the LRU encapsulates a lot of the complexity. The code has a lot of TODOs as places to improve or question to the reviewer. To action most of the TODOs further refactoring across the code is needed which is intended to be actioned in separate commits. The code path introduced here is not integrated into F3 host; future PRs will iteratively integrate the mechanism across F3 host and other places. Part of #792
Expand chain exchange to accept a listener which is notified whenever a new chain is discovered. This mechanism is intended to be integrated into F3 host pubsub, whereupon receiving a partial message the host looks up its chain. When known, the chain is returned immediately. Otherwise, the host would buffer the partial message and await notification of its discovering from chain exchange. Part of #792
masih
force-pushed
the
masih/chainexchange-mfst
branch
from
December 20, 2024 13:46
42ea078
to
ab2aca1
Compare
masih
changed the base branch from
main
to
masih/pubsub-chainexchange-listener
December 20, 2024 13:51
masih
force-pushed
the
masih/chainexchange-mfst
branch
from
December 20, 2024 13:56
ab2aca1
to
3e33616
Compare
Add chain exchange configuration to the manifest along with validation. Part of #792
masih
force-pushed
the
masih/chainexchange-mfst
branch
from
December 20, 2024 14:04
3e33616
to
0c8b3e4
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## masih/pubsub-chainexchange-listener #810 +/- ##
=======================================================================
+ Coverage 68.45% 68.68% +0.23%
=======================================================================
Files 81 81
Lines 8260 8286 +26
=======================================================================
+ Hits 5654 5691 +37
+ Misses 2117 2108 -9
+ Partials 489 487 -2
|
masih
force-pushed
the
masih/pubsub-chainexchange-listener
branch
3 times, most recently
from
December 20, 2024 16:43
b200822
to
7c4840e
Compare
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.
Add chain exchange configuration to the manifest along with validation.
Part of #792
Review #808 First.