Skip to content

Commit 893afcc

Browse files
committed
Merge remote-tracking branch 'upstream/main' into p28-cap-0084
# Conflicts: # Cargo.lock # Cargo.toml
2 parents 78166c2 + 88cadc3 commit 893afcc

636 files changed

Lines changed: 139722 additions & 135742 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Cargo.lock

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

Cargo.toml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ exclude = ["soroban-test-wasms/wasm-workspace"]
2121
# NB: When bumping the major version make sure to clean up the
2222
# code guarded by `unstable-*` features to make it enabled
2323
# unconditionally.
24-
version = "27.0.0"
24+
version = "28.0.0"
2525
rust-version = "1.84.0"
2626

2727
[workspace.dependencies]
28-
soroban-env-common = { version = "=27.0.0", path = "soroban-env-common", default-features = false }
29-
soroban-env-guest = { version = "=27.0.0", path = "soroban-env-guest" }
30-
soroban-env-host = { version = "=27.0.0", path = "soroban-env-host" }
31-
soroban-env-macros = { version = "=27.0.0", path = "soroban-env-macros" }
32-
soroban-builtin-sdk-macros = { version = "=27.0.0", path = "soroban-builtin-sdk-macros" }
28+
soroban-env-common = { version = "=28.0.0", path = "soroban-env-common", default-features = false }
29+
soroban-env-guest = { version = "=28.0.0", path = "soroban-env-guest" }
30+
soroban-env-host = { version = "=28.0.0", path = "soroban-env-host" }
31+
soroban-env-macros = { version = "=28.0.0", path = "soroban-env-macros" }
32+
soroban-builtin-sdk-macros = { version = "=28.0.0", path = "soroban-builtin-sdk-macros" }
3333
# NB: this must match the wasmparser version wasmi is using
3434
wasmparser = "=0.116.1"
3535

@@ -38,9 +38,11 @@ wasmparser = "=0.116.1"
3838
version = "=28.0.0"
3939
# SPIKE: rs-stellar-xdr#552 (CAP-0084). Fork-hosted branch p28-cap-0084.
4040
# Productionize -> stellar/rs-stellar-xdr merged SHA (or crates.io 28.0.0) once #552 lands.
41+
# Refreshed head carries both CAP-0084 and CAP-0085 (base merged CAP-85 after this PR opened).
4142
git = "https://github.com/sisuresh/rs-stellar-xdr"
42-
rev = "cf7fdedf7ca95fccf45c82e6829d14637c9b5e4c"
43+
rev = "b0fa30a3a2a29be74f6a98a567e9b586800db509"
4344
default-features = false
45+
features = ["cap_0085_executable_ref"]
4446

4547
[workspace.dependencies.wasmi]
4648
package = "soroban-wasmi"

deny.toml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -99,14 +99,7 @@ ignore = [
9999
# Ignores 'Rand is unsound with a custom logger using rand::rng()' advisory.
100100
# `rand` 0.8.5 is only vulnerable when its `log` + `thread_rng` path is
101101
# enabled with a custom logger, which we don't use
102-
"RUSTSEC-2026-0097",
103-
# TEMP CAP-0084 SPIKE: ignores 'Unsoundness in `anyhow::Error::downcast_mut()`'
104-
# (RUSTSEC-2026-0190, affects anyhow < 1.0.103). This PR keeps anyhow pinned at
105-
# 1.0.75 to avoid an out-of-scope dependency bump; the fix (anyhow -> 1.0.103)
106-
# is carried by the dedicated advisory PR stellar/rs-soroban-env#1701. Remove
107-
# this once #1701 (or a release carrying the bump) lands anyhow >= 1.0.103 into
108-
# main and this PR rebases.
109-
"RUSTSEC-2026-0190"
102+
"RUSTSEC-2026-0097"
110103
]
111104
# Threshold for security vulnerabilities, any vulnerability with a CVSS score
112105
# lower than the range specified will be ignored. Note that ignored advisories

