Skip to content
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.

Default value for self emit option #22

Closed
vasco-santos opened this issue Jul 24, 2019 · 6 comments
Closed

Default value for self emit option #22

vasco-santos opened this issue Jul 24, 2019 · 6 comments
Labels
kind/enhancement A net-new feature or improvement to an existing feature kind/support A question or request for support status/ready Ready to be worked

Comments

@vasco-santos
Copy link
Member

Our floodsub implementation was self-emitting, pubsub messages if the node has previously subscribed to that topic. However, users may not expect this to happen and this is not clear at the moment.

In this context, I created PRs to allow this to be configurable:

libp2p/js-libp2p-floodsub#85
ChainSafe/gossipsub-js#40

In this context, I opened this issue for discussing whether we should continue with this default behaviour in js-libp2p, or change this to false.

cc @jacobheun

@vasco-santos vasco-santos added kind/enhancement A net-new feature or improvement to an existing feature kind/support A question or request for support status/ready Ready to be worked labels Jul 24, 2019
@a1300
Copy link
Contributor

a1300 commented Aug 22, 2019

@vasco-santos related to libp2p/js-libp2p#401

@vasco-santos
Copy link
Member Author

@a1300 any opinions on keeping the default to true or move to false?

@a1300
Copy link
Contributor

a1300 commented Aug 22, 2019

Personally I would leave the defaults for the options signMessages and strictSigning to true but the default for emitSelf I would change to false because I didn't expected that I would need to handle this case.

cc @vasco-santos @jacobheun

@jacobheun
Copy link
Contributor

I agree that emitSelf should be false by default, the current default behavior is counter intuitive.

@vasco-santos
Copy link
Member Author

I will work on changing that

@vasco-santos
Copy link
Member Author

It defaults to false now both on floodsub and gossipsub

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/enhancement A net-new feature or improvement to an existing feature kind/support A question or request for support status/ready Ready to be worked
Projects
None yet
Development

No branches or pull requests

3 participants