Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
11 changes: 11 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,22 @@ jobs:
with:
name: cargo-semver-checks
version: 0.46.0
# Temporary: ed25519-dalek 3.0.0 (published 2026-07-06) breaks the
# cargo-semver-checks baseline rustdoc build of soroban-sdk /
# soroban-ledger-snapshot v26.1.0 — published soroban-env-host 26.1.3
# declares `ed25519-dalek >=2.0.0`, and the fresh baseline resolve (which
# ignores our Cargo.lock) picks 3.0.0, whose SigningKey::generate no longer
# accepts the old ChaCha20Rng. The 26->27 bump is a MAJOR change (semver-checks
# reports "no semver update required" for every crate), so no semver signal is
# lost. Remove these two excludes once ed25519-dalek 3.0.0 is yanked or the
# published env caps it.
- run: >
cargo semver-checks
--exclude soroban-meta
--exclude soroban-token-spec
--exclude stellar-asset-spec
--exclude soroban-sdk
--exclude soroban-ledger-snapshot

build:
needs: setup
Expand Down
45 changes: 18 additions & 27 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 34 additions & 12 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,30 +29,52 @@ soroban-token-sdk = { version = "27.0.1", path = "soroban-token-sdk" }
soroban-token-spec = { version = "27.0.1", path = "soroban-token-spec" }
stellar-asset-spec = { version = "27.0.1", path = "stellar-asset-spec" }

# SPIKE: Protocol 28 (CAP-0084) pins the three env crates to the unmerged
# rs-soroban-env#1700 branch commit, hosted on the sisuresh/rs-soroban-env fork
# branch. cargo-deny matches the literal git-URL org, so deny.toml's
# [sources.allow-org] temporarily includes "sisuresh" for the SPIKE (revert to
# just ["stellar"] once the pins re-point to merged stellar/ revs).
# Version constraints are relaxed off the exact `=` pin per
# lessons.md:45 — the git-rev package may self-report a differing
# patch/prerelease version; keep major-version compatibility.
# Productionize -> stellar/rs-soroban-env merged SHA (or a released version)
# once it lands; restore `version =` only.
[workspace.dependencies.soroban-env-common]
version = "=27.0.1"
#git = "https://github.com/stellar/rs-soroban-env"
#rev = "7fb0a840812fe8921bb48bebf7b4aa7160467ec8"
version = "28.0.0"
git = "https://github.com/sisuresh/rs-soroban-env"
rev = "10f8cbfeb97081735329f72411713721c36d592f"

[workspace.dependencies.soroban-env-guest]
version = "=27.0.1"
#git = "https://github.com/stellar/rs-soroban-env"
#rev = "7fb0a840812fe8921bb48bebf7b4aa7160467ec8"
version = "28.0.0"
git = "https://github.com/sisuresh/rs-soroban-env"
rev = "10f8cbfeb97081735329f72411713721c36d592f"

[workspace.dependencies.soroban-env-host]
version = "=27.0.1"
#git = "https://github.com/stellar/rs-soroban-env"
#rev = "7fb0a840812fe8921bb48bebf7b4aa7160467ec8"
version = "28.0.0"
git = "https://github.com/sisuresh/rs-soroban-env"
rev = "10f8cbfeb97081735329f72411713721c36d592f"

[workspace.dependencies.stellar-strkey]
version = "=0.0.16"

# SPIKE: Protocol 28 (CAP-0084) pins stellar-xdr to the unmerged
# rs-stellar-xdr#552 branch commit, referenced via sisuresh/rs-stellar-xdr
# (fork-hosted branch p28-cap-0084; per-cap layout, self-reports 28.0.0).
# Productionize -> stellar/rs-stellar-xdr merged SHA (or crates.io 28.0.0).
[workspace.dependencies.stellar-xdr]
version = "=27.0.0"
#git = "https://github.com/stellar/rs-stellar-xdr"
#rev = "a749b69b3471aec0c20ec431b0297f3414d66421"
version = "=28.0.0"
git = "https://github.com/sisuresh/rs-stellar-xdr"
rev = "3d2ad659a3a285aae9543069ee18cb6245a427ce"
default-features = false

