diff --git a/substrate/Cargo.lock b/substrate/Cargo.lock
index 6aafb0e175d98e508d444c8ca063f87c841f466e..c075f065fdd90797490a796054f4fed0d98f9564 100644
--- a/substrate/Cargo.lock
+++ b/substrate/Cargo.lock
@@ -167,6 +167,12 @@ dependencies = [
  "libc",
 ]
 
+[[package]]
+name = "anes"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299"
+
 [[package]]
 name = "ansi_term"
 version = "0.12.1"
@@ -705,10 +711,7 @@ version = "0.2.17"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "ba3569f383e8f1598449f1a423e72e99569137b47740b1da11ef19af3d5c3223"
 dependencies = [
- "lazy_static",
  "memchr",
- "regex-automata",
- "serde",
 ]
 
 [[package]]
@@ -914,6 +917,33 @@ dependencies = [
  "winapi",
 ]
 
+[[package]]
+name = "ciborium"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b0c137568cc60b904a7724001b35ce2630fd00d5d84805fbb608ab89509d788f"
+dependencies = [
+ "ciborium-io",
+ "ciborium-ll",
+ "serde",
+]
+
+[[package]]
+name = "ciborium-io"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "346de753af073cc87b52b2083a506b38ac176a44cfb05497b622e27be899b369"
+
+[[package]]
+name = "ciborium-ll"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "213030a2b5a4e0c0892b6652260cf6ccac84827b83a85a534e178e3906c4cf1b"
+dependencies = [
+ "ciborium-io",
+ "half",
+]
+
 [[package]]
 name = "cid"
 version = "0.8.6"
