Skip to content

Commit

Permalink
Remove unused dependencies from pallet_revive (#6917)
Browse files Browse the repository at this point in the history
Removing apparently unused dependencies from `pallet_revive` and related
crates.

---------

Co-authored-by: command-bot <>
  • Loading branch information
athei authored Dec 17, 2024
1 parent 31179c4 commit 0558973
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 45 deletions.
15 changes: 0 additions & 15 deletions Cargo.lock

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

14 changes: 14 additions & 0 deletions prdoc/pr_6917.prdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
title: Remove unused dependencies from pallet_revive
doc:
- audience: Runtime Dev
description: Removing apparently unused dependencies from `pallet_revive` and related
crates.
crates:
- name: pallet-revive
bump: major
- name: pallet-revive-fixtures
bump: major
- name: pallet-revive-mock-network
bump: major
- name: pallet-revive-eth-rpc
bump: major
3 changes: 0 additions & 3 deletions substrate/frame/revive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ targets = ["x86_64-unknown-linux-gnu"]
environmental = { workspace = true }
paste = { workspace = true }
polkavm = { version = "0.17.0", default-features = false }
bitflags = { workspace = true }
codec = { features = ["derive", "max-encoded-len"], workspace = true }
scale-info = { features = ["derive"], workspace = true }
log = { workspace = true }
Expand Down Expand Up @@ -48,7 +47,6 @@ sp-core = { workspace = true }
sp-io = { workspace = true }
sp-runtime = { workspace = true }
sp-std = { workspace = true }
sp-weights = { workspace = true }
xcm = { workspace = true }
xcm-builder = { workspace = true }
subxt-signer = { workspace = true, optional = true, features = [
Expand Down Expand Up @@ -102,7 +100,6 @@ std = [
"sp-keystore/std",
"sp-runtime/std",
"sp-std/std",
"sp-weights/std",
"subxt-signer",
"xcm-builder/std",
"xcm/std",
Expand Down
5 changes: 1 addition & 4 deletions substrate/frame/revive/fixtures/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,9 @@ exclude-from-umbrella = true
workspace = true

[dependencies]
frame-system = { workspace = true, default-features = true, optional = true }
sp-core = { workspace = true, default-features = true, optional = true }
sp-io = { workspace = true, default-features = true, optional = true }
sp-runtime = { workspace = true, default-features = true, optional = true }
anyhow = { workspace = true, default-features = true, optional = true }
log = { workspace = true }

[build-dependencies]
toml = { workspace = true }
Expand All @@ -30,4 +27,4 @@ anyhow = { workspace = true, default-features = true }
[features]
default = ["std"]
# only when std is enabled all fixtures are available
std = ["anyhow", "frame-system", "log/std", "sp-core", "sp-io", "sp-runtime"]
std = ["anyhow", "sp-core", "sp-io"]
1 change: 0 additions & 1 deletion substrate/frame/revive/fixtures/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ include!(concat!(env!("OUT_DIR"), "/fixture_location.rs"));
pub fn compile_module(fixture_name: &str) -> anyhow::Result<(Vec<u8>, sp_core::H256)> {
let out_dir: std::path::PathBuf = FIXTURE_DIR.into();
let fixture_path = out_dir.join(format!("{fixture_name}.polkavm"));
log::debug!("Loading fixture from {fixture_path:?}");
let binary = std::fs::read(fixture_path)?;
let code_hash = sp_io::hashing::keccak_256(&binary);
Ok((binary, sp_core::H256(code_hash)))
Expand Down
13 changes: 0 additions & 13 deletions substrate/frame/revive/mock-network/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,15 @@ pallet-assets = { workspace = true, default-features = true }
pallet-balances = { workspace = true, default-features = true }
pallet-revive = { workspace = true, default-features = true }
pallet-revive-uapi = { workspace = true }
pallet-revive-proc-macro = { workspace = true, default-features = true }
pallet-message-queue = { workspace = true, default-features = true }
pallet-proxy = { workspace = true, default-features = true }
pallet-timestamp = { workspace = true, default-features = true }
pallet-utility = { workspace = true, default-features = true }
pallet-xcm = { workspace = true }
polkadot-parachain-primitives = { workspace = true, default-features = true }
polkadot-primitives = { workspace = true, default-features = true }
polkadot-runtime-parachains = { workspace = true, default-features = true }
scale-info = { features = ["derive"], workspace = true }
sp-api = { workspace = true }
sp-core = { workspace = true }
sp-io = { workspace = true }
sp-keystore = { workspace = true, default-features = true }
sp-runtime = { workspace = true }
sp-tracing = { workspace = true, default-features = true }
xcm = { workspace = true }
Expand All @@ -53,17 +48,13 @@ std = [
"frame-support/std",
"frame-system/std",
"pallet-balances/std",
"pallet-proxy/std",
"pallet-revive-fixtures/std",
"pallet-revive/std",
"pallet-timestamp/std",
"pallet-utility/std",
"pallet-xcm/std",
"scale-info/std",
"sp-api/std",
"sp-core/std",
"sp-io/std",
"sp-keystore/std",
"sp-runtime/std",
"xcm-executor/std",
"xcm/std",
Expand All @@ -74,10 +65,8 @@ runtime-benchmarks = [
"pallet-assets/runtime-benchmarks",
"pallet-balances/runtime-benchmarks",
"pallet-message-queue/runtime-benchmarks",
"pallet-proxy/runtime-benchmarks",
"pallet-revive/runtime-benchmarks",
"pallet-timestamp/runtime-benchmarks",
"pallet-utility/runtime-benchmarks",
"pallet-xcm/runtime-benchmarks",
"polkadot-parachain-primitives/runtime-benchmarks",
"polkadot-primitives/runtime-benchmarks",
Expand All @@ -93,10 +82,8 @@ try-runtime = [
"pallet-assets/try-runtime",
"pallet-balances/try-runtime",
"pallet-message-queue/try-runtime",
"pallet-proxy/try-runtime",
"pallet-revive/try-runtime",
"pallet-timestamp/try-runtime",
"pallet-utility/try-runtime",
"pallet-xcm/try-runtime",
"polkadot-runtime-parachains/try-runtime",
"sp-runtime/try-runtime",
Expand Down
11 changes: 2 additions & 9 deletions substrate/frame/revive/rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,40 +42,33 @@ clap = { workspace = true, features = ["derive"] }
anyhow = { workspace = true }
futures = { workspace = true, features = ["thread-pool"] }
jsonrpsee = { workspace = true, features = ["full"] }
serde_json = { workspace = true }
thiserror = { workspace = true }
sp-crypto-hashing = { workspace = true }
subxt = { workspace = true, default-features = true, features = ["reconnecting-rpc-client"] }
tokio = { workspace = true, features = ["full"] }
codec = { workspace = true, features = ["derive"] }
log.workspace = true
log = { workspace = true }
pallet-revive = { workspace = true, default-features = true }
sp-core = { workspace = true, default-features = true }
sp-weights = { workspace = true, default-features = true }
sp-runtime = { workspace = true, default-features = true }
sc-rpc = { workspace = true, default-features = true }
sc-rpc-api = { workspace = true, default-features = true }
sc-cli = { workspace = true, default-features = true }
sc-service = { workspace = true, default-features = true }
prometheus-endpoint = { workspace = true, default-features = true }

rlp = { workspace = true, optional = true }
subxt-signer = { workspace = true, optional = true, features = [
"unstable-eth",
] }
hex = { workspace = true }
hex-literal = { workspace = true, optional = true }
scale-info = { workspace = true }
secp256k1 = { workspace = true, optional = true, features = ["recovery"] }
ethabi = { version = "18.0.0" }

[features]
example = ["hex-literal", "rlp", "secp256k1", "subxt-signer"]
example = ["rlp", "subxt-signer"]

[dev-dependencies]
env_logger = { workspace = true }
static_init = { workspace = true }
hex-literal = { workspace = true }
pallet-revive-fixtures = { workspace = true, default-features = true }
substrate-cli-test-utils = { workspace = true }
subxt-signer = { workspace = true, features = ["unstable-eth"] }

0 comments on commit 0558973

Please sign in to comment.