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

Commit fdff2b2

Browse files
authored
Remove uncles related code (#13216)
The code was added without any clear usage. The inherent for example is not benchmarked and not used.
1 parent f4caddb commit fdff2b2

File tree

22 files changed

+47
-906
lines changed

22 files changed

+47
-906
lines changed

Cargo.lock

Lines changed: 0 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ members = [
3232
"client/consensus/manual-seal",
3333
"client/consensus/pow",
3434
"client/consensus/slots",
35-
"client/consensus/uncles",
3635
"client/db",
3736
"client/executor",
3837
"client/executor/common",
@@ -177,7 +176,6 @@ members = [
177176
"primitives/arithmetic",
178177
"primitives/arithmetic/fuzzer",
179178
"primitives/authority-discovery",
180-
"primitives/authorship",
181179
"primitives/beefy",
182180
"primitives/block-builder",
183181
"primitives/blockchain",

bin/node/cli/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ sp-api = { version = "4.0.0-dev", path = "../../../primitives/api" }
5252
sp-core = { version = "7.0.0", path = "../../../primitives/core" }
5353
sp-runtime = { version = "7.0.0", path = "../../../primitives/runtime" }
5454
sp-timestamp = { version = "4.0.0-dev", path = "../../../primitives/timestamp" }
55-
sp-authorship = { version = "4.0.0-dev", path = "../../../primitives/authorship" }
5655
sp-inherents = { version = "4.0.0-dev", path = "../../../primitives/inherents" }
5756
sp-keyring = { version = "7.0.0", path = "../../../primitives/keyring" }
5857
sp-keystore = { version = "0.13.0", path = "../../../primitives/keystore" }
@@ -71,7 +70,6 @@ sc-network = { version = "0.10.0-dev", path = "../../../client/network" }
7170
sc-network-common = { version = "0.10.0-dev", path = "../../../client/network/common" }
7271
sc-consensus-slots = { version = "0.10.0-dev", path = "../../../client/consensus/slots" }
7372
sc-consensus-babe = { version = "0.10.0-dev", path = "../../../client/consensus/babe" }
74-
sc-consensus-uncles = { version = "0.10.0-dev", path = "../../../client/consensus/uncles" }
7573
grandpa = { version = "0.10.0-dev", package = "sc-finality-grandpa", path = "../../../client/finality-grandpa" }
7674
sc-rpc = { version = "4.0.0-dev", path = "../../../client/rpc" }
7775
sc-basic-authorship = { version = "0.10.0-dev", path = "../../../client/basic-authorship" }

bin/node/cli/src/service.rs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -222,10 +222,7 @@ pub fn new_partial(
222222
slot_duration,
223223
);
224224

225-
let uncles =
226-
sp_authorship::InherentDataProvider::<<Block as BlockT>::Header>::check_inherents();
227-
228-
Ok((slot, timestamp, uncles))
225+
Ok((slot, timestamp))
229226
},
230227
&task_manager.spawn_essential_handle(),
231228
config.prometheus_registry(),
@@ -440,11 +437,6 @@ pub fn new_full_base(
440437
create_inherent_data_providers: move |parent, ()| {
441438
let client_clone = client_clone.clone();
442439
async move {
443-
let uncles = sc_consensus_uncles::create_uncles_inherent_data_provider(
444-
&*client_clone,
445-
parent,
446-
)?;
447-
448440
let timestamp = sp_timestamp::InherentDataProvider::from_system_time();
449441

450442
let slot =
@@ -459,7 +451,7 @@ pub fn new_full_base(
459451
&parent,
460452
)?;
461453

462-
Ok((slot, timestamp, uncles, storage_proof))
454+
Ok((slot, timestamp, storage_proof))
463455
}
464456
},
465457
force_authoring,

bin/node/runtime/src/lib.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -488,14 +488,8 @@ impl pallet_timestamp::Config for Runtime {
488488
type WeightInfo = pallet_timestamp::weights::SubstrateWeight<Runtime>;
489489
}
490490

491-
parameter_types! {
492-
pub const UncleGenerations: BlockNumber = 5;
493-
}
494-
495491
impl pallet_authorship::Config for Runtime {
496492
type FindAuthor = pallet_session::FindAccountFromAuthorIndex<Self, Babe>;
497-
type UncleGenerations = UncleGenerations;
498-
type FilterUncle = ();
499493
type EventHandler = (Staking, ImOnline);
500494
}
501495

client/consensus/uncles/Cargo.toml

Lines changed: 0 additions & 19 deletions
This file was deleted.

client/consensus/uncles/README.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

client/consensus/uncles/src/lib.rs

Lines changed: 0 additions & 45 deletions
This file was deleted.

frame/authorship/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ impl-trait-for-tuples = "0.2.2"
2020
scale-info = { version = "2.1.1", default-features = false, features = ["derive"] }
2121
frame-support = { version = "4.0.0-dev", default-features = false, path = "../support" }
2222
frame-system = { version = "4.0.0-dev", default-features = false, path = "../system" }
23-
sp-authorship = { version = "4.0.0-dev", default-features = false, path = "../../primitives/authorship" }
2423
sp-runtime = { version = "7.0.0", default-features = false, path = "../../primitives/runtime" }
2524
sp-std = { version = "5.0.0", default-features = false, path = "../../primitives/std" }
2625

@@ -35,7 +34,6 @@ std = [
3534
"frame-support/std",
3635
"frame-system/std",
3736
"scale-info/std",
38-
"sp-authorship/std",
3937
"sp-runtime/std",
4038
"sp-std/std",
4139
]

0 commit comments

Comments
 (0)