FAZ 1 Complete: Workspace compile fixes, warning cleanup, version bumps
- Fixed is_using_frame_crate() macro to check for pezframe/pezkuwi_sdk - Removed disable_pezframe_system_supertrait_check temporary bypasses - Feature-gated storage-benchmark and teyrchain-benchmarks code - Fixed dead_code warnings with underscore prefix (_Header) - Removed unused imports and shadowing use statements - Version bumps: procedural-tools 10.0.1, benchmarking-cli 32.0.1, docs 0.0.2, minimal-runtime 0.0.1, yet-another-teyrchain 0.6.1, umbrella 0.1.2 - Updated MAINNET_ROADMAP.md with FAZ 1 completion status
This commit is contained in:
@@ -21,7 +21,7 @@ use crate::{
|
||||
RelayBlockNumber,
|
||||
};
|
||||
|
||||
use bp_pezkuwi_core::teyrchains::{ParaHash, ParaHeadsProof, ParaId};
|
||||
use pezbp_pezkuwi_core::teyrchains::{ParaHash, ParaHeadsProof, ParaId};
|
||||
use pezbp_runtime::UnverifiedStorageProofParams;
|
||||
use pezframe_benchmarking::{account, benchmarks_instance_pallet};
|
||||
use pezframe_system::RawOrigin;
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
// along with Parity Bridges Common. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use crate::{Config, GrandpaPalletOf, Pezpallet, RelayBlockNumber};
|
||||
use bp_header_pez_chain::HeaderChain;
|
||||
use bp_teyrchains::{BestParaHeadHash, SubmitTeyrchainHeadsInfo};
|
||||
use pezbp_header_pez_chain::HeaderChain;
|
||||
use pezbp_teyrchains::{BestParaHeadHash, SubmitTeyrchainHeadsInfo};
|
||||
use pezbp_runtime::{HeaderId, OwnedBridgeModule};
|
||||
use pezframe_support::{
|
||||
dispatch::CallableCallFor,
|
||||
@@ -259,9 +259,9 @@ mod tests {
|
||||
mock::{run_test, FreeHeadersInterval, RuntimeCall, TestRuntime},
|
||||
CallSubType, PalletOperatingMode, ParaInfo, ParasInfo, RelayBlockHash, RelayBlockNumber,
|
||||
};
|
||||
use bp_header_pez_chain::StoredHeaderData;
|
||||
use bp_pezkuwi_core::teyrchains::{ParaHash, ParaHeadsProof, ParaId};
|
||||
use bp_teyrchains::BestParaHeadHash;
|
||||
use pezbp_header_pez_chain::StoredHeaderData;
|
||||
use pezbp_pezkuwi_core::teyrchains::{ParaHash, ParaHeadsProof, ParaId};
|
||||
use pezbp_teyrchains::BestParaHeadHash;
|
||||
use pezbp_runtime::BasicOperatingMode;
|
||||
|
||||
fn validate_submit_teyrchain_heads(
|
||||
|
||||
@@ -27,9 +27,9 @@
|
||||
pub use weights::WeightInfo;
|
||||
pub use weights_ext::WeightInfoExt;
|
||||
|
||||
use bp_header_pez_chain::{HeaderChain, HeaderChainError};
|
||||
use bp_pezkuwi_core::teyrchains::{ParaHash, ParaHead, ParaHeadsProof, ParaId};
|
||||
use bp_teyrchains::{
|
||||
use pezbp_header_pez_chain::{HeaderChain, HeaderChainError};
|
||||
use pezbp_pezkuwi_core::teyrchains::{ParaHash, ParaHead, ParaHeadsProof, ParaId};
|
||||
use pezbp_teyrchains::{
|
||||
ParaInfo, ParaStoredHeaderData, RelayBlockHash, RelayBlockHasher, RelayBlockNumber,
|
||||
SubmitTeyrchainHeadsInfo,
|
||||
};
|
||||
@@ -40,7 +40,7 @@ use pezsp_std::{marker::PhantomData, vec::Vec};
|
||||
use proofs::{StorageProofAdapter, TeyrchainsStorageProofAdapter};
|
||||
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
use bp_teyrchains::ParaStoredHeaderDataBuilder;
|
||||
use pezbp_teyrchains::ParaStoredHeaderDataBuilder;
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
use codec::Encode;
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
@@ -75,7 +75,7 @@ struct UpdateTeyrchainHeadArtifacts {
|
||||
#[pezframe_support::pezpallet]
|
||||
pub mod pezpallet {
|
||||
use super::*;
|
||||
use bp_teyrchains::{
|
||||
use pezbp_teyrchains::{
|
||||
BestParaHeadHash, ImportedParaHeadsKeyProvider, OnNewHead, ParaStoredHeaderDataBuilder,
|
||||
ParasInfoKeyProvider,
|
||||
};
|
||||
@@ -225,13 +225,13 @@ pub mod pezpallet {
|
||||
///
|
||||
/// We never store teyrchain heads here, since they may be too big (e.g. because of large
|
||||
/// digest items). Instead we're using the same approach as `pezpallet-bridge-grandpa`
|
||||
/// pezpallet - we are only storing `bp_messages::StoredHeaderData` (number and state root),
|
||||
/// pezpallet - we are only storing `pezbp_messages::StoredHeaderData` (number and state root),
|
||||
/// which is enough for our applications. However, we work with different teyrchains here
|
||||
/// and they can use different primitives (for block numbers and hash). So we can't store
|
||||
/// it directly. Instead, we're storing `bp_messages::StoredHeaderData` in SCALE-encoded
|
||||
/// form, wrapping it into `bp_teyrchains::ParaStoredHeaderData`.
|
||||
/// it directly. Instead, we're storing `pezbp_messages::StoredHeaderData` in SCALE-encoded
|
||||
/// form, wrapping it into `pezbp_teyrchains::ParaStoredHeaderData`.
|
||||
///
|
||||
/// This builder helps to convert from `HeadData` to `bp_teyrchains::ParaStoredHeaderData`.
|
||||
/// This builder helps to convert from `HeadData` to `pezbp_teyrchains::ParaStoredHeaderData`.
|
||||
type ParaStoredHeaderDataBuilder: ParaStoredHeaderDataBuilder;
|
||||
|
||||
/// Maximal number of single teyrchain heads to keep in the storage.
|
||||
@@ -245,7 +245,7 @@ pub mod pezpallet {
|
||||
type HeadsToKeep: Get<u32>;
|
||||
|
||||
/// Maximal size (in bytes) of the SCALE-encoded teyrchain head data
|
||||
/// (`bp_teyrchains::ParaStoredHeaderData`).
|
||||
/// (`pezbp_teyrchains::ParaStoredHeaderData`).
|
||||
///
|
||||
/// Keep in mind that the size of any tracked teyrchain header data must not exceed this
|
||||
/// value. So if you're going to track multiple teyrchains, one of which is using large
|
||||
@@ -804,7 +804,7 @@ impl<T: Config<I>, I: 'static, C: Teyrchain<Hash = ParaHash>> HeaderChain<C>
|
||||
pub fn initialize_for_benchmarks<T: Config<I>, I: 'static, PC: Teyrchain<Hash = ParaHash>>(
|
||||
header: HeaderOf<PC>,
|
||||
) {
|
||||
use bp_pezkuwi_core::teyrchains::ParaHead;
|
||||
use pezbp_pezkuwi_core::teyrchains::ParaHead;
|
||||
use pezbp_runtime::HeaderIdProvider;
|
||||
use pezsp_runtime::traits::Header;
|
||||
|
||||
@@ -842,16 +842,16 @@ pub(crate) mod tests {
|
||||
RegularTeyrchainHasher, RegularTeyrchainHeader, RelayBlockHeader,
|
||||
RuntimeEvent as TestEvent, RuntimeOrigin, TestRuntime, UNTRACKED_TEYRCHAIN_ID,
|
||||
};
|
||||
use bp_test_utils::prepare_teyrchain_heads_proof;
|
||||
use pezbp_test_utils::prepare_teyrchain_heads_proof;
|
||||
use codec::Encode;
|
||||
|
||||
use bp_header_pez_chain::{justification::GrandpaJustification, StoredHeaderGrandpaInfo};
|
||||
use bp_pezkuwi_core::teyrchains::ParaHead;
|
||||
use bp_test_utils::{
|
||||
use pezbp_header_pez_chain::{justification::GrandpaJustification, StoredHeaderGrandpaInfo};
|
||||
use pezbp_pezkuwi_core::teyrchains::ParaHead;
|
||||
use pezbp_test_utils::{
|
||||
authority_list, generate_owned_bridge_module_tests, make_default_justification,
|
||||
TEST_GRANDPA_SET_ID,
|
||||
};
|
||||
use bp_teyrchains::{
|
||||
use pezbp_teyrchains::{
|
||||
BestParaHeadHash, BridgeTeyrchainCall, ImportedParaHeadsKeyProvider, ParasInfoKeyProvider,
|
||||
};
|
||||
use pezbp_runtime::{
|
||||
@@ -878,7 +878,7 @@ pub(crate) mod tests {
|
||||
pezpallet_bridge_grandpa::FreeHeadersRemaining::<TestRuntime, BridgesGrandpaPalletInstance>::set(Some(100));
|
||||
pezpallet_bridge_grandpa::Pezpallet::<TestRuntime, BridgesGrandpaPalletInstance>::initialize(
|
||||
RuntimeOrigin::root(),
|
||||
bp_header_pez_chain::InitializationData {
|
||||
pezbp_header_pez_chain::InitializationData {
|
||||
header: Box::new(test_relay_header(0, state_root)),
|
||||
authority_list: authority_list(),
|
||||
set_id: 1,
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity Bridges Common. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use bp_header_pez_chain::ChainWithGrandpa;
|
||||
use bp_pezkuwi_core::teyrchains::ParaId;
|
||||
use pezbp_header_pez_chain::ChainWithGrandpa;
|
||||
use pezbp_pezkuwi_core::teyrchains::ParaId;
|
||||
use pezbp_runtime::{Chain, ChainId, Teyrchain};
|
||||
use pezframe_support::{
|
||||
construct_runtime, derive_impl, parameter_types, traits::ConstU32, weights::Weight,
|
||||
@@ -235,13 +235,13 @@ impl pezpallet_bridge_teyrchains::benchmarking::Config<()> for TestRuntime {
|
||||
) -> (
|
||||
crate::RelayBlockNumber,
|
||||
crate::RelayBlockHash,
|
||||
bp_pezkuwi_core::teyrchains::ParaHeadsProof,
|
||||
Vec<(ParaId, bp_pezkuwi_core::teyrchains::ParaHash)>,
|
||||
pezbp_pezkuwi_core::teyrchains::ParaHeadsProof,
|
||||
Vec<(ParaId, pezbp_pezkuwi_core::teyrchains::ParaHash)>,
|
||||
) {
|
||||
// in mock run we only care about benchmarks correctness, not the benchmark results
|
||||
// => ignore size related arguments
|
||||
let (state_root, proof, teyrchains) =
|
||||
bp_test_utils::prepare_teyrchain_heads_proof::<RegularTeyrchainHeader>(
|
||||
pezbp_test_utils::prepare_teyrchain_heads_proof::<RegularTeyrchainHeader>(
|
||||
teyrchains.iter().map(|p| (p.0, crate::tests::head_data(p.0, 1))).collect(),
|
||||
);
|
||||
let relay_genesis_hash = crate::tests::initialize(state_root);
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
//! Tools for teyrchain head proof verification.
|
||||
|
||||
use crate::{Config, GrandpaPalletOf, RelayBlockHash, RelayBlockHasher};
|
||||
use bp_header_pez_chain::{HeaderChain, HeaderChainError};
|
||||
use bp_pezkuwi_core::teyrchains::{ParaHead, ParaId};
|
||||
use bp_teyrchains::teyrchain_head_storage_key_at_source;
|
||||
use pezbp_header_pez_chain::{HeaderChain, HeaderChainError};
|
||||
use pezbp_pezkuwi_core::teyrchains::{ParaHead, ParaId};
|
||||
use pezbp_teyrchains::teyrchain_head_storage_key_at_source;
|
||||
use codec::Decode;
|
||||
use pezbp_runtime::{RawStorageProof, StorageProofChecker, StorageProofError};
|
||||
use pezframe_support::traits::Get;
|
||||
|
||||
Reference in New Issue
Block a user