From 7c9244db89946495efffd05bf50f9a99f1421b23 Mon Sep 17 00:00:00 2001 From: Joseph Livesey Date: Wed, 11 Dec 2024 18:11:10 -0500 Subject: [PATCH] build: update dependencies --- Cargo.lock | 462 ++++++++++-------- Cargo.toml | 11 +- crates/decoder/Cargo.toml | 1 - crates/firehose-protos/Cargo.toml | 1 + .../src/ethereum_v2/eth_block.rs | 12 +- crates/firehose-protos/src/ethereum_v2/log.rs | 3 +- .../src/ethereum_v2/transaction.rs | 45 +- 7 files changed, 293 insertions(+), 242 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5e4167a0..50d1e18c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -96,9 +96,9 @@ dependencies = [ [[package]] name = "alloy-chains" -version = "0.1.49" +version = "0.1.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830045a4421ee38d3ab570d36d4d2b5152c066e72797139224da8de5d5981fd0" +checksum = "d4e0f0136c085132939da6b753452ebed4efaa73fe523bb855b10c199c2ebfaf" dependencies = [ "alloy-primitives", "num_enum", @@ -124,40 +124,42 @@ dependencies = [ [[package]] name = "alloy-consensus" -version = "0.8.3" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e88e1edea70787c33e11197d3f32ae380f3db19e6e061e539a5bcf8184a6b326" +checksum = "d802a6d579d924a2926d181bce43231aaab4699a7c206197e88fbc6b9dda846f" dependencies = [ - "alloy-eips 0.8.3", + "alloy-eips 0.9.1", "alloy-primitives", "alloy-rlp", - "alloy-serde 0.8.3", + "alloy-serde 0.9.1", "alloy-trie", + "arbitrary", "auto_impl", "c-kzg", "derive_more", + "rand", "serde", ] [[package]] name = "alloy-consensus-any" -version = "0.8.3" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57b1bb53f40c0273cd1975573cd457b39213e68584e36d1401d25fd0398a1d65" +checksum = "24b1bcb3e4810bff7e2a62ac0d741c70a7b5560e57b76eb0f0d33e1070735c60" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus 0.9.1", + "alloy-eips 0.9.1", "alloy-primitives", "alloy-rlp", - "alloy-serde 0.8.3", + "alloy-serde 0.9.1", "serde", ] [[package]] name = "alloy-core" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c618bd382f0bc2ac26a7e4bfae01c9b015ca8f21b37ca40059ae35a7e62b3dc6" +checksum = "5e3fdddfc89197319b1be19875a70ced62a72bebb67e2276dad688cd59f40e70" dependencies = [ "alloy-dyn-abi", "alloy-json-abi", @@ -168,9 +170,9 @@ dependencies = [ [[package]] name = "alloy-dyn-abi" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41056bde53ae10ffbbf11618efbe1e0290859e5eab0fe9ef82ebdb62f12a866f" +checksum = "b0d2ea4d7f220a19c1f8c98822026d1d26a4b75a72e1a7308d02bab1f77c9a00" dependencies = [ "alloy-json-abi", "alloy-primitives", @@ -191,6 +193,8 @@ checksum = "0069cf0642457f87a01a014f6dc29d5d893cd4fd8fddf0c3cdfad1bb3ebafc41" dependencies = [ "alloy-primitives", "alloy-rlp", + "arbitrary", + "rand", "serde", ] @@ -207,14 +211,16 @@ dependencies = [ [[package]] name = "alloy-eip7702" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c986539255fb839d1533c128e190e557e52ff652c9ef62939e233a81dd93f7e" +checksum = "cabf647eb4650c91a9d38cb6f972bb320009e7e9d61765fb688a86f1563b33e8" dependencies = [ "alloy-primitives", "alloy-rlp", + "arbitrary", "derive_more", "k256", + "rand", "serde", ] @@ -238,15 +244,16 @@ dependencies = [ [[package]] name = "alloy-eips" -version = "0.8.3" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f9fadfe089e9ccc0650473f2d4ef0a28bc015bbca5631d9f0f09e49b557fdb3" +checksum = "938bc1cf2ec42579e187834efc254e76dd3fa19f526b57872713e6b95f411305" dependencies = [ "alloy-eip2930", - "alloy-eip7702 0.4.2", + "alloy-eip7702 0.5.0", "alloy-primitives", "alloy-rlp", - "alloy-serde 0.8.3", + "alloy-serde 0.9.1", + "arbitrary", "c-kzg", "derive_more", "once_cell", @@ -267,21 +274,22 @@ dependencies = [ [[package]] name = "alloy-genesis" -version = "0.8.3" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b2a4cf7b70f3495788e74ce1c765260ffe38820a2a774ff4aacb62e31ea73f9" +checksum = "b648eac186485ead3da160985b929e610a45eb39903f750da9b35f58a91eef52" dependencies = [ + "alloy-eips 0.9.1", "alloy-primitives", - "alloy-serde 0.8.3", + "alloy-serde 0.9.1", "alloy-trie", "serde", ] [[package]] name = "alloy-json-abi" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c357da577dfb56998d01f574d81ad7a1958d248740a7981b205d69d65a7da404" +checksum = "e79c6b4bcc1067a7394b5b2aec7da1bd829c8c476b796c73eb14da34392a07a7" dependencies = [ "alloy-primitives", "alloy-sol-type-parser", @@ -291,33 +299,33 @@ dependencies = [ [[package]] name = "alloy-json-rpc" -version = "0.8.3" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e29040b9d5fe2fb70415531882685b64f8efd08dfbd6cc907120650504821105" +checksum = "a1a38b4b49667a84ecad7cdaf431b8bd3f14ca496e5a021df1c26d5c4595dca6" dependencies = [ "alloy-primitives", "alloy-sol-types", "serde", "serde_json", - "thiserror 2.0.8", + "thiserror 2.0.9", "tracing", ] [[package]] name = "alloy-network" -version = "0.8.3" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "510cc00b318db0dfccfdd2d032411cfae64fc144aef9679409e014145d3dacc4" +checksum = "4fb5dc326960e88eec6b5e9add221a071f15cb8fa93b9e88ee9c76cd0e4e1009" dependencies = [ - "alloy-consensus 0.8.3", + "alloy-consensus 0.9.1", "alloy-consensus-any", - "alloy-eips 0.8.3", + "alloy-eips 0.9.1", "alloy-json-rpc", - "alloy-network-primitives 0.8.3", + "alloy-network-primitives 0.9.1", "alloy-primitives", "alloy-rpc-types-any", - "alloy-rpc-types-eth 0.8.3", - "alloy-serde 0.8.3", + "alloy-rpc-types-eth 0.9.1", + "alloy-serde 0.9.1", "alloy-signer", "alloy-sol-types", "async-trait", @@ -325,7 +333,7 @@ dependencies = [ "futures-utils-wasm", "serde", "serde_json", - "thiserror 2.0.8", + "thiserror 2.0.9", ] [[package]] @@ -343,27 +351,29 @@ dependencies = [ [[package]] name = "alloy-network-primitives" -version = "0.8.3" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9081c099e798b8a2bba2145eb82a9a146f01fc7a35e9ab6e7b43305051f97550" +checksum = "1535c89ae0648f2c15c0bf9b8b92670f6b3b8515b645425c8b46462563c0eae4" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus 0.9.1", + "alloy-eips 0.9.1", "alloy-primitives", - "alloy-serde 0.8.3", + "alloy-serde 0.9.1", "serde", ] [[package]] name = "alloy-primitives" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6259a506ab13e1d658796c31e6e39d2e2ee89243bcc505ddc613b35732e0a430" +checksum = "0540fd0355d400b59633c27bd4b42173e59943f28e9d3376b77a24771d432d04" dependencies = [ "alloy-rlp", + "arbitrary", "bytes", "cfg-if", "const-hex", + "derive_arbitrary", "derive_more", "foldhash", "getrandom", @@ -375,6 +385,7 @@ dependencies = [ "keccak-asm", "paste", "proptest", + "proptest-derive", "rand", "ruint", "rustc-hash 2.1.0", @@ -402,7 +413,7 @@ checksum = "5a833d97bf8a5f0f878daf2c8451fff7de7f9de38baa5a45d936ec718d81255a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -419,25 +430,25 @@ dependencies = [ [[package]] name = "alloy-rpc-types" -version = "0.8.3" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3410a472ce26c457e9780f708ee6bd540b30f88f1f31fdab7a11d00bd6aa1aee" +checksum = "206749723862bd27d5468270e30fc987c5b4376240aefee728d7e64282c9d146" dependencies = [ "alloy-primitives", - "alloy-rpc-types-eth 0.8.3", - "alloy-serde 0.8.3", + "alloy-rpc-types-eth 0.9.1", + "alloy-serde 0.9.1", "serde", ] [[package]] name = "alloy-rpc-types-any" -version = "0.8.3" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed98e1af55a7d856bfa385f30f63d8d56be2513593655c904a8f4a7ec963aa3e" +checksum = "5e6ff23d7bde6ddeea4c1ca98e7a5a728326d543bd7133735c04ea83ebde41d0" dependencies = [ "alloy-consensus-any", - "alloy-rpc-types-eth 0.8.3", - "alloy-serde 0.8.3", + "alloy-rpc-types-eth 0.9.1", + "alloy-serde 0.9.1", ] [[package]] @@ -461,22 +472,22 @@ dependencies = [ [[package]] name = "alloy-rpc-types-eth" -version = "0.8.3" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8737d7a6e37ca7bba9c23e9495c6534caec6760eb24abc9d5ffbaaba147818e1" +checksum = "319a0ca31863bd6fb9aafeaa16425d0a2f1228da44bc24fd2f997ba50afe7e18" dependencies = [ - "alloy-consensus 0.8.3", + "alloy-consensus 0.9.1", "alloy-consensus-any", - "alloy-eips 0.8.3", - "alloy-network-primitives 0.8.3", + "alloy-eips 0.9.1", + "alloy-network-primitives 0.9.1", "alloy-primitives", "alloy-rlp", - "alloy-serde 0.8.3", + "alloy-serde 0.9.1", "alloy-sol-types", - "derive_more", "itertools 0.13.0", "serde", "serde_json", + "thiserror 2.0.9", ] [[package]] @@ -492,48 +503,49 @@ dependencies = [ [[package]] name = "alloy-serde" -version = "0.8.3" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5851bf8d5ad33014bd0c45153c603303e730acc8a209450a7ae6b4a12c2789e2" +checksum = "81537867986734e5867a9131145bdc56301f5b37ef9c9fb4654d7f7691a4015d" dependencies = [ "alloy-primitives", + "arbitrary", "serde", "serde_json", ] [[package]] name = "alloy-signer" -version = "0.8.3" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e10ca565da6500cca015ba35ee424d59798f2e1b85bc0dd8f81dafd401f029a" +checksum = "0fdcbfe7079c877b3cb6ec43017e94f66432480f1c1779f736c064e6a8d422cc" dependencies = [ "alloy-primitives", "async-trait", "auto_impl", "elliptic-curve", "k256", - "thiserror 2.0.8", + "thiserror 2.0.9", ] [[package]] name = "alloy-sol-macro" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9d64f851d95619233f74b310f12bcf16e0cbc27ee3762b6115c14a84809280a" +checksum = "c6d1a14b4a9f6078ad9132775a2ebb465b06b387d60f7413ddc86d7bf7453408" dependencies = [ "alloy-sol-macro-expander", "alloy-sol-macro-input", "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] name = "alloy-sol-macro-expander" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bf7ed1574b699f48bf17caab4e6e54c6d12bc3c006ab33d58b1e227c1c3559f" +checksum = "4436b4b96d265eb17daea26eb31525c3076d024d10901e446790afbd2f7eeaf5" dependencies = [ "alloy-sol-macro-input", "const-hex", @@ -542,31 +554,31 @@ dependencies = [ "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", "syn-solidity", "tiny-keccak", ] [[package]] name = "alloy-sol-macro-input" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c02997ccef5f34f9c099277d4145f183b422938ed5322dc57a089fe9b9ad9ee" +checksum = "e5f58698a18b96faa8513519de112b79a96010b4ff84264ce54a217c52a8e98b" dependencies = [ "const-hex", "dunce", "heck", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", "syn-solidity", ] [[package]] name = "alloy-sol-type-parser" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce13ff37285b0870d0a0746992a4ae48efaf34b766ae4c2640fa15e5305f8e73" +checksum = "1f3d6d2c490f650c5abd65a9a583b09a8c8931c265d3a55b18a8e349dd6d9d84" dependencies = [ "serde", "winnow", @@ -574,9 +586,9 @@ dependencies = [ [[package]] name = "alloy-sol-types" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1174cafd6c6d810711b4e00383037bdb458efc4fe3dbafafa16567e0320c54d8" +checksum = "c766e4979fc19d70057150befe8e3ea3f0c4cbc6839b8eaaa250803451692305" dependencies = [ "alloy-json-abi", "alloy-primitives", @@ -587,9 +599,9 @@ dependencies = [ [[package]] name = "alloy-trie" -version = "0.7.6" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a5fd8fea044cc9a8c8a50bb6f28e31f0385d820f116c5b98f6f4e55d6e5590b" +checksum = "6917c79e837aa7b77b7a6dae9f89cbe15313ac161c4d3cfaf8909ef21f3d22d8" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -673,9 +685,18 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.94" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1fd03a028ef38ba2276dce7e33fcd6369c158a1bca17946c4b1b701891c1ff7" +checksum = "34ac096ce696dc2fcabef30516bb13c0a68a11d30131d3df6f04711467681b04" + +[[package]] +name = "arbitrary" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dde20b3d026af13f561bdd0f15edf01fc734f0dafcedbaf42bba506a9517f223" +dependencies = [ + "derive_arbitrary", +] [[package]] name = "ark-ff" @@ -829,7 +850,7 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -840,7 +861,7 @@ checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -857,7 +878,7 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -879,16 +900,15 @@ dependencies = [ [[package]] name = "aws-lc-sys" -version = "0.24.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8478a5c29ead3f3be14aff8a202ad965cf7da6856860041bfca271becf8ba48b" +checksum = "923ded50f602b3007e5e63e3f094c479d9c8a9b42d7f4034e4afe456aa48bfd2" dependencies = [ "bindgen", "cc", "cmake", "dunce", "fs_extra", - "libc", "paste", ] @@ -1018,7 +1038,7 @@ dependencies = [ "regex", "rustc-hash 1.1.0", "shlex", - "syn 2.0.90", + "syn 2.0.94", "which", ] @@ -1152,9 +1172,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.2.5" +version = "1.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31a0499c1dc64f458ad13872de75c0eb7e3fdb0e67964610c914b034fc5956e" +checksum = "8d6dbb628b8f8555f86d0323c2eb39e3ec81901f4b83e091db8a6a76d316a333" dependencies = [ "jobserver", "libc", @@ -1273,7 +1293,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -1558,7 +1578,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -1606,7 +1626,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.11.1", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -1628,14 +1648,14 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core 0.20.10", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] name = "decoder" version = "0.1.0" dependencies = [ - "alloy-consensus 0.8.3", + "alloy-consensus 0.9.1", "alloy-eip2930", "alloy-primitives", "bincode", @@ -1644,10 +1664,9 @@ dependencies = [ "firehose-protos", "prost", "rand", - "reth-primitives", "serde", "serde_json", - "thiserror 2.0.8", + "thiserror 2.0.9", "tracing", "tracing-subscriber", "zstd", @@ -1694,6 +1713,17 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "derive_arbitrary" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.94", +] + [[package]] name = "derive_more" version = "1.0.0" @@ -1712,7 +1742,7 @@ dependencies = [ "convert_case", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", "unicode-xid", ] @@ -1775,7 +1805,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -1889,7 +1919,7 @@ checksum = "2f9ed6b3789237c8a0c1c505af1c7eb2c560df6186f01b098c3a1064ea532f38" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -1986,13 +2016,13 @@ dependencies = [ "darling 0.20.10", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] name = "ethportal-api" version = "0.4.0" -source = "git+https://github.com/ethereum/trin.git#8e2dd0dc3588cd4eb1d860d80fb4967326bbc0af" +source = "git+https://github.com/ethereum/trin.git#5ae01c3ad2c69b4b003e0c206a961f2cf09f3be9" dependencies = [ "alloy", "alloy-rlp", @@ -2093,7 +2123,7 @@ dependencies = [ "http", "once_cell", "rustls", - "thiserror 2.0.8", + "thiserror 2.0.9", "tokio", "tokio-stream", "tonic", @@ -2104,10 +2134,11 @@ dependencies = [ name = "firehose-protos" version = "0.1.0" dependencies = [ - "alloy-consensus 0.8.3", + "alloy-consensus 0.9.1", "alloy-eip2930", "alloy-primitives", "alloy-rlp", + "alloy-trie", "ethportal-api", "firehose-rs", "prost", @@ -2117,7 +2148,7 @@ dependencies = [ "reth-primitives", "serde", "serde_json", - "thiserror 2.0.8", + "thiserror 2.0.9", "tokio", "tonic", "tonic-build", @@ -2265,7 +2296,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -2367,9 +2398,9 @@ dependencies = [ [[package]] name = "glob" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" +checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" [[package]] name = "gloo-net" @@ -2507,7 +2538,7 @@ dependencies = [ "serde", "serde_json", "tempfile", - "thiserror 2.0.8", + "thiserror 2.0.9", "tracing", "tree_hash", "trin-validation", @@ -2828,7 +2859,7 @@ checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -2892,7 +2923,7 @@ checksum = "a0eb5a3343abf848c0984fe4604b2b105da9539376e24fc0a3b0007411ae4fd9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -2912,6 +2943,7 @@ version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f" dependencies = [ + "arbitrary", "equivalent", "hashbrown 0.15.2", "serde", @@ -3135,7 +3167,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -3535,7 +3567,7 @@ checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -3549,9 +3581,9 @@ dependencies = [ [[package]] name = "nybbles" -version = "0.2.1" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95f06be0417d97f81fe4e5c86d7d01b392655a9cac9c19a848aa033e18937b23" +checksum = "a3409fc85ac27b27d971ea7cd1aabafd2eefa6de7e481c8d4f707225c117e81a" dependencies = [ "alloy-rlp", "const-hex", @@ -3562,9 +3594,9 @@ dependencies = [ [[package]] name = "object" -version = "0.36.5" +version = "0.36.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" +checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" dependencies = [ "memchr", ] @@ -3587,32 +3619,33 @@ checksum = "b410bbe7e14ab526a0e86877eb47c6996a2bd7746f027ba551028c925390e4e9" [[package]] name = "op-alloy-consensus" -version = "0.8.5" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c698f80ee53e56d1b60a97e9d90ad09788b516c964c9c97fb5927860b812ef0d" +checksum = "0adb232ec805af3aa35606c19329aa7dc44c4457ae318ed0b8fc7f799dd7dbfe" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus 0.9.1", + "alloy-eips 0.9.1", "alloy-primitives", "alloy-rlp", - "alloy-serde 0.8.3", + "alloy-serde 0.9.1", + "arbitrary", "derive_more", "serde", - "thiserror 2.0.8", + "thiserror 2.0.9", ] [[package]] name = "op-alloy-rpc-types" -version = "0.8.5" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5aef2128fe8979596b3a1f79a2454f3e32fd239889a03d50fe686b9a2f30a16" +checksum = "e68d1a51fe3ee143f102b82f54fa237f21d12635da363276901e6d3ef6c65b7b" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", - "alloy-network-primitives 0.8.3", + "alloy-consensus 0.9.1", + "alloy-eips 0.9.1", + "alloy-network-primitives 0.9.1", "alloy-primitives", - "alloy-rpc-types-eth 0.8.3", - "alloy-serde 0.8.3", + "alloy-rpc-types-eth 0.9.1", + "alloy-serde 0.9.1", "derive_more", "op-alloy-consensus", "serde", @@ -3730,7 +3763,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b7cafe60d6cf8e62e1b9b2ea516a089c008945bb5a275416789e7db0bc199dc" dependencies = [ "memchr", - "thiserror 2.0.8", + "thiserror 2.0.9", "ucd-trie", ] @@ -3761,7 +3794,7 @@ checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -3860,7 +3893,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" dependencies = [ "proc-macro2", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -3926,7 +3959,7 @@ dependencies = [ "proc-macro-error-attr2", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -3958,6 +3991,17 @@ dependencies = [ "unarray", ] +[[package]] +name = "proptest-derive" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ee1c9ac207483d5e7db4940700de86a9aae46ef90c48b57f99fe7edb8345e49" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.94", +] + [[package]] name = "prost" version = "0.13.4" @@ -3984,7 +4028,7 @@ dependencies = [ "prost", "prost-types", "regex", - "syn 2.0.90", + "syn 2.0.94", "tempfile", ] @@ -3998,7 +4042,7 @@ dependencies = [ "itertools 0.13.0", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -4075,9 +4119,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.37" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" +checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" dependencies = [ "proc-macro2", ] @@ -4213,11 +4257,11 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reth-codecs" version = "1.1.4" -source = "git+https://github.com/paradigmxyz/reth#82af17068721ee8e6025b41279a15c55cd2a50b1" +source = "git+https://github.com/paradigmxyz/reth#b69c2ebee05ce5471f4a80c62ea0ebf758c16c99" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", - "alloy-genesis 0.8.3", + "alloy-consensus 0.9.1", + "alloy-eips 0.9.1", + "alloy-genesis 0.9.1", "alloy-primitives", "alloy-trie", "bytes", @@ -4230,18 +4274,18 @@ dependencies = [ [[package]] name = "reth-codecs-derive" version = "1.1.4" -source = "git+https://github.com/paradigmxyz/reth#82af17068721ee8e6025b41279a15c55cd2a50b1" +source = "git+https://github.com/paradigmxyz/reth#b69c2ebee05ce5471f4a80c62ea0ebf758c16c99" dependencies = [ "convert_case", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] name = "reth-ethereum-forks" version = "1.1.4" -source = "git+https://github.com/paradigmxyz/reth#82af17068721ee8e6025b41279a15c55cd2a50b1" +source = "git+https://github.com/paradigmxyz/reth#b69c2ebee05ce5471f4a80c62ea0ebf758c16c99" dependencies = [ "alloy-chains", "alloy-primitives", @@ -4252,27 +4296,28 @@ dependencies = [ "once_cell", "rustc-hash 2.1.0", "serde", - "thiserror 2.0.8", + "thiserror 2.0.9", ] [[package]] name = "reth-primitives" version = "1.1.4" -source = "git+https://github.com/paradigmxyz/reth#82af17068721ee8e6025b41279a15c55cd2a50b1" +source = "git+https://github.com/paradigmxyz/reth#b69c2ebee05ce5471f4a80c62ea0ebf758c16c99" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", + "alloy-consensus 0.9.1", + "alloy-eips 0.9.1", "alloy-network", "alloy-primitives", "alloy-rlp", - "alloy-rpc-types 0.8.3", - "alloy-serde 0.8.3", + "alloy-rpc-types 0.9.1", + "alloy-serde 0.9.1", "alloy-trie", "bytes", "c-kzg", "derive_more", "modular-bitfield", "once_cell", + "op-alloy-consensus", "op-alloy-rpc-types", "rayon", "reth-codecs", @@ -4289,11 +4334,11 @@ dependencies = [ [[package]] name = "reth-primitives-traits" version = "1.1.4" -source = "git+https://github.com/paradigmxyz/reth#82af17068721ee8e6025b41279a15c55cd2a50b1" +source = "git+https://github.com/paradigmxyz/reth#b69c2ebee05ce5471f4a80c62ea0ebf758c16c99" dependencies = [ - "alloy-consensus 0.8.3", - "alloy-eips 0.8.3", - "alloy-genesis 0.8.3", + "alloy-consensus 0.9.1", + "alloy-eips 0.9.1", + "alloy-genesis 0.9.1", "alloy-primitives", "alloy-rlp", "alloy-trie", @@ -4309,13 +4354,13 @@ dependencies = [ "secp256k1", "serde", "serde_with", - "thiserror 2.0.8", + "thiserror 2.0.9", ] [[package]] name = "reth-static-file-types" version = "1.1.4" -source = "git+https://github.com/paradigmxyz/reth#82af17068721ee8e6025b41279a15c55cd2a50b1" +source = "git+https://github.com/paradigmxyz/reth#b69c2ebee05ce5471f4a80c62ea0ebf758c16c99" dependencies = [ "alloy-primitives", "derive_more", @@ -4326,19 +4371,19 @@ dependencies = [ [[package]] name = "reth-zstd-compressors" version = "1.1.4" -source = "git+https://github.com/paradigmxyz/reth#82af17068721ee8e6025b41279a15c55cd2a50b1" +source = "git+https://github.com/paradigmxyz/reth#b69c2ebee05ce5471f4a80c62ea0ebf758c16c99" dependencies = [ "zstd", ] [[package]] name = "revm-primitives" -version = "14.0.0" +version = "15.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3702f132bb484f4f0d0ca4f6fbde3c82cfd745041abbedd6eda67730e1868ef0" +checksum = "48faea1ecf2c9f80d9b043bbde0db9da616431faed84c4cfa3dd7393005598e6" dependencies = [ "alloy-eip2930", - "alloy-eip7702 0.4.2", + "alloy-eip7702 0.5.0", "alloy-primitives", "auto_impl", "bitflags 2.6.0", @@ -4408,6 +4453,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f5ef8fb1dd8de3870cb8400d51b4c2023854bbafd5431a3ac7e7317243e22d2f" dependencies = [ "alloy-rlp", + "arbitrary", "ark-ff 0.3.0", "ark-ff 0.4.2", "bytes", @@ -4453,7 +4499,7 @@ dependencies = [ "proc-macro2", "quote", "rust-embed-utils", - "syn 2.0.90", + "syn 2.0.94", "walkdir", ] @@ -4622,9 +4668,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.18" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" +checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4" [[package]] name = "rusty-fork" @@ -4772,9 +4818,9 @@ checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0" [[package]] name = "serde" -version = "1.0.216" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b9781016e935a97e8beecf0c933758c97a5520d32930e460142b4cd80c6338e" +checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70" dependencies = [ "serde_derive", ] @@ -4790,20 +4836,20 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.216" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46f859dbbf73865c6627ed570e78961cd3ac92407a2d117204c49232485da55e" +checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] name = "serde_json" -version = "1.0.133" +version = "1.0.134" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" +checksum = "d00f4175c42ee48b15416f6193a959ba3a0d67fc699a0db9ad12df9f83991c7d" dependencies = [ "itoa", "memchr", @@ -4813,9 +4859,9 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.11.0" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e28bdad6db2b8340e449f7108f020b3b092e8583a9e3fb82713e1d4e71fe817" +checksum = "d6b6f7f2fcb69f747921f79f3926bd1e203fce4fef62c268dd3abfb6d86029aa" dependencies = [ "base64 0.22.1", "chrono", @@ -4831,14 +4877,14 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.11.0" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d846214a9854ef724f3da161b426242d8de7c1fc7de2f89bb1efcb154dca79d" +checksum = "8d00caa5193a3c8362ac2b73be6b9e768aa5a4b2f721d8f4b339600c3cb51f8e" dependencies = [ "darling 0.20.10", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -5082,7 +5128,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -5118,9 +5164,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.90" +version = "2.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" +checksum = "987bc0be1cdea8b10216bd06e2ca407d40b9543468fafd3ddfb02f36e77f71f3" dependencies = [ "proc-macro2", "quote", @@ -5129,14 +5175,14 @@ dependencies = [ [[package]] name = "syn-solidity" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "219389c1ebe89f8333df8bdfb871f6631c552ff399c23cac02480b6088aad8f0" +checksum = "c74af950d86ec0f5b2ae2d7f1590bbfbcf4603a0a15742d8f98132ac4fe3efd4" dependencies = [ "paste", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -5153,7 +5199,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -5186,11 +5232,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.8" +version = "2.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f5383f3e0071702bf93ab5ee99b52d26936be9dedd9413067cbdcddcb6141a" +checksum = "f072643fd0190df67a8bab670c20ef5d8737177d6ac6b2e9a236cb096206b2cc" dependencies = [ - "thiserror-impl 2.0.8", + "thiserror-impl 2.0.9", ] [[package]] @@ -5201,18 +5247,18 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] name = "thiserror-impl" -version = "2.0.8" +version = "2.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2f357fcec90b3caef6623a099691be676d033b40a058ac95d2a6ade6fa0c943" +checksum = "7b50fa271071aae2e6ee85f842e2e28ba8cd2c5fb67f11fcb1fd70b276f9e7d4" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -5298,9 +5344,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.8.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" +checksum = "022db8904dfa342efe721985167e9fcd16c29b226db4397ed752a761cfce81e8" dependencies = [ "tinyvec_macros", ] @@ -5337,7 +5383,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -5438,7 +5484,7 @@ dependencies = [ "prost-build", "prost-types", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -5507,7 +5553,7 @@ checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -5582,13 +5628,13 @@ dependencies = [ "darling 0.20.10", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] name = "trin-validation" version = "0.1.0" -source = "git+https://github.com/ethereum/trin.git#8e2dd0dc3588cd4eb1d860d80fb4967326bbc0af" +source = "git+https://github.com/ethereum/trin.git#5ae01c3ad2c69b4b003e0c206a961f2cf09f3be9" dependencies = [ "alloy", "anyhow", @@ -5646,7 +5692,7 @@ checksum = "d9d30226ac9cbd2d1ff775f74e8febdab985dab14fb14aa2582c29a92d5555dc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -5920,7 +5966,7 @@ dependencies = [ "log", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", "wasm-bindgen-shared", ] @@ -5955,7 +6001,7 @@ checksum = "30d7a95b763d3c45903ed6c81f156801839e5ee968bb07e534c44df0fcd330c2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -6121,9 +6167,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.6.20" +version = "0.6.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" +checksum = "e6f5bb5257f2407a5425c6e749bfd9692192a73e70a6060516ac04f889087d68" dependencies = [ "memchr", ] @@ -6169,7 +6215,7 @@ checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", "synstructure", ] @@ -6191,7 +6237,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -6211,7 +6257,7 @@ checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", "synstructure", ] @@ -6232,7 +6278,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] @@ -6254,7 +6300,7 @@ checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.94", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 71de2395..76a541b0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,19 +3,20 @@ members = ["crates/*"] resolver = "2" [workspace.dependencies] -alloy-primitives = "0.8.15" -alloy-consensus = "0.8.3" +alloy-primitives = "0.8.16" +alloy-consensus = "0.9.1" alloy-eip2930 = "0.1.0" alloy-rlp = "0.3.10" +alloy-trie = "0.7.8" base64 = "0.22.1" bincode = "1.3.3" clap = { version = "4.5.23", features = ["derive"] } criterion = { version = "0.5.1", features = ["html_reports"] } ethportal-api = { git = "https://github.com/ethereum/trin.git", version = "0.4.0" } -firehose-protos = { path = "crates/firehose-protos", version = "0.1.0" } +firehose-protos = { path = "crates/firehose-protos" } firehose-rs = { git = "https://github.com/semiotic-ai/firehose-rs.git", branch = "main" } -decoder = { path = "crates/decoder", version = "0.1.0" } -header-accumulator = { path = "crates/header-accumulator", version = "0.1.0" } +decoder = { path = "crates/decoder" } +header-accumulator = { path = "crates/header-accumulator" } prost = "0.13.4" prost-build = "0.13.4" prost-wkt = "0.6.0" diff --git a/crates/decoder/Cargo.toml b/crates/decoder/Cargo.toml index e78c72f5..83eeb71c 100644 --- a/crates/decoder/Cargo.toml +++ b/crates/decoder/Cargo.toml @@ -14,7 +14,6 @@ alloy-eip2930.workspace = true bincode.workspace = true firehose-protos.workspace = true prost.workspace = true -reth-primitives.workspace = true serde = { workspace = true, features = ["derive"] } serde_json.workspace = true thiserror.workspace = true diff --git a/crates/firehose-protos/Cargo.toml b/crates/firehose-protos/Cargo.toml index c92ae2d9..f24e3336 100644 --- a/crates/firehose-protos/Cargo.toml +++ b/crates/firehose-protos/Cargo.toml @@ -13,6 +13,7 @@ alloy-consensus.workspace = true alloy-eip2930.workspace = true alloy-primitives.workspace = true alloy-rlp.workspace = true +alloy-trie.workspace = true ethportal-api.workspace = true firehose-rs.workspace = true prost.workspace = true diff --git a/crates/firehose-protos/src/ethereum_v2/eth_block.rs b/crates/firehose-protos/src/ethereum_v2/eth_block.rs index 43bfbe37..53079300 100644 --- a/crates/firehose-protos/src/ethereum_v2/eth_block.rs +++ b/crates/firehose-protos/src/ethereum_v2/eth_block.rs @@ -2,17 +2,15 @@ // SPDX-License-Identifier: Apache-2.0 use super::{Block, BlockHeader, TransactionReceipt, TransactionTrace}; -use alloy_consensus::Receipt; -use alloy_primitives::{hex, Address, Bloom, FixedBytes, Uint, B256}; +use alloy_consensus::{proofs::calculate_transaction_root, Receipt, ReceiptWithBloom}; +use alloy_primitives::{hex, Address, Bloom, FixedBytes, Log, Uint, B256}; use alloy_rlp::{Encodable, Header as RlpHeader}; +use alloy_trie::root::ordered_trie_root_with_encoder; use ethportal_api::types::execution::header::Header; use firehose_rs::{FromResponse, HasNumberOrSlot, Response, SingleBlockResponse}; use prost::Message; use prost_wkt_types::Any; -use reth_primitives::{ - proofs::{calculate_transaction_root, ordered_trie_root_with_encoder}, - Log, ReceiptWithBloom, TransactionSigned, -}; +use reth_primitives::TransactionSigned; use tracing::error; use crate::error::ProtosError; @@ -288,7 +286,7 @@ impl TryFrom<&TransactionTrace> for FullReceipt { let receipt = Receipt { status: trace.is_success().into(), logs, - cumulative_gas_used: trace_receipt.cumulative_gas_used as u128, + cumulative_gas_used: trace_receipt.cumulative_gas_used, }; let logs_bloom = Bloom::try_from(trace_receipt)?; diff --git a/crates/firehose-protos/src/ethereum_v2/log.rs b/crates/firehose-protos/src/ethereum_v2/log.rs index 3e7d582d..1c48db1a 100644 --- a/crates/firehose-protos/src/ethereum_v2/log.rs +++ b/crates/firehose-protos/src/ethereum_v2/log.rs @@ -1,8 +1,7 @@ // Copyright 2024-, Semiotic AI, Inc. // SPDX-License-Identifier: Apache-2.0 -use alloy_primitives::{hex, Address, Bytes, B256}; -use reth_primitives::LogData; +use alloy_primitives::{hex, Address, Bytes, LogData, B256}; use crate::error::ProtosError; diff --git a/crates/firehose-protos/src/ethereum_v2/transaction.rs b/crates/firehose-protos/src/ethereum_v2/transaction.rs index 950bb056..10bcb02e 100644 --- a/crates/firehose-protos/src/ethereum_v2/transaction.rs +++ b/crates/firehose-protos/src/ethereum_v2/transaction.rs @@ -3,12 +3,12 @@ use std::fmt::Display; -use alloy_consensus::{TxEip1559, TxEip2930, TxLegacy}; +use alloy_consensus::{TxEip1559, TxEip2930, TxLegacy, TxType, TypedTransaction}; use alloy_eip2930::{AccessList, AccessListItem}; use alloy_primitives::{ hex, Address, Bytes, ChainId, FixedBytes, PrimitiveSignature, TxKind, Uint, U128, U256, }; -use reth_primitives::{Transaction, TransactionSigned, TxType}; +use reth_primitives::{Transaction, TransactionSigned}; use tracing::debug; use crate::error::ProtosError; @@ -165,11 +165,11 @@ impl TryFrom<&TransactionTrace> for PrimitiveSignature { // Extract the Y parity from the V value. let odd_y_parity = trace.parity()?; - Ok(PrimitiveSignature::new(r, s, odd_y_parity)) + Ok(Self::new(r, s, odd_y_parity)) } } -impl TryFrom<&TransactionTrace> for reth_primitives::TxType { +impl TryFrom<&TransactionTrace> for TxType { type Error = ProtosError; fn try_from(trace: &TransactionTrace) -> Result { @@ -180,11 +180,11 @@ impl TryFrom<&TransactionTrace> for reth_primitives::TxType { } } -impl TryFrom<&TransactionTrace> for Transaction { +impl TryFrom<&TransactionTrace> for TypedTransaction { type Error = ProtosError; fn try_from(trace: &TransactionTrace) -> Result { - let tx_type = reth_primitives::TxType::try_from(trace)?; + let tx_type = TxType::try_from(trace)?; let nonce = trace.nonce; let gas_price = get_u128_or_default(&trace.gas_price)?; let gas_limit = trace.gas_limit; @@ -192,8 +192,8 @@ impl TryFrom<&TransactionTrace> for Transaction { let value = Uint::from(get_u128_or_default(&trace.value)?); let input = Bytes::copy_from_slice(trace.input.as_slice()); - let transaction: Transaction = match tx_type { - TxType::Legacy => Transaction::Legacy(TxLegacy { + let transaction: TypedTransaction = match tx_type { + TxType::Legacy => Self::Legacy(TxLegacy { chain_id: get_legacy_chain_id(trace), nonce, gas_price, @@ -202,7 +202,7 @@ impl TryFrom<&TransactionTrace> for Transaction { value, input, }), - TxType::Eip2930 => Transaction::Eip2930(TxEip2930 { + TxType::Eip2930 => Self::Eip2930(TxEip2930 { chain_id: CHAIN_ID, nonce, gas_price, @@ -212,7 +212,7 @@ impl TryFrom<&TransactionTrace> for Transaction { access_list: AccessList::try_from(trace)?, input, }), - TxType::Eip1559 => Transaction::Eip1559(TxEip1559 { + TxType::Eip1559 => Self::Eip1559(TxEip1559 { chain_id: CHAIN_ID, nonce, gas_limit, @@ -243,14 +243,21 @@ impl TryFrom<&TransactionTrace> for TransactionSigned { type Error = ProtosError; fn try_from(trace: &TransactionTrace) -> Result { - let transaction = Transaction::try_from(trace)?; + let typed_tx = TypedTransaction::try_from(trace)?; + let transaction = match typed_tx { + TypedTransaction::Legacy(tx) => Transaction::Legacy(tx), + TypedTransaction::Eip2930(tx) => Transaction::Eip2930(tx), + TypedTransaction::Eip1559(tx) => Transaction::Eip1559(tx), + TypedTransaction::Eip4844(tx) => Transaction::Eip4844(tx.into()), + TypedTransaction::Eip7702(tx) => Transaction::Eip7702(tx), + }; let signature = PrimitiveSignature::try_from(trace)?; - let hash = FixedBytes::from_slice(trace.hash.as_slice()).into(); + let hash = FixedBytes::from_slice(trace.hash.as_slice()); Ok(TransactionSigned { transaction, signature, - hash, + hash: hash.into(), }) } } @@ -371,9 +378,9 @@ mod tests { ..Default::default() }; - let tx = Transaction::try_from(&trace).unwrap(); + let tx = TypedTransaction::try_from(&trace).unwrap(); match tx { - Transaction::Legacy(tx) => { + TypedTransaction::Legacy(tx) => { assert_eq!(tx.nonce, 1); assert_eq!(tx.gas_price, 1); assert_eq!(tx.gas_limit, 21000); @@ -384,13 +391,13 @@ mod tests { // EIP-2930 transaction trace.r#type = Type::TrxTypeAccessList as i32; - let tx = Transaction::try_from(&trace).unwrap(); - assert!(matches!(tx, Transaction::Eip2930(_))); + let tx = TypedTransaction::try_from(&trace).unwrap(); + assert!(matches!(tx, TypedTransaction::Eip2930(_))); // EIP-1559 transaction trace.r#type = Type::TrxTypeDynamicFee as i32; - let tx = Transaction::try_from(&trace).unwrap(); - assert!(matches!(tx, Transaction::Eip1559(_))); + let tx = TypedTransaction::try_from(&trace).unwrap(); + assert!(matches!(tx, TypedTransaction::Eip1559(_))); } #[test]