Skip to content
Merged
Show file tree
Hide file tree
Changes from 58 commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
433abbe
setup
tnowacki Mar 26, 2025
cc65fbe
typing prog
tnowacki Mar 29, 2025
aa0ee33
finish typing
tnowacki Apr 1, 2025
3ab71a8
typing progress
tnowacki Apr 2, 2025
219cb55
typing progress
tnowacki Apr 2, 2025
c6a411e
clippy
tnowacki Apr 2, 2025
3d55de6
make typing dir
tnowacki Apr 18, 2025
657e033
fix typing
tnowacki Apr 18, 2025
e2c83c5
loading
tnowacki Apr 18, 2025
66674db
loading translate
tnowacki Apr 18, 2025
f97dc1a
rework for loaded types
tnowacki Apr 18, 2025
1a0a6e4
checkout move-regex-borrow-graph
tnowacki Apr 21, 2025
633c77c
Cargo.toml
tnowacki Apr 21, 2025
2a40cb8
cargo.lock
tnowacki Apr 21, 2025
e736f52
Merge branch 'main' into static-ptb
tnowacki Apr 21, 2025
5d5c3da
clippy
tnowacki Apr 22, 2025
27bc6ac
Merge branch 'regex-graph' into static-ptb
tnowacki Apr 22, 2025
1397dc4
memory safety progress
tnowacki Apr 22, 2025
4617b0d
finish borrow checker
tnowacki Apr 22, 2025
77fc202
Progress on memory safety and input arguments
tnowacki Apr 23, 2025
b7854d3
fix inputs
tnowacki Apr 23, 2025
bc79435
fix undropped values check
tnowacki Apr 23, 2025
c7c48b1
start scope references
tnowacki Apr 23, 2025
e93c13f
annotate argument types
tnowacki Apr 23, 2025
e041233
fix reference scoping
tnowacki Apr 23, 2025
514eeab
capture borrow states
tnowacki Apr 23, 2025
5b4466c
pause drop safety
tnowacki Apr 24, 2025
a37ebb4
change usage
tnowacki Apr 24, 2025
086c5dc
drop safety
tnowacki Apr 24, 2025
2ef0b2f
ref rc
tnowacki Apr 24, 2025
499261e
refact receiving
tnowacki Apr 25, 2025
28066e6
start execution
tnowacki Apr 25, 2025
5cd71b8
execution prog
tnowacki Apr 28, 2025
dae7b7b
prog
tnowacki May 1, 2025
ec118ae
prog
tnowacki May 1, 2025
1e25897
move call and gas
tnowacki May 1, 2025
437a1e2
tx context
tnowacki May 1, 2025
7ecba10
trace builder opt
tnowacki May 1, 2025
5180b12
Merge branch 'main' into static-ptb
tnowacki May 5, 2025
7f99a63
finish
tnowacki May 5, 2025
a3a4ed5
indexed
tnowacki May 5, 2025
cab1eaf
modes
tnowacki May 7, 2025
f20d3e0
small fixes
tnowacki May 7, 2025
73c1396
specialization
tnowacki May 7, 2025
4a2a0fd
wrap value
tnowacki May 7, 2025
6321f71
runtime layout
tnowacki May 7, 2025
4bd9513
wrap value
tnowacki May 8, 2025
f5d8ba0
Merge branch 'main' into static-ptb
tnowacki May 8, 2025
36dee5c
Merge branch 'main' into static-ptb
tnowacki May 8, 2025
fb834f7
clippy
tnowacki May 8, 2025
1c4e0dc
locals
tnowacki May 8, 2025
419bccf
Merge branch 'main' into static-ptb
tnowacki May 27, 2025
ccdb131
fix link context
tnowacki May 28, 2025
504e9d6
fix execution modes
tnowacki May 28, 2025
99dc135
changes to execution context for static ptbs
tnowacki May 28, 2025
bdff61d
Merge branch 'sptb-execution' into static-ptb
tnowacki May 28, 2025
1a98b85
fixed clippy
tnowacki May 28, 2025
fd2eccc
Merge branch 'main' into static-ptb
tnowacki May 28, 2025
c0151d5
Merge branch 'main' into static-ptb
tnowacki Jun 4, 2025
7bd92ac
addressed comments
tnowacki Jun 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions crates/sui-types/src/base_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -955,6 +955,11 @@ pub const RESOLVED_UTF8_STR: (&AccountAddress, &IdentStr, &IdentStr) = (

pub const TX_CONTEXT_MODULE_NAME: &IdentStr = ident_str!("tx_context");
pub const TX_CONTEXT_STRUCT_NAME: &IdentStr = ident_str!("TxContext");
pub const RESOLVED_TX_CONTEXT: (&AccountAddress, &IdentStr, &IdentStr) = (
&SUI_FRAMEWORK_ADDRESS,
STD_UTF8_MODULE_NAME,
STD_UTF8_STRUCT_NAME,
);

pub fn move_ascii_str_layout() -> A::MoveStructLayout {
A::MoveStructLayout {
Expand Down
3 changes: 3 additions & 0 deletions crates/sui-types/src/coin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ use crate::{
SUI_FRAMEWORK_ADDRESS,
};
use move_core_types::{
account_address::AccountAddress,
annotated_value::{MoveFieldLayout, MoveStructLayout, MoveTypeLayout},
ident_str,
identifier::IdentStr,
Expand All @@ -24,6 +25,8 @@ use serde::{Deserialize, Serialize};

pub const COIN_MODULE_NAME: &IdentStr = ident_str!("coin");
pub const COIN_STRUCT_NAME: &IdentStr = ident_str!("Coin");
pub const RESOLVED_COIN_STRUCT: (&AccountAddress, &IdentStr, &IdentStr) =
(&SUI_FRAMEWORK_ADDRESS, COIN_MODULE_NAME, COIN_STRUCT_NAME);
pub const COIN_METADATA_STRUCT_NAME: &IdentStr = ident_str!("CoinMetadata");
pub const COIN_TREASURE_CAP_NAME: &IdentStr = ident_str!("TreasuryCap");
pub const REGULATED_COIN_METADATA_STRUCT_NAME: &IdentStr = ident_str!("RegulatedCoinMetadata");
Expand Down
1 change: 1 addition & 0 deletions external-crates/move/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ move-borrow-graph = { path = "crates/move-borrow-graph" }
move-bytecode-source-map = { path = "crates/move-bytecode-source-map" }
move-bytecode-utils = { path = "crates/move-bytecode-utils" }
move-bytecode-verifier = { path = "crates/move-bytecode-verifier" }
move-bytecode-verifier-analyzer = { path = "crates/move-bytecode-verifier-analyzer" }
move-bytecode-verifier-meter = { path = "crates/move-bytecode-verifier-meter" }
move-bytecode-viewer = { path = "crates/move-bytecode-viewer" }
move-cli = { path = "crates/move-cli" }
Expand Down
95 changes: 95 additions & 0 deletions sui-execution/latest/sui-adapter/src/execution_mode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,23 @@ pub trait ExecutionMode {
argument_updates: Self::ArgumentUpdates,
command_result: &[Value],
) -> Result<(), ExecutionError>;

// == Arg/Result V2 ==

const TRACK_EXECUTION: bool;

fn add_argument_update_v2(
acc: &mut Self::ArgumentUpdates,
arg: Argument,
bytes: Vec<u8>,
type_: TypeTag,
) -> Result<(), ExecutionError>;

fn finish_command_v2(
acc: &mut Self::ExecutionResults,
argument_updates: Vec<(Argument, Vec<u8>, TypeTag)>,
command_result: Vec<(Vec<u8>, TypeTag)>,
) -> Result<(), ExecutionError>;
}

#[derive(Copy, Clone)]
Expand Down Expand Up @@ -93,6 +110,25 @@ impl ExecutionMode for Normal {
) -> Result<(), ExecutionError> {
Ok(())
}

const TRACK_EXECUTION: bool = false;

fn add_argument_update_v2(
_acc: &mut Self::ArgumentUpdates,
_arg: Argument,
_bytes: Vec<u8>,
_type_: TypeTag,
) -> Result<(), ExecutionError> {
invariant_violation!("should not be called");
}

fn finish_command_v2(
_acc: &mut Self::ExecutionResults,
_argument_updates: Vec<(Argument, Vec<u8>, TypeTag)>,
_command_result: Vec<(Vec<u8>, TypeTag)>,
) -> Result<(), ExecutionError> {
invariant_violation!("should not be called");
}
}

#[derive(Copy, Clone)]
Expand Down Expand Up @@ -139,6 +175,25 @@ impl ExecutionMode for Genesis {
) -> Result<(), ExecutionError> {
Ok(())
}

const TRACK_EXECUTION: bool = false;

fn add_argument_update_v2(
_acc: &mut Self::ArgumentUpdates,
_arg: Argument,
_bytes: Vec<u8>,
_type_: TypeTag,
) -> Result<(), ExecutionError> {
invariant_violation!("should not be called");
}

fn finish_command_v2(
_acc: &mut Self::ExecutionResults,
_argument_updates: Vec<(Argument, Vec<u8>, TypeTag)>,
_command_result: Vec<(Vec<u8>, TypeTag)>,
) -> Result<(), ExecutionError> {
invariant_violation!("should not be called");
}
}

#[derive(Copy, Clone)]
Expand Down Expand Up @@ -191,6 +246,25 @@ impl ExecutionMode for System {
) -> Result<(), ExecutionError> {
Ok(())
}

const TRACK_EXECUTION: bool = false;

fn add_argument_update_v2(
_acc: &mut Self::ArgumentUpdates,
_arg: Argument,
_bytes: Vec<u8>,
_type_: TypeTag,
) -> Result<(), ExecutionError> {
invariant_violation!("should not be called");
}

fn finish_command_v2(
_acc: &mut Self::ExecutionResults,
_argument_updates: Vec<(Argument, Vec<u8>, TypeTag)>,
_command_result: Vec<(Vec<u8>, TypeTag)>,
) -> Result<(), ExecutionError> {
invariant_violation!("should not be called");
}
}

