sui icon indicating copy to clipboard operation
sui copied to clipboard

[move] Initial trace format and implementation

Open tzakian opened this issue 1 year ago • 1 comments

Description

This PR adds the initial trace format, and the implementation of this trace format in the VM. I've gone through the tracing format with most of you synchronously so won't write out all the details here (but I will take it on to write a spec for the trace format once this is done so other folks can use it when consuming this format). Happy to go through it at any point in real time.

Other TODO: right now the MoveValues only support serialize and not deserialize back into Rust so we can only push a trace out from Rust but not consume it. The next thing I'm working on right now is adding support for that, and it may be either an update to this PR, or an additional PR depending on how involved that is...

Tests and integration of this into the Move CLI (not the Sui CLI yet) is in the PR above this one.

This keeps the tracing largely feature-gated in the VM, and the only additional overhead/change at runtime with gas-profiling turned off is the additional argument, but this argument is unused and should be optimized away (and at worst only add essentially no overhead).

I kept the gas-profiling feature flag and gated the new tracing under it. The plan being to eventually rename that flag at the same time that we update test coverage and gas profiling to use this new tracing format as well (but that's for a couple future PRs!).

PR Stack:

  1. #18727
  2. #18729 <<<<< You are here
  3. #18730

Test plan

PR above this one


Release notes

Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.

For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.

  • [ ] Protocol:
  • [ ] Nodes (Validators and Full nodes):
  • [ ] Indexer:
  • [ ] JSON-RPC:
  • [ ] GraphQL:
  • [ ] CLI:
  • [ ] Rust SDK:
  • [ ] REST API:

tzakian avatar Jul 18 '24 21:07 tzakian

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sui-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 11, 2024 6:11pm
3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
multisig-toolkit ⬜️ Ignored (Inspect) Visit Preview Sep 11, 2024 6:11pm
sui-kiosk ⬜️ Ignored (Inspect) Visit Preview Sep 11, 2024 6:11pm
sui-typescript-docs ⬜️ Ignored (Inspect) Visit Preview Sep 11, 2024 6:11pm

vercel[bot] avatar Jul 18 '24 21:07 vercel[bot]

Everything should be either responded to or addressed! Thanks for all the feedback and suggestions.

tzakian avatar Sep 06 '24 23:09 tzakian

left a reply and one more idiotic question :) format.rs is what we serialize out in a trace file (if we save to trace files), is that correct?

dariorussi avatar Sep 07 '24 02:09 dariorussi

Correct! That is what is serialized out :)

tzakian avatar Sep 09 '24 16:09 tzakian