Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Remove uncles related code (#13216)
Browse files Browse the repository at this point in the history
The code was added without any clear usage. The inherent for example is not benchmarked and not used.
  • Loading branch information
bkchr authored and Ank4n committed Feb 5, 2023
1 parent 3ec6576 commit dca583b
Show file tree
Hide file tree
Showing 22 changed files with 47 additions and 906 deletions.
24 changes: 0 additions & 24 deletions Cargo.lock

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

2 changes: 0 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ members = [
"client/consensus/manual-seal",
"client/consensus/pow",
"client/consensus/slots",
"client/consensus/uncles",
"client/db",
"client/executor",
"client/executor/common",
Expand Down Expand Up @@ -177,7 +176,6 @@ members = [
"primitives/arithmetic",
"primitives/arithmetic/fuzzer",
"primitives/authority-discovery",
"primitives/authorship",
"primitives/beefy",
"primitives/block-builder",
"primitives/blockchain",
Expand Down
2 changes: 0 additions & 2 deletions bin/node/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ sp-api = { version = "4.0.0-dev", path = "../../../primitives/api" }
sp-core = { version = "7.0.0", path = "../../../primitives/core" }
sp-runtime = { version = "7.0.0", path = "../../../primitives/runtime" }
sp-timestamp = { version = "4.0.0-dev", path = "../../../primitives/timestamp" }
sp-authorship = { version = "4.0.0-dev", path = "../../../primitives/authorship" }
sp-inherents = { version = "4.0.0-dev", path = "../../../primitives/inherents" }
sp-keyring = { version = "7.0.0", path = "../../../primitives/keyring" }
sp-keystore = { version = "0.13.0", path = "../../../primitives/keystore" }
Expand All @@ -71,7 +70,6 @@ sc-network = { version = "0.10.0-dev", path = "../../../client/network" }
sc-network-common = { version = "0.10.0-dev", path = "../../../client/network/common" }
sc-consensus-slots = { version = "0.10.0-dev", path = "../../../client/consensus/slots" }
sc-consensus-babe = { version = "0.10.0-dev", path = "../../../client/consensus/babe" }
sc-consensus-uncles = { version = "0.10.0-dev", path = "../../../client/consensus/uncles" }
grandpa = { version = "0.10.0-dev", package = "sc-finality-grandpa", path = "../../../client/finality-grandpa" }
sc-rpc = { version = "4.0.0-dev", path = "../../../client/rpc" }
sc-basic-authorship = { version = "0.10.0-dev", path = "../../../client/basic-authorship" }
Expand Down
12 changes: 2 additions & 10 deletions bin/node/cli/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,7 @@ pub fn new_partial(
slot_duration,
);

let uncles =
sp_authorship::InherentDataProvider::<<Block as BlockT>::Header>::check_inherents();

Ok((slot, timestamp, uncles))
Ok((slot, timestamp))
},
&task_manager.spawn_essential_handle(),
config.prometheus_registry(),
Expand Down Expand Up @@ -440,11 +437,6 @@ pub fn new_full_base(
create_inherent_data_providers: move |parent, ()| {
let client_clone = client_clone.clone();
async move {
let uncles = sc_consensus_uncles::create_uncles_inherent_data_provider(
&*client_clone,
parent,
)?;

let timestamp = sp_timestamp::InherentDataProvider::from_system_time();

let slot =
Expand All @@ -459,7 +451,7 @@ pub fn new_full_base(
&parent,
)?;

Ok((slot, timestamp, uncles, storage_proof))
Ok((slot, timestamp, storage_proof))
}
},
force_authoring,
Expand Down
6 changes: 0 additions & 6 deletions bin/node/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -488,14 +488,8 @@ impl pallet_timestamp::Config for Runtime {
type WeightInfo = pallet_timestamp::weights::SubstrateWeight<Runtime>;
}

parameter_types! {
pub const UncleGenerations: BlockNumber = 5;
}

impl pallet_authorship::Config for Runtime {
type FindAuthor = pallet_session::FindAccountFromAuthorIndex<Self, Babe>;
type UncleGenerations = UncleGenerations;
type FilterUncle = ();
type EventHandler = (Staking, ImOnline);
}

Expand Down
19 changes: 0 additions & 19 deletions client/consensus/uncles/Cargo.toml

This file was deleted.

3 changes: 0 additions & 3 deletions client/consensus/uncles/README.md

This file was deleted.

45 changes: 0 additions & 45 deletions client/consensus/uncles/src/lib.rs

This file was deleted.

2 changes: 0 additions & 2 deletions frame/authorship/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ impl-trait-for-tuples = "0.2.2"
scale-info = { version = "2.1.1", default-features = false, features = ["derive"] }
frame-support = { version = "4.0.0-dev", default-features = false, path = "../support" }
frame-system = { version = "4.0.0-dev", default-features = false, path = "../system" }
sp-authorship = { version = "4.0.0-dev", default-features = false, path = "../../primitives/authorship" }
sp-runtime = { version = "7.0.0", default-features = false, path = "../../primitives/runtime" }
sp-std = { version = "5.0.0", default-features = false, path = "../../primitives/std" }

Expand All @@ -35,7 +34,6 @@ std = [
"frame-support/std",
"frame-system/std",
"scale-info/std",
"sp-authorship/std",
"sp-runtime/std",
"sp-std/std",
]
Expand Down
Loading

0 comments on commit dca583b

Please sign in to comment.