feat(kernel): publish simulation receipt at the end of simulation#1414
Open
feat(kernel): publish simulation receipt at the end of simulation#1414
Conversation
Codecov Report❌ Patch coverage is
... and 1 file with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
ec369fb to
22c54bd
Compare
ryutamago
reviewed
Dec 16, 2025
| "tezos-smart-rollup/extra", | ||
| "tezos-smart-rollup/native-kernel", | ||
| ] | ||
| simulation = ["jstz_core/simulation", "jstz_proto/simulation"] |
Collaborator
There was a problem hiding this comment.
since jstz_proto already enables jstz_core/simulation we can remove redundancy by:
Suggested change
| simulation = ["jstz_core/simulation", "jstz_proto/simulation"] | |
| simulation = ["jstz_proto/simulation"] |
ryutamago
reviewed
Dec 16, 2025
Comment on lines
+2
to
+7
| #[cfg(feature = "simulation")] | ||
| use jstz_core::event::EventPublish; | ||
| use jstz_core::kv::{Storage, Transaction}; | ||
| use jstz_crypto::{public_key::PublicKey, smart_function_hash::SmartFunctionHash}; | ||
| use jstz_proto::executor; | ||
| #[cfg(feature = "simulation")] | ||
| use jstz_proto::receipt::SimulationReceipt; |
Collaborator
There was a problem hiding this comment.
nit:
#[cfg(feature = "simulation")]
use { jstz_core::event::EventPublish, jstz_proto::receipt::SimulationReceipt}
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.
Context
A simulation receipt needs to be published at the end of simulation. Today, the simulation receipt looks very similar to a Receipt but later on, it will contain more metadata about the simulation like gas.
Closes https://linear.app/tezos/issue/JSTZ-998/publish-simulation-receipt-event-when-simulation
Description
Added
SimulationReceiptevent andpublish_receiptto control how receipts are published. If simulation, then we publish the event, otherwise publish original receipt debug logs. The original debug log behaviour is maintained as it is not related to this PR.Manually testing the PR
cargo nextest run -p jstz_kernel --features riscv_kernel,simulation