Skip to content
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

allow to omit peerId and seqno #372

Merged
merged 10 commits into from
Sep 23, 2020
Merged

allow to omit peerId and seqno #372

merged 10 commits into from
Sep 23, 2020

Conversation

sinkingsugar
Copy link
Contributor

@sinkingsugar sinkingsugar commented Sep 22, 2020

@@ -1031,11 +1031,21 @@ method rpcHandler*(g: GossipSub,

g.mcache.put(msgId, msg)

if g.verifySignature and not msg.verify(peer.peerId):
if (msg.signature.len > 0 or g.verifySignature) and not msg.verify(peer.peerId):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

peer.peerId is not really needed for verify, not sure why it's there..?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's indeed not used

@sinkingsugar sinkingsugar marked this pull request as ready for review September 23, 2020 09:40
@dryajov
Copy link
Contributor

dryajov commented Sep 23, 2020

Seems like this is changing again as per libp2p/specs#294 (comment). We should probably hold off on it for the time being, or perhaps adopt a lax approach?

@sinkingsugar
Copy link
Contributor Author

Yeah, but it's currently indeed lax so it should be just fine and useful for NBC.

@arnetheduck
Copy link
Contributor

yes, the lax mode is an intermediary step that is useful now

@arnetheduck arnetheduck merged commit ec32212 into master Sep 23, 2020
@arnetheduck arnetheduck deleted the anonymize-gossip branch September 23, 2020 15:56
@sinkingsugar
Copy link
Contributor Author

sinkingsugar commented Sep 24, 2020

This PR was not complete, I said I needed a couple more hours on it.
The message cache won't work as the IDs are not generated properly.
We use the same style as go btw
https://github.com/libp2p/go-libp2p-pubsub/blob/f7f33e10cc18b4a20542d0208aeaccb91ad64f99/pubsub.go#L965
But this doesn't work.
Notice proto's PR doesn't solve that either.

@sinkingsugar
Copy link
Contributor Author

Since it's merged I will continue next week. As there is something weird going on with floodsub too.

@stefantalpalaru
Copy link
Contributor

This PR was not complete

Add "[WIP]" at the start of the title, while your PR is still "work in progress".

@arnetheduck
Copy link
Contributor

right, forgot about that - need this for nbc to do something more reasnable soon - it's not affected at this point so.,

dryajov pushed a commit that referenced this pull request Sep 24, 2020
* allow to omit peerId and seqno

* small refactor

* wip

* fix message encoding

* improve rpc signature logic

* remove peerid from verify

* trace fixes

* fix message test

* fix gossip 1.0 tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants