Skip to content

Commit 011c751

Browse files
authored
V2 config update (#112)
* Remove payload form and secure grpc flag * Update common version * Fix clippy
1 parent 6975ab9 commit 011c751

File tree

22 files changed

+47
-161
lines changed

22 files changed

+47
-161
lines changed

crates/rust-eigenda-client/src/eth_client.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ pub struct RpcErrorResponse {
4343

4444
impl std::fmt::Display for RpcErrorResponse {
4545
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
46-
write!(f, "RpcErrorResponse: {:?}", self)
46+
write!(f, "RpcErrorResponse: {self:?}")
4747
}
4848
}
4949

@@ -133,7 +133,7 @@ impl EthClient {
133133
"from": format!("{:#x}", Address::zero()),
134134
}),
135135
json!(match block {
136-
Some(block) => format!("{:#x}", block),
136+
Some(block) => format!("{block:#x}"),
137137
None => "latest".to_string(),
138138
}),
139139
]),

crates/rust-eigenda-client/src/sdk.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ impl<S> RawEigenClient<S> {
331331
.ok_or(CommunicationError::NoResponseFromServer)?;
332332

333333
let Ok(reply) = reply else {
334-
return Err(CommunicationError::ErrorFromServer(format!("{:?}", reply)))?;
334+
return Err(CommunicationError::ErrorFromServer(format!("{reply:?}")))?;
335335
};
336336

337337
let reply = reply

crates/rust-eigenda-client/src/verifier.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,7 @@ impl SvcManagerClient for EthClient {
8888
current_block = current_block.saturating_sub(U256::from(depth.as_u64())); // safe conversion between U64 and u64
8989
let current_block = current_block.try_into().map_err(|_| {
9090
ConversionError::Cast(format!(
91-
"Could not parse block number {} as u64",
92-
current_block
91+
"Could not parse block number {current_block} as u64"
9392
))
9493
})?;
9594
Some(current_block)
@@ -196,8 +195,7 @@ impl<T: SvcManagerClient> Verifier<T> {
196195

197196
if !response.status().is_success() {
198197
return Err(VerificationError::PointDownloadError(format!(
199-
"Failed to download point from source {}",
200-
url
198+
"Failed to download point from source {url}"
201199
)));
202200
}
203201

crates/rust-eigenda-signers/src/public_key.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ impl PublicKey {
5151
pub fn account_id(&self) -> String {
5252
let hex = hex::encode(self.serialize_uncompressed());
5353

54-
format!("0x{}", hex)
54+
format!("0x{hex}")
5555
}
5656
}
5757

@@ -63,7 +63,7 @@ impl Display for PublicKey {
6363

6464
impl fmt::Debug for PublicKey {
6565
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
66-
write!(f, "PublicKey({})", self)
66+
write!(f, "PublicKey({self})")
6767
}
6868
}
6969

@@ -164,7 +164,7 @@ mod tests {
164164
let expected_debug = format!("PublicKey({EXPECTED_UNCOMPRESSED_PUB_KEY})");
165165

166166
// When
167-
let debug_str = format!("{:?}", pk);
167+
let debug_str = format!("{pk:?}");
168168

169169
// Then
170170
assert_eq!(debug_str, expected_debug);

crates/rust-eigenda-signers/src/secret_key.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ mod tests {
155155
let expected_debug = "SecretKey([redacted])";
156156

157157
// When
158-
let debug_str = format!("{:?}", sk);
158+
let debug_str = format!("{sk:?}");
159159

160160
// Then
161161
assert_eq!(debug_str, expected_debug);

crates/rust-eigenda-signers/src/signature.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ mod tests {
117117
let sig = RecoverableSignature { r, s, v };
118118

119119
// When
120-
let display_str = format!("{}", sig);
120+
let display_str = format!("{sig}");
121121

122122
// Then
123123
assert_eq!(display_str, "0x11000000000000000000000000000000000000000000000000000000000000aa22000000000000000000000000000000000000000000000000000000000000bb01")

crates/rust-eigenda-signers/src/signers/private_key.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ mod tests {
188188
// Verify that secp256k1::ecdsa::RecoveryId::from_i32 only accepts 0, 1, 2, 3
189189
for i in 0..=3 {
190190
let recid = secp_ecdsa::RecoveryId::from_i32(i)
191-
.unwrap_or_else(|_| panic!("Failed to create RecoveryId from valid i32: {}", i));
191+
.unwrap_or_else(|_| panic!("Failed to create RecoveryId from valid i32: {i}"));
192192
assert_eq!(recid.to_i32(), i, "Mismatch after creating from valid i32");
193193
}
194194

crates/rust-eigenda-v2-client/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ exclude = [
1616

1717
[dependencies]
1818
rust-eigenda-signers = { version = "0.1.6" }
19-
rust-eigenda-v2-common = "0.1.3"
19+
#rust-eigenda-v2-common = "0.1.3"
20+
rust-eigenda-v2-common = { path = "../rust-eigenda-v2-common" }
2021

2122
rand = { workspace = true }
2223
bytes = { workspace = true }

crates/rust-eigenda-v2-client/src/cert_verifier.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,7 @@ impl CertVerifier {
138138
CheckDACertStatus::Success => {}
139139
status => {
140140
return Err(CertVerifierError::VerificationFailed(format!(
141-
"check_da_cert returned non-succesfull value: {:?}",
142-
status
141+
"check_da_cert returned non-succesfull value: {status:?}"
143142
)));
144143
}
145144
}

crates/rust-eigenda-v2-client/src/core/eigenda_cert.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ impl TryFrom<ProtoBlobHeader> for BlobHeader {
6565
let mut quorum_numbers: Vec<u8> = Vec::new();
6666
for number in value.quorum_numbers.iter() {
6767
quorum_numbers.push((*number).try_into().map_err(|_| {
68-
ConversionError::BlobHeader(format!("Invalid quorum number {}", number))
68+
ConversionError::BlobHeader(format!("Invalid quorum number {number}"))
6969
})?);
7070
}
7171

0 commit comments

Comments
 (0)