From f3d660ea8a044a825a443c27a522f78bcfcf9d7e Mon Sep 17 00:00:00 2001 From: libr Date: Fri, 23 Jan 2026 16:27:00 +0800 Subject: [PATCH 01/13] feat: remove move_vm_stack --- Cargo.lock | 664 ++++++++++++------ Cargo.toml | 4 +- .../src/oracles/sui/bool_judgement.rs | 5 +- .../src/oracles/sui/infinite_loop.rs | 5 +- crates/movy-fuzz/src/oracles/sui/overflow.rs | 20 +- .../src/oracles/sui/precision_loss.rs | 5 +- crates/movy-fuzz/src/oracles/sui/proceeds.rs | 5 +- .../src/oracles/sui/type_conversion.rs | 17 +- crates/movy-fuzz/src/oracles/sui/typed_bug.rs | 5 +- crates/movy-replay/src/tracer/concolic.rs | 171 ++--- crates/movy-replay/src/tracer/fuzz.rs | 65 +- crates/movy-replay/src/tracer/op.rs | 25 + crates/movy-replay/src/tracer/oracle.rs | 17 +- crates/movy-replay/src/tracer/tree.rs | 3 +- 14 files changed, 580 insertions(+), 431 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5d13d7c..1db4b4b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2670,6 +2670,14 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d" +[[package]] +name = "enum-compat-util" +version = "0.1.0" +source = "git+https://github.com/MystenLabs/sui?branch=main#7cee6921a0b6eeef7c4f59b233077cea7cad3918" +dependencies = [ + "serde_yaml", +] + [[package]] name = "enum-compat-util" version = "0.1.0" @@ -4998,6 +5006,11 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "move-abstract-interpreter" +version = "0.1.0" +source = "git+https://github.com/MystenLabs/sui?branch=main#7cee6921a0b6eeef7c4f59b233077cea7cad3918" + [[package]] name = "move-abstract-interpreter" version = "0.1.0" @@ -5008,30 +5021,56 @@ name = "move-abstract-interpreter-v2" version = "0.1.0" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" dependencies = [ - "move-binary-format", + "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", ] +[[package]] +name = "move-abstract-stack" +version = "0.0.1" +source = "git+https://github.com/MystenLabs/sui?branch=main#7cee6921a0b6eeef7c4f59b233077cea7cad3918" + [[package]] name = "move-abstract-stack" version = "0.0.1" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" +[[package]] +name = "move-binary-format" +version = "0.0.3" +source = "git+https://github.com/MystenLabs/sui?branch=main#7cee6921a0b6eeef7c4f59b233077cea7cad3918" +dependencies = [ + "anyhow", + "enum-compat-util 0.1.0 (git+https://github.com/MystenLabs/sui?branch=main)", + "indexmap 2.12.1", + "move-abstract-interpreter 0.1.0 (git+https://github.com/MystenLabs/sui?branch=main)", + "move-core-types 0.0.4 (git+https://github.com/MystenLabs/sui?branch=main)", + "move-proc-macros 0.1.0 (git+https://github.com/MystenLabs/sui?branch=main)", + "ref-cast", + "serde", + "variant_count", +] + [[package]] name = "move-binary-format" version = "0.0.3" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" dependencies = [ "anyhow", - "enum-compat-util", + "enum-compat-util 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "indexmap 2.12.1", - "move-abstract-interpreter", - "move-core-types", - "move-proc-macros", + "move-abstract-interpreter 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-proc-macros 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "ref-cast", "serde", "variant_count", ] +[[package]] +name = "move-borrow-graph" +version = "0.0.1" +source = "git+https://github.com/MystenLabs/sui?branch=main#7cee6921a0b6eeef7c4f59b233077cea7cad3918" + [[package]] name = "move-borrow-graph" version = "0.0.1" @@ -5044,9 +5083,9 @@ source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1 dependencies = [ "anyhow", "bcs", - "move-binary-format", - "move-command-line-common", - "move-core-types", + "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-command-line-common 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-ir-types", "move-symbol-pool", "serde", @@ -5060,36 +5099,62 @@ source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1 dependencies = [ "anyhow", "indexmap 2.12.1", - "move-binary-format", - "move-core-types", + "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "petgraph 0.8.3", "serde-reflection", ] +[[package]] +name = "move-bytecode-verifier" +version = "0.1.0" +source = "git+https://github.com/MystenLabs/sui?branch=main#7cee6921a0b6eeef7c4f59b233077cea7cad3918" +dependencies = [ + "move-abstract-interpreter 0.1.0 (git+https://github.com/MystenLabs/sui?branch=main)", + "move-abstract-stack 0.0.1 (git+https://github.com/MystenLabs/sui?branch=main)", + "move-binary-format 0.0.3 (git+https://github.com/MystenLabs/sui?branch=main)", + "move-borrow-graph 0.0.1 (git+https://github.com/MystenLabs/sui?branch=main)", + "move-bytecode-verifier-meter 0.1.0 (git+https://github.com/MystenLabs/sui?branch=main)", + "move-core-types 0.0.4 (git+https://github.com/MystenLabs/sui?branch=main)", + "move-regex-borrow-graph 0.0.1 (git+https://github.com/MystenLabs/sui?branch=main)", + "move-vm-config 0.1.0 (git+https://github.com/MystenLabs/sui?branch=main)", + "petgraph 0.8.3", +] + [[package]] name = "move-bytecode-verifier" version = "0.1.0" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" dependencies = [ - "move-abstract-interpreter", - "move-abstract-stack", - "move-binary-format", - "move-borrow-graph", - "move-bytecode-verifier-meter", - "move-core-types", - "move-regex-borrow-graph", - "move-vm-config", + "move-abstract-interpreter 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-abstract-stack 0.0.1 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-borrow-graph 0.0.1 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-bytecode-verifier-meter 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-regex-borrow-graph 0.0.1 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-vm-config 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "petgraph 0.8.3", ] +[[package]] +name = "move-bytecode-verifier-meter" +version = "0.1.0" +source = "git+https://github.com/MystenLabs/sui?branch=main#7cee6921a0b6eeef7c4f59b233077cea7cad3918" +dependencies = [ + "move-binary-format 0.0.3 (git+https://github.com/MystenLabs/sui?branch=main)", + "move-core-types 0.0.4 (git+https://github.com/MystenLabs/sui?branch=main)", + "move-vm-config 0.1.0 (git+https://github.com/MystenLabs/sui?branch=main)", +] + [[package]] name = "move-bytecode-verifier-meter" version = "0.1.0" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" dependencies = [ - "move-binary-format", - "move-core-types", - "move-vm-config", + "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-vm-config 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", ] [[package]] @@ -5098,12 +5163,12 @@ version = "0.1.0" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" dependencies = [ "move-abstract-interpreter-v2", - "move-abstract-stack", - "move-binary-format", - "move-borrow-graph", - "move-bytecode-verifier-meter", - "move-core-types", - "move-vm-config", + "move-abstract-stack 0.0.1 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-borrow-graph 0.0.1 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-bytecode-verifier-meter 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-vm-config 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "petgraph 0.8.3", ] @@ -5113,12 +5178,12 @@ version = "0.1.0" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" dependencies = [ "move-abstract-interpreter-v2", - "move-abstract-stack", - "move-binary-format", - "move-borrow-graph", - "move-bytecode-verifier-meter", - "move-core-types", - "move-vm-config", + "move-abstract-stack 0.0.1 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-borrow-graph 0.0.1 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-bytecode-verifier-meter 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-vm-config 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "petgraph 0.8.3", ] @@ -5128,15 +5193,35 @@ version = "0.1.0" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" dependencies = [ "move-abstract-interpreter-v2", - "move-abstract-stack", - "move-binary-format", - "move-borrow-graph", - "move-bytecode-verifier-meter", - "move-core-types", - "move-vm-config", + "move-abstract-stack 0.0.1 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-borrow-graph 0.0.1 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-bytecode-verifier-meter 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-vm-config 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "petgraph 0.8.3", ] +[[package]] +name = "move-command-line-common" +version = "0.1.0" +source = "git+https://github.com/MystenLabs/sui?branch=main#7cee6921a0b6eeef7c4f59b233077cea7cad3918" +dependencies = [ + "anyhow", + "bcs", + "colored", + "dirs-next", + "hex", + "insta", + "move-binary-format 0.0.3 (git+https://github.com/MystenLabs/sui?branch=main)", + "move-core-types 0.0.4 (git+https://github.com/MystenLabs/sui?branch=main)", + "packed_struct", + "serde", + "sha2 0.9.9", + "vfs", + "walkdir", +] + [[package]] name = "move-command-line-common" version = "0.1.0" @@ -5148,8 +5233,8 @@ dependencies = [ "dirs-next", "hex", "insta", - "move-binary-format", - "move-core-types", + "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "once_cell", "packed_struct", "serde", @@ -5171,16 +5256,16 @@ dependencies = [ "hex", "insta", "lsp-types 0.95.1", - "move-abstract-interpreter", - "move-binary-format", - "move-borrow-graph", + "move-abstract-interpreter 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-borrow-graph 0.0.1 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-bytecode-source-map", - "move-bytecode-verifier", - "move-command-line-common", - "move-core-types", + "move-bytecode-verifier 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-command-line-common 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-ir-to-bytecode", "move-ir-types", - "move-proc-macros", + "move-proc-macros 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-symbol-pool", "once_cell", "petgraph 0.8.3", @@ -5194,6 +5279,30 @@ dependencies = [ "vfs", ] +[[package]] +name = "move-core-types" +version = "0.0.4" +source = "git+https://github.com/MystenLabs/sui?branch=main#7cee6921a0b6eeef7c4f59b233077cea7cad3918" +dependencies = [ + "anyhow", + "bcs", + "enum-compat-util 0.1.0 (git+https://github.com/MystenLabs/sui?branch=main)", + "ethnum", + "hex", + "indexmap 2.12.1", + "leb128", + "move-proc-macros 0.1.0 (git+https://github.com/MystenLabs/sui?branch=main)", + "num", + "primitive-types 0.10.1", + "rand 0.8.5", + "ref-cast", + "serde", + "serde_bytes", + "serde_with", + "thiserror 1.0.69", + "uint", +] + [[package]] name = "move-core-types" version = "0.0.4" @@ -5201,12 +5310,12 @@ source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1 dependencies = [ "anyhow", "bcs", - "enum-compat-util", + "enum-compat-util 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "ethnum", "hex", "indexmap 2.12.1", "leb128", - "move-proc-macros", + "move-proc-macros 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "num", "once_cell", "primitive-types 0.10.1", @@ -5231,15 +5340,15 @@ dependencies = [ "colored", "indexmap 2.12.1", "lcov", - "move-abstract-interpreter", - "move-binary-format", + "move-abstract-interpreter 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-bytecode-source-map", - "move-bytecode-verifier", - "move-command-line-common", + "move-bytecode-verifier 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-command-line-common 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-compiler", - "move-core-types", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-ir-types", - "move-trace-format", + "move-trace-format 0.0.1 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "petgraph 0.8.3", "serde", ] @@ -5254,12 +5363,12 @@ dependencies = [ "clap", "hex", "inline_colorization", - "move-abstract-interpreter", - "move-binary-format", + "move-abstract-interpreter 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-bytecode-source-map", - "move-command-line-common", + "move-command-line-common 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-compiler", - "move-core-types", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-coverage", "move-ir-types", "move-symbol-pool", @@ -5276,9 +5385,9 @@ dependencies = [ "codespan-reporting", "itertools 0.10.5", "log", - "move-binary-format", + "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-compiler", - "move-core-types", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-ir-types", "move-model-2", "move-symbol-pool", @@ -5296,10 +5405,10 @@ dependencies = [ "anyhow", "codespan-reporting", "log", - "move-binary-format", + "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-bytecode-source-map", - "move-command-line-common", - "move-core-types", + "move-command-line-common 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-ir-to-bytecode-syntax", "move-ir-types", "move-symbol-pool", @@ -5313,8 +5422,8 @@ source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1 dependencies = [ "anyhow", "hex", - "move-command-line-common", - "move-core-types", + "move-command-line-common 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-ir-types", "move-symbol-pool", ] @@ -5325,8 +5434,8 @@ version = "0.1.0" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" dependencies = [ "hex", - "move-command-line-common", - "move-core-types", + "move-command-line-common 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-symbol-pool", "once_cell", "serde", @@ -5342,11 +5451,11 @@ dependencies = [ "codespan-reporting", "itertools 0.10.5", "log", - "move-binary-format", + "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-bytecode-source-map", - "move-command-line-common", + "move-command-line-common 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-compiler", - "move-core-types", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-disassembler", "move-ir-types", "move-symbol-pool", @@ -5366,11 +5475,11 @@ dependencies = [ "codespan", "codespan-reporting", "indexmap 2.12.1", - "move-binary-format", + "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-bytecode-source-map", - "move-command-line-common", + "move-command-line-common 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-compiler", - "move-core-types", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-disassembler", "move-ir-types", "move-symbol-pool", @@ -5390,12 +5499,12 @@ dependencies = [ "colored", "dunce", "itertools 0.10.5", - "move-binary-format", + "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-bytecode-source-map", "move-bytecode-utils", - "move-command-line-common", + "move-command-line-common 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-compiler", - "move-core-types", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-disassembler", "move-docgen", "move-model-2", @@ -5416,24 +5525,48 @@ dependencies = [ "whoami", ] +[[package]] +name = "move-proc-macros" +version = "0.1.0" +source = "git+https://github.com/MystenLabs/sui?branch=main#7cee6921a0b6eeef7c4f59b233077cea7cad3918" +dependencies = [ + "enum-compat-util 0.1.0 (git+https://github.com/MystenLabs/sui?branch=main)", + "quote", + "syn 2.0.111", +] + [[package]] name = "move-proc-macros" version = "0.1.0" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" dependencies = [ - "enum-compat-util", + "enum-compat-util 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "quote", "syn 2.0.111", ] +[[package]] +name = "move-regex-borrow-graph" +version = "0.0.1" +source = "git+https://github.com/MystenLabs/sui?branch=main#7cee6921a0b6eeef7c4f59b233077cea7cad3918" +dependencies = [ + "insta", + "itertools 0.10.5", + "move-binary-format 0.0.3 (git+https://github.com/MystenLabs/sui?branch=main)", + "move-command-line-common 0.1.0 (git+https://github.com/MystenLabs/sui?branch=main)", + "move-core-types 0.0.4 (git+https://github.com/MystenLabs/sui?branch=main)", + "petgraph 0.8.3", + "proptest", +] + [[package]] name = "move-regex-borrow-graph" version = "0.0.1" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" dependencies = [ "itertools 0.10.5", - "move-binary-format", - "move-core-types", + "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "petgraph 0.8.3", ] @@ -5448,10 +5581,10 @@ dependencies = [ "im", "itertools 0.10.5", "log", - "move-binary-format", - "move-command-line-common", + "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-command-line-common 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-compiler", - "move-core-types", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-model", "num", "petgraph 0.8.3", @@ -5464,10 +5597,10 @@ version = "0.1.1" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" dependencies = [ "hex", - "move-binary-format", - "move-core-types", - "move-vm-runtime", - "move-vm-types", + "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-vm-runtime 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-vm-types 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "sha2 0.9.9", "sha3 0.9.1", "smallvec", @@ -5479,8 +5612,8 @@ version = "0.1.1" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" dependencies = [ "hex", - "move-binary-format", - "move-core-types", + "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-vm-runtime-v0", "move-vm-types-v0", "sha2 0.9.9", @@ -5494,8 +5627,8 @@ version = "0.1.1" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" dependencies = [ "hex", - "move-binary-format", - "move-core-types", + "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-vm-runtime-v1", "move-vm-types-v1", "sha2 0.9.9", @@ -5509,8 +5642,8 @@ version = "0.1.1" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" dependencies = [ "hex", - "move-binary-format", - "move-core-types", + "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-vm-runtime-v2", "move-vm-types-v2", "sha2 0.9.9", @@ -5528,40 +5661,90 @@ dependencies = [ "serde", ] +[[package]] +name = "move-trace-format" +version = "0.0.1" +source = "git+https://github.com/MystenLabs/sui?branch=main#7cee6921a0b6eeef7c4f59b233077cea7cad3918" +dependencies = [ + "move-binary-format 0.0.3 (git+https://github.com/MystenLabs/sui?branch=main)", + "move-core-types 0.0.4 (git+https://github.com/MystenLabs/sui?branch=main)", + "serde", + "serde_json", + "zstd", +] + [[package]] name = "move-trace-format" version = "0.0.1" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" dependencies = [ - "move-binary-format", - "move-core-types", + "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-vm-stack", "serde", "serde_json", "zstd", ] +[[package]] +name = "move-vm-config" +version = "0.1.0" +source = "git+https://github.com/MystenLabs/sui?branch=main#7cee6921a0b6eeef7c4f59b233077cea7cad3918" +dependencies = [ + "move-binary-format 0.0.3 (git+https://github.com/MystenLabs/sui?branch=main)", +] + [[package]] name = "move-vm-config" version = "0.1.0" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" dependencies = [ - "move-binary-format", + "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "once_cell", ] +[[package]] +name = "move-vm-profiler" +version = "0.1.0" +source = "git+https://github.com/MystenLabs/sui?branch=main#7cee6921a0b6eeef7c4f59b233077cea7cad3918" +dependencies = [ + "move-trace-format 0.0.1 (git+https://github.com/MystenLabs/sui?branch=main)", + "move-vm-config 0.1.0 (git+https://github.com/MystenLabs/sui?branch=main)", + "serde", + "serde_json", + "tracing", +] + [[package]] name = "move-vm-profiler" version = "0.1.0" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" dependencies = [ - "move-vm-config", + "move-vm-config 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "once_cell", "serde", "serde_json", "tracing", ] +[[package]] +name = "move-vm-runtime" +version = "0.1.0" +source = "git+https://github.com/MystenLabs/sui?branch=main#7cee6921a0b6eeef7c4f59b233077cea7cad3918" +dependencies = [ + "better_any", + "fail", + "move-binary-format 0.0.3 (git+https://github.com/MystenLabs/sui?branch=main)", + "move-bytecode-verifier 0.1.0 (git+https://github.com/MystenLabs/sui?branch=main)", + "move-core-types 0.0.4 (git+https://github.com/MystenLabs/sui?branch=main)", + "move-trace-format 0.0.1 (git+https://github.com/MystenLabs/sui?branch=main)", + "move-vm-config 0.1.0 (git+https://github.com/MystenLabs/sui?branch=main)", + "move-vm-types 0.1.0 (git+https://github.com/MystenLabs/sui?branch=main)", + "parking_lot 0.11.2", + "smallvec", + "tracing", +] + [[package]] name = "move-vm-runtime" version = "0.1.0" @@ -5569,13 +5752,13 @@ source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1 dependencies = [ "better_any", "fail", - "move-binary-format", - "move-bytecode-verifier", - "move-core-types", - "move-trace-format", - "move-vm-config", + "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-bytecode-verifier 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-trace-format 0.0.1 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-vm-config 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-vm-stack", - "move-vm-types", + "move-vm-types 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "once_cell", "parking_lot 0.11.2", "smallvec", @@ -5589,10 +5772,10 @@ source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1 dependencies = [ "better_any", "fail", - "move-binary-format", + "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-bytecode-verifier-v0", - "move-core-types", - "move-vm-config", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-vm-config 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-vm-types-v0", "once_cell", "parking_lot 0.11.2", @@ -5607,10 +5790,10 @@ source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1 dependencies = [ "better_any", "fail", - "move-binary-format", + "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-bytecode-verifier-v1", - "move-core-types", - "move-vm-config", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-vm-config 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-vm-types-v1", "once_cell", "parking_lot 0.11.2", @@ -5625,10 +5808,10 @@ source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1 dependencies = [ "better_any", "fail", - "move-binary-format", + "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-bytecode-verifier-v2", - "move-core-types", - "move-vm-config", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-vm-config 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-vm-types-v2", "once_cell", "parking_lot 0.11.2", @@ -5641,8 +5824,8 @@ name = "move-vm-stack" version = "0.1.0" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" dependencies = [ - "move-bytecode-verifier", - "move-vm-types", + "move-bytecode-verifier 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-vm-types 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", ] [[package]] @@ -5651,23 +5834,36 @@ version = "0.1.0" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" dependencies = [ "anyhow", - "move-binary-format", - "move-core-types", - "move-vm-profiler", - "move-vm-types", + "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-vm-profiler 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-vm-types 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "once_cell", "serde", ] +[[package]] +name = "move-vm-types" +version = "0.1.0" +source = "git+https://github.com/MystenLabs/sui?branch=main#7cee6921a0b6eeef7c4f59b233077cea7cad3918" +dependencies = [ + "bcs", + "move-binary-format 0.0.3 (git+https://github.com/MystenLabs/sui?branch=main)", + "move-core-types 0.0.4 (git+https://github.com/MystenLabs/sui?branch=main)", + "move-vm-profiler 0.1.0 (git+https://github.com/MystenLabs/sui?branch=main)", + "serde", + "smallvec", +] + [[package]] name = "move-vm-types" version = "0.1.0" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" dependencies = [ "bcs", - "move-binary-format", - "move-core-types", - "move-vm-profiler", + "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-vm-profiler 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "serde", "smallvec", ] @@ -5678,8 +5874,8 @@ version = "0.1.0" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" dependencies = [ "bcs", - "move-binary-format", - "move-core-types", + "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "serde", "smallvec", ] @@ -5690,8 +5886,8 @@ version = "0.1.0" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" dependencies = [ "bcs", - "move-binary-format", - "move-core-types", + "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "serde", "smallvec", ] @@ -5702,8 +5898,8 @@ version = "0.1.0" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" dependencies = [ "bcs", - "move-binary-format", - "move-core-types", + "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "serde", "smallvec", ] @@ -5761,13 +5957,13 @@ dependencies = [ "libafl", "libafl_bolts", "log", - "move-binary-format", - "move-core-types", + "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-model", "move-stackless-bytecode", - "move-trace-format", + "move-trace-format 0.0.1 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-vm-stack", - "move-vm-types", + "move-vm-types 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "movy-analysis", "movy-replay", "movy-static-analysis", @@ -5806,12 +6002,12 @@ dependencies = [ "libafl_bolts", "log", "mdbx-derive", - "move-binary-format", - "move-core-types", - "move-trace-format", - "move-vm-runtime", + "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-trace-format 0.0.1 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-vm-runtime 0.1.0 (git+https://github.com/MystenLabs/sui?branch=main)", "move-vm-stack", - "move-vm-types", + "move-vm-types 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "movy-analysis", "movy-sui", "movy-types", @@ -5839,8 +6035,8 @@ dependencies = [ "color-eyre", "itertools 0.14.0", "log", - "move-binary-format", - "move-core-types", + "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-model", "move-stackless-bytecode", "movy-replay", @@ -5864,11 +6060,11 @@ dependencies = [ "itertools 0.14.0", "log", "mdbx-derive", - "move-binary-format", + "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-compiler", "move-package", - "move-trace-format", - "move-vm-runtime", + "move-trace-format 0.0.1 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-vm-runtime 0.1.0 (git+https://github.com/MystenLabs/sui?branch=main)", "movy-types", "prometheus", "rand 0.9.2", @@ -5906,8 +6102,8 @@ dependencies = [ "libafl", "log", "mdbx-derive", - "move-binary-format", - "move-core-types", + "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "object_store", "reqwest", "serde", @@ -9135,17 +9331,17 @@ dependencies = [ "bcs", "indexmap 2.12.1", "leb128", - "move-binary-format", + "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-bytecode-utils", - "move-bytecode-verifier", - "move-bytecode-verifier-meter", - "move-core-types", - "move-regex-borrow-graph", - "move-trace-format", - "move-vm-config", - "move-vm-profiler", - "move-vm-runtime", - "move-vm-types", + "move-bytecode-verifier 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-bytecode-verifier-meter 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-regex-borrow-graph 0.0.1 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-trace-format 0.0.1 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-vm-config 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-vm-profiler 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-vm-runtime 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-vm-types 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "mysten-common", "mysten-metrics", "parking_lot 0.12.5", @@ -9167,13 +9363,13 @@ dependencies = [ "anyhow", "bcs", "leb128", - "move-binary-format", + "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-bytecode-utils", - "move-bytecode-verifier-meter", + "move-bytecode-verifier-meter 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-bytecode-verifier-v0", - "move-core-types", - "move-vm-config", - "move-vm-profiler", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-vm-config 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-vm-profiler 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-vm-runtime-v0", "move-vm-types-v0", "once_cell", @@ -9195,13 +9391,13 @@ dependencies = [ "anyhow", "bcs", "leb128", - "move-binary-format", + "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-bytecode-utils", - "move-bytecode-verifier-meter", + "move-bytecode-verifier-meter 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-bytecode-verifier-v1", - "move-core-types", - "move-vm-config", - "move-vm-profiler", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-vm-config 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-vm-profiler 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-vm-runtime-v1", "move-vm-types-v1", "parking_lot 0.12.5", @@ -9222,13 +9418,13 @@ dependencies = [ "anyhow", "bcs", "leb128", - "move-binary-format", + "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-bytecode-utils", - "move-bytecode-verifier-meter", + "move-bytecode-verifier-meter 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-bytecode-verifier-v2", - "move-core-types", - "move-vm-config", - "move-vm-profiler", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-vm-config 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-vm-profiler 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-vm-runtime-v2", "move-vm-types-v2", "parking_lot 0.12.5", @@ -9254,7 +9450,7 @@ dependencies = [ "csv", "dirs", "fastcrypto", - "move-vm-config", + "move-vm-config 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "mysten-common", "nonzero_ext", "object_store", @@ -9287,21 +9483,21 @@ name = "sui-execution" version = "0.1.0" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" dependencies = [ - "move-abstract-interpreter", + "move-abstract-interpreter 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-abstract-interpreter-v2", - "move-binary-format", - "move-bytecode-verifier", - "move-bytecode-verifier-meter", + "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-bytecode-verifier 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-bytecode-verifier-meter 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-bytecode-verifier-v0", "move-bytecode-verifier-v1", "move-bytecode-verifier-v2", - "move-trace-format", - "move-vm-config", - "move-vm-runtime", + "move-trace-format 0.0.1 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-vm-config 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-vm-runtime 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-vm-runtime-v0", "move-vm-runtime-v1", "move-vm-runtime-v2", - "move-vm-types", + "move-vm-types 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-vm-types-v0", "move-vm-types-v1", "move-vm-types-v2", @@ -9327,8 +9523,8 @@ version = "0.1.0" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" dependencies = [ "bcs", - "move-binary-format", - "move-core-types", + "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "once_cell", "serde", "sui-types", @@ -9378,9 +9574,9 @@ dependencies = [ "anyhow", "bcs", "fastcrypto", - "move-binary-format", + "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-bytecode-utils", - "move-core-types", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "schemars 0.8.22", "serde", "serde_json", @@ -9419,10 +9615,10 @@ dependencies = [ "fastcrypto", "itertools 0.13.0", "json_to_table", - "move-binary-format", + "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-bytecode-utils", - "move-command-line-common", - "move-core-types", + "move-command-line-common 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-disassembler", "move-ir-types", "mysten-metrics", @@ -9484,12 +9680,12 @@ source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1 dependencies = [ "anyhow", "fastcrypto", - "move-binary-format", + "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-bytecode-utils", - "move-bytecode-verifier", - "move-command-line-common", + "move-bytecode-verifier 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-command-line-common 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-compiler", - "move-core-types", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-ir-types", "move-package", "move-symbol-pool", @@ -9513,11 +9709,11 @@ dependencies = [ "fastcrypto-vdf", "fastcrypto-zkp", "indexmap 2.12.1", - "move-binary-format", - "move-core-types", + "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-stdlib-natives", - "move-vm-runtime", - "move-vm-types", + "move-vm-runtime 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-vm-types 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "rand 0.8.5", "smallvec", "sui-protocol-config", @@ -9535,8 +9731,8 @@ dependencies = [ "fastcrypto", "fastcrypto-zkp", "linked-hash-map", - "move-binary-format", - "move-core-types", + "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-stdlib-natives-v0", "move-vm-runtime-v0", "move-vm-types-v0", @@ -9556,8 +9752,8 @@ dependencies = [ "fastcrypto", "fastcrypto-zkp", "linked-hash-map", - "move-binary-format", - "move-core-types", + "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-stdlib-natives-v1", "move-vm-runtime-v1", "move-vm-types-v1", @@ -9577,8 +9773,8 @@ dependencies = [ "fastcrypto", "fastcrypto-zkp", "indexmap 2.12.1", - "move-binary-format", - "move-core-types", + "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-stdlib-natives-v2", "move-vm-runtime-v2", "move-vm-types-v2", @@ -9619,7 +9815,7 @@ version = "1.60.1" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" dependencies = [ "anyhow", - "move-core-types", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-package", "move-symbol-pool", "sui-framework-snapshot", @@ -9640,9 +9836,9 @@ dependencies = [ "bcs", "eyre", "lru 0.10.1", - "move-binary-format", - "move-command-line-common", - "move-core-types", + "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-command-line-common 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "serde", "sui-types", "thiserror 1.0.69", @@ -9668,9 +9864,9 @@ source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1 dependencies = [ "clap", "fastcrypto", - "move-binary-format", - "move-core-types", - "move-vm-config", + "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-vm-config 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "schemars 0.8.22", "serde", "serde-env", @@ -9725,7 +9921,7 @@ dependencies = [ "futures", "futures-core", "jsonrpsee", - "move-core-types", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "reqwest", "serde", "serde_json", @@ -9773,8 +9969,8 @@ dependencies = [ "async-trait", "bcs", "futures", - "move-binary-format", - "move-core-types", + "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "sui-json", "sui-json-rpc-types", "sui-protocol-config", @@ -9809,11 +10005,11 @@ dependencies = [ "indexmap 2.12.1", "itertools 0.13.0", "lru 0.10.1", - "move-binary-format", + "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-bytecode-utils", - "move-core-types", - "move-trace-format", - "move-vm-profiler", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-trace-format 0.0.1 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-vm-profiler 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-vm-test-utils", "mysten-common", "mysten-metrics", @@ -9862,13 +10058,13 @@ name = "sui-verifier-latest" version = "0.1.0" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" dependencies = [ - "move-abstract-stack", - "move-binary-format", + "move-abstract-stack 0.0.1 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-bytecode-utils", - "move-bytecode-verifier", - "move-bytecode-verifier-meter", - "move-core-types", - "move-vm-config", + "move-bytecode-verifier 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-bytecode-verifier-meter 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-vm-config 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "sui-protocol-config", "sui-types", ] @@ -9878,13 +10074,13 @@ name = "sui-verifier-v0" version = "0.1.0" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" dependencies = [ - "move-abstract-stack", - "move-binary-format", + "move-abstract-stack 0.0.1 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-bytecode-utils", - "move-bytecode-verifier-meter", + "move-bytecode-verifier-meter 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-bytecode-verifier-v0", - "move-core-types", - "move-vm-config", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-vm-config 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "sui-protocol-config", "sui-types", ] @@ -9894,13 +10090,13 @@ name = "sui-verifier-v1" version = "0.1.0" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" dependencies = [ - "move-abstract-stack", - "move-binary-format", + "move-abstract-stack 0.0.1 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-bytecode-utils", - "move-bytecode-verifier-meter", + "move-bytecode-verifier-meter 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-bytecode-verifier-v1", - "move-core-types", - "move-vm-config", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-vm-config 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "sui-types", ] @@ -9909,13 +10105,13 @@ name = "sui-verifier-v2" version = "0.1.0" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" dependencies = [ - "move-abstract-stack", - "move-binary-format", + "move-abstract-stack 0.0.1 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-bytecode-utils", - "move-bytecode-verifier-meter", + "move-bytecode-verifier-meter 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "move-bytecode-verifier-v2", - "move-core-types", - "move-vm-config", + "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-vm-config 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", "sui-protocol-config", "sui-types", ] diff --git a/Cargo.toml b/Cargo.toml index 5b39c9b..f32cd78 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -46,7 +46,7 @@ rand_core_sui = {version = "0.6.4", package = "rand_core"} rand_core_libafl = {version = "0.9", package = "rand_core"} const-hex = "1.14.1" serde_json_any_key = "2.0.0" -pprof = { version = "0.15"} +pprof = { version = "0.15", features = ["frame-pointer"]} z3 = "0.16" z3-sys = "0.9.10" tempfile = "3" @@ -70,7 +70,7 @@ move-ir-types = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz" move-core-types = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} move-vm-types = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} move-vm-stack = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} -move-vm-runtime = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz", features = ["tracing", "testing"]} +move-vm-runtime = {git = "https://github.com/MystenLabs/sui", branch = "main", features = ["tracing", "testing"]} move-model = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} move-stackless-bytecode = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} sui-move-build = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} diff --git a/crates/movy-fuzz/src/oracles/sui/bool_judgement.rs b/crates/movy-fuzz/src/oracles/sui/bool_judgement.rs index 88f37d3..ecd2e39 100644 --- a/crates/movy-fuzz/src/oracles/sui/bool_judgement.rs +++ b/crates/movy-fuzz/src/oracles/sui/bool_judgement.rs @@ -1,6 +1,5 @@ use move_binary_format::file_format::Bytecode; -use move_trace_format::format::TraceEvent; -use move_vm_stack::Stack; +use move_trace_format::{format::TraceEvent, memory_tracer::TraceState}; use serde_json::json; use sui_types::effects::TransactionEffects; use z3::{ @@ -36,7 +35,7 @@ impl SuiGeneralOracle for BoolJudgementOracle { fn event( &mut self, event: &TraceEvent, - _stack: Option<&Stack>, + _trace_state: &TraceState, symbol_stack: &ConcolicState, current_function: Option<&movy_types::input::FunctionIdent>, _state: &mut S, diff --git a/crates/movy-fuzz/src/oracles/sui/infinite_loop.rs b/crates/movy-fuzz/src/oracles/sui/infinite_loop.rs index d8f0a33..d813a36 100644 --- a/crates/movy-fuzz/src/oracles/sui/infinite_loop.rs +++ b/crates/movy-fuzz/src/oracles/sui/infinite_loop.rs @@ -1,8 +1,7 @@ use std::collections::BTreeMap; use move_binary_format::file_format::Bytecode; -use move_trace_format::format::TraceEvent; -use move_vm_stack::Stack; +use move_trace_format::{format::TraceEvent, memory_tracer::TraceState}; use serde_json::json; use movy_replay::tracer::{ @@ -38,7 +37,7 @@ impl SuiGeneralOracle for InfiniteLoopOracle { fn event( &mut self, event: &TraceEvent, - _stack: Option<&Stack>, + _trace_state: &TraceState, symbol_stack: &ConcolicState, current_function: Option<&movy_types::input::FunctionIdent>, _state: &mut S, diff --git a/crates/movy-fuzz/src/oracles/sui/overflow.rs b/crates/movy-fuzz/src/oracles/sui/overflow.rs index f692e50..7a283d9 100644 --- a/crates/movy-fuzz/src/oracles/sui/overflow.rs +++ b/crates/movy-fuzz/src/oracles/sui/overflow.rs @@ -1,7 +1,6 @@ use move_binary_format::file_format::Bytecode; use move_core_types::u256::U256; -use move_trace_format::format::TraceEvent; -use move_vm_stack::Stack; +use move_trace_format::{format::{TraceEvent, TraceValue}, memory_tracer::TraceState}; use serde_json::json; use movy_replay::tracer::{ @@ -19,7 +18,7 @@ use sui_types::effects::TransactionEffects; pub struct OverflowOracle; /// Count the number of significant bits in the concrete value (0 => 0 bits). -fn value_sig_bits(v: &move_vm_types::values::Value) -> u32 { +fn value_sig_bits(v: &TraceValue) -> u32 { let as_u256 = value_to_u256(v); if as_u256 == U256::zero() { 0 @@ -41,7 +40,7 @@ impl SuiGeneralOracle for OverflowOracle { fn event( &mut self, event: &TraceEvent, - stack: Option<&Stack>, + trace_state: &TraceState, _symbol_stack: &ConcolicState, current_function: Option<&movy_types::input::FunctionIdent>, _state: &mut S, @@ -53,15 +52,12 @@ impl SuiGeneralOracle for OverflowOracle { if !matches!(instruction, Bytecode::Shl) { return Ok(vec![]); } - let stack = match stack { - Some(s) => s, - None => return Ok(vec![]), - }; - let Ok(vals_iter) = stack.last_n(2) else { + let stack = &trace_state.operand_stack; + if stack.len() < 2 { return Ok(vec![]); - }; - let vals: Vec<_> = vals_iter.collect(); - let (lhs, rhs) = (vals[0], vals[1]); + } + let lhs = &stack[stack.len() - 2]; + let rhs = &stack[stack.len() - 1]; let lhs_width_bits = value_bitwidth(lhs); // type width (u8/u16/...) let lhs_sig_bits = value_sig_bits(lhs); // actual significant bits of the value let rhs_bits = value_to_u256(rhs); diff --git a/crates/movy-fuzz/src/oracles/sui/precision_loss.rs b/crates/movy-fuzz/src/oracles/sui/precision_loss.rs index 9f50ccc..babdcfb 100644 --- a/crates/movy-fuzz/src/oracles/sui/precision_loss.rs +++ b/crates/movy-fuzz/src/oracles/sui/precision_loss.rs @@ -1,5 +1,4 @@ -use move_trace_format::format::TraceEvent; -use move_vm_stack::Stack; +use move_trace_format::{format::TraceEvent, memory_tracer::TraceState}; use serde_json::json; use movy_replay::tracer::{ @@ -26,7 +25,7 @@ impl SuiGeneralOracle for PrecisionLossOracle { fn event( &mut self, event: &TraceEvent, - _stack: Option<&Stack>, + _trace_state: &TraceState, symbol_stack: &ConcolicState, current_function: Option<&movy_types::input::FunctionIdent>, _state: &mut S, diff --git a/crates/movy-fuzz/src/oracles/sui/proceeds.rs b/crates/movy-fuzz/src/oracles/sui/proceeds.rs index 9ee6c5d..6f45ba4 100644 --- a/crates/movy-fuzz/src/oracles/sui/proceeds.rs +++ b/crates/movy-fuzz/src/oracles/sui/proceeds.rs @@ -4,8 +4,7 @@ use std::{ }; use log::debug; -use move_trace_format::format::TraceEvent; -use move_vm_stack::Stack; +use move_trace_format::{format::TraceEvent, memory_tracer::TraceState}; use movy_replay::tracer::{concolic::ConcolicState, oracle::SuiGeneralOracle}; use movy_types::{ @@ -216,7 +215,7 @@ where fn event( &mut self, _event: &TraceEvent, - _stack: Option<&Stack>, + _trace_state: &TraceState, _symbol_stack: &ConcolicState, _current_function: Option<&movy_types::input::FunctionIdent>, _state: &mut S, diff --git a/crates/movy-fuzz/src/oracles/sui/type_conversion.rs b/crates/movy-fuzz/src/oracles/sui/type_conversion.rs index ba0247c..2075973 100644 --- a/crates/movy-fuzz/src/oracles/sui/type_conversion.rs +++ b/crates/movy-fuzz/src/oracles/sui/type_conversion.rs @@ -1,6 +1,5 @@ use move_binary_format::file_format::Bytecode; -use move_trace_format::format::TraceEvent; -use move_vm_stack::Stack; +use move_trace_format::{format::TraceEvent, memory_tracer::TraceState}; use movy_types::input::MoveSequence; use movy_types::oracle::OracleFinding; use serde_json::json; @@ -26,7 +25,7 @@ impl SuiGeneralOracle for TypeConversionOracle { fn event( &mut self, event: &TraceEvent, - stack: Option<&Stack>, + trace_state: &TraceState, _symbol_stack: &ConcolicState, current_function: Option<&movy_types::input::FunctionIdent>, _state: &mut S, @@ -35,15 +34,11 @@ impl SuiGeneralOracle for TypeConversionOracle { TraceEvent::BeforeInstruction { pc, instruction, .. } => { - let stack = match stack { - Some(s) => s, - None => return Ok(vec![]), - }; - let Ok(vals_iter) = stack.last_n(1) else { + let stack = &trace_state.operand_stack; + if stack.len() < 1 { return Ok(vec![]); - }; - let vals: Vec<_> = vals_iter.collect(); - let val = vals.first().unwrap(); + } + let val = &stack[stack.len() - 1]; let unnecessary = match instruction { Bytecode::CastU8 => value_bitwidth(val) == 8, Bytecode::CastU16 => value_bitwidth(val) == 16, diff --git a/crates/movy-fuzz/src/oracles/sui/typed_bug.rs b/crates/movy-fuzz/src/oracles/sui/typed_bug.rs index cc06eee..65be3c3 100644 --- a/crates/movy-fuzz/src/oracles/sui/typed_bug.rs +++ b/crates/movy-fuzz/src/oracles/sui/typed_bug.rs @@ -1,6 +1,5 @@ use log::{debug, trace}; -use move_trace_format::format::TraceEvent; -use move_vm_stack::Stack; +use move_trace_format::{format::TraceEvent, memory_tracer::TraceState}; use movy_replay::tracer::{concolic::ConcolicState, oracle::SuiGeneralOracle}; use movy_types::{error::MovyError, input::MoveSequence, oracle::OracleFinding}; @@ -52,7 +51,7 @@ where fn event( &mut self, _event: &TraceEvent, - _stack: Option<&Stack>, + _trace_state: &TraceState, _symbol_stack: &ConcolicState, _current_function: Option<&movy_types::input::FunctionIdent>, _state: &mut S, diff --git a/crates/movy-replay/src/tracer/concolic.rs b/crates/movy-replay/src/tracer/concolic.rs index ba92064..f9629f7 100644 --- a/crates/movy-replay/src/tracer/concolic.rs +++ b/crates/movy-replay/src/tracer/concolic.rs @@ -1,11 +1,13 @@ use std::{cmp::Ordering, collections::BTreeMap, str::FromStr}; -use log::{debug, trace, warn}; +use log::{trace, warn}; use move_binary_format::file_format::Bytecode; use move_core_types::{language_storage::TypeTag, u256::U256}; -use move_trace_format::format::{Effect, ExtraInstructionInformation, TraceEvent, TypeTagWithRefs}; -use move_vm_stack::Stack; -use move_vm_types::values::{Reference, VMValueCast, Value}; +use move_trace_format::{ + format::{Effect, ExtraInstructionInformation, TraceEvent, TraceValue, TypeTagWithRefs}, + memory_tracer::TraceState, + value::SerializableMoveValue, +}; use z3::ast::{Ast, Bool, Int}; #[derive(Clone, Debug, PartialEq, Eq)] @@ -19,13 +21,6 @@ enum PrimitiveValue { U256(U256), } -fn try_value_as(v: &Value) -> Option -where - Value: VMValueCast, -{ - v.copy_value().ok()?.value_as::().ok() -} - #[derive(Clone, Debug, PartialEq, Eq)] pub enum SymbolValue { Value(Int), @@ -72,37 +67,17 @@ impl PrimitiveValue { } } -fn extract_primitive_value(v: &Value) -> PrimitiveValue { - if let Some(reference) = try_value_as::(v) { - let inner = reference - .read_ref() - .expect("failed to read reference for comparison"); - return extract_primitive_value(&inner); - } - - if let Some(b) = try_value_as::(v) { - return PrimitiveValue::Bool(b); - } - if let Some(u) = try_value_as::(v) { - return PrimitiveValue::U8(u); - } - if let Some(u) = try_value_as::(v) { - return PrimitiveValue::U16(u); +fn extract_primitive_value(v: &TraceValue) -> PrimitiveValue { + match v.snapshot() { + SerializableMoveValue::Bool(b) => PrimitiveValue::Bool(*b), + SerializableMoveValue::U8(u) => PrimitiveValue::U8(*u), + SerializableMoveValue::U16(u) => PrimitiveValue::U16(*u), + SerializableMoveValue::U32(u) => PrimitiveValue::U32(*u), + SerializableMoveValue::U64(u) => PrimitiveValue::U64(*u), + SerializableMoveValue::U128(u) => PrimitiveValue::U128(*u), + SerializableMoveValue::U256(u) => PrimitiveValue::U256(*u), + v => panic!("Unsupported value type {:?} for comparison", v), } - if let Some(u) = try_value_as::(v) { - return PrimitiveValue::U32(u); - } - if let Some(u) = try_value_as::(v) { - return PrimitiveValue::U64(u); - } - if let Some(u) = try_value_as::(v) { - return PrimitiveValue::U128(u); - } - if let Some(u) = try_value_as::(v) { - return PrimitiveValue::U256(u); - } - - panic!("Unsupported value type {:?} for comparison", v); } fn compare_value_impl(v1: &PrimitiveValue, v2: &PrimitiveValue) -> Ordering { @@ -121,20 +96,29 @@ fn compare_value_impl(v1: &PrimitiveValue, v2: &PrimitiveValue) -> Ordering { } } -pub fn compare_value(v1: &Value, v2: &Value) -> Ordering { +pub fn compare_value(v1: &TraceValue, v2: &TraceValue) -> Ordering { let p1 = extract_primitive_value(v1); let p2 = extract_primitive_value(v2); compare_value_impl(&p1, &p2) } -pub fn value_to_u256(v: &Value) -> U256 { +pub fn value_to_u256(v: &TraceValue) -> U256 { extract_primitive_value(v).as_u256() } -pub fn value_bitwidth(v: &Value) -> u32 { +pub fn value_bitwidth(v: &TraceValue) -> u32 { extract_primitive_value(v).bitwidth() } +fn stack_top2(stack: &[TraceValue]) -> (&TraceValue, &TraceValue) { + let len = stack.len(); + (&stack[len - 2], &stack[len - 1]) +} + +fn stack_top1(stack: &[TraceValue]) -> &TraceValue { + &stack[stack.len() - 1] +} + fn int_two_pow(bits: u32) -> Int { let v = U256::one() << bits; Int::from_str(&v.to_string()).unwrap() @@ -287,7 +271,7 @@ impl ConcolicState { } } - fn resolve_value(value: &Value) -> Int { + fn resolve_value(value: &TraceValue) -> Int { match extract_primitive_value(value) { PrimitiveValue::Bool(b) => { let int_val = if b { 1 } else { 0 }; @@ -302,36 +286,33 @@ impl ConcolicState { } } - pub fn notify_event(&mut self, event: &TraceEvent, stack: Option<&Stack>) -> Option { + pub fn notify_event(&mut self, event: &TraceEvent, trace_state: &TraceState) -> Option { if self.disable { return None; } - if let Some(s) = stack { - if self.stack.len() != s.value.len() && s.value.is_empty() { - self.stack.clear(); - } - if let TraceEvent::Effect(v) = event - && let Effect::ExecutionError(_) = v.as_ref() - { - self.stack.pop(); - } - if self.stack.len() != s.value.len() { - warn!( - "stack: {:?}, stack from trace: {:?}, event: {:?}, disabling concolic execution", - self.stack, s.value, event - ); - self.disable = true; - return None; - } - } else { - trace!("No stack available for event: {:?}", event); + let stack = &trace_state.operand_stack; + if self.stack.len() != stack.len() && stack.is_empty() { + self.stack.clear(); + } + if let TraceEvent::Effect(v) = event + && let Effect::ExecutionError(_) = v.as_ref() + { + self.stack.pop(); + } + if self.stack.len() != stack.len() { + warn!( + "stack: {:?}, stack from trace: {:?}, event: {:?}, disabling concolic execution", + self.stack, stack, event + ); + self.disable = true; + return None; } let mut process_binary_op = || { let (rhs, lhs) = (self.stack.pop().unwrap(), self.stack.pop().unwrap()); - let mut stack_iter = stack.unwrap().last_n(2).unwrap(); - let true_lhs = stack_iter.next().unwrap(); - let true_rhs = stack_iter.next().unwrap(); + let stack_len = stack.len(); + let true_lhs = &stack[stack_len - 2]; + let true_rhs = &stack[stack_len - 1]; let (new_l, new_r) = match (lhs, rhs) { (SymbolValue::Value(l), SymbolValue::Value(r)) => (l, r), (SymbolValue::Value(l), SymbolValue::Unknown) => { @@ -359,7 +340,7 @@ impl ConcolicState { } TraceEvent::OpenFrame { frame, gas_left: _ } => { trace!("Open frame: {:?}", frame); - trace!("Current stack: {:?}", stack.map(|s| &s.value)); + trace!("Current stack: {:?}", &trace_state.operand_stack); let param_count = frame.parameters.len(); if self.locals.is_empty() { let mut locals = if frame.locals_types.is_empty() { @@ -413,7 +394,7 @@ impl ConcolicState { return_: _, gas_left: _, } => { - trace!("Close frame. Current stack: {:?}", stack.map(|s| &s.value)); + trace!("Close frame. Current stack: {:?}", &trace_state.operand_stack); self.locals.pop(); } TraceEvent::BeforeInstruction { @@ -428,7 +409,7 @@ impl ConcolicState { pc, instruction, extra, - stack.map(|s| &s.value) + &trace_state.operand_stack ); match instruction { Bytecode::Pop @@ -546,9 +527,7 @@ impl ConcolicState { } Bytecode::And | Bytecode::BitAnd => { let (rhs, lhs) = (self.stack.pop().unwrap(), self.stack.pop().unwrap()); - let mut stack_iter = stack.unwrap().last_n(2).unwrap(); - let true_lhs = stack_iter.next().unwrap(); - let true_rhs = stack_iter.next().unwrap(); + let (true_lhs, true_rhs) = stack_top2(stack); let bit_width = value_bitwidth(true_lhs); let (true_l, true_r) = (value_to_u256(true_lhs), value_to_u256(true_rhs)); @@ -571,9 +550,7 @@ impl ConcolicState { } Bytecode::Or | Bytecode::BitOr => { let (rhs, lhs) = (self.stack.pop().unwrap(), self.stack.pop().unwrap()); - let mut stack_iter = stack.unwrap().last_n(2).unwrap(); - let true_lhs = stack_iter.next().unwrap(); - let true_rhs = stack_iter.next().unwrap(); + let (true_lhs, true_rhs) = stack_top2(stack); let bit_width = value_bitwidth(true_lhs); let (true_l, true_r) = (value_to_u256(true_lhs), value_to_u256(true_rhs)); @@ -596,9 +573,7 @@ impl ConcolicState { } Bytecode::Xor => { let (rhs, lhs) = (self.stack.pop().unwrap(), self.stack.pop().unwrap()); - let mut stack_iter = stack.unwrap().last_n(2).unwrap(); - let true_lhs = stack_iter.next().unwrap(); - let true_rhs = stack_iter.next().unwrap(); + let (true_lhs, true_rhs) = stack_top2(stack); let bit_width = value_bitwidth(true_lhs); let (true_l, true_r) = (value_to_u256(true_lhs), value_to_u256(true_rhs)); @@ -621,9 +596,7 @@ impl ConcolicState { } Bytecode::Shl => { let (rhs, lhs) = (self.stack.pop().unwrap(), self.stack.pop().unwrap()); - let mut stack_iter = stack.unwrap().last_n(2).unwrap(); - let true_lhs = stack_iter.next().unwrap(); - let true_rhs = stack_iter.next().unwrap(); + let (true_lhs, true_rhs) = stack_top2(stack); let bit_width = value_bitwidth(true_lhs); let true_r = value_to_u256(true_rhs).unchecked_as_u32(); let threshold = Self::max_u_bits(bit_width); @@ -647,9 +620,7 @@ impl ConcolicState { } Bytecode::Shr => { let (rhs, lhs) = (self.stack.pop().unwrap(), self.stack.pop().unwrap()); - let mut stack_iter = stack.unwrap().last_n(2).unwrap(); - let _true_lhs = stack_iter.next().unwrap(); - let true_rhs = stack_iter.next().unwrap(); + let (_true_lhs, true_rhs) = stack_top2(stack); let true_r = value_to_u256(true_rhs).unchecked_as_u32(); match (lhs, rhs) { @@ -672,9 +643,7 @@ impl ConcolicState { if let Some(v) = self.stack.pop() { match v { SymbolValue::Value(n) => { - let bit_width = value_bitwidth( - stack.unwrap().last_n(1).unwrap().next().unwrap(), - ); + let bit_width = value_bitwidth(stack_top1(stack)); let not_n = int_bvnot(&n, bit_width); self.stack.push(SymbolValue::Value(not_n)); } @@ -739,9 +708,7 @@ impl ConcolicState { } Bytecode::Eq => { let (rhs, lhs) = (self.stack.pop().unwrap(), self.stack.pop().unwrap()); - let mut stack_iter = stack.unwrap().last_n(2).unwrap(); - let true_lhs = stack_iter.next().unwrap(); - let true_rhs = stack_iter.next().unwrap(); + let (true_lhs, true_rhs) = stack_top2(stack); let (new_l, new_r) = match (lhs, rhs) { (SymbolValue::Value(l), SymbolValue::Value(r)) => (l, r), (SymbolValue::Value(l), SymbolValue::Unknown) => { @@ -772,9 +739,7 @@ impl ConcolicState { } Bytecode::Neq => { let (rhs, lhs) = (self.stack.pop().unwrap(), self.stack.pop().unwrap()); - let mut stack_iter = stack.unwrap().last_n(2).unwrap(); - let true_lhs = stack_iter.next().unwrap(); - let true_rhs = stack_iter.next().unwrap(); + let (true_lhs, true_rhs) = stack_top2(stack); let (new_l, new_r) = match (lhs, rhs) { (SymbolValue::Value(l), SymbolValue::Value(r)) => (l, r), (SymbolValue::Value(l), SymbolValue::Unknown) => { @@ -805,9 +770,7 @@ impl ConcolicState { } Bytecode::Lt => { let (rhs, lhs) = (self.stack.pop().unwrap(), self.stack.pop().unwrap()); - let mut stack_iter = stack.unwrap().last_n(2).unwrap(); - let true_lhs = stack_iter.next().unwrap(); - let true_rhs = stack_iter.next().unwrap(); + let (true_lhs, true_rhs) = stack_top2(stack); let (new_l, new_r) = match (lhs, rhs) { (SymbolValue::Value(l), SymbolValue::Value(r)) => (l, r), (SymbolValue::Value(l), SymbolValue::Unknown) => { @@ -838,9 +801,7 @@ impl ConcolicState { } Bytecode::Le => { let (rhs, lhs) = (self.stack.pop().unwrap(), self.stack.pop().unwrap()); - let mut stack_iter = stack.unwrap().last_n(2).unwrap(); - let true_lhs = stack_iter.next().unwrap(); - let true_rhs = stack_iter.next().unwrap(); + let (true_lhs, true_rhs) = stack_top2(stack); let (new_l, new_r) = match (lhs, rhs) { (SymbolValue::Value(l), SymbolValue::Value(r)) => (l, r), (SymbolValue::Value(l), SymbolValue::Unknown) => { @@ -871,9 +832,7 @@ impl ConcolicState { } Bytecode::Gt => { let (rhs, lhs) = (self.stack.pop().unwrap(), self.stack.pop().unwrap()); - let mut stack_iter = stack.unwrap().last_n(2).unwrap(); - let true_lhs = stack_iter.next().unwrap(); - let true_rhs = stack_iter.next().unwrap(); + let (true_lhs, true_rhs) = stack_top2(stack); let (new_l, new_r) = match (lhs, rhs) { (SymbolValue::Value(l), SymbolValue::Value(r)) => (l, r), (SymbolValue::Value(l), SymbolValue::Unknown) => { @@ -904,9 +863,7 @@ impl ConcolicState { } Bytecode::Ge => { let (rhs, lhs) = (self.stack.pop().unwrap(), self.stack.pop().unwrap()); - let mut stack_iter = stack.unwrap().last_n(2).unwrap(); - let true_lhs = stack_iter.next().unwrap(); - let true_rhs = stack_iter.next().unwrap(); + let (true_lhs, true_rhs) = stack_top2(stack); let (new_l, new_r) = match (lhs, rhs) { (SymbolValue::Value(l), SymbolValue::Value(r)) => (l, r), (SymbolValue::Value(l), SymbolValue::Unknown) => { diff --git a/crates/movy-replay/src/tracer/fuzz.rs b/crates/movy-replay/src/tracer/fuzz.rs index 6a4b8d1..0436b6f 100644 --- a/crates/movy-replay/src/tracer/fuzz.rs +++ b/crates/movy-replay/src/tracer/fuzz.rs @@ -1,16 +1,15 @@ use std::{borrow::Cow, collections::BTreeMap, marker::PhantomData}; -use color_eyre::eyre::{OptionExt, eyre}; +use color_eyre::eyre::eyre; use libafl::{executors::ExitKind, observers::StdMapObserver}; use libafl_bolts::tuples::{Handle, MatchName, MatchNameRef}; use log::{trace, warn}; use move_binary_format::file_format::Bytecode; use move_trace_format::{ - format::{Effect, TraceEvent}, - interface::Tracer, + format::{Effect, TraceEvent, TraceValue}, + interface::{Tracer, Writer}, + memory_tracer::TraceState, }; -use move_vm_stack::Stack; -use move_vm_types::values::IntegerValue; use movy_types::{error::MovyError, input::FunctionIdent, oracle::OracleFinding}; use crate::tracer::{ @@ -127,6 +126,7 @@ where { current_functions: Vec, coverage: CoverageTracer<'a, OT>, + trace_state: TraceState, state: &'s mut S, outcome: TraceOutcome, oracles: &'s mut O, @@ -147,6 +147,7 @@ where Self { current_functions: vec![], coverage: CoverageTracer::new(ob, ob_name), + trace_state: TraceState::new(), state, outcome: TraceOutcome::new(), oracles, @@ -158,37 +159,19 @@ where self.outcome } - fn bin_ops(stack: Option<&Stack>) -> Result<(Magic, Magic), MovyError> { - if let Some(stack) = stack { - let stack_len = stack.value.len(); - let rhs = stack - .value - .get(stack_len - 1) - .ok_or_else(|| eyre!("stack less than 2?!"))? - .copy_value()? - .value_as::()? - .into(); - let lhs = stack - .value - .get(stack_len - 2) - .ok_or_else(|| eyre!("stack less than 2?!"))? - .copy_value()? - .value_as::()? - .into(); - Ok((lhs, rhs)) - } else { - Err(eyre!("we need two values on top of stack but get none...").into()) + fn bin_ops(stack: &[TraceValue]) -> Result<(Magic, Magic), MovyError> { + if stack.len() < 2 { + return Err(eyre!("stack less than 2?!").into()); } + let lhs = Magic::try_from(&stack[stack.len() - 2])?; + let rhs = Magic::try_from(&stack[stack.len() - 1])?; + Ok((lhs, rhs)) } - pub fn notify_event( - &mut self, - event: &TraceEvent, - stack: Option<&move_vm_stack::Stack>, - ) -> Result<(), MovyError> { + pub fn notify_event(&mut self, event: &TraceEvent) -> Result<(), MovyError> { let oracle_vulns = self.oracles.event( event, - stack, + &self.trace_state, &self.outcome.concolic, self.current_functions.last(), self.state, @@ -199,7 +182,10 @@ where for info in oracle_vulns { self.outcome.findings.push(info); } - let constraint = self.outcome.concolic.notify_event(event, stack); + let constraint = self + .outcome + .concolic + .notify_event(event, &self.trace_state); trace!("Tracing event: {:?}", event); match event { TraceEvent::OpenFrame { frame, gas_left: _ } => { @@ -252,7 +238,7 @@ where | Bytecode::Ge | Bytecode::Gt | Bytecode::Neq - | Bytecode::Eq => match Self::bin_ops(stack) { + | Bytecode::Eq => match Self::bin_ops(&self.trace_state.operand_stack) { Ok((lhs, rhs)) => { if let Some(current_function) = self.current_functions.first() { let op = CmpOp::try_from(instruction)?; @@ -278,7 +264,7 @@ where } } }, - Bytecode::Shl => match Self::bin_ops(stack) { + Bytecode::Shl => match Self::bin_ops(&self.trace_state.operand_stack) { Ok((lhs, rhs)) => { if let Some(current_function) = self.current_functions.first() { self.outcome @@ -307,8 +293,8 @@ where | Bytecode::CastU32 | Bytecode::CastU64 | Bytecode::CastU128 => { - if let Some(Some(lhs)) = stack.map(|s| s.value.last()) { - let lhs: Magic = lhs.copy_value()?.value_as::()?.into(); + if let Some(lhs) = self.trace_state.operand_stack.last() { + let lhs: Magic = Magic::try_from(lhs)?; if let Some(current_function) = self.current_functions.first() { self.outcome .logs @@ -348,10 +334,11 @@ where fn notify( &mut self, event: &TraceEvent, - _writer: &mut move_trace_format::interface::Writer<'_>, - stack: Option<&move_vm_stack::Stack>, + writer: &mut Writer<'_>, + _stack: Option<&move_vm_stack::Stack>, ) { - if let Err(e) = self.notify_event(event, stack) { + self.trace_state.notify(event, writer, None); + if let Err(e) = self.notify_event(event) { warn!("Error during tracing: {}", e); } } diff --git a/crates/movy-replay/src/tracer/op.rs b/crates/movy-replay/src/tracer/op.rs index db01123..9928beb 100644 --- a/crates/movy-replay/src/tracer/op.rs +++ b/crates/movy-replay/src/tracer/op.rs @@ -3,6 +3,7 @@ use std::fmt::Display; use alloy_primitives::U256; use color_eyre::eyre::eyre; use move_binary_format::file_format::Bytecode; +use move_trace_format::{format::TraceValue, value::SerializableMoveValue}; use move_vm_types::values::IntegerValue; use movy_types::error::MovyError; use serde::{Deserialize, Serialize}; @@ -45,6 +46,30 @@ impl From for Magic { } } +impl TryFrom<&SerializableMoveValue> for Magic { + type Error = MovyError; + + fn try_from(value: &SerializableMoveValue) -> Result { + match value { + SerializableMoveValue::U8(v) => Ok(Self::U8(*v)), + SerializableMoveValue::U16(v) => Ok(Self::U16(*v)), + SerializableMoveValue::U32(v) => Ok(Self::U32(*v)), + SerializableMoveValue::U64(v) => Ok(Self::U64(*v)), + SerializableMoveValue::U128(v) => Ok(Self::U128(*v)), + SerializableMoveValue::U256(v) => Ok(Self::U256(U256::from_be_bytes(v.to_be_bytes()))), + _ => Err(eyre!("TraceValue is not an integer").into()), + } + } +} + +impl TryFrom<&TraceValue> for Magic { + type Error = MovyError; + + fn try_from(value: &TraceValue) -> Result { + Magic::try_from(value.snapshot()) + } +} + #[derive(Serialize, Deserialize, PartialEq, Eq, Debug, Clone, Copy)] pub enum CmpOp { LT, diff --git a/crates/movy-replay/src/tracer/oracle.rs b/crates/movy-replay/src/tracer/oracle.rs index 29fc3c0..b0f24f0 100644 --- a/crates/movy-replay/src/tracer/oracle.rs +++ b/crates/movy-replay/src/tracer/oracle.rs @@ -1,5 +1,4 @@ -use move_trace_format::format::TraceEvent; -use move_vm_stack::Stack; +use move_trace_format::{format::TraceEvent, memory_tracer::TraceState}; use movy_types::{ error::MovyError, input::{FunctionIdent, MoveSequence}, @@ -20,7 +19,7 @@ pub trait SuiGeneralOracle { fn event( &mut self, event: &TraceEvent, - stack: Option<&Stack>, + trace_state: &TraceState, symbol_stack: &ConcolicState, current_function: Option<&FunctionIdent>, state: &mut S, @@ -47,7 +46,7 @@ impl SuiGeneralOracle for () { fn event( &mut self, _event: &TraceEvent, - _stack: Option<&Stack>, + _trace_state: &TraceState, _symbol_stack: &ConcolicState, _current_function: Option<&movy_types::input::FunctionIdent>, _state: &mut S, @@ -83,18 +82,18 @@ where fn event( &mut self, event: &TraceEvent, - stack: Option<&Stack>, + trace_state: &TraceState, symbol_stack: &ConcolicState, current_function: Option<&movy_types::input::FunctionIdent>, state: &mut S, ) -> Result, MovyError> { Ok(self .0 - .event(event, stack, symbol_stack, current_function.clone(), state)? + .event(event, trace_state, symbol_stack, current_function.clone(), state)? .into_iter() .chain( self.1 - .event(event, stack, symbol_stack, current_function, state)? + .event(event, trace_state, symbol_stack, current_function, state)? .into_iter(), ) .collect()) @@ -145,7 +144,7 @@ where fn event( &mut self, event: &TraceEvent, - stack: Option<&Stack>, + trace_state: &TraceState, symbol_stack: &ConcolicState, current_function: Option<&FunctionIdent>, state: &mut S, @@ -154,7 +153,7 @@ where return Ok(vec![]); } self.oracle - .event(event, stack, symbol_stack, current_function, state) + .event(event, trace_state, symbol_stack, current_function, state) } fn done_execution( diff --git a/crates/movy-replay/src/tracer/tree.rs b/crates/movy-replay/src/tracer/tree.rs index 93f1311..c39bcf7 100644 --- a/crates/movy-replay/src/tracer/tree.rs +++ b/crates/movy-replay/src/tracer/tree.rs @@ -6,7 +6,6 @@ use move_trace_format::{ format::{Frame, TraceEvent, TraceValue}, interface::Tracer, }; -use move_vm_stack::Stack; #[derive(Debug, Clone)] pub struct FrameTraced { @@ -132,7 +131,7 @@ impl Tracer for TreeTracer { &mut self, event: &move_trace_format::format::TraceEvent, _writer: &mut move_trace_format::interface::Writer<'_>, - _stack: Option<&Stack>, + _stack: Option<&move_vm_stack::Stack>, ) { let inner = &mut self.inner; inner.evs.push(event.clone()); From f8365546db8417e261f83d8e335b3d35e7c5ac75 Mon Sep 17 00:00:00 2001 From: libr Date: Wed, 28 Jan 2026 17:22:21 +0800 Subject: [PATCH 02/13] fix time question --- crates/movy-fuzz/src/executor.rs | 62 ++++- crates/movy-replay/src/event.rs | 285 ++++++++++++++++++++++ crates/movy-replay/src/lib.rs | 1 + crates/movy-replay/src/tracer/concolic.rs | 61 ++--- crates/movy-replay/src/tracer/fuzz.rs | 9 +- crates/movy-replay/src/tracer/op.rs | 14 +- 6 files changed, 394 insertions(+), 38 deletions(-) create mode 100644 crates/movy-replay/src/event.rs diff --git a/crates/movy-fuzz/src/executor.rs b/crates/movy-fuzz/src/executor.rs index 47faa3a..a2fe3a7 100644 --- a/crates/movy-fuzz/src/executor.rs +++ b/crates/movy-fuzz/src/executor.rs @@ -10,6 +10,7 @@ use libafl_bolts::tuples::{Handle, MatchNameRef, RefIndexable}; use log::trace; use movy_replay::{ db::{ObjectStoreInfo, ObjectStoreMintObject}, + event::{ModuleProvider, NotifierTracer}, exec::{ExecutionTracedResults, SuiExecutor}, tracer::{concolic::ConcolicState, fuzz::SuiFuzzTracer, op::Log, oracle::SuiGeneralOracle}, }; @@ -18,6 +19,8 @@ use movy_types::{ input::{FunctionIdent, MoveAddress}, oracle::{Event, OracleFinding}, }; +use move_core_types::account_address::AccountAddress; +use movy_types::error::MovyError; use serde::{Deserialize, Serialize}; use sui_types::{ effects::TransactionEffectsAPI, @@ -33,6 +36,51 @@ use crate::{ pub const CODE_OBSERVER_NAME: &str = "code_observer"; +pub struct FuzzModuleProvider<'a, E> { + env: &'a E, +} + +impl<'a, E> FuzzModuleProvider<'a, E> +where + E: ObjectStore, +{ + pub fn new(env: &'a E) -> Self { + Self { env } + } +} + +impl<'a, E> ModuleProvider for FuzzModuleProvider<'a, E> +where + E: ObjectStore, +{ + fn get_module( + &mut self, + address: AccountAddress, + name: &str, + ) -> Result, MovyError> { + use sui_types::base_types::ObjectID; + + let db = self.env; + let package_id = ObjectID::from(address); + + let package_obj = match db.get_object(&package_id) { + Some(obj) => obj, + None => return Ok(None), + }; + + if let Some(pkg) = package_obj.data.try_as_package() { + for (module_name, bytes) in pkg.serialized_module_map() { + if module_name.as_str() == name { + let module = move_binary_format::CompiledModule::deserialize_with_defaults(bytes)?; + return Ok(Some(module)); + } + } + } + + Ok(None) + } +} + #[derive(Debug, Clone, PartialEq, Eq)] pub struct ExecutionExtraOutcome { pub logs: BTreeMap>, @@ -92,6 +140,7 @@ impl HasObservers for SuiFuzzExecutor { impl Executor for SuiFuzzExecutor where T: ObjectStore + BackingStore + ObjectSuiStoreCommit + ObjectStoreMintObject + ObjectStoreInfo, + E: ObjectStore, OT: ObserversTuple, RT: for<'a> SuiGeneralOracle, S>, I: MoveInput, @@ -127,8 +176,16 @@ where trace!("Executing input: {}", input.sequence()); state.executions_mut().add_assign(1); let gas_id = state.fuzz_state().gas_id; - let tracer = SuiFuzzTracer::new(&mut self.ob, state, &mut self.oracles, CODE_OBSERVER_NAME); - + let provider = FuzzModuleProvider::new(&self.executor.db); + let tracer = NotifierTracer::with_provider( + SuiFuzzTracer::new( + &mut self.ob, + state, + &mut self.oracles, + CODE_OBSERVER_NAME, + ), + provider, + ); let result = self.executor.run_ptb_with_gas( input.sequence().to_ptb()?, epoch, @@ -146,6 +203,7 @@ where let mut trace_outcome = tracer .expect("tracer should be present when tracing is enabled") + .into_inner() .outcome(); trace!("Execution finished with status: {:?}", effects.status()); diff --git a/crates/movy-replay/src/event.rs b/crates/movy-replay/src/event.rs new file mode 100644 index 0000000..ca3bed0 --- /dev/null +++ b/crates/movy-replay/src/event.rs @@ -0,0 +1,285 @@ +use std::{collections::BTreeMap, marker::PhantomData}; + +use move_binary_format::CompiledModule; +use move_core_types::account_address::AccountAddress; +use move_trace_format::{ + format::{TraceEvent, ExtraInstructionInformation}, + interface::{Tracer, Writer}, +}; +use movy_types::error::MovyError; + +pub trait ModuleProvider { + fn get_module( + &mut self, + address: AccountAddress, + name: &str, + ) -> Result, MovyError>; +} + +pub struct NoModuleProvider; + +impl ModuleProvider for NoModuleProvider { + fn get_module( + &mut self, + _address: AccountAddress, + _name: &str, + ) -> Result, MovyError> { + Ok(None) + } +} + +pub trait TraceNotifier { + fn notify_event(&mut self, event: &TraceEvent) -> Result<(), MovyError>; + fn notify( + &mut self, + event: &TraceEvent, + writer: &mut Writer<'_>, + _stack: Option<&move_vm_stack::Stack>, + ); +} + +pub struct NotifierTracer +where + N: TraceNotifier, + P: ModuleProvider, +{ + pub notifier: N, + module_provider: P, + module_stack: Vec<(AccountAddress, String)>, + module_cache: BTreeMap<(AccountAddress, String), CompiledModule>, + _phantom: PhantomData

