-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
gossipsub #5373
gossipsub #5373
Conversation
Ugh, it seems that the configuration repo has been extracted from go-ipfs in the last day, which breaks my patch. |
f3f640f
to
2753fd8
Compare
Updated |
package.json
Outdated
"name": "go-libp2p-pubsub-router", | ||
"version": "0.3.9" | ||
"version": "0.3.10" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, I had to re-publish so this'll have to be re-updated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, will do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately this pulled a bunch of new deps, so lots of things need to be updated recursively... sigh
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, this update touches too many things -- we'll have to wait for #5375 I think, as there are also code changes involved.
|
||
test_expect_success "enable gossipsub" ' | ||
for x in $(seq 0 4); do | ||
ipfsi 0 config Pubsub.Router gossipsub |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be ipfsi $x ...
. FYI, you can also use iptb for-each ipfs config ...
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a bit odd that the tests are still passing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops, good catch!
It's not odd that the test still pass, gossipsub is backwards compatible with floodsub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah. Good to know.
We are blocked on #5375 as it interleaves a big update with a competing update to We will have to wait for those updates to get merged (and rebase) before we can proceed, as it's out of scope to include a cascade of irrelevant package touches in this pr, let alone that it would create conflicts. |
@vyzo update merged. |
rebased. |
hrm, some merge errors -- fixing. |
should be ok now. |
caa4a2a
to
23a4097
Compare
Rebased. |
' | ||
|
||
# this is just a copy of t0180-pubsub; smell. | ||
startup_cluster $NUM_NODES --enable-pubsub-experiment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should be able to wrap this into a function in the pubsub test and call it with different setup, like https://github.com/ipfs/go-ipfs/blob/master/test/sharness/t0170-dht.sh#L10
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I kind of wanted to keep the two tests separate, but maybe they should be one.
We could also have a library script that contains the test logic in a function, and then source that from the two tests...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Up to you. I'm usually not a stickler on DRYing up tests, especially integration tests. We should never have to change these anyways ("don't break userspace").
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, me neither... there is some merit in having a separate test for gossipsub so that the two can vary and perhaps have tests for protocol specific behaviour.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so if anyone has strong feelings about it, i can merge into a single test -- but i am otherwise inclined to keep it as is.
docs/experimental-features.md
Outdated
@@ -43,6 +43,11 @@ experimental, default-disabled. | |||
run your daemon with the `--enable-pubsub-experiment` flag. Then use the | |||
`ipfs pubsub` commands. | |||
|
|||
### gossipsub | |||
|
|||
You can enable the new experimental gossipsub protocol via configuration: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd add a short line explaining the difference between the default floodsub and gossipsub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hrm, maybe, although that's a topic in itself. There will be a gossipsub spec soon [TM] and perhaps we could link to that instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now, I'd just go with:
Gossipsub is a new, experimental routing protocol for pubsub that should waste less bandwidth than the current default routing protocol (floodsub). It's backwards compatible with floodsub so enabling this feature shouldn't break compatibility with existing IPFS nodes.
That should tell users everything they need to know (for now).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that sounds good -- will add.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
License: MIT Signed-off-by: vyzo <[email protected]>
License: MIT Signed-off-by: vyzo <[email protected]>
in particular, this enabls gossipsub when configured so. License: MIT Signed-off-by: vyzo <[email protected]>
just a copy of t0180-pubsub with gossipsub enabled for now License: MIT Signed-off-by: vyzo <[email protected]>
License: MIT Signed-off-by: vyzo <[email protected]>
License: MIT Signed-off-by: vyzo <[email protected]>
License: MIT Signed-off-by: Steven Allen <[email protected]>
23a4097
to
9300997
Compare
License: MIT Signed-off-by: vyzo <[email protected]>
gossipsub This commit was moved from ipfs/kubo@99df463
Adds the option to use gossipsub as the pubsub protocol.
This is handled by adding an
Pubusub.Router
config option, which allows the user to specify the pubsub router to use.The possible values are
floodsub
(or empty), for the default floodsub protocolgossipsub
for the gossipsub protocolRequires:
Blocked: