Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Commit 0673462

Browse files
committed
Merge remote-tracking branch 'origin/master' into bko-bridge-ro-wo
2 parents 36a212b + d24be3f commit 0673462

File tree

14 files changed

+826
-200
lines changed

14 files changed

+826
-200
lines changed

Cargo.lock

Lines changed: 25 additions & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bin/millau/runtime/src/lib.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,7 @@ parameter_types! {
540540
pub type WithRialtoParachainsInstance = ();
541541

542542
impl pallet_bridge_parachains::Config<WithRialtoParachainsInstance> for Runtime {
543+
type Event = Event;
543544
type WeightInfo = pallet_bridge_parachains::weights::MillauWeight<Runtime>;
544545
type BridgesGrandpaPalletInstance = RialtoGrandpaInstance;
545546
type ParasPalletName = RialtoParasPalletName;
@@ -551,6 +552,7 @@ impl pallet_bridge_parachains::Config<WithRialtoParachainsInstance> for Runtime
551552
pub type WithWestendParachainsInstance = pallet_bridge_parachains::Instance1;
552553

553554
impl pallet_bridge_parachains::Config<WithWestendParachainsInstance> for Runtime {
555+
type Event = Event;
554556
type WeightInfo = pallet_bridge_parachains::weights::MillauWeight<Runtime>;
555557
type BridgesGrandpaPalletInstance = WestendGrandpaInstance;
556558
type ParasPalletName = WestendParasPalletName;
@@ -592,10 +594,10 @@ construct_runtime!(
592594

593595
// Westend bridge modules.
594596
BridgeWestendGrandpa: pallet_bridge_grandpa::<Instance1>::{Pallet, Call, Config<T>, Storage},
595-
BridgeWestendParachains: pallet_bridge_parachains::<Instance1>::{Pallet, Call, Storage},
597+
BridgeWestendParachains: pallet_bridge_parachains::<Instance1>::{Pallet, Call, Storage, Event<T>},
596598

597599
// RialtoParachain bridge modules.
598-
BridgeRialtoParachains: pallet_bridge_parachains::{Pallet, Call, Storage},
600+
BridgeRialtoParachains: pallet_bridge_parachains::{Pallet, Call, Storage, Event<T>},
599601
BridgeRialtoParachainMessages: pallet_bridge_messages::<Instance1>::{Pallet, Call, Storage, Event<T>, Config<T>},
600602

601603
// Pallet for sending XCM.

deny.toml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,21 @@ notice = "warn"
4848
# A list of advisory IDs to ignore. Note that ignored advisories will still
4949
# output a note when they are encountered.
5050
ignore = [
51-
"RUSTSEC-2020-0070",
5251
# Comes from honggfuzz via storage-proof-fuzzer: 'memmap'
5352
"RUSTSEC-2020-0077",
54-
# net2 (origin: Substrate RPC crates)
55-
"RUSTSEC-2020-0016",
5653
# time (origin: Substrate RPC + benchmarking crates)
5754
"RUSTSEC-2020-0071",
5855
# chrono (origin: Substrate benchmarking + cli + ...)
5956
"RUSTSEC-2020-0159",
6057
# lru 0.6.6 (origin: libp2p)
6158
"RUSTSEC-2021-0130",
59+
# ansi_term (The maintainer has adviced that this crate is deprecated and will not receive any maintenance.
60+
# Once other crates will move to some alternative, we'll do that too)
61+
"RUSTSEC-2021-0139",
62+
# rocksdb (origin: Substrate and Polkadot kvdb-rocksdb - we need to upgrade soon)
63+
"RUSTSEC-2022-0046",
64+
# owning_ref (origin: Substrate, libp2p)
65+
"RUSTSEC-2022-0040",
6266
]
6367
# Threshold for security vulnerabilities, any vulnerability with a CVSS score
6468
# lower than the range specified will be ignored. Note that ignored advisories

modules/parachains/src/extension.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
use crate::{Config, Pallet, RelayBlockHash, RelayBlockHasher, RelayBlockNumber};
1818
use bp_runtime::FilterCall;
1919
use frame_support::{dispatch::CallableCallFor, traits::IsSubType};
20-
use sp_runtime::transaction_validity::{TransactionValidity, ValidTransaction};
20+
use sp_runtime::transaction_validity::{InvalidTransaction, TransactionValidity, ValidTransaction};
2121

2222
/// Validate parachain heads in order to avoid "mining" transactions that provide
2323
/// outdated bridged parachain heads. Without this validation, even honest relayers
@@ -57,13 +57,19 @@ where
5757
};
5858

5959
let maybe_stored_best_head = crate::ParasInfo::<T, I>::get(parachain);
60-
Self::validate_updated_parachain_head(
60+
let is_valid = Self::validate_updated_parachain_head(
6161
parachain,
6262
&maybe_stored_best_head,
6363
updated_at_relay_block_number,
6464
parachain_head_hash,
6565
"Rejecting obsolete parachain-head transaction",
66-
)
66+
);
67+
68+
if is_valid {
69+
Ok(ValidTransaction::default())
70+
} else {
71+
InvalidTransaction::Stale.into()
72+
}
6773
}
6874
}
6975

0 commit comments

Comments
 (0)