, +} + +impl NotifierTracer +where + N: TraceNotifier, +{ + pub fn new(notifier: N) -> Self { + Self { + notifier, + module_provider: NoModuleProvider, + module_stack: Vec::new(), + module_cache: BTreeMap::new(), + _phantom: PhantomData, + } + } +} + +impl NotifierTracer +where + N: TraceNotifier, + P: ModuleProvider, +{ + pub fn with_provider(notifier: N, provider: P) -> Self { + Self { + notifier, + module_provider: provider, + module_stack: Vec::new(), + module_cache: BTreeMap::new(), + _phantom: PhantomData, + } + } + + pub fn notifier_mut(&mut self) -> &mut N { + &mut self.notifier + } + + pub fn notifier(&self) -> &N { + &self.notifier + } + + pub fn into_inner(self) -> N { + self.notifier + } + fn current_module(&self) -> Option<(AccountAddress, String)> { + self.module_stack.last().cloned() + } + fn get_or_load_module(&mut self, address: AccountAddress, name: &str) -> Option<&CompiledModule> { + let key = (address, name.to_string()); + + if !self.module_cache.contains_key(&key) { + if let Ok(Some(module)) = self.module_provider.get_module(address, name) { + self.module_cache.insert(key.clone(), module); + } + } + + self.module_cache.get(&key) + } +} + +fn create_before_instruction( + tracer: &mut NotifierTracer, + event: &TraceEvent, +) -> Option +where + N: TraceNotifier, + P: ModuleProvider, +{ + match event { + TraceEvent::Instruction { pc, instruction, .. } => { + use move_binary_format::file_format::Bytecode as B; + use move_binary_format::file_format::StructFieldInformation; + let mut extra = None; + + if let Some((address, name)) = tracer.current_module() { + + if let Some(module) = tracer.get_or_load_module(address, &name) { + match instruction { + B::Unpack(sidx) => { + let struct_def = module.struct_def_at(*sidx); + let field_count = match &struct_def.field_information { + StructFieldInformation::Native => 0, + StructFieldInformation::Declared(fields) => fields.len(), + }; + extra = Some(move_trace_format::format::ExtraInstructionInformation::Unpack(field_count as usize)); + } + B::UnpackVariant(vidx) + | B::UnpackVariantImmRef(vidx) + | B::UnpackVariantMutRef(vidx) => { + let variant_handle = module.variant_handle_at(*vidx); + let enum_def = module.enum_def_at(variant_handle.enum_def); + let variant_def = module.variant_def_at( + variant_handle.enum_def, + variant_handle.variant, + ); + let field_count = variant_def.fields.len(); + extra = Some(move_trace_format::format::ExtraInstructionInformation::UnpackVariant(field_count as usize)); + } + B::UnpackGeneric(sidx) => { + let struct_inst = module.struct_instantiation_at(*sidx); + let struct_def = module.struct_def_at(struct_inst.def); + let field_count = match &struct_def.field_information { + StructFieldInformation::Native => 0, + StructFieldInformation::Declared(fields) => fields.len(), + }; + extra = Some(move_trace_format::format::ExtraInstructionInformation::UnpackGeneric(field_count as usize)); + } + B::UnpackVariantGeneric(vidx) + | B::UnpackVariantGenericImmRef(vidx) + | B::UnpackVariantGenericMutRef(vidx) => { + let variant_inst_handle = module.variant_instantiation_handle_at(*vidx); + let enum_inst = module.enum_instantiation_at(variant_inst_handle.enum_def); + let enum_def = module.enum_def_at(enum_inst.def); + let variant_def = module.variant_def_at( + enum_inst.def, + variant_inst_handle.variant, + ); + let field_count = variant_def.fields.len(); + extra = Some(move_trace_format::format::ExtraInstructionInformation::UnpackVariantGeneric(field_count as usize)); + } + B::Pack(sidx) => { + let struct_def = module.struct_def_at(*sidx); + let field_count = match &struct_def.field_information { + StructFieldInformation::Native => 0, + StructFieldInformation::Declared(fields) => fields.len(), + }; + extra = Some(move_trace_format::format::ExtraInstructionInformation::Pack(field_count as usize)); + } + B::PackGeneric(sidx) => { + let struct_inst = module.struct_instantiation_at(*sidx); + let struct_def = module.struct_def_at(struct_inst.def); + let field_count = match &struct_def.field_information { + StructFieldInformation::Native => 0, + StructFieldInformation::Declared(fields) => fields.len(), + }; + extra = Some(move_trace_format::format::ExtraInstructionInformation::PackGeneric(field_count as usize)); + } + B::PackVariant(vidx) => { + let variant_handle = module.variant_handle_at(*vidx); + let enum_def = module.enum_def_at(variant_handle.enum_def); + let variant_def = module.variant_def_at( + variant_handle.enum_def, + variant_handle.variant, + ); + let field_count = variant_def.fields.len(); + extra = Some(move_trace_format::format::ExtraInstructionInformation::PackVariant(field_count as usize)); + } + B::PackVariantGeneric(vidx) => { + let variant_inst_handle = module.variant_instantiation_handle_at(*vidx); + let enum_inst = module.enum_instantiation_at(variant_inst_handle.enum_def); + let enum_def = module.enum_def_at(enum_inst.def); + let variant_def = module.variant_def_at( + enum_inst.def, + variant_inst_handle.variant, + ); + let field_count = variant_def.fields.len(); + extra = Some(move_trace_format::format::ExtraInstructionInformation::PackVariantGeneric(field_count as usize)); + } + _ => {} + } + } else {} + } + + Some(TraceEvent::BeforeInstruction { + pc: *pc, + instruction: instruction.clone(), + extra, + type_parameters: vec![], + gas_left: 0, + }) + } + _ => None, + } +} + +impl Tracer for NotifierTracer +where + N: TraceNotifier, + P: ModuleProvider, +{ + fn notify( + &mut self, + event: &TraceEvent, + _writer: &mut Writer<'_>, + _stack: Option<&move_vm_stack::Stack>, + ) { + self.notifier.notify(event, _writer, _stack); + + match event { + TraceEvent::BeforeInstruction { .. } => { + return; + } + + TraceEvent::OpenFrame { frame, gas_left: _ } => { + let address = *frame.module.address(); + let name = frame.module.name().to_string(); + // self.module_stack = Some((address, name)); + self.module_stack.push((address, name)); + if let Err(e) = self.notifier.notify_event(event) { + log::error!("NotifierTracer: failed to notify OpenFrame: {:?}", e); + } + } + + TraceEvent::CloseFrame { + frame_id: _, + return_: _, + gas_left: _, + } => { + // self.module_stack = None; + self.module_stack.pop(); + if let Err(e) = self.notifier.notify_event(event) { + log::error!("NotifierTracer: failed to notify CloseFrame: {:?}", e); + } + } + + TraceEvent::Instruction { .. } => { + // send before instruction + if let Some(before_instruction) = create_before_instruction(self, event) { + if let Err(e) = self.notifier.notify_event(&before_instruction) { + log::error!("NotifierTracer: failed to notify BeforeInstruction: {:?}", e); + } + } + // send instruction + if let Err(e) = self.notifier.notify_event(event) { + log::error!("NotifierTracer: failed to notify Instruction: {:?}", e); + } + } + + _ => { + if let Err(e) = self.notifier.notify_event(event) { + log::error!("NotifierTracer: failed to notify event: {:?}", e); + } + } + } + } +} diff --git a/crates/movy-replay/src/lib.rs b/crates/movy-replay/src/lib.rs index 73685fb..96374fe 100644 --- a/crates/movy-replay/src/lib.rs +++ b/crates/movy-replay/src/lib.rs @@ -1,5 +1,6 @@ pub mod db; pub mod env; +pub mod event; pub mod exec; pub mod meta; pub mod tracer; diff --git a/crates/movy-replay/src/tracer/concolic.rs b/crates/movy-replay/src/tracer/concolic.rs index f9629f7..66947c8 100644 --- a/crates/movy-replay/src/tracer/concolic.rs +++ b/crates/movy-replay/src/tracer/concolic.rs @@ -285,30 +285,8 @@ impl ConcolicState { PrimitiveValue::U256(u) => Int::from_str(&u.to_string()).unwrap(), } } - - pub fn notify_event(&mut self, event: &TraceEvent, trace_state: &TraceState) -> Option { - if self.disable { - return None; - } - let stack = &trace_state.operand_stack; - if self.stack.len() != stack.len() && stack.is_empty() { - self.stack.clear(); - } - if let TraceEvent::Effect(v) = event - && let Effect::ExecutionError(_) = v.as_ref() - { - self.stack.pop(); - } - if self.stack.len() != stack.len() { - warn!( - "stack: {:?}, stack from trace: {:?}, event: {:?}, disabling concolic execution", - self.stack, stack, event - ); - self.disable = true; - return None; - } - - let mut process_binary_op = || { + #[inline] + fn process_binary_op(&mut self, stack: &[TraceValue]) -> Option<(Int, Int)> { let (rhs, lhs) = (self.stack.pop().unwrap(), self.stack.pop().unwrap()); let stack_len = stack.len(); let true_lhs = &stack[stack_len - 2]; @@ -328,7 +306,22 @@ impl ConcolicState { } }; Some((new_l, new_r)) - }; + } + pub fn notify_event(&mut self, event: &TraceEvent, trace_state: &TraceState) -> Option { + if self.disable { + return None; + } + let stack = &trace_state.operand_stack; + // if self.stack.len() != stack.len() && stack.is_empty() { + // self.stack.clear(); + // } + if let TraceEvent::Effect(v) = event + && let Effect::ExecutionError(_) = v.as_ref() + { + self.stack.pop(); + } + + match event { TraceEvent::External(v) => { @@ -404,6 +397,14 @@ impl ConcolicState { instruction, extra, } => { + if self.stack.len() != stack.len() { + warn!( + "stack: {:?}, stack from trace: {:?}, event: {:?}, disabling concolic execution", + self.stack, stack, event + ); + self.disable = true; + return None; + } trace!( "Before instruction at pc {}: {:?}, extra: {:?}. Current stack: {:?}", pc, @@ -481,7 +482,7 @@ impl ConcolicState { } } Bytecode::Add => { - if let Some((l, r)) = process_binary_op() { + if let Some((l, r)) = self.process_binary_op(stack) { // overflow check not implemented yet let sum = l + r; self.stack.push(SymbolValue::Value(sum)); @@ -490,7 +491,7 @@ impl ConcolicState { } } Bytecode::Sub => { - if let Some((l, r)) = process_binary_op() { + if let Some((l, r)) = self.process_binary_op(stack) { // overflow check not implemented yet let diff = l - r; self.stack.push(SymbolValue::Value(diff)); @@ -499,7 +500,7 @@ impl ConcolicState { } } Bytecode::Mul => { - if let Some((l, r)) = process_binary_op() { + if let Some((l, r)) = self.process_binary_op(stack) { // overflow check not implemented yet let prod = l * r; self.stack.push(SymbolValue::Value(prod)); @@ -508,7 +509,7 @@ impl ConcolicState { } } Bytecode::Div => { - if let Some((l, r)) = process_binary_op() { + if let Some((l, r)) = self.process_binary_op(stack) { // overflow check not implemented yet let quot = l / r; self.stack.push(SymbolValue::Value(quot)); @@ -517,7 +518,7 @@ impl ConcolicState { } } Bytecode::Mod => { - if let Some((l, r)) = process_binary_op() { + if let Some((l, r)) = self.process_binary_op(stack) { // overflow check not implemented yet let rem = l % r; self.stack.push(SymbolValue::Value(rem)); diff --git a/crates/movy-replay/src/tracer/fuzz.rs b/crates/movy-replay/src/tracer/fuzz.rs index 0436b6f..21e91a8 100644 --- a/crates/movy-replay/src/tracer/fuzz.rs +++ b/crates/movy-replay/src/tracer/fuzz.rs @@ -326,7 +326,8 @@ where } } -impl<'a, 's, S, O, T, OT> Tracer for SuiFuzzTracer<'a, 's, S, O, T, OT> + +impl<'a, 's, S, O, T, OT> crate::event::TraceNotifier for SuiFuzzTracer<'a, 's, S, O, T, OT> where O: SuiGeneralOracle, OT: MatchNameRef + MatchName, @@ -338,8 +339,8 @@ where _stack: Option<&move_vm_stack::Stack>, ) { self.trace_state.notify(event, writer, None); - if let Err(e) = self.notify_event(event) { - warn!("Error during tracing: {}", e); - } + } + fn notify_event(&mut self, event: &TraceEvent) -> Result<(), MovyError> { + SuiFuzzTracer::notify_event(self, event) } } diff --git a/crates/movy-replay/src/tracer/op.rs b/crates/movy-replay/src/tracer/op.rs index 9928beb..c4c50f1 100644 --- a/crates/movy-replay/src/tracer/op.rs +++ b/crates/movy-replay/src/tracer/op.rs @@ -3,7 +3,7 @@ use std::fmt::Display; use alloy_primitives::U256; use color_eyre::eyre::eyre; use move_binary_format::file_format::Bytecode; -use move_trace_format::{format::TraceValue, value::SerializableMoveValue}; +use move_trace_format::{format::TraceValue, value::{SerializableMoveValue, SimplifiedMoveStruct}}; use move_vm_types::values::IntegerValue; use movy_types::error::MovyError; use serde::{Deserialize, Serialize}; @@ -51,13 +51,23 @@ impl TryFrom<&SerializableMoveValue> for Magic { fn try_from(value: &SerializableMoveValue) -> Result { match value { + SerializableMoveValue::Bool(v) => Ok(Self::U8(if *v { 1 } else { 0 })), SerializableMoveValue::U8(v) => Ok(Self::U8(*v)), SerializableMoveValue::U16(v) => Ok(Self::U16(*v)), SerializableMoveValue::U32(v) => Ok(Self::U32(*v)), SerializableMoveValue::U64(v) => Ok(Self::U64(*v)), SerializableMoveValue::U128(v) => Ok(Self::U128(*v)), SerializableMoveValue::U256(v) => Ok(Self::U256(U256::from_be_bytes(v.to_be_bytes()))), - _ => Err(eyre!("TraceValue is not an integer").into()), + SerializableMoveValue::Address(bytes) => Ok(Self::Bytes(bytes.to_vec())), + SerializableMoveValue::Struct(data) => { + // TODO: more generic way to serialize struct into bytes + let SimplifiedMoveStruct { type_, .. } = data; + let mut bytes = type_.address.to_vec(); + bytes.extend_from_slice(type_.module.as_bytes()); + bytes.extend_from_slice(type_.name.as_bytes()); + Ok(Self::Bytes(bytes)) + } + _ => Err(eyre!("TraceValue is not an integer {:?}", value).into()), } } } From bebb1d11890478ae2d95c7015851c5b17b89a257 Mon Sep 17 00:00:00 2001 From: libr Date: Wed, 28 Jan 2026 22:03:15 +0800 Subject: [PATCH 03/13] feat: move tracestate to project --- Cargo.toml | 2 +- .../src/oracles/sui/bool_judgement.rs | 3 +- .../src/oracles/sui/infinite_loop.rs | 3 +- crates/movy-fuzz/src/oracles/sui/overflow.rs | 3 +- .../src/oracles/sui/precision_loss.rs | 3 +- crates/movy-fuzz/src/oracles/sui/proceeds.rs | 4 +- .../src/oracles/sui/type_conversion.rs | 4 +- crates/movy-fuzz/src/oracles/sui/typed_bug.rs | 4 +- crates/movy-replay/src/tracer/concolic.rs | 4 +- crates/movy-replay/src/tracer/fuzz.rs | 2 +- crates/movy-replay/src/tracer/mod.rs | 2 +- crates/movy-replay/src/tracer/oracle.rs | 7 +- crates/movy-replay/src/tracer/trace.rs | 153 ++++++++++++++++++ 13 files changed, 178 insertions(+), 16 deletions(-) create mode 100644 crates/movy-replay/src/tracer/trace.rs diff --git a/Cargo.toml b/Cargo.toml index f32cd78..1f112c5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -70,7 +70,7 @@ move-ir-types = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz" move-core-types = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} move-vm-types = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} move-vm-stack = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} -move-vm-runtime = {git = "https://github.com/MystenLabs/sui", branch = "main", features = ["tracing", "testing"]} +move-vm-runtime = {git = "https://github.com/wtdcode/sui", branch = "main", features = ["tracing", "testing"]} move-model = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} move-stackless-bytecode = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} sui-move-build = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} diff --git a/crates/movy-fuzz/src/oracles/sui/bool_judgement.rs b/crates/movy-fuzz/src/oracles/sui/bool_judgement.rs index ecd2e39..39ba252 100644 --- a/crates/movy-fuzz/src/oracles/sui/bool_judgement.rs +++ b/crates/movy-fuzz/src/oracles/sui/bool_judgement.rs @@ -1,5 +1,5 @@ use move_binary_format::file_format::Bytecode; -use move_trace_format::{format::TraceEvent, memory_tracer::TraceState}; +use move_trace_format::{format::TraceEvent}; use serde_json::json; use sui_types::effects::TransactionEffects; use z3::{ @@ -9,6 +9,7 @@ use z3::{ use movy_replay::tracer::{ concolic::{ConcolicState, SymbolValue}, + trace::{TraceState}, oracle::SuiGeneralOracle, }; use movy_types::{ diff --git a/crates/movy-fuzz/src/oracles/sui/infinite_loop.rs b/crates/movy-fuzz/src/oracles/sui/infinite_loop.rs index d813a36..ced2f1a 100644 --- a/crates/movy-fuzz/src/oracles/sui/infinite_loop.rs +++ b/crates/movy-fuzz/src/oracles/sui/infinite_loop.rs @@ -1,11 +1,12 @@ use std::collections::BTreeMap; use move_binary_format::file_format::Bytecode; -use move_trace_format::{format::TraceEvent, memory_tracer::TraceState}; +use move_trace_format::{format::TraceEvent}; use serde_json::json; use movy_replay::tracer::{ concolic::{ConcolicState, SymbolValue}, + trace::{TraceState}, oracle::SuiGeneralOracle, }; use movy_types::{ diff --git a/crates/movy-fuzz/src/oracles/sui/overflow.rs b/crates/movy-fuzz/src/oracles/sui/overflow.rs index 7a283d9..460871f 100644 --- a/crates/movy-fuzz/src/oracles/sui/overflow.rs +++ b/crates/movy-fuzz/src/oracles/sui/overflow.rs @@ -1,10 +1,11 @@ use move_binary_format::file_format::Bytecode; use move_core_types::u256::U256; -use move_trace_format::{format::{TraceEvent, TraceValue}, memory_tracer::TraceState}; +use move_trace_format::{format::{TraceEvent, TraceValue}}; use serde_json::json; use movy_replay::tracer::{ concolic::{ConcolicState, value_bitwidth, value_to_u256}, + trace::{TraceState}, oracle::SuiGeneralOracle, }; use movy_types::{ diff --git a/crates/movy-fuzz/src/oracles/sui/precision_loss.rs b/crates/movy-fuzz/src/oracles/sui/precision_loss.rs index babdcfb..a409d7f 100644 --- a/crates/movy-fuzz/src/oracles/sui/precision_loss.rs +++ b/crates/movy-fuzz/src/oracles/sui/precision_loss.rs @@ -1,8 +1,9 @@ -use move_trace_format::{format::TraceEvent, memory_tracer::TraceState}; +use move_trace_format::{format::TraceEvent}; use serde_json::json; use movy_replay::tracer::{ concolic::{ConcolicState, SymbolValue}, + trace::{TraceState}, oracle::SuiGeneralOracle, }; use movy_types::{error::MovyError, input::MoveSequence, oracle::OracleFinding}; diff --git a/crates/movy-fuzz/src/oracles/sui/proceeds.rs b/crates/movy-fuzz/src/oracles/sui/proceeds.rs index 6f45ba4..902604f 100644 --- a/crates/movy-fuzz/src/oracles/sui/proceeds.rs +++ b/crates/movy-fuzz/src/oracles/sui/proceeds.rs @@ -4,9 +4,9 @@ use std::{ }; use log::debug; -use move_trace_format::{format::TraceEvent, memory_tracer::TraceState}; +use move_trace_format::{format::TraceEvent}; -use movy_replay::tracer::{concolic::ConcolicState, oracle::SuiGeneralOracle}; +use movy_replay::tracer::{concolic::ConcolicState, oracle::SuiGeneralOracle, trace::TraceState}; use movy_types::{ error::MovyError, input::{InputArgument, MoveSequence, SuiObjectInputArgument}, diff --git a/crates/movy-fuzz/src/oracles/sui/type_conversion.rs b/crates/movy-fuzz/src/oracles/sui/type_conversion.rs index 2075973..5dc88a7 100644 --- a/crates/movy-fuzz/src/oracles/sui/type_conversion.rs +++ b/crates/movy-fuzz/src/oracles/sui/type_conversion.rs @@ -1,11 +1,11 @@ use move_binary_format::file_format::Bytecode; -use move_trace_format::{format::TraceEvent, memory_tracer::TraceState}; +use move_trace_format::{format::TraceEvent}; use movy_types::input::MoveSequence; use movy_types::oracle::OracleFinding; use serde_json::json; use movy_replay::tracer::concolic::value_bitwidth; -use movy_replay::tracer::{concolic::ConcolicState, oracle::SuiGeneralOracle}; +use movy_replay::tracer::{concolic::ConcolicState, oracle::SuiGeneralOracle,trace::TraceState}; use movy_types::error::MovyError; use sui_types::effects::TransactionEffects; diff --git a/crates/movy-fuzz/src/oracles/sui/typed_bug.rs b/crates/movy-fuzz/src/oracles/sui/typed_bug.rs index 65be3c3..782f240 100644 --- a/crates/movy-fuzz/src/oracles/sui/typed_bug.rs +++ b/crates/movy-fuzz/src/oracles/sui/typed_bug.rs @@ -1,7 +1,7 @@ use log::{debug, trace}; -use move_trace_format::{format::TraceEvent, memory_tracer::TraceState}; +use move_trace_format::{format::TraceEvent}; -use movy_replay::tracer::{concolic::ConcolicState, oracle::SuiGeneralOracle}; +use movy_replay::tracer::{concolic::ConcolicState, oracle::SuiGeneralOracle, trace::TraceState}; use movy_types::{error::MovyError, input::MoveSequence, oracle::OracleFinding}; use serde_json::json; use sui_types::{ diff --git a/crates/movy-replay/src/tracer/concolic.rs b/crates/movy-replay/src/tracer/concolic.rs index 66947c8..04f0c7a 100644 --- a/crates/movy-replay/src/tracer/concolic.rs +++ b/crates/movy-replay/src/tracer/concolic.rs @@ -5,9 +5,11 @@ use move_binary_format::file_format::Bytecode; use move_core_types::{language_storage::TypeTag, u256::U256}; use move_trace_format::{ format::{Effect, ExtraInstructionInformation, TraceEvent, TraceValue, TypeTagWithRefs}, - memory_tracer::TraceState, value::SerializableMoveValue, }; +use crate::tracer::{ + trace::TraceState +}; use z3::ast::{Ast, Bool, Int}; #[derive(Clone, Debug, PartialEq, Eq)] diff --git a/crates/movy-replay/src/tracer/fuzz.rs b/crates/movy-replay/src/tracer/fuzz.rs index 21e91a8..8ddea22 100644 --- a/crates/movy-replay/src/tracer/fuzz.rs +++ b/crates/movy-replay/src/tracer/fuzz.rs @@ -8,7 +8,6 @@ use move_binary_format::file_format::Bytecode; use move_trace_format::{ format::{Effect, TraceEvent, TraceValue}, interface::{Tracer, Writer}, - memory_tracer::TraceState, }; use movy_types::{error::MovyError, input::FunctionIdent, oracle::OracleFinding}; @@ -16,6 +15,7 @@ use crate::tracer::{ concolic::ConcolicState, op::{CastLog, CmpLog, CmpOp, Log, Magic, ShlLog}, oracle::SuiGeneralOracle, + trace::TraceState, }; #[derive(Debug)] diff --git a/crates/movy-replay/src/tracer/mod.rs b/crates/movy-replay/src/tracer/mod.rs index 1cb5e43..617aed1 100644 --- a/crates/movy-replay/src/tracer/mod.rs +++ b/crates/movy-replay/src/tracer/mod.rs @@ -5,7 +5,7 @@ pub mod fuzz; pub mod op; pub mod oracle; pub mod tree; - +pub mod trace; #[derive(Default)] pub struct NopTracer; diff --git a/crates/movy-replay/src/tracer/oracle.rs b/crates/movy-replay/src/tracer/oracle.rs index b0f24f0..f407757 100644 --- a/crates/movy-replay/src/tracer/oracle.rs +++ b/crates/movy-replay/src/tracer/oracle.rs @@ -1,4 +1,4 @@ -use move_trace_format::{format::TraceEvent, memory_tracer::TraceState}; +use move_trace_format::{format::TraceEvent}; use movy_types::{ error::MovyError, input::{FunctionIdent, MoveSequence}, @@ -6,7 +6,10 @@ use movy_types::{ }; use sui_types::effects::TransactionEffects; -use crate::tracer::concolic::ConcolicState; +use crate::tracer::{ + concolic::ConcolicState, + trace::TraceState, +}; pub trait SuiGeneralOracle { fn pre_execution( diff --git a/crates/movy-replay/src/tracer/trace.rs b/crates/movy-replay/src/tracer/trace.rs new file mode 100644 index 0000000..9e82d5c --- /dev/null +++ b/crates/movy-replay/src/tracer/trace.rs @@ -0,0 +1,153 @@ +// Copyright (c) The Move Contributors +// SPDX-License-Identifier: Apache-2.0 + +//! This module contains the implementation of the memory tracer. The memory tracer is a tracer +//! that takes a stream of trace events, and uses these events to create a snapshot of the memory +//! state (operand stack, locals, and globals) at each point in time during execution. +//! +//! The memory tracer then emits `External` events with the current VM state for every instruction, +//! and open/close frame event that is has built up. +//! +//! The memory tracer is useful for debugging, and as an example of how to build up this +//! state for more advanced analysis and also using the custom tracing trait. +use move_vm_stack::Stack; +use move_trace_format::{ + format::{DataLoad, Effect, Location, Read, TraceEvent, TraceIndex, TraceValue, Write}, + interface::{Tracer, Writer}, + value::SerializableMoveValue, +}; +use core::fmt; +use std::collections::BTreeMap; + +#[derive(Debug, Clone)] +pub struct TraceState { + // Tracks "global memory" state (i.e., references out in to global memory/references returned + // from native functions). + pub loaded_state: BTreeMap, + // The current state (i.e., values) of the VM's operand stack. + pub operand_stack: Vec, + // The current call stack indexed by frame id. Maps from the frame id to the current state of + // the frame's locals. The bool indicates if the frame is native or not. + pub call_stack: BTreeMap, bool)>, +} + +impl TraceState { + pub fn new() -> Self { + Self { + loaded_state: BTreeMap::new(), + operand_stack: vec![], + call_stack: BTreeMap::new(), + } + } + + /// Apply an event to the state machine and update the locals state accordingly. + fn apply_event(&mut self, event: &TraceEvent) { + match event { + TraceEvent::OpenFrame { frame, .. } => { + let mut locals = BTreeMap::new(); + for (i, p) in frame.parameters.iter().enumerate() { + // NB: parameters are passed directly, so we just pop to make sure they aren't also + // left on the operand stack. For the initial call, these pops may (should) fail, but that + // is fine as we already have the values in the parameter list. + self.operand_stack.pop(); + locals.insert(i, p.clone()); + } + + self.call_stack + .insert(frame.frame_id, (locals, frame.is_native)); + } + TraceEvent::CloseFrame { .. } => { + self.call_stack + .pop_last() + .expect("Unbalanced call stack in memory tracer -- this should never happen"); + } + TraceEvent::Effect(ef) => match &**ef { + Effect::ExecutionError(_) => (), + Effect::Push(value) => { + self.operand_stack.push(value.clone()); + } + Effect::Pop(_) => { + self.operand_stack.pop().expect( + "Tried to pop off the empty operand stack -- this should never happen", + ); + } + Effect::Read(Read { + location, + root_value_read: _, + moved, + }) => { + if *moved { + match location { + Location::Local(frame_idx, idx) => { + let frame = self.call_stack.get_mut(frame_idx).unwrap(); + frame.0.remove(idx); + } + Location::Indexed(..) => { + panic!("Cannot move from indexed location"); + } + Location::Global(..) => { + panic!("Cannot move from global location"); + } + } + } + } + Effect::Write(Write { + location, + root_value_after_write: value_written, + }) => match location { + Location::Local(frame_idx, idx) => { + let frame = self.call_stack.get_mut(frame_idx).unwrap(); + frame.0.insert(*idx, value_written.clone()); + } + Location::Indexed(location, _idx) => { + let val = self.get_mut_location(location); + *val = value_written.clone().snapshot().clone(); + } + Location::Global(id) => { + let val = self.loaded_state.get_mut(id).unwrap(); + *val = value_written.snapshot().clone(); + } + }, + Effect::DataLoad(DataLoad { + location, snapshot, .. + }) => { + let Location::Global(id) = location else { + unreachable!("Dataload by reference must have a global location"); + }; + self.loaded_state.insert(*id, snapshot.clone()); + } + }, + // External events are treated opaqeuly + TraceEvent::External(_) => (), + // Instructions + TraceEvent::Instruction { .. } | TraceEvent::BeforeInstruction { .. } => (), + } + } + + /// Given a reference "location" return a mutable reference to the value it points to so that + /// it can be updated. + fn get_mut_location(&mut self, location: &Location) -> &mut SerializableMoveValue { + match location { + Location::Local(frame_idx, idx) => { + let frame = self.call_stack.get_mut(frame_idx).unwrap(); + frame.0.get_mut(idx).unwrap().value_mut().unwrap() + } + Location::Indexed(loc, _offset) => self.get_mut_location(loc), + Location::Global(id) => self.loaded_state.get_mut(id).unwrap(), + } + } +} + +impl Default for TraceState { + fn default() -> Self { + Self::new() + } +} + +impl Tracer for TraceState { + fn notify(&mut self, event: &TraceEvent, mut write: &mut Writer<'_>, _stack: Option<&Stack>) { + self.apply_event(event); + // no emit for + } +} + From 780db4f66ce3591de3b37e449895af0781ba3daa Mon Sep 17 00:00:00 2001 From: libr Date: Wed, 28 Jan 2026 23:41:15 +0800 Subject: [PATCH 04/13] fix: dependency downgrade --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 1f112c5..6107171 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -70,7 +70,7 @@ move-ir-types = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz" move-core-types = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} move-vm-types = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} move-vm-stack = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} -move-vm-runtime = {git = "https://github.com/wtdcode/sui", branch = "main", features = ["tracing", "testing"]} +move-vm-runtime = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz", features = ["tracing", "testing"]} move-model = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} move-stackless-bytecode = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} sui-move-build = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} From 6470d98c834bfcc87c13f7989e2ba62c9105c40e Mon Sep 17 00:00:00 2001 From: libr Date: Tue, 3 Feb 2026 16:09:47 +0800 Subject: [PATCH 05/13] feat: handle trace boundaries in external events --- crates/movy-replay/src/tracer/trace.rs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/crates/movy-replay/src/tracer/trace.rs b/crates/movy-replay/src/tracer/trace.rs index 9e82d5c..9da10e7 100644 --- a/crates/movy-replay/src/tracer/trace.rs +++ b/crates/movy-replay/src/tracer/trace.rs @@ -117,8 +117,16 @@ impl TraceState { self.loaded_state.insert(*id, snapshot.clone()); } }, - // External events are treated opaqeuly - TraceEvent::External(_) => (), + // External events are treated opaquely unless they define a trace boundary. + TraceEvent::External(external) => { + if external.as_str().is_some_and(|s| s == "MoveCallStart") { + // New trace boundary. Reset reconstructed runtime state to avoid + // leaking values across calls/txns. + self.loaded_state.clear(); + self.operand_stack.clear(); + self.call_stack.clear(); + } + } // Instructions TraceEvent::Instruction { .. } | TraceEvent::BeforeInstruction { .. } => (), } @@ -150,4 +158,3 @@ impl Tracer for TraceState { // no emit for } } - From 19ec008e81ea34c8149d3fd2e9a4e14d3b2697c1 Mon Sep 17 00:00:00 2001 From: libr Date: Wed, 11 Feb 2026 15:33:01 +0800 Subject: [PATCH 06/13] feat: Remove BeforeInstruction & bump --- Cargo.toml | 48 ++-- .../src/oracles/sui/bool_judgement.rs | 6 +- .../src/oracles/sui/infinite_loop.rs | 6 +- crates/movy-fuzz/src/oracles/sui/overflow.rs | 6 +- .../src/oracles/sui/precision_loss.rs | 6 +- .../src/oracles/sui/type_conversion.rs | 6 +- crates/movy-replay/src/event.rs | 128 ++++++---- crates/movy-replay/src/tracer/concolic.rs | 106 ++++---- crates/movy-replay/src/tracer/fuzz.rs | 240 ++++++++++-------- crates/movy-replay/src/tracer/trace.rs | 7 +- 10 files changed, 302 insertions(+), 257 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 6107171..5576d62 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -61,30 +61,30 @@ tonic = "0.14" url = "2.5.7" # Sui dependencies -move-binary-format = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} -move-trace-format = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} -move-package = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} -move-compiler = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} -move-disassembler = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} -move-ir-types = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} -move-core-types = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} -move-vm-types = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} -move-vm-stack = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} -move-vm-runtime = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz", features = ["tracing", "testing"]} -move-model = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} -move-stackless-bytecode = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} -sui-move-build = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} -sui-json-rpc-types = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} -sui-types = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} -sui-package-management = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} -sui-sdk = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} -sui-config = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} -sui-storage = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} -sui-snapshot = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} -sui-core = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} -sui-execution = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz", features = ["testing"]} -shared-crypto = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} -# sui-adapter-v2 = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} +move-binary-format = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"} +move-trace-format = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"} +move-package = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"} +move-compiler = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"} +move-disassembler = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"} +move-ir-types = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"} +move-core-types = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"} +move-vm-types = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"} +move-vm-stack = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"} +move-vm-runtime = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz", features = ["tracing", "testing"]} +move-model = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"} +move-stackless-bytecode = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"} +sui-move-build = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"} +sui-json-rpc-types = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"} +sui-types = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"} +sui-package-management = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"} +sui-sdk = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"} +sui-config = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"} +sui-storage = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"} +sui-snapshot = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"} +sui-core = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"} +sui-execution = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz", features = ["testing"]} +shared-crypto = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"} +# sui-adapter-v2 = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"} sui-rpc = { git = "https://github.com/MystenLabs/sui-rust-sdk.git", rev = "fb62af78b30f5dc64eeaec0094ab95b5ce5b7ce2" } sui-sdk-types = { git = "https://github.com/MystenLabs/sui-rust-sdk.git", rev = "fb62af78b30f5dc64eeaec0094ab95b5ce5b7ce2" } diff --git a/crates/movy-fuzz/src/oracles/sui/bool_judgement.rs b/crates/movy-fuzz/src/oracles/sui/bool_judgement.rs index 39ba252..aa5806e 100644 --- a/crates/movy-fuzz/src/oracles/sui/bool_judgement.rs +++ b/crates/movy-fuzz/src/oracles/sui/bool_judgement.rs @@ -1,5 +1,5 @@ use move_binary_format::file_format::Bytecode; -use move_trace_format::{format::TraceEvent}; +use move_trace_format::format::TraceEvent; use serde_json::json; use sui_types::effects::TransactionEffects; use z3::{ @@ -9,8 +9,8 @@ use z3::{ use movy_replay::tracer::{ concolic::{ConcolicState, SymbolValue}, - trace::{TraceState}, oracle::SuiGeneralOracle, + trace::TraceState, }; use movy_types::{ error::MovyError, @@ -42,7 +42,7 @@ impl SuiGeneralOracle for BoolJudgementOracle { _state: &mut S, ) -> Result, MovyError> { match event { - TraceEvent::BeforeInstruction { + TraceEvent::Instruction { pc, instruction, .. } => { let stack_syms = &symbol_stack.stack; diff --git a/crates/movy-fuzz/src/oracles/sui/infinite_loop.rs b/crates/movy-fuzz/src/oracles/sui/infinite_loop.rs index ced2f1a..21e7946 100644 --- a/crates/movy-fuzz/src/oracles/sui/infinite_loop.rs +++ b/crates/movy-fuzz/src/oracles/sui/infinite_loop.rs @@ -1,13 +1,13 @@ use std::collections::BTreeMap; use move_binary_format::file_format::Bytecode; -use move_trace_format::{format::TraceEvent}; +use move_trace_format::format::TraceEvent; use serde_json::json; use movy_replay::tracer::{ concolic::{ConcolicState, SymbolValue}, - trace::{TraceState}, oracle::SuiGeneralOracle, + trace::TraceState, }; use movy_types::{ error::MovyError, @@ -49,7 +49,7 @@ impl SuiGeneralOracle for InfiniteLoopOracle { let key = hash_to_u64(&key); self.branch_counts.remove(&key); } - TraceEvent::BeforeInstruction { + TraceEvent::Instruction { pc, instruction, .. } => { match instruction { diff --git a/crates/movy-fuzz/src/oracles/sui/overflow.rs b/crates/movy-fuzz/src/oracles/sui/overflow.rs index 460871f..e990821 100644 --- a/crates/movy-fuzz/src/oracles/sui/overflow.rs +++ b/crates/movy-fuzz/src/oracles/sui/overflow.rs @@ -1,12 +1,12 @@ use move_binary_format::file_format::Bytecode; use move_core_types::u256::U256; -use move_trace_format::{format::{TraceEvent, TraceValue}}; +use move_trace_format::format::{TraceEvent, TraceValue}; use serde_json::json; use movy_replay::tracer::{ concolic::{ConcolicState, value_bitwidth, value_to_u256}, - trace::{TraceState}, oracle::SuiGeneralOracle, + trace::TraceState, }; use movy_types::{ error::MovyError, @@ -47,7 +47,7 @@ impl SuiGeneralOracle for OverflowOracle { _state: &mut S, ) -> Result, MovyError> { match event { - TraceEvent::BeforeInstruction { + TraceEvent::Instruction { pc, instruction, .. } => { if !matches!(instruction, Bytecode::Shl) { diff --git a/crates/movy-fuzz/src/oracles/sui/precision_loss.rs b/crates/movy-fuzz/src/oracles/sui/precision_loss.rs index a409d7f..15fa85c 100644 --- a/crates/movy-fuzz/src/oracles/sui/precision_loss.rs +++ b/crates/movy-fuzz/src/oracles/sui/precision_loss.rs @@ -1,10 +1,10 @@ -use move_trace_format::{format::TraceEvent}; +use move_trace_format::format::TraceEvent; use serde_json::json; use movy_replay::tracer::{ concolic::{ConcolicState, SymbolValue}, - trace::{TraceState}, oracle::SuiGeneralOracle, + trace::TraceState, }; use movy_types::{error::MovyError, input::MoveSequence, oracle::OracleFinding}; use sui_types::effects::TransactionEffects; @@ -32,7 +32,7 @@ impl SuiGeneralOracle for PrecisionLossOracle { _state: &mut S, ) -> Result, MovyError> { match event { - TraceEvent::BeforeInstruction { + TraceEvent::Instruction { pc, instruction, .. } => { let loss = match instruction { diff --git a/crates/movy-fuzz/src/oracles/sui/type_conversion.rs b/crates/movy-fuzz/src/oracles/sui/type_conversion.rs index 5dc88a7..507fac8 100644 --- a/crates/movy-fuzz/src/oracles/sui/type_conversion.rs +++ b/crates/movy-fuzz/src/oracles/sui/type_conversion.rs @@ -1,11 +1,11 @@ use move_binary_format::file_format::Bytecode; -use move_trace_format::{format::TraceEvent}; +use move_trace_format::format::TraceEvent; use movy_types::input::MoveSequence; use movy_types::oracle::OracleFinding; use serde_json::json; use movy_replay::tracer::concolic::value_bitwidth; -use movy_replay::tracer::{concolic::ConcolicState, oracle::SuiGeneralOracle,trace::TraceState}; +use movy_replay::tracer::{concolic::ConcolicState, oracle::SuiGeneralOracle, trace::TraceState}; use movy_types::error::MovyError; use sui_types::effects::TransactionEffects; @@ -31,7 +31,7 @@ impl SuiGeneralOracle for TypeConversionOracle { _state: &mut S, ) -> Result, MovyError> { match event { - TraceEvent::BeforeInstruction { + TraceEvent::Instruction { pc, instruction, .. } => { let stack = &trace_state.operand_stack; diff --git a/crates/movy-replay/src/event.rs b/crates/movy-replay/src/event.rs index ca3bed0..85253e6 100644 --- a/crates/movy-replay/src/event.rs +++ b/crates/movy-replay/src/event.rs @@ -3,7 +3,7 @@ use std::{collections::BTreeMap, marker::PhantomData}; use move_binary_format::CompiledModule; use move_core_types::account_address::AccountAddress; use move_trace_format::{ - format::{TraceEvent, ExtraInstructionInformation}, + format::TraceEvent, interface::{Tracer, Writer}, }; use movy_types::error::MovyError; @@ -30,6 +30,13 @@ impl ModuleProvider for NoModuleProvider { pub trait TraceNotifier { fn notify_event(&mut self, event: &TraceEvent) -> Result<(), MovyError>; + fn handle_before_instruction( + &mut self, + _ctx: &TraceEvent, + _extra: Option<&InstructionExtraInformation>, + ) -> Result<(), MovyError> { + Ok(()) + } fn notify( &mut self, event: &TraceEvent, @@ -94,7 +101,11 @@ where fn current_module(&self) -> Option<(AccountAddress, String)> { self.module_stack.last().cloned() } - fn get_or_load_module(&mut self, address: AccountAddress, name: &str) -> Option<&CompiledModule> { + fn get_or_load_module( + &mut self, + address: AccountAddress, + name: &str, + ) -> Option<&CompiledModule> { let key = (address, name.to_string()); if !self.module_cache.contains_key(&key) { @@ -107,22 +118,33 @@ where } } -fn create_before_instruction( +#[derive(Debug, Clone, Eq, PartialEq)] +pub enum InstructionExtraInformation { + Pack(usize), + PackGeneric(usize), + PackVariant(usize), + PackVariantGeneric(usize), + Unpack(usize), + UnpackVariant(usize), + UnpackGeneric(usize), + UnpackVariantGeneric(usize), +} + +fn create_instruction_extra( tracer: &mut NotifierTracer, event: &TraceEvent, -) -> Option +) -> Option where N: TraceNotifier, P: ModuleProvider, -{ +{ match event { - TraceEvent::Instruction { pc, instruction, .. } => { + TraceEvent::Instruction { instruction, .. } => { use move_binary_format::file_format::Bytecode as B; use move_binary_format::file_format::StructFieldInformation; let mut extra = None; if let Some((address, name)) = tracer.current_module() { - if let Some(module) = tracer.get_or_load_module(address, &name) { match instruction { B::Unpack(sidx) => { @@ -131,19 +153,18 @@ where StructFieldInformation::Native => 0, StructFieldInformation::Declared(fields) => fields.len(), }; - extra = Some(move_trace_format::format::ExtraInstructionInformation::Unpack(field_count as usize)); + extra = Some(InstructionExtraInformation::Unpack(field_count as usize)); } B::UnpackVariant(vidx) | B::UnpackVariantImmRef(vidx) | B::UnpackVariantMutRef(vidx) => { let variant_handle = module.variant_handle_at(*vidx); - let enum_def = module.enum_def_at(variant_handle.enum_def); - let variant_def = module.variant_def_at( - variant_handle.enum_def, - variant_handle.variant, - ); + let variant_def = module + .variant_def_at(variant_handle.enum_def, variant_handle.variant); let field_count = variant_def.fields.len(); - extra = Some(move_trace_format::format::ExtraInstructionInformation::UnpackVariant(field_count as usize)); + extra = Some(InstructionExtraInformation::UnpackVariant( + field_count as usize, + )); } B::UnpackGeneric(sidx) => { let struct_inst = module.struct_instantiation_at(*sidx); @@ -152,20 +173,22 @@ where StructFieldInformation::Native => 0, StructFieldInformation::Declared(fields) => fields.len(), }; - extra = Some(move_trace_format::format::ExtraInstructionInformation::UnpackGeneric(field_count as usize)); + extra = Some(InstructionExtraInformation::UnpackGeneric( + field_count as usize, + )); } B::UnpackVariantGeneric(vidx) | B::UnpackVariantGenericImmRef(vidx) | B::UnpackVariantGenericMutRef(vidx) => { let variant_inst_handle = module.variant_instantiation_handle_at(*vidx); - let enum_inst = module.enum_instantiation_at(variant_inst_handle.enum_def); - let enum_def = module.enum_def_at(enum_inst.def); - let variant_def = module.variant_def_at( - enum_inst.def, - variant_inst_handle.variant, - ); + let enum_inst = + module.enum_instantiation_at(variant_inst_handle.enum_def); + let variant_def = + module.variant_def_at(enum_inst.def, variant_inst_handle.variant); let field_count = variant_def.fields.len(); - extra = Some(move_trace_format::format::ExtraInstructionInformation::UnpackVariantGeneric(field_count as usize)); + extra = Some(InstructionExtraInformation::UnpackVariantGeneric( + field_count as usize, + )); } B::Pack(sidx) => { let struct_def = module.struct_def_at(*sidx); @@ -173,7 +196,7 @@ where StructFieldInformation::Native => 0, StructFieldInformation::Declared(fields) => fields.len(), }; - extra = Some(move_trace_format::format::ExtraInstructionInformation::Pack(field_count as usize)); + extra = Some(InstructionExtraInformation::Pack(field_count as usize)); } B::PackGeneric(sidx) => { let struct_inst = module.struct_instantiation_at(*sidx); @@ -182,41 +205,37 @@ where StructFieldInformation::Native => 0, StructFieldInformation::Declared(fields) => fields.len(), }; - extra = Some(move_trace_format::format::ExtraInstructionInformation::PackGeneric(field_count as usize)); + extra = Some(InstructionExtraInformation::PackGeneric( + field_count as usize, + )); } B::PackVariant(vidx) => { let variant_handle = module.variant_handle_at(*vidx); - let enum_def = module.enum_def_at(variant_handle.enum_def); - let variant_def = module.variant_def_at( - variant_handle.enum_def, - variant_handle.variant, - ); + let variant_def = module + .variant_def_at(variant_handle.enum_def, variant_handle.variant); let field_count = variant_def.fields.len(); - extra = Some(move_trace_format::format::ExtraInstructionInformation::PackVariant(field_count as usize)); + extra = Some(InstructionExtraInformation::PackVariant( + field_count as usize, + )); } B::PackVariantGeneric(vidx) => { let variant_inst_handle = module.variant_instantiation_handle_at(*vidx); - let enum_inst = module.enum_instantiation_at(variant_inst_handle.enum_def); - let enum_def = module.enum_def_at(enum_inst.def); - let variant_def = module.variant_def_at( - enum_inst.def, - variant_inst_handle.variant, - ); + let enum_inst = + module.enum_instantiation_at(variant_inst_handle.enum_def); + let variant_def = + module.variant_def_at(enum_inst.def, variant_inst_handle.variant); let field_count = variant_def.fields.len(); - extra = Some(move_trace_format::format::ExtraInstructionInformation::PackVariantGeneric(field_count as usize)); + extra = Some(InstructionExtraInformation::PackVariantGeneric( + field_count as usize, + )); } _ => {} } - } else {} + } else { + } } - Some(TraceEvent::BeforeInstruction { - pc: *pc, - instruction: instruction.clone(), - extra, - type_parameters: vec![], - gas_left: 0, - }) + extra } _ => None, } @@ -236,10 +255,6 @@ where self.notifier.notify(event, _writer, _stack); match event { - TraceEvent::BeforeInstruction { .. } => { - return; - } - TraceEvent::OpenFrame { frame, gas_left: _ } => { let address = *frame.module.address(); let name = frame.module.name().to_string(); @@ -263,13 +278,16 @@ where } TraceEvent::Instruction { .. } => { - // send before instruction - if let Some(before_instruction) = create_before_instruction(self, event) { - if let Err(e) = self.notifier.notify_event(&before_instruction) { - log::error!("NotifierTracer: failed to notify BeforeInstruction: {:?}", e); - } + let extra = create_instruction_extra(self, event); + if let Err(e) = self + .notifier + .handle_before_instruction(event, extra.as_ref()) + { + log::error!( + "NotifierTracer: failed to handle before instruction: {:?}", + e + ); } - // send instruction if let Err(e) = self.notifier.notify_event(event) { log::error!("NotifierTracer: failed to notify Instruction: {:?}", e); } diff --git a/crates/movy-replay/src/tracer/concolic.rs b/crates/movy-replay/src/tracer/concolic.rs index 04f0c7a..b2ba11d 100644 --- a/crates/movy-replay/src/tracer/concolic.rs +++ b/crates/movy-replay/src/tracer/concolic.rs @@ -1,15 +1,14 @@ use std::{cmp::Ordering, collections::BTreeMap, str::FromStr}; +use crate::event::InstructionExtraInformation; +use crate::tracer::trace::TraceState; use log::{trace, warn}; use move_binary_format::file_format::Bytecode; use move_core_types::{language_storage::TypeTag, u256::U256}; use move_trace_format::{ - format::{Effect, ExtraInstructionInformation, TraceEvent, TraceValue, TypeTagWithRefs}, + format::{Effect, TraceEvent, TraceValue, TypeTagWithRefs}, value::SerializableMoveValue, }; -use crate::tracer::{ - trace::TraceState -}; use z3::ast::{Ast, Bool, Int}; #[derive(Clone, Debug, PartialEq, Eq)] @@ -34,6 +33,7 @@ pub struct ConcolicState { pub stack: Vec, pub locals: Vec>, pub args: Vec>, + pub pending_instruction_extra: Option, pub disable: bool, } @@ -228,11 +228,25 @@ pub fn int_bvxor_const(x: &Int, mask: U256, bits: u32) -> Int { } impl ConcolicState { + pub fn handle_before_instruction( + &mut self, + ctx: &TraceEvent, + extra: Option<&InstructionExtraInformation>, + trace_state: &TraceState, + ) -> Option { + if !matches!(ctx, TraceEvent::Instruction { .. }) { + return None; + } + self.pending_instruction_extra = extra.cloned(); + self.notify_event(ctx, trace_state) + } + pub fn new() -> Self { Self { stack: Vec::new(), locals: Vec::new(), args: Vec::new(), + pending_instruction_extra: None, disable: false, } } @@ -289,25 +303,25 @@ impl ConcolicState { } #[inline] fn process_binary_op(&mut self, stack: &[TraceValue]) -> Option<(Int, Int)> { - let (rhs, lhs) = (self.stack.pop().unwrap(), self.stack.pop().unwrap()); - let stack_len = stack.len(); - let true_lhs = &stack[stack_len - 2]; - let true_rhs = &stack[stack_len - 1]; - let (new_l, new_r) = match (lhs, rhs) { - (SymbolValue::Value(l), SymbolValue::Value(r)) => (l, r), - (SymbolValue::Value(l), SymbolValue::Unknown) => { - let new_r = Self::resolve_value(true_rhs); - (l, new_r) - } - (SymbolValue::Unknown, SymbolValue::Value(r)) => { - let new_l = Self::resolve_value(true_lhs); - (new_l, r) - } - (SymbolValue::Unknown, SymbolValue::Unknown) => { - return None; - } - }; - Some((new_l, new_r)) + let (rhs, lhs) = (self.stack.pop().unwrap(), self.stack.pop().unwrap()); + let stack_len = stack.len(); + let true_lhs = &stack[stack_len - 2]; + let true_rhs = &stack[stack_len - 1]; + let (new_l, new_r) = match (lhs, rhs) { + (SymbolValue::Value(l), SymbolValue::Value(r)) => (l, r), + (SymbolValue::Value(l), SymbolValue::Unknown) => { + let new_r = Self::resolve_value(true_rhs); + (l, new_r) + } + (SymbolValue::Unknown, SymbolValue::Value(r)) => { + let new_l = Self::resolve_value(true_lhs); + (new_l, r) + } + (SymbolValue::Unknown, SymbolValue::Unknown) => { + return None; + } + }; + Some((new_l, new_r)) } pub fn notify_event(&mut self, event: &TraceEvent, trace_state: &TraceState) -> Option { if self.disable { @@ -323,8 +337,6 @@ impl ConcolicState { self.stack.pop(); } - - match event { TraceEvent::External(v) => { trace!("External event: {:?}", v); @@ -389,30 +401,30 @@ impl ConcolicState { return_: _, gas_left: _, } => { - trace!("Close frame. Current stack: {:?}", &trace_state.operand_stack); + trace!( + "Close frame. Current stack: {:?}", + &trace_state.operand_stack + ); self.locals.pop(); } - TraceEvent::BeforeInstruction { + TraceEvent::Instruction { type_parameters: _, pc, gas_left: _, instruction, - extra, } => { + let extra = self.pending_instruction_extra.take(); if self.stack.len() != stack.len() { - warn!( - "stack: {:?}, stack from trace: {:?}, event: {:?}, disabling concolic execution", - self.stack, stack, event - ); - self.disable = true; - return None; - } + warn!( + "stack: {:?}, stack from trace: {:?}, event: {:?}, disabling concolic execution", + self.stack, stack, event + ); + self.disable = true; + return None; + } trace!( "Before instruction at pc {}: {:?}, extra: {:?}. Current stack: {:?}", - pc, - instruction, - extra, - &trace_state.operand_stack + pc, instruction, extra, &trace_state.operand_stack ); match instruction { Bytecode::Pop @@ -914,8 +926,8 @@ impl ConcolicState { } Bytecode::Pack(_) | Bytecode::PackGeneric(_) => { match extra.as_ref().unwrap() { - ExtraInstructionInformation::Pack(count) - | ExtraInstructionInformation::PackGeneric(count) => { + InstructionExtraInformation::Pack(count) + | InstructionExtraInformation::PackGeneric(count) => { for _ in 0..*count { self.stack.pop(); } @@ -927,8 +939,8 @@ impl ConcolicState { Bytecode::Unpack(_) | Bytecode::UnpackGeneric(_) => { self.stack.pop(); match extra.as_ref().unwrap() { - ExtraInstructionInformation::Unpack(count) - | ExtraInstructionInformation::UnpackGeneric(count) => { + InstructionExtraInformation::Unpack(count) + | InstructionExtraInformation::UnpackGeneric(count) => { for _ in 0..*count { self.stack.push(SymbolValue::Unknown); // represent each field as unknown } @@ -938,8 +950,8 @@ impl ConcolicState { } Bytecode::PackVariant(_) | Bytecode::PackVariantGeneric(_) => { match extra.as_ref().unwrap() { - ExtraInstructionInformation::PackVariant(count) - | ExtraInstructionInformation::PackVariantGeneric(count) => { + InstructionExtraInformation::PackVariant(count) + | InstructionExtraInformation::PackVariantGeneric(count) => { for _ in 0..*count { self.stack.pop(); } @@ -961,8 +973,8 @@ impl ConcolicState { return None; } match extra.as_ref().unwrap() { - ExtraInstructionInformation::UnpackVariant(count) - | ExtraInstructionInformation::UnpackVariantGeneric(count) => { + InstructionExtraInformation::UnpackVariant(count) + | InstructionExtraInformation::UnpackVariantGeneric(count) => { for _ in 0..*count { self.stack.push(SymbolValue::Unknown); // represent each field as unknown } diff --git a/crates/movy-replay/src/tracer/fuzz.rs b/crates/movy-replay/src/tracer/fuzz.rs index 8ddea22..392b306 100644 --- a/crates/movy-replay/src/tracer/fuzz.rs +++ b/crates/movy-replay/src/tracer/fuzz.rs @@ -11,11 +11,14 @@ use move_trace_format::{ }; use movy_types::{error::MovyError, input::FunctionIdent, oracle::OracleFinding}; -use crate::tracer::{ - concolic::ConcolicState, - op::{CastLog, CmpLog, CmpOp, Log, Magic, ShlLog}, - oracle::SuiGeneralOracle, - trace::TraceState, +use crate::{ + event::InstructionExtraInformation, + tracer::{ + concolic::ConcolicState, + op::{CastLog, CmpLog, CmpOp, Log, Magic, ShlLog}, + oracle::SuiGeneralOracle, + trace::TraceState, + }, }; #[derive(Debug)] @@ -168,7 +171,7 @@ where Ok((lhs, rhs)) } - pub fn notify_event(&mut self, event: &TraceEvent) -> Result<(), MovyError> { + fn apply_oracle_findings(&mut self, event: &TraceEvent) -> Result<(), MovyError> { let oracle_vulns = self.oracles.event( event, &self.trace_state, @@ -182,10 +185,118 @@ where for info in oracle_vulns { self.outcome.findings.push(info); } - let constraint = self - .outcome - .concolic - .notify_event(event, &self.trace_state); + Ok(()) + } + + pub fn handle_before_instruction( + &mut self, + ctx: &TraceEvent, + extra: Option<&InstructionExtraInformation>, + ) -> Result<(), MovyError> { + let TraceEvent::Instruction { + pc, instruction, .. + } = ctx + else { + return Ok(()); + }; + + self.apply_oracle_findings(ctx)?; + let constraint = + self.outcome + .concolic + .handle_before_instruction(ctx, extra, &self.trace_state); + + self.coverage.may_do_coverage(*pc); + match instruction { + Bytecode::BrFalse(_) + | Bytecode::BrTrue(_) + | Bytecode::Branch(_) + | Bytecode::VariantSwitch(_) => { + self.coverage.will_branch(); + } + Bytecode::Lt + | Bytecode::Le + | Bytecode::Ge + | Bytecode::Gt + | Bytecode::Neq + | Bytecode::Eq => match Self::bin_ops(&self.trace_state.operand_stack) { + Ok((lhs, rhs)) => { + if let Some(current_function) = self.current_functions.first() { + let op = CmpOp::try_from(instruction)?; + self.outcome + .logs + .entry(current_function.clone()) + .or_default() + .push(Log::CmpLog(CmpLog { + lhs, + rhs, + op, + constraint, + })); + } else { + warn!("Fail to track cmplog because of no current function") + } + } + Err(e) => { + if !matches!(instruction, Bytecode::Eq) && !matches!(instruction, Bytecode::Neq) + { + warn!("Can not track cmplog due to {}", e); + } + } + }, + Bytecode::Shl => match Self::bin_ops(&self.trace_state.operand_stack) { + Ok((lhs, rhs)) => { + if let Some(current_function) = self.current_functions.first() { + self.outcome + .logs + .entry(current_function.clone()) + .or_default() + .push(Log::ShlLog(ShlLog { + lhs, + rhs, + constraint, + })); + } else { + warn!("Fail to track cmplog because of no current function") + } + } + Err(e) => { + if !matches!(instruction, Bytecode::Eq) && !matches!(instruction, Bytecode::Neq) + { + warn!("Can not track cmplog due to {}", e); + } + } + }, + Bytecode::CastU8 + | Bytecode::CastU16 + | Bytecode::CastU32 + | Bytecode::CastU64 + | Bytecode::CastU128 => { + if let Some(lhs) = self.trace_state.operand_stack.last() { + let lhs: Magic = Magic::try_from(lhs)?; + if let Some(current_function) = self.current_functions.first() { + self.outcome + .logs + .entry(current_function.clone()) + .or_default() + .push(Log::CastLog(CastLog { lhs, constraint })); + } else { + warn!("Fail to track castlog because of no current function") + } + } else { + warn!("Can not track castlog due to stack empty"); + } + } + _ => {} + } + Ok(()) + } + + pub fn notify_event(&mut self, event: &TraceEvent) -> Result<(), MovyError> { + if !matches!(event, TraceEvent::Instruction { .. }) { + self.apply_oracle_findings(event)?; + let _ = self.outcome.concolic.notify_event(event, &self.trace_state); + } trace!("Tracing event: {:?}", event); match event { TraceEvent::OpenFrame { frame, gas_left: _ } => { @@ -211,107 +322,6 @@ where self.coverage.call_end_package(); self.current_functions.pop(); } - TraceEvent::BeforeInstruction { - type_parameters: _, - pc, - gas_left: _, - instruction, - extra: _, - } => { - // if let Some(metrics) = self.state.eval_metrics_mut() { - // if let Some(current) = self.current_functions.last() { - // metrics.on_pc(¤t.0, ¤t.1, *pc); - // } else { - // warn!("no current function when before instruction at {}", pc); - // } - // } - self.coverage.may_do_coverage(*pc); - match instruction { - Bytecode::BrFalse(_) - | Bytecode::BrTrue(_) - | Bytecode::Branch(_) - | Bytecode::VariantSwitch(_) => { - self.coverage.will_branch(); - } - Bytecode::Lt - | Bytecode::Le - | Bytecode::Ge - | Bytecode::Gt - | Bytecode::Neq - | Bytecode::Eq => match Self::bin_ops(&self.trace_state.operand_stack) { - Ok((lhs, rhs)) => { - if let Some(current_function) = self.current_functions.first() { - let op = CmpOp::try_from(instruction)?; - self.outcome - .logs - .entry(current_function.clone()) - .or_default() - .push(Log::CmpLog(CmpLog { - lhs, - rhs, - op, - constraint, - })); - } else { - warn!("Fail to track cmplog because of no current function") - } - } - Err(e) => { - if !matches!(instruction, Bytecode::Eq) - && !matches!(instruction, Bytecode::Neq) - { - warn!("Can not track cmplog due to {}", e); - } - } - }, - Bytecode::Shl => match Self::bin_ops(&self.trace_state.operand_stack) { - Ok((lhs, rhs)) => { - if let Some(current_function) = self.current_functions.first() { - self.outcome - .logs - .entry(current_function.clone()) - .or_default() - .push(Log::ShlLog(ShlLog { - lhs, - rhs, - constraint, - })); - } else { - warn!("Fail to track cmplog because of no current function") - } - } - Err(e) => { - if !matches!(instruction, Bytecode::Eq) - && !matches!(instruction, Bytecode::Neq) - { - warn!("Can not track cmplog due to {}", e); - } - } - }, - Bytecode::CastU8 - | Bytecode::CastU16 - | Bytecode::CastU32 - | Bytecode::CastU64 - | Bytecode::CastU128 => { - if let Some(lhs) = self.trace_state.operand_stack.last() { - let lhs: Magic = Magic::try_from(lhs)?; - if let Some(current_function) = self.current_functions.first() { - self.outcome - .logs - .entry(current_function.clone()) - .or_default() - .push(Log::CastLog(CastLog { lhs, constraint })); - } else { - warn!("Fail to track castlog because of no current function") - } - } else { - warn!("Can not track castlog due to stack empty"); - } - } - - _ => {} - } - } TraceEvent::Effect(e) => { if let Effect::ExecutionError(e) = e.as_ref() && e.contains("!! TRACING ERROR !!") @@ -326,7 +336,6 @@ where } } - impl<'a, 's, S, O, T, OT> crate::event::TraceNotifier for SuiFuzzTracer<'a, 's, S, O, T, OT> where O: SuiGeneralOracle, @@ -343,4 +352,11 @@ where fn notify_event(&mut self, event: &TraceEvent) -> Result<(), MovyError> { SuiFuzzTracer::notify_event(self, event) } + fn handle_before_instruction( + &mut self, + ctx: &TraceEvent, + extra: Option<&InstructionExtraInformation>, + ) -> Result<(), MovyError> { + SuiFuzzTracer::handle_before_instruction(self, ctx, extra) + } } diff --git a/crates/movy-replay/src/tracer/trace.rs b/crates/movy-replay/src/tracer/trace.rs index 9da10e7..723af29 100644 --- a/crates/movy-replay/src/tracer/trace.rs +++ b/crates/movy-replay/src/tracer/trace.rs @@ -10,13 +10,13 @@ //! //! The memory tracer is useful for debugging, and as an example of how to build up this //! state for more advanced analysis and also using the custom tracing trait. -use move_vm_stack::Stack; +use core::fmt; use move_trace_format::{ format::{DataLoad, Effect, Location, Read, TraceEvent, TraceIndex, TraceValue, Write}, interface::{Tracer, Writer}, value::SerializableMoveValue, }; -use core::fmt; +use move_vm_stack::Stack; use std::collections::BTreeMap; #[derive(Debug, Clone)] @@ -128,7 +128,7 @@ impl TraceState { } } // Instructions - TraceEvent::Instruction { .. } | TraceEvent::BeforeInstruction { .. } => (), + TraceEvent::Instruction { .. } => (), } } @@ -155,6 +155,5 @@ impl Default for TraceState { impl Tracer for TraceState { fn notify(&mut self, event: &TraceEvent, mut write: &mut Writer<'_>, _stack: Option<&Stack>) { self.apply_event(event); - // no emit for } } From de4d0ff22a69a551cef36a49e34028f28e0c36c8 Mon Sep 17 00:00:00 2001 From: libr Date: Thu, 12 Feb 2026 10:15:31 +0800 Subject: [PATCH 07/13] chore: merge trait --- crates/movy-replay/src/event.rs | 8 +------- crates/movy-replay/src/tracer/fuzz.rs | 10 +++++++++- crates/movy-replay/src/tracer/trace.rs | 2 +- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/crates/movy-replay/src/event.rs b/crates/movy-replay/src/event.rs index 85253e6..cf1f2b4 100644 --- a/crates/movy-replay/src/event.rs +++ b/crates/movy-replay/src/event.rs @@ -28,7 +28,7 @@ impl ModuleProvider for NoModuleProvider { } } -pub trait TraceNotifier { +pub trait TraceNotifier: Tracer { fn notify_event(&mut self, event: &TraceEvent) -> Result<(), MovyError>; fn handle_before_instruction( &mut self, @@ -37,12 +37,6 @@ pub trait TraceNotifier { ) -> Result<(), MovyError> { Ok(()) } - fn notify( - &mut self, - event: &TraceEvent, - writer: &mut Writer<'_>, - _stack: Option<&move_vm_stack::Stack>, - ); } pub struct NotifierTracer diff --git a/crates/movy-replay/src/tracer/fuzz.rs b/crates/movy-replay/src/tracer/fuzz.rs index 392b306..73fbf2b 100644 --- a/crates/movy-replay/src/tracer/fuzz.rs +++ b/crates/movy-replay/src/tracer/fuzz.rs @@ -336,7 +336,7 @@ where } } -impl<'a, 's, S, O, T, OT> crate::event::TraceNotifier for SuiFuzzTracer<'a, 's, S, O, T, OT> +impl<'a, 's, S, O, T, OT> Tracer for SuiFuzzTracer<'a, 's, S, O, T, OT> where O: SuiGeneralOracle, OT: MatchNameRef + MatchName, @@ -349,9 +349,17 @@ where ) { self.trace_state.notify(event, writer, None); } +} + +impl<'a, 's, S, O, T, OT> crate::event::TraceNotifier for SuiFuzzTracer<'a, 's, S, O, T, OT> +where + O: SuiGeneralOracle, + OT: MatchNameRef + MatchName, +{ fn notify_event(&mut self, event: &TraceEvent) -> Result<(), MovyError> { SuiFuzzTracer::notify_event(self, event) } + fn handle_before_instruction( &mut self, ctx: &TraceEvent, diff --git a/crates/movy-replay/src/tracer/trace.rs b/crates/movy-replay/src/tracer/trace.rs index 723af29..a8ebc47 100644 --- a/crates/movy-replay/src/tracer/trace.rs +++ b/crates/movy-replay/src/tracer/trace.rs @@ -128,7 +128,7 @@ impl TraceState { } } // Instructions - TraceEvent::Instruction { .. } => (), + _ => () } } From 7189759de5216d0e87e740b8f729940a6a4952f7 Mon Sep 17 00:00:00 2001 From: libr Date: Thu, 12 Feb 2026 10:20:07 +0800 Subject: [PATCH 08/13] chore: deps fix --- Cargo.lock | 664 +++++++++++++++++++---------------------------------- Cargo.toml | 50 ++-- 2 files changed, 259 insertions(+), 455 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1db4b4b..5d13d7c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2670,14 +2670,6 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d" -[[package]] -name = "enum-compat-util" -version = "0.1.0" -source = "git+https://github.com/MystenLabs/sui?branch=main#7cee6921a0b6eeef7c4f59b233077cea7cad3918" -dependencies = [ - "serde_yaml", -] - [[package]] name = "enum-compat-util" version = "0.1.0" @@ -5006,11 +4998,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "move-abstract-interpreter" -version = "0.1.0" -source = "git+https://github.com/MystenLabs/sui?branch=main#7cee6921a0b6eeef7c4f59b233077cea7cad3918" - [[package]] name = "move-abstract-interpreter" version = "0.1.0" @@ -5021,56 +5008,30 @@ name = "move-abstract-interpreter-v2" version = "0.1.0" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" dependencies = [ - "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-binary-format", ] -[[package]] -name = "move-abstract-stack" -version = "0.0.1" -source = "git+https://github.com/MystenLabs/sui?branch=main#7cee6921a0b6eeef7c4f59b233077cea7cad3918" - [[package]] name = "move-abstract-stack" version = "0.0.1" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" -[[package]] -name = "move-binary-format" -version = "0.0.3" -source = "git+https://github.com/MystenLabs/sui?branch=main#7cee6921a0b6eeef7c4f59b233077cea7cad3918" -dependencies = [ - "anyhow", - "enum-compat-util 0.1.0 (git+https://github.com/MystenLabs/sui?branch=main)", - "indexmap 2.12.1", - "move-abstract-interpreter 0.1.0 (git+https://github.com/MystenLabs/sui?branch=main)", - "move-core-types 0.0.4 (git+https://github.com/MystenLabs/sui?branch=main)", - "move-proc-macros 0.1.0 (git+https://github.com/MystenLabs/sui?branch=main)", - "ref-cast", - "serde", - "variant_count", -] - [[package]] name = "move-binary-format" version = "0.0.3" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" dependencies = [ "anyhow", - "enum-compat-util 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "enum-compat-util", "indexmap 2.12.1", - "move-abstract-interpreter 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-proc-macros 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-abstract-interpreter", + "move-core-types", + "move-proc-macros", "ref-cast", "serde", "variant_count", ] -[[package]] -name = "move-borrow-graph" -version = "0.0.1" -source = "git+https://github.com/MystenLabs/sui?branch=main#7cee6921a0b6eeef7c4f59b233077cea7cad3918" - [[package]] name = "move-borrow-graph" version = "0.0.1" @@ -5083,9 +5044,9 @@ source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1 dependencies = [ "anyhow", "bcs", - "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-command-line-common 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-binary-format", + "move-command-line-common", + "move-core-types", "move-ir-types", "move-symbol-pool", "serde", @@ -5099,62 +5060,36 @@ source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1 dependencies = [ "anyhow", "indexmap 2.12.1", - "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-binary-format", + "move-core-types", "petgraph 0.8.3", "serde-reflection", ] -[[package]] -name = "move-bytecode-verifier" -version = "0.1.0" -source = "git+https://github.com/MystenLabs/sui?branch=main#7cee6921a0b6eeef7c4f59b233077cea7cad3918" -dependencies = [ - "move-abstract-interpreter 0.1.0 (git+https://github.com/MystenLabs/sui?branch=main)", - "move-abstract-stack 0.0.1 (git+https://github.com/MystenLabs/sui?branch=main)", - "move-binary-format 0.0.3 (git+https://github.com/MystenLabs/sui?branch=main)", - "move-borrow-graph 0.0.1 (git+https://github.com/MystenLabs/sui?branch=main)", - "move-bytecode-verifier-meter 0.1.0 (git+https://github.com/MystenLabs/sui?branch=main)", - "move-core-types 0.0.4 (git+https://github.com/MystenLabs/sui?branch=main)", - "move-regex-borrow-graph 0.0.1 (git+https://github.com/MystenLabs/sui?branch=main)", - "move-vm-config 0.1.0 (git+https://github.com/MystenLabs/sui?branch=main)", - "petgraph 0.8.3", -] - [[package]] name = "move-bytecode-verifier" version = "0.1.0" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" dependencies = [ - "move-abstract-interpreter 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-abstract-stack 0.0.1 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-borrow-graph 0.0.1 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-bytecode-verifier-meter 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-regex-borrow-graph 0.0.1 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-vm-config 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-abstract-interpreter", + "move-abstract-stack", + "move-binary-format", + "move-borrow-graph", + "move-bytecode-verifier-meter", + "move-core-types", + "move-regex-borrow-graph", + "move-vm-config", "petgraph 0.8.3", ] -[[package]] -name = "move-bytecode-verifier-meter" -version = "0.1.0" -source = "git+https://github.com/MystenLabs/sui?branch=main#7cee6921a0b6eeef7c4f59b233077cea7cad3918" -dependencies = [ - "move-binary-format 0.0.3 (git+https://github.com/MystenLabs/sui?branch=main)", - "move-core-types 0.0.4 (git+https://github.com/MystenLabs/sui?branch=main)", - "move-vm-config 0.1.0 (git+https://github.com/MystenLabs/sui?branch=main)", -] - [[package]] name = "move-bytecode-verifier-meter" version = "0.1.0" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" dependencies = [ - "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-vm-config 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-binary-format", + "move-core-types", + "move-vm-config", ] [[package]] @@ -5163,12 +5098,12 @@ version = "0.1.0" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" dependencies = [ "move-abstract-interpreter-v2", - "move-abstract-stack 0.0.1 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-borrow-graph 0.0.1 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-bytecode-verifier-meter 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-vm-config 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-abstract-stack", + "move-binary-format", + "move-borrow-graph", + "move-bytecode-verifier-meter", + "move-core-types", + "move-vm-config", "petgraph 0.8.3", ] @@ -5178,12 +5113,12 @@ version = "0.1.0" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" dependencies = [ "move-abstract-interpreter-v2", - "move-abstract-stack 0.0.1 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-borrow-graph 0.0.1 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-bytecode-verifier-meter 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-vm-config 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-abstract-stack", + "move-binary-format", + "move-borrow-graph", + "move-bytecode-verifier-meter", + "move-core-types", + "move-vm-config", "petgraph 0.8.3", ] @@ -5193,35 +5128,15 @@ version = "0.1.0" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" dependencies = [ "move-abstract-interpreter-v2", - "move-abstract-stack 0.0.1 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-borrow-graph 0.0.1 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-bytecode-verifier-meter 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-vm-config 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-abstract-stack", + "move-binary-format", + "move-borrow-graph", + "move-bytecode-verifier-meter", + "move-core-types", + "move-vm-config", "petgraph 0.8.3", ] -[[package]] -name = "move-command-line-common" -version = "0.1.0" -source = "git+https://github.com/MystenLabs/sui?branch=main#7cee6921a0b6eeef7c4f59b233077cea7cad3918" -dependencies = [ - "anyhow", - "bcs", - "colored", - "dirs-next", - "hex", - "insta", - "move-binary-format 0.0.3 (git+https://github.com/MystenLabs/sui?branch=main)", - "move-core-types 0.0.4 (git+https://github.com/MystenLabs/sui?branch=main)", - "packed_struct", - "serde", - "sha2 0.9.9", - "vfs", - "walkdir", -] - [[package]] name = "move-command-line-common" version = "0.1.0" @@ -5233,8 +5148,8 @@ dependencies = [ "dirs-next", "hex", "insta", - "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-binary-format", + "move-core-types", "once_cell", "packed_struct", "serde", @@ -5256,16 +5171,16 @@ dependencies = [ "hex", "insta", "lsp-types 0.95.1", - "move-abstract-interpreter 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-borrow-graph 0.0.1 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-abstract-interpreter", + "move-binary-format", + "move-borrow-graph", "move-bytecode-source-map", - "move-bytecode-verifier 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-command-line-common 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-bytecode-verifier", + "move-command-line-common", + "move-core-types", "move-ir-to-bytecode", "move-ir-types", - "move-proc-macros 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-proc-macros", "move-symbol-pool", "once_cell", "petgraph 0.8.3", @@ -5279,30 +5194,6 @@ dependencies = [ "vfs", ] -[[package]] -name = "move-core-types" -version = "0.0.4" -source = "git+https://github.com/MystenLabs/sui?branch=main#7cee6921a0b6eeef7c4f59b233077cea7cad3918" -dependencies = [ - "anyhow", - "bcs", - "enum-compat-util 0.1.0 (git+https://github.com/MystenLabs/sui?branch=main)", - "ethnum", - "hex", - "indexmap 2.12.1", - "leb128", - "move-proc-macros 0.1.0 (git+https://github.com/MystenLabs/sui?branch=main)", - "num", - "primitive-types 0.10.1", - "rand 0.8.5", - "ref-cast", - "serde", - "serde_bytes", - "serde_with", - "thiserror 1.0.69", - "uint", -] - [[package]] name = "move-core-types" version = "0.0.4" @@ -5310,12 +5201,12 @@ source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1 dependencies = [ "anyhow", "bcs", - "enum-compat-util 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "enum-compat-util", "ethnum", "hex", "indexmap 2.12.1", "leb128", - "move-proc-macros 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-proc-macros", "num", "once_cell", "primitive-types 0.10.1", @@ -5340,15 +5231,15 @@ dependencies = [ "colored", "indexmap 2.12.1", "lcov", - "move-abstract-interpreter 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-abstract-interpreter", + "move-binary-format", "move-bytecode-source-map", - "move-bytecode-verifier 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-command-line-common 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-bytecode-verifier", + "move-command-line-common", "move-compiler", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types", "move-ir-types", - "move-trace-format 0.0.1 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-trace-format", "petgraph 0.8.3", "serde", ] @@ -5363,12 +5254,12 @@ dependencies = [ "clap", "hex", "inline_colorization", - "move-abstract-interpreter 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-abstract-interpreter", + "move-binary-format", "move-bytecode-source-map", - "move-command-line-common 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-command-line-common", "move-compiler", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types", "move-coverage", "move-ir-types", "move-symbol-pool", @@ -5385,9 +5276,9 @@ dependencies = [ "codespan-reporting", "itertools 0.10.5", "log", - "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-binary-format", "move-compiler", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types", "move-ir-types", "move-model-2", "move-symbol-pool", @@ -5405,10 +5296,10 @@ dependencies = [ "anyhow", "codespan-reporting", "log", - "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-binary-format", "move-bytecode-source-map", - "move-command-line-common 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-command-line-common", + "move-core-types", "move-ir-to-bytecode-syntax", "move-ir-types", "move-symbol-pool", @@ -5422,8 +5313,8 @@ source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1 dependencies = [ "anyhow", "hex", - "move-command-line-common 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-command-line-common", + "move-core-types", "move-ir-types", "move-symbol-pool", ] @@ -5434,8 +5325,8 @@ version = "0.1.0" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" dependencies = [ "hex", - "move-command-line-common 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-command-line-common", + "move-core-types", "move-symbol-pool", "once_cell", "serde", @@ -5451,11 +5342,11 @@ dependencies = [ "codespan-reporting", "itertools 0.10.5", "log", - "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-binary-format", "move-bytecode-source-map", - "move-command-line-common 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-command-line-common", "move-compiler", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types", "move-disassembler", "move-ir-types", "move-symbol-pool", @@ -5475,11 +5366,11 @@ dependencies = [ "codespan", "codespan-reporting", "indexmap 2.12.1", - "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-binary-format", "move-bytecode-source-map", - "move-command-line-common 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-command-line-common", "move-compiler", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types", "move-disassembler", "move-ir-types", "move-symbol-pool", @@ -5499,12 +5390,12 @@ dependencies = [ "colored", "dunce", "itertools 0.10.5", - "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-binary-format", "move-bytecode-source-map", "move-bytecode-utils", - "move-command-line-common 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-command-line-common", "move-compiler", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types", "move-disassembler", "move-docgen", "move-model-2", @@ -5525,48 +5416,24 @@ dependencies = [ "whoami", ] -[[package]] -name = "move-proc-macros" -version = "0.1.0" -source = "git+https://github.com/MystenLabs/sui?branch=main#7cee6921a0b6eeef7c4f59b233077cea7cad3918" -dependencies = [ - "enum-compat-util 0.1.0 (git+https://github.com/MystenLabs/sui?branch=main)", - "quote", - "syn 2.0.111", -] - [[package]] name = "move-proc-macros" version = "0.1.0" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" dependencies = [ - "enum-compat-util 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "enum-compat-util", "quote", "syn 2.0.111", ] -[[package]] -name = "move-regex-borrow-graph" -version = "0.0.1" -source = "git+https://github.com/MystenLabs/sui?branch=main#7cee6921a0b6eeef7c4f59b233077cea7cad3918" -dependencies = [ - "insta", - "itertools 0.10.5", - "move-binary-format 0.0.3 (git+https://github.com/MystenLabs/sui?branch=main)", - "move-command-line-common 0.1.0 (git+https://github.com/MystenLabs/sui?branch=main)", - "move-core-types 0.0.4 (git+https://github.com/MystenLabs/sui?branch=main)", - "petgraph 0.8.3", - "proptest", -] - [[package]] name = "move-regex-borrow-graph" version = "0.0.1" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" dependencies = [ "itertools 0.10.5", - "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-binary-format", + "move-core-types", "petgraph 0.8.3", ] @@ -5581,10 +5448,10 @@ dependencies = [ "im", "itertools 0.10.5", "log", - "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-command-line-common 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-binary-format", + "move-command-line-common", "move-compiler", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types", "move-model", "num", "petgraph 0.8.3", @@ -5597,10 +5464,10 @@ version = "0.1.1" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" dependencies = [ "hex", - "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-vm-runtime 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-vm-types 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-binary-format", + "move-core-types", + "move-vm-runtime", + "move-vm-types", "sha2 0.9.9", "sha3 0.9.1", "smallvec", @@ -5612,8 +5479,8 @@ version = "0.1.1" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" dependencies = [ "hex", - "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-binary-format", + "move-core-types", "move-vm-runtime-v0", "move-vm-types-v0", "sha2 0.9.9", @@ -5627,8 +5494,8 @@ version = "0.1.1" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" dependencies = [ "hex", - "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-binary-format", + "move-core-types", "move-vm-runtime-v1", "move-vm-types-v1", "sha2 0.9.9", @@ -5642,8 +5509,8 @@ version = "0.1.1" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" dependencies = [ "hex", - "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-binary-format", + "move-core-types", "move-vm-runtime-v2", "move-vm-types-v2", "sha2 0.9.9", @@ -5661,90 +5528,40 @@ dependencies = [ "serde", ] -[[package]] -name = "move-trace-format" -version = "0.0.1" -source = "git+https://github.com/MystenLabs/sui?branch=main#7cee6921a0b6eeef7c4f59b233077cea7cad3918" -dependencies = [ - "move-binary-format 0.0.3 (git+https://github.com/MystenLabs/sui?branch=main)", - "move-core-types 0.0.4 (git+https://github.com/MystenLabs/sui?branch=main)", - "serde", - "serde_json", - "zstd", -] - [[package]] name = "move-trace-format" version = "0.0.1" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" dependencies = [ - "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-binary-format", + "move-core-types", "move-vm-stack", "serde", "serde_json", "zstd", ] -[[package]] -name = "move-vm-config" -version = "0.1.0" -source = "git+https://github.com/MystenLabs/sui?branch=main#7cee6921a0b6eeef7c4f59b233077cea7cad3918" -dependencies = [ - "move-binary-format 0.0.3 (git+https://github.com/MystenLabs/sui?branch=main)", -] - [[package]] name = "move-vm-config" version = "0.1.0" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" dependencies = [ - "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-binary-format", "once_cell", ] -[[package]] -name = "move-vm-profiler" -version = "0.1.0" -source = "git+https://github.com/MystenLabs/sui?branch=main#7cee6921a0b6eeef7c4f59b233077cea7cad3918" -dependencies = [ - "move-trace-format 0.0.1 (git+https://github.com/MystenLabs/sui?branch=main)", - "move-vm-config 0.1.0 (git+https://github.com/MystenLabs/sui?branch=main)", - "serde", - "serde_json", - "tracing", -] - [[package]] name = "move-vm-profiler" version = "0.1.0" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" dependencies = [ - "move-vm-config 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-vm-config", "once_cell", "serde", "serde_json", "tracing", ] -[[package]] -name = "move-vm-runtime" -version = "0.1.0" -source = "git+https://github.com/MystenLabs/sui?branch=main#7cee6921a0b6eeef7c4f59b233077cea7cad3918" -dependencies = [ - "better_any", - "fail", - "move-binary-format 0.0.3 (git+https://github.com/MystenLabs/sui?branch=main)", - "move-bytecode-verifier 0.1.0 (git+https://github.com/MystenLabs/sui?branch=main)", - "move-core-types 0.0.4 (git+https://github.com/MystenLabs/sui?branch=main)", - "move-trace-format 0.0.1 (git+https://github.com/MystenLabs/sui?branch=main)", - "move-vm-config 0.1.0 (git+https://github.com/MystenLabs/sui?branch=main)", - "move-vm-types 0.1.0 (git+https://github.com/MystenLabs/sui?branch=main)", - "parking_lot 0.11.2", - "smallvec", - "tracing", -] - [[package]] name = "move-vm-runtime" version = "0.1.0" @@ -5752,13 +5569,13 @@ source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1 dependencies = [ "better_any", "fail", - "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-bytecode-verifier 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-trace-format 0.0.1 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-vm-config 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-binary-format", + "move-bytecode-verifier", + "move-core-types", + "move-trace-format", + "move-vm-config", "move-vm-stack", - "move-vm-types 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-vm-types", "once_cell", "parking_lot 0.11.2", "smallvec", @@ -5772,10 +5589,10 @@ source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1 dependencies = [ "better_any", "fail", - "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-binary-format", "move-bytecode-verifier-v0", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-vm-config 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types", + "move-vm-config", "move-vm-types-v0", "once_cell", "parking_lot 0.11.2", @@ -5790,10 +5607,10 @@ source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1 dependencies = [ "better_any", "fail", - "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-binary-format", "move-bytecode-verifier-v1", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-vm-config 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types", + "move-vm-config", "move-vm-types-v1", "once_cell", "parking_lot 0.11.2", @@ -5808,10 +5625,10 @@ source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1 dependencies = [ "better_any", "fail", - "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-binary-format", "move-bytecode-verifier-v2", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-vm-config 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types", + "move-vm-config", "move-vm-types-v2", "once_cell", "parking_lot 0.11.2", @@ -5824,8 +5641,8 @@ name = "move-vm-stack" version = "0.1.0" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" dependencies = [ - "move-bytecode-verifier 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-vm-types 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-bytecode-verifier", + "move-vm-types", ] [[package]] @@ -5834,36 +5651,23 @@ version = "0.1.0" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" dependencies = [ "anyhow", - "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-vm-profiler 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-vm-types 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-binary-format", + "move-core-types", + "move-vm-profiler", + "move-vm-types", "once_cell", "serde", ] -[[package]] -name = "move-vm-types" -version = "0.1.0" -source = "git+https://github.com/MystenLabs/sui?branch=main#7cee6921a0b6eeef7c4f59b233077cea7cad3918" -dependencies = [ - "bcs", - "move-binary-format 0.0.3 (git+https://github.com/MystenLabs/sui?branch=main)", - "move-core-types 0.0.4 (git+https://github.com/MystenLabs/sui?branch=main)", - "move-vm-profiler 0.1.0 (git+https://github.com/MystenLabs/sui?branch=main)", - "serde", - "smallvec", -] - [[package]] name = "move-vm-types" version = "0.1.0" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" dependencies = [ "bcs", - "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-vm-profiler 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-binary-format", + "move-core-types", + "move-vm-profiler", "serde", "smallvec", ] @@ -5874,8 +5678,8 @@ version = "0.1.0" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" dependencies = [ "bcs", - "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-binary-format", + "move-core-types", "serde", "smallvec", ] @@ -5886,8 +5690,8 @@ version = "0.1.0" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" dependencies = [ "bcs", - "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-binary-format", + "move-core-types", "serde", "smallvec", ] @@ -5898,8 +5702,8 @@ version = "0.1.0" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" dependencies = [ "bcs", - "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-binary-format", + "move-core-types", "serde", "smallvec", ] @@ -5957,13 +5761,13 @@ dependencies = [ "libafl", "libafl_bolts", "log", - "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-binary-format", + "move-core-types", "move-model", "move-stackless-bytecode", - "move-trace-format 0.0.1 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-trace-format", "move-vm-stack", - "move-vm-types 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-vm-types", "movy-analysis", "movy-replay", "movy-static-analysis", @@ -6002,12 +5806,12 @@ dependencies = [ "libafl_bolts", "log", "mdbx-derive", - "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-trace-format 0.0.1 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-vm-runtime 0.1.0 (git+https://github.com/MystenLabs/sui?branch=main)", + "move-binary-format", + "move-core-types", + "move-trace-format", + "move-vm-runtime", "move-vm-stack", - "move-vm-types 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-vm-types", "movy-analysis", "movy-sui", "movy-types", @@ -6035,8 +5839,8 @@ dependencies = [ "color-eyre", "itertools 0.14.0", "log", - "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-binary-format", + "move-core-types", "move-model", "move-stackless-bytecode", "movy-replay", @@ -6060,11 +5864,11 @@ dependencies = [ "itertools 0.14.0", "log", "mdbx-derive", - "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-binary-format", "move-compiler", "move-package", - "move-trace-format 0.0.1 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-vm-runtime 0.1.0 (git+https://github.com/MystenLabs/sui?branch=main)", + "move-trace-format", + "move-vm-runtime", "movy-types", "prometheus", "rand 0.9.2", @@ -6102,8 +5906,8 @@ dependencies = [ "libafl", "log", "mdbx-derive", - "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-binary-format", + "move-core-types", "object_store", "reqwest", "serde", @@ -9331,17 +9135,17 @@ dependencies = [ "bcs", "indexmap 2.12.1", "leb128", - "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-binary-format", "move-bytecode-utils", - "move-bytecode-verifier 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-bytecode-verifier-meter 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-regex-borrow-graph 0.0.1 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-trace-format 0.0.1 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-vm-config 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-vm-profiler 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-vm-runtime 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-vm-types 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-bytecode-verifier", + "move-bytecode-verifier-meter", + "move-core-types", + "move-regex-borrow-graph", + "move-trace-format", + "move-vm-config", + "move-vm-profiler", + "move-vm-runtime", + "move-vm-types", "mysten-common", "mysten-metrics", "parking_lot 0.12.5", @@ -9363,13 +9167,13 @@ dependencies = [ "anyhow", "bcs", "leb128", - "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-binary-format", "move-bytecode-utils", - "move-bytecode-verifier-meter 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-bytecode-verifier-meter", "move-bytecode-verifier-v0", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-vm-config 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-vm-profiler 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types", + "move-vm-config", + "move-vm-profiler", "move-vm-runtime-v0", "move-vm-types-v0", "once_cell", @@ -9391,13 +9195,13 @@ dependencies = [ "anyhow", "bcs", "leb128", - "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-binary-format", "move-bytecode-utils", - "move-bytecode-verifier-meter 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-bytecode-verifier-meter", "move-bytecode-verifier-v1", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-vm-config 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-vm-profiler 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types", + "move-vm-config", + "move-vm-profiler", "move-vm-runtime-v1", "move-vm-types-v1", "parking_lot 0.12.5", @@ -9418,13 +9222,13 @@ dependencies = [ "anyhow", "bcs", "leb128", - "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-binary-format", "move-bytecode-utils", - "move-bytecode-verifier-meter 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-bytecode-verifier-meter", "move-bytecode-verifier-v2", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-vm-config 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-vm-profiler 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types", + "move-vm-config", + "move-vm-profiler", "move-vm-runtime-v2", "move-vm-types-v2", "parking_lot 0.12.5", @@ -9450,7 +9254,7 @@ dependencies = [ "csv", "dirs", "fastcrypto", - "move-vm-config 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-vm-config", "mysten-common", "nonzero_ext", "object_store", @@ -9483,21 +9287,21 @@ name = "sui-execution" version = "0.1.0" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" dependencies = [ - "move-abstract-interpreter 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-abstract-interpreter", "move-abstract-interpreter-v2", - "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-bytecode-verifier 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-bytecode-verifier-meter 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-binary-format", + "move-bytecode-verifier", + "move-bytecode-verifier-meter", "move-bytecode-verifier-v0", "move-bytecode-verifier-v1", "move-bytecode-verifier-v2", - "move-trace-format 0.0.1 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-vm-config 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-vm-runtime 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-trace-format", + "move-vm-config", + "move-vm-runtime", "move-vm-runtime-v0", "move-vm-runtime-v1", "move-vm-runtime-v2", - "move-vm-types 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-vm-types", "move-vm-types-v0", "move-vm-types-v1", "move-vm-types-v2", @@ -9523,8 +9327,8 @@ version = "0.1.0" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" dependencies = [ "bcs", - "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-binary-format", + "move-core-types", "once_cell", "serde", "sui-types", @@ -9574,9 +9378,9 @@ dependencies = [ "anyhow", "bcs", "fastcrypto", - "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-binary-format", "move-bytecode-utils", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types", "schemars 0.8.22", "serde", "serde_json", @@ -9615,10 +9419,10 @@ dependencies = [ "fastcrypto", "itertools 0.13.0", "json_to_table", - "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-binary-format", "move-bytecode-utils", - "move-command-line-common 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-command-line-common", + "move-core-types", "move-disassembler", "move-ir-types", "mysten-metrics", @@ -9680,12 +9484,12 @@ source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1 dependencies = [ "anyhow", "fastcrypto", - "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-binary-format", "move-bytecode-utils", - "move-bytecode-verifier 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-command-line-common 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-bytecode-verifier", + "move-command-line-common", "move-compiler", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types", "move-ir-types", "move-package", "move-symbol-pool", @@ -9709,11 +9513,11 @@ dependencies = [ "fastcrypto-vdf", "fastcrypto-zkp", "indexmap 2.12.1", - "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-binary-format", + "move-core-types", "move-stdlib-natives", - "move-vm-runtime 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-vm-types 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-vm-runtime", + "move-vm-types", "rand 0.8.5", "smallvec", "sui-protocol-config", @@ -9731,8 +9535,8 @@ dependencies = [ "fastcrypto", "fastcrypto-zkp", "linked-hash-map", - "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-binary-format", + "move-core-types", "move-stdlib-natives-v0", "move-vm-runtime-v0", "move-vm-types-v0", @@ -9752,8 +9556,8 @@ dependencies = [ "fastcrypto", "fastcrypto-zkp", "linked-hash-map", - "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-binary-format", + "move-core-types", "move-stdlib-natives-v1", "move-vm-runtime-v1", "move-vm-types-v1", @@ -9773,8 +9577,8 @@ dependencies = [ "fastcrypto", "fastcrypto-zkp", "indexmap 2.12.1", - "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-binary-format", + "move-core-types", "move-stdlib-natives-v2", "move-vm-runtime-v2", "move-vm-types-v2", @@ -9815,7 +9619,7 @@ version = "1.60.1" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" dependencies = [ "anyhow", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types", "move-package", "move-symbol-pool", "sui-framework-snapshot", @@ -9836,9 +9640,9 @@ dependencies = [ "bcs", "eyre", "lru 0.10.1", - "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-command-line-common 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-binary-format", + "move-command-line-common", + "move-core-types", "serde", "sui-types", "thiserror 1.0.69", @@ -9864,9 +9668,9 @@ source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1 dependencies = [ "clap", "fastcrypto", - "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-vm-config 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-binary-format", + "move-core-types", + "move-vm-config", "schemars 0.8.22", "serde", "serde-env", @@ -9921,7 +9725,7 @@ dependencies = [ "futures", "futures-core", "jsonrpsee", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types", "reqwest", "serde", "serde_json", @@ -9969,8 +9773,8 @@ dependencies = [ "async-trait", "bcs", "futures", - "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-binary-format", + "move-core-types", "sui-json", "sui-json-rpc-types", "sui-protocol-config", @@ -10005,11 +9809,11 @@ dependencies = [ "indexmap 2.12.1", "itertools 0.13.0", "lru 0.10.1", - "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-binary-format", "move-bytecode-utils", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-trace-format 0.0.1 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-vm-profiler 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types", + "move-trace-format", + "move-vm-profiler", "move-vm-test-utils", "mysten-common", "mysten-metrics", @@ -10058,13 +9862,13 @@ name = "sui-verifier-latest" version = "0.1.0" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" dependencies = [ - "move-abstract-stack 0.0.1 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-abstract-stack", + "move-binary-format", "move-bytecode-utils", - "move-bytecode-verifier 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-bytecode-verifier-meter 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-vm-config 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-bytecode-verifier", + "move-bytecode-verifier-meter", + "move-core-types", + "move-vm-config", "sui-protocol-config", "sui-types", ] @@ -10074,13 +9878,13 @@ name = "sui-verifier-v0" version = "0.1.0" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" dependencies = [ - "move-abstract-stack 0.0.1 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-abstract-stack", + "move-binary-format", "move-bytecode-utils", - "move-bytecode-verifier-meter 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-bytecode-verifier-meter", "move-bytecode-verifier-v0", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-vm-config 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types", + "move-vm-config", "sui-protocol-config", "sui-types", ] @@ -10090,13 +9894,13 @@ name = "sui-verifier-v1" version = "0.1.0" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" dependencies = [ - "move-abstract-stack 0.0.1 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-abstract-stack", + "move-binary-format", "move-bytecode-utils", - "move-bytecode-verifier-meter 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-bytecode-verifier-meter", "move-bytecode-verifier-v1", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-vm-config 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types", + "move-vm-config", "sui-types", ] @@ -10105,13 +9909,13 @@ name = "sui-verifier-v2" version = "0.1.0" source = "git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz#713a04540246ec1b21d599213da1a775b34b375b" dependencies = [ - "move-abstract-stack 0.0.1 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-binary-format 0.0.3 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-abstract-stack", + "move-binary-format", "move-bytecode-utils", - "move-bytecode-verifier-meter 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-bytecode-verifier-meter", "move-bytecode-verifier-v2", - "move-core-types 0.0.4 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", - "move-vm-config 0.1.0 (git+https://github.com/wtdcode/sui?branch=v1.60.1-fuzz)", + "move-core-types", + "move-vm-config", "sui-protocol-config", "sui-types", ] diff --git a/Cargo.toml b/Cargo.toml index 5576d62..5b39c9b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -46,7 +46,7 @@ rand_core_sui = {version = "0.6.4", package = "rand_core"} rand_core_libafl = {version = "0.9", package = "rand_core"} const-hex = "1.14.1" serde_json_any_key = "2.0.0" -pprof = { version = "0.15", features = ["frame-pointer"]} +pprof = { version = "0.15"} z3 = "0.16" z3-sys = "0.9.10" tempfile = "3" @@ -61,30 +61,30 @@ tonic = "0.14" url = "2.5.7" # Sui dependencies -move-binary-format = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"} -move-trace-format = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"} -move-package = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"} -move-compiler = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"} -move-disassembler = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"} -move-ir-types = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"} -move-core-types = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"} -move-vm-types = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"} -move-vm-stack = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"} -move-vm-runtime = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz", features = ["tracing", "testing"]} -move-model = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"} -move-stackless-bytecode = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"} -sui-move-build = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"} -sui-json-rpc-types = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"} -sui-types = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"} -sui-package-management = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"} -sui-sdk = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"} -sui-config = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"} -sui-storage = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"} -sui-snapshot = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"} -sui-core = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"} -sui-execution = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz", features = ["testing"]} -shared-crypto = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"} -# sui-adapter-v2 = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"} +move-binary-format = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} +move-trace-format = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} +move-package = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} +move-compiler = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} +move-disassembler = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} +move-ir-types = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} +move-core-types = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} +move-vm-types = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} +move-vm-stack = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} +move-vm-runtime = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz", features = ["tracing", "testing"]} +move-model = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} +move-stackless-bytecode = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} +sui-move-build = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} +sui-json-rpc-types = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} +sui-types = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} +sui-package-management = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} +sui-sdk = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} +sui-config = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} +sui-storage = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} +sui-snapshot = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} +sui-core = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} +sui-execution = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz", features = ["testing"]} +shared-crypto = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} +# sui-adapter-v2 = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"} sui-rpc = { git = "https://github.com/MystenLabs/sui-rust-sdk.git", rev = "fb62af78b30f5dc64eeaec0094ab95b5ce5b7ce2" } sui-sdk-types = { git = "https://github.com/MystenLabs/sui-rust-sdk.git", rev = "fb62af78b30f5dc64eeaec0094ab95b5ce5b7ce2" } From 950787e9256b81723a9d297baf518448c465984f Mon Sep 17 00:00:00 2001 From: libr Date: Thu, 12 Feb 2026 11:11:27 +0800 Subject: [PATCH 09/13] chore: fix deps --- crates/movy-fuzz/src/executor.rs | 11 ++++++++--- crates/movy-fuzz/src/oracles/sui/proceeds.rs | 2 +- crates/movy-fuzz/src/oracles/sui/typed_bug.rs | 10 ++-------- crates/movy-replay/src/tracer/concolic.rs | 2 +- crates/movy-replay/src/tracer/oracle.rs | 2 +- crates/movy-replay/src/tracer/tree.rs | 2 +- 6 files changed, 14 insertions(+), 15 deletions(-) diff --git a/crates/movy-fuzz/src/executor.rs b/crates/movy-fuzz/src/executor.rs index a2fe3a7..706012e 100644 --- a/crates/movy-fuzz/src/executor.rs +++ b/crates/movy-fuzz/src/executor.rs @@ -7,7 +7,6 @@ use libafl::{ state::{HasExecutions, HasRand}, }; use libafl_bolts::tuples::{Handle, MatchNameRef, RefIndexable}; -use log::trace; use movy_replay::{ db::{ObjectStoreInfo, ObjectStoreMintObject}, event::{ModuleProvider, NotifierTracer}, @@ -27,6 +26,7 @@ use sui_types::{ execution_status::ExecutionStatus, storage::{BackingStore, ObjectStore}, }; +use log::trace; use crate::{ input::MoveInput, @@ -139,7 +139,12 @@ impl HasObservers for SuiFuzzExecutor { impl Executor for SuiFuzzExecutor where - T: ObjectStore + BackingStore + ObjectSuiStoreCommit + ObjectStoreMintObject + ObjectStoreInfo, + T: ObjectStore + + BackingStore + + ObjectSuiStoreCommit + + ObjectStoreMintObject + + ObjectStoreInfo + + Clone, E: ObjectStore, OT: ObserversTuple, RT: for<'a> SuiGeneralOracle, S>, @@ -212,7 +217,7 @@ where ExecutionStatus::Failure { command, .. } => ( // command index may be out of bound when meeting non-aborted error if command.is_some_and(|c| c < input.sequence().commands.len()) { - command.clone() + *command } else { None }, diff --git a/crates/movy-fuzz/src/oracles/sui/proceeds.rs b/crates/movy-fuzz/src/oracles/sui/proceeds.rs index 902604f..67588c6 100644 --- a/crates/movy-fuzz/src/oracles/sui/proceeds.rs +++ b/crates/movy-fuzz/src/oracles/sui/proceeds.rs @@ -3,8 +3,8 @@ use std::{ ops::Neg, }; +use move_trace_format::format::TraceEvent; use log::debug; -use move_trace_format::{format::TraceEvent}; use movy_replay::tracer::{concolic::ConcolicState, oracle::SuiGeneralOracle, trace::TraceState}; use movy_types::{ diff --git a/crates/movy-fuzz/src/oracles/sui/typed_bug.rs b/crates/movy-fuzz/src/oracles/sui/typed_bug.rs index 782f240..57f5952 100644 --- a/crates/movy-fuzz/src/oracles/sui/typed_bug.rs +++ b/crates/movy-fuzz/src/oracles/sui/typed_bug.rs @@ -1,5 +1,5 @@ +use move_trace_format::format::TraceEvent; use log::{debug, trace}; -use move_trace_format::{format::TraceEvent}; use movy_replay::tracer::{concolic::ConcolicState, oracle::SuiGeneralOracle, trace::TraceState}; use movy_types::{error::MovyError, input::MoveSequence, oracle::OracleFinding}; @@ -17,17 +17,11 @@ use crate::{ const TYPED_BUG_ABORT_CODE: u64 = 19260817; -#[derive(Debug, Clone)] +#[derive(Debug, Clone, Default)] pub struct TypedBugOracle { pub use_abort: bool, } -impl Default for TypedBugOracle { - fn default() -> Self { - Self { use_abort: false } - } -} - impl TypedBugOracle { pub fn new(use_abort: bool) -> Self { Self { use_abort } diff --git a/crates/movy-replay/src/tracer/concolic.rs b/crates/movy-replay/src/tracer/concolic.rs index b2ba11d..33d4107 100644 --- a/crates/movy-replay/src/tracer/concolic.rs +++ b/crates/movy-replay/src/tracer/concolic.rs @@ -2,13 +2,13 @@ use std::{cmp::Ordering, collections::BTreeMap, str::FromStr}; use crate::event::InstructionExtraInformation; use crate::tracer::trace::TraceState; -use log::{trace, warn}; use move_binary_format::file_format::Bytecode; use move_core_types::{language_storage::TypeTag, u256::U256}; use move_trace_format::{ format::{Effect, TraceEvent, TraceValue, TypeTagWithRefs}, value::SerializableMoveValue, }; +use log::{trace, warn}; use z3::ast::{Ast, Bool, Int}; #[derive(Clone, Debug, PartialEq, Eq)] diff --git a/crates/movy-replay/src/tracer/oracle.rs b/crates/movy-replay/src/tracer/oracle.rs index f407757..25d9db8 100644 --- a/crates/movy-replay/src/tracer/oracle.rs +++ b/crates/movy-replay/src/tracer/oracle.rs @@ -112,7 +112,7 @@ where .0 .done_execution(db, state, effects)? .into_iter() - .chain(self.1.done_execution(db, state, effects)?.into_iter()) + .chain(self.1.done_execution(db, state, effects)?) .collect()) } } diff --git a/crates/movy-replay/src/tracer/tree.rs b/crates/movy-replay/src/tracer/tree.rs index c39bcf7..c42e473 100644 --- a/crates/movy-replay/src/tracer/tree.rs +++ b/crates/movy-replay/src/tracer/tree.rs @@ -1,11 +1,11 @@ use std::fmt::Display; use itertools::Itertools; -use log::warn; use move_trace_format::{ format::{Frame, TraceEvent, TraceValue}, interface::Tracer, }; +use log::warn; #[derive(Debug, Clone)] pub struct FrameTraced { From ebe16a9f30e16d3285247b94666175311cc503c1 Mon Sep 17 00:00:00 2001 From: libr Date: Thu, 12 Feb 2026 13:24:03 +0800 Subject: [PATCH 10/13] chore: resolve conflicts --- crates/movy-fuzz/src/executor.rs | 8 ++++---- crates/movy-fuzz/src/oracles/sui/proceeds.rs | 2 +- crates/movy-fuzz/src/oracles/sui/typed_bug.rs | 2 +- crates/movy-replay/src/tracer/concolic.rs | 2 +- crates/movy-replay/src/tracer/tree.rs | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/crates/movy-fuzz/src/executor.rs b/crates/movy-fuzz/src/executor.rs index 706012e..9f2011e 100644 --- a/crates/movy-fuzz/src/executor.rs +++ b/crates/movy-fuzz/src/executor.rs @@ -26,7 +26,7 @@ use sui_types::{ execution_status::ExecutionStatus, storage::{BackingStore, ObjectStore}, }; -use log::trace; +use tracing::trace; use crate::{ input::MoveInput, @@ -239,17 +239,17 @@ where success, }; - if log::log_enabled!(log::Level::Debug) { + if tracing::enabled!(tracing::Level::DEBUG) { for ev in events.iter() { if let Some((st, ev)) = state.fuzz_state().decode_sui_event(ev)? { - log::debug!( + tracing::debug!( "Event: {}({})", st.to_canonical_string(true), serde_json::to_string(&ev) .unwrap_or_else(|e| format!("json err({}): {:?}", e, ev)) ); } else { - log::debug!( + tracing::debug!( "Event {} missing for decoding", ev.type_.to_canonical_string(true) ); diff --git a/crates/movy-fuzz/src/oracles/sui/proceeds.rs b/crates/movy-fuzz/src/oracles/sui/proceeds.rs index 67588c6..13e902a 100644 --- a/crates/movy-fuzz/src/oracles/sui/proceeds.rs +++ b/crates/movy-fuzz/src/oracles/sui/proceeds.rs @@ -4,7 +4,7 @@ use std::{ }; use move_trace_format::format::TraceEvent; -use log::debug; +use tracing::debug; use movy_replay::tracer::{concolic::ConcolicState, oracle::SuiGeneralOracle, trace::TraceState}; use movy_types::{ diff --git a/crates/movy-fuzz/src/oracles/sui/typed_bug.rs b/crates/movy-fuzz/src/oracles/sui/typed_bug.rs index 57f5952..ef50aca 100644 --- a/crates/movy-fuzz/src/oracles/sui/typed_bug.rs +++ b/crates/movy-fuzz/src/oracles/sui/typed_bug.rs @@ -1,5 +1,5 @@ use move_trace_format::format::TraceEvent; -use log::{debug, trace}; +use tracing::{debug, trace}; use movy_replay::tracer::{concolic::ConcolicState, oracle::SuiGeneralOracle, trace::TraceState}; use movy_types::{error::MovyError, input::MoveSequence, oracle::OracleFinding}; diff --git a/crates/movy-replay/src/tracer/concolic.rs b/crates/movy-replay/src/tracer/concolic.rs index 33d4107..69d7396 100644 --- a/crates/movy-replay/src/tracer/concolic.rs +++ b/crates/movy-replay/src/tracer/concolic.rs @@ -8,7 +8,7 @@ use move_trace_format::{ format::{Effect, TraceEvent, TraceValue, TypeTagWithRefs}, value::SerializableMoveValue, }; -use log::{trace, warn}; +use tracing::{trace, warn}; use z3::ast::{Ast, Bool, Int}; #[derive(Clone, Debug, PartialEq, Eq)] diff --git a/crates/movy-replay/src/tracer/tree.rs b/crates/movy-replay/src/tracer/tree.rs index c42e473..b1b7850 100644 --- a/crates/movy-replay/src/tracer/tree.rs +++ b/crates/movy-replay/src/tracer/tree.rs @@ -5,7 +5,7 @@ use move_trace_format::{ format::{Frame, TraceEvent, TraceValue}, interface::Tracer, }; -use log::warn; +use tracing::warn; #[derive(Debug, Clone)] pub struct FrameTraced { From 8bb0d7be103a4957a5db571ce0367171b3317d7b Mon Sep 17 00:00:00 2001 From: lazymio Date: Thu, 12 Feb 2026 22:13:18 +0800 Subject: [PATCH 11/13] Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- crates/movy-fuzz/src/executor.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/crates/movy-fuzz/src/executor.rs b/crates/movy-fuzz/src/executor.rs index 21fd936..7746318 100644 --- a/crates/movy-fuzz/src/executor.rs +++ b/crates/movy-fuzz/src/executor.rs @@ -27,7 +27,6 @@ use sui_types::{ storage::{BackingStore, ObjectStore}, }; use tracing::trace; -use tracing::trace; use crate::{ input::MoveInput, From 83c15b2a29fbec35ba5adaf2094c5ad1ca377876 Mon Sep 17 00:00:00 2001 From: lazymio Date: Thu, 12 Feb 2026 22:13:40 +0800 Subject: [PATCH 12/13] Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- crates/movy-fuzz/src/executor.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/crates/movy-fuzz/src/executor.rs b/crates/movy-fuzz/src/executor.rs index 7746318..37715b9 100644 --- a/crates/movy-fuzz/src/executor.rs +++ b/crates/movy-fuzz/src/executor.rs @@ -219,7 +219,6 @@ where // command index may be out of bound when meeting non-aborted error if command.is_some_and(|c| c < input.sequence().commands.len()) { *command - *command } else { None }, From 7043919aa1fc8651a1ccf47bfb692c72388de767 Mon Sep 17 00:00:00 2001 From: libr Date: Sun, 15 Feb 2026 16:48:15 +0800 Subject: [PATCH 13/13] clear --- crates/movy-fuzz/src/executor.rs | 5 +---- crates/movy-replay/src/event.rs | 10 +++++----- crates/movy-replay/src/exec.rs | 20 ++++++++++++++++++-- 3 files changed, 24 insertions(+), 11 deletions(-) diff --git a/crates/movy-fuzz/src/executor.rs b/crates/movy-fuzz/src/executor.rs index 37715b9..b9a1c6f 100644 --- a/crates/movy-fuzz/src/executor.rs +++ b/crates/movy-fuzz/src/executor.rs @@ -145,7 +145,7 @@ where + ObjectStoreMintObject + ObjectStoreInfo + Clone - + 'static + + 'static, E: ObjectStore, OT: ObserversTuple, RT: for<'a> SuiGeneralOracle, S>, @@ -240,11 +240,9 @@ where success, }; - if tracing::enabled!(tracing::Level::DEBUG) { if tracing::enabled!(tracing::Level::DEBUG) { for ev in events.iter() { if let Some((st, ev)) = state.fuzz_state().decode_sui_event(ev)? { - tracing::debug!( tracing::debug!( "Event: {}({})", st.to_canonical_string(true), @@ -252,7 +250,6 @@ where .unwrap_or_else(|e| format!("json err({}): {:?}", e, ev)) ); } else { - tracing::debug!( tracing::debug!( "Event {} missing for decoding", ev.type_.to_canonical_string(true) diff --git a/crates/movy-replay/src/event.rs b/crates/movy-replay/src/event.rs index cf1f2b4..a82d539 100644 --- a/crates/movy-replay/src/event.rs +++ b/crates/movy-replay/src/event.rs @@ -255,7 +255,7 @@ where // self.module_stack = Some((address, name)); self.module_stack.push((address, name)); if let Err(e) = self.notifier.notify_event(event) { - log::error!("NotifierTracer: failed to notify OpenFrame: {:?}", e); + tracing::error!("NotifierTracer: failed to notify OpenFrame: {:?}", e); } } @@ -267,7 +267,7 @@ where // self.module_stack = None; self.module_stack.pop(); if let Err(e) = self.notifier.notify_event(event) { - log::error!("NotifierTracer: failed to notify CloseFrame: {:?}", e); + tracing::error!("NotifierTracer: failed to notify CloseFrame: {:?}", e); } } @@ -277,19 +277,19 @@ where .notifier .handle_before_instruction(event, extra.as_ref()) { - log::error!( + tracing::error!( "NotifierTracer: failed to handle before instruction: {:?}", e ); } if let Err(e) = self.notifier.notify_event(event) { - log::error!("NotifierTracer: failed to notify Instruction: {:?}", e); + tracing::error!("NotifierTracer: failed to notify Instruction: {:?}", e); } } _ => { if let Err(e) = self.notifier.notify_event(event) { - log::error!("NotifierTracer: failed to notify event: {:?}", e); + tracing::error!("NotifierTracer: failed to notify event: {:?}", e); } } } diff --git a/crates/movy-replay/src/exec.rs b/crates/movy-replay/src/exec.rs index 5025d9f..3e6eba7 100644 --- a/crates/movy-replay/src/exec.rs +++ b/crates/movy-replay/src/exec.rs @@ -307,8 +307,24 @@ where // } if package_id == ObjectID::ZERO { - // derive id - let id = ObjectID::derive_id(digest, creation_num); + // Derive the package id from the digest of the publish transaction. + let mut module_bytes = vec![]; + for module in &modules { + let mut buf = vec![]; + module.serialize_with_version(module.version, &mut buf)?; + module_bytes.push(buf); + } + let preview_ptb = ProgrammableTransaction { + inputs: vec![CallArg::Pure(bcs::to_bytes(&admin)?)], + commands: vec![ + Command::Publish(module_bytes, dependencies.clone()), + Command::TransferObjects(vec![Argument::Result(0)], Argument::Input(0)), + ], + }; + let gas_ref = self.db.get_move_object_info(gas.into())?.sui_reference(); + let tx_kind = TransactionKind::ProgrammableTransaction(preview_ptb); + let tx_data = TransactionData::new(tx_kind, admin, gas_ref, 1_000_000_000, 1); + let id = ObjectID::derive_id(tx_data.digest(), 0); substitute_package_id(&mut modules, id)?; } else { // ensure the modules has the expected id