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

Events: lift value type restriction to allow any DAG-CBOR encoded type #1111

Open
raulk opened this issue Nov 17, 2022 · 2 comments
Open

Events: lift value type restriction to allow any DAG-CBOR encoded type #1111

raulk opened this issue Nov 17, 2022 · 2 comments
Labels
P1 P1: Must be resolved Topic: Logs and events
Milestone

Comments

@raulk
Copy link
Member

raulk commented Nov 17, 2022

Event entry values are defined to be DAG-CBOR in the FIP. This enables introspection through a self-describing format. However, we need to decide if this is just a recommendation, or we effectively enforce it in the FVM by validating with as little overhead as possible (we don't care about the payload, and we don't care to traverse any links in it, we just care that it's correct DAG-CBOR).

Long (heated) discussion here: #1049 (comment)

Next step is to take it to a broader audience within the FIP discussion, and to come back here and implement the outcome.

@raulk
Copy link
Member Author

raulk commented Jan 4, 2023

We have simplified this problem for M2.1. FIP-0049 now specifies the type of this field as any DAG-CBOR, but subsequently restricts it to only CBOR Major Type 2 (byte strings). So we can implement the value field as Vec<u8> today and defer this decision to a later milestone when we lift this restriction.

@raulk raulk changed the title Events: entry value DAG-CBOR validation Events: lift value type restriction to allow any DAG-CBOR encoded type Jan 4, 2023
@Stebalien
Copy link
Member

Current status: We've now specified the value field as "an IPLD block" and have added a codec field. We currently restrict this to "raw", but will likely allow other codecs in the future.

@Stebalien Stebalien reopened this Feb 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 P1: Must be resolved Topic: Logs and events
Projects
None yet
Development

No branches or pull requests

2 participants