/// WARNING! Using this mode will bypass all normal checks around Move entry functions! This
Expand Down Expand Up @@ -250,6 +324,27 @@ impl<const SKIP_ALL_CHECKS: bool> ExecutionMode for DevInspect<SKIP_ALL_CHECKS>
acc.push((argument_updates, command_bytes));
Ok(())
}

const TRACK_EXECUTION: bool = true;

fn add_argument_update_v2(
acc: &mut Self::ArgumentUpdates,
arg: Argument,
bytes: Vec<u8>,
type_: TypeTag,
) -> Result<(), ExecutionError> {
acc.push((arg, bytes, type_));
Ok(())
}

fn finish_command_v2(
acc: &mut Self::ExecutionResults,
argument_updates: Vec<(Argument, Vec<u8>, TypeTag)>,
command_result: Vec<(Vec<u8>, TypeTag)>,
) -> Result<(), ExecutionError> {
acc.push((argument_updates, command_result));
Ok(())
}
}

fn value_to_bytes_and_tag(
Expand Down
1 change: 1 addition & 0 deletions sui-execution/latest/sui-adapter/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ pub mod execution_value;
pub mod gas_charger;
pub mod gas_meter;
pub mod programmable_transactions;
pub mod static_programmable_transactions;
pub mod temporary_store;
pub mod type_layout_resolver;
pub mod type_resolver;
Original file line number Diff line number Diff line change
Expand Up @@ -795,8 +795,7 @@ mod checked {
}
}
}
}
// add transfers from TransferObjects command
} // add transfers from TransferObjects command
for (recipient, object_value) in additional_transfers {
let owner = Owner::AddressOwner(recipient);
add_additional_write(&mut additional_writes, owner, object_value)?;
Expand Down
Loading
Loading