CheckBridgedBlockNumber signed extension to reject duplicate header-submit transactions (#1352)

* CheckBridgedBlockNumber signed extension to reject duplicate header submit transactions

* fix depends_on
This commit is contained in:
Svyatoslav Nikolsky
2022-05-16 14:07:17 +03:00
committed by Bastian Köcher
parent 748c265c47
commit f64357e7e8
6 changed files with 185 additions and 3 deletions
+1
View File
@@ -15,6 +15,7 @@ relay-utils = { path = "../utils" }
bp-messages = { path = "../../primitives/messages" }
bp-millau = { path = "../../primitives/chain-millau" }
millau-runtime = { path = "../../bin/millau/runtime" }
pallet-bridge-grandpa = { path = "../../modules/grandpa" }
# Substrate Dependencies
+2
View File
@@ -113,6 +113,7 @@ impl TransactionSignScheme for Millau {
frame_system::CheckNonce::<millau_runtime::Runtime>::from(param.unsigned.nonce),
frame_system::CheckWeight::<millau_runtime::Runtime>::new(),
pallet_transaction_payment::ChargeTransactionPayment::<millau_runtime::Runtime>::from(param.unsigned.tip),
millau_runtime::CheckBridgedBlockNumber, // TODO
),
(
(),
@@ -123,6 +124,7 @@ impl TransactionSignScheme for Millau {
(),
(),
(),
(),
),
);
let signature = raw_payload.using_encoded(|payload| param.signer.sign(payload));