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

Disputes runtime #2947

Merged
74 commits merged into from
Jul 19, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
8bd80d3
disputes module skeleton and storage
rphmeier Apr 28, 2021
101fde9
implement dispute module initialization logic
rphmeier Apr 28, 2021
4198797
implement disputes session change logic
rphmeier Apr 28, 2021
7dac193
provide dispute skeletons
rphmeier May 4, 2021
dd01c06
deduplication & ancient check
rphmeier May 4, 2021
ef153dc
fix a couple of warnings
rphmeier May 4, 2021
8dea7e6
begin provide_dispute_data impl
rphmeier May 5, 2021
f70f6e2
flesh out statement set import somewhat
rphmeier May 5, 2021
0451139
move ApprovalVote to shared primitives
rphmeier May 5, 2021
6748578
add a signing-payload API to explicit dispute statements
rphmeier May 5, 2021
95d6c19
implement statement signature checking
rphmeier May 5, 2021
ce5906b
Merge branch 'master' into rh-disputes-runtime
rphmeier May 5, 2021
01e948e
some bitflags glue for observing changes in disputes
rphmeier May 6, 2021
8e25b48
implement dispute vote import logic
rphmeier May 7, 2021
271434b
flesh out everything except slashing
rphmeier May 8, 2021
310ee52
guide: tweaks
rphmeier May 10, 2021
37c3c3a
declare and use punishment trait
rphmeier May 10, 2021
8180eae
punish validators for inconclusive disputes
rphmeier May 10, 2021
2ed7fe5
guide: tiny fix
rphmeier May 10, 2021
31c27c0
guide: update docs
rphmeier May 10, 2021
cfdbebd
add disputes getter fn
rphmeier May 10, 2021
dcd410c
guide: small change to spam slots handling
rphmeier May 10, 2021
ebd8b18
improve spam slots handling and fix some bugs
rphmeier May 10, 2021
da2d43a
finish API of disputes runtime
rphmeier May 10, 2021
d09c851
define and deposit `RevertTo` log
rphmeier May 11, 2021
cfe3241
begin integrating disputes into para_inherent
rphmeier May 11, 2021
d14e904
use precomputed slash_for/against
rphmeier May 11, 2021
7ffe889
return candidate hash from process_bitfields
rphmeier May 11, 2021
3638877
implement inclusion::collect_disputed
rphmeier May 11, 2021
82e86da
finish integration into rest of runtime
rphmeier May 11, 2021
955e0c4
add Disputes to initializer
rphmeier May 11, 2021
83e7b62
address suggestions
gui1117 May 21, 2021
fc3ab87
use pallet macro
gui1117 May 21, 2021
6fa374c
fix typo
gui1117 May 21, 2021
1b4838d
Update runtime/parachains/src/disputes.rs
gui1117 May 27, 2021
c0d15be
Merge branch 'rh-disputes-runtime' of https://github.com/paritytech/p…
rphmeier May 28, 2021
7ef44b5
add test: fix pruning
gui1117 May 28, 2021
7570236
document specific behavior
gui1117 May 28, 2021
6dd0ad6
deposit events on dispute changes
rphmeier May 31, 2021
040cc17
add an allow(unused) on fn disputes
rphmeier May 31, 2021
4a3eeba
add a dummy PunishValidators implementation
rphmeier May 31, 2021
6f5b27f
add disputes module to Rococo
rphmeier May 31, 2021
aacc3de
add disputes module to westend runtime
rphmeier May 31, 2021
993709b
add disputes module to test runtime
rphmeier May 31, 2021
5b7928a
add disputes module to kusama runtime
rphmeier May 31, 2021
14bd62d
Merge branch 'master' into rh-disputes-runtime
rphmeier May 31, 2021
776b3b6
guide: prepare for runtime API for checking frozenness
rphmeier Jun 2, 2021
a4ee80f
remove revert digests in favor of state variable
rphmeier Jun 2, 2021
b0d579c
merge reversions
rphmeier Jun 3, 2021
9430d3c
Update runtime/parachains/src/disputes.rs
rphmeier Jun 3, 2021
0680641
Update runtime/parachains/src/disputes.rs
rphmeier Jun 3, 2021
a715d61
Update runtime/parachains/src/disputes.rs
rphmeier Jun 3, 2021
3f6ce32
Merge branch 'master' into rh-disputes-runtime
rphmeier Jun 7, 2021
8ebc635
add byzantine_threshold and supermajority_threshold utilities to prim…
rphmeier Jun 10, 2021
f3e22c0
use primitive helpers
rphmeier Jun 10, 2021
53e2ccb
deposit revert event when freezing chain
andresilva Jun 23, 2021
4f4b84b
deposit revert log when freezing chain
andresilva Jun 23, 2021
a7ad191
test revert event and log are generated when freezing
andresilva Jun 23, 2021
7b04be6
add trait to decouple disputes handling from paras inherent handling
andresilva Jun 23, 2021
c6cf3f7
runtime: fix compilation and setup dispute handler
andresilva Jun 23, 2021
3acf2c1
Merge branch 'master' into rh-disputes-runtime
andresilva Jun 23, 2021
9aa95b4
disputes: add hook for filtering out dispute statements
andresilva Jun 23, 2021
ff06d0f
disputes: add initializer hooks to DisputesHandler
andresilva Jun 23, 2021
dd35e7f
runtime: remove disputes pallet from all runtimes
andresilva Jun 23, 2021
df6bfa8
Merge branch 'master' into rh-disputes-runtime
rphmeier Jul 15, 2021
9214a99
Merge branch 'rh-disputes-runtime' of https://github.com/paritytech/p…
rphmeier Jul 15, 2021
eb81811
tag TODOs
rphmeier Jul 15, 2021
c7afa0c
don't import any dispute statements just yet...
rphmeier Jul 15, 2021
4378b5c
address grumbles
rphmeier Jul 17, 2021
8a7abdb
fix spellcheck, hopefully
rphmeier Jul 17, 2021
663b5cc
maybe now?
rphmeier Jul 17, 2021
3be97bb
last spellcheck round
rphmeier Jul 17, 2021
bb47ed4
fix runtime tests
rphmeier Jul 19, 2021
5ecf237
fix test-runtime
rphmeier Jul 19, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
runtime: fix compilation and setup dispute handler
  • Loading branch information