soroban-env-common/env.json

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1708,6 +1708,65 @@
17081708
"return": "Void",
17091709
"docs": "Extend the contract instance and/or corresponding code entry TTL to be up to `extend_to` ledgers, where TTL is defined as `entry_live_until_ledger_seq - current_ledger_seq`. `extension_scope` defines whether contract instance, code, or both will be extended. The TTL extension only actually happens if it is at least `min_extension`, otherwise this function is a no-op. The amount of extension ledgers will not exceed `max_extension` ledgers. If attempting to extend an entry past the maximum allowed value (defined as the current ledger + `max_entry_ttl` - 1), its new `live_until_ledger_seq` will be clamped to the max.",
17101710
"min_supported_protocol": 26
1711+
},
1712+
{
1713+
"export": "h",
1714+
"name": "create_executable_tag",
1715+
"args": [
1716+
{
1717+
"name": "tag_string",
1718+
"type": "StringObject"
1719+
}
1720+
],
1721+
"return": "ExecutableTagObject",
1722+
"docs": "Creates a new `ExecutableTag` object holding the contents of the provided string. The tag acts as a key identifying an executable reference contract data entry. Executable reference entries may be used by other contracts to fetch their executable.",
1723+
"min_supported_protocol": 28
1724+
},
1725+
{
1726+
"export": "i",
1727+
"name": "create_external_ref_contract",
1728+
"args": [
1729+
{
1730+
"name": "deployer",
1731+
"type": "AddressObject"
1732+
},
1733+
{
1734+
"name": "executable_owner",
1735+
"type": "AddressObject"
1736+
},
1737+
{
1738+
"name": "tag",
1739+
"type": "ExecutableTagObject"
1740+
},
1741+
{
1742+
"name": "salt",
1743+
"type": "BytesObject"
1744+
},
1745+
{
1746+
"name": "constructor_args",
1747+
"type": "VecObject"
1748+
}
1749+
],
1750+
"return": "AddressObject",
1751+
"docs": "Creates the contract instance on behalf of `deployer`. `deployer` must authorize this call via Soroban auth framework, i.e. this calls `deployer.require_auth` with respective arguments. Executable is read from the `executable_owner` contract storage entry keyed by `tag`. Currently the only supported external executable kind is hash of an existing Wasm. `salt` is used to create a unique contract id. `constructor_args` are forwarded into created contract's constructor (`__constructor`) function. Returns the address of the created contract.",
1752+
"min_supported_protocol": 28
1753+
},
1754+
{
1755+
"export": "j",
1756+
"name": "update_current_contract_executable_ref",
1757+
"args": [
1758+
{
1759+
"name": "executable_owner",
1760+
"type": "AddressObject"
1761+
},
1762+
{
1763+
"name": "tag",
1764+
"type": "ExecutableTagObject"
1765+
}
1766+
],
1767+
"return": "Void",
1768+
"docs": "Replaces the executable of the current contract with the provided executable reference. Executable is read from the `executable_owner` contract storage entry keyed by `tag`. Currently the only supported external executable kind is hash of an existing Wasm. The update happens only after the current contract invocation has successfully finished, so this can be safely called in the middle of a function.",
1769+
"min_supported_protocol": 28
17111770
}
17121771
]
17131772
},

