-
Notifications
You must be signed in to change notification settings - Fork 11.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable tracing in the execution layer (#21165)
## Description The main idea here is that we have a client (e.g., the upcoming replay tool) at some point calling the `execute_transaction_to_effects` from the `Executor` trait defined in `sui/sui-execution/src/executor.rs` to execute a PTB. We want execution of a PTB to be traced, the trace "returned" to the client which is responsible for delivering this trace to the user (e.g., by storing in to disk). In other words, we want the executor to be responsible for execution and tracing itself, and the client to be responsible for all the remaining handling of the generated trace (e.g., I/O operations). There are arguably many ways to accomplish this and this PR proposes one of them - passing optional `MoveTraceBuilder` as an additional argument to `execute_transaction_to_effects`. Ultimately, we want execution of the entire PTB to be traced, but in this PR we only trace execution of Move calls. Tracing of the remaining PTB commands will be added at a later time via external `TraceEvent`s, without further changing the interface being modified in this PR. `MoveTraceBuilder` creates an instance of `MoveTrace`, which contains a list of trace events including `TraceEvent::External`. This type of event can represent an arbitrary value, including arguments and return values of PTB commands.
- Loading branch information
Showing
21 changed files
with
104 additions
and
28 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -617,6 +617,7 @@ mod test { | |
kind, | ||
signer, | ||
genesis_digest, | ||
&mut None, | ||
); | ||
|
||
assert_eq!(&effects, genesis.effects()); | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.