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

feat: Deprecate Named Sharding and Update Lightpush Client API #842

Closed
1 of 4 tasks
chair28980 opened this issue Oct 26, 2023 · 9 comments
Closed
1 of 4 tasks

feat: Deprecate Named Sharding and Update Lightpush Client API #842

chair28980 opened this issue Oct 26, 2023 · 9 comments

Comments

@chair28980
Copy link
Contributor

chair28980 commented Oct 26, 2023

In the context of discussions around named sharding and peer management for the Waku network, it is proposed to make the following changes to the Waku Network:

  1. Deprecate Support for Named Sharding:
  • It is recommended to remove support for named sharding.
  • Peer management should ensure that only peers supporting sharded topics are connected.
  1. Lightpush Protocol Updates:
  • The lightpush protocol itself should never be aware of the sharded format of pubsub topics. It is an extension of libp2p's gossipsub.
  • On a protocol level, the lightpush service node needs to handle requests on unsupported pubsub topics by returning a clear error code.
  1. Lightpush Client API Changes:
  • To maintain adherence to the sharded format, the lightpush client API should be updated.
  • New proposed format: lightPublish(WakuMessage, ClusterID, ShardNumber)
  • For legacy requests on named topics, the API could use a trial and error process to send the request to random service nodes. This can be done using the format: lightPublish(WakuMessage, PubsubTopic)
  • A request format that bypasses our peer management/selection: lightPublish(WakuMessage, PubsubTopic, ServiceNodeMultiaddr)

  • Users of custom pubsub topics should select a cluster id.
  • Use static sharding until the launch of The Waku Network.
  • Default Pubsub topic support remains for now, to be phased out as a later step

Acceptance Criteria:

  • Remove support for named sharding (except for default pubsub topic)
  • Update lightpush protocol to handle unsupported pubsub topics with clear error codes.
  • Introduce the new lightpush client API as mentioned above.
  • Update documentation to reflect these changes and guide users accordingly.
@fryorcraken fryorcraken added this to Waku Oct 26, 2023
@chair28980 chair28980 added the E:1.4: Sharded peer management and discovery See https://github.com/waku-org/pm/issues/67 for details label Oct 26, 2023
@harsh-98 harsh-98 self-assigned this Oct 27, 2023
@harsh-98 harsh-98 mentioned this issue Oct 27, 2023
4 tasks
@harsh-98
Copy link
Contributor

Weekly update

  • achieved: Create PR for review for removing of Named Pubsubtopic.

@harsh-98
Copy link
Contributor

@chair28980 regarding Peer management should ensure that only peers supporting sharded topics are connected.. This also includes default pubsub topic right?

@chair28980
Copy link
Contributor Author

@harsh-98 good question, I'm not sure, @fryorcraken / @jm-clius your thoughts on this?

@chair28980 chair28980 moved this to In Progress in Waku Oct 31, 2023
@fryorcraken
Copy link
Collaborator

@chair28980 regarding Peer management should ensure that only peers supporting sharded topics are connected.. This also includes default pubsub topic right?

Cc @jm-clius @SionoiS on this

@SionoiS
Copy link

SionoiS commented Nov 3, 2023

It should IMO but it's going to break so much stuff... Necessary pain I guess.

If we don't remove the default pubsub topic then what's the point of dropping support for named shard?

@jm-clius
Copy link

jm-clius commented Nov 3, 2023

Indeed, although we should certainly phase this in: I think at minimum we need the public Waku Network running, change default configuration to use this cluster of shards and then we can consider deprecating this.

@fryorcraken
Copy link
Collaborator

IMO default pubsub topic should be the only supported named shard moving forward.
Best to keep compatibility at first, until we are happy to push for migration of current users to autosharding.

In terms of behaviour, I'd say in general "no shard" = default pubsub topic.

@chair28980 chair28980 moved this from In Progress to Icebox in Waku Nov 28, 2023
@chair28980
Copy link
Contributor Author

@harsh-98 heads up we are iceboxing all E:1.4 issues that are still in-progress including this issue.

@chair28980 chair28980 removed the E:1.4: Sharded peer management and discovery See https://github.com/waku-org/pm/issues/67 for details label Dec 5, 2023
@chaitanyaprem
Copy link
Collaborator

Descoping this for go-waku as we already support below in all APi's

  • no shard means default pubsubTopic

@github-project-automation github-project-automation bot moved this from Icebox to Done in Waku Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

6 participants