Skip to content
Open
Show file tree
Hide file tree
Changes from 6 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
47 changes: 45 additions & 2 deletions Cargo.lock

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

8 changes: 7 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ exclude = ["soroban-test-wasms/wasm-workspace"]
# code guarded by `unstable-*` features to make it enabled
# unconditionally.
version = "27.0.0"
rust-version = "1.84.0"
rust-version = "1.87.0"

[workspace.dependencies]
soroban-env-common = { version = "=27.0.0", path = "soroban-env-common", default-features = false }
Expand Down Expand Up @@ -53,6 +53,12 @@ rev = "0ed3f3dee30dc41ebe21972399e0a73a41944aa0"
# soroban-wasmi = { path = "../wasmi/crates/wasmi/" }
# soroban-wasmi_core = { path = "../wasmi/crates/core/" }

# Temporary: stellar-strkey 0.0.18 is not yet published to crates.io. Point at
# the release/v0.0.18 branch so this PR can be validated against the actual
# 0.0.18 code ahead of the release. Remove once 0.0.18 is published.
[patch.crates-io]
stellar-strkey = { git = "https://github.com/stellar/rs-stellar-strkey", rev = "73bf43778a4acad5e7b3589f54a5ec3607c4b7b1" }

[profile.release]
lto = true
debug = true
Expand Down
23 changes: 23 additions & 0 deletions cackle.toml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ allow_apis = [

[pkg.rand]
allow_unsafe = true
allow_apis = [
"rand",
]

[pkg.backtrace]
allow_apis = [
Expand Down Expand Up @@ -146,6 +149,18 @@ allow_unsafe = true
[pkg.subtle]
allow_unsafe = true

[pkg.byteorder]
allow_unsafe = true

[pkg.hash32]
allow_unsafe = true

[pkg.stable_deref_trait]
allow_unsafe = true

[pkg.stellar-strkey]
allow_unsafe = true
Comment thread
dmkozh marked this conversation as resolved.

[pkg.zeroize]
allow_unsafe = true

Expand Down Expand Up @@ -245,6 +260,14 @@ build.allow_apis = [
"env",
]

[pkg.heapless]
allow_unsafe = true
build.allow_apis = [
"env",
"fs",
"process",
]

[pkg.tracking-allocator]
allow_unsafe = true
from.test.allow_apis = [
Expand Down
4 changes: 4 additions & 0 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,10 @@ skip = [
{ name = "hashbrown", version = "=0.14.1" },
{ name = "syn", version = "=1.0.109" },
{ name = "crate-git-revision", version = "=0.0.6" },
# Transitional duplicate: we depend on stellar-strkey 0.0.18 directly while
# the published stellar-xdr 27.0.0 still pulls in 0.0.13. This goes away once
# the stellar-xdr v28 (protocol-28) release also ships on strkey 0.0.18.
{ name = "stellar-strkey", version = "=0.0.13" },
]
# Similarly to `skip` allows you to skip certain crates during duplicate
# detection. Unlike skip, it also includes the entire tree of transitive
Expand Down
4 changes: 2 additions & 2 deletions soroban-env-host/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ license = "Apache-2.0"
version.workspace = true
readme = "../README.md"
edition = "2021"
rust-version = "1.84.0"
rust-version = "1.87.0"
build = "build.rs"

exclude = ["observations/"]
Expand All @@ -18,7 +18,7 @@ soroban-builtin-sdk-macros = { workspace = true }
soroban-env-common = { workspace = true, features = ["std", "wasmi", "shallow-val-hash"] }
wasmi = { workspace = true }
wasmparser = { workspace = true }
stellar-strkey = "0.0.13"
stellar-strkey = "0.0.18"
static_assertions = "1.1.0"
sha2 = "0.10.8"
hex-literal = "0.4.1"
Expand Down
2 changes: 1 addition & 1 deletion soroban-env-host/src/crypto/poseidon/poseidon2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ impl<F: MeteredScalar> Poseidon2<F> {
/// (https://eprint.iacr.org/2023/323)
fn matmul_m4(&self, host: &Host, state: &mut [F]) -> Result<(), HostError> {
let t = self.params.t;
if t % 4 != 0 {
if !t.is_multiple_of(4) {
Comment thread
dmkozh marked this conversation as resolved.
return Err(host.error(
Comment thread
dmkozh marked this conversation as resolved.
INVALID_INPUT,
"Poseidon2: matmul_m4 state size must be divisible by 4",
Expand Down
2 changes: 1 addition & 1 deletion soroban-env-host/src/crypto/poseidon/poseidon2_params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ impl<F: MeteredScalar> Poseidon2Params<F> {
],
));
}
if rounds_f % 2 != 0 {
if !rounds_f.is_multiple_of(2) {
Comment thread
dmkozh marked this conversation as resolved.
return Err(host.error(
INVALID_INPUT,
"Poseidon2: `rounds_f` must be even",
Expand Down
2 changes: 1 addition & 1 deletion soroban-env-host/src/crypto/poseidon/poseidon_params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ impl<S: MeteredScalar> PoseidonParams<S> {
],
));
}
if rounds_f % 2 != 0 {
if !rounds_f.is_multiple_of(2) {
Comment thread
dmkozh marked this conversation as resolved.
return Err(host.error(
INVALID_INPUT,
"Poseidon: `rounds_f` must be even",
Expand Down
4 changes: 2 additions & 2 deletions soroban-env-host/src/host/conversion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ impl Host {
))
}
};
Ok(strkey.to_string())
Ok(strkey.to_string().as_str().to_string())

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The string returned from strkey's is now a heapless string, so this seemingly odd dance is converting that heapless string into an alloc String.

}

pub(crate) fn muxed_sc_address_to_strkey(
Expand All @@ -708,7 +708,7 @@ impl Host {
ed25519: muxed_account.ed25519.0.metered_clone(self)?,
},
);
Ok(strkey.to_string())
Ok(strkey.to_string().as_str().to_string())
}
_ => Err(self.err(
ScErrorType::Object,
Expand Down
2 changes: 1 addition & 1 deletion soroban-fuzz-targets/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ authors = ["Stellar Development Foundation <info@stellar.org>"]
license = "Apache-2.0"
version.workspace = true
edition = "2021"
rust-version = "1.84.0"
rust-version = "1.87.0"
publish = false

[dependencies]
Expand Down
Loading