mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 12:11:02 +00:00
* Impl SubstrateEquivocationDetectionPipeline for Millau * Impl SubstrateEquivocationDetectionPipeline for Rialto * Make BridgeHubSignedExtension more generic * Define generate_report_equivocation_call_builder!() macro * Impl SubstrateEquivocationDetectionPipeline for Rococo * Impl SubstrateEquivocationDetectionPipeline for Wococo * Impl SubstrateEquivocationDetectionPipeline for Kusama * Impl SubstrateEquivocationDetectionPipeline for Polkadot * Complex relayer simplification - remove `signer` and `transactions_mortality` and add `tx_params` - change the order of some fields * Add equivocation detection CLI traits * Complex relayer: start equivocation detectin loop * Update runtimes regeneration script * Equivocation loop: Fix infinite loop * Revert "Complex relayer: start equivocation detectin loop" This reverts commit b518ef85679d73654f9f0e2add38cd3839552057. * Add subcommand for starting the equivocation detection loop * Fixes * Initialize empty metrics for the equivocations detector loop
This commit is contained in:
committed by
Bastian Köcher
parent
588508acd4
commit
1bbc77fee1
@@ -19,6 +19,7 @@ scale-info = { version = "2.9.0", default-features = false, features = ["derive"
|
||||
bp-header-chain = { path = "../../../primitives/header-chain", default-features = false }
|
||||
bp-messages = { path = "../../../primitives/messages", default-features = false }
|
||||
bp-millau = { path = "../../../primitives/chain-millau", default-features = false }
|
||||
bp-polkadot-core = { path = "../../../primitives/polkadot-core", default-features = false }
|
||||
bp-relayers = { path = "../../../primitives/relayers", default-features = false }
|
||||
bp-runtime = { path = "../../../primitives/runtime", default-features = false }
|
||||
bp-rialto-parachain = { path = "../../../primitives/chain-rialto-parachain", default-features = false }
|
||||
|
||||
@@ -858,12 +858,10 @@ mod tests {
|
||||
target_chain::{DispatchMessage, DispatchMessageData, MessageDispatch},
|
||||
LaneId, MessageKey,
|
||||
};
|
||||
use bridge_runtime_common::{
|
||||
integrity::check_additional_signed, messages_xcm_extension::XcmBlobMessageDispatchResult,
|
||||
};
|
||||
use bridge_runtime_common::messages_xcm_extension::XcmBlobMessageDispatchResult;
|
||||
use codec::Encode;
|
||||
use pallet_bridge_messages::OutboundLanes;
|
||||
use sp_runtime::generic::Era;
|
||||
use sp_runtime::{generic::Era, traits::Zero};
|
||||
use xcm_executor::XcmExecutor;
|
||||
|
||||
fn new_test_ext() -> sp_io::TestExternalities {
|
||||
@@ -941,24 +939,36 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn ensure_signed_extension_definition_is_correct() {
|
||||
let payload: SignedExtra = (
|
||||
frame_system::CheckNonZeroSender::new(),
|
||||
frame_system::CheckSpecVersion::new(),
|
||||
frame_system::CheckTxVersion::new(),
|
||||
frame_system::CheckGenesis::new(),
|
||||
frame_system::CheckEra::from(Era::Immortal),
|
||||
frame_system::CheckNonce::from(10),
|
||||
frame_system::CheckWeight::new(),
|
||||
pallet_transaction_payment::ChargeTransactionPayment::from(10),
|
||||
BridgeRejectObsoleteHeadersAndMessages,
|
||||
DummyBridgeRefundMillauMessages,
|
||||
);
|
||||
let indirect_payload = bp_rialto_parachain::SignedExtension::new(
|
||||
((), (), (), (), Era::Immortal, 10.into(), (), 10.into(), (), ()),
|
||||
None,
|
||||
);
|
||||
assert_eq!(payload.encode(), indirect_payload.encode());
|
||||
use bp_polkadot_core::SuffixedCommonSignedExtensionExt;
|
||||
|
||||
check_additional_signed::<SignedExtra, bp_rialto_parachain::SignedExtension>();
|
||||
sp_io::TestExternalities::default().execute_with(|| {
|
||||
frame_system::BlockHash::<Runtime>::insert(BlockNumber::zero(), Hash::default());
|
||||
let payload: SignedExtra = (
|
||||
frame_system::CheckNonZeroSender::new(),
|
||||
frame_system::CheckSpecVersion::new(),
|
||||
frame_system::CheckTxVersion::new(),
|
||||
frame_system::CheckGenesis::new(),
|
||||
frame_system::CheckEra::from(Era::Immortal),
|
||||
frame_system::CheckNonce::from(10),
|
||||
frame_system::CheckWeight::new(),
|
||||
pallet_transaction_payment::ChargeTransactionPayment::from(10),
|
||||
BridgeRejectObsoleteHeadersAndMessages,
|
||||
DummyBridgeRefundMillauMessages,
|
||||
);
|
||||
let indirect_payload = bp_rialto_parachain::SignedExtension::from_params(
|
||||
VERSION.spec_version,
|
||||
VERSION.transaction_version,
|
||||
bp_runtime::TransactionEra::Immortal,
|
||||
System::block_hash(BlockNumber::zero()),
|
||||
10,
|
||||
10,
|
||||
(((), ()), ((), ())),
|
||||
);
|
||||
assert_eq!(payload.encode(), indirect_payload.encode());
|
||||
assert_eq!(
|
||||
payload.additional_signed().unwrap().encode(),
|
||||
indirect_payload.additional_signed().unwrap().encode()
|
||||
)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user