Skip to content

Commit 7aa4592

Browse files
committed
trim deps
1 parent 0948b31 commit 7aa4592

File tree

7 files changed

+11
-29
lines changed

7 files changed

+11
-29
lines changed

Cargo.lock

Lines changed: 0 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,12 @@ serde_json = "1.0.85"
6666
# misc
6767
eyre = "0.6.8"
6868
hex = "0.4.3"
69-
bytes = "1.5"
7069
toml = "0.5.9"
7170
tracing = "0.1.37"
7271
chrono = "0.4.23"
7372
thiserror = "1.0.37"
7473
superstruct = "0.7.0"
7574
openssl = { version = "0.10", features = ["vendored"] }
76-
hyper = "1.3.1"
7775
zduny-wasm-timer = "0.2.8"
7876
retri = "0.1.0"
7977
typenum = "1.17.0"

common/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,4 @@ superstruct.workspace = true
1313
thiserror.workspace = true
1414
tracing.workspace = true
1515
zduny-wasm-timer.workspace = true
16-
bytes.workspace = true
1716
milagro_bls.workspace = true

consensus-core/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,12 @@ tree_hash.workspace = true
1313
typenum.workspace = true
1414
sha2.workspace = true
1515
eyre.workspace = true
16-
hex.workspace = true
1716
serde.workspace = true
1817
serde_json.workspace = true
1918
superstruct.workspace = true
2019
thiserror.workspace = true
2120
tracing.workspace = true
2221
zduny-wasm-timer.workspace = true
23-
bytes.workspace = true
2422
milagro_bls.workspace = true
2523

2624
common = { path = "../common" }
Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
use serde::{Deserialize, Serialize};
22
use ssz_derive::{Decode, Encode};
3-
use ssz_types::{FixedVector, VariableList};
3+
use ssz_types::{
4+
serde_utils::{hex_fixed_vec, hex_var_list},
5+
FixedVector, VariableList,
6+
};
47
use tree_hash_derive::TreeHash;
58

69
#[derive(Debug, Clone, Default, Encode, Decode, TreeHash)]
@@ -20,11 +23,8 @@ impl<'de, N: typenum::Unsigned> serde::Deserialize<'de> for ByteVector<N> {
2023
where
2124
D: serde::Deserializer<'de>,
2225
{
23-
let bytes: String = serde::Deserialize::deserialize(deserializer)?;
24-
let bytes = hex::decode(bytes.strip_prefix("0x").unwrap()).unwrap();
25-
Ok(Self {
26-
inner: bytes.into(),
27-
})
26+
let inner = hex_fixed_vec::deserialize(deserializer)?;
27+
Ok(Self { inner })
2828
}
2929
}
3030

@@ -33,8 +33,7 @@ impl<N: typenum::Unsigned> Serialize for ByteVector<N> {
3333
where
3434
S: serde::Serializer,
3535
{
36-
let hex_string = format!("0x{}", hex::encode(self.inner.to_vec()));
37-
serializer.serialize_str(&hex_string)
36+
hex_fixed_vec::serialize(&self.inner, serializer)
3837
}
3938
}
4039

@@ -43,11 +42,8 @@ impl<'de, N: typenum::Unsigned> Deserialize<'de> for ByteList<N> {
4342
where
4443
D: serde::Deserializer<'de>,
4544
{
46-
let bytes: String = Deserialize::deserialize(deserializer)?;
47-
let bytes = hex::decode(bytes.strip_prefix("0x").unwrap()).unwrap();
48-
Ok(Self {
49-
inner: bytes.into(),
50-
})
45+
let inner = hex_var_list::deserialize(deserializer)?;
46+
Ok(Self { inner })
5147
}
5248
}
5349

@@ -56,7 +52,6 @@ impl<N: typenum::Unsigned> serde::Serialize for ByteList<N> {
5652
where
5753
S: serde::Serializer,
5854
{
59-
let hex_string = format!("0x{}", hex::encode(self.inner.to_vec()));
60-
serializer.serialize_str(&hex_string)
55+
hex_var_list::serialize(&self.inner, serializer)
6156
}
6257
}

consensus/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ serde_json.workspace = true
2222
alloy.workspace = true
2323
eyre.workspace = true
2424
hex.workspace = true
25-
bytes.workspace = true
2625
tracing.workspace = true
2726
chrono.workspace = true
2827
thiserror.workspace = true

execution/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,9 @@ serde_json.workspace = true
2222
# misc
2323
eyre.workspace = true
2424
hex.workspace = true
25-
bytes.workspace = true
2625
tracing.workspace = true
2726
thiserror.workspace = true
28-
hyper.workspace = true
27+
#hyper.workspace = true
2928

3029
consensus = { path = "../consensus" }
3130
common = { path = "../common" }

0 commit comments

Comments
 (0)