diff --git a/substrate/Cargo.lock b/substrate/Cargo.lock
index 60f8217d69e8a04832156c1301654ed641d79544..e9798d4c420542572e51105be86b16661fbcc78b 100644
--- a/substrate/Cargo.lock
+++ b/substrate/Cargo.lock
@@ -3843,25 +3843,6 @@ dependencies = [
  "typenum",
 ]
 
-[[package]]
-name = "libsecp256k1"
-version = "0.6.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c9d220bc1feda2ac231cb78c3d26f27676b8cf82c96971f7aeef3d0cf2797c73"
-dependencies = [
- "arrayref",
- "base64 0.12.3",
- "digest 0.9.0",
- "hmac-drbg",
- "libsecp256k1-core 0.2.2",
- "libsecp256k1-gen-ecmult 0.2.1",
- "libsecp256k1-gen-genmult 0.2.1",
- "rand 0.7.3",
- "serde",
- "sha2 0.9.8",
- "typenum",
-]
-
 [[package]]
 name = "libsecp256k1"
 version = "0.7.0"
@@ -3871,12 +3852,14 @@ dependencies = [
  "arrayref",
  "base64 0.13.0",
  "digest 0.9.0",
+ "hmac-drbg",
  "libsecp256k1-core 0.3.0",
  "libsecp256k1-gen-ecmult 0.3.0",
  "libsecp256k1-gen-genmult 0.3.0",
  "rand 0.8.4",
  "serde",
  "sha2 0.9.8",
+ "typenum",
 ]
 
 [[package]]
