Skip to content

Commit 2e9c46c

Browse files
committed
initial v1.65.2 port
1 parent 1d244c4 commit 2e9c46c

9 files changed

Lines changed: 897 additions & 379 deletions

File tree

Cargo.lock

Lines changed: 792 additions & 172 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 34 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -61,52 +61,56 @@ tonic = "0.14"
6161
url = "2.5.7"
6262

6363
# Sui dependencies
64-
move-binary-format = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"}
65-
move-trace-format = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"}
66-
move-package = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"}
67-
move-compiler = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"}
68-
move-disassembler = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"}
69-
move-ir-types = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"}
70-
move-core-types = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"}
71-
move-vm-types = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"}
72-
move-vm-stack = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"}
73-
move-vm-runtime = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz", features = ["tracing", "testing"]}
74-
move-model = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"}
75-
move-stackless-bytecode = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"}
76-
sui-move-build = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"}
77-
sui-json-rpc-types = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"}
78-
sui-types = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"}
79-
sui-package-management = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"}
80-
sui-sdk = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"}
81-
sui-config = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"}
82-
sui-storage = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"}
83-
sui-snapshot = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"}
84-
sui-core = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"}
85-
sui-execution = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz", features = ["testing"]}
86-
shared-crypto = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"}
87-
sui-move-natives-latest = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"}
88-
sui-adapter-latest = {git = "https://github.com/wtdcode/sui", branch = "v1.60.1-fuzz"}
64+
move-binary-format = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz", features = ["wasm"]}
65+
move-trace-format = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"}
66+
move-package = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"}
67+
move-compiler = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"}
68+
move-disassembler = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"}
69+
move-ir-types = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"}
70+
move-core-types = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"}
71+
move-vm-types = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"}
72+
move-vm-runtime = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz", features = ["tracing", "testing"]}
73+
move-model = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"}
74+
move-stackless-bytecode = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"}
75+
sui-move-build = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"}
76+
sui-json-rpc-types = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"}
77+
sui-types = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"}
78+
move-package-alt = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"}
79+
move-package-alt-compilation = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"}
80+
sui-package-alt = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"}
81+
sui-package-management = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"}
82+
sui-sdk = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"}
83+
sui-config = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"}
84+
sui-storage = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"}
85+
sui-snapshot = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"}
86+
sui-core = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"}
87+
sui-execution = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz", features = ["testing"]}
88+
shared-crypto = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"}
89+
sui-move-natives-latest = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"}
90+
sui-adapter-latest = {git = "https://github.com/wtdcode/sui", branch = "v1.65.2-fuzz"}
8991

9092

91-
sui-rpc = { git = "https://github.com/MystenLabs/sui-rust-sdk.git", rev = "fb62af78b30f5dc64eeaec0094ab95b5ce5b7ce2" }
92-
sui-sdk-types = { git = "https://github.com/MystenLabs/sui-rust-sdk.git", rev = "fb62af78b30f5dc64eeaec0094ab95b5ce5b7ce2" }
93-
fastcrypto = { git = "https://github.com/MystenLabs/fastcrypto", rev = "09f86974195ec85d8aae386b1909d341d3ccfe52"} # sui use git dependency =/
93+
sui-rpc = { git = "https://github.com/MystenLabs/sui-rust-sdk.git", rev = "aef7655b45dcf3747281456f4999542dc52f6af6" }
94+
sui-sdk-types = { git = "https://github.com/MystenLabs/sui-rust-sdk.git", rev = "aef7655b45dcf3747281456f4999542dc52f6af6" }
95+
fastcrypto = { git = "https://github.com/MystenLabs/fastcrypto", rev = "d2e2d13be3e550745739144e2a090b9675e4ffcb"} # sui use git dependency =/
9496

