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

Tags field for all message types #52

Open
odesenfans opened this issue Mar 28, 2023 · 1 comment
Open

Tags field for all message types #52

odesenfans opened this issue Mar 28, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@odesenfans
Copy link
Contributor

odesenfans commented Mar 28, 2023

We'd like to make it possible for users to add custom tags to messages to filter their data. Today, the CCN API already provides a tags field that filters out messages by a list field in content.content.tags. PROGRAM messages also have the content.metadata field, which is a user-defined dictionary. Problems:

  1. This field may or may not be defined, and if it is defined it may not be a list.
  2. We don't necessarily want to add custom metadata to all the message types and keep it simple.

To make tags available to all message types, I propose to add a new tags field to the base message content model. This field would be enforced to be a list of strings, with a limit of 16 tags. We apply it to the content and not the message itself so that tags are signed.

On the nodes side, to make this feature backwards compatible with the content.content.tags support for POST messages, we would process the tags in this order:

  1. Check if content.tags exists.
  2. If it does not, check if content.content.tags exists and is a list of strings.
@hoh
Copy link
Member

hoh commented Nov 27, 2023

Must this field be signed and therefore part of the item_hash ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants