Signed extension to refund relayer at the target chain (#1657)

* add utlity pallet to the Millau runtime

* RefundRelayerForMessagesDeliveryFromParachain prototype

* done with RefundRelayerForMessagesDeliveryFromParachain::post_dispatch

* parse calls

* check batch for obsolete headers/messages

* fmt

* shorten generic arg names + add parachain id generic arg

* check lane_id

* impl all state read functions

* fix typos from review

* renamed extension + reference issue from TODO

* tests for pre-dispaytch

* renamed extension source file

* tests for post-dispatch

* abstract fee calculation

* clippy

* actually fix clippy

* 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 bin/runtime-common/src/refund_relayer_extension.rs

Co-authored-by: Adrian Catangiu <adrian@parity.io>

Co-authored-by: Adrian Catangiu <adrian@parity.io>
This commit is contained in:
Svyatoslav Nikolsky
2022-12-09 12:15:27 +03:00
committed by Bastian Köcher
parent aeeb53343e
commit 161d861d9b
10 changed files with 889 additions and 4 deletions
+3 -1
View File
@@ -109,8 +109,9 @@ pub mod pallet {
log::trace!(
target: crate::LOG_TARGET,
"Relayer {:?} can now claim reward: {:?}",
"Relayer {:?} can now claim reward for serving lane {:?}: {:?}",
relayer,
lane_id,
new_reward,
);
});
@@ -141,6 +142,7 @@ pub mod pallet {
/// Map of the relayer => accumulated reward.
#[pallet::storage]
#[pallet::getter(fn relayer_reward)]
pub type RelayerRewards<T: Config> = StorageDoubleMap<
_,
Blake2_128Concat,