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 #1690

Closed
1 of 4 tasks
chair28980 opened this issue Oct 26, 2023 · 11 comments · Fixed by #1697 or #2097
Closed
1 of 4 tasks

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

chair28980 opened this issue Oct 26, 2023 · 11 comments · Fixed by #1697 or #2097
Assignees

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.
@danisharora099
Copy link
Collaborator

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)

For js-waku, we use Encoders and Decoders to encapsulate the pubsub topic -- IMO: this change should be added on the createEncoder and createDecoder, and converted to a string for the protocol.
All the error handling should be done on the createEncoder/Decoder function.
An example of this looks like: a75a66b

cc @fryorcraken

@danisharora099 danisharora099 moved this from In Progress to Code Review / QA in Waku Nov 3, 2023
@danisharora099
Copy link
Collaborator

Weekly Update

@github-project-automation github-project-automation bot moved this from Code Review / QA to Done in Waku Nov 28, 2023
@fryorcraken
Copy link
Collaborator

FYI #1749 (comment)

@chair28980 chair28980 moved this from Done to In Progress in Waku Dec 5, 2023
@chair28980 chair28980 moved this from In Progress to To Do in Waku Dec 5, 2023
@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
@chair28980
Copy link
Contributor Author

Planning to move this issue to Priority column in week 3 of January 2024.

@fryorcraken
Copy link
Collaborator

Note that Status is contemplating using named shard so I don't think we can fully deprecate.

@danisharora099 danisharora099 moved this from To Do to Triage in Waku Feb 7, 2024
@danisharora099
Copy link
Collaborator

Note that Status is contemplating using named shard so I don't think we can fully deprecate.

Moving this back to triage. Once we have confirmation in either direction, we can handle this issue as required.

@chair28980
Copy link
Contributor Author

Moving to icebox, standing by for update from Status to confirm this update is required or not.

@fryorcraken do you know who the appropriate stakeholder on Status team is to verify the necessity of deprecating named sharding?

@chair28980 chair28980 moved this from Triage to Icebox in Waku Mar 6, 2024
@fryorcraken
Copy link
Collaborator

Moving to icebox, standing by for update from Status to confirm this update is required or not.

@fryorcraken do you know who the appropriate stakeholder on Status team is to verify the necessity of deprecating named sharding?

We are stakeholders now.

Status software uses static sharding all across. Even if not custom shards just yet.

Named sharding can be deprecated across the clients.

cc @jm-clius @Ivansete-status @weboko

@jm-clius
Copy link

Indeed. There should be no more use of named sharding in any clients.

@danisharora099
Copy link
Collaborator

danisharora099 commented May 29, 2024

Thanks for the clarification! Sounds great.

Named sharding can be deprecated across the clients.

This does remain blocked on js-waku until we allow js-waku to connect/work with The Waku Network.

cc @weboko keeping this in blocked

@danisharora099 danisharora099 moved this from Icebox to To Do in Waku May 29, 2024
@danisharora099 danisharora099 moved this from To Do to Blocked in Waku May 29, 2024
@weboko
Copy link
Collaborator

weboko commented Jun 27, 2024

Up to date checklist:

  • remove usage of DefaultPubsubTopic;

@weboko weboko moved this from Blocked to To Do in Waku Jun 27, 2024
@weboko weboko moved this from To Do to Priority in Waku Jun 27, 2024
@danisharora099 danisharora099 self-assigned this Aug 10, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in Waku Aug 12, 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
5 participants