soroban-env-common/src/compare.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,8 @@ impl<E: Env> Compare<Val> for E {
195195
| Tag::VecObject
196196
| Tag::MapObject
197197
| Tag::AddressObject
198-
| Tag::MuxedAddressObject => Err(self.error_from_error_val(
198+
| Tag::MuxedAddressObject
199+
| Tag::ExecutableTagObject => Err(self.error_from_error_val(
199200
Error::from_type_and_code(ScErrorType::Context, ScErrorCode::InternalError),
200201
)),
201202

soroban-env-common/src/convert.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,7 @@ where
500500
| Tag::MapObject
501501
| Tag::AddressObject
502502
| Tag::MuxedAddressObject
503+
| Tag::ExecutableTagObject
503504
| Tag::SmallCodeUpperBound
504505
| Tag::ObjectCodeLowerBound
505506
| Tag::ObjectCodeUpperBound
@@ -593,6 +594,7 @@ where
593594
| ScVal::Vec(_)
594595
| ScVal::Map(_)
595596
| ScVal::Address(_)
597+
| ScVal::ExecutableTag(_)
596598
| ScVal::LedgerKeyNonce(_)
597599
| ScVal::LedgerKeyContractInstance
598600
| ScVal::ContractInstance(_) => return Err(ConversionError.into()),

soroban-env-common/src/env.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ use crate::Object;
44

55
use super::Symbol;
66
use super::{
7-
AddressObject, Bool, BytesObject, ContractTtlExtension, DurationObject, Error, I128Object,
8-
I256Object, I256Val, I64Object, MapObject, MuxedAddressObject, StorageType, StringObject,
9-
SymbolObject, TimepointObject, U128Object, U256Object, U256Val, U32Val, U64Object, U64Val, Val,
10-
VecObject, Void,
7+
AddressObject, Bool, BytesObject, ContractTtlExtension, DurationObject, Error,
8+
ExecutableTagObject, I128Object, I256Object, I256Val, I64Object, MapObject, MuxedAddressObject,
9+
StorageType, StringObject, SymbolObject, TimepointObject, U128Object, U256Object, U256Val,
10+
U32Val, U64Object, U64Val, Val, VecObject, Void,
1111
};
1212
use crate::xdr::{ScErrorCode, ScErrorType};
1313

@@ -271,6 +271,7 @@ impl_checkedenvarg_for_val_or_wrapper!(DurationObject);
271271
impl_checkedenvarg_for_val_or_wrapper!(TimepointObject);
272272
impl_checkedenvarg_for_val_or_wrapper!(SymbolObject);
273273
impl_checkedenvarg_for_val_or_wrapper!(StringObject);
274+
impl_checkedenvarg_for_val_or_wrapper!(ExecutableTagObject);
274275

275276
impl_checkedenvarg_for_val_or_wrapper!(VecObject);
276277
impl_checkedenvarg_for_val_or_wrapper!(MapObject);

soroban-env-common/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ pub use val::{ConversionError, Tag, Val};
109109

110110
#[cfg(feature = "wasmi")]
111111
pub use val::WasmiMarshal;
112-
pub use val::{AddressObject, MapObject, MuxedAddressObject, VecObject};
112+
pub use val::{AddressObject, ExecutableTagObject, MapObject, MuxedAddressObject, VecObject};
113113
pub use val::{Bool, Void};
114114

115115
pub use compare::Compare;

soroban-env-common/src/meta.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ pub const ENV_META_V0_SECTION_NAME: &str = "contractenvmetav0";
4949
// protocol number for testing purposes.
5050
#[cfg(feature = "next")]
5151
soroban_env_macros::generate_env_meta_consts!(
52-
ledger_protocol_version: 28,
52+
ledger_protocol_version: 29,
5353
pre_release_version: 1,
5454
);
5555

@@ -59,6 +59,6 @@ soroban_env_macros::generate_env_meta_consts!(
5959
// network protocol number.
6060
#[cfg(not(feature = "next"))]
6161
soroban_env_macros::generate_env_meta_consts!(
62-
ledger_protocol_version: 27,
62+
ledger_protocol_version: 28,
6363
pre_release_version: 0,
6464
);

soroban-env-common/src/object.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,8 @@ impl<'a> ScValObjRef<'a> {
142142
| ScVal::String(_)
143143
| ScVal::Vec(_)
144144
| ScVal::Map(_)
145-
| ScVal::Address(_) => Some(ScValObjRef(value)),
145+
| ScVal::Address(_)
146+
| ScVal::ExecutableTag(_) => Some(ScValObjRef(value)),
146147

147148
// Other values are small or large depending on
148149
// their actual scalar value.

0 commit comments

Comments
 (0)