fix: Complete snowbridge pezpallet rebrand and critical bug fixes
- snowbridge-pezpallet-* → pezsnowbridge-pezpallet-* (201 refs) - pallet/ directories → pezpallet/ (4 locations) - Fixed pezpallet.rs self-include recursion bug - Fixed sc-chain-spec hardcoded crate name in derive macro - Reverted .pezpallet_by_name() to .pallet_by_name() (subxt API) - Added BizinikiwiConfig type alias for zombienet tests - Deleted obsolete session state files Verified: pezsnowbridge-pezpallet-*, pezpallet-staking, pezpallet-staking-async, pezframe-benchmarking-cli all pass cargo check
This commit is contained in:
@@ -6,7 +6,7 @@ edition.workspace = true
|
||||
license = "Apache-2.0"
|
||||
homepage.workspace = true
|
||||
repository.workspace = true
|
||||
description = "Node-specific RPC methods for interaction with Merkle Mountain Range pallet."
|
||||
description = "Node-specific RPC methods for interaction with Merkle Mountain Range pezpallet."
|
||||
documentation = "https://docs.rs/pezmmr-rpc"
|
||||
|
||||
[lints]
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#![warn(missing_docs)]
|
||||
#![warn(unused_crate_dependencies)]
|
||||
|
||||
//! Node-specific RPC methods for interaction with Merkle Mountain Range pallet.
|
||||
//! Node-specific RPC methods for interaction with Merkle Mountain Range pezpallet.
|
||||
|
||||
use std::{marker::PhantomData, sync::Arc};
|
||||
|
||||
@@ -81,7 +81,7 @@ pub trait MmrApi<BlockHash, BlockNumber, MmrHash> {
|
||||
|
||||
/// Generate an MMR proof for the given `block_numbers`.
|
||||
///
|
||||
/// This method calls into a runtime with MMR pallet included and attempts to generate
|
||||
/// This method calls into a runtime with MMR pezpallet included and attempts to generate
|
||||
/// an MMR proof for the set of blocks that have the given `block_numbers` with the MMR root at
|
||||
/// `best_known_block_number`. `best_known_block_number` must be larger than all the
|
||||
/// `block_numbers` for the function to succeed.
|
||||
@@ -108,7 +108,7 @@ pub trait MmrApi<BlockHash, BlockNumber, MmrHash> {
|
||||
|
||||
/// Generate an MMR ancestry proof for the given `prev_block_number`.
|
||||
///
|
||||
/// This method calls into a runtime with MMR pallet included and attempts to generate
|
||||
/// This method calls into a runtime with MMR pezpallet included and attempts to generate
|
||||
/// an MMR ancestry proof for the MMR root at the prior block with number `prev_block_number`,
|
||||
/// with the reference MMR root at `best_known_block_number`. `best_known_block_number` must be
|
||||
/// larger than the `prev_block_number` for the function to succeed.
|
||||
@@ -134,7 +134,7 @@ pub trait MmrApi<BlockHash, BlockNumber, MmrHash> {
|
||||
|
||||
/// Verify an MMR `proof`.
|
||||
///
|
||||
/// This method calls into a runtime with MMR pallet included and attempts to verify
|
||||
/// This method calls into a runtime with MMR pezpallet included and attempts to verify
|
||||
/// an MMR proof.
|
||||
///
|
||||
/// Returns `true` if the proof is valid, else returns the verification error.
|
||||
@@ -143,7 +143,7 @@ pub trait MmrApi<BlockHash, BlockNumber, MmrHash> {
|
||||
|
||||
/// Verify an MMR `proof` statelessly given an `mmr_root`.
|
||||
///
|
||||
/// This method calls into a runtime with MMR pallet included and attempts to verify
|
||||
/// This method calls into a runtime with MMR pezpallet included and attempts to verify
|
||||
/// an MMR proof against a provided MMR root.
|
||||
///
|
||||
/// Returns `true` if the proof is valid, else returns the verification error.
|
||||
|
||||
@@ -82,14 +82,14 @@ where
|
||||
B: Block,
|
||||
BE: AuxStore,
|
||||
{
|
||||
// Initialize gadget best_canon from AUX DB or from pallet genesis.
|
||||
// Initialize gadget best_canon from AUX DB or from pezpallet genesis.
|
||||
if let Some(best) = load_state::<B, BE>(backend)? {
|
||||
info!(target: LOG_TARGET, "Loading MMR best canonicalized state from db: {:?}.", best);
|
||||
Ok(best)
|
||||
} else {
|
||||
info!(
|
||||
target: LOG_TARGET,
|
||||
"Loading MMR from pallet genesis on what appears to be the first startup: {:?}.",
|
||||
"Loading MMR from pezpallet genesis on what appears to be the first startup: {:?}.",
|
||||
default
|
||||
);
|
||||
write_current_version(backend)?;
|
||||
|
||||
@@ -66,7 +66,7 @@ where
|
||||
BE: Backend<B>,
|
||||
Self::Api: MmrApi<B, MmrRootHash, NumberFor<B>>,
|
||||
{
|
||||
/// Get the block number where the mmr pallet was added to the runtime.
|
||||
/// Get the block number where the mmr pezpallet was added to the runtime.
|
||||
fn first_mmr_block_num(&self, notification: &FinalityNotification<B>) -> Option<NumberFor<B>> {
|
||||
let best_block_hash = notification.header.hash();
|
||||
let best_block_number = *notification.header.number();
|
||||
|
||||
@@ -167,7 +167,7 @@ where
|
||||
_ => return,
|
||||
};
|
||||
|
||||
// Don't canonicalize branches corresponding to blocks for which the MMR pallet
|
||||
// Don't canonicalize branches corresponding to blocks for which the MMR pezpallet
|
||||
// wasn't yet initialized.
|
||||
if header.number < self.first_mmr_block {
|
||||
return;
|
||||
@@ -263,7 +263,7 @@ where
|
||||
/// _canonical key_.
|
||||
/// Prune leafs and nodes added by stale blocks in offchain db from _fork-aware key_.
|
||||
pub fn canonicalize_and_prune(&mut self, notification: FinalityNotification<B>) {
|
||||
// Update the first MMR block in case of a pallet reset.
|
||||
// Update the first MMR block in case of a pezpallet reset.
|
||||
self.handle_potential_pallet_reset(¬ification);
|
||||
|
||||
// Move offchain MMR nodes for finalized blocks to canonical keys.
|
||||
@@ -328,7 +328,7 @@ mod tests {
|
||||
run_test_with_pezmmr_gadget(|client| async move {
|
||||
// G -> A1 -> A2 -> A3 -> A4 -> A5
|
||||
// | |
|
||||
// | | -> pallet reset
|
||||
// | | -> pezpallet reset
|
||||
// |
|
||||
// | -> first finality notification
|
||||
|
||||
@@ -427,7 +427,7 @@ mod tests {
|
||||
// | | | -> gadget start
|
||||
// | |
|
||||
// | | -> finalized before gadget start (missed notification)
|
||||
// | | + pallet reset
|
||||
// | | + pezpallet reset
|
||||
// |
|
||||
// | -> first mmr block
|
||||
let blocks = mmr_blocks.lock();
|
||||
|
||||
Reference in New Issue
Block a user