andresilva committed Jun 23, 2021
commit c6cf3f7c5ec49db782372f1c5f68a4e31c5f19f1
6 changes: 4 additions & 2 deletions runtime/kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1092,7 +1092,9 @@ impl parachains_disputes::Config for Runtime {
type PunishValidators = ();
}

impl parachains_paras_inherent::Config for Runtime {}
impl parachains_paras_inherent::Config for Runtime {
type DisputesHandler = ();
}

impl parachains_scheduler::Config for Runtime {}

Expand Down Expand Up @@ -1469,7 +1471,7 @@ construct_runtime! {
ParasUmp: parachains_ump::{Pallet, Call, Storage, Event} = 59,
ParasHrmp: parachains_hrmp::{Pallet, Call, Storage, Event} = 60,
ParasSessionInfo: parachains_session_info::{Pallet, Call, Storage} = 61,
ParasDisputes: parachains_disputes::{Pallet, Call, Storage, Event} = 62,
ParasDisputes: parachains_disputes::{Pallet, Call, Storage, Event<T>} = 62,

// Parachain Onboarding Pallets. Start indices at 70 to leave room.
Registrar: paras_registrar::{Pallet, Call, Storage, Event<T>} = 70,
Expand Down
4 changes: 3 additions & 1 deletion runtime/parachains/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,9 @@ impl crate::inclusion::Config for Test {
type RewardValidators = TestRewardValidators;
}

impl crate::paras_inherent::Config for Test { }
impl crate::paras_inherent::Config for Test {
type DisputesHandler = Disputes;
}

impl crate::session_info::Config for Test { }

Expand Down
6 changes: 4 additions & 2 deletions runtime/rococo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ construct_runtime! {
Ump: parachains_ump::{Pallet, Call, Storage, Event},
Hrmp: parachains_hrmp::{Pallet, Call, Storage, Event, Config},
SessionInfo: parachains_session_info::{Pallet, Call, Storage},
Disputes: parachains_disputes::{Pallet, Call, Storage, Event},
Disputes: parachains_disputes::{Pallet, Call, Storage, Event<T>},

// Parachain Onboarding Pallets
Registrar: paras_registrar::{Pallet, Call, Storage, Event<T>},
Expand Down Expand Up @@ -784,7 +784,9 @@ impl parachains_disputes::Config for Runtime {
type PunishValidators = ();
}

impl parachains_paras_inherent::Config for Runtime {}
impl parachains_paras_inherent::Config for Runtime {
type DisputesHandler = ();
}

impl parachains_scheduler::Config for Runtime {}

Expand Down
6 changes: 4 additions & 2 deletions runtime/test-runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,9 @@ impl parachains_disputes::Config for Runtime {
type PunishValidators = ();
}

impl parachains_paras_inherent::Config for Runtime {}
impl parachains_paras_inherent::Config for Runtime {
type DisputesHandler = ParasDisputes;
}

impl parachains_initializer::Config for Runtime {
type Randomness = pallet_babe::RandomnessFromOneEpochAgo<Runtime>;
Expand Down Expand Up @@ -543,7 +545,7 @@ construct_runtime! {
SessionInfo: parachains_session_info::{Pallet, Call, Storage},
Hrmp: parachains_hrmp::{Pallet, Call, Storage, Event},
Ump: parachains_ump::{Pallet, Call, Storage, Event},
ParasDisputes: parachains_disputes::{Pallet, Call, Storage, Event},
ParasDisputes: parachains_disputes::{Pallet, Call, Storage, Event<T>},

Sudo: pallet_sudo::{Pallet, Call, Storage, Config<T>, Event<T>},
}
Expand Down
6 changes: 4 additions & 2 deletions runtime/westend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,9 @@ impl parachains_disputes::Config for Runtime {
type PunishValidators = ();
}

impl parachains_paras_inherent::Config for Runtime {}
impl parachains_paras_inherent::Config for Runtime {
type DisputesHandler = ();
}

impl parachains_scheduler::Config for Runtime {}

Expand Down Expand Up @@ -1066,7 +1068,7 @@ construct_runtime! {
ParasUmp: parachains_ump::{Pallet, Call, Storage, Event} = 50,
ParasHrmp: parachains_hrmp::{Pallet, Call, Storage, Event} = 51,
ParasSessionInfo: parachains_session_info::{Pallet, Call, Storage} = 52,
ParasDisputes: parachains_disputes::{Pallet, Call, Storage, Event} = 53,
ParasDisputes: parachains_disputes::{Pallet, Call, Storage, Event<T>} = 53,

// Parachain Onboarding Pallets. Start indices at 60 to leave room.
Registrar: paras_registrar::{Pallet, Call, Storage, Event<T>} = 60,
Expand Down