9597
# move-stackless-bytecode = {path = "../sui/external-crates/move/crates/move-stackless-bytecode"}
9698
# move-model = {path = "../sui/external-crates/move/crates/move-model"}
97-
# move-binary-format = {path = "../sui/external-crates/move/crates/move-binary-format"}
99+
# move-binary-format = {path = "../sui/external-crates/move/crates/move-binary-format", features = ["wasm"]}
98100
# move-trace-format = {path = "../sui/external-crates/move/crates/move-trace-format"}
99101
# move-package = {path = "../sui/external-crates/move/crates/move-package"}
102+
# move-package-alt = {path = "../sui/external-crates/move/crates/move-package-alt"}
103+
# move-package-alt-compilation = {path = "../sui/external-crates/move/crates/move-package-alt-compilation"}
100104
# move-compiler = {path = "../sui/external-crates/move/crates/move-compiler"}
101105
# move-disassembler = {path = "../sui/external-crates/move/crates/move-disassembler"}
102106
# move-ir-types = {path = "../sui/external-crates/move/crates/move-ir-types"}
103107
# move-core-types = {path = "../sui/external-crates/move/crates/move-core-types"}
104108
# move-vm-types = {path = "../sui/external-crates/move/crates/move-vm-types"}
105-
# move-vm-stack = {path = "../sui/external-crates/move/crates/move-vm-stack"}
106109
# move-vm-runtime = {path = "../sui/external-crates/move/crates/move-vm-runtime", features = ["tracing", "testing"]}
107110
# sui-move-build = {path = "../sui/crates/sui-move-build"}
108111
# sui-json-rpc-types = {path = "../sui/crates/sui-json-rpc-types"}
109112
# sui-types = {path = "../sui/crates/sui-types"}
113+
# sui-package-alt = {path = "../sui/crates/sui-package-alt"}
110114
# sui-package-management = {path = "../sui/crates/sui-package-management"}
111115
# sui-sdk = {path = "../sui/crates/sui-sdk"}
112116
# sui-config = {path = "../sui/crates/sui-config"}

crates/movy-fuzz/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ move-core-types = {workspace = true}
3838
move-model = {workspace = true}
3939
move-stackless-bytecode = {workspace = true}
4040
move-trace-format = {workspace = true}
41-
move-vm-stack = {workspace = true}
4241
move-vm-types = {workspace = true}
4342
sui-types = {workspace = true}
4443
sui-json-rpc-types = {workspace = true}

crates/movy-replay/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ libafl = {workspace = true}
3636
libafl_bolts = {workspace = true}
3737
alloy-primitives = {workspace = true}
3838
const-hex = {workspace = true}
39-
move-vm-stack = { workspace = true }
4039
mdbx-derive = {workspace = true}
4140
z3 = {workspace = true }
4241
tokio-stream = {workspace = true}

crates/movy-replay/src/tracer/mod.rs

Lines changed: 17 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,11 @@ impl<T: MovySuiTracerExt> Tracer for MovySuiTracerWrapper<T> {
6161
fn notify(
6262
&mut self,
6363
event: &TraceEvent,
64-
_writer: &mut move_trace_format::interface::Writer<'_>,
65-
_stack: Option<&move_vm_stack::Stack>,
66-
) {
64+
_writer: move_trace_format::interface::Writer<'_>,
65+
) -> bool {
6766
if !self.tracer.on_raw_event(&self.state, event) {
6867
self.state.apply_event(event);
69-
return;
68+
return false;
7069
}
7170
match event {
7271
TraceEvent::External(e) => {
@@ -111,6 +110,7 @@ impl<T: MovySuiTracerExt> Tracer for MovySuiTracerWrapper<T> {
111110
self.state.apply_event(event);
112111
}
113112
}
113+
false
114114
}
115115
}
116116

@@ -121,9 +121,9 @@ impl Tracer for NopTracer {
121121
fn notify(
122122
&mut self,
123123
_event: &TraceEvent,
124-
_writer: &mut move_trace_format::interface::Writer<'_>,
125-
_stack: Option<&move_vm_stack::Stack>,
126-
) {
124+
_writer: move_trace_format::interface::Writer<'_>,
125+
) -> bool {
126+
false
127127
}
128128
}
129129

@@ -142,13 +142,13 @@ where
142142
fn notify(
143143
&mut self,
144144
event: &TraceEvent,
145-
writer: &mut move_trace_format::interface::Writer<'_>,
146-
stack: Option<&move_vm_stack::Stack>,
147-
) {
145+
writer: move_trace_format::interface::Writer<'_>,
146+
) -> bool {
148147
match self {
149-
Self::T1(t) => t.notify(event, writer, stack),
150-
Self::T2(t) => t.notify(event, writer, stack),
151-
}
148+
Self::T1(t) => t.notify(event, writer),
149+
Self::T2(t) => t.notify(event, writer),
150+
};
151+
false
152152
}
153153
}
154154

