Skip to content

Conversation

@peternose
Copy link
Collaborator

No description provided.

@netlify
Copy link

netlify bot commented Aug 12, 2025

Deploy Preview for oasisprotocol-oasis-core canceled.

Name Link
🔨 Latest commit 5b2ad42
🔍 Latest deploy log https://app.netlify.com/projects/oasisprotocol-oasis-core/deploys/68a4361dac87a800084665c9

@peternose peternose linked an issue Aug 12, 2025 that may be closed by this pull request
@peternose peternose force-pushed the peternose/breaking/events-root branch 3 times, most recently from f4a7992 to 4023dbf Compare August 14, 2025 00:50
@peternose peternose marked this pull request as ready for review August 14, 2025 01:16
@peternose peternose force-pushed the peternose/breaking/events-root branch from 4023dbf to f9c9a08 Compare August 14, 2025 01:41
return nil
}
return merkle.RootHash(provableEvents), nil
return cmttypes.NewResults(mux.state.proposal.resultsDeliverTx).Hash()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only DeliverTx events?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is how cometbft works.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do you prove other events?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, my answer was wrong. What I meant was that since NewResults strips all "non-deterministic" fields, no events can be verified using this hash. That holds also for events from DeliverTx. However, you can verify transaction results but only fields Code, Data, GasWanted, GasUsed.

To prove events, one must use our Merkle root, which will change if we change events. Observe that this root doesn't hold information in which phase of the block execution event occurred (begin, ..., end) as all current consumers don't care about that, and the implementation simplifies as we don't need to create root for every phase.

@peternose peternose force-pushed the peternose/breaking/events-root branch from f9c9a08 to 1113268 Compare August 14, 2025 11:35
The events root in block metadata system transaction now includes all events,
not just provable ones.
The results hash was added to the block metadata system transaction so that
stateless clients can partially verify the latest block’s results.
Copy link
Member

@kostko kostko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be good to validate this does not introduce any issues on Testnet and Mainnet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extend provable events in the block metadata transaction

3 participants