Skip to content

Commit

Permalink
fix/ignore cargo deny issues (paritytech#1183)
Browse files Browse the repository at this point in the history
  • Loading branch information
svyatonik authored and serban300 committed Apr 8, 2024
1 parent 448d5ec commit 0c4adf0
Show file tree
Hide file tree
Showing 15 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions bridges/bin/rialto/runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
[dependencies]
codec = { package = "parity-scale-codec", version = "2.2.0", default-features = false, features = ["derive"] }
hex-literal = "0.3"
libsecp256k1 = { version = "0.3.4", optional = true, default-features = false, features = ["hmac"] }
libsecp256k1 = { version = "0.7", optional = true, default-features = false, features = ["hmac"] }
log = { version = "0.4.14", default-features = false }
serde = { version = "1.0", optional = true, features = ["derive"] }

Expand Down Expand Up @@ -72,7 +72,7 @@ polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot", bran
polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", branch = "master", default-features = false }

[dev-dependencies]
libsecp256k1 = { version = "0.3.4", features = ["hmac"] }
libsecp256k1 = { version = "0.7", features = ["hmac"] }

[build-dependencies]
substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "master" }
Expand Down
2 changes: 1 addition & 1 deletion bridges/bin/rialto/runtime/src/exchange.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ pub(crate) fn prepare_ethereum_transaction(
// chain id is 0x11
// sender secret is 0x4d5db4107d237df6a3d58ee5f70ae63d73d7658d4026f2eefd2f204c81682cb7
let chain_id = 0x11;
let signer = secp256k1::SecretKey::parse(&hex!(
let signer = libsecp256k1::SecretKey::parse(&hex!(
"4d5db4107d237df6a3d58ee5f70ae63d73d7658d4026f2eefd2f204c81682cb7"
))
.unwrap();
Expand Down
4 changes: 2 additions & 2 deletions bridges/modules/ethereum/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0"

[dependencies]
codec = { package = "parity-scale-codec", version = "2.2.0", default-features = false }
libsecp256k1 = { version = "0.3.4", default-features = false, features = ["hmac"], optional = true }
libsecp256k1 = { version = "0.7", default-features = false, features = ["hmac"], optional = true }
log = { version = "0.4.14", default-features = false }
serde = { version = "1.0", optional = true }

Expand All @@ -26,7 +26,7 @@ sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master
sp-std = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }

[dev-dependencies]
libsecp256k1 = { version = "0.3.4", features = ["hmac"] }
libsecp256k1 = { version = "0.7", features = ["hmac"] }
hex-literal = "0.3"

[features]
Expand Down
2 changes: 1 addition & 1 deletion bridges/modules/ethereum/src/import.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ mod tests {
validators::ValidatorsSource,
BlocksToPrune, BridgeStorage, Headers, PruningRange,
};
use secp256k1::SecretKey;
use libsecp256k1::SecretKey;

const TOTAL_VALIDATORS: usize = 3;

Expand Down
2 changes: 1 addition & 1 deletion bridges/modules/ethereum/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ use crate::{
};
use bp_eth_poa::{Address, AuraHeader, H256, U256};
use frame_support::{parameter_types, traits::GenesisBuild, weights::Weight};
use secp256k1::SecretKey;
use libsecp256k1::SecretKey;
use sp_runtime::{
testing::Header as SubstrateHeader,
traits::{BlakeTwo256, IdentityLookup},
Expand Down
2 changes: 1 addition & 1 deletion bridges/modules/ethereum/src/test_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ use bp_eth_poa::{
signatures::{secret_to_address, sign, SignHeader},
Address, AuraHeader, Bloom, Receipt, SealedEmptyStep, H256, U256,
};
use secp256k1::SecretKey;
use libsecp256k1::SecretKey;
use sp_std::prelude::*;

/// Gas limit valid in test environment.
Expand Down
2 changes: 1 addition & 1 deletion bridges/modules/ethereum/src/verification.rs
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ mod tests {
};
use bp_eth_poa::{compute_merkle_root, rlp_encode, TransactionOutcome, H520, U256};
use hex_literal::hex;
use secp256k1::SecretKey;
use libsecp256k1::SecretKey;
use sp_runtime::transaction_validity::TransactionTag;

const GENESIS_STEP: u64 = 42;
Expand Down
2 changes: 1 addition & 1 deletion bridges/primitives/ethereum-poa/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ fixed-hash = { version = "0.7", default-features = false }
hash-db = { version = "0.15.2", default-features = false }
impl-rlp = { version = "0.3", default-features = false }
impl-serde = { version = "0.3.1", optional = true }
libsecp256k1 = { version = "0.3.4", default-features = false, features = ["hmac"] }
libsecp256k1 = { version = "0.7", default-features = false, features = ["hmac", "static-context"] }
parity-bytes = { version = "0.1", default-features = false }
plain_hasher = { version = "0.2.2", default-features = false }
primitive-types = { version = "0.10", default-features = false, features = ["codec", "rlp"] }
Expand Down
6 changes: 3 additions & 3 deletions bridges/primitives/ethereum-poa/src/signatures.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
//! Used for testing and benchmarking.

// reexport to avoid direct secp256k1 deps by other crates
pub use secp256k1::SecretKey;
pub use libsecp256k1::SecretKey;

use crate::{
public_to_address, rlp_encode, step_validator, Address, AuraHeader, RawTransaction,
UnsignedTransaction, H256, H520, U256,
};

use secp256k1::{Message, PublicKey};
use libsecp256k1::{Message, PublicKey};

/// Utilities for signing headers.
pub trait SignHeader {
Expand Down Expand Up @@ -81,7 +81,7 @@ impl SignTransaction for UnsignedTransaction {
/// Return author's signature over given message.
pub fn sign(author: &SecretKey, message: H256) -> H520 {
let (signature, recovery_id) =
secp256k1::sign(&Message::parse(message.as_fixed_bytes()), author);
libsecp256k1::sign(&Message::parse(message.as_fixed_bytes()), author);
let mut raw_signature = [0u8; 65];
raw_signature[..64].copy_from_slice(&signature.serialize());
raw_signature[64] = recovery_id.serialize();
Expand Down
2 changes: 1 addition & 1 deletion bridges/relays/bin-ethereum/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ ethabi-derive = { git = "https://github.com/svyatonik/ethabi.git", branch = "bum
futures = "0.3.12"
hex = "0.4"
hex-literal = "0.3"
libsecp256k1 = { version = "0.3.4", default-features = false, features = ["hmac"] }
libsecp256k1 = { version = "0.7", default-features = false, features = ["hmac"] }
log = "0.4.14"
num-traits = "0.2"
serde_json = "1.0.64"
Expand Down
2 changes: 1 addition & 1 deletion bridges/relays/bin-ethereum/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ use ethereum_sync_loop::EthereumSyncParams;
use headers_relay::sync::TargetTransactionMode;
use hex_literal::hex;
use instances::{BridgeInstance, Kovan, RialtoPoA};
use libsecp256k1::SecretKey;
use relay_utils::{
initialize::initialize_relay,
metrics::{MetricsAddress, MetricsParams},
};
use secp256k1::SecretKey;
use sp_core::crypto::Pair;
use substrate_sync_loop::SubstrateSyncParams;

Expand Down
2 changes: 1 addition & 1 deletion bridges/relays/bin-substrate/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,5 @@ polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot",
hex-literal = "0.3"
pallet-bridge-grandpa = { path = "../../modules/grandpa" }
sp-keyring = { git = "https://github.com/paritytech/substrate", branch = "master" }
tempdir = "0.3"
tempfile = "3.2"
finality-grandpa = { version = "0.14.0" }
2 changes: 1 addition & 1 deletion bridges/relays/bin-substrate/src/cli/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ mod tests {
let bob_with_alice_password =
sp_core::sr25519::Pair::from_string(BOB, Some(ALICE_PASSWORD)).unwrap();

let temp_dir = tempdir::TempDir::new("reads_suri_from_file").unwrap();
let temp_dir = tempfile::tempdir().unwrap();
let mut suri_file_path = temp_dir.path().to_path_buf();
let mut password_file_path = temp_dir.path().to_path_buf();
suri_file_path.push("suri");
Expand Down
2 changes: 1 addition & 1 deletion bridges/relays/client-ethereum/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ headers-relay = { path = "../headers" }
hex-literal = "0.3"
jsonrpsee-proc-macros = "0.3.1"
jsonrpsee-ws-client = "0.3.1"
libsecp256k1 = { version = "0.3.4", default-features = false, features = ["hmac"] }
libsecp256k1 = { version = "0.7", default-features = false, features = ["hmac"] }
log = "0.4.11"
relay-utils = { path = "../utils" }
tokio = "1.8"
Expand Down
2 changes: 1 addition & 1 deletion bridges/relays/client-ethereum/src/sign.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use crate::{
};
use bp_eth_poa::signatures::{secret_to_address, SignTransaction};
use hex_literal::hex;
use secp256k1::SecretKey;
use libsecp256k1::SecretKey;

/// Ethereum signing params.
#[derive(Clone, Debug)]
Expand Down

0 comments on commit 0c4adf0

Please sign in to comment.