@@ -230,79 +230,11 @@ where
230230
fn notify(
231231
&mut self,
232232
event: &TraceEvent,
233-
writer: &mut move_trace_format::interface::Writer<'_>,
234-
stack: Option<&move_vm_stack::Stack>,
235-
) {
233+
writer: move_trace_format::interface::Writer<'_>,
234+
) -> bool {
236235
if let Some(tracer) = &mut self.tracer {
237-
tracer.notify(event, writer, stack);
236+
tracer.notify(event, writer);
238237
}
239-
}
240-
}
241-
242-
pub struct CombinedTracer<T1, T2> {
243-
pub t1: T1,
244-
pub t2: T2,
245-
}
246-
247-
impl<T1, T2> Tracer for CombinedTracer<T1, T2>
248-
where
249-
T1: Tracer,
250-
T2: Tracer,
251-
{
252-
fn notify(
253-
&mut self,
254-
event: &TraceEvent,
255-
writer: &mut move_trace_format::interface::Writer<'_>,
256-
stack: Option<&move_vm_stack::Stack>,
257-
) {
258-
self.t1.notify(event, writer, stack);
259-
self.t2.notify(event, writer, stack);
260-
}
261-
}
262-
263-
impl<T1, T2> MovySuiTracerExt for CombinedTracer<T1, T2>
264-
where
265-
T1: MovySuiTracerExt,
266-
T2: MovySuiTracerExt,
267-
{
268-
fn on_raw_event(&mut self, state: &TraceState, ev: &TraceEvent) -> bool {
269-
self.t1.on_raw_event(state, ev) && self.t2.on_raw_event(state, ev)
270-
}
271-
fn on_move_call(&mut self, state: &TraceState) {
272-
self.t1.on_move_call(state);
273-
self.t2.on_move_call(state);
274-
}
275-
fn on_effect(&mut self, state: &TraceState, effect: &Box<Effect>) {
276-
self.t1.on_effect(state, effect);
277-
self.t2.on_effect(state, effect);
278-
}
279-
fn before_instruction(
280-
&mut self,
281-
state: &TraceState,
282-
tys: &Vec<TypeTag>,
283-
pc: u16,
284-
gas_left: u64,
285-
instruction: &Bytecode,
286-
) {
287-
self.t1
288-
.before_instruction(state, tys, pc, gas_left, instruction);
289-
self.t2
290-
.before_instruction(state, tys, pc, gas_left, instruction);
291-
}
292-
293-
fn close_frame(
294-
&mut self,
295-
state: &TraceState,
296-
frame_id: TraceIndex,
297-
return_: &Vec<TraceValue>,
298-
gas_left: u64,
299-
) {
300-
self.t1.close_frame(state, frame_id, return_, gas_left);
301-
self.t2.close_frame(state, frame_id, return_, gas_left);
302-
}
303-
304-
fn open_frame(&mut self, state: &TraceState, frame: &Box<Frame>, gas_left: u64) {
305-
self.t1.open_frame(state, frame, gas_left);
306-
self.t2.open_frame(state, frame, gas_left);
238+
false
307239
}
308240
}

