Skip to content

Commit

Permalink
Enable Offchain Equalise (paritytech#5683)
Browse files Browse the repository at this point in the history
* Master.into()

* Remove debug stuff

* Better license

* Migrate away from SimpleDispatchInfo

* Fix test

* Revert "Migrate away from SimpleDispatchInfo"

This reverts commit dbdd27f.

* Move to offchain randomness

* Fix tests

* Fix tests more
  • Loading branch information
kianenigma authored Apr 27, 2020
1 parent 9a4edfc commit 05275e8
Show file tree
Hide file tree
Showing 20 changed files with 634 additions and 372 deletions.
21 changes: 21 additions & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ members = [
"frame/society",
"frame/staking",
"frame/staking/reward-curve",
"frame/staking/fuzzer",
"frame/sudo",
"frame/support",
"frame/support/procedural",
Expand Down
4 changes: 3 additions & 1 deletion bin/node/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,9 @@ parameter_types! {
pub const BondingDuration: pallet_staking::EraIndex = 24 * 28;
pub const SlashDeferDuration: pallet_staking::EraIndex = 24 * 7; // 1/4 the bonding duration.
pub const RewardCurve: &'static PiecewiseLinear<'static> = &REWARD_CURVE;
pub const ElectionLookahead: BlockNumber = 25; // 10 minutes per session => 100 block.
pub const ElectionLookahead: BlockNumber = EPOCH_DURATION_IN_BLOCKS / 4;
pub const MaxNominatorRewardedPerValidator: u32 = 64;
pub const MaxIterations: u32 = 5;
}

impl pallet_staking::Trait for Runtime {
Expand All @@ -322,6 +323,7 @@ impl pallet_staking::Trait for Runtime {
type NextNewSession = Session;
type ElectionLookahead = ElectionLookahead;
type Call = Call;
type MaxIterations = MaxIterations;
type MaxNominatorRewardedPerValidator = MaxNominatorRewardedPerValidator;
type UnsignedPriority = StakingUnsignedPriority;
}
Expand Down
1 change: 1 addition & 0 deletions frame/session/benchmarking/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ impl pallet_staking::Trait for Test {
type Call = Call;
type MaxNominatorRewardedPerValidator = MaxNominatorRewardedPerValidator;
type UnsignedPriority = UnsignedPriority;
type MaxIterations = ();
}

impl crate::Trait for Test {}
Expand Down
4 changes: 0 additions & 4 deletions frame/staking/fuzz/.gitignore

This file was deleted.

38 changes: 0 additions & 38 deletions frame/staking/fuzz/Cargo.toml

This file was deleted.

130 changes: 0 additions & 130 deletions frame/staking/fuzz/fuzz_targets/submit_solution.rs

This file was deleted.

2 changes: 2 additions & 0 deletions frame/staking/fuzzer/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
hfuzz_target
hfuzz_workspace
Loading

0 comments on commit 05275e8

Please sign in to comment.