diff --git a/Cargo.lock b/Cargo.lock index 96bbfd9..077286a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "ahash" @@ -22,9 +22,9 @@ checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" [[package]] name = "alloy-chains" -version = "0.1.44" +version = "0.1.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c660915971620592abe2c292c859957eb60e73a60c0eba34a6793eea60512cff" +checksum = "18c5c520273946ecf715c0010b4e3503d7eba9893cd9ce6b7fff5654c4a3c470" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -33,29 +33,16 @@ dependencies = [ "strum", ] -[[package]] -name = "alloy-consensus" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "629b62e38d471cc15fea534eb7283d2f8a4e8bdb1811bcc5d66dda6cfce6fae1" -dependencies = [ - "alloy-eips 0.3.6", - "alloy-primitives", - "alloy-rlp", - "alloy-serde 0.3.6", - "c-kzg", - "serde", -] - [[package]] name = "alloy-consensus" version = "0.5.4" -source = "git+https://github.com/alloy-rs/alloy#b227b17ac08f966be3459c1776bb450d15612fcb" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41ed961a48297c732a5d97ee321aa8bb5009ecadbcb077d8bec90cb54e651629" dependencies = [ - "alloy-eips 0.5.4", + "alloy-eips", "alloy-primitives", "alloy-rlp", - "alloy-serde 0.5.4", + "alloy-serde", "auto_impl", "c-kzg", "derive_more", @@ -94,37 +81,21 @@ dependencies = [ "alloy-primitives", "alloy-rlp", "derive_more", + "k256", "serde", ] -[[package]] -name = "alloy-eips" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f923dd5fca5f67a43d81ed3ebad0880bd41f6dd0ada930030353ac356c54cd0f" -dependencies = [ - "alloy-eip2930", - "alloy-eip7702 0.1.1", - "alloy-primitives", - "alloy-rlp", - "alloy-serde 0.3.6", - "c-kzg", - "derive_more", - "once_cell", - "serde", - "sha2", -] - [[package]] name = "alloy-eips" version = "0.5.4" -source = "git+https://github.com/alloy-rs/alloy#b227b17ac08f966be3459c1776bb450d15612fcb" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b69e06cf9c37be824b9d26d6d101114fdde6af0c87de2828b414c05c4b3daa71" dependencies = [ "alloy-eip2930", "alloy-eip7702 0.3.2", "alloy-primitives", "alloy-rlp", - "alloy-serde 0.5.4", + "alloy-serde", "c-kzg", "derive_more", "once_cell", @@ -134,44 +105,33 @@ dependencies = [ [[package]] name = "alloy-genesis" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a7a18afb0b318616b6b2b0e2e7ac5529d32a966c673b48091c9919e284e6aca" -dependencies = [ - "alloy-primitives", - "alloy-serde 0.3.6", - "serde", -] - -[[package]] -name = "alloy-network-primitives" -version = "0.3.6" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94ad40869867ed2d9cd3842b1e800889e5b49e6b92da346e93862b4a741bedf3" +checksum = "dde15e14944a88bd6a57d325e9a49b75558746fe16aaccc79713ae50a6a9574c" dependencies = [ - "alloy-eips 0.3.6", "alloy-primitives", - "alloy-serde 0.3.6", + "alloy-serde", "serde", ] [[package]] name = "alloy-network-primitives" version = "0.5.4" -source = "git+https://github.com/alloy-rs/alloy#b227b17ac08f966be3459c1776bb450d15612fcb" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "514f70ee2a953db21631cd817b13a1571474ec77ddc03d47616d5e8203489fde" dependencies = [ - "alloy-consensus 0.5.4", - "alloy-eips 0.5.4", + "alloy-consensus", + "alloy-eips", "alloy-primitives", - "alloy-serde 0.5.4", + "alloy-serde", "serde", ] [[package]] name = "alloy-primitives" -version = "0.8.10" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8edae627382349b56cd6a7a2106f4fd69b243a9233e560c55c2e03cabb7e1d3c" +checksum = "fd58d377699e6cfeab52c4a9d28bdc4ef37e2bd235ff2db525071fe37a2e9af5" dependencies = [ "alloy-rlp", "bytes", @@ -180,7 +140,7 @@ dependencies = [ "derive_more", "foldhash", "getrandom", - "hashbrown 0.15.0", + "hashbrown 0.15.1", "hex-literal", "indexmap 2.6.0", "itoa", @@ -215,42 +175,33 @@ checksum = "2b09cae092c27b6f1bde952653a22708691802e57bfef4a2973b80bea21efd3f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.85", -] - -[[package]] -name = "alloy-rpc-types" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64333d639f2a0cf73491813c629a405744e16343a4bc5640931be707c345ecc5" -dependencies = [ - "alloy-rpc-types-eth 0.3.6", - "alloy-serde 0.3.6", - "serde", + "syn 2.0.87", ] [[package]] name = "alloy-rpc-types" version = "0.5.4" -source = "git+https://github.com/alloy-rs/alloy#b227b17ac08f966be3459c1776bb450d15612fcb" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eea9bf1abdd506f985a53533f5ac01296bcd6102c5e139bbc5d40bc468d2c916" dependencies = [ "alloy-primitives", "alloy-rpc-types-engine", - "alloy-rpc-types-eth 0.5.4", - "alloy-serde 0.5.4", + "alloy-rpc-types-eth", + "alloy-serde", "serde", ] [[package]] name = "alloy-rpc-types-engine" version = "0.5.4" -source = "git+https://github.com/alloy-rs/alloy#b227b17ac08f966be3459c1776bb450d15612fcb" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "886d22d41992287a235af2f3af4299b5ced2bcafb81eb835572ad35747476946" dependencies = [ - "alloy-consensus 0.5.4", - "alloy-eips 0.5.4", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rlp", - "alloy-serde 0.5.4", + "alloy-serde", "derive_more", "jsonwebtoken", "rand", @@ -258,38 +209,18 @@ dependencies = [ "strum", ] -[[package]] -name = "alloy-rpc-types-eth" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83aa984386deda02482660aa31cb8ca1e63d533f1c31a52d7d181ac5ec68e9b8" -dependencies = [ - "alloy-consensus 0.3.6", - "alloy-eips 0.3.6", - "alloy-network-primitives 0.3.6", - "alloy-primitives", - "alloy-rlp", - "alloy-serde 0.3.6", - "alloy-sol-types", - "cfg-if", - "derive_more", - "hashbrown 0.14.5", - "itertools 0.13.0", - "serde", - "serde_json", -] - [[package]] name = "alloy-rpc-types-eth" version = "0.5.4" -source = "git+https://github.com/alloy-rs/alloy#b227b17ac08f966be3459c1776bb450d15612fcb" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b034779a4850b4b03f5be5ea674a1cf7d746b2da762b34d1860ab45e48ca27" dependencies = [ - "alloy-consensus 0.5.4", - "alloy-eips 0.5.4", - "alloy-network-primitives 0.5.4", + "alloy-consensus", + "alloy-eips", + "alloy-network-primitives", "alloy-primitives", "alloy-rlp", - "alloy-serde 0.5.4", + "alloy-serde", "alloy-sol-types", "derive_more", "itertools 0.13.0", @@ -297,21 +228,11 @@ dependencies = [ "serde_json", ] -[[package]] -name = "alloy-serde" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "731f75ec5d383107fd745d781619bd9cedf145836c51ecb991623d41278e71fa" -dependencies = [ - "alloy-primitives", - "serde", - "serde_json", -] - [[package]] name = "alloy-serde" version = "0.5.4" -source = "git+https://github.com/alloy-rs/alloy#b227b17ac08f966be3459c1776bb450d15612fcb" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "028e72eaa9703e4882344983cfe7636ce06d8cce104a78ea62fd19b46659efc4" dependencies = [ "alloy-primitives", "serde", @@ -320,23 +241,23 @@ dependencies = [ [[package]] name = "alloy-sol-macro" -version = "0.8.10" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "841eabaa4710f719fddbc24c95d386eae313f07e6da4babc25830ee37945be0c" +checksum = "8a1b42ac8f45e2f49f4bcdd72cbfde0bb148f5481d403774ffa546e48b83efc1" dependencies = [ "alloy-sol-macro-expander", "alloy-sol-macro-input", "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.87", ] [[package]] name = "alloy-sol-macro-expander" -version = "0.8.10" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6672337f19d837b9f7073c45853aeb528ed9f7dd6a4154ce683e9e5cb7794014" +checksum = "06318f1778e57f36333e850aa71bd1bb5e560c10279e236622faae0470c50412" dependencies = [ "alloy-sol-macro-input", "const-hex", @@ -345,31 +266,31 @@ dependencies = [ "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.87", "syn-solidity", "tiny-keccak", ] [[package]] name = "alloy-sol-macro-input" -version = "0.8.10" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dff37dd20bfb118b777c96eda83b2067f4226d2644c5cfa00187b3bc01770ba" +checksum = "eaebb9b0ad61a41345a22c9279975c0cdd231b97947b10d7aad1cf0a7181e4a5" dependencies = [ "const-hex", "dunce", "heck", "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.87", "syn-solidity", ] [[package]] name = "alloy-sol-types" -version = "0.8.10" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa828bb1b9a6dc52208fbb18084fb9ce2c30facc2bfda6a5d922349b4990354f" +checksum = "374d7fb042d68ddfe79ccb23359de3007f6d4d53c13f703b64fb0db422132111" dependencies = [ "alloy-primitives", "alloy-sol-macro", @@ -378,14 +299,14 @@ dependencies = [ [[package]] name = "alloy-trie" -version = "0.5.3" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a46c9c4fdccda7982e7928904bd85fe235a0404ee3d7e197fff13d61eac8b4f" +checksum = "cdd7f8b3a7c65ca09b3c7bdd7c7d72d7423d026f5247eda96af53d24e58315c1" dependencies = [ "alloy-primitives", "alloy-rlp", + "arrayvec", "derive_more", - "hashbrown 0.14.5", "nybbles", "serde", "smallvec", @@ -409,9 +330,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.91" +version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c042108f3ed77fd83760a5fd79b53be043192bb3b9dba91d8c574c0ada7850c8" +checksum = "4c95c10ba0b00a02636238b814946408b1322d5ac4760326e6fb8ec956d85775" [[package]] name = "ark-ff" @@ -542,6 +463,9 @@ name = "arrayvec" version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" +dependencies = [ + "serde", +] [[package]] name = "aurora-engine-modexp" @@ -561,7 +485,7 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.87", ] [[package]] @@ -794,6 +718,12 @@ version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" +[[package]] +name = "critical-section" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b" + [[package]] name = "crossbeam-deque" version = "0.8.5" @@ -868,7 +798,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.85", + "syn 2.0.87", ] [[package]] @@ -879,7 +809,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.85", + "syn 2.0.87", ] [[package]] @@ -931,7 +861,7 @@ dependencies = [ "convert_case", "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.87", "unicode-xid", ] @@ -956,6 +886,17 @@ dependencies = [ "subtle", ] +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "dunce" version = "1.0.5" @@ -1031,7 +972,7 @@ checksum = "2f9ed6b3789237c8a0c1c505af1c7eb2c560df6186f01b098c3a1064ea532f38" dependencies = [ "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.87", ] [[package]] @@ -1171,14 +1112,13 @@ checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ "ahash", "allocator-api2", - "serde", ] [[package]] name = "hashbrown" -version = "0.15.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" +checksum = "3a9bfc1af68b1726ea47d3d5109de126281def866b33970e10fbab11b5dafab3" dependencies = [ "foldhash", "serde", @@ -1243,6 +1183,124 @@ dependencies = [ "cc", ] +[[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "ident_case" version = "1.0.1" @@ -1251,12 +1309,23 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.5.0" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" +dependencies = [ + "icu_normalizer", + "icu_properties", ] [[package]] @@ -1297,7 +1366,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", - "hashbrown 0.15.0", + "hashbrown 0.15.1", "serde", ] @@ -1417,6 +1486,12 @@ version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +[[package]] +name = "litemap" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "643cb0b8d4fcc284004d5fd0d67ccf61dfffadb7f75e1e71bc420f4688a3a704" + [[package]] name = "lock_api" version = "0.4.12" @@ -1567,7 +1642,7 @@ checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.87", ] [[package]] @@ -1588,18 +1663,22 @@ name = "once_cell" version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" +dependencies = [ + "critical-section", + "portable-atomic", +] [[package]] name = "op-alloy-consensus" -version = "0.2.12" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21aad1fbf80d2bcd7406880efc7ba109365f44bbb72896758ddcbfa46bf1592c" +checksum = "f26c3b35b7b3e36d15e0563eebffe13c1d9ca16b7aaffcb6a64354633547e16b" dependencies = [ - "alloy-consensus 0.3.6", - "alloy-eips 0.3.6", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rlp", - "alloy-serde 0.3.6", + "alloy-serde", "derive_more", "serde", "spin", @@ -1607,17 +1686,16 @@ dependencies = [ [[package]] name = "op-alloy-rpc-types" -version = "0.2.12" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e281fbfc2198b7c0c16457d6524f83d192662bc9f3df70f24c3038d4521616df" +checksum = "94bae9bf91b620e1e2c2291562e5998bc1247bd8ada011773e1997b31a95de99" dependencies = [ - "alloy-eips 0.3.6", - "alloy-network-primitives 0.3.6", + "alloy-consensus", + "alloy-eips", + "alloy-network-primitives", "alloy-primitives", - "alloy-rpc-types-eth 0.3.6", - "alloy-serde 0.3.6", - "cfg-if", - "hashbrown 0.14.5", + "alloy-rpc-types-eth", + "alloy-serde", "op-alloy-consensus", "serde", "serde_json", @@ -1704,6 +1782,12 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" +[[package]] +name = "portable-atomic" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2" + [[package]] name = "powerfmt" version = "0.2.0" @@ -1758,7 +1842,7 @@ dependencies = [ "proc-macro-error-attr2", "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.87", ] [[package]] @@ -1878,14 +1962,14 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reth-chainspec" -version = "1.0.6" -source = "git+https://github.com/lita-xyz/reth.git?branch=1.0.6-delendum#4bae44383ef00f12e8aae236829804068db83493" +version = "1.1.1" +source = "git+https://github.com/lewis1revill/reth.git?branch=1.1.1-delendum#3cd0daa07120e7d6da205d5ee639fb1860175bd2" dependencies = [ "alloy-chains", - "alloy-eips 0.3.6", + "alloy-consensus", + "alloy-eips", "alloy-genesis", "alloy-primitives", - "alloy-trie", "auto_impl", "derive_more", "once_cell", @@ -1898,11 +1982,11 @@ dependencies = [ [[package]] name = "reth-codecs" -version = "1.0.6" -source = "git+https://github.com/lita-xyz/reth.git?branch=1.0.6-delendum#4bae44383ef00f12e8aae236829804068db83493" +version = "1.1.1" +source = "git+https://github.com/lewis1revill/reth.git?branch=1.1.1-delendum#3cd0daa07120e7d6da205d5ee639fb1860175bd2" dependencies = [ - "alloy-consensus 0.3.6", - "alloy-eips 0.3.6", + "alloy-consensus", + "alloy-eips", "alloy-genesis", "alloy-primitives", "alloy-trie", @@ -1914,19 +1998,19 @@ dependencies = [ [[package]] name = "reth-codecs-derive" -version = "1.0.6" -source = "git+https://github.com/lita-xyz/reth.git?branch=1.0.6-delendum#4bae44383ef00f12e8aae236829804068db83493" +version = "1.1.1" +source = "git+https://github.com/lewis1revill/reth.git?branch=1.1.1-delendum#3cd0daa07120e7d6da205d5ee639fb1860175bd2" dependencies = [ "convert_case", "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.87", ] [[package]] name = "reth-ethereum-forks" -version = "1.0.6" -source = "git+https://github.com/lita-xyz/reth.git?branch=1.0.6-delendum#4bae44383ef00f12e8aae236829804068db83493" +version = "1.1.1" +source = "git+https://github.com/lewis1revill/reth.git?branch=1.1.1-delendum#3cd0daa07120e7d6da205d5ee639fb1860175bd2" dependencies = [ "alloy-chains", "alloy-primitives", @@ -1942,8 +2026,8 @@ dependencies = [ [[package]] name = "reth-network-peers" -version = "1.0.6" -source = "git+https://github.com/lita-xyz/reth.git?branch=1.0.6-delendum#4bae44383ef00f12e8aae236829804068db83493" +version = "1.1.1" +source = "git+https://github.com/lewis1revill/reth.git?branch=1.1.1-delendum#3cd0daa07120e7d6da205d5ee639fb1860175bd2" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -1955,16 +2039,15 @@ dependencies = [ [[package]] name = "reth-primitives" -version = "1.0.6" -source = "git+https://github.com/lita-xyz/reth.git?branch=1.0.6-delendum#4bae44383ef00f12e8aae236829804068db83493" +version = "1.1.1" +source = "git+https://github.com/lewis1revill/reth.git?branch=1.1.1-delendum#3cd0daa07120e7d6da205d5ee639fb1860175bd2" dependencies = [ - "alloy-consensus 0.3.6", - "alloy-eips 0.3.6", - "alloy-genesis", + "alloy-consensus", + "alloy-eips", "alloy-primitives", "alloy-rlp", - "alloy-rpc-types 0.3.6", - "alloy-serde 0.3.6", + "alloy-rpc-types", + "alloy-serde", "bytes", "c-kzg", "derive_more", @@ -1978,39 +2061,36 @@ dependencies = [ "reth-primitives-traits", "reth-static-file-types", "reth-trie-common", - "revm-primitives 9.0.2", + "revm-primitives 13.0.0", "secp256k1", "serde", - "tempfile", - "thiserror", "zstd", ] [[package]] name = "reth-primitives-traits" -version = "1.0.6" -source = "git+https://github.com/lita-xyz/reth.git?branch=1.0.6-delendum#4bae44383ef00f12e8aae236829804068db83493" +version = "1.1.1" +source = "git+https://github.com/lewis1revill/reth.git?branch=1.1.1-delendum#3cd0daa07120e7d6da205d5ee639fb1860175bd2" dependencies = [ - "alloy-consensus 0.3.6", - "alloy-eips 0.3.6", + "alloy-consensus", + "alloy-eips", "alloy-genesis", "alloy-primitives", "alloy-rlp", - "alloy-rpc-types-eth 0.3.6", "byteorder", "bytes", "derive_more", "modular-bitfield", "reth-codecs", - "revm-primitives 9.0.2", + "revm-primitives 13.0.0", "roaring", "serde", ] [[package]] name = "reth-static-file-types" -version = "1.0.6" -source = "git+https://github.com/lita-xyz/reth.git?branch=1.0.6-delendum#4bae44383ef00f12e8aae236829804068db83493" +version = "1.1.1" +source = "git+https://github.com/lewis1revill/reth.git?branch=1.1.1-delendum#3cd0daa07120e7d6da205d5ee639fb1860175bd2" dependencies = [ "alloy-primitives", "derive_more", @@ -2020,10 +2100,10 @@ dependencies = [ [[package]] name = "reth-trie-common" -version = "1.0.6" -source = "git+https://github.com/lita-xyz/reth.git?branch=1.0.6-delendum#4bae44383ef00f12e8aae236829804068db83493" +version = "1.1.1" +source = "git+https://github.com/lewis1revill/reth.git?branch=1.1.1-delendum#3cd0daa07120e7d6da205d5ee639fb1860175bd2" dependencies = [ - "alloy-consensus 0.3.6", + "alloy-consensus", "alloy-genesis", "alloy-primitives", "alloy-rlp", @@ -2034,7 +2114,7 @@ dependencies = [ "nybbles", "reth-codecs", "reth-primitives-traits", - "revm-primitives 9.0.2", + "revm-primitives 13.0.0", "serde", ] @@ -2042,10 +2122,11 @@ dependencies = [ name = "reth-valida" version = "0.1.0" dependencies = [ + "alloy-consensus", "alloy-primitives", "alloy-rlp", "alloy-rlp-derive", - "alloy-rpc-types 0.5.4", + "alloy-rpc-types", "anyhow", "getrandom", "hashbrown 0.14.5", @@ -2056,6 +2137,7 @@ dependencies = [ "revm", "rlp", "serde", + "serde_json", "thiserror", "valida-rs", ] @@ -2105,36 +2187,36 @@ dependencies = [ [[package]] name = "revm-primitives" -version = "9.0.2" +version = "10.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7a6bff9dbde3370a5ac9555104117f7e6039b3cc76e8d5d9d01899088beca2a" +checksum = "6f1525851a03aff9a9d6a1d018b414d76252d6802ab54695b27093ecd7e7a101" dependencies = [ - "alloy-eips 0.3.6", + "alloy-eip2930", + "alloy-eip7702 0.1.1", "alloy-primitives", "auto_impl", "bitflags", "bitvec", - "c-kzg", "cfg-if", "dyn-clone", "enumn", - "hashbrown 0.14.5", "hex", "serde", ] [[package]] name = "revm-primitives" -version = "10.0.0" +version = "13.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f1525851a03aff9a9d6a1d018b414d76252d6802ab54695b27093ecd7e7a101" +checksum = "0d11fa1e195b0bebaf3fb18596f314a13ba3a4cb1fdd16d3465934d812fd921e" dependencies = [ "alloy-eip2930", - "alloy-eip7702 0.1.1", + "alloy-eip7702 0.3.2", "alloy-primitives", "auto_impl", "bitflags", "bitvec", + "c-kzg", "cfg-if", "dyn-clone", "enumn", @@ -2261,9 +2343,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.38" +version = "0.38.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa260229e6538e52293eeb577aabd09945a09d6d9cc0fc550ed7529056c2e32a" +checksum = "375116bee2be9ed569afe2154ea6a99dfdffd257f533f187498c2a8f5feaf4ee" dependencies = [ "bitflags", "errno", @@ -2376,7 +2458,7 @@ checksum = "de523f781f095e28fa605cdce0f8307e451cc0fd14e2eb4cd2e98a355b147766" dependencies = [ "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.87", ] [[package]] @@ -2419,7 +2501,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.87", ] [[package]] @@ -2509,6 +2591,12 @@ dependencies = [ "der", ] +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + [[package]] name = "static_assertions" version = "1.1.0" @@ -2540,7 +2628,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.85", + "syn 2.0.87", ] [[package]] @@ -2575,9 +2663,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.85" +version = "2.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5023162dfcd14ef8f32034d8bcd4cc5ddc61ef7a247c024a33e24e1f24d21b56" +checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" dependencies = [ "proc-macro2", "quote", @@ -2586,14 +2674,25 @@ dependencies = [ [[package]] name = "syn-solidity" -version = "0.8.10" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16320d4a2021ba1a32470b3759676114a918885e9800e68ad60f2c67969fba62" +checksum = "edf42e81491fb8871b74df3d222c64ae8cbc1269ea509fa768a3ed3e1b0ac8cb" dependencies = [ "paste", "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.87", +] + +[[package]] +name = "synstructure" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", ] [[package]] @@ -2617,22 +2716,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.65" +version = "1.0.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d11abd9594d9b38965ef50805c5e469ca9cc6f197f883f717e0269a3057b3d5" +checksum = "02dd99dc800bbb97186339685293e1cc5d9df1f8fae2d0aecd9ff1c77efea892" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.65" +version = "1.0.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae71770322cbd277e69d762a16c444af02aa0575ac0d174f0b9562d3b37f8602" +checksum = "a7c61ec9a6f64d2793d8a45faba21efbe3ced62a886d44c36a009b2b519b4c7e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.87", ] [[package]] @@ -2705,20 +2804,15 @@ dependencies = [ ] [[package]] -name = "tinyvec" -version = "1.8.0" +name = "tinystr" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" dependencies = [ - "tinyvec_macros", + "displaydoc", + "zerovec", ] -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - [[package]] name = "toml_datetime" version = "0.6.8" @@ -2751,6 +2845,9 @@ name = "tracing-core" version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +dependencies = [ + "once_cell", +] [[package]] name = "typenum" @@ -2782,27 +2879,12 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" -[[package]] -name = "unicode-bidi" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" - [[package]] name = "unicode-ident" version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" -[[package]] -name = "unicode-normalization" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" -dependencies = [ - "tinyvec", -] - [[package]] name = "unicode-segmentation" version = "1.12.0" @@ -2823,19 +2905,31 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.2" +version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" +checksum = "8d157f1b96d14500ffdc1f10ba712e780825526c03d9a49b4d0324b0d9113ada" dependencies = [ "form_urlencoded", "idna", "percent-encoding", ] +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + [[package]] name = "valida-rs" version = "0.1.0" -source = "git+https://github.com/lita-xyz/valida-rs.git?branch=main#84df845d672aa72f7aa0d591caa3e5201dac2b75" +source = "git+https://github.com/lita-xyz/valida-rs.git?branch=main#891982dafd6598ac8497d8a03ad7c5476ce2488d" dependencies = [ "bincode", "getrandom", @@ -2893,7 +2987,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.87", "wasm-bindgen-shared", ] @@ -2915,7 +3009,7 @@ checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.87", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3026,6 +3120,18 @@ dependencies = [ "memchr", ] +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + [[package]] name = "wyz" version = "0.5.1" @@ -3035,6 +3141,30 @@ dependencies = [ "tap", ] +[[package]] +name = "yoke" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c5b1314b079b0930c31e3af543d8ee1757b1951ae1e1565ec704403a7240ca5" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28cc31741b18cb6f1d5ff12f5b7523e3d6eb0852bbbad19d73905511d9849b95" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", + "synstructure", +] + [[package]] name = "zerocopy" version = "0.7.35" @@ -3053,7 +3183,28 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.87", +] + +[[package]] +name = "zerofrom" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ec111ce797d0e0784a1116d0ddcdbea84322cd79e5d5ad173daeba4f93ab55" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ea7b4a3637ea8669cedf0f1fd5c286a17f3de97b8dd5a70a6c167a1730e63a5" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", + "synstructure", ] [[package]] @@ -3073,7 +3224,29 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.87", +] + +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 7c1a20e..26fc9f4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,13 +13,15 @@ zstd-sys = { git = "https://github.com/lita-xyz/zstd-rs.git", branch = "zstd-sys [dependencies] valida-rs = { git = "https://github.com/lita-xyz/valida-rs.git", branch = "main" } revm = { version = "14.0.0", features = ["std"], default-features = false } -reth-primitives = { git = "https://github.com/lita-xyz/reth.git", branch = "1.0.6-delendum" } -reth-chainspec = { git = "https://github.com/lita-xyz/reth.git", branch = "1.0.6-delendum" } -reth-trie-common = { git = "https://github.com/lita-xyz/reth.git", branch = "1.0.6-delendum" } +reth-primitives = { git = "https://github.com/lita-xyz/reth.git", branch = "1.1.1-delendum" } +reth-chainspec = { git = "https://github.com/lita-xyz/reth.git", branch = "1.1.1-delendum" } +reth-trie-common = { git = "https://github.com/lita-xyz/reth.git", branch = "1.1.1-delendum" } alloy-rlp = { version = "0.3", default-features = false } alloy-rlp-derive = { version = "0.3", default-features = false } -alloy-rpc-types = { git = "https://github.com/alloy-rs/alloy" } +alloy-rpc-types = "0.5.4" +alloy-consensus = "0.5.4" serde = { version = "1.0", features = ["derive"] } +serde_json = "1.0.132" thiserror = "1.0" alloy-primitives = { version = "0.8.3", default-features = false, features = [ "rlp", @@ -31,4 +33,4 @@ rlp = "0.5.2" anyhow = "1.0.75" hashbrown = "0.14.3" hex = "0.4.3" -getrandom = "0.2.15" \ No newline at end of file +getrandom = "0.2.15" diff --git a/src/main.rs b/src/main.rs index a73b870..7df45bf 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,6 +1,6 @@ #![no_main] -use reth_primitives::B256; +use alloy_primitives::B256; use revm::InMemoryDB; use reth_valida::primitives::db::InMemoryDBHelper; use reth_valida::primitives::mpt::keccak; @@ -10,13 +10,22 @@ use reth_valida::primitives::ValidaRethInput; valida_rs::entrypoint!(main); pub fn main() { - let mut input = match valida_rs::io::read_and_deserialize::() { + let vec = match valida_rs::io::read() { + Ok(vec) => vec, + Err(e) => { + valida_rs::io::println(&format!("Error reading input: {}", e)); + return; + } + }; + + let mut input = match serde_json::de::from_slice::(&vec.as_slice()) { Ok(val) => val, Err(e) => { - valida_rs::io::println(&format!("Error reading/deserializing input: {}", e)); + valida_rs::io::println(&format!("Error deserializing input: {}", e)); return; } }; + // Initialize the database. let db = match InMemoryDB::initialize(&mut input) { Ok(val) => val, diff --git a/src/primitives.rs b/src/primitives.rs index edd4ad2..2e713c4 100644 --- a/src/primitives.rs +++ b/src/primitives.rs @@ -6,7 +6,9 @@ pub mod processor; use crate::primitives::mpt::MptNode; use crate::primitives::mpt::StorageEntry; -use reth_primitives::{Address, Bytes, Header, TransactionSignedNoHash, Withdrawal, B256}; +use alloy_primitives::{Address, Bytes, B256}; +use alloy_rpc_types::Withdrawal; +use reth_primitives::{Header, TransactionSignedNoHash}; use revm::primitives::HashMap; use serde::{Deserialize, Serialize}; diff --git a/src/primitives/alloy2reth.rs b/src/primitives/alloy2reth.rs index f6f44a8..746b3d9 100644 --- a/src/primitives/alloy2reth.rs +++ b/src/primitives/alloy2reth.rs @@ -18,91 +18,70 @@ // //! Common conversions between Alloy and Reth types. -use alloy_rpc_types::AccessListItem as AlloyAccessListItem; use alloy_rpc_types::Header as AlloyHeader; +use alloy_consensus::{TxLegacy, TxEip2930, TxEip1559}; +use alloy_consensus::Transaction as AlloyTransactionTrait; +use alloy_primitives::U256; +use alloy_primitives::Signature as RethSignature; use alloy_rpc_types::Signature as AlloySignature; use alloy_rpc_types::Transaction as AlloyTransaction; -use alloy_rpc_types::Withdrawal as AlloyWithdrawal; -use reth_primitives::AccessListItem as RethAccessListItem; +use alloy_rpc_types::AccessList; use reth_primitives::Header as RethHeader; -use reth_primitives::Signature as RethSignature; use reth_primitives::TransactionSignedNoHash as RethTransaction; -use reth_primitives::Withdrawal as RethWithdrawal; -use reth_primitives::U256; -use reth_primitives::{Transaction, TransactionSignedNoHash, TxEip1559, TxEip2930, TxLegacy}; +use reth_primitives::{Transaction, TransactionSignedNoHash}; /// A trait to convert from Alloy types to Reth types. pub trait IntoReth { fn into_reth(self) -> T; } -impl IntoReth for AlloyWithdrawal { - fn into_reth(self) -> RethWithdrawal { - RethWithdrawal { - index: self.index, - validator_index: self.validator_index, - amount: self.amount, - address: self.address, - } - } -} - impl IntoReth for AlloyTransaction { fn into_reth(self) -> RethTransaction { let tx_type: u64 = self.transaction_type.unwrap_or(0).into(); let inner_tx = match tx_type { - 0 => Transaction::Legacy(TxLegacy { - chain_id: self.chain_id, - nonce: self.nonce, - gas_price: self.gas_price.unwrap(), - gas_limit: self.gas.try_into().unwrap(), - to: match self.to { - None => reth_primitives::TxKind::Create, - Some(to) => reth_primitives::TxKind::Call(to), - }, - value: self.value, - input: self.input, + 0 => Transaction::Legacy(TxLegacy { + chain_id: self.chain_id(), + nonce: self.nonce(), + gas_price: self.gas_price().unwrap(), + gas_limit: self.gas_limit().try_into().unwrap(), + to: self.kind(), + value: self.value(), + input: self.input().clone(), }), 1 => Transaction::Eip2930(TxEip2930 { - chain_id: self.chain_id.unwrap(), - nonce: self.nonce, - gas_price: self.gas_price.unwrap(), - gas_limit: self.gas.try_into().unwrap(), - to: match self.to { - None => reth_primitives::TxKind::Create, - Some(to) => reth_primitives::TxKind::Call(to), - }, - value: self.value, - input: self.input, - access_list: reth_primitives::AccessList( - self.access_list + chain_id: self.chain_id().unwrap(), + nonce: self.nonce(), + gas_price: self.gas_price().unwrap(), + gas_limit: self.gas_limit().try_into().unwrap(), + to: self.kind(), + value: self.value(), + input: self.input().clone(), + access_list: AccessList( + self.access_list() .unwrap() .iter() - .map(|item| item.clone().into_reth()) + .map(|item| item.clone()) .collect(), ), }), 2 => Transaction::Eip1559(TxEip1559 { - chain_id: self.chain_id.unwrap(), - nonce: self.nonce, - max_fee_per_gas: self.max_fee_per_gas.unwrap(), - max_priority_fee_per_gas: self.max_priority_fee_per_gas.unwrap(), - gas_limit: self.gas.try_into().unwrap(), - to: match self.to { - None => reth_primitives::TxKind::Create, - Some(to) => reth_primitives::TxKind::Call(to), - }, - value: self.value, - input: self.input, - access_list: reth_primitives::AccessList( - self.access_list + chain_id: self.chain_id().unwrap(), + nonce: self.nonce(), + max_fee_per_gas: self.max_fee_per_gas(), + max_priority_fee_per_gas: self.max_priority_fee_per_gas().unwrap(), + gas_limit: self.gas_limit().try_into().unwrap(), + to: self.kind(), + value: self.value(), + input: self.input().clone(), + access_list: AccessList( + self.access_list() .unwrap() .iter() - .map(|item| item.clone().into_reth()) + .map(|item| item.clone()) .collect(), ), }), - _ => panic!("invalid tx type: {}", tx_type), + _ => panic!("invalid tx type"), }; TransactionSignedNoHash { signature: self.signature.unwrap().into_reth(), @@ -111,15 +90,6 @@ impl IntoReth for AlloyTransaction { } } -impl IntoReth for AlloyAccessListItem { - fn into_reth(self) -> RethAccessListItem { - RethAccessListItem { - address: self.address, - storage_keys: self.storage_keys, - } - } -} - impl IntoReth for AlloySignature { fn into_reth(self) -> RethSignature { // TODO: should be chain_id * 2 + 35. @@ -129,11 +99,7 @@ impl IntoReth for AlloySignature { self.v }; - RethSignature { - r: self.r, - s: self.s, - odd_y_parity: recovery_id == U256::from(1), - } + RethSignature::from_rs_and_parity(self.r, self.s, recovery_id == U256::from(1)).unwrap() } } @@ -141,8 +107,8 @@ impl IntoReth for AlloyHeader { fn into_reth(self) -> RethHeader { RethHeader { parent_hash: self.parent_hash.0.into(), - ommers_hash: self.ommers_hash.0.into(), - beneficiary: self.beneficiary.0.into(), + ommers_hash: self.uncles_hash.0.into(), + beneficiary: self.miner.0.into(), state_root: self.state_root.0.into(), transactions_root: self.transactions_root.0.into(), receipts_root: self.receipts_root.0.into(), @@ -154,13 +120,13 @@ impl IntoReth for AlloyHeader { gas_used: self.gas_used.try_into().unwrap(), timestamp: self.timestamp, extra_data: self.extra_data.0.clone().into(), - mix_hash: self.mix_hash, - nonce: u64::from_be_bytes(self.nonce.0), + mix_hash: self.mix_hash.unwrap(), + nonce: self.nonce.unwrap(), base_fee_per_gas: Some(self.base_fee_per_gas.unwrap().try_into().unwrap()), blob_gas_used: self.blob_gas_used.map(|x| x.try_into().unwrap()), excess_blob_gas: self.excess_blob_gas.map(|x| x.try_into().unwrap()), parent_beacon_block_root: self.parent_beacon_block_root, - requests_root: self.requests_hash, + requests_hash: self.requests_hash, } } } diff --git a/src/primitives/db.rs b/src/primitives/db.rs index ef1f433..ce91012 100644 --- a/src/primitives/db.rs +++ b/src/primitives/db.rs @@ -23,8 +23,7 @@ use crate::primitives::ValidaRethInput; use anyhow::{anyhow, Result}; // use hashbrown::hash_map::Entry; -use reth_primitives::Bytes; -use reth_primitives::{Address, B256, U256}; +use alloy_primitives::{Address, Bytes, B256, U256}; use revm::db::AccountState; use revm::db::DbAccount; use revm::db::InMemoryDB; diff --git a/src/primitives/mpt.rs b/src/primitives/mpt.rs index aaddb96..6e64a50 100644 --- a/src/primitives/mpt.rs +++ b/src/primitives/mpt.rs @@ -33,12 +33,11 @@ use rlp::{Decodable, DecoderError, Prototype, Rlp}; use serde::{Deserialize, Serialize}; use thiserror::Error as ThisError; -use alloy_primitives::{TxNumber, U256}; +use alloy_primitives::{Address, TxNumber, U256}; use alloy_rlp_derive::{RlpDecodable, RlpEncodable, RlpMaxEncodedLen}; use alloy_rpc_types::EIP1186AccountProofResponse; use anyhow::Context; use anyhow::Result; -use reth_primitives::Address; pub type StorageEntry = (MptNode, Vec); diff --git a/src/primitives/processor.rs b/src/primitives/processor.rs index 0fefdfa..4ab87ca 100644 --- a/src/primitives/processor.rs +++ b/src/primitives/processor.rs @@ -19,12 +19,15 @@ use crate::primitives::mpt::{keccak, RlpBytes, StateAccount}; use crate::primitives::ValidaRethInput; +use alloy_primitives::{Address, Bloom, TxKind, U256}; +use alloy_consensus::Transaction as AlloyTransactionTrait; +use alloy_rlp::BufMut; +use alloy_rpc_types::AccessListItem; use anyhow::anyhow; -use reth_primitives::bytes::BufMut; use reth_trie_common::root::ordered_trie_root_with_encoder; -use reth_primitives::{AccessListItem, Address, Bloom, Transaction, TxKind, TransactionSigned}; +use reth_primitives::{Transaction, TransactionSigned}; use reth_primitives::{Receipt, ReceiptWithBloom}; -use reth_primitives::{Header, U256}; +use reth_primitives::Header; use reth_chainspec::BaseFeeParams; use revm::db::AccountState; use revm::db::InMemoryDB; @@ -316,8 +319,6 @@ impl EvmProcessor { // Update state trie root in header. let header = self.header.as_mut().expect("Header not initialized"); header.state_root = state_trie.hash(); - - println!("{:?}", header); } }