# SPIKE: Protocol 28 (CAP-0084) the pinned rs-soroban-env#1700 env crates
# transitively depend on stellar-xdr from sisuresh/rs-stellar-xdr at the SAME
# rev (3d2ad659) as the direct workspace dep above, so the git source is already
# unified and no [patch] redirect is needed (a sisuresh->sisuresh patch would be
# a self-patch). Restore a patch to stellar/rs-stellar-xdr once #552 lands there.
# [patch."https://github.com/sisuresh/rs-stellar-xdr"]
# stellar-xdr = { git = "https://github.com/stellar/rs-stellar-xdr", rev = "3d2ad659a3a285aae9543069ee18cb6245a427ce", default-features = false }

#[patch.crates-io]
#soroban-env-common = { path = "../rs-soroban-env/soroban-env-common" }
#soroban-env-guest = { path = "../rs-soroban-env/soroban-env-guest" }
Expand Down
5 changes: 4 additions & 1 deletion deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,10 @@ allow-git = []

[sources.allow-org]
# 1 or more github.com organizations to allow git sources for
github = ["stellar"]
# TEMP CAP-0084 SPIKE: "sisuresh" allows the fork-hosted rs-soroban-env#1700
# and rs-stellar-xdr#552 rev pins (git+https://github.com/sisuresh/...).
# Revert to just ["stellar"] when both re-point to accepted stellar/ merged revs.
github = ["stellar", "sisuresh"]
# 1 or more gitlab.com organizations to allow git sources for
# gitlab = [""]
# 1 or more bitbucket.org organizations to allow git sources for
Expand Down
2 changes: 1 addition & 1 deletion soroban-meta/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ edition = "2021"
rust-version.workspace = true

[dependencies]
stellar-xdr = { workspace = true, features = ["std"] }
stellar-xdr = { workspace = true, features = ["std", "cap_0084_muxed_contract"] }
thiserror = "1.0.32"
wasmparser = "0.116.1"
4 changes: 2 additions & 2 deletions soroban-sdk-macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ doctest = false
[dependencies]
soroban-spec = { workspace = true }
soroban-spec-rust = { workspace = true }
soroban-env-common = { workspace = true }
stellar-xdr = { workspace = true, features = ["std"] }
soroban-env-common = { workspace = true, features = ["next"] }
stellar-xdr = { workspace = true, features = ["std", "cap_0084_muxed_contract"] }
syn = {version="2.0.77",features=["full"]}
quote = "1.0"
proc-macro2 = "1.0"
Expand Down
8 changes: 4 additions & 4 deletions soroban-sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ bytes-lit = "0.0.6"
visibility = "0.1.1"

[target.'cfg(target_family="wasm")'.dependencies]
soroban-env-guest = { workspace = true }
soroban-env-guest = { workspace = true, features = ["next"] }

[target.'cfg(not(target_family="wasm"))'.dependencies]
soroban-env-host = { workspace = true, features = [] }
soroban-env-host = { workspace = true, features = ["next"] }
soroban-ledger-snapshot = { workspace = true, optional = true }
stellar-strkey = { workspace = true }
arbitrary = { version = "~1.3.0", features = ["derive"], optional = true }
Expand All @@ -44,9 +44,9 @@ ctor = { version = "0.5.0", optional = true }

