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:
@@ -98,8 +98,8 @@
|
||||
//! Bizinikiwi-based project typically contains the following:
|
||||
//!
|
||||
//! * Under `./runtime`, a `./runtime/src/lib.rs` which is the top level runtime amalgamator file.
|
||||
//! This file typically contains the [`frame::runtime::prelude::construct_runtime`] and
|
||||
//! [`frame::runtime::prelude::impl_runtime_apis`] macro calls, which is the final definition of a
|
||||
//! This file typically contains the [`pezframe::runtime::prelude::construct_runtime`] and
|
||||
//! [`pezframe::runtime::prelude::impl_runtime_apis`] macro calls, which is the final definition of a
|
||||
//! runtime.
|
||||
//!
|
||||
//! * Under `./node`, a `main.rs`, which is the starting point, and a `./service.rs`, which contains
|
||||
|
||||
@@ -34,23 +34,23 @@
|
||||
//! about its own responsibilities and make as few assumptions about the general runtime as
|
||||
//! possible. A pezpallet is analogous to a _module_ in the runtime.
|
||||
//!
|
||||
//! A pezpallet is defined as a `mod pezpallet` wrapped by the [`frame::pezpallet`] macro. Within
|
||||
//! A pezpallet is defined as a `mod pezpallet` wrapped by the [`pezframe::pezpallet`] macro. Within
|
||||
//! this macro, pezpallet components/parts can be defined. Most notable of these parts are:
|
||||
//!
|
||||
//! - [Config](frame::pezpallet_macros::config), allowing a pezpallet to make itself configurable
|
||||
//! - [Config](pezframe::pezpallet_macros::config), allowing a pezpallet to make itself configurable
|
||||
//! and generic over types, values and such.
|
||||
//! - [Storage](frame::pezpallet_macros::storage), allowing a pezpallet to define onchain storage.
|
||||
//! - [Dispatchable function](frame::pezpallet_macros::call), allowing a pezpallet to define
|
||||
//! - [Storage](pezframe::pezpallet_macros::storage), allowing a pezpallet to define onchain storage.
|
||||
//! - [Dispatchable function](pezframe::pezpallet_macros::call), allowing a pezpallet to define
|
||||
//! extrinsics that are callable by end users, from the outer world.
|
||||
//! - [Events](frame::pezpallet_macros::event), allowing a pezpallet to emit events.
|
||||
//! - [Errors](frame::pezpallet_macros::error), allowing a pezpallet to emit well-formed errors.
|
||||
//! - [Events](pezframe::pezpallet_macros::event), allowing a pezpallet to emit events.
|
||||
//! - [Errors](pezframe::pezpallet_macros::error), allowing a pezpallet to emit well-formed errors.
|
||||
//!
|
||||
//! Some of these pezpallet components resemble the building blocks of a smart contract. While both
|
||||
//! models are programming state transition functions of blockchains, there are crucial differences
|
||||
//! between the two. See [`crate::reference_docs::runtime_vs_smart_contract`] for more.
|
||||
//!
|
||||
//! Most of these components are defined using macros, the full list of which can be found in
|
||||
//! [`frame::pezpallet_macros`].
|
||||
//! [`pezframe::pezpallet_macros`].
|
||||
//!
|
||||
//! ### Example
|
||||
//!
|
||||
@@ -61,16 +61,16 @@
|
||||
//!
|
||||
//! A runtime is a collection of pallets that are amalgamated together. Each pezpallet typically has
|
||||
//! some configurations (exposed as a `trait Config`) that needs to be *specified* in the runtime.
|
||||
//! This is done with [`frame::runtime::prelude::construct_runtime`].
|
||||
//! This is done with [`pezframe::runtime::prelude::construct_runtime`].
|
||||
//!
|
||||
//! A (real) runtime that actually wishes to compile to WASM needs to also implement a set of
|
||||
//! runtime-apis. These implementation can be specified using the
|
||||
//! [`frame::runtime::prelude::impl_runtime_apis`] macro.
|
||||
//! [`pezframe::runtime::prelude::impl_runtime_apis`] macro.
|
||||
//!
|
||||
//! ### Example
|
||||
//!
|
||||
//! The following example shows a (test) runtime that is composing the pezpallet demonstrated above,
|
||||
//! next to the [`frame::prelude::pezframe_system`] pezpallet, into a runtime.
|
||||
//! next to the [`pezframe::prelude::pezframe_system`] pezpallet, into a runtime.
|
||||
#![doc = docify::embed!("src/pezkuwi_sdk/frame_runtime.rs", runtime)]
|
||||
//!
|
||||
//! ## More Examples
|
||||
@@ -94,9 +94,9 @@
|
||||
/// experimental feature to break these parts into different `mod`s. See [`pezpallet_examples`] for
|
||||
/// more.
|
||||
#[docify::export]
|
||||
#[frame::pezpallet(dev_mode)]
|
||||
#[pezframe::pezpallet(dev_mode)]
|
||||
pub mod pezpallet {
|
||||
use frame::prelude::*;
|
||||
use pezframe::prelude::*;
|
||||
|
||||
/// The configuration trait of a pezpallet. Mandatory. Allows a pezpallet to receive types at a
|
||||
/// later point from the runtime that wishes to contain it. It allows the pezpallet to be
|
||||
@@ -118,7 +118,7 @@ pub mod pezpallet {
|
||||
}
|
||||
|
||||
/// A mandatory struct in each pezpallet. All functions callable by external users (aka.
|
||||
/// transactions) must be attached to this type (see [`frame::pezpallet_macros::call`]). For
|
||||
/// transactions) must be attached to this type (see [`pezframe::pezpallet_macros::call`]). For
|
||||
/// convenience, internal (private) functions can also be attached to this type.
|
||||
#[pezpallet::pezpallet]
|
||||
pub struct Pezpallet<T>(PhantomData<T>);
|
||||
@@ -153,7 +153,7 @@ pub mod pezpallet {
|
||||
#[docify::export]
|
||||
pub mod runtime {
|
||||
use super::pezpallet as pezpallet_example;
|
||||
use frame::{prelude::*, testing_prelude::*};
|
||||
use pezframe::{prelude::*, testing_prelude::*};
|
||||
|
||||
// The major macro that amalgamates pallets into `enum Runtime`
|
||||
construct_runtime!(
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
//! A teyrchain runtime should use a number of pallets that are provided by Pezcumulus and
|
||||
//! Bizinikiwi. Notably:
|
||||
//!
|
||||
//! - [`pezframe-system`](frame::prelude::pezframe_system), like all FRAME-based runtimes.
|
||||
//! - [`pezframe-system`](pezframe::prelude::pezframe_system), like all FRAME-based runtimes.
|
||||
//! - [`pezcumulus_pezpallet_teyrchain_system`]
|
||||
//! - [`teyrchain_info`]
|
||||
#![doc = docify::embed!("./src/pezkuwi_sdk/pezcumulus.rs", system_pallets)]
|
||||
@@ -32,7 +32,7 @@
|
||||
//!
|
||||
//!
|
||||
//! Finally, a separate macro, similar to
|
||||
//! [`impl_runtime_api`](frame::runtime::prelude::impl_runtime_apis), which creates the default set
|
||||
//! [`impl_runtime_api`](pezframe::runtime::prelude::impl_runtime_apis), which creates the default set
|
||||
//! of runtime APIs, will generate the teyrchain runtime's validation runtime API, also known as
|
||||
//! teyrchain validation function (PVF). Without this API, the relay chain is unable to validate
|
||||
//! blocks produced by our teyrchain.
|
||||
@@ -48,7 +48,7 @@
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
mod runtime {
|
||||
pub use frame::{
|
||||
pub use pezframe::{
|
||||
deps::pezsp_consensus_aura::sr25519::AuthorityId as AuraId, prelude::*,
|
||||
runtime::prelude::*, testing_prelude::*,
|
||||
};
|
||||
@@ -95,7 +95,7 @@ mod tests {
|
||||
1,
|
||||
>;
|
||||
type WeightInfo = ();
|
||||
type DmpQueue = frame::traits::EnqueueWithOrigin<(), pezsp_core::ConstU8<0>>;
|
||||
type DmpQueue = pezframe::traits::EnqueueWithOrigin<(), pezsp_core::ConstU8<0>>;
|
||||
type RelayParentOffset = ConstU32<0>;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user