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:
2025-12-16 09:57:23 +03:00
parent eea003e14d
commit 3139ffa25e
3022 changed files with 42157 additions and 23579 deletions
+32
View File
@@ -0,0 +1,32 @@
// Copyright 2019-2021 Parity Technologies (UK) Ltd.
// This file is part of Parity Bridges Common.
// Parity Bridges Common is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Parity Bridges Common is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// 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 std::fmt::Debug;
use relay_bizinikiwi_client::{Chain, Teyrchain};
pub mod teyrchains_loop;
pub mod teyrchains_loop_metrics;
/// Finality proofs synchronization pipeline.
pub trait TeyrchainsPipeline: 'static + Clone + Debug + Send + Sync {
/// Relay chain which is storing teyrchain heads in its `paras` module.
type SourceRelayChain: Chain;
/// Teyrchain which headers we are syncing here.
type SourceTeyrchain: Teyrchain;
/// Target chain (either relay or para) which wants to know about new teyrchain heads.
type TargetChain: Chain;
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,86 @@
// Copyright 2019-2021 Parity Technologies (UK) Ltd.
// This file is part of Parity Bridges Common.
// Parity Bridges Common is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Parity Bridges Common is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// 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_pezkuwi_core::teyrchains::ParaId;
use relay_utils::{
metrics::{metric_name, register, Gauge, Metric, PrometheusError, Registry, U64},
UniqueSaturatedInto,
};
/// Teyrchains sync metrics.
#[derive(Clone)]
pub struct TeyrchainsLoopMetrics {
/// Best teyrchains header numbers at the source.
best_source_block_numbers: Gauge<U64>,
/// Best teyrchains header numbers at the target.
best_target_block_numbers: Gauge<U64>,
}
impl TeyrchainsLoopMetrics {
/// Create and register teyrchains loop metrics.
pub fn new(prefix: Option<&str>) -> Result<Self, PrometheusError> {
Ok(TeyrchainsLoopMetrics {
best_source_block_numbers: Gauge::new(
metric_name(prefix, "best_teyrchain_block_number_at_source"),
"Best teyrchain block numbers at the source relay chain".to_string(),
)?,
best_target_block_numbers: Gauge::new(
metric_name(prefix, "best_teyrchain_block_number_at_target"),
"Best teyrchain block numbers at the target chain".to_string(),
)?,
})
}
/// Update best block number at source.
pub fn update_best_teyrchain_block_at_source<Number: UniqueSaturatedInto<u64>>(
&self,
teyrchain: ParaId,
block_number: Number,
) {
let block_number = block_number.unique_saturated_into();
tracing::trace!(
target: "bridge-metrics",
?teyrchain,
?block_number,
"Updated value of metric 'best_teyrchain_block_number_at_source"
);
self.best_source_block_numbers.set(block_number);
}
/// Update best block number at target.
pub fn update_best_teyrchain_block_at_target<Number: UniqueSaturatedInto<u64>>(
&self,
teyrchain: ParaId,
block_number: Number,
) {
let block_number = block_number.unique_saturated_into();
tracing::trace!(
target: "bridge-metrics",
?teyrchain,
?block_number,
"Updated value of metric 'best_teyrchain_block_number_at_target"
);
self.best_target_block_numbers.set(block_number);
}
}
impl Metric for TeyrchainsLoopMetrics {
fn register(&self, registry: &Registry) -> Result<(), PrometheusError> {
register(self.best_source_block_numbers.clone(), registry)?;
register(self.best_target_block_numbers.clone(), registry)?;
Ok(())
}
}