diff --git a/soroban-bench-utils/Cargo.toml b/soroban-bench-utils/Cargo.toml index e374fad80..a8b41dad3 100644 --- a/soroban-bench-utils/Cargo.toml +++ b/soroban-bench-utils/Cargo.toml @@ -14,5 +14,8 @@ publish = false soroban-env-common = { workspace = true } tracking-allocator = "0.4.0" +[features] +next = ["soroban-env-common/next"] + [target.'cfg(target_os = "linux")'.dependencies] perf-event = "0.4.7" diff --git a/soroban-env-common/Cargo.toml b/soroban-env-common/Cargo.toml index 9574ac023..054652575 100644 --- a/soroban-env-common/Cargo.toml +++ b/soroban-env-common/Cargo.toml @@ -33,6 +33,7 @@ std = ["stellar-xdr/std", "stellar-xdr/base64"] serde = ["dep:serde", "stellar-xdr/serde"] wasmi = ["dep:wasmi"] testutils = ["dep:arbitrary", "stellar-xdr/arbitrary"] +next = ["stellar-xdr/next"] [package.metadata.docs.rs] all-features = true diff --git a/soroban-env-common/src/convert.rs b/soroban-env-common/src/convert.rs index 588b8a9dd..8dff97024 100644 --- a/soroban-env-common/src/convert.rs +++ b/soroban-env-common/src/convert.rs @@ -1,3 +1,4 @@ +use crate::xdr::int128_helpers; use crate::{ num::{i256_from_pieces, i256_into_pieces, u256_from_pieces, u256_into_pieces}, DurationSmall, DurationVal, Env, I128Small, I128Val, I256Small, I256Val, I64Small, @@ -5,17 +6,16 @@ use crate::{ I256, U256, }; use core::fmt::Debug; -use stellar_xdr::int128_helpers; +#[cfg(feature = "std")] +use crate::xdr::{ + Duration, Int128Parts, Int256Parts, ScVal, TimePoint, UInt128Parts, UInt256Parts, +}; #[cfg(feature = "std")] use crate::{ num, object::ScValObjRef, val::ValConvert, ConversionError, Error, Object, ScValObject, SymbolSmall, Tag, }; -#[cfg(feature = "std")] -use stellar_xdr::{ - Duration, Int128Parts, Int256Parts, ScVal, TimePoint, UInt128Parts, UInt256Parts, -}; /// General trait representing a the ability of some object to perform a /// (possibly unsuccessful) conversion between two other types. diff --git a/soroban-env-common/src/error.rs b/soroban-env-common/src/error.rs index 19b25bfc7..de709488e 100644 --- a/soroban-env-common/src/error.rs +++ b/soroban-env-common/src/error.rs @@ -1,3 +1,4 @@ +use crate::xdr::{ScError, ScErrorCode, ScErrorType, ScVal}; use crate::{ impl_wrapper_as_and_to_rawval, impl_wrapper_tag_based_constructors, impl_wrapper_tag_based_rawvalconvertible, impl_wrapper_wasmi_conversions, Compare, @@ -9,7 +10,6 @@ use core::{ fmt::Debug, hash::{Hash, Hasher}, }; -use stellar_xdr::{ScError, ScErrorCode, ScErrorType, ScVal}; /// Wrapper for a [Val] that is tagged with [Tag::Error], interpreting the /// [Val]'s body as a pair of a 28-bit status-type code and a 32-bit status @@ -95,7 +95,7 @@ impl<'a> From<&'a Error> for Error { } impl TryFrom for ScError { - type Error = stellar_xdr::Error; + type Error = crate::xdr::Error; fn try_from(er: Error) -> Result { let type_: ScErrorType = (er.as_val().get_minor() as i32).try_into()?; let u: u32 = er.as_val().get_major(); @@ -115,15 +115,15 @@ impl TryFrom for ScError { } impl TryFrom for ScVal { - type Error = stellar_xdr::Error; - fn try_from(st: Error) -> Result { + type Error = crate::xdr::Error; + fn try_from(st: Error) -> Result { Ok(ScVal::Error(<_ as TryInto>::try_into(st)?)) } } impl TryFrom<&Error> for ScVal { - type Error = stellar_xdr::Error; - fn try_from(value: &Error) -> Result { + type Error = crate::xdr::Error; + fn try_from(value: &Error) -> Result { (*value).try_into() } } @@ -152,10 +152,10 @@ impl From for Error { } } -impl From for Error { - fn from(e: stellar_xdr::Error) -> Self { +impl From for Error { + fn from(e: crate::xdr::Error) -> Self { match e { - stellar_xdr::Error::DepthLimitExceeded => { + crate::xdr::Error::DepthLimitExceeded => { Error::from_type_and_code(ScErrorType::Context, ScErrorCode::ExceededLimit) } _ => Error::from_type_and_code(ScErrorType::Value, ScErrorCode::InvalidInput), @@ -165,9 +165,9 @@ impl From for Error { // This never happens, but it's needed for some impls of TryFromVal downstream // in the SDK that use the xdr::Error type. -impl From for stellar_xdr::Error { +impl From for crate::xdr::Error { fn from(_value: Error) -> Self { - stellar_xdr::Error::Unsupported + crate::xdr::Error::Unsupported } } diff --git a/soroban-env-common/src/lib.rs b/soroban-env-common/src/lib.rs index 23a42e7f4..2e2d0c316 100644 --- a/soroban-env-common/src/lib.rs +++ b/soroban-env-common/src/lib.rs @@ -71,8 +71,11 @@ pub use num::{I256, U256}; pub use storage_type::StorageType; -// Re-export the XDR definitions -pub use stellar_xdr as xdr; +// Re-export the XDR definitions of a specific version -- curr or next -- of the xdr crate. +#[cfg(not(feature = "next"))] +pub use stellar_xdr::curr as xdr; +#[cfg(feature = "next")] +pub use stellar_xdr::next as xdr; // Val is the 64-bit transparent type. #[cfg(feature = "wasmi")] diff --git a/soroban-env-common/src/meta.rs b/soroban-env-common/src/meta.rs index f5add5769..118c698b5 100644 --- a/soroban-env-common/src/meta.rs +++ b/soroban-env-common/src/meta.rs @@ -40,9 +40,25 @@ pub const ENV_META_V0_SECTION_NAME: &str = "contractenvmetav0"; +// If the "next" feature is enabled, we're building from the "next" xdr +// definitions branch and rust module, which contains experimental, unstable, +// in-development definitions we aren't even close to ready to release to the +// network. This is typically associated with a one-higher-than-released +// protocol number for testing purposes. +#[cfg(feature = "next")] +soroban_env_macros::generate_env_meta_consts!( + ledger_protocol_version: 21, + pre_release_version: 1, +); + +// If the "next" feature is _not_ enabled, it means we're building for a +// nearly-current release to the network and are using the "curr" xdr branch and +// module. This will therefore be associated with a current or nearly-current +// network protocol number. +#[cfg(not(feature = "next"))] soroban_env_macros::generate_env_meta_consts!( ledger_protocol_version: 20, - pre_release_version: 57, + pre_release_version: 58, ); pub const fn get_ledger_protocol_version(interface_version: u64) -> u32 { diff --git a/soroban-env-common/src/num.rs b/soroban-env-common/src/num.rs index 230590efb..48e0307c8 100644 --- a/soroban-env-common/src/num.rs +++ b/soroban-env-common/src/num.rs @@ -1,5 +1,6 @@ use core::cmp::Ordering; +use crate::xdr::{Int256Parts, ScVal, UInt256Parts}; use crate::{ declare_tag_based_signed_small_and_object_wrappers, declare_tag_based_small_and_object_wrappers, @@ -7,7 +8,6 @@ use crate::{ Compare, ConversionError, Env, Tag, Val, }; pub use ethnum::{AsI256, AsU256, I256, U256}; -use stellar_xdr::{Int256Parts, ScVal, UInt256Parts}; declare_tag_based_wrapper!(U32Val); declare_tag_based_wrapper!(I32Val); diff --git a/soroban-env-common/src/object.rs b/soroban-env-common/src/object.rs index e3aea3d30..4a4af6eb3 100644 --- a/soroban-env-common/src/object.rs +++ b/soroban-env-common/src/object.rs @@ -1,9 +1,9 @@ +use crate::xdr::{Duration, ScVal, TimePoint}; use crate::{ impl_rawval_wrapper_base, num, val::ValConvert, Compare, ConversionError, Convert, Env, Tag, TryFromVal, Val, }; use core::{cmp::Ordering, fmt::Debug}; -use stellar_xdr::{Duration, ScVal, TimePoint}; /// Wrapper for a [Val] that is tagged with one of the object types, /// interpreting the [Val]'s body as containing a 32-bit object-code handle diff --git a/soroban-env-common/src/symbol.rs b/soroban-env-common/src/symbol.rs index 6102ce53c..cb2d9e3a5 100644 --- a/soroban-env-common/src/symbol.rs +++ b/soroban-env-common/src/symbol.rs @@ -169,8 +169,8 @@ impl TryFrom<&[u8]> for SymbolSmall { } #[cfg(feature = "std")] -use stellar_xdr::StringM; -use stellar_xdr::SCSYMBOL_LIMIT; +use crate::xdr::StringM; +use crate::xdr::SCSYMBOL_LIMIT; #[cfg(feature = "std")] impl TryFrom> for SymbolSmall { type Error = SymbolError; @@ -319,9 +319,17 @@ impl TryFromVal for SymbolStr { } else { let obj: SymbolObject = unsafe { SymbolObject::unchecked_from_val(v.0) }; let mut arr = [0u8; SCSYMBOL_LIMIT as usize]; - env.symbol_copy_to_slice(obj, Val::U32_ZERO, &mut arr) - .map_err(Into::into)?; - Ok(SymbolStr(arr)) + let len: u32 = env.symbol_len(obj).map_err(Into::into)?.into(); + if let Some(slice) = arr.get_mut(..len as usize) { + env.symbol_copy_to_slice(obj, Val::U32_ZERO, slice) + .map_err(Into::into)?; + Ok(SymbolStr(arr)) + } else { + Err(crate::Error::from_type_and_code( + crate::xdr::ScErrorType::Value, + crate::xdr::ScErrorCode::InternalError, + )) + } } } } diff --git a/soroban-env-common/src/val.rs b/soroban-env-common/src/val.rs index 5ed701c40..6c5f6e51c 100644 --- a/soroban-env-common/src/val.rs +++ b/soroban-env-common/src/val.rs @@ -1,12 +1,12 @@ // This permits globals prouced by derive(num_enum::TryFromPrimitive) below. #![cfg_attr(test, allow(non_upper_case_globals))] +use crate::xdr::{ScError, ScValType}; use crate::{ declare_tag_based_object_wrapper, declare_tag_based_wrapper, impl_rawval_wrapper_base, impl_tryfroms_and_tryfromvals_delegating_to_rawvalconvertible, Compare, I32Val, SymbolSmall, SymbolStr, U32Val, }; -use stellar_xdr::{ScError, ScValType}; use super::{Env, Error, TryFromVal}; use core::{cmp::Ordering, convert::Infallible, fmt::Debug}; @@ -97,7 +97,7 @@ pub enum Tag { SymbolSmall = 14, /// Tag for a [Val] that corresponds to - /// [stellar_xdr::ScVal::LedgerKeyContractInstance] + /// [crate::xdr::ScVal::LedgerKeyContractInstance] LedgerKeyContractInstance = 15, /// Code delimiting the upper boundary of "small" types. @@ -338,8 +338,8 @@ impl From for ConversionError { } } -impl From for ConversionError { - fn from(_: stellar_xdr::Error) -> Self { +impl From for ConversionError { + fn from(_: crate::xdr::Error) -> Self { ConversionError } } diff --git a/soroban-env-common/src/vmcaller_env.rs b/soroban-env-common/src/vmcaller_env.rs index 0c5e33098..dd4105aec 100644 --- a/soroban-env-common/src/vmcaller_env.rs +++ b/soroban-env-common/src/vmcaller_env.rs @@ -1,5 +1,5 @@ #[cfg(feature = "wasmi")] -use stellar_xdr::{ScErrorCode, ScErrorType}; +use crate::xdr::{ScErrorCode, ScErrorType}; use super::{ AddressObject, Bool, BytesObject, DurationObject, Error, I128Object, I256Object, I256Val, diff --git a/soroban-env-guest/Cargo.toml b/soroban-env-guest/Cargo.toml index 32aa10834..135296798 100644 --- a/soroban-env-guest/Cargo.toml +++ b/soroban-env-guest/Cargo.toml @@ -19,3 +19,4 @@ all-features = true [features] testutils = ["soroban-env-common/testutils"] +next = ["soroban-env-common/next"] diff --git a/soroban-env-host/Cargo.toml b/soroban-env-host/Cargo.toml index 72d6bafa2..aaeaae73c 100644 --- a/soroban-env-host/Cargo.toml +++ b/soroban-env-host/Cargo.toml @@ -53,6 +53,7 @@ linregress = "0.5.1" [features] testutils = ["soroban-env-common/testutils"] +next = ["soroban-env-common/next", "soroban-test-wasms/next"] tracy = ["dep:tracy-client"] [[bench]] diff --git a/soroban-env-host/src/host.rs b/soroban-env-host/src/host.rs index ae271e02c..19081baad 100644 --- a/soroban-env-host/src/host.rs +++ b/soroban-env-host/src/host.rs @@ -1123,8 +1123,7 @@ impl EnvBase for Host { b_pos: U32Val, slice: &mut [u8], ) -> Result<(), HostError> { - let len = self.visit_obj(s, |sym: &ScSymbol| Ok(sym.len()))?; - self.memobj_copy_to_slice::(s, b_pos, &mut slice[..len]) + self.memobj_copy_to_slice::(s, b_pos, slice) } fn bytes_new_from_slice(&self, mem: &[u8]) -> Result { diff --git a/soroban-env-macros/Cargo.toml b/soroban-env-macros/Cargo.toml index 76cc2d21c..ebc29c5d3 100644 --- a/soroban-env-macros/Cargo.toml +++ b/soroban-env-macros/Cargo.toml @@ -21,5 +21,8 @@ itertools = "0.10.3" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" +[features] +next = ["stellar-xdr/next"] + [package.metadata.docs.rs] all-features = true diff --git a/soroban-env-macros/src/lib.rs b/soroban-env-macros/src/lib.rs index 2b47d81e0..42d13bc47 100644 --- a/soroban-env-macros/src/lib.rs +++ b/soroban-env-macros/src/lib.rs @@ -7,7 +7,13 @@ use proc_macro::TokenStream; use quote::{quote, ToTokens}; use syn::{parse::Parse, parse_macro_input, Ident, LitInt, LitStr, Token}; -use stellar_xdr::{ScEnvMetaEntry, WriteXdr}; +// Import the XDR definitions of a specific version -- curr or next -- of the xdr crate. +#[cfg(not(feature = "next"))] +use stellar_xdr::curr as xdr; +#[cfg(feature = "next")] +use stellar_xdr::next as xdr; + +use crate::xdr::{ScEnvMetaEntry, WriteXdr}; struct MetaInput { pub interface_version: u64, @@ -55,7 +61,7 @@ impl ToTokens for MetaConstsOutput { .to_meta_entries() .into_iter() .map(|entry| entry.to_xdr()) - .collect::>, stellar_xdr::Error>>() + .collect::>, crate::xdr::Error>>() .unwrap() .concat(); let meta_xdr_len = meta_xdr.len(); diff --git a/soroban-synth-wasm/Cargo.toml b/soroban-synth-wasm/Cargo.toml index 411f61ed5..c025b2d01 100644 --- a/soroban-synth-wasm/Cargo.toml +++ b/soroban-synth-wasm/Cargo.toml @@ -15,6 +15,9 @@ wasm-encoder = "0.18.0" wasmparser = "0.106.0" soroban-env-common = { workspace = true } +[features] +next = ["soroban-env-common/next"] + [dev-dependencies] expect-test = "1.4.0" wasmprinter = "0.2.41" diff --git a/soroban-test-wasms/Cargo.toml b/soroban-test-wasms/Cargo.toml index 20a839a05..d581a24b3 100644 --- a/soroban-test-wasms/Cargo.toml +++ b/soroban-test-wasms/Cargo.toml @@ -5,3 +5,6 @@ description = "crate full of precompiled test WASM binaries for soroban -- for u edition = "2021" publish = false rust-version = "1.71" + +[features] +next = [] \ No newline at end of file diff --git a/soroban-test-wasms/src/lib.rs b/soroban-test-wasms/src/lib.rs index 5c2a5c3e7..56fb423e4 100644 --- a/soroban-test-wasms/src/lib.rs +++ b/soroban-test-wasms/src/lib.rs @@ -42,31 +42,84 @@ //! documentation purpopses without having to worry about breaking tests in //! the host here. -pub const ADD_I32: &[u8] = include_bytes!("../wasm-workspace/opt/example_add_i32.wasm").as_slice(); -pub const ADD_F32: &[u8] = include_bytes!("../wasm-workspace/opt/example_add_f32.wasm").as_slice(); -pub const ALLOC: &[u8] = include_bytes!("../wasm-workspace/opt/example_alloc.wasm").as_slice(); -pub const CREATE_CONTRACT: &[u8] = - include_bytes!("../wasm-workspace/opt/example_create_contract.wasm").as_slice(); -pub const CONTRACT_STORAGE: &[u8] = - include_bytes!("../wasm-workspace/opt/example_contract_data.wasm").as_slice(); -pub const LINEAR_MEMORY: &[u8] = - include_bytes!("../wasm-workspace/opt/example_linear_memory.wasm").as_slice(); -pub const VEC: &[u8] = include_bytes!("../wasm-workspace/opt/example_vec.wasm").as_slice(); -pub const INVOKE_CONTRACT: &[u8] = - include_bytes!("../wasm-workspace/opt/example_invoke_contract.wasm").as_slice(); -pub const HOSTILE: &[u8] = include_bytes!("../wasm-workspace/opt/example_hostile.wasm").as_slice(); -pub const FIB: &[u8] = include_bytes!("../wasm-workspace/opt/example_fib.wasm").as_slice(); -pub const FANNKUCH: &[u8] = - include_bytes!("../wasm-workspace/opt/example_fannkuch.wasm").as_slice(); -pub const COMPLEX: &[u8] = include_bytes!("../wasm-workspace/opt/example_complex.wasm").as_slice(); -pub const SIMPLE_ACCOUNT_CONTRACT: &[u8] = - include_bytes!("../wasm-workspace/opt/example_simple_account.wasm").as_slice(); -pub const AUTH_TEST_CONTRACT: &[u8] = - include_bytes!("../wasm-workspace/opt/auth_test_contract.wasm").as_slice(); -pub const UPDATEABLE_CONTRACT: &[u8] = - include_bytes!("../wasm-workspace/opt/example_updateable_contract.wasm").as_slice(); -pub const DELEGATED_ACCOUNT_TEST_CONTRACT: &[u8] = - include_bytes!("../wasm-workspace/opt/test_delegated_account.wasm").as_slice(); -pub const ERR: &[u8] = include_bytes!("../wasm-workspace/opt/example_err.wasm").as_slice(); -pub const WRITE_BYTES: &[u8] = - include_bytes!("../wasm-workspace/opt/soroban_write_upgrade_bytes_contract.wasm").as_slice(); +#[cfg(not(feature = "next"))] +pub use curr::*; + +#[cfg(not(feature = "next"))] +mod curr { + pub const ADD_I32: &[u8] = + include_bytes!("../wasm-workspace/opt/curr/example_add_i32.wasm").as_slice(); + pub const ADD_F32: &[u8] = + include_bytes!("../wasm-workspace/opt/curr/example_add_f32.wasm").as_slice(); + pub const ALLOC: &[u8] = + include_bytes!("../wasm-workspace/opt/curr/example_alloc.wasm").as_slice(); + pub const CREATE_CONTRACT: &[u8] = + include_bytes!("../wasm-workspace/opt/curr/example_create_contract.wasm").as_slice(); + pub const CONTRACT_STORAGE: &[u8] = + include_bytes!("../wasm-workspace/opt/curr/example_contract_data.wasm").as_slice(); + pub const LINEAR_MEMORY: &[u8] = + include_bytes!("../wasm-workspace/opt/curr/example_linear_memory.wasm").as_slice(); + pub const VEC: &[u8] = include_bytes!("../wasm-workspace/opt/curr/example_vec.wasm").as_slice(); + pub const INVOKE_CONTRACT: &[u8] = + include_bytes!("../wasm-workspace/opt/curr/example_invoke_contract.wasm").as_slice(); + pub const HOSTILE: &[u8] = + include_bytes!("../wasm-workspace/opt/curr/example_hostile.wasm").as_slice(); + pub const FIB: &[u8] = include_bytes!("../wasm-workspace/opt/curr/example_fib.wasm").as_slice(); + pub const FANNKUCH: &[u8] = + include_bytes!("../wasm-workspace/opt/curr/example_fannkuch.wasm").as_slice(); + pub const COMPLEX: &[u8] = + include_bytes!("../wasm-workspace/opt/curr/example_complex.wasm").as_slice(); + pub const SIMPLE_ACCOUNT_CONTRACT: &[u8] = + include_bytes!("../wasm-workspace/opt/curr/example_simple_account.wasm").as_slice(); + pub const AUTH_TEST_CONTRACT: &[u8] = + include_bytes!("../wasm-workspace/opt/curr/auth_test_contract.wasm").as_slice(); + pub const UPDATEABLE_CONTRACT: &[u8] = + include_bytes!("../wasm-workspace/opt/curr/example_updateable_contract.wasm").as_slice(); + pub const DELEGATED_ACCOUNT_TEST_CONTRACT: &[u8] = + include_bytes!("../wasm-workspace/opt/curr/test_delegated_account.wasm").as_slice(); + pub const ERR: &[u8] = include_bytes!("../wasm-workspace/opt/curr/example_err.wasm").as_slice(); + pub const WRITE_BYTES: &[u8] = + include_bytes!("../wasm-workspace/opt/curr/soroban_write_upgrade_bytes_contract.wasm") + .as_slice(); +} + +#[cfg(feature = "next")] +pub use next::*; + +#[cfg(feature = "next")] +mod next { + pub const ADD_I32: &[u8] = + include_bytes!("../wasm-workspace/opt/next/example_add_i32.wasm").as_slice(); + pub const ADD_F32: &[u8] = + include_bytes!("../wasm-workspace/opt/next/example_add_f32.wasm").as_slice(); + pub const ALLOC: &[u8] = + include_bytes!("../wasm-workspace/opt/next/example_alloc.wasm").as_slice(); + pub const CREATE_CONTRACT: &[u8] = + include_bytes!("../wasm-workspace/opt/next/example_create_contract.wasm").as_slice(); + pub const CONTRACT_STORAGE: &[u8] = + include_bytes!("../wasm-workspace/opt/next/example_contract_data.wasm").as_slice(); + pub const LINEAR_MEMORY: &[u8] = + include_bytes!("../wasm-workspace/opt/next/example_linear_memory.wasm").as_slice(); + pub const VEC: &[u8] = include_bytes!("../wasm-workspace/opt/next/example_vec.wasm").as_slice(); + pub const INVOKE_CONTRACT: &[u8] = + include_bytes!("../wasm-workspace/opt/next/example_invoke_contract.wasm").as_slice(); + pub const HOSTILE: &[u8] = + include_bytes!("../wasm-workspace/opt/next/example_hostile.wasm").as_slice(); + pub const FIB: &[u8] = include_bytes!("../wasm-workspace/opt/next/example_fib.wasm").as_slice(); + pub const FANNKUCH: &[u8] = + include_bytes!("../wasm-workspace/opt/next/example_fannkuch.wasm").as_slice(); + pub const COMPLEX: &[u8] = + include_bytes!("../wasm-workspace/opt/next/example_complex.wasm").as_slice(); + pub const SIMPLE_ACCOUNT_CONTRACT: &[u8] = + include_bytes!("../wasm-workspace/opt/next/example_simple_account.wasm").as_slice(); + pub const AUTH_TEST_CONTRACT: &[u8] = + include_bytes!("../wasm-workspace/opt/next/auth_test_contract.wasm").as_slice(); + pub const UPDATEABLE_CONTRACT: &[u8] = + include_bytes!("../wasm-workspace/opt/next/example_updateable_contract.wasm").as_slice(); + pub const DELEGATED_ACCOUNT_TEST_CONTRACT: &[u8] = + include_bytes!("../wasm-workspace/opt/next/test_delegated_account.wasm").as_slice(); + pub const ERR: &[u8] = include_bytes!("../wasm-workspace/opt/next/example_err.wasm").as_slice(); + pub const WRITE_BYTES: &[u8] = + include_bytes!("../wasm-workspace/opt/next/soroban_write_upgrade_bytes_contract.wasm") + .as_slice(); +} diff --git a/soroban-test-wasms/wasm-workspace/Cargo.lock b/soroban-test-wasms/wasm-workspace/Cargo.lock index a17ac0964..bb92c50ab 100644 --- a/soroban-test-wasms/wasm-workspace/Cargo.lock +++ b/soroban-test-wasms/wasm-workspace/Cargo.lock @@ -45,6 +45,7 @@ dependencies = [ name = "auth_test_contract" version = "0.0.0" dependencies = [ + "soroban-env-common", "soroban-sdk", ] @@ -408,6 +409,7 @@ checksum = "0198b9d0078e0f30dedc7acbb21c974e838fc8fae3ee170128658a98cb2c1c04" name = "example_add_f32" version = "0.0.0" dependencies = [ + "soroban-env-common", "soroban-sdk", ] @@ -415,6 +417,7 @@ dependencies = [ name = "example_add_i32" version = "0.0.0" dependencies = [ + "soroban-env-common", "soroban-sdk", ] @@ -422,6 +425,7 @@ dependencies = [ name = "example_alloc" version = "0.0.0" dependencies = [ + "soroban-env-common", "soroban-sdk", ] @@ -429,6 +433,7 @@ dependencies = [ name = "example_complex" version = "0.0.0" dependencies = [ + "soroban-env-common", "soroban-sdk", ] @@ -436,6 +441,7 @@ dependencies = [ name = "example_contract_data" version = "0.0.0" dependencies = [ + "soroban-env-common", "soroban-sdk", ] @@ -443,6 +449,7 @@ dependencies = [ name = "example_create_contract" version = "0.0.0" dependencies = [ + "soroban-env-common", "soroban-sdk", ] @@ -450,6 +457,7 @@ dependencies = [ name = "example_err" version = "0.0.0" dependencies = [ + "soroban-env-common", "soroban-sdk", ] @@ -457,6 +465,7 @@ dependencies = [ name = "example_fannkuch" version = "0.0.0" dependencies = [ + "soroban-env-common", "soroban-sdk", ] @@ -464,6 +473,7 @@ dependencies = [ name = "example_fib" version = "0.0.0" dependencies = [ + "soroban-env-common", "soroban-sdk", ] @@ -479,6 +489,7 @@ dependencies = [ name = "example_invoke_contract" version = "0.0.0" dependencies = [ + "soroban-env-common", "soroban-sdk", ] @@ -486,6 +497,7 @@ dependencies = [ name = "example_linear_memory" version = "0.0.0" dependencies = [ + "soroban-env-common", "soroban-sdk", ] @@ -493,6 +505,7 @@ dependencies = [ name = "example_simple_account" version = "0.0.0" dependencies = [ + "soroban-env-common", "soroban-sdk", ] @@ -500,6 +513,7 @@ dependencies = [ name = "example_updateable_contract" version = "0.0.0" dependencies = [ + "soroban-env-common", "soroban-sdk", ] @@ -507,6 +521,7 @@ dependencies = [ name = "example_vec" version = "0.0.0" dependencies = [ + "soroban-env-common", "soroban-sdk", ] @@ -1032,7 +1047,7 @@ checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" [[package]] name = "soroban-env-common" -version = "0.0.17" +version = "20.0.0-rc1" dependencies = [ "arbitrary", "crate-git-revision", @@ -1048,7 +1063,7 @@ dependencies = [ [[package]] name = "soroban-env-guest" -version = "0.0.17" +version = "20.0.0-rc1" dependencies = [ "soroban-env-common", "static_assertions", @@ -1056,7 +1071,7 @@ dependencies = [ [[package]] name = "soroban-env-host" -version = "0.0.17" +version = "20.0.0-rc1" dependencies = [ "backtrace", "ed25519-dalek", @@ -1078,7 +1093,7 @@ dependencies = [ [[package]] name = "soroban-env-macros" -version = "0.0.17" +version = "20.0.0-rc1" dependencies = [ "itertools", "proc-macro2", @@ -1091,7 +1106,7 @@ dependencies = [ [[package]] name = "soroban-ledger-snapshot" -version = "0.9.2" +version = "20.0.0-rc1" dependencies = [ "serde", "serde_json", @@ -1102,7 +1117,7 @@ dependencies = [ [[package]] name = "soroban-native-sdk-macros" -version = "0.0.17" +version = "20.0.0-rc1" dependencies = [ "itertools", "proc-macro2", @@ -1112,7 +1127,7 @@ dependencies = [ [[package]] name = "soroban-sdk" -version = "0.9.2" +version = "20.0.0-rc1" dependencies = [ "arbitrary", "bytes-lit", @@ -1128,7 +1143,7 @@ dependencies = [ [[package]] name = "soroban-sdk-macros" -version = "0.9.2" +version = "20.0.0-rc1" dependencies = [ "crate-git-revision", "darling", @@ -1146,7 +1161,7 @@ dependencies = [ [[package]] name = "soroban-spec" -version = "0.9.2" +version = "20.0.0-rc1" dependencies = [ "base64 0.13.1", "stellar-xdr", @@ -1156,7 +1171,7 @@ dependencies = [ [[package]] name = "soroban-spec-rust" -version = "0.9.2" +version = "20.0.0-rc1" dependencies = [ "prettyplease", "proc-macro2", @@ -1170,8 +1185,8 @@ dependencies = [ [[package]] name = "soroban-wasmi" -version = "0.30.0-soroban" -source = "git+https://github.com/stellar/wasmi?rev=284c963ba080703061797e2a3cba0853edee0dd4#284c963ba080703061797e2a3cba0853edee0dd4" +version = "0.31.0-soroban1" +source = "git+https://github.com/stellar/wasmi?rev=7e63b4c9e08c4163f417d118d81f7ea34789d0be#7e63b4c9e08c4163f417d118d81f7ea34789d0be" dependencies = [ "smallvec", "spin", @@ -1184,6 +1199,7 @@ dependencies = [ name = "soroban-write-upgrade-bytes-contract" version = "0.0.0" dependencies = [ + "soroban-env-common", "soroban-sdk", ] @@ -1220,8 +1236,8 @@ dependencies = [ [[package]] name = "stellar-xdr" -version = "0.0.17" -source = "git+https://github.com/stellar/rs-stellar-xdr?rev=39904e09941046dab61e6e35fc89e31bf2dea1cd#39904e09941046dab61e6e35fc89e31bf2dea1cd" +version = "20.0.0-rc1" +source = "git+https://github.com/stellar/rs-stellar-xdr?rev=d5ce0c9e7aa83461773a6e81662067f35d39e4c1#d5ce0c9e7aa83461773a6e81662067f35d39e4c1" dependencies = [ "arbitrary", "base64 0.13.1", @@ -1258,6 +1274,7 @@ dependencies = [ name = "test_delegated_account" version = "0.0.0" dependencies = [ + "soroban-env-common", "soroban-sdk", ] @@ -1390,12 +1407,12 @@ checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" [[package]] name = "wasmi_arena" version = "0.4.0" -source = "git+https://github.com/stellar/wasmi?rev=284c963ba080703061797e2a3cba0853edee0dd4#284c963ba080703061797e2a3cba0853edee0dd4" +source = "git+https://github.com/stellar/wasmi?rev=7e63b4c9e08c4163f417d118d81f7ea34789d0be#7e63b4c9e08c4163f417d118d81f7ea34789d0be" [[package]] name = "wasmi_core" -version = "0.12.0" -source = "git+https://github.com/stellar/wasmi?rev=284c963ba080703061797e2a3cba0853edee0dd4#284c963ba080703061797e2a3cba0853edee0dd4" +version = "0.13.0" +source = "git+https://github.com/stellar/wasmi?rev=7e63b4c9e08c4163f417d118d81f7ea34789d0be#7e63b4c9e08c4163f417d118d81f7ea34789d0be" dependencies = [ "downcast-rs", "libm", diff --git a/soroban-test-wasms/wasm-workspace/Cargo.toml b/soroban-test-wasms/wasm-workspace/Cargo.toml index f6c8b7e42..af3559a49 100644 --- a/soroban-test-wasms/wasm-workspace/Cargo.toml +++ b/soroban-test-wasms/wasm-workspace/Cargo.toml @@ -47,11 +47,11 @@ codegen-units = 1 lto = true [workspace.dependencies.soroban-sdk] -version = "0.9.2" +version = "20.0.0-rc1" git = "https://github.com/stellar/rs-soroban-sdk" [workspace.dependencies.soroban-env-common] -version = "0.0.17" +version = "20.0.0-rc1" git = "https://github.com/stellar/rs-soroban-env" # Always build from the local instance of env as we need to rebuild test WASMs diff --git a/soroban-test-wasms/wasm-workspace/Makefile b/soroban-test-wasms/wasm-workspace/Makefile index 0c7ed461f..9a0a62781 100644 --- a/soroban-test-wasms/wasm-workspace/Makefile +++ b/soroban-test-wasms/wasm-workspace/Makefile @@ -9,6 +9,17 @@ regenerate-test-wasms: -Z build-std=std,panic_abort \ -Z build-std-features=panic_immediate_abort for i in target/wasm32-unknown-unknown/release/*.wasm ; do \ - wasm-opt -Oz "$$i" -o "opt/$$(basename $$i)"; \ - ls -l "opt/$$(basename $$i)"; \ + wasm-opt -Oz "$$i" -o "opt/curr/$$(basename $$i)"; \ + ls -l "opt/curr/$$(basename $$i)"; \ + done + cargo clean + cargo +nightly build \ + --target wasm32-unknown-unknown \ + --release \ + --features next \ + -Z build-std=std,panic_abort \ + -Z build-std-features=panic_immediate_abort + for i in target/wasm32-unknown-unknown/release/*.wasm ; do \ + wasm-opt -Oz "$$i" -o "opt/next/$$(basename $$i)"; \ + ls -l "opt/next/$$(basename $$i)"; \ done diff --git a/soroban-test-wasms/wasm-workspace/add_f32/Cargo.toml b/soroban-test-wasms/wasm-workspace/add_f32/Cargo.toml index d81f20c8e..fa036f4a8 100644 --- a/soroban-test-wasms/wasm-workspace/add_f32/Cargo.toml +++ b/soroban-test-wasms/wasm-workspace/add_f32/Cargo.toml @@ -13,3 +13,7 @@ doctest = false [dependencies] soroban-sdk = { workspace = true } +soroban-env-common = { workspace = true } + +[features] +next = ["soroban-env-common/next"] \ No newline at end of file diff --git a/soroban-test-wasms/wasm-workspace/add_i32/Cargo.toml b/soroban-test-wasms/wasm-workspace/add_i32/Cargo.toml index 2e9637079..7693180a1 100644 --- a/soroban-test-wasms/wasm-workspace/add_i32/Cargo.toml +++ b/soroban-test-wasms/wasm-workspace/add_i32/Cargo.toml @@ -13,3 +13,7 @@ doctest = false [dependencies] soroban-sdk = { workspace = true } +soroban-env-common = { workspace = true } + +[features] +next = ["soroban-env-common/next"] \ No newline at end of file diff --git a/soroban-test-wasms/wasm-workspace/alloc/Cargo.toml b/soroban-test-wasms/wasm-workspace/alloc/Cargo.toml index 1b50386fe..937ae290b 100644 --- a/soroban-test-wasms/wasm-workspace/alloc/Cargo.toml +++ b/soroban-test-wasms/wasm-workspace/alloc/Cargo.toml @@ -13,3 +13,7 @@ doctest = false [dependencies] soroban-sdk = { workspace = true, features = ["alloc"] } +soroban-env-common = { workspace = true } + +[features] +next = ["soroban-env-common/next"] \ No newline at end of file diff --git a/soroban-test-wasms/wasm-workspace/auth/Cargo.toml b/soroban-test-wasms/wasm-workspace/auth/Cargo.toml index cd24e3b42..196fc529b 100644 --- a/soroban-test-wasms/wasm-workspace/auth/Cargo.toml +++ b/soroban-test-wasms/wasm-workspace/auth/Cargo.toml @@ -13,3 +13,7 @@ doctest = false [dependencies] soroban-sdk = { workspace = true } +soroban-env-common = { workspace = true } + +[features] +next = ["soroban-env-common/next"] \ No newline at end of file diff --git a/soroban-test-wasms/wasm-workspace/complex/Cargo.toml b/soroban-test-wasms/wasm-workspace/complex/Cargo.toml index 9d16774c7..e6a33907d 100644 --- a/soroban-test-wasms/wasm-workspace/complex/Cargo.toml +++ b/soroban-test-wasms/wasm-workspace/complex/Cargo.toml @@ -12,3 +12,7 @@ doctest = false [dependencies] soroban-sdk = { workspace = true } +soroban-env-common = { workspace = true } + +[features] +next = ["soroban-env-common/next"] \ No newline at end of file diff --git a/soroban-test-wasms/wasm-workspace/contract_data/Cargo.toml b/soroban-test-wasms/wasm-workspace/contract_data/Cargo.toml index 48eb045b2..06f5bc65e 100644 --- a/soroban-test-wasms/wasm-workspace/contract_data/Cargo.toml +++ b/soroban-test-wasms/wasm-workspace/contract_data/Cargo.toml @@ -12,6 +12,8 @@ doctest = false [dependencies] soroban-sdk = { workspace = true } +soroban-env-common = { workspace = true } [features] +next = ["soroban-env-common/next"] testutils = ["soroban-sdk/testutils"] diff --git a/soroban-test-wasms/wasm-workspace/create_contract/Cargo.toml b/soroban-test-wasms/wasm-workspace/create_contract/Cargo.toml index 1766eec1b..b1d2182c7 100644 --- a/soroban-test-wasms/wasm-workspace/create_contract/Cargo.toml +++ b/soroban-test-wasms/wasm-workspace/create_contract/Cargo.toml @@ -13,3 +13,7 @@ doctest = false [dependencies] soroban-sdk = { workspace = true } +soroban-env-common = { workspace = true } + +[features] +next = ["soroban-env-common/next"] \ No newline at end of file diff --git a/soroban-test-wasms/wasm-workspace/delegated_account/Cargo.toml b/soroban-test-wasms/wasm-workspace/delegated_account/Cargo.toml index befef45ae..bb0288ab9 100644 --- a/soroban-test-wasms/wasm-workspace/delegated_account/Cargo.toml +++ b/soroban-test-wasms/wasm-workspace/delegated_account/Cargo.toml @@ -12,3 +12,7 @@ doctest = false [dependencies] soroban-sdk = { workspace = true } +soroban-env-common = { workspace = true } + +[features] +next = ["soroban-env-common/next"] \ No newline at end of file diff --git a/soroban-test-wasms/wasm-workspace/err/Cargo.toml b/soroban-test-wasms/wasm-workspace/err/Cargo.toml index 4a0f7d972..46f88089e 100644 --- a/soroban-test-wasms/wasm-workspace/err/Cargo.toml +++ b/soroban-test-wasms/wasm-workspace/err/Cargo.toml @@ -12,4 +12,8 @@ crate-type = ["cdylib", "rlib"] doctest = false [dependencies] -soroban-sdk = { workspace = true } \ No newline at end of file +soroban-sdk = { workspace = true } +soroban-env-common = { workspace = true } + +[features] +next = ["soroban-env-common/next"] \ No newline at end of file diff --git a/soroban-test-wasms/wasm-workspace/fannkuch/Cargo.toml b/soroban-test-wasms/wasm-workspace/fannkuch/Cargo.toml index e21acfed6..798c5d9dc 100644 --- a/soroban-test-wasms/wasm-workspace/fannkuch/Cargo.toml +++ b/soroban-test-wasms/wasm-workspace/fannkuch/Cargo.toml @@ -12,4 +12,8 @@ crate-type = ["cdylib", "rlib"] doctest = false [dependencies] -soroban-sdk = { workspace = true } \ No newline at end of file +soroban-sdk = { workspace = true } +soroban-env-common = { workspace = true } + +[features] +next = ["soroban-env-common/next"] \ No newline at end of file diff --git a/soroban-test-wasms/wasm-workspace/fib/Cargo.toml b/soroban-test-wasms/wasm-workspace/fib/Cargo.toml index 4bb349e1a..0a5984804 100644 --- a/soroban-test-wasms/wasm-workspace/fib/Cargo.toml +++ b/soroban-test-wasms/wasm-workspace/fib/Cargo.toml @@ -12,4 +12,8 @@ crate-type = ["cdylib", "rlib"] doctest = false [dependencies] -soroban-sdk = { workspace = true } \ No newline at end of file +soroban-sdk = { workspace = true } +soroban-env-common = { workspace = true } + +[features] +next = ["soroban-env-common/next"] \ No newline at end of file diff --git a/soroban-test-wasms/wasm-workspace/hostile/Cargo.toml b/soroban-test-wasms/wasm-workspace/hostile/Cargo.toml index 412f25a38..e9fd77375 100644 --- a/soroban-test-wasms/wasm-workspace/hostile/Cargo.toml +++ b/soroban-test-wasms/wasm-workspace/hostile/Cargo.toml @@ -13,4 +13,7 @@ doctest = false [dependencies] soroban-sdk = { workspace = true } -soroban-env-common = { workspace = true } \ No newline at end of file +soroban-env-common = { workspace = true } + +[features] +next = ["soroban-env-common/next"] diff --git a/soroban-test-wasms/wasm-workspace/invoke_contract/Cargo.toml b/soroban-test-wasms/wasm-workspace/invoke_contract/Cargo.toml index 4e39942b0..d52ee2120 100644 --- a/soroban-test-wasms/wasm-workspace/invoke_contract/Cargo.toml +++ b/soroban-test-wasms/wasm-workspace/invoke_contract/Cargo.toml @@ -13,3 +13,7 @@ doctest = false [dependencies] soroban-sdk = { workspace = true } +soroban-env-common = { workspace = true } + +[features] +next = ["soroban-env-common/next"] \ No newline at end of file diff --git a/soroban-test-wasms/wasm-workspace/linear_memory/Cargo.toml b/soroban-test-wasms/wasm-workspace/linear_memory/Cargo.toml index 6aaf08c7f..0bedabadd 100644 --- a/soroban-test-wasms/wasm-workspace/linear_memory/Cargo.toml +++ b/soroban-test-wasms/wasm-workspace/linear_memory/Cargo.toml @@ -11,4 +11,8 @@ crate-type = ["cdylib", "rlib"] doctest = false [dependencies] -soroban-sdk = { workspace = true } \ No newline at end of file +soroban-sdk = { workspace = true } +soroban-env-common = { workspace = true } + +[features] +next = ["soroban-env-common/next"] \ No newline at end of file diff --git a/soroban-test-wasms/wasm-workspace/opt/auth_test_contract.wasm b/soroban-test-wasms/wasm-workspace/opt/auth_test_contract.wasm deleted file mode 100644 index fa084050b..000000000 Binary files a/soroban-test-wasms/wasm-workspace/opt/auth_test_contract.wasm and /dev/null differ diff --git a/soroban-test-wasms/wasm-workspace/opt/alloc.wasm b/soroban-test-wasms/wasm-workspace/opt/curr/alloc.wasm similarity index 100% rename from soroban-test-wasms/wasm-workspace/opt/alloc.wasm rename to soroban-test-wasms/wasm-workspace/opt/curr/alloc.wasm diff --git a/soroban-test-wasms/wasm-workspace/opt/curr/auth_test_contract.wasm b/soroban-test-wasms/wasm-workspace/opt/curr/auth_test_contract.wasm new file mode 100644 index 000000000..69a006add Binary files /dev/null and b/soroban-test-wasms/wasm-workspace/opt/curr/auth_test_contract.wasm differ diff --git a/soroban-test-wasms/wasm-workspace/opt/example_add_f32.wasm b/soroban-test-wasms/wasm-workspace/opt/curr/example_add_f32.wasm similarity index 83% rename from soroban-test-wasms/wasm-workspace/opt/example_add_f32.wasm rename to soroban-test-wasms/wasm-workspace/opt/curr/example_add_f32.wasm index 4dd82484f..0a02a67fd 100644 Binary files a/soroban-test-wasms/wasm-workspace/opt/example_add_f32.wasm and b/soroban-test-wasms/wasm-workspace/opt/curr/example_add_f32.wasm differ diff --git a/soroban-test-wasms/wasm-workspace/opt/example_add_i32.wasm b/soroban-test-wasms/wasm-workspace/opt/curr/example_add_i32.wasm similarity index 82% rename from soroban-test-wasms/wasm-workspace/opt/example_add_i32.wasm rename to soroban-test-wasms/wasm-workspace/opt/curr/example_add_i32.wasm index da7f7e1fb..59a01d3cb 100644 Binary files a/soroban-test-wasms/wasm-workspace/opt/example_add_i32.wasm and b/soroban-test-wasms/wasm-workspace/opt/curr/example_add_i32.wasm differ diff --git a/soroban-test-wasms/wasm-workspace/opt/example_alloc.wasm b/soroban-test-wasms/wasm-workspace/opt/curr/example_alloc.wasm similarity index 93% rename from soroban-test-wasms/wasm-workspace/opt/example_alloc.wasm rename to soroban-test-wasms/wasm-workspace/opt/curr/example_alloc.wasm index 3beb6bf9a..827a44ab8 100644 Binary files a/soroban-test-wasms/wasm-workspace/opt/example_alloc.wasm and b/soroban-test-wasms/wasm-workspace/opt/curr/example_alloc.wasm differ diff --git a/soroban-test-wasms/wasm-workspace/opt/curr/example_complex.wasm b/soroban-test-wasms/wasm-workspace/opt/curr/example_complex.wasm new file mode 100644 index 000000000..153cf505a Binary files /dev/null and b/soroban-test-wasms/wasm-workspace/opt/curr/example_complex.wasm differ diff --git a/soroban-test-wasms/wasm-workspace/opt/curr/example_contract_data.wasm b/soroban-test-wasms/wasm-workspace/opt/curr/example_contract_data.wasm new file mode 100644 index 000000000..2e192709a Binary files /dev/null and b/soroban-test-wasms/wasm-workspace/opt/curr/example_contract_data.wasm differ diff --git a/soroban-test-wasms/wasm-workspace/opt/example_create_contract.wasm b/soroban-test-wasms/wasm-workspace/opt/curr/example_create_contract.wasm similarity index 75% rename from soroban-test-wasms/wasm-workspace/opt/example_create_contract.wasm rename to soroban-test-wasms/wasm-workspace/opt/curr/example_create_contract.wasm index 4af2b4c32..854a4c4bb 100644 Binary files a/soroban-test-wasms/wasm-workspace/opt/example_create_contract.wasm and b/soroban-test-wasms/wasm-workspace/opt/curr/example_create_contract.wasm differ diff --git a/soroban-test-wasms/wasm-workspace/opt/example_err.wasm b/soroban-test-wasms/wasm-workspace/opt/curr/example_err.wasm similarity index 56% rename from soroban-test-wasms/wasm-workspace/opt/example_err.wasm rename to soroban-test-wasms/wasm-workspace/opt/curr/example_err.wasm index c85247e46..3fc39ea3d 100644 Binary files a/soroban-test-wasms/wasm-workspace/opt/example_err.wasm and b/soroban-test-wasms/wasm-workspace/opt/curr/example_err.wasm differ diff --git a/soroban-test-wasms/wasm-workspace/opt/example_fannkuch.wasm b/soroban-test-wasms/wasm-workspace/opt/curr/example_fannkuch.wasm similarity index 87% rename from soroban-test-wasms/wasm-workspace/opt/example_fannkuch.wasm rename to soroban-test-wasms/wasm-workspace/opt/curr/example_fannkuch.wasm index e0486487b..0be147968 100644 Binary files a/soroban-test-wasms/wasm-workspace/opt/example_fannkuch.wasm and b/soroban-test-wasms/wasm-workspace/opt/curr/example_fannkuch.wasm differ diff --git a/soroban-test-wasms/wasm-workspace/opt/example_fib.wasm b/soroban-test-wasms/wasm-workspace/opt/curr/example_fib.wasm similarity index 64% rename from soroban-test-wasms/wasm-workspace/opt/example_fib.wasm rename to soroban-test-wasms/wasm-workspace/opt/curr/example_fib.wasm index 57014cd46..96a91ef83 100644 Binary files a/soroban-test-wasms/wasm-workspace/opt/example_fib.wasm and b/soroban-test-wasms/wasm-workspace/opt/curr/example_fib.wasm differ diff --git a/soroban-test-wasms/wasm-workspace/opt/example_hostile.wasm b/soroban-test-wasms/wasm-workspace/opt/curr/example_hostile.wasm similarity index 91% rename from soroban-test-wasms/wasm-workspace/opt/example_hostile.wasm rename to soroban-test-wasms/wasm-workspace/opt/curr/example_hostile.wasm index 277e05af8..4a45e59b2 100644 Binary files a/soroban-test-wasms/wasm-workspace/opt/example_hostile.wasm and b/soroban-test-wasms/wasm-workspace/opt/curr/example_hostile.wasm differ diff --git a/soroban-test-wasms/wasm-workspace/opt/example_invoke_contract.wasm b/soroban-test-wasms/wasm-workspace/opt/curr/example_invoke_contract.wasm similarity index 77% rename from soroban-test-wasms/wasm-workspace/opt/example_invoke_contract.wasm rename to soroban-test-wasms/wasm-workspace/opt/curr/example_invoke_contract.wasm index 15b3eb9ac..7ee3d6cde 100644 Binary files a/soroban-test-wasms/wasm-workspace/opt/example_invoke_contract.wasm and b/soroban-test-wasms/wasm-workspace/opt/curr/example_invoke_contract.wasm differ diff --git a/soroban-test-wasms/wasm-workspace/opt/example_linear_memory.wasm b/soroban-test-wasms/wasm-workspace/opt/curr/example_linear_memory.wasm similarity index 84% rename from soroban-test-wasms/wasm-workspace/opt/example_linear_memory.wasm rename to soroban-test-wasms/wasm-workspace/opt/curr/example_linear_memory.wasm index 5c8496191..ea90283d6 100644 Binary files a/soroban-test-wasms/wasm-workspace/opt/example_linear_memory.wasm and b/soroban-test-wasms/wasm-workspace/opt/curr/example_linear_memory.wasm differ diff --git a/soroban-test-wasms/wasm-workspace/opt/example_simple_account.wasm b/soroban-test-wasms/wasm-workspace/opt/curr/example_simple_account.wasm similarity index 72% rename from soroban-test-wasms/wasm-workspace/opt/example_simple_account.wasm rename to soroban-test-wasms/wasm-workspace/opt/curr/example_simple_account.wasm index 211f4ee3b..5ca5692d1 100644 Binary files a/soroban-test-wasms/wasm-workspace/opt/example_simple_account.wasm and b/soroban-test-wasms/wasm-workspace/opt/curr/example_simple_account.wasm differ diff --git a/soroban-test-wasms/wasm-workspace/opt/example_updateable_contract.wasm b/soroban-test-wasms/wasm-workspace/opt/curr/example_updateable_contract.wasm similarity index 73% rename from soroban-test-wasms/wasm-workspace/opt/example_updateable_contract.wasm rename to soroban-test-wasms/wasm-workspace/opt/curr/example_updateable_contract.wasm index 1c1fb9fab..84bd5c41b 100644 Binary files a/soroban-test-wasms/wasm-workspace/opt/example_updateable_contract.wasm and b/soroban-test-wasms/wasm-workspace/opt/curr/example_updateable_contract.wasm differ diff --git a/soroban-test-wasms/wasm-workspace/opt/example_vec.wasm b/soroban-test-wasms/wasm-workspace/opt/curr/example_vec.wasm similarity index 76% rename from soroban-test-wasms/wasm-workspace/opt/example_vec.wasm rename to soroban-test-wasms/wasm-workspace/opt/curr/example_vec.wasm index 20a948b18..499a3dff0 100644 Binary files a/soroban-test-wasms/wasm-workspace/opt/example_vec.wasm and b/soroban-test-wasms/wasm-workspace/opt/curr/example_vec.wasm differ diff --git a/soroban-test-wasms/wasm-workspace/opt/soroban_write_upgrade_bytes_contract.wasm b/soroban-test-wasms/wasm-workspace/opt/curr/soroban_write_upgrade_bytes_contract.wasm similarity index 81% rename from soroban-test-wasms/wasm-workspace/opt/soroban_write_upgrade_bytes_contract.wasm rename to soroban-test-wasms/wasm-workspace/opt/curr/soroban_write_upgrade_bytes_contract.wasm index 870caa766..6accca247 100644 Binary files a/soroban-test-wasms/wasm-workspace/opt/soroban_write_upgrade_bytes_contract.wasm and b/soroban-test-wasms/wasm-workspace/opt/curr/soroban_write_upgrade_bytes_contract.wasm differ diff --git a/soroban-test-wasms/wasm-workspace/opt/curr/test_delegated_account.wasm b/soroban-test-wasms/wasm-workspace/opt/curr/test_delegated_account.wasm new file mode 100644 index 000000000..0675bc5a6 Binary files /dev/null and b/soroban-test-wasms/wasm-workspace/opt/curr/test_delegated_account.wasm differ diff --git a/soroban-test-wasms/wasm-workspace/opt/example_complex.wasm b/soroban-test-wasms/wasm-workspace/opt/example_complex.wasm deleted file mode 100644 index 7f2042d5b..000000000 Binary files a/soroban-test-wasms/wasm-workspace/opt/example_complex.wasm and /dev/null differ diff --git a/soroban-test-wasms/wasm-workspace/opt/example_contract_data.wasm b/soroban-test-wasms/wasm-workspace/opt/example_contract_data.wasm deleted file mode 100644 index b8fca7887..000000000 Binary files a/soroban-test-wasms/wasm-workspace/opt/example_contract_data.wasm and /dev/null differ diff --git a/soroban-test-wasms/wasm-workspace/opt/next/auth_test_contract.wasm b/soroban-test-wasms/wasm-workspace/opt/next/auth_test_contract.wasm new file mode 100644 index 000000000..d9c0eea4d Binary files /dev/null and b/soroban-test-wasms/wasm-workspace/opt/next/auth_test_contract.wasm differ diff --git a/soroban-test-wasms/wasm-workspace/opt/next/example_add_f32.wasm b/soroban-test-wasms/wasm-workspace/opt/next/example_add_f32.wasm new file mode 100644 index 000000000..76b998175 Binary files /dev/null and b/soroban-test-wasms/wasm-workspace/opt/next/example_add_f32.wasm differ diff --git a/soroban-test-wasms/wasm-workspace/opt/next/example_add_i32.wasm b/soroban-test-wasms/wasm-workspace/opt/next/example_add_i32.wasm new file mode 100644 index 000000000..71a391548 Binary files /dev/null and b/soroban-test-wasms/wasm-workspace/opt/next/example_add_i32.wasm differ diff --git a/soroban-test-wasms/wasm-workspace/opt/next/example_alloc.wasm b/soroban-test-wasms/wasm-workspace/opt/next/example_alloc.wasm new file mode 100644 index 000000000..2a2b0c861 Binary files /dev/null and b/soroban-test-wasms/wasm-workspace/opt/next/example_alloc.wasm differ diff --git a/soroban-test-wasms/wasm-workspace/opt/next/example_complex.wasm b/soroban-test-wasms/wasm-workspace/opt/next/example_complex.wasm new file mode 100644 index 000000000..2c239df97 Binary files /dev/null and b/soroban-test-wasms/wasm-workspace/opt/next/example_complex.wasm differ diff --git a/soroban-test-wasms/wasm-workspace/opt/next/example_contract_data.wasm b/soroban-test-wasms/wasm-workspace/opt/next/example_contract_data.wasm new file mode 100644 index 000000000..103431a2b Binary files /dev/null and b/soroban-test-wasms/wasm-workspace/opt/next/example_contract_data.wasm differ diff --git a/soroban-test-wasms/wasm-workspace/opt/next/example_create_contract.wasm b/soroban-test-wasms/wasm-workspace/opt/next/example_create_contract.wasm new file mode 100644 index 000000000..15d51427f Binary files /dev/null and b/soroban-test-wasms/wasm-workspace/opt/next/example_create_contract.wasm differ diff --git a/soroban-test-wasms/wasm-workspace/opt/next/example_err.wasm b/soroban-test-wasms/wasm-workspace/opt/next/example_err.wasm new file mode 100644 index 000000000..c719ec061 Binary files /dev/null and b/soroban-test-wasms/wasm-workspace/opt/next/example_err.wasm differ diff --git a/soroban-test-wasms/wasm-workspace/opt/next/example_fannkuch.wasm b/soroban-test-wasms/wasm-workspace/opt/next/example_fannkuch.wasm new file mode 100644 index 000000000..27e761d2d Binary files /dev/null and b/soroban-test-wasms/wasm-workspace/opt/next/example_fannkuch.wasm differ diff --git a/soroban-test-wasms/wasm-workspace/opt/next/example_fib.wasm b/soroban-test-wasms/wasm-workspace/opt/next/example_fib.wasm new file mode 100644 index 000000000..7d093ca0a Binary files /dev/null and b/soroban-test-wasms/wasm-workspace/opt/next/example_fib.wasm differ diff --git a/soroban-test-wasms/wasm-workspace/opt/next/example_hostile.wasm b/soroban-test-wasms/wasm-workspace/opt/next/example_hostile.wasm new file mode 100644 index 000000000..6e367901e Binary files /dev/null and b/soroban-test-wasms/wasm-workspace/opt/next/example_hostile.wasm differ diff --git a/soroban-test-wasms/wasm-workspace/opt/next/example_invoke_contract.wasm b/soroban-test-wasms/wasm-workspace/opt/next/example_invoke_contract.wasm new file mode 100644 index 000000000..4b023c267 Binary files /dev/null and b/soroban-test-wasms/wasm-workspace/opt/next/example_invoke_contract.wasm differ diff --git a/soroban-test-wasms/wasm-workspace/opt/next/example_linear_memory.wasm b/soroban-test-wasms/wasm-workspace/opt/next/example_linear_memory.wasm new file mode 100644 index 000000000..aeecbf9e9 Binary files /dev/null and b/soroban-test-wasms/wasm-workspace/opt/next/example_linear_memory.wasm differ diff --git a/soroban-test-wasms/wasm-workspace/opt/next/example_simple_account.wasm b/soroban-test-wasms/wasm-workspace/opt/next/example_simple_account.wasm new file mode 100644 index 000000000..64ef1a445 Binary files /dev/null and b/soroban-test-wasms/wasm-workspace/opt/next/example_simple_account.wasm differ diff --git a/soroban-test-wasms/wasm-workspace/opt/next/example_updateable_contract.wasm b/soroban-test-wasms/wasm-workspace/opt/next/example_updateable_contract.wasm new file mode 100644 index 000000000..eb47dfe0c Binary files /dev/null and b/soroban-test-wasms/wasm-workspace/opt/next/example_updateable_contract.wasm differ diff --git a/soroban-test-wasms/wasm-workspace/opt/next/example_vec.wasm b/soroban-test-wasms/wasm-workspace/opt/next/example_vec.wasm new file mode 100644 index 000000000..2e14d1692 Binary files /dev/null and b/soroban-test-wasms/wasm-workspace/opt/next/example_vec.wasm differ diff --git a/soroban-test-wasms/wasm-workspace/opt/next/soroban_write_upgrade_bytes_contract.wasm b/soroban-test-wasms/wasm-workspace/opt/next/soroban_write_upgrade_bytes_contract.wasm new file mode 100644 index 000000000..97ca15ed4 Binary files /dev/null and b/soroban-test-wasms/wasm-workspace/opt/next/soroban_write_upgrade_bytes_contract.wasm differ diff --git a/soroban-test-wasms/wasm-workspace/opt/next/test_delegated_account.wasm b/soroban-test-wasms/wasm-workspace/opt/next/test_delegated_account.wasm new file mode 100644 index 000000000..af7aae19d Binary files /dev/null and b/soroban-test-wasms/wasm-workspace/opt/next/test_delegated_account.wasm differ diff --git a/soroban-test-wasms/wasm-workspace/opt/test_delegated_account.wasm b/soroban-test-wasms/wasm-workspace/opt/test_delegated_account.wasm deleted file mode 100644 index 725df682a..000000000 Binary files a/soroban-test-wasms/wasm-workspace/opt/test_delegated_account.wasm and /dev/null differ diff --git a/soroban-test-wasms/wasm-workspace/simple_account/Cargo.toml b/soroban-test-wasms/wasm-workspace/simple_account/Cargo.toml index cad58e727..1639123dc 100644 --- a/soroban-test-wasms/wasm-workspace/simple_account/Cargo.toml +++ b/soroban-test-wasms/wasm-workspace/simple_account/Cargo.toml @@ -12,3 +12,7 @@ doctest = false [dependencies] soroban-sdk = { workspace = true } +soroban-env-common = { workspace = true } + +[features] +next = ["soroban-env-common/next"] \ No newline at end of file diff --git a/soroban-test-wasms/wasm-workspace/update/Cargo.toml b/soroban-test-wasms/wasm-workspace/update/Cargo.toml index f42d011df..8e3ef6d3e 100644 --- a/soroban-test-wasms/wasm-workspace/update/Cargo.toml +++ b/soroban-test-wasms/wasm-workspace/update/Cargo.toml @@ -13,3 +13,7 @@ doctest = false [dependencies] soroban-sdk = { workspace = true } +soroban-env-common = { workspace = true } + +[features] +next = ["soroban-env-common/next"] \ No newline at end of file diff --git a/soroban-test-wasms/wasm-workspace/vec/Cargo.toml b/soroban-test-wasms/wasm-workspace/vec/Cargo.toml index d4e6f25e4..b5623d12f 100644 --- a/soroban-test-wasms/wasm-workspace/vec/Cargo.toml +++ b/soroban-test-wasms/wasm-workspace/vec/Cargo.toml @@ -11,4 +11,8 @@ crate-type = ["cdylib", "rlib"] doctest = false [dependencies] -soroban-sdk = { workspace = true } \ No newline at end of file +soroban-sdk = { workspace = true } +soroban-env-common = { workspace = true } + +[features] +next = ["soroban-env-common/next"] \ No newline at end of file diff --git a/soroban-test-wasms/wasm-workspace/write_upgrade_bytes/Cargo.toml b/soroban-test-wasms/wasm-workspace/write_upgrade_bytes/Cargo.toml index fbf1f56c5..2701251c1 100644 --- a/soroban-test-wasms/wasm-workspace/write_upgrade_bytes/Cargo.toml +++ b/soroban-test-wasms/wasm-workspace/write_upgrade_bytes/Cargo.toml @@ -12,4 +12,8 @@ crate-type = ["cdylib", "rlib"] doctest = false [dependencies] -soroban-sdk = { workspace = true } \ No newline at end of file +soroban-sdk = { workspace = true } +soroban-env-common = { workspace = true } + +[features] +next = ["soroban-env-common/next"] \ No newline at end of file