From e44506e251b5bf80c0dd0674a816af9e24a871a7 Mon Sep 17 00:00:00 2001 From: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com> Date: Fri, 16 Aug 2024 11:38:40 -0700 Subject: [PATCH] Unpin all non-stellar dependencies (#1441) ### What Unpin all non-stellar dependencies. ### Why We have had reports that the libs are difficult to integrate into other projects due to the rigid dependency requirements. We ultimately need the dependencies to be pinned in stellar-core. There's benefit to the tests in this repo running with the same dependencies as what core pins to. There's benefits to stellar-rpc also using the same dependencies so as to decrease the chance that simulation runs with different behavior. Also, the same applies to the SDK for test behavior. Pinning the deps were an easy way to keep the dependencies consistent everywhere, but it also makes it difficult for folks to use the env libraries. Close https://github.com/stellar/rs-soroban-env/pull/1351 ### Other things that need to happen @graydon is making a tool to check that Cargo.lock files are using consistent versions where possible across the env repo, core repo, and we can also use that in the rpc repo. It won't be practical to expect contract devs to use it on their contract projects, so contract devs will be able to use whatever combination of dependencies and that's just a limitation. ### Why not We could say again that not doing this has greater benefits than allowing folks to more easily use the libraries in their own projects. (cherry picked from commit a54d997e3f23ec14649642a9f348fd59419ccaf6) --- soroban-builtin-sdk-macros/Cargo.toml | 8 +-- soroban-env-common/Cargo.toml | 20 ++++---- soroban-env-host/Cargo.toml | 74 +++++++++++++-------------- soroban-env-macros/Cargo.toml | 12 ++--- soroban-synth-wasm/Cargo.toml | 6 +-- 5 files changed, 60 insertions(+), 60 deletions(-) diff --git a/soroban-builtin-sdk-macros/Cargo.toml b/soroban-builtin-sdk-macros/Cargo.toml index 7e9b1ea64..46c937b3c 100644 --- a/soroban-builtin-sdk-macros/Cargo.toml +++ b/soroban-builtin-sdk-macros/Cargo.toml @@ -13,10 +13,10 @@ rust-version.workspace = true proc-macro = true [dependencies] -syn = {version="=2.0.39",features=["full"]} -quote = "=1.0.33" -proc-macro2 = "=1.0.69" -itertools = "=0.11.0" +syn = {version="2.0.39",features=["full"]} +quote = "1.0.33" +proc-macro2 = "1.0.69" +itertools = "0.11.0" [package.metadata.docs.rs] all-features = true diff --git a/soroban-env-common/Cargo.toml b/soroban-env-common/Cargo.toml index 1cf1997c9..5aeef60b0 100644 --- a/soroban-env-common/Cargo.toml +++ b/soroban-env-common/Cargo.toml @@ -11,26 +11,26 @@ edition = "2021" rust-version.workspace = true [build_dependencies] -crate-git-revision = "=0.0.6" +crate-git-revision = "0.0.6" [dependencies] soroban-env-macros = { workspace = true } stellar-xdr = { workspace = true, default-features = false, features = [ "curr" ] } wasmi = { workspace = true, optional = true } wasmparser = { workspace = true, optional = true} -serde = { version = "=1.0.192", features = ["derive"], optional = true } -static_assertions = "=1.1.0" -ethnum = "=1.5.0" -arbitrary = { version = "=1.3.2", features = ["derive"], optional = true } -num-traits = {version = "=0.2.17", default-features = false} -num-derive = "=0.4.1" +serde = { version = "1.0.192", features = ["derive"], optional = true } +static_assertions = "1.1.0" +ethnum = "1.5.0" +arbitrary = { version = "1.3.2", features = ["derive"], optional = true } +num-traits = {version = "0.2.17", default-features = false} +num-derive = "0.4.1" [target.'cfg(not(target_family = "wasm"))'.dependencies] -tracy-client = { version = "=0.16.4", features = ["enable", "timer-fallback"], default-features = false, optional = true } +tracy-client = { version = "0.16.4", features = ["enable", "timer-fallback"], default-features = false, optional = true } [dev-dependencies] -num_enum = "=0.7.1" -num-traits = "=0.2.17" +num_enum = "0.7.1" +num-traits = "0.2.17" [features] std = ["stellar-xdr/std", "stellar-xdr/base64"] diff --git a/soroban-env-host/Cargo.toml b/soroban-env-host/Cargo.toml index 7951dc6fc..28632b135 100644 --- a/soroban-env-host/Cargo.toml +++ b/soroban-env-host/Cargo.toml @@ -18,32 +18,32 @@ 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.8" -static_assertions = "=1.1.0" -sha2 = "=0.10.8" -hex-literal = "=0.4.1" -hmac = "=0.12.1" +stellar-strkey = "0.0.8" +static_assertions = "1.1.0" +sha2 = "0.10.8" +hex-literal = "0.4.1" +hmac = "0.12.1" # NB: We'll need to pin this again after switching the Core to the new env version. ed25519-dalek = {version = ">=2.0.0", features = ["rand_core"] } # NB: this must match the same rand version used by ed25519-dalek above -rand = "=0.8.5" +rand = "0.8.5" # NB: this must match the same rand_chacha version used by ed25519-dalek above -rand_chacha = "=0.3.1" -num-traits = "=0.2.17" -num-integer = "=0.1.45" -num-derive = "=0.4.1" -backtrace = { version = "=0.3.69", optional = true } -k256 = {version = "=0.13.1", default-features = false, features = ["ecdsa", "arithmetic"]} -p256 = {version = "=0.13.2", default-features = false, features = ["ecdsa", "arithmetic"]} -ecdsa = {version = "=0.16.7", default-features = false} -sec1 = {version = "=0.7.2"} +rand_chacha = "0.3.1" +num-traits = "0.2.17" +num-integer = "0.1.45" +num-derive = "0.4.1" +backtrace = { version = "0.3.69", optional = true } +k256 = {version = "0.13.1", default-features = false, features = ["ecdsa", "arithmetic"]} +p256 = {version = "0.13.2", default-features = false, features = ["ecdsa", "arithmetic"]} +ecdsa = {version = "0.16.7", default-features = false} +sec1 = {version = "0.7.2"} elliptic-curve ={ version = "0.13.5", default-features = false} generic-array ={ version = "0.14.7"} # NB: getrandom is a transitive dependency of k256 which we're not using directly # but we have to specify it here in order to enable its 'js' feature which # is needed to build the host for wasm (a rare but supported config). -getrandom = { version = "=0.2.11", features=["js"] } -sha3 = "=0.10.8" +getrandom = { version = "0.2.11", features=["js"] } +sha3 = "0.10.8" # NB: this must match the same curve25519-dalek version used by ed25519-dalek # above used only for calibration # @@ -69,33 +69,33 @@ sha3 = "=0.10.8" curve25519-dalek = { version = ">=4.1.1", default-features = false, features = ["digest"]} [target.'cfg(not(target_family = "wasm"))'.dependencies] -tracy-client = { version = "=0.16.4", features = ["enable", "timer-fallback"], default-features = false, optional = true } +tracy-client = { version = "0.16.4", features = ["enable", "timer-fallback"], default-features = false, optional = true } [dev-dependencies] -hex = "=0.4.3" -itertools = "=0.11.0" -tabwriter = "=1.3.0" -thousands = "=0.2.0" +hex = "0.4.3" +itertools = "0.11.0" +tabwriter = "1.3.0" +thousands = "0.2.0" soroban-env-macros = { workspace = true } soroban-test-wasms = { package = "soroban-test-wasms", path = "../soroban-test-wasms" } soroban-synth-wasm = { package = "soroban-synth-wasm", path = "../soroban-synth-wasm", features = ["adversarial"]} soroban-bench-utils = { package = "soroban-bench-utils", path = "../soroban-bench-utils" } -bytes-lit = "=0.0.5" -textplots = "=0.8.4" -wasmprinter = "=0.2.72" -expect-test = "=1.4.1" -more-asserts = "=0.3.1" -pretty_assertions = "=1.4.0" -backtrace = "=0.3.69" -serde_json = "=1.0.108" -arbitrary = "=1.3.2" -lstsq = "=0.5.0" -nalgebra = { version = "=0.32.3", default-features = false, features = ["std"]} -wasm-encoder = "=0.36.2" +bytes-lit = "0.0.5" +textplots = "0.8.4" +wasmprinter = "0.2.72" +expect-test = "1.4.1" +more-asserts = "0.3.1" +pretty_assertions = "1.4.0" +backtrace = "0.3.69" +serde_json = "1.0.108" +arbitrary = "1.3.2" +lstsq = "0.5.0" +nalgebra = { version = "0.32.3", default-features = false, features = ["std"]} +wasm-encoder = "0.36.2" rustversion = "1.0" -wycheproof = "=0.5.1" -k256 = {version = "=0.13.1", default-features = false, features = ["alloc"]} -p256 = {version = "=0.13.2", default-features = false, features = ["alloc"]} +wycheproof = "0.5.1" +k256 = {version = "0.13.1", default-features = false, features = ["alloc"]} +p256 = {version = "0.13.2", default-features = false, features = ["alloc"]} [dev-dependencies.stellar-xdr] version = "=21.2.0" diff --git a/soroban-env-macros/Cargo.toml b/soroban-env-macros/Cargo.toml index ed0adce73..3ebabc2c2 100644 --- a/soroban-env-macros/Cargo.toml +++ b/soroban-env-macros/Cargo.toml @@ -14,12 +14,12 @@ proc-macro = true [dependencies] stellar-xdr = { workspace = true, features = ["curr", "std"] } -syn = {version="=2.0.39",features=["full"]} -quote = "=1.0.33" -proc-macro2 = "=1.0.69" -itertools = "=0.11.0" -serde = { version = "=1.0.192", features = ["derive"] } -serde_json = "=1.0.108" +syn = {version="2.0.39",features=["full"]} +quote = "1.0.33" +proc-macro2 = "1.0.69" +itertools = "0.11.0" +serde = { version = "1.0.192", features = ["derive"] } +serde_json = "1.0.108" [features] next = ["stellar-xdr/next"] diff --git a/soroban-synth-wasm/Cargo.toml b/soroban-synth-wasm/Cargo.toml index ffc6deb3d..4b6f409ab 100644 --- a/soroban-synth-wasm/Cargo.toml +++ b/soroban-synth-wasm/Cargo.toml @@ -15,7 +15,7 @@ wasm-encoder = "=0.36.2" wasmparser = { workspace = true } soroban-env-common = { workspace = true } stellar-xdr = { workspace = true, features = ["std"] } -arbitrary = { version = "=1.3.2", features = ["derive"] } +arbitrary = { version = "1.3.2", features = ["derive"] } soroban-env-macros = { workspace = true } [features] @@ -23,5 +23,5 @@ testutils = ["soroban-env-common/testutils"] adversarial = [] [dev-dependencies] -expect-test = "=1.4.1" -wasmprinter = "=0.2.72" +expect-test = "1.4.1" +wasmprinter = "0.2.72"