[dev-dependencies]
soroban-sdk-macros = { workspace = true, features = ["testutils"] }
soroban-env-host = { workspace = true, features = ["testutils"] }
soroban-env-host = { workspace = true, features = ["testutils", "next"] }
soroban-ledger-snapshot = { workspace = true, features = ["testutils"] }
stellar-xdr = { workspace = true, features = ["std"] }
stellar-xdr = { workspace = true, features = ["std", "cap_0084_muxed_contract"] }
soroban-spec = { workspace = true }
ed25519-dalek = "2.0.0"
rand = "0.8.5"
Expand Down
3 changes: 2 additions & 1 deletion soroban-sdk/src/address.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ impl Debug for Address {
}
ScAddress::MuxedAccount(_)
| ScAddress::ClaimableBalance(_)
| ScAddress::LiquidityPool(_) => {
| ScAddress::LiquidityPool(_)
| ScAddress::MuxedContract(_) => {
return Err(core::fmt::Error);
}
}
Expand Down
3 changes: 2 additions & 1 deletion soroban-sdk/src/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ use crate::{
storage::Storage, Address, Vec,
};
use internal::{
AddressObject, Bool, BytesObject, DurationObject, I128Object, I256Object, I256Val, I64Object,
AddressObject, Bool, BytesObject, DurationObject, ExecutableTagObject, I128Object, I256Object,
I256Val, I64Object,
MuxedAddressObject, StorageType, StringObject, Symbol, SymbolObject, TimepointObject,
U128Object, U256Object, U256Val, U32Val, U64Object, U64Val, Void,
};
Expand Down
8 changes: 6 additions & 2 deletions soroban-sdk/src/muxed_address.rs
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,9 @@ impl TryFromVal<Env, ScVal> for MuxedAddress {
ScAddress::MuxedAccount(_) => Ok(MuxedAddressObject::try_from_val(env, &v)?
.try_into_val(env)
.unwrap_infallible()),
ScAddress::ClaimableBalance(_) | ScAddress::LiquidityPool(_) => {
ScAddress::ClaimableBalance(_)
| ScAddress::LiquidityPool(_)
| ScAddress::MuxedContract(_) => {
panic!("unsupported ScAddress type")
}
},
Expand Down Expand Up @@ -401,7 +403,9 @@ impl crate::testutils::MuxedAddress for MuxedAddress {
crate::env::internal::xdr::PublicKey::PublicKeyTypeEd25519(account_id),
)) => account_id,
ScAddress::Contract(_) => panic!("contract addresses can not be multiplexed"),
ScAddress::ClaimableBalance(_) | ScAddress::LiquidityPool(_) => unreachable!(),
ScAddress::ClaimableBalance(_)
| ScAddress::LiquidityPool(_)
| ScAddress::MuxedContract(_) => unreachable!(),
},
_ => unreachable!(),
};
Expand Down
6 changes: 5 additions & 1 deletion soroban-sdk/src/testutils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,11 @@ pub use crate::env::internal::LedgerInfo;
/// Returns a default `LedgerInfo` suitable for testing.
pub(crate) fn default_ledger_info() -> LedgerInfo {
LedgerInfo {
protocol_version: 27,
// SPIKE: Protocol 28 (CAP-0084). The env `next` feature (pulled in by
// `cap_0084_muxed_contract`) stamps proto 28 into compiled contracts, so
// the default test ledger must run at 28 or the host rejects them as
// "newer than host". Revert to the released proto on productionization.
protocol_version: 28,
sequence_number: 0,
timestamp: 0,
network_id: [0; 32],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
]
],
"ledger": {
"protocol_version": 27,
"protocol_version": 28,
"sequence_number": 0,
"timestamp": 0,
"network_id": "0000000000000000000000000000000000000000000000000000000000000000",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
[]
],
"ledger": {
"protocol_version": 27,
"protocol_version": 28,
"sequence_number": 0,
"timestamp": 0,
"network_id": "0000000000000000000000000000000000000000000000000000000000000000",
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
]
],
"ledger": {
"protocol_version": 27,
"protocol_version": 28,
"sequence_number": 0,
"timestamp": 0,
"network_id": "0000000000000000000000000000000000000000000000000000000000000000",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
]
],
"ledger": {
"protocol_version": 27,
"protocol_version": 28,
"sequence_number": 0,
"timestamp": 0,
"network_id": "0000000000000000000000000000000000000000000000000000000000000000",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
]
],
"ledger": {
"protocol_version": 27,
"protocol_version": 28,
"sequence_number": 0,
"timestamp": 0,
"network_id": "0000000000000000000000000000000000000000000000000000000000000000",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
]
],
"ledger": {
"protocol_version": 27,
"protocol_version": 28,
"sequence_number": 0,
"timestamp": 0,
"network_id": "0000000000000000000000000000000000000000000000000000000000000000",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
[]
],
"ledger": {
"protocol_version": 27,
"protocol_version": 28,
"sequence_number": 0,
"timestamp": 0,
"network_id": "0000000000000000000000000000000000000000000000000000000000000000",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
]
],
"ledger": {
"protocol_version": 27,
"protocol_version": 28,
"sequence_number": 0,
"timestamp": 0,
"network_id": "0000000000000000000000000000000000000000000000000000000000000000",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
[]
],
"ledger": {
"protocol_version": 27,
"protocol_version": 28,
"sequence_number": 0,
"timestamp": 0,
"network_id": "0000000000000000000000000000000000000000000000000000000000000000",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
]
],
"ledger": {
"protocol_version": 27,
"protocol_version": 28,
"sequence_number": 0,
"timestamp": 0,
"network_id": "0000000000000000000000000000000000000000000000000000000000000000",
Expand Down
Loading
Loading