mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 05:11:02 +00:00
Slash relayers for invalid transactions (#2025)
* slash relayer balance for invalid transactions * require some gap before unstake is possible * more clippy * log priority boost * add issue ref to TODO * fix typo * is_message_delivery_call -> is_receive_messages_proof_call * moved is_receive_messages_proof_call above * only slash relayers for priority transactions * Update primitives/relayers/src/registration.rs Co-authored-by: Adrian Catangiu <adrian@parity.io> * Update primitives/relayers/src/registration.rs Co-authored-by: Adrian Catangiu <adrian@parity.io> * Update bin/runtime-common/src/refund_relayer_extension.rs Co-authored-by: Adrian Catangiu <adrian@parity.io> * Update bin/runtime-common/src/refund_relayer_extension.rs Co-authored-by: Adrian Catangiu <adrian@parity.io> * Update bin/runtime-common/src/refund_relayer_extension.rs Co-authored-by: Adrian Catangiu <adrian@parity.io> * Update modules/relayers/src/lib.rs Co-authored-by: Adrian Catangiu <adrian@parity.io> * Update primitives/relayers/src/registration.rs Co-authored-by: Adrian Catangiu <adrian@parity.io> * benificiary -> beneficiary --------- Co-authored-by: Adrian Catangiu <adrian@parity.io>
This commit is contained in:
committed by
Bastian Köcher
parent
3b47f957db
commit
53e1b7e264
@@ -372,6 +372,7 @@ parameter_types! {
|
||||
/// Authorities are changing every 5 minutes.
|
||||
pub const Period: BlockNumber = bp_millau::SESSION_LENGTH;
|
||||
pub const Offset: BlockNumber = 0;
|
||||
pub const RelayerStakeReserveId: [u8; 8] = *b"brdgrlrs";
|
||||
}
|
||||
|
||||
impl pallet_session::Config for Runtime {
|
||||
@@ -392,6 +393,14 @@ impl pallet_bridge_relayers::Config for Runtime {
|
||||
type Reward = Balance;
|
||||
type PaymentProcedure =
|
||||
bp_relayers::PayRewardFromAccount<pallet_balances::Pallet<Runtime>, AccountId>;
|
||||
type StakeAndSlash = pallet_bridge_relayers::StakeAndSlashNamed<
|
||||
AccountId,
|
||||
BlockNumber,
|
||||
Balances,
|
||||
RelayerStakeReserveId,
|
||||
ConstU64<1_000>,
|
||||
ConstU64<8>,
|
||||
>;
|
||||
type WeightInfo = ();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user