mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-08 07:48:00 +00:00
[Companion] BEEFY crates renaming (#6799)
* Temporary commit to make the Substrate CI happy * Revert "Temporary commit to make the Substrate CI happy" This reverts commit 9eb2fd223c3e36312242d4fda4ebacf3dd732547. * Align to substrate master * Update lock * Adjust some naming according to the new substrate crates
This commit is contained in:
Generated
+311
-275
File diff suppressed because it is too large
Load Diff
@@ -25,8 +25,9 @@ sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "mast
|
||||
sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
sp-session = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
sp-consensus-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
sp-consensus-beefy = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
sp-consensus-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
sp-offchain = { package = "sp-offchain", git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
@@ -37,8 +38,6 @@ sc-executor = { git = "https://github.com/paritytech/substrate", branch = "maste
|
||||
sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
sc-service = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
|
||||
beefy-primitives = { git = "https://github.com/paritytech/substrate", branch = "master", package = "sp-beefy" }
|
||||
|
||||
# Polkadot Runtimes
|
||||
polkadot-runtime = { path = "../../runtime/polkadot", optional = true }
|
||||
kusama-runtime = { path = "../../runtime/kusama", optional = true }
|
||||
|
||||
@@ -135,7 +135,7 @@ pub trait RuntimeApiCollection:
|
||||
+ sp_offchain::OffchainWorkerApi<Block>
|
||||
+ sp_session::SessionKeys<Block>
|
||||
+ sp_authority_discovery::AuthorityDiscoveryApi<Block>
|
||||
+ beefy_primitives::BeefyApi<Block>
|
||||
+ sp_consensus_beefy::BeefyApi<Block>
|
||||
where
|
||||
<Self as sp_api::ApiExt<Block>>::StateBackend: sp_api::StateBackend<BlakeTwo256>,
|
||||
{
|
||||
@@ -156,7 +156,7 @@ where
|
||||
+ sp_offchain::OffchainWorkerApi<Block>
|
||||
+ sp_session::SessionKeys<Block>
|
||||
+ sp_authority_discovery::AuthorityDiscoveryApi<Block>
|
||||
+ beefy_primitives::BeefyApi<Block>,
|
||||
+ sp_consensus_beefy::BeefyApi<Block>,
|
||||
<Self as sp_api::ApiExt<Block>>::StateBackend: sp_api::StateBackend<BlakeTwo256>,
|
||||
{
|
||||
}
|
||||
|
||||
@@ -9,8 +9,7 @@ edition.workspace = true
|
||||
# Substrate Client
|
||||
sc-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
babe = { package = "sc-consensus-babe", git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
beefy-primitives = { git = "https://github.com/paritytech/substrate", branch = "master", package = "sp-beefy" }
|
||||
beefy-gadget = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
beefy = { package = "sc-consensus-beefy", git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
grandpa = { package = "sc-consensus-grandpa", git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
mmr-gadget = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
sp-mmr-primitives = { git = "https://github.com/paritytech/substrate", branch = "master"}
|
||||
@@ -35,6 +34,7 @@ telemetry = { package = "sc-telemetry", git = "https://github.com/paritytech/sub
|
||||
# Substrate Primitives
|
||||
sp-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
consensus_common = { package = "sp-consensus", git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
beefy-primitives = { package = "sp-consensus-beefy", git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
grandpa_primitives = { package = "sp-consensus-grandpa", git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
inherents = { package = "sp-inherents", git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
sp-api = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
|
||||
@@ -351,7 +351,7 @@ type FullGrandpaBlockImport<RuntimeApi, ExecutorDispatch, ChainSelection = FullS
|
||||
>;
|
||||
#[cfg(feature = "full-node")]
|
||||
type FullBeefyBlockImport<RuntimeApi, ExecutorDispatch, InnerBlockImport> =
|
||||
beefy_gadget::import::BeefyBlockImport<
|
||||
beefy::import::BeefyBlockImport<
|
||||
Block,
|
||||
FullBackend,
|
||||
FullClient<RuntimeApi, ExecutorDispatch>,
|
||||
@@ -471,7 +471,7 @@ fn new_partial<RuntimeApi, ExecutorDispatch, ChainSelection>(
|
||||
>,
|
||||
grandpa::LinkHalf<Block, FullClient<RuntimeApi, ExecutorDispatch>, ChainSelection>,
|
||||
babe::BabeLink<Block>,
|
||||
beefy_gadget::BeefyVoterLinks<Block>,
|
||||
beefy::BeefyVoterLinks<Block>,
|
||||
),
|
||||
grandpa::SharedVoterState,
|
||||
sp_consensus_babe::SlotDuration,
|
||||
@@ -514,7 +514,7 @@ where
|
||||
let justification_import = grandpa_block_import.clone();
|
||||
|
||||
let (beefy_block_import, beefy_voter_links, beefy_rpc_links) =
|
||||
beefy_gadget::beefy_block_import_and_links(
|
||||
beefy::beefy_block_import_and_links(
|
||||
grandpa_block_import,
|
||||
backend.clone(),
|
||||
client.clone(),
|
||||
@@ -852,11 +852,11 @@ where
|
||||
.push(grandpa::grandpa_peers_set_config(grandpa_protocol_name.clone()));
|
||||
|
||||
let beefy_gossip_proto_name =
|
||||
beefy_gadget::gossip_protocol_name(&genesis_hash, config.chain_spec.fork_id());
|
||||
beefy::gossip_protocol_name(&genesis_hash, config.chain_spec.fork_id());
|
||||
// `beefy_on_demand_justifications_handler` is given to `beefy-gadget` task to be run,
|
||||
// while `beefy_req_resp_cfg` is added to `config.network.request_response_protocols`.
|
||||
let (beefy_on_demand_justifications_handler, beefy_req_resp_cfg) =
|
||||
beefy_gadget::communication::request_response::BeefyJustifsRequestHandler::new(
|
||||
beefy::communication::request_response::BeefyJustifsRequestHandler::new(
|
||||
&genesis_hash,
|
||||
config.chain_spec.fork_id(),
|
||||
client.clone(),
|
||||
@@ -866,9 +866,7 @@ where
|
||||
config
|
||||
.network
|
||||
.extra_sets
|
||||
.push(beefy_gadget::communication::beefy_peers_set_config(
|
||||
beefy_gossip_proto_name.clone(),
|
||||
));
|
||||
.push(beefy::communication::beefy_peers_set_config(beefy_gossip_proto_name.clone()));
|
||||
config.network.request_response_protocols.push(beefy_req_resp_cfg);
|
||||
}
|
||||
|
||||
@@ -1198,14 +1196,14 @@ where
|
||||
|
||||
if enable_beefy {
|
||||
let justifications_protocol_name = beefy_on_demand_justifications_handler.protocol_name();
|
||||
let network_params = beefy_gadget::BeefyNetworkParams {
|
||||
let network_params = beefy::BeefyNetworkParams {
|
||||
network: network.clone(),
|
||||
gossip_protocol_name: beefy_gossip_proto_name,
|
||||
justifications_protocol_name,
|
||||
_phantom: core::marker::PhantomData::<Block>,
|
||||
};
|
||||
let payload_provider = beefy_primitives::mmr::MmrRootProvider::new(client.clone());
|
||||
let beefy_params = beefy_gadget::BeefyParams {
|
||||
let beefy_params = beefy::BeefyParams {
|
||||
client: client.clone(),
|
||||
backend: backend.clone(),
|
||||
payload_provider,
|
||||
@@ -1218,7 +1216,7 @@ where
|
||||
on_demand_justifications_handler: beefy_on_demand_justifications_handler,
|
||||
};
|
||||
|
||||
let gadget = beefy_gadget::start_beefy_gadget::<_, _, _, _, _, _>(beefy_params);
|
||||
let gadget = beefy::start_beefy_gadget::<_, _, _, _, _, _>(beefy_params);
|
||||
|
||||
// Wococo's purpose is to be a testbed for BEEFY, so if it fails we'll
|
||||
// bring the node down with it to make sure it is noticed.
|
||||
|
||||
@@ -18,6 +18,8 @@ sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "mas
|
||||
sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
sc-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
sc-consensus-babe-rpc = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
sc-consensus-beefy = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
sc-consensus-beefy-rpc = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
sc-consensus-epochs = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
sc-consensus-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
sc-consensus-grandpa-rpc = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
@@ -27,6 +29,4 @@ frame-rpc-system = { package = "substrate-frame-rpc-system", git = "https://gith
|
||||
mmr-rpc = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
beefy-gadget = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
beefy-gadget-rpc = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
substrate-state-trie-migration-rpc = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
|
||||
@@ -24,6 +24,9 @@ use jsonrpsee::RpcModule;
|
||||
use polkadot_primitives::{AccountId, Balance, Block, BlockNumber, Hash, Nonce};
|
||||
use sc_client_api::AuxStore;
|
||||
use sc_consensus_babe::{BabeConfiguration, Epoch};
|
||||
use sc_consensus_beefy::communication::notification::{
|
||||
BeefyBestBlockStream, BeefyVersionedFinalityProofStream,
|
||||
};
|
||||
use sc_consensus_grandpa::FinalityProofProvider;
|
||||
pub use sc_rpc::{DenyUnsafe, SubscriptionTaskExecutor};
|
||||
use sp_api::ProvideRuntimeApi;
|
||||
@@ -61,9 +64,6 @@ pub struct GrandpaDeps<B> {
|
||||
pub finality_provider: Arc<FinalityProofProvider<B, Block>>,
|
||||
}
|
||||
|
||||
use beefy_gadget::communication::notification::{
|
||||
BeefyBestBlockStream, BeefyVersionedFinalityProofStream,
|
||||
};
|
||||
/// Dependencies for BEEFY
|
||||
pub struct BeefyDeps {
|
||||
/// Receives notifications about finality proof events from BEEFY.
|
||||
@@ -117,11 +117,11 @@ where
|
||||
B: sc_client_api::Backend<Block> + Send + Sync + 'static,
|
||||
B::State: sc_client_api::StateBackend<sp_runtime::traits::HashFor<Block>>,
|
||||
{
|
||||
use beefy_gadget_rpc::{Beefy, BeefyApiServer};
|
||||
use frame_rpc_system::{System, SystemApiServer};
|
||||
use mmr_rpc::{Mmr, MmrApiServer};
|
||||
use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApiServer};
|
||||
use sc_consensus_babe_rpc::{Babe, BabeApiServer};
|
||||
use sc_consensus_beefy_rpc::{Beefy, BeefyApiServer};
|
||||
use sc_consensus_grandpa_rpc::{Grandpa, GrandpaApiServer};
|
||||
use sc_sync_state_rpc::{SyncState, SyncStateApiServer};
|
||||
use substrate_state_trie_migration_rpc::{StateMigration, StateMigrationApiServer};
|
||||
|
||||
@@ -15,7 +15,6 @@ serde = { version = "1.0.139", default-features = false }
|
||||
serde_derive = { version = "1.0.117", optional = true }
|
||||
static_assertions = "1.1.0"
|
||||
|
||||
beefy-primitives = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, package = "sp-beefy" }
|
||||
sp-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
inherents = { package = "sp-inherents", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
sp-std = { package = "sp-std", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
@@ -39,7 +38,6 @@ pallet-vesting = { git = "https://github.com/paritytech/substrate", branch = "ma
|
||||
pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
pallet-treasury = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
pallet-election-provider-multi-phase = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
pallet-beefy-mmr = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
frame-election-provider-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
|
||||
frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true }
|
||||
@@ -82,7 +80,6 @@ std = [
|
||||
"frame-support/std",
|
||||
"pallet-authorship/std",
|
||||
"pallet-balances/std",
|
||||
"pallet-beefy-mmr/std",
|
||||
"pallet-session/std",
|
||||
"pallet-fast-unstake/std",
|
||||
"pallet-staking/std",
|
||||
|
||||
@@ -18,7 +18,7 @@ smallvec = "1.8.0"
|
||||
|
||||
authority-discovery-primitives = { package = "sp-authority-discovery", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
babe-primitives = { package = "sp-consensus-babe", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
beefy-primitives = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, package = "sp-beefy" }
|
||||
beefy-primitives = { package = "sp-consensus-beefy", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
kusama-runtime-constants = { package = "kusama-runtime-constants", path = "./constants", default-features = false }
|
||||
sp-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
inherents = { package = "sp-inherents", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
|
||||
@@ -18,7 +18,7 @@ smallvec = "1.8.0"
|
||||
|
||||
authority-discovery-primitives = { package = "sp-authority-discovery", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
babe-primitives = { package = "sp-consensus-babe", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
beefy-primitives = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, package = "sp-beefy" }
|
||||
beefy-primitives = { package = "sp-consensus-beefy", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
block-builder-api = { package = "sp-block-builder", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
inherents = { package = "sp-inherents", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
offchain-primitives = { package = "sp-offchain", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
|
||||
@@ -16,7 +16,7 @@ smallvec = "1.8.0"
|
||||
|
||||
authority-discovery-primitives = { package = "sp-authority-discovery", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
babe-primitives = { package = "sp-consensus-babe", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
beefy-primitives = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, package = "sp-beefy" }
|
||||
beefy-primitives = { package = "sp-consensus-beefy", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
binary-merkle-tree = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
rococo-runtime-constants = { package = "rococo-runtime-constants", path = "./constants", default-features = false }
|
||||
sp-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
|
||||
@@ -17,7 +17,7 @@ smallvec = "1.8.0"
|
||||
|
||||
authority-discovery-primitives = { package = "sp-authority-discovery", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
babe-primitives = { package = "sp-consensus-babe", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
beefy-primitives = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, package = "sp-beefy" }
|
||||
beefy-primitives = { package = "sp-consensus-beefy", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
sp-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
inherents = { package = "sp-inherents", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
offchain-primitives = { package = "sp-offchain", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
|
||||
@@ -17,7 +17,7 @@ smallvec = "1.8.0"
|
||||
|
||||
authority-discovery-primitives = { package = "sp-authority-discovery", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
babe-primitives = { package = "sp-consensus-babe", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
beefy-primitives = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, package = "sp-beefy" }
|
||||
beefy-primitives = { package = "sp-consensus-beefy", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
inherents = { package = "sp-inherents", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
offchain-primitives = { package = "sp-offchain", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
sp-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
|
||||
Reference in New Issue
Block a user