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: validate content topics in encoder and decoder #1710

Closed
Tracked by #65
adklempner opened this issue Nov 7, 2023 · 1 comment · Fixed by #1723
Closed
Tracked by #65

feat: validate content topics in encoder and decoder #1710

adklempner opened this issue Nov 7, 2023 · 1 comment · Fixed by #1723
Assignees
Labels
E:1.2: Autosharding for autoscaling See https://github.com/waku-org/pm/issues/65 for details

Comments

@adklempner
Copy link
Member

adklempner commented Nov 7, 2023

This is a feature

Problem

all content topics in js-waku are treated as strings without any validation. According to spec for autosharding, the content topics MUST follow the specified format: https://rfc.vac.dev/spec/51/#content-topics-format-for-autosharding

Proposed Solutions

Create a function that validates a content topic based on the specified format

Use the function to validate any content topics used to create an encoder or decoder IF the node is setup to use autosharding

Notes

We want to continue to use content topic as a string in order to not introduce many breaking changes, but we will validate it in the most important spots

@adklempner adklempner added the E:1.2: Autosharding for autoscaling See https://github.com/waku-org/pm/issues/65 for details label Nov 7, 2023
@adklempner adklempner self-assigned this Nov 7, 2023
@adklempner adklempner changed the title feat: validate content topics in any API functions feat: validate content topics in encoder and decoder Nov 7, 2023
@adklempner
Copy link
Member Author

I've made a PR that adds the function to validate a content topic: #1711

However, it shouldn't actually be used in encoder/decoder until we add a config which determines whether or not the node uses autosharding or static sharding

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E:1.2: Autosharding for autoscaling See https://github.com/waku-org/pm/issues/65 for details
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant