From e3edc0a7fce562bb00c23c0c8d713dc7a116b0d0 Mon Sep 17 00:00:00 2001 From: Luke Parker Date: Fri, 26 Sep 2025 22:09:54 -0400 Subject: [PATCH] Add patches to remove the unused optional dependencies tracked in tree Also performs the usual `cargo update`. --- .github/workflows/lint.yml | 2 -- Cargo.toml | 13 +++++++++++++ patches/darling/Cargo.toml | 16 ++++++++++++++++ patches/darling/src/lib.rs | 1 + patches/ethereum/ark-ff-0.3/Cargo.toml | 16 ++++++++++++++++ patches/ethereum/ark-ff-0.3/src/lib.rs | 1 + patches/ethereum/ark-ff-0.4/Cargo.toml | 16 ++++++++++++++++ patches/ethereum/ark-ff-0.4/src/lib.rs | 1 + patches/ethereum/c-kzg/Cargo.toml | 18 ++++++++++++++++++ patches/ethereum/c-kzg/src/lib.rs | 1 + patches/ethereum/libsecp256k1/Cargo.toml | 17 +++++++++++++++++ patches/ethereum/libsecp256k1/src/lib.rs | 1 + patches/ethereum/rug/Cargo.toml | 17 +++++++++++++++++ patches/ethereum/rug/src/lib.rs | 1 + patches/ethereum/secp256k1-30/Cargo.toml | 21 +++++++++++++++++++++ patches/ethereum/secp256k1-30/src/lib.rs | 1 + patches/ethereum/secp256k1-31/Cargo.toml | 21 +++++++++++++++++++++ patches/ethereum/secp256k1-31/src/lib.rs | 1 + patches/thiserror/Cargo.toml | 16 ++++++++++++++++ patches/thiserror/src/lib.rs | 1 + 20 files changed, 180 insertions(+), 2 deletions(-) create mode 100644 patches/darling/Cargo.toml create mode 100644 patches/darling/src/lib.rs create mode 100644 patches/ethereum/ark-ff-0.3/Cargo.toml create mode 100644 patches/ethereum/ark-ff-0.3/src/lib.rs create mode 100644 patches/ethereum/ark-ff-0.4/Cargo.toml create mode 100644 patches/ethereum/ark-ff-0.4/src/lib.rs create mode 100644 patches/ethereum/c-kzg/Cargo.toml create mode 100644 patches/ethereum/c-kzg/src/lib.rs create mode 100644 patches/ethereum/libsecp256k1/Cargo.toml create mode 100644 patches/ethereum/libsecp256k1/src/lib.rs create mode 100644 patches/ethereum/rug/Cargo.toml create mode 100644 patches/ethereum/rug/src/lib.rs create mode 100644 patches/ethereum/secp256k1-30/Cargo.toml create mode 100644 patches/ethereum/secp256k1-30/src/lib.rs create mode 100644 patches/ethereum/secp256k1-31/Cargo.toml create mode 100644 patches/ethereum/secp256k1-31/src/lib.rs create mode 100644 patches/thiserror/Cargo.toml create mode 100644 patches/thiserror/src/lib.rs diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index ec95bc93..5ede4131 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -155,8 +155,6 @@ jobs: # Correct the last line, which was malleated to "]," members=$(echo "$members" | sed "$(echo "$members" | wc -l)s/\]\,/\]/") - # Don't check the patches - members=$(echo "$members" | grep -v "patches") # Don't check the following # Most of these are binaries, with the exception of the Substrate runtime which has a # bespoke build pipeline diff --git a/Cargo.toml b/Cargo.toml index a5d58c23..b0bf205f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -172,6 +172,19 @@ panic = "unwind" overflow-checks = true [patch.crates-io] +# Point to empty crates for unused crates in our tree +ark-ff-3 = { package = "ark-ff", path = "patches/ethereum/ark-ff-0.3" } +ark-ff-4 = { package = "ark-ff", path = "patches/ethereum/ark-ff-0.4" } +c-kzg = { path = "patches/ethereum/c-kzg" } +libsecp256k1 = { path = "patches/ethereum/libsecp256k1" } +rug = { path = "patches/ethereum/rug" } +secp256k1-30 = { package = "secp256k1", path = "patches/ethereum/secp256k1-30" } +secp256k1-31 = { package = "secp256k1", path = "patches/ethereum/secp256k1-31" } + +# Updates to the latest version +darling = { path = "patches/darling" } +thiserror = { path = "patches/thiserror" } + # Dependencies from monero-oxide which originate from within our own tree std-shims = { path = "patches/std-shims" } simple-request = { path = "patches/simple-request" } diff --git a/patches/darling/Cargo.toml b/patches/darling/Cargo.toml new file mode 100644 index 00000000..b289d5e8 --- /dev/null +++ b/patches/darling/Cargo.toml @@ -0,0 +1,16 @@ +[package] +name = "darling" +version = "0.20.99" +description = "Patch to the latest version" +license = "MIT" +repository = "https://github.com/serai-dex/serai/tree/develop/patches/darling" +authors = ["Luke Parker "] +keywords = [] +edition = "2021" + +[package.metadata.docs.rs] +all-features = true +rustdoc-args = ["--cfg", "docsrs"] + +[dependencies] +darling = { version = "0.21" } diff --git a/patches/darling/src/lib.rs b/patches/darling/src/lib.rs new file mode 100644 index 00000000..62d91808 --- /dev/null +++ b/patches/darling/src/lib.rs @@ -0,0 +1 @@ +pub use darling::*; diff --git a/patches/ethereum/ark-ff-0.3/Cargo.toml b/patches/ethereum/ark-ff-0.3/Cargo.toml new file mode 100644 index 00000000..f183c177 --- /dev/null +++ b/patches/ethereum/ark-ff-0.3/Cargo.toml @@ -0,0 +1,16 @@ +[package] +name = "ark-ff" +version = "0.3.99" +description = "Patch to an empty crate" +license = "MIT" +repository = "https://github.com/serai-dex/serai/tree/develop/patches/ethereum/ark-ff-0.3" +authors = ["Luke Parker "] +keywords = [] +edition = "2021" + +[package.metadata.docs.rs] +all-features = true +rustdoc-args = ["--cfg", "docsrs"] + +[features] +std = [] diff --git a/patches/ethereum/ark-ff-0.3/src/lib.rs b/patches/ethereum/ark-ff-0.3/src/lib.rs new file mode 100644 index 00000000..0670b71f --- /dev/null +++ b/patches/ethereum/ark-ff-0.3/src/lib.rs @@ -0,0 +1 @@ +const _NEVER_COMPILED: [(); 0 - 1] = [(); 0 - 1]; diff --git a/patches/ethereum/ark-ff-0.4/Cargo.toml b/patches/ethereum/ark-ff-0.4/Cargo.toml new file mode 100644 index 00000000..06b0074e --- /dev/null +++ b/patches/ethereum/ark-ff-0.4/Cargo.toml @@ -0,0 +1,16 @@ +[package] +name = "ark-ff" +version = "0.4.99" +description = "Patch to an empty crate" +license = "MIT" +repository = "https://github.com/serai-dex/serai/tree/develop/patches/ethereum/ark-ff-0.4" +authors = ["Luke Parker "] +keywords = [] +edition = "2021" + +[package.metadata.docs.rs] +all-features = true +rustdoc-args = ["--cfg", "docsrs"] + +[features] +std = [] diff --git a/patches/ethereum/ark-ff-0.4/src/lib.rs b/patches/ethereum/ark-ff-0.4/src/lib.rs new file mode 100644 index 00000000..0670b71f --- /dev/null +++ b/patches/ethereum/ark-ff-0.4/src/lib.rs @@ -0,0 +1 @@ +const _NEVER_COMPILED: [(); 0 - 1] = [(); 0 - 1]; diff --git a/patches/ethereum/c-kzg/Cargo.toml b/patches/ethereum/c-kzg/Cargo.toml new file mode 100644 index 00000000..9c8f8a2e --- /dev/null +++ b/patches/ethereum/c-kzg/Cargo.toml @@ -0,0 +1,18 @@ +[package] +name = "c-kzg" +version = "2.99.99" +description = "Patch to an empty crate" +license = "MIT" +repository = "https://github.com/serai-dex/serai/tree/develop/patches/ethereum/c-kzg" +authors = ["Luke Parker "] +keywords = [] +edition = "2021" + +[package.metadata.docs.rs] +all-features = true +rustdoc-args = ["--cfg", "docsrs"] + +[features] +std = [] +serde = [] +ethereum_kzg_settings = [] diff --git a/patches/ethereum/c-kzg/src/lib.rs b/patches/ethereum/c-kzg/src/lib.rs new file mode 100644 index 00000000..0670b71f --- /dev/null +++ b/patches/ethereum/c-kzg/src/lib.rs @@ -0,0 +1 @@ +const _NEVER_COMPILED: [(); 0 - 1] = [(); 0 - 1]; diff --git a/patches/ethereum/libsecp256k1/Cargo.toml b/patches/ethereum/libsecp256k1/Cargo.toml new file mode 100644 index 00000000..491dfb03 --- /dev/null +++ b/patches/ethereum/libsecp256k1/Cargo.toml @@ -0,0 +1,17 @@ +[package] +name = "libsecp256k1" +version = "0.7.99" +description = "Patch to an empty crate" +license = "MIT" +repository = "https://github.com/serai-dex/serai/tree/develop/patches/ethereum/libsecp256k1" +authors = ["Luke Parker "] +keywords = [] +edition = "2021" + +[package.metadata.docs.rs] +all-features = true +rustdoc-args = ["--cfg", "docsrs"] + +[features] +std = [] +static-context = [] diff --git a/patches/ethereum/libsecp256k1/src/lib.rs b/patches/ethereum/libsecp256k1/src/lib.rs new file mode 100644 index 00000000..0670b71f --- /dev/null +++ b/patches/ethereum/libsecp256k1/src/lib.rs @@ -0,0 +1 @@ +const _NEVER_COMPILED: [(); 0 - 1] = [(); 0 - 1]; diff --git a/patches/ethereum/rug/Cargo.toml b/patches/ethereum/rug/Cargo.toml new file mode 100644 index 00000000..984b0249 --- /dev/null +++ b/patches/ethereum/rug/Cargo.toml @@ -0,0 +1,17 @@ +[package] +name = "rug" +version = "1.99.99" +description = "Patch to an empty crate" +license = "MIT" +repository = "https://github.com/serai-dex/serai/tree/develop/patches/ethereum/rug" +authors = ["Luke Parker "] +keywords = [] +edition = "2021" + +[package.metadata.docs.rs] +all-features = true +rustdoc-args = ["--cfg", "docsrs"] + +[features] +std = [] +integer = [] diff --git a/patches/ethereum/rug/src/lib.rs b/patches/ethereum/rug/src/lib.rs new file mode 100644 index 00000000..0670b71f --- /dev/null +++ b/patches/ethereum/rug/src/lib.rs @@ -0,0 +1 @@ +const _NEVER_COMPILED: [(); 0 - 1] = [(); 0 - 1]; diff --git a/patches/ethereum/secp256k1-30/Cargo.toml b/patches/ethereum/secp256k1-30/Cargo.toml new file mode 100644 index 00000000..e17d3e71 --- /dev/null +++ b/patches/ethereum/secp256k1-30/Cargo.toml @@ -0,0 +1,21 @@ +[package] +name = "secp256k1" +version = "0.30.99" +description = "Patch to an empty crate" +license = "MIT" +repository = "https://github.com/serai-dex/serai/tree/develop/patches/ethereum/secp256k1-30" +authors = ["Luke Parker "] +keywords = [] +edition = "2021" + +[package.metadata.docs.rs] +all-features = true +rustdoc-args = ["--cfg", "docsrs"] + +[features] +alloc = [] +std = [] +rand = [] +serde = [] +global-context = [] +recovery = [] diff --git a/patches/ethereum/secp256k1-30/src/lib.rs b/patches/ethereum/secp256k1-30/src/lib.rs new file mode 100644 index 00000000..0670b71f --- /dev/null +++ b/patches/ethereum/secp256k1-30/src/lib.rs @@ -0,0 +1 @@ +const _NEVER_COMPILED: [(); 0 - 1] = [(); 0 - 1]; diff --git a/patches/ethereum/secp256k1-31/Cargo.toml b/patches/ethereum/secp256k1-31/Cargo.toml new file mode 100644 index 00000000..67e63e41 --- /dev/null +++ b/patches/ethereum/secp256k1-31/Cargo.toml @@ -0,0 +1,21 @@ +[package] +name = "secp256k1" +version = "0.31.99" +description = "Patch to an empty crate" +license = "MIT" +repository = "https://github.com/serai-dex/serai/tree/develop/patches/ethereum/secp256k1-31" +authors = ["Luke Parker "] +keywords = [] +edition = "2021" + +[package.metadata.docs.rs] +all-features = true +rustdoc-args = ["--cfg", "docsrs"] + +[features] +alloc = [] +std = [] +rand = [] +serde = [] +global-context = [] +recovery = [] diff --git a/patches/ethereum/secp256k1-31/src/lib.rs b/patches/ethereum/secp256k1-31/src/lib.rs new file mode 100644 index 00000000..0670b71f --- /dev/null +++ b/patches/ethereum/secp256k1-31/src/lib.rs @@ -0,0 +1 @@ +const _NEVER_COMPILED: [(); 0 - 1] = [(); 0 - 1]; diff --git a/patches/thiserror/Cargo.toml b/patches/thiserror/Cargo.toml new file mode 100644 index 00000000..9273b8f0 --- /dev/null +++ b/patches/thiserror/Cargo.toml @@ -0,0 +1,16 @@ +[package] +name = "thiserror" +version = "1.99.99" +description = "Patch to the latest version" +license = "MIT" +repository = "https://github.com/serai-dex/serai/tree/develop/patches/thiserror" +authors = ["Luke Parker "] +keywords = [] +edition = "2021" + +[package.metadata.docs.rs] +all-features = true +rustdoc-args = ["--cfg", "docsrs"] + +[dependencies] +thiserror = { version = "2", features = ["std"] } diff --git a/patches/thiserror/src/lib.rs b/patches/thiserror/src/lib.rs new file mode 100644 index 00000000..99e8aeb7 --- /dev/null +++ b/patches/thiserror/src/lib.rs @@ -0,0 +1 @@ +pub use thiserror::*;