feat(protocol): add transaction event types and commitments - #3833
Draft
partylikeits1983 wants to merge 2 commits into
Draft
feat(protocol): add transaction event types and commitments#3833partylikeits1983 wants to merge 2 commits into
partylikeits1983 wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3830. Part of #3803.
Summary
Add
TransactionEventandTransactionEventswith validated construction, checked appends, bounded serialization, and a cached event commitment. Empty payloads and duplicate events are supported, and failed appends leave the collection unchanged.The commitment uses a fixed size Poseidon2 hash chain that binds each event's emitter, topic, payload, and position. Tests include intermediate commitments for the later MASM implementation and verify that decoding rejects excessive lengths before reading payloads.
Scope
Rust types and tests only. Transaction outputs, IDs, signed summaries, protobuf, and kernel integration remain in #3831. Batch and block integration remains in #3832.
Review
This draft proposes
0x02_0002as the event hash domain, following the existing account patch and delta domains.