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

Use DecodeLimit for decoding XCM messages #605

Merged
merged 6 commits into from
Sep 19, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion client/collator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ cumulus-client-consensus-common = { path = "../consensus/common" }
cumulus-primitives-core = { path = "../../primitives/core" }

# Other dependencies
codec = { package = "parity-scale-codec", version = "2.0.0", features = [ "derive" ] }
codec = { package = "parity-scale-codec", version = "2.3.0", features = [ "derive" ] }
futures = { version = "0.3.1", features = ["compat"] }
parking_lot = "0.10.2"
tracing = "0.1.25"
Expand Down
2 changes: 1 addition & 1 deletion client/consensus/aura/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ cumulus-primitives-core = { path = "../../../primitives/core" }

# Other deps
futures = { version = "0.3.8", features = ["compat"] }
codec = { package = "parity-scale-codec", version = "2.0.0", features = [ "derive" ] }
codec = { package = "parity-scale-codec", version = "2.3.0", features = [ "derive" ] }
tracing = "0.1.22"
async-trait = "0.1.42"
parking_lot = "0.10.2"
2 changes: 1 addition & 1 deletion client/consensus/common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ polkadot-runtime = { git = "https://github.com/paritytech/polkadot", branch = "m

# Other deps
futures = { version = "0.3.8", features = ["compat"] }
codec = { package = "parity-scale-codec", version = "2.0.0", features = [ "derive" ] }
codec = { package = "parity-scale-codec", version = "2.3.0", features = [ "derive" ] }
tracing = "0.1.25"
async-trait = "0.1.42"
dyn-clone = "1.0.4"
Expand Down
2 changes: 1 addition & 1 deletion client/consensus/relay-chain/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ cumulus-primitives-core = { path = "../../../primitives/core" }

# Other deps
futures = { version = "0.3.8", features = ["compat"] }
codec = { package = "parity-scale-codec", version = "2.0.0", features = [ "derive" ] }
codec = { package = "parity-scale-codec", version = "2.3.0", features = [ "derive" ] }
tracing = "0.1.22"
async-trait = "0.1.42"
parking_lot = "0.10.2"
2 changes: 1 addition & 1 deletion client/network/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ polkadot-client = { git = "https://github.com/paritytech/polkadot", branch = "ma
polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "master" }

# other deps
codec = { package = "parity-scale-codec", version = "2.0.0", features = [ "derive" ] }
codec = { package = "parity-scale-codec", version = "2.3.0", features = [ "derive" ] }
futures = { version = "0.3.1", features = ["compat"] }
futures-timer = "3.0.2"
tracing = "0.1.22"
Expand Down
2 changes: 1 addition & 1 deletion client/pov-recovery/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ polkadot-node-subsystem = { git = "https://github.com/paritytech/polkadot", bran
cumulus-primitives-core = { path = "../../primitives/core" }

# other deps
codec = { package = "parity-scale-codec", version = "2.0.0", features = [ "derive" ] }
codec = { package = "parity-scale-codec", version = "2.3.0", features = [ "derive" ] }
futures = { version = "0.3.1", features = ["compat"] }
futures-timer = "3.0.2"
tracing = "0.1.22"
Expand Down
2 changes: 1 addition & 1 deletion client/service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ polkadot-overseer = { git = "https://github.com/paritytech/polkadot", branch = "

# Other deps
tracing = "0.1.22"
codec = { package = "parity-scale-codec", version = "2.0.0" }
codec = { package = "parity-scale-codec", version = "2.3.0" }
parking_lot = "0.10.2"
2 changes: 1 addition & 1 deletion pallets/aura-ext/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ sp-runtime = { git = "https://github.com/paritytech/substrate", default-features
sp-application-crypto = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }

# Other Dependencies
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"]}
codec = { package = "parity-scale-codec", version = "2.3.0", default-features = false, features = ["derive"]}
serde = { version = "1.0.101", optional = true, features = ["derive"] }

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion pallets/collator-selection/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ targets = ['x86_64-unknown-linux-gnu']

[dependencies]
log = { version = "0.4.0", default-features = false }
codec = { default-features = false, features = ['derive'], package = 'parity-scale-codec', version = '2.0.0' }
codec = { default-features = false, features = ['derive'], package = 'parity-scale-codec', version = '2.3.0' }
serde = { version = "1.0.119", default-features = false }
sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate', branch = "master" }
sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate', branch = "master" }
Expand Down
2 changes: 1 addition & 1 deletion pallets/dmp-queue/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2018"

[dependencies]
# Other dependencies
codec = { package = "parity-scale-codec", version = "2.0.0", features = [ "derive" ], default-features = false }
codec = { package = "parity-scale-codec", version = "2.3.0", features = [ "derive" ], default-features = false }
log = { version = "0.4.14", default-features = false }
rand = { version = "0.8.3", default-features = false }
rand_chacha = { version = "0.3.0", default-features = false }
Expand Down
11 changes: 7 additions & 4 deletions pallets/dmp-queue/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
use sp_std::{prelude::*, convert::TryFrom};
use cumulus_primitives_core::relay_chain::BlockNumber as RelayBlockNumber;
use cumulus_primitives_core::DmpMessageHandler;
use codec::{Encode, Decode};
use codec::{Decode, DecodeLimit, Encode};
use sp_runtime::RuntimeDebug;
use xcm::{VersionedXcm, latest::prelude::*};
use xcm::{latest::prelude::*, MAX_XCM_DECODE_DEPTH, VersionedXcm};
use frame_support::{traits::EnsureOrigin, dispatch::Weight, weights::constants::WEIGHT_PER_MILLIS};
pub use pallet::*;

Expand Down Expand Up @@ -233,8 +233,11 @@ pub mod pallet {
data: &[u8],
) -> Result<Weight, (MessageId, Weight)> {
let id = sp_io::hashing::blake2_256(&data[..]);
let maybe_msg = VersionedXcm::<T::Call>::decode(&mut &data[..])
.map(Xcm::<T::Call>::try_from);
let maybe_msg = VersionedXcm::<T::Call>::decode_and_advance_with_depth_limit(
KiChjang marked this conversation as resolved.
Show resolved Hide resolved
MAX_XCM_DECODE_DEPTH,
&mut &data[..],
)
.map(Xcm::<T::Call>::try_from);
match maybe_msg {
Err(_) => {
Self::deposit_event(Event::InvalidFormat(id));
Expand Down
2 changes: 1 addition & 1 deletion pallets/parachain-system/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ sp-trie = { git = "https://github.com/paritytech/substrate", default-features =
sp-externalities = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }

# Other Dependencies
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"]}
codec = { package = "parity-scale-codec", version = "2.3.0", default-features = false, features = ["derive"]}
serde = { version = "1.0.101", optional = true, features = ["derive"] }
log = { version = "0.4.14", default-features = false }
environmental = { version = "1.1.2", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion pallets/session-benchmarking/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ sp-io = { default-features = false, git = 'https://github.com/paritytech/substra

[dev-dependencies]
serde = { version = "1.0.119" }
codec = { package = "parity-scale-codec", version = "2.0.0", features = [ "derive" ] }
codec = { package = "parity-scale-codec", version = "2.3.0", features = [ "derive" ] }
sp-core = { git = 'https://github.com/paritytech/substrate', branch = "master" }

[features]
Expand Down
2 changes: 1 addition & 1 deletion pallets/xcm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name = "cumulus-pallet-xcm"
version = "0.1.0"

[dependencies]
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] }
codec = { package = "parity-scale-codec", version = "2.3.0", default-features = false, features = ["derive"] }
serde = { version = "1.0.101", optional = true, features = ["derive"] }

sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
Expand Down
21 changes: 15 additions & 6 deletions pallets/xcm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,12 @@
use sp_std::{prelude::*, convert::TryFrom};
use cumulus_primitives_core::{ParaId, DmpMessageHandler};
use cumulus_primitives_core::relay_chain::BlockNumber as RelayBlockNumber;
use codec::{Encode, Decode};
use codec::{Decode, DecodeLimit, Encode};
use sp_runtime::traits::BadOrigin;
use xcm::{VersionedXcm, latest::{Xcm, Outcome, Parent, ExecuteXcm}};
use xcm::{
latest::{Xcm, Outcome, Parent, ExecuteXcm},
MAX_XCM_DECODE_DEPTH, VersionedXcm,
};
use frame_support::dispatch::Weight;
pub use pallet::*;

Expand Down Expand Up @@ -112,8 +115,11 @@ impl<T: Config> DmpMessageHandler for UnlimitedDmpExecution<T> {
let mut used = 0;
for (_sent_at, data) in iter {
let id = sp_io::hashing::twox_64(&data[..]);
let msg = VersionedXcm::<T::Call>::decode(&mut &data[..])
.map(Xcm::<T::Call>::try_from);
let msg = VersionedXcm::<T::Call>::decode_and_advance_with_depth_limit(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we don't really want to advance the data? We more want to decode all the data, otherwise it should be an error?

Copy link
Contributor Author

@KiChjang KiChjang Sep 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah ok, so decode's default behaviour is to advance the cursor, albeit without any upper limit to the input data length, but if we wanna change the behaviour to "decode everything otherwise error", we can change that too.

MAX_XCM_DECODE_DEPTH,
&mut &data[..],
)
.map(Xcm::<T::Call>::try_from);
match msg {
Err(_) => Pallet::<T>::deposit_event(Event::InvalidFormat(id)),
Ok(Err(())) => Pallet::<T>::deposit_event(Event::UnsupportedVersion(id)),
Expand Down Expand Up @@ -142,8 +148,11 @@ impl<T: Config> DmpMessageHandler for LimitAndDropDmpExecution<T> {
let mut used = 0;
for (_sent_at, data) in iter {
let id = sp_io::hashing::twox_64(&data[..]);
let msg = VersionedXcm::<T::Call>::decode(&mut &data[..])
.map(Xcm::<T::Call>::try_from);
let msg = VersionedXcm::<T::Call>::decode_and_advance_with_depth_limit(
KiChjang marked this conversation as resolved.
Show resolved Hide resolved
MAX_XCM_DECODE_DEPTH,
&mut &data[..],
)
.map(Xcm::<T::Call>::try_from);
match msg {
Err(_) => Pallet::<T>::deposit_event(Event::InvalidFormat(id)),
Ok(Err(())) => Pallet::<T>::deposit_event(Event::UnsupportedVersion(id)),
Expand Down
2 changes: 1 addition & 1 deletion pallets/xcmp-queue/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2018"

[dependencies]
# Other dependencies
codec = { package = "parity-scale-codec", version = "2.0.0", features = [ "derive" ], default-features = false }
codec = { package = "parity-scale-codec", version = "2.3.0", features = [ "derive" ], default-features = false }
log = { version = "0.4.14", default-features = false }
rand = { version = "0.8.3", default-features = false }
rand_chacha = { version = "0.3.0", default-features = false }
Expand Down
24 changes: 18 additions & 6 deletions pallets/xcmp-queue/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ mod mock;
#[cfg(test)]
mod tests;

use codec::{Decode, Encode};
use codec::{Decode, DecodeLimit, Encode};
use cumulus_primitives_core::{
relay_chain::BlockNumber as RelayBlockNumber, ChannelStatus, GetChannelInfo, MessageSendError,
ParaId, XcmpMessageHandler, XcmpMessageSource, XcmpMessageFormat,
Expand All @@ -43,7 +43,7 @@ use rand_chacha::{
};
use sp_runtime::{traits::Hash, RuntimeDebug};
use sp_std::{prelude::*, convert::TryFrom};
use xcm::{latest::prelude::*, WrapVersion, VersionedXcm};
use xcm::{latest::prelude::*, MAX_XCM_DECODE_DEPTH, WrapVersion, VersionedXcm};

pub use pallet::*;

Expand Down Expand Up @@ -256,7 +256,10 @@ impl<T: Config> Pallet<T> {
let have_active = s[index].4 > s[index].3;
let appended = have_active
&& <OutboundXcmpMessages<T>>::mutate(recipient, s[index].4 - 1, |s| {
if XcmpMessageFormat::decode(&mut &s[..]) != Ok(format) {
if XcmpMessageFormat::decode_and_advance_with_depth_limit(
MAX_XCM_DECODE_DEPTH,
&mut &s[..],
) != Ok(format) {
return false;
}
if s.len() + data.len() > max_message_size {
Expand Down Expand Up @@ -382,7 +385,10 @@ impl<T: Config> Pallet<T> {
XcmpMessageFormat::ConcatenatedVersionedXcm => {
while !remaining_fragments.is_empty() {
last_remaining_fragments = remaining_fragments;
if let Ok(xcm) = VersionedXcm::<T::Call>::decode(&mut remaining_fragments) {
if let Ok(xcm) = VersionedXcm::<T::Call>::decode_and_advance_with_depth_limit(
MAX_XCM_DECODE_DEPTH,
&mut remaining_fragments,
) {
let weight = max_weight - weight_used;
match Self::handle_xcm_message(sender, sent_at, xcm, weight) {
Ok(used) => weight_used = weight_used.saturating_add(used),
Expand All @@ -405,7 +411,10 @@ impl<T: Config> Pallet<T> {
XcmpMessageFormat::ConcatenatedEncodedBlob => {
while !remaining_fragments.is_empty() {
last_remaining_fragments = remaining_fragments;
if let Ok(blob) = <Vec<u8>>::decode(&mut remaining_fragments) {
if let Ok(blob) = <Vec<u8>>::decode_and_advance_with_depth_limit(
KiChjang marked this conversation as resolved.
Show resolved Hide resolved
32, // hardcoded constant since we don't process any blob XCMP msgs anyway
KiChjang marked this conversation as resolved.
Show resolved Hide resolved
&mut remaining_fragments,
) {
let weight = max_weight - weight_used;
match Self::handle_blob_message(sender, sent_at, blob, weight) {
Ok(used) => weight_used = weight_used.saturating_add(used),
Expand Down Expand Up @@ -615,7 +624,10 @@ impl<T: Config> XcmpMessageHandler for Pallet<T> {
for (sender, sent_at, data) in iter {
// Figure out the message format.
let mut data_ref = data;
let format = match XcmpMessageFormat::decode(&mut data_ref) {
let format = match XcmpMessageFormat::decode_and_advance_with_depth_limit(
MAX_XCM_DECODE_DEPTH,
&mut data_ref,
) {
Ok(f) => f,
Err(_) => {
debug_assert!(
Expand Down
2 changes: 1 addition & 1 deletion polkadot-parachains/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ futures = { version = "0.3.1", features = ["compat"] }
log = "0.4.8"
parking_lot = "0.10.2"
trie-root = "0.15.2"
codec = { package = "parity-scale-codec", version = "2.0.0" }
codec = { package = "parity-scale-codec", version = "2.3.0" }
structopt = "0.3.3"
serde = { version = "1.0.101", features = ["derive"] }
hex-literal = "0.2.1"
Expand Down
2 changes: 1 addition & 1 deletion polkadot-parachains/pallets/parachain-info/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name = "parachain-info"
version = "0.1.0"

[dependencies]
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] }
codec = { package = "parity-scale-codec", version = "2.3.0", default-features = false, features = ["derive"] }
serde = { version = "1.0.101", optional = true, features = ["derive"] }

frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
Expand Down
2 changes: 1 addition & 1 deletion polkadot-parachains/pallets/ping/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name = "cumulus-ping"
version = "0.1.0"

[dependencies]
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] }
codec = { package = "parity-scale-codec", version = "2.3.0", default-features = false, features = ["derive"] }
serde = { version = "1.0.101", optional = true, features = ["derive"] }

sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
Expand Down
2 changes: 1 addition & 1 deletion polkadot-parachains/parachains-common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ targets = ['x86_64-unknown-linux-gnu']

[dependencies]
# External dependencies
codec = { package = 'parity-scale-codec', version = '2.0.0', features = ['derive'], default-features = false }
codec = { package = 'parity-scale-codec', version = '2.3.0', features = ['derive'], default-features = false }

# Substrate dependencies
sp-consensus-aura = { git = 'https://github.com/paritytech/substrate', branch = "master", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion polkadot-parachains/rococo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description = "Simple runtime used by the rococo parachain(s)"

[dependencies]
serde = { version = "1.0.101", optional = true, features = ["derive"] }
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] }
codec = { package = "parity-scale-codec", version = "2.3.0", default-features = false, features = ["derive"] }
log = { version = "0.4.14", default-features = false }
parachain-info = { path = "../pallets/parachain-info", default-features = false }

Expand Down
2 changes: 1 addition & 1 deletion polkadot-parachains/shell/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = '2018'

[dependencies]
serde = { version = "1.0.101", optional = true, features = ["derive"] }
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] }
codec = { package = "parity-scale-codec", version = "2.3.0", default-features = false, features = ["derive"] }
log = { version = "0.4.14", default-features = false }
parachain-info = { path = "../pallets/parachain-info", default-features = false }

Expand Down
2 changes: 1 addition & 1 deletion polkadot-parachains/statemine/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description = "Kusama variant of Statemint parachain runtime"

[dependencies]
serde = { version = "1.0.101", optional = true, features = ["derive"] }
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive", "max-encoded-len"] }
codec = { package = "parity-scale-codec", version = "2.3.0", default-features = false, features = ["derive", "max-encoded-len"] }
log = { version = "0.4.14", default-features = false }
parachain-info = { path = "../pallets/parachain-info", default-features = false }
smallvec = "1.6.1"
Expand Down
2 changes: 1 addition & 1 deletion polkadot-parachains/statemint/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description = "Statemint parachain runtime"

[dependencies]
serde = { version = "1.0.101", optional = true, features = ["derive"] }
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive", "max-encoded-len"] }
codec = { package = "parity-scale-codec", version = "2.3.0", default-features = false, features = ["derive", "max-encoded-len"] }
log = { version = "0.4.14", default-features = false }
parachain-info = { path = "../pallets/parachain-info", default-features = false }
smallvec = "1.6.1"
Expand Down
2 changes: 1 addition & 1 deletion polkadot-parachains/westmint/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description = "Westend variant of Statemint parachain runtime"

[dependencies]
serde = { version = "1.0.101", optional = true, features = ["derive"] }
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive", "max-encoded-len"] }
codec = { package = "parity-scale-codec", version = "2.3.0", default-features = false, features = ["derive", "max-encoded-len"] }
log = { version = "0.4.14", default-features = false }
parachain-info = { path = "../pallets/parachain-info", default-features = false }
smallvec = "1.6.1"
Expand Down
2 changes: 1 addition & 1 deletion primitives/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ xcm = { git = "https://github.com/paritytech/polkadot", default-features = false

# Other dependencies
impl-trait-for-tuples = "0.2.1"
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = [ "derive" ] }
codec = { package = "parity-scale-codec", version = "2.3.0", default-features = false, features = [ "derive" ] }

[features]
default = [ "std" ]
Expand Down
2 changes: 1 addition & 1 deletion primitives/parachain-inherent/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ cumulus-primitives-core = { path = "../core", default-features = false }
cumulus-test-relay-sproof-builder = { path = "../../test/relay-sproof-builder", optional = true }

# Other dependencies
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = [ "derive" ] }
codec = { package = "parity-scale-codec", version = "2.3.0", default-features = false, features = [ "derive" ] }
tracing = { version = "0.1.22", optional = true }
async-trait = { version = "0.1.42", optional = true }

Expand Down
2 changes: 1 addition & 1 deletion primitives/timestamp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ cumulus-test-client = { path = "../../test/client" }
cumulus-test-relay-sproof-builder = { path = "../../test/relay-sproof-builder" }

# Other deps
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = [ "derive" ] }
codec = { package = "parity-scale-codec", version = "2.3.0", default-features = false, features = [ "derive" ] }
futures = "0.3.5"

[features]
Expand Down
2 changes: 1 addition & 1 deletion primitives/utility/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ cumulus-primitives-core = { path = "../core", default-features = false }

# Other dependencies
impl-trait-for-tuples = "0.2.1"
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = [ "derive" ] }
codec = { package = "parity-scale-codec", version = "2.3.0", default-features = false, features = [ "derive" ] }


[features]
Expand Down
Loading