Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
527e971
slots: create primitives crate for consensus slots
andresilva Jun 3, 2020
4ffdc8a
offences: add method to check if an offence is unknown
andresilva Jun 8, 2020
94084aa
babe: initial equivocation reporting implementation
andresilva Jun 8, 2020
8759f02
babe: organize imports
andresilva Jun 8, 2020
54ceef3
babe: working equivocation reporting
andresilva Jun 11, 2020
af2e58b
babe: add slot number to equivocation proof
andresilva Jun 15, 2020
4b573fb
session: move duplicate traits to session primitives
andresilva Jun 15, 2020
f20c07f
babe: move equivocation stuff to its own file
andresilva Jun 15, 2020
1215653
offences: fix test
andresilva Jun 15, 2020
03f5b71
session: don't have primitives depend on frame_support
andresilva Jun 15, 2020
17ea089
babe: use opaque type for key owner proof
andresilva Jun 15, 2020
d243323
babe: cleanup client equivocation reporting
andresilva Jun 15, 2020
237689e
babe: cleanup equivocation code in pallet
andresilva Jun 15, 2020
760996a
babe: allow sending signed equivocation reports
andresilva Jun 15, 2020
5464a0a
node: fix compilation
andresilva Jun 16, 2020
585f80b
fix test compilation
andresilva Jun 16, 2020
26bfb4f
Merge branch 'master' into andre/report-babe-equivocations
andresilva Jun 16, 2020
0f22701
babe: return bool on check_equivocation_proof
andresilva Jun 22, 2020
81ce38f
Merge branch 'master' into andre/report-babe-equivocations
andresilva Jun 22, 2020
95b29be
Merge branch 'master' into andre/report-babe-equivocations
andresilva Jun 24, 2020
e8467c4
babe: add test for equivocation reporting
andresilva Jun 30, 2020
187008a
babe: add more tests
andresilva Jun 30, 2020
ae68282
babe: add test for validate unsigned
andresilva Jun 30, 2020
db83144
Merge branch 'master' into andre/report-babe-equivocations
andresilva Jun 30, 2020
17a0141
babe: take slot number in generate_key_ownership_proof API
andresilva Jun 30, 2020
27dc893
Merge branch 'master' into andre/report-babe-equivocations
andresilva Jul 1, 2020
a1db90c
babe: add benchmark for equivocation proof checking
andresilva Jul 1, 2020
f88e5e6
session: add benchmark for membership proof checking
andresilva Jul 1, 2020
15b1000
offences: fix babe benchmark
andresilva Jul 1, 2020
8a5e0bc
babe: add weights based on benchmark results
andresilva Jul 1, 2020
d53a277
babe: adjust weights after benchmarking on reference hardware
andresilva Jul 2, 2020
4b1b2ce
Merge branch 'master' into andre/report-babe-equivocations
andresilva Jul 2, 2020
dbc9ee2
babe: reorder checks in check_and_report_equivocation
andresilva Jul 3, 2020
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
session: don't have primitives depend on frame_support
  • Loading branch information
andresilva committed Jun 15, 2020
commit 03f5b71fff83b96ced862bee8fcbb36af4dab91c
1 change: 0 additions & 1 deletion Cargo.lock

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

7 changes: 1 addition & 6 deletions frame/support/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ pub use sp_tracing;

#[cfg(feature = "std")]
pub use serde;
pub use sp_core::Void;
#[doc(hidden)]
pub use sp_std;
#[doc(hidden)]
pub use codec;
use codec::{Decode, Encode};
#[cfg(feature = "std")]
#[doc(hidden)]
pub use once_cell;
Expand Down Expand Up @@ -364,11 +364,6 @@ macro_rules! assert_ok {
}
}

/// The void type - it cannot exist.
// Oh rust, you crack me up...
#[derive(Clone, Decode, Encode, Eq, PartialEq, RuntimeDebug)]
pub enum Void {}

#[cfg(feature = "std")]
#[doc(hidden)]
pub use serde::{Serialize, Deserialize};
Expand Down
5 changes: 5 additions & 0 deletions primitives/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,11 @@ pub fn to_substrate_wasm_fn_return_value(value: &impl Encode) -> u64 {
res
}

/// The void type - it cannot exist.
// Oh rust, you crack me up...
#[derive(Clone, Decode, Encode, Eq, PartialEq, RuntimeDebug)]
pub enum Void {}

/// Macro for creating `Maybe*` marker traits.
///
/// Such a maybe-marker trait requires the given bound when `feature = std` and doesn't require
Expand Down
2 changes: 0 additions & 2 deletions primitives/session/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ targets = ["x86_64-unknown-linux-gnu"]

[dependencies]
codec = { package = "parity-scale-codec", version = "1.3.0", default-features = false, features = ["derive"] }
frame-support = { version = "2.0.0-rc3", default-features = false, path = "../../frame/support" }
sp-api = { version = "2.0.0-rc3", default-features = false, path = "../api" }
sp-core = { version = "2.0.0-rc3", default-features = false, path = "../core" }
sp-std = { version = "2.0.0-rc3", default-features = false, path = "../std" }
Expand All @@ -24,7 +23,6 @@ sp-runtime = { version = "2.0.0-rc3", optional = true, path = "../runtime" }
default = [ "std" ]
std = [
"codec/std",
"frame-support/std",
"sp-api/std",
"sp-core/std",
"sp-std/std",
Expand Down
4 changes: 2 additions & 2 deletions primitives/session/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,13 @@ pub trait GetValidatorCount {
fn validator_count(&self) -> ValidatorCount;
}

impl GetSessionNumber for frame_support::Void {
impl GetSessionNumber for sp_core::Void {
fn session(&self) -> SessionIndex {
Default::default()
}
}

impl GetValidatorCount for frame_support::Void {
impl GetValidatorCount for sp_core::Void {
fn validator_count(&self) -> ValidatorCount {
Default::default()
}
Expand Down