Move BEEFY code to consensus (#13484)

* Move beefy primitives to consensus dir
* Move beefy gadget to client consensus folder
* Rename beefy crates
This commit is contained in:
Davide Galassi
2023-02-28 15:56:22 +01:00
committed by GitHub
parent 1eb0cd31b9
commit 1ef9c473e7
47 changed files with 260 additions and 262 deletions
+2 -2
View File
@@ -13,11 +13,11 @@ publish = false
targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
beefy-primitives = { version = "4.0.0-dev", default-features = false, path = "../../primitives/beefy", package = "sp-beefy" }
pallet-beefy-mmr = { version = "4.0.0-dev", default-features = false, path = "../../frame/beefy-mmr" }
sp-application-crypto = { version = "7.0.0", default-features = false, path = "../../primitives/application-crypto" }
sp-consensus-aura = { version = "0.10.0-dev", default-features = false, path = "../../primitives/consensus/aura" }
sp-consensus-babe = { version = "0.10.0-dev", default-features = false, path = "../../primitives/consensus/babe" }
sp-consensus-beefy = { version = "4.0.0-dev", default-features = false, path = "../../primitives/consensus/beefy" }
sp-block-builder = { version = "4.0.0-dev", default-features = false, path = "../../primitives/block-builder" }
codec = { package = "parity-scale-codec", version = "3.2.2", default-features = false, features = ["derive"] }
scale-info = { version = "2.1.1", default-features = false, features = ["derive"] }
@@ -66,11 +66,11 @@ default = [
"std",
]
std = [
"beefy-primitives/std",
"pallet-beefy-mmr/std",
"sp-application-crypto/std",
"sp-consensus-aura/std",
"sp-consensus-babe/std",
"sp-consensus-beefy/std",
"sp-block-builder/std",
"codec/std",
"scale-info/std",
+12 -12
View File
@@ -972,36 +972,36 @@ cfg_if! {
}
}
impl beefy_primitives::BeefyApi<Block> for Runtime {
impl sp_consensus_beefy::BeefyApi<Block> for Runtime {
fn beefy_genesis() -> Option<BlockNumber> {
None
}
fn validator_set() -> Option<beefy_primitives::ValidatorSet<beefy_primitives::crypto::AuthorityId>> {
fn validator_set() -> Option<sp_consensus_beefy::ValidatorSet<sp_consensus_beefy::crypto::AuthorityId>> {
None
}
fn submit_report_equivocation_unsigned_extrinsic(
_equivocation_proof: beefy_primitives::EquivocationProof<
_equivocation_proof: sp_consensus_beefy::EquivocationProof<
NumberFor<Block>,
beefy_primitives::crypto::AuthorityId,
beefy_primitives::crypto::Signature
sp_consensus_beefy::crypto::AuthorityId,
sp_consensus_beefy::crypto::Signature
>,
_key_owner_proof: beefy_primitives::OpaqueKeyOwnershipProof,
_key_owner_proof: sp_consensus_beefy::OpaqueKeyOwnershipProof,
) -> Option<()> { None }
fn generate_key_ownership_proof(
_set_id: beefy_primitives::ValidatorSetId,
_authority_id: beefy_primitives::crypto::AuthorityId,
) -> Option<beefy_primitives::OpaqueKeyOwnershipProof> { None }
_set_id: sp_consensus_beefy::ValidatorSetId,
_authority_id: sp_consensus_beefy::crypto::AuthorityId,
) -> Option<sp_consensus_beefy::OpaqueKeyOwnershipProof> { None }
}
impl pallet_beefy_mmr::BeefyMmrApi<Block, beefy_primitives::MmrRootHash> for Runtime {
fn authority_set_proof() -> beefy_primitives::mmr::BeefyAuthoritySet<beefy_primitives::MmrRootHash> {
impl pallet_beefy_mmr::BeefyMmrApi<Block, sp_consensus_beefy::MmrRootHash> for Runtime {
fn authority_set_proof() -> sp_consensus_beefy::mmr::BeefyAuthoritySet<sp_consensus_beefy::MmrRootHash> {
Default::default()
}
fn next_authority_set_proof() -> beefy_primitives::mmr::BeefyNextAuthoritySet<beefy_primitives::MmrRootHash> {
fn next_authority_set_proof() -> sp_consensus_beefy::mmr::BeefyNextAuthoritySet<sp_consensus_beefy::MmrRootHash> {
Default::default()
}
}