fix(verify-attestation): simplify dependencies

The zksync crates have recently been published on crates.io. Let's take
advantage of them! Specifically, we are replacing alloy-primitives with
zksync_basic_types to avoid the additional transitive dependencies
introduced by alloy.
This commit is contained in:
Patryk Bęza 2024-07-22 13:56:13 +02:00
parent c48cbc636d
commit ad6ce872f8
No known key found for this signature in database
GPG key ID: 9AD1B44D9F6258EC
4 changed files with 254 additions and 496 deletions

742
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -19,7 +19,6 @@ homepage = "https://github.com/matter-labs/teepot"
actix-http = "3"
actix-tls = "3"
actix-web = { version = "4.5", features = ["rustls-0_22"] }
alloy-primitives = "0.7.7"
anyhow = "1.0.82"
awc = { version = "3.4", features = ["rustls-0_22-webpki-roots"] }
base64 = "0.22.0"
@ -64,3 +63,4 @@ tracing-subscriber = { version = "0.3", features = ["env-filter"] }
x509-cert = { version = "0.2", features = ["builder", "signature"] }
zeroize = { version = "1.7.0", features = ["serde"] }
webpki-roots = "0.26.1"
zksync_basic_types = "=0.1.0"

View file

@ -7,9 +7,9 @@ license.workspace = true
repository.workspace = true
[dependencies]
alloy-primitives.workspace = true
anyhow.workspace = true
clap.workspace = true
hex.workspace = true
secp256k1.workspace = true
teepot.workspace = true
zksync_basic_types.workspace = true

View file

@ -3,7 +3,6 @@
//! Tool for SGX attestation and batch signature verification
use alloy_primitives::B256;
use anyhow::{Context, Result};
use clap::{Args, Parser, Subcommand};
use secp256k1::{ecdsa::Signature, Message, PublicKey};
@ -12,6 +11,7 @@ use teepot::{
client::TcbLevel,
sgx::{tee_qv_get_collateral, verify_quote_with_collateral, QuoteVerificationResult},
};
use zksync_basic_types::H256;
#[derive(Parser, Debug)]
#[command(author = "Matter Labs", version, about = "SGX attestation and batch signature verifier", long_about = None)]
@ -48,7 +48,7 @@ struct SignatureArgs {
signature_file: PathBuf,
/// Batch root hash for signature verification.
#[arg(long)]
root_hash: B256,
root_hash: H256,
}
#[derive(Subcommand, Debug)]