Merged
Conversation
2f0a6fa to
7981f9b
Compare
Contributor
Author
|
Edit: force pushed over previous commit, for some reason Go decided I wanted the old multi addr dependency version in here. Removed that from the diff. |
vyzo
reviewed
Dec 16, 2019
Collaborator
vyzo
left a comment
There was a problem hiding this comment.
LGTM modulo a small nit regarding the naming of ChangeMsgIdFn.
vyzo
reviewed
Dec 16, 2019
Collaborator
|
We have a small issue with the ordering of options regarding the message id function, as seen by the tracer. |
vyzo
reviewed
Dec 16, 2019
Member
|
May want to make a release for @protolambda and @prestonvanloon to be able to test this change against rust. |
Collaborator
|
Yeah, release forthcoming. |
|
Is it the case that Go gossip implementation lacks client validation functionality? |
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.
See #247: this PR is fully backwards compatible, no public API changes, except for the addition of:
ChangeMsgIdFnSetMsgIdFntoMessageCache. The cache doesn't really need a single message id function from the start, so changing it with a method seems fine. And this way it doesn't break any existing code. Note that users of caches like this can update it once they get hold of the exact msg id function to use. E.g. gossipsub updates it when PubSub attaches the router. So it also avoids a painful early design choice of PubSub getting all options, and gossipsub not being able to adapt based on these Options, before initializing PubSub.MsgIdFunction, which has the same signature as the previous privatemsgIDhelper, but now it's configurable! The oldmsgIDis nowDefaultMsgIdFn.Optioncreated withWithMessageIdFnto apply your own message ID function to PubSub :)PS: I thought this was an easy and important issue to just fix it myself, and although I have some previous experience hacking on this repo (I looked deep into its concurrency and simulation for eth2 tooling for aggregation modeling), I can definitely appreciate a review since I don't normally contribute code upstream here.
Closes #247
cc @AgeManning