diff --git a/Cargo.lock b/Cargo.lock index 14cf961f..b9b6dfb2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -155,6 +155,8 @@ dependencies = [ "alloy-serde", "c-kzg", "derive_more", + "ethereum_ssz", + "ethereum_ssz_derive", "k256", "once_cell", "serde", @@ -241,6 +243,7 @@ dependencies = [ "cfg-if", "const-hex", "derive_more", + "ethereum_ssz", "hex-literal", "itoa", "k256", @@ -360,12 +363,29 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c31a3750b8f5a350d17354e46a52b0f2f19ec5f2006d816935af599dedc521" dependencies = [ + "alloy-rpc-types-beacon", "alloy-rpc-types-engine", "alloy-rpc-types-eth", "alloy-serde", "serde", ] +[[package]] +name = "alloy-rpc-types-beacon" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8a24bcff4f9691d7a4971b43e5da46aa7b4ce22ed7789796612dc1eed220983" +dependencies = [ + "alloy-eips", + "alloy-primitives", + "alloy-rpc-types-engine", + "ethereum_ssz", + "ethereum_ssz_derive", + "serde", + "serde_with", + "thiserror", +] + [[package]] name = "alloy-rpc-types-engine" version = "0.2.1" @@ -378,6 +398,8 @@ dependencies = [ "alloy-rlp", "alloy-rpc-types-eth", "alloy-serde", + "ethereum_ssz", + "ethereum_ssz_derive", "jsonwebtoken", "rand 0.8.5", "serde", @@ -468,7 +490,7 @@ dependencies = [ "alloy-sol-macro-input", "const-hex", "heck 0.5.0", - "indexmap", + "indexmap 2.2.6", "proc-macro-error", "proc-macro2", "quote", @@ -1148,6 +1170,7 @@ dependencies = [ "iana-time-zone", "js-sys", "num-traits", + "serde", "wasm-bindgen", "windows-targets 0.52.6", ] @@ -1584,8 +1607,18 @@ version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c" dependencies = [ - "darling_core", - "darling_macro", + "darling_core 0.13.4", + "darling_macro 0.13.4", +] + +[[package]] +name = "darling" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" +dependencies = [ + "darling_core 0.20.10", + "darling_macro 0.20.10", ] [[package]] @@ -1602,17 +1635,42 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "darling_core" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim 0.11.1", + "syn 2.0.72", +] + [[package]] name = "darling_macro" version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" dependencies = [ - "darling_core", + "darling_core 0.13.4", "quote", "syn 1.0.109", ] +[[package]] +name = "darling_macro" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" +dependencies = [ + "darling_core 0.20.10", + "quote", + "syn 2.0.72", +] + [[package]] name = "dashmap" version = "5.5.3" @@ -1620,7 +1678,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" dependencies = [ "cfg-if", - "hashbrown", + "hashbrown 0.14.5", "lock_api", "once_cell", "parking_lot_core", @@ -1649,6 +1707,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" dependencies = [ "powerfmt", + "serde", ] [[package]] @@ -1872,25 +1931,75 @@ checksum = "32cfe1c169414b709cf28aa30c74060bdb830a03a8ba473314d079ac79d80a5f" dependencies = [ "crunchy", "fixed-hash 0.5.2", - "impl-rlp", + "impl-rlp 0.2.1", "impl-serde 0.2.3", "tiny-keccak 1.5.0", ] +[[package]] +name = "ethbloom" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" +dependencies = [ + "crunchy", + "fixed-hash 0.8.0", + "impl-rlp 0.3.0", + "impl-serde 0.4.0", + "tiny-keccak 2.0.2", +] + [[package]] name = "ethereum-types" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba744248e3553a393143d5ebb68939fc3a4ec0c22a269682535f5ffe7fed728c" dependencies = [ - "ethbloom", + "ethbloom 0.8.1", "fixed-hash 0.5.2", - "impl-rlp", + "impl-rlp 0.2.1", "impl-serde 0.2.3", "primitive-types 0.6.2", "uint 0.8.5", ] +[[package]] +name = "ethereum-types" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" +dependencies = [ + "ethbloom 0.13.0", + "fixed-hash 0.8.0", + "impl-rlp 0.3.0", + "impl-serde 0.4.0", + "primitive-types 0.12.2", + "uint 0.9.5", +] + +[[package]] +name = "ethereum_ssz" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d3627f83d8b87b432a5fad9934b4565260722a141a2c40f371f8080adec9425" +dependencies = [ + "ethereum-types 0.14.1", + "itertools 0.10.5", + "smallvec", +] + +[[package]] +name = "ethereum_ssz_derive" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eccd5378ec34a07edd3d9b48088cbc63309d0367d14ba10b0cdb1d1791080ea" +dependencies = [ + "darling 0.13.4", + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "event-listener" version = "2.5.3" @@ -2376,7 +2485,7 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.12", - "indexmap", + "indexmap 2.2.6", "slab", "tokio", "tokio-util", @@ -2395,7 +2504,7 @@ dependencies = [ "futures-core", "futures-sink", "http 1.1.0", - "indexmap", + "indexmap 2.2.6", "slab", "tokio", "tokio-util", @@ -2418,6 +2527,12 @@ version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d23bd4e7b5eda0d0f3a307e8b381fdc8ba9000f26fbe912250c0a4cc3956364a" +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + [[package]] name = "hashbrown" version = "0.14.5" @@ -2781,6 +2896,15 @@ dependencies = [ "rlp 0.4.6", ] +[[package]] +name = "impl-rlp" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f28220f89297a075ddc7245cd538076ee98b01f2a9c23a53a4f1105d5a322808" +dependencies = [ + "rlp 0.5.2", +] + [[package]] name = "impl-serde" version = "0.2.3" @@ -2799,6 +2923,15 @@ dependencies = [ "serde", ] +[[package]] +name = "impl-serde" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc88fc67028ae3db0c853baa36269d398d5f45b6982f95549ff5def78c935cd" +dependencies = [ + "serde", +] + [[package]] name = "impl-trait-for-tuples" version = "0.2.2" @@ -2816,6 +2949,17 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", + "serde", +] + [[package]] name = "indexmap" version = "2.2.6" @@ -2823,7 +2967,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ "equivalent", - "hashbrown", + "hashbrown 0.14.5", + "serde", ] [[package]] @@ -3108,7 +3253,7 @@ name = "keccak-hasher" version = "0.1.1" source = "git+https://github.com/openethereum/parity-ethereum?rev=55c90d4016505317034e3e98f699af07f5404b63#55c90d4016505317034e3e98f699af07f5404b63" dependencies = [ - "ethereum-types", + "ethereum-types 0.8.0", "hash-db", "plain_hasher", "tiny-keccak 1.5.0", @@ -3198,7 +3343,7 @@ version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37ee39891760e7d94734f6f63fedc29a2e4a152f836120753a72503f09fcf904" dependencies = [ - "hashbrown", + "hashbrown 0.14.5", ] [[package]] @@ -3787,7 +3932,7 @@ checksum = "e4336f4f5d5524fa60bcbd6fe626f9223d8142a50e7053e979acdf0da41ab975" dependencies = [ "fixed-hash 0.5.2", "impl-codec 0.4.2", - "impl-rlp", + "impl-rlp 0.2.1", "impl-serde 0.3.2", "uint 0.8.5", ] @@ -3800,6 +3945,8 @@ checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" dependencies = [ "fixed-hash 0.8.0", "impl-codec 0.6.0", + "impl-rlp 0.3.0", + "impl-serde 0.4.0", "uint 0.9.5", ] @@ -4195,7 +4342,7 @@ dependencies = [ "cfg-if", "dyn-clone", "enumn", - "hashbrown", + "hashbrown 0.14.5", "hex", "kzg-rs", "serde", @@ -4279,6 +4426,7 @@ dependencies = [ "ark-ff 0.3.0", "ark-ff 0.4.2", "bytes", + "ethereum_ssz", "fastrlp", "num-bigint", "num-traits", @@ -4660,7 +4808,7 @@ version = "1.0.120" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" dependencies = [ - "indexmap", + "indexmap 2.2.6", "itoa", "ryu", "serde", @@ -4687,13 +4835,43 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_with" +version = "3.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee80b0e361bbf88fd2f6e242ccd19cfda072cb0faa6ae694ecee08199938569a" +dependencies = [ + "base64 0.21.7", + "chrono", + "hex", + "indexmap 1.9.3", + "indexmap 2.2.6", + "serde", + "serde_derive", + "serde_json", + "serde_with_macros", + "time", +] + +[[package]] +name = "serde_with_macros" +version = "3.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6561dc161a9224638a31d876ccdfefbc1df91d3f3a8342eddb35f055d48c7655" +dependencies = [ + "darling 0.20.10", + "proc-macro2", + "quote", + "syn 2.0.72", +] + [[package]] name = "serde_yaml" version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ - "indexmap", + "indexmap 2.2.6", "itoa", "ryu", "serde", @@ -4981,7 +5159,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f4e1f478a7728f8855d7e620e9a152cf8932c6614f86564c886f9b8141f3201" dependencies = [ - "darling", + "darling 0.13.4", "itertools 0.10.5", "proc-macro2", "quote", @@ -5310,7 +5488,7 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap", + "indexmap 2.2.6", "toml_datetime", "winnow 0.5.40", ] @@ -5321,7 +5499,7 @@ version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" dependencies = [ - "indexmap", + "indexmap 2.2.6", "toml_datetime", "winnow 0.5.40", ] @@ -5332,7 +5510,7 @@ version = "0.22.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "278f3d518e152219c994ce877758516bca5e118eaed6996192a774fb9fbf0788" dependencies = [ - "indexmap", + "indexmap 2.2.6", "serde", "serde_spanned", "toml_datetime", @@ -5465,7 +5643,7 @@ name = "triehash-ethereum" version = "0.2.0" source = "git+https://github.com/openethereum/parity-ethereum?rev=55c90d4016505317034e3e98f699af07f5404b63#55c90d4016505317034e3e98f699af07f5404b63" dependencies = [ - "ethereum-types", + "ethereum-types 0.8.0", "keccak-hasher", "triehash", ] diff --git a/Cargo.toml b/Cargo.toml index 20cae321..bffede43 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,6 +37,7 @@ alloy = { version = "0.2.1", features = [ "provider-http", "sol-types", "network", + "ssz", ]} revm = { version = "12.1.0", default-features = false, features = [ "std", diff --git a/common/Cargo.toml b/common/Cargo.toml index d8773c2c..a76ea2ef 100644 --- a/common/Cargo.toml +++ b/common/Cargo.toml @@ -4,7 +4,7 @@ version = "0.5.5" edition = "2021" [dependencies] -alloy.workspace = true +alloy = { version = "0.2.1", features = ["rpc-types"] } eyre.workspace = true serde.workspace = true hex.workspace = true diff --git a/consensus-core/Cargo.toml b/consensus-core/Cargo.toml index e4f86607..150f90e8 100644 --- a/consensus-core/Cargo.toml +++ b/consensus-core/Cargo.toml @@ -4,7 +4,7 @@ name = "consensus-core" edition = "2021" [dependencies] -alloy.workspace = true +alloy = { version = "0.2.1", features = ["consensus", "rpc-types", "ssz", "rlp", "k256"] } eyre.workspace = true ssz-rs.workspace = true hex.workspace = true