-
Notifications
You must be signed in to change notification settings - Fork 138
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: add event-standard #268
Conversation
hey, do you think we need a version for the event standard itself? So that we can support the evolution of this standard. |
wasn't thinking of that but yes, do you mean this - https://github.com/near/NEPs/pull/268/files#diff-54ad87ad1f7568238db42e0751f9ceecdcf416d189dc7896e6a565aee0bc2140R51 As this standard evolves and reaches a more stable version e.g. >= 1.0, we can expect less disruptive changes for implementors. Of course it shouldn't be enforced so if v0.5 works for consumer A then potentially still be able to parse v1.0 events but some fields would be null. |
Just understood what you meant. How would we know other format like Not sure, I think that's part of discussions that hasn't happened yet for the different formats an event can be. Each format could have the version embedded or appended like so |
I am all for having a dedicated NEP for the events. Yet, I am a bit concerned about having too many event formats, so I believe that we don't want to have versioning; I believe having unique names will be enough:
That said, I don't want us to overengineer the marker name and introduce versioning where we only define a serialization format and a slim header ( |
yeah by adding version I meant something like The reason why I think it would be nice to have a version is that this proposal is mainly driven by a NFT use case #256 , we cannot say it's flexible enough for all other cases. A semantic version, if used properly, could help clients to identify incompatible updates of this standard, no body can guarantee this standard won't change in the future. I totally agree to make this simple and slim, one work around could be logging |
another concern is that we current have a limit for the max number of logs a transaction could have. If we are using logs for events, this could be a bottleneck. |
Yes the limitation is 16kb string. It is already limited e.g. a batch with very large number is generally not possible. Hoping for a good baseline but is a known drawback. While it is a good idea to version events themselves, soon will end up something like this
This could be seen as unnecessary duplication or a very complex versioning system. We want the events to be generic and not only for NFTs. Most of the specificities are in the |
This PR was taken over in #298 and resulted in NEP-297. |
Based on #256 (comment)
Need to separate standards of event vs. the information it captures.
Event Standard
This pr says every event should adhere to common format - json, binary, etc.