@@ -967,13 +997,14 @@ dependencies = [
 
 [[package]]
 name = "clap"
-version = "2.34.0"
+version = "3.2.23"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c"
+checksum = "71655c45cb9845d3270c9d6df84ebe72b4dad3c2ba3f7023ad47c144e4e473a5"
 dependencies = [
  "bitflags",
+ "clap_lex 0.2.4",
+ "indexmap",
  "textwrap",
- "unicode-width",
 ]
 
 [[package]]
@@ -984,7 +1015,7 @@ checksum = "a7db700bc935f9e43e88d00b0850dae18a63773cfbec6d8e070fccf7fef89a39"
 dependencies = [
  "bitflags",
  "clap_derive",
- "clap_lex",
+ "clap_lex 0.3.0",
  "is-terminal",
  "once_cell",
  "strsim",
@@ -1013,6 +1044,15 @@ dependencies = [
  "syn",
 ]
 
+[[package]]
+name = "clap_lex"
+version = "0.2.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5"
+dependencies = [
+ "os_str_bytes",
+]
+
 [[package]]
 name = "clap_lex"
 version = "0.3.0"
@@ -1243,15 +1283,16 @@ dependencies = [
 
 [[package]]
 name = "criterion"
-version = "0.3.6"
+version = "0.4.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b01d6de93b2b6c65e17c634a26653a29d107b3c98c607c765bf38d041531cd8f"
+checksum = "e7c76e09c1aae2bc52b3d2f29e13c6572553b30c4aa1b8a49fd70de6412654cb"
 dependencies = [
+ "anes",
  "atty",
  "cast",
- "clap 2.34.0",
+ "ciborium",
+ "clap 3.2.23",
  "criterion-plot",
- "csv",
  "futures",
  "itertools",
  "lazy_static",
@@ -1261,7 +1302,6 @@ dependencies = [
  "rayon",
  "regex",
  "serde",
- "serde_cbor",
  "serde_derive",
  "serde_json",
  "tinytemplate",
@@ -1271,9 +1311,9 @@ dependencies = [
 
 [[package]]
 name = "criterion-plot"
-version = "0.4.5"
+version = "0.5.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2673cc8207403546f45f5fd319a974b1e6983ad1a3ee7e6041650013be041876"
+checksum = "6b50826342786a51a89e2da3a28f1c32b06e387201bc2d19791f622c673706b1"
 dependencies = [
  "cast",
  "itertools",
@@ -1380,28 +1420,6 @@ dependencies = [
  "subtle",
 ]
 
-[[package]]
-name = "csv"
-version = "1.1.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "22813a6dc45b335f9bade10bf7271dc477e81113e89eb251a0bc2a8a81c536e1"
-dependencies = [
- "bstr 0.2.17",
- "csv-core",
- "itoa 0.4.8",
- "ryu",
- "serde",
-]
-
-[[package]]
-name = "csv-core"
-version = "0.1.10"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2b2466559f260f48ad25fe6317b3c8dac77b5bdb5763ac7d9d6103530663bc90"
-dependencies = [
- "memchr",
-]
-
 [[package]]
 name = "ctor"
 version = "0.1.26"
@@ -2976,7 +2994,7 @@ checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399"
 dependencies = [
  "bytes",
  "fnv",
- "itoa 1.0.5",
+ "itoa",
 ]
 
 [[package]]
@@ -3029,7 +3047,7 @@ dependencies = [
  "http-body",
  "httparse",
  "httpdate",
- "itoa 1.0.5",
+ "itoa",
  "pin-project-lite 0.2.9",
  "socket2",
  "tokio",
@@ -3277,12 +3295,6 @@ dependencies = [
  "either",
 ]
 
-[[package]]
-name = "itoa"
-version = "0.4.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4"
-
 [[package]]
 name = "itoa"
 version = "1.0.5"
@@ -5083,7 +5095,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "a652d9771a63711fd3c3deb670acfbe5c30a4072e664d7a3bf5a9e1056ac72c3"
 dependencies = [
  "arrayvec 0.7.2",
- "itoa 1.0.5",
+ "itoa",
 ]
 
 [[package]]
@@ -7188,7 +7200,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "83cd1b99916654a69008fd66b4f9397fbe08e6e51dfe23d4417acf5d3b8cb87c"
 dependencies = [
  "dtoa",
- "itoa 1.0.5",
+ "itoa",
  "parking_lot 0.12.1",
  "prometheus-client-derive-text-encode",
 ]
@@ -9380,16 +9392,6 @@ dependencies = [
  "serde_derive",
 ]
 
-[[package]]
-name = "serde_cbor"
-version = "0.11.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5"
-dependencies = [
- "half",
- "serde",
-]
-
 [[package]]
 name = "serde_derive"
 version = "1.0.152"
@@ -9407,7 +9409,7 @@ version = "1.0.91"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "877c235533714907a8c2464236f5c4b2a17262ef1bd71f38f35ea592c8da6883"
 dependencies = [
- "itoa 1.0.5",
+ "itoa",
  "ryu",
  "serde",
 ]
@@ -10945,12 +10947,9 @@ checksum = "95059e91184749cb66be6dc994f67f182b6d897cb3df74a5bf66b5e709295fd8"
 
 [[package]]
 name = "textwrap"
-version = "0.11.0"
+version = "0.16.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060"
-dependencies = [
- "unicode-width",
-]
+checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d"
 
 [[package]]
 name = "thiserror"
@@ -11024,7 +11023,7 @@ version = "0.3.17"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "a561bf4617eebd33bca6434b988f39ed798e527f51a1e797d0ee4f61c0a38376"
 dependencies = [
- "itoa 1.0.5",
+ "itoa",
  "serde",
  "time-core",
  "time-macros",
@@ -11338,9 +11337,9 @@ dependencies = [
 
 [[package]]
 name = "trie-bench"
-version = "0.33.0"
+version = "0.34.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c5b26bd2cdd7641c5beb476b314c0cb1f629832bf21a6235f545e2d47bc9d05a"
+checksum = "2fbb0a830db7c42ae97ce4e21b30e2cf9dbcc1b4f7853bd1aedad3d806c281d0"
 dependencies = [
  "criterion",
  "hash-db",
diff --git a/substrate/bin/node/cli/Cargo.toml b/substrate/bin/node/cli/Cargo.toml
index b55b35c05652d45cfea0a3a5e0391b08501d0e33..c529c7c9b8dfdeb0ead73b49dd2fe5863460db9f 100644
--- a/substrate/bin/node/cli/Cargo.toml
+++ b/substrate/bin/node/cli/Cargo.toml
@@ -122,7 +122,7 @@ serde_json = "1.0"
 regex = "1.6.0"
 platforms = "2.0"
 soketto = "0.7.1"
-criterion = { version = "0.3.5", features = ["async_tokio"] }
+criterion = { version = "0.4.0", features = ["async_tokio"] }
 tokio = { version = "1.22.0", features = ["macros", "time", "parking_lot"] }
 tokio-util = { version = "0.7.4", features = ["compat"] }
 wait-timeout = "0.2"
diff --git a/substrate/bin/node/executor/Cargo.toml b/substrate/bin/node/executor/Cargo.toml
index edcc4df9c8176ef027c8501ddb0c76f0aef402c1..ffa8d38ee4b34164a6fd77e64f632735cdf7085c 100644
--- a/substrate/bin/node/executor/Cargo.toml
+++ b/substrate/bin/node/executor/Cargo.toml
@@ -26,7 +26,7 @@ sp-tracing = { version = "6.0.0", path = "../../../primitives/tracing" }
 sp-trie = { version = "7.0.0", path = "../../../primitives/trie" }
 
 [dev-dependencies]
-criterion = "0.3.0"
+criterion = "0.4.0"
 futures = "0.3.21"
 wat = "1.0"
 frame-support = { version = "4.0.0-dev", path = "../../../frame/support" }
diff --git a/substrate/client/db/Cargo.toml b/substrate/client/db/Cargo.toml
index a9f5e28c731593994107d45dbfd52c70fb3074e5..7a62cb1ea0f53a7c2566df65ff22e660e1b408db 100644
--- a/substrate/client/db/Cargo.toml
+++ b/substrate/client/db/Cargo.toml
@@ -36,7 +36,7 @@ sp-state-machine = { version = "0.13.0", path = "../../primitives/state-machine"
 sp-trie = { version = "7.0.0", path = "../../primitives/trie" }
 
 [dev-dependencies]
-criterion = "0.3.3"
+criterion = "0.4.0"
 kvdb-rocksdb = "0.17.0"
 rand = "0.8.5"
 tempfile = "3.1.0"
diff --git a/substrate/client/executor/Cargo.toml b/substrate/client/executor/Cargo.toml
index 8bedcd3edcff318c770dd8dd28b90dbf62b36a76..46b72565afefc758d52f4ed43421ff16e1787cea 100644
--- a/substrate/client/executor/Cargo.toml
+++ b/substrate/client/executor/Cargo.toml
@@ -46,7 +46,7 @@ sc-tracing = { version = "4.0.0-dev", path = "../tracing" }
 tracing-subscriber = "0.2.19"
 paste = "1.0"
 regex = "1.6.0"
-criterion = "0.3"
+criterion = "0.4.0"
 env_logger = "0.9"
 num_cpus = "1.13.1"
 tempfile = "3.3.0"
diff --git a/substrate/client/tracing/Cargo.toml b/substrate/client/tracing/Cargo.toml
index be6237a344f526a3a1de8305a7d5b05110a87b12..9312c04e9f6db0099ed891e9b5d70bcbebdf6e3a 100644
--- a/substrate/client/tracing/Cargo.toml
+++ b/substrate/client/tracing/Cargo.toml
@@ -39,7 +39,7 @@ sp-runtime = { version = "7.0.0", path = "../../primitives/runtime" }
 sp-tracing = { version = "6.0.0", path = "../../primitives/tracing" }
 
 [dev-dependencies]
-criterion = "0.3"
+criterion = "0.4.0"
 
 [[bench]]
 name = "bench"
diff --git a/substrate/client/transaction-pool/Cargo.toml b/substrate/client/transaction-pool/Cargo.toml
index bbb5ebae440a0e023ec0e113d9dd1278a8e0c08b..6338f8127aa1c14cd9e46874bbe269fb54c2285e 100644
--- a/substrate/client/transaction-pool/Cargo.toml
+++ b/substrate/client/transaction-pool/Cargo.toml
@@ -37,7 +37,7 @@ sp-transaction-pool = { version = "4.0.0-dev", path = "../../primitives/transact
 [dev-dependencies]
 array-bytes = "4.1"
 assert_matches = "1.3.0"
-criterion = "0.3"
+criterion = "0.4.0"
 sc-block-builder = { version = "0.10.0-dev", path = "../block-builder" }
 sp-consensus = { version = "0.10.0-dev", path = "../../primitives/consensus/common" }
 substrate-test-runtime = { version = "2.0.0", path = "../../test-utils/runtime" }
diff --git a/substrate/frame/system/Cargo.toml b/substrate/frame/system/Cargo.toml
index 7f573a9cbd57574092b300cfc0e19edc9a5fb4d7..5a6c89aae32ea1fcd6484d7171013b32186e8003 100644
--- a/substrate/frame/system/Cargo.toml
+++ b/substrate/frame/system/Cargo.toml
@@ -26,7 +26,7 @@ sp-version = { version = "5.0.0", default-features = false, path = "../../primit
 sp-weights = { version = "4.0.0", default-features = false, path = "../../primitives/weights" }
 
 [dev-dependencies]
-criterion = "0.3.3"
+criterion = "0.4.0"
 sp-externalities = { version = "0.13.0", path = "../../primitives/externalities" }
 substrate-test-runtime-client = { version = "2.0.0", path = "../../test-utils/runtime/client" }
 
diff --git a/substrate/primitives/api/test/Cargo.toml b/substrate/primitives/api/test/Cargo.toml
index b3ceb14fe0d66f5bb305ff955044eeca4211e0cf..5b6c144ef3f6b7576a8ee7905de60249a590263e 100644
--- a/substrate/primitives/api/test/Cargo.toml
+++ b/substrate/primitives/api/test/Cargo.toml
@@ -25,7 +25,7 @@ trybuild = "1.0.74"
 rustversion = "1.0.6"
 
 [dev-dependencies]
-criterion = "0.3.0"
+criterion = "0.4.0"
 futures = "0.3.21"
 log = "0.4.17"
 sp-core = { version = "7.0.0", path = "../../core" }
diff --git a/substrate/primitives/arithmetic/Cargo.toml b/substrate/primitives/arithmetic/Cargo.toml
index bbb4bbd1776b1aaa82de9df6aa90324f8d7a3508..b3fc6abc33ffdb3be1d38c3ef1efea5933a90b73 100644
--- a/substrate/primitives/arithmetic/Cargo.toml
+++ b/substrate/primitives/arithmetic/Cargo.toml
@@ -26,7 +26,7 @@ static_assertions = "1.1.0"
 sp-std = { version = "5.0.0", default-features = false, path = "../std" }
 
 [dev-dependencies]
-criterion = "0.3"
+criterion = "0.4.0"
 primitive-types = "0.12.0"
 sp-core = { version = "7.0.0", features = ["full_crypto"], path = "../core" }
 rand = "0.8.5"
diff --git a/substrate/primitives/core/Cargo.toml b/substrate/primitives/core/Cargo.toml
index f9a522178f4c8226be1984bbc991b253d81e64da..5fd838de3538d46a7bd0e934522a95f16a01dcd8 100644
--- a/substrate/primitives/core/Cargo.toml
+++ b/substrate/primitives/core/Cargo.toml
@@ -25,7 +25,7 @@ impl-serde = { version = "0.4.0", optional = true }
 hash-db = { version = "0.15.2", default-features = false }
 hash256-std-hasher = { version = "0.15.2", default-features = false }
 base58 = { version = "0.2.0", optional = true }
-rand = { version = "0.8.5", optional = true, features = ["small_rng"] }
+rand = { version = "0.8.5", features = ["small_rng"],  optional = true }
 substrate-bip39 = { version = "0.4.4", optional = true }
 tiny-bip39 = { version = "1.0.0", optional = true }
 regex = { version = "1.6.0", optional = true }
@@ -60,7 +60,7 @@ sp-runtime-interface = { version = "7.0.0", default-features = false, path = "..
 [dev-dependencies]
 sp-serializer = { version = "4.0.0-dev", path = "../serializer" }
 rand = "0.8.5"
-criterion = "0.3.3"
+criterion = "0.4.0"
 serde_json = "1.0"
 sp-core-hashing-proc-macro = { version = "5.0.0", path = "./hashing/proc-macro" }
 
diff --git a/substrate/primitives/core/benches/bench.rs b/substrate/primitives/core/benches/bench.rs
index 53421278dca2630dd8f3a36167f154ed0fb6a9ce..77e5bb63fef7a5af3c8ebe98a982e9d925c40470 100644
--- a/substrate/primitives/core/benches/bench.rs
+++ b/substrate/primitives/core/benches/bench.rs
@@ -12,10 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#[macro_use]
-extern crate criterion;
-
-use criterion::{black_box, Bencher, BenchmarkId, Criterion};
+use criterion::{black_box, criterion_group, criterion_main, Bencher, BenchmarkId, Criterion};
 use sp_core::{
 	crypto::Pair as _,
 	hashing::{blake2_128, twox_128},
diff --git a/substrate/primitives/trie/Cargo.toml b/substrate/primitives/trie/Cargo.toml
index 78b0b5d1bbda34215ae50c0cf6ba1b822c9f4296..1e83a5d6dfec5f5bbd9e873940deaed1682e7346 100644
--- a/substrate/primitives/trie/Cargo.toml
+++ b/substrate/primitives/trie/Cargo.toml
@@ -37,8 +37,8 @@ schnellru = { version = "0.2.1", optional = true }
 
 [dev-dependencies]
 array-bytes = "4.1"
-criterion = "0.3.3"
-trie-bench = "0.33.0"
+criterion = "0.4.0"
+trie-bench = "0.34.0"
 trie-standardmap = "0.15.2"
 sp-runtime = { version = "7.0.0", path = "../runtime" }