@@ -5414,7 +5397,7 @@ dependencies = [
  "frame-support",
  "frame-system",
  "hex-literal",
- "libsecp256k1 0.6.0",
+ "libsecp256k1 0.7.0",
  "log 0.4.14",
  "pallet-balances",
  "pallet-contracts-primitives",
@@ -5425,8 +5408,8 @@ dependencies = [
  "parity-scale-codec",
  "pretty_assertions",
  "pwasm-utils",
- "rand 0.7.3",
- "rand_pcg 0.2.1",
+ "rand 0.8.4",
+ "rand_pcg 0.3.1",
  "scale-info",
  "serde",
  "smallvec 1.7.0",
@@ -7233,6 +7216,15 @@ dependencies = [
  "rand_core 0.5.1",
 ]
 
+[[package]]
+name = "rand_pcg"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "59cad018caf63deb318e5a4586d99a24424a364f40f1e5778c29aca23f4fc73e"
+dependencies = [
+ "rand_core 0.6.2",
+]
+
 [[package]]
 name = "rand_xorshift"
 version = "0.1.1"
@@ -8068,7 +8060,7 @@ version = "0.10.0-dev"
 dependencies = [
  "hex-literal",
  "lazy_static",
- "libsecp256k1 0.6.0",
+ "libsecp256k1 0.7.0",
  "log 0.4.14",
  "parity-scale-codec",
  "parking_lot 0.11.1",
@@ -9442,7 +9434,7 @@ dependencies = [
  "hex-literal",
  "impl-serde",
  "lazy_static",
- "libsecp256k1 0.6.0",
+ "libsecp256k1 0.7.0",
  "log 0.4.14",
  "merlin",
  "num-traits",
@@ -9562,7 +9554,7 @@ version = "4.0.0-dev"
 dependencies = [
  "futures 0.3.16",
  "hash-db",
- "libsecp256k1 0.6.0",
+ "libsecp256k1 0.7.0",
  "log 0.4.14",
  "parity-scale-codec",
  "parking_lot 0.11.1",
diff --git a/substrate/client/executor/Cargo.toml b/substrate/client/executor/Cargo.toml
index 4a8e678105437953c73f2590ed09a9efdf387866..ebdcc44ff0d8cb1573f8b5d43725f08a19fb0e46 100644
--- a/substrate/client/executor/Cargo.toml
+++ b/substrate/client/executor/Cargo.toml
@@ -32,7 +32,7 @@ sc-executor-wasmi = { version = "0.10.0-dev", path = "wasmi" }
 sc-executor-wasmtime = { version = "0.10.0-dev", path = "wasmtime", optional = true }
 parking_lot = "0.11.1"
 log = "0.4.8"
-libsecp256k1 = "0.6"
+libsecp256k1 = "0.7"
 sp-core-hashing-proc-macro = { version = "4.0.0-dev", path = "../../primitives/core/hashing/proc-macro" }
 
 [dev-dependencies]
diff --git a/substrate/frame/contracts/Cargo.toml b/substrate/frame/contracts/Cargo.toml
index dec33768a042669c59d3b736591a3e2b87c2fb6b..6639d939e1796781e667979e6fc5847ef63524f9 100644
--- a/substrate/frame/contracts/Cargo.toml
+++ b/substrate/frame/contracts/Cargo.toml
@@ -28,9 +28,9 @@ smallvec = { version = "1", default-features = false, features = [
 wasmi-validation = { version = "0.4", default-features = false }
 
 # Only used in benchmarking to generate random contract code
-libsecp256k1 = { version = "0.6.0", optional = true, default-features = false, features = ["hmac", "static-context"] }
-rand = { version = "0.7.3", optional = true, default-features = false }
-rand_pcg = { version = "0.2", optional = true }
+libsecp256k1 = { version = "0.7", optional = true, default-features = false, features = ["hmac", "static-context"] }
+rand = { version = "0.8", optional = true, default-features = false }
+rand_pcg = { version = "0.3", optional = true }
 
 # Substrate Dependencies
 frame-benchmarking = { version = "4.0.0-dev", default-features = false, path = "../benchmarking", optional = true }
@@ -47,7 +47,7 @@ sp-std = { version = "4.0.0-dev", default-features = false, path = "../../primit
 [dev-dependencies]
 assert_matches = "1"
 hex-literal = "0.3"
-pretty_assertions = "1.0.0"
+pretty_assertions = "1"
 wat = "1"
 
 # Substrate Dependencies
diff --git a/substrate/frame/contracts/src/benchmarking/code.rs b/substrate/frame/contracts/src/benchmarking/code.rs
index 98f52f4719a61bde7e1b3c60e97d707493b30f87..5dac8a84ace8aa8582157c429bd612e16ae37cc2 100644
--- a/substrate/frame/contracts/src/benchmarking/code.rs
+++ b/substrate/frame/contracts/src/benchmarking/code.rs
@@ -495,11 +495,11 @@ pub mod body {
 					vec![Instruction::I32Const(current as i32)]
 				},
 				DynInstr::RandomUnaligned(low, high) => {
-					let unaligned = rng.gen_range(*low, *high) | 1;
+					let unaligned = rng.gen_range(*low..*high) | 1;
 					vec![Instruction::I32Const(unaligned as i32)]
 				},
 				DynInstr::RandomI32(low, high) => {
-					vec![Instruction::I32Const(rng.gen_range(*low, *high))]
+					vec![Instruction::I32Const(rng.gen_range(*low..*high))]
 				},
 				DynInstr::RandomI32Repeated(num) => (&mut rng)
 					.sample_iter(Standard)
@@ -512,19 +512,19 @@ pub mod body {
 					.map(|val| Instruction::I64Const(val))
 					.collect(),
 				DynInstr::RandomGetLocal(low, high) => {
-					vec![Instruction::GetLocal(rng.gen_range(*low, *high))]
+					vec![Instruction::GetLocal(rng.gen_range(*low..*high))]
 				},
 				DynInstr::RandomSetLocal(low, high) => {
-					vec![Instruction::SetLocal(rng.gen_range(*low, *high))]
+					vec![Instruction::SetLocal(rng.gen_range(*low..*high))]
 				},
 				DynInstr::RandomTeeLocal(low, high) => {
-					vec![Instruction::TeeLocal(rng.gen_range(*low, *high))]
+					vec![Instruction::TeeLocal(rng.gen_range(*low..*high))]
 				},
 				DynInstr::RandomGetGlobal(low, high) => {
-					vec![Instruction::GetGlobal(rng.gen_range(*low, *high))]
+					vec![Instruction::GetGlobal(rng.gen_range(*low..*high))]
 				},
 				DynInstr::RandomSetGlobal(low, high) => {
-					vec![Instruction::SetGlobal(rng.gen_range(*low, *high))]
+					vec![Instruction::SetGlobal(rng.gen_range(*low..*high))]
 				},
 			})
 			.chain(sp_std::iter::once(Instruction::End))
diff --git a/substrate/primitives/core/Cargo.toml b/substrate/primitives/core/Cargo.toml
index dc8904f33e0c13744d77b415c9a73d0774e59c07..61451e10ecf2f7c1d3311c7a1affa6beb887d233 100644
--- a/substrate/primitives/core/Cargo.toml
+++ b/substrate/primitives/core/Cargo.toml
@@ -65,7 +65,7 @@ schnorrkel = { version = "0.9.1", features = [
 sha2 = { version = "0.9.8", default-features = false, optional = true }
 hex = { version = "0.4", default-features = false, optional = true }
 twox-hash = { version = "1.6.1", default-features = false, optional = true }
-libsecp256k1 = { version = "0.6", default-features = false, features = ["hmac", "static-context"], optional = true }
+libsecp256k1 = { version = "0.7", default-features = false, features = ["hmac", "static-context"], optional = true }
 sp-core-hashing = { version = "4.0.0-dev", path = "./hashing", default-features = false, optional = true }
 merlin = { version = "2.0", default-features = false, optional = true }
 ss58-registry = { version = "1.5.0", default-features = false }
diff --git a/substrate/primitives/io/Cargo.toml b/substrate/primitives/io/Cargo.toml
index 2d7c50bdc25e40ce5137ea05a420df87be5af276..2e0982a6e5f130f8942ce37b81086babb779d087 100644
--- a/substrate/primitives/io/Cargo.toml
+++ b/substrate/primitives/io/Cargo.toml
@@ -20,7 +20,7 @@ hash-db = { version = "0.15.2", default-features = false }
 sp-core = { version = "4.0.0-dev", default-features = false, path = "../core" }
 sp-keystore = { version = "0.10.0-dev", default-features = false, optional = true, path = "../keystore" }
 sp-std = { version = "4.0.0-dev", default-features = false, path = "../std" }
-libsecp256k1 = { version = "0.6", optional = true }
+libsecp256k1 = { version = "0.7", optional = true }
 sp-state-machine = { version = "0.10.0-dev", optional = true, path = "../state-machine" }
 sp-wasm-interface = { version = "4.0.0-dev", path = "../wasm-interface", default-features = false }
 sp-runtime-interface = { version = "4.0.0-dev", default-features = false, path = "../runtime-interface" }