crates/movy-sui-stds/build.rs

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -25,28 +25,28 @@ fn build_movy(dir: &Path) -> SuiCompiledPackage {
2525

2626
fn build_std(dir: &Path, test: bool) -> Vec<SuiCompiledPackage> {
2727
clear_build(dir);
28-
let (_, resolved) = build_package_resolved(dir, test).unwrap();
28+
// let (_, resolved) = build_package_resolved(dir, test).unwrap();
2929
let flag = if test { "testing" } else { "non-testing" };
3030
let mut deps = vec![];
31-
for (package_name, package) in resolved.package_table.iter() {
32-
if package_name.as_str() != "hello_std" {
33-
cargo_print!(
34-
"Building {} std {} at {}",
35-
flag,
36-
package_name.as_str(),
37-
package.package_path.display()
38-
);
31+
// for (package_name, package) in resolved.package_table.iter() {
32+
// if package_name.as_str() != "hello_std" {
33+
// cargo_print!(
34+
// "Building {} std {} at {}",
35+
// flag,
36+
// package_name.as_str(),
37+
// package.package_path.display()
38+
// );
3939

40-
let out =
41-
SuiCompiledPackage::build_all_unpublished_from_folder(&package.package_path, test)
42-
.unwrap();
43-
let build_directory = package.package_path.join("build");
44-
if build_directory.exists() {
45-
std::fs::remove_dir_all(&build_directory).unwrap();
46-
}
47-
deps.push(out);
48-
}
49-
}
40+
// let out =
41+
// SuiCompiledPackage::build_all_unpublished_from_folder(&package.package_path, test)
42+
// .unwrap();
43+
// let build_directory = package.package_path.join("build");
44+
// if build_directory.exists() {
45+
// std::fs::remove_dir_all(&build_directory).unwrap();
46+
// }
47+
// deps.push(out);
48+
// }
49+
// }
5050
deps
5151
}
5252

Lines changed: 21 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,23 @@
1-
# @generated by Move, please check-in and do not edit manually.
1+
# Generated by move; do not edit
2+
# This file should be checked in.
23

34
[move]
4-
version = 3
5-
manifest_digest = "21269C24131D8850404FBA2B3B4F980FDBDB0A4BDDDF5C682FC5420D31F99FD8"
6-
deps_digest = "F9B494B64F0615AED0E98FC12A85B85ECD2BC5185C22D30E7F67786BB52E507C"
7-
dependencies = [
8-
{ id = "Bridge", name = "Bridge" },
9-
{ id = "MoveStdlib", name = "MoveStdlib" },
10-
{ id = "Sui", name = "Sui" },
11-
{ id = "SuiSystem", name = "SuiSystem" },
12-
]
13-
14-
[[move.package]]
15-
id = "Bridge"
16-
source = { git = "https://github.com/MystenLabs/sui.git", rev = "d75fae3aa7fa3545b5803980a1e0c965b8bbf48e", subdir = "crates/sui-framework/packages/bridge" }
17-
18-
dependencies = [
19-
{ id = "MoveStdlib", name = "MoveStdlib" },
20-
{ id = "Sui", name = "Sui" },
21-
{ id = "SuiSystem", name = "SuiSystem" },
22-
]
23-
24-
[[move.package]]
25-
id = "MoveStdlib"
26-
source = { git = "https://github.com/MystenLabs/sui.git", rev = "d75fae3aa7fa3545b5803980a1e0c965b8bbf48e", subdir = "crates/sui-framework/packages/move-stdlib" }
27-
28-
[[move.package]]
29-
id = "Sui"
30-
source = { git = "https://github.com/MystenLabs/sui.git", rev = "d75fae3aa7fa3545b5803980a1e0c965b8bbf48e", subdir = "crates/sui-framework/packages/sui-framework" }
31-
32-
dependencies = [
33-
{ id = "MoveStdlib", name = "MoveStdlib" },
34-
]
35-
36-
[[move.package]]
37-
id = "SuiSystem"
38-
source = { git = "https://github.com/MystenLabs/sui.git", rev = "d75fae3aa7fa3545b5803980a1e0c965b8bbf48e", subdir = "crates/sui-framework/packages/sui-system" }
39-
40-
dependencies = [
41-
{ id = "MoveStdlib", name = "MoveStdlib" },
42-
{ id = "Sui", name = "Sui" },
43-
]
44-
45-
[move.toolchain-version]
46-
compiler-version = "1.61.2"
47-
edition = "2024.beta"
48-
flavor = "sui"
5+
version = 4
6+
7+
[pinned.mainnet.MoveStdlib]
8+
source = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/move-stdlib", rev = "868c226359ef914f1f3b080518f27eb13d8967f5" }
9+
use_environment = "mainnet"
10+
manifest_digest = "C4FE4C91DE74CBF223B2E380AE40F592177D21870DC2D7EB6227D2D694E05363"
11+
deps = {}
12+
13+
[pinned.mainnet.Sui]
14+
source = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "868c226359ef914f1f3b080518f27eb13d8967f5" }
15+
use_environment = "mainnet"
16+
manifest_digest = "CD547CB1ACCE0880C835DAED2D8FFCB91D56C833AE5240D3AA5B918398263195"
17+
deps = { MoveStdlib = "MoveStdlib" }
18+
19+
[pinned.mainnet.movy]
20+
source = { root = true }
21+
use_environment = "mainnet"
22+
manifest_digest = "E41BBD67BE8940D26C79D78B028477EF5B33BA217A1282C78ACB344CF8A5ECF6"
23+
deps = { std = "MoveStdlib", sui = "Sui" }

crates/movy-sui/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ move-core-types = {workspace = true}
3636
move-compiler = {workspace = true}
3737
move-binary-format = {workspace = true}
3838
move-package = {workspace = true}
39+
move-package-alt = {workspace = true}
40+
move-package-alt-compilation = {workspace = true}
41+
sui-package-alt = {workspace = true}
3942
sui-move-build = {workspace = true}
4043
sui-package-management = { workspace = true }
4144
sui-types = {workspace = true}

0 commit comments

Comments
 (0)