diff --git a/Cargo.lock b/Cargo.lock index a51eecc3e..472554ab5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -74,9 +74,9 @@ dependencies = [ [[package]] name = "alloy-chains" -version = "0.1.23" +version = "0.1.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1752d7d62e2665da650a36d84abbf239f812534475d51f072a49a533513b7cdd" +checksum = "bb07629a5d0645d29f68d2fb6f4d0cf15c89ec0965be915f303967180929743f" dependencies = [ "num_enum", "strum", @@ -206,9 +206,9 @@ dependencies = [ [[package]] name = "alloy-rlp" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a43b18702501396fa9bcdeecd533bc85fac75150d308fc0f6800a01e6234a003" +checksum = "26154390b1d205a4a7ac7352aa2eb4f81f391399d4e2f546fb81a2f8bb383f62" dependencies = [ "alloy-rlp-derive", "arrayvec", @@ -217,13 +217,13 @@ dependencies = [ [[package]] name = "alloy-rlp-derive" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d83524c1f6162fcb5b0decf775498a125066c86dda6066ed609531b0e912f85a" +checksum = "4d0f2d905ebd295e7effec65e5f6868d153936130ae718352771de3e7d03c75c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] @@ -319,7 +319,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] @@ -335,7 +335,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.76", "syn-solidity", "tiny-keccak", ] @@ -351,7 +351,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.76", "syn-solidity", ] @@ -399,9 +399,9 @@ dependencies = [ [[package]] name = "amq-protocol" -version = "7.2.0" +version = "7.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f051d4d77904272e9be7e292607378dc9900d15b8d314bfd3ed4b82fdd84f125" +checksum = "0f0234884b3641db74d22ccc20fc2594db5f23d7d41ade5c93d7ee33d200960c" dependencies = [ "amq-protocol-tcp", "amq-protocol-types", @@ -413,9 +413,9 @@ dependencies = [ [[package]] name = "amq-protocol-tcp" -version = "7.2.0" +version = "7.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e3d51dd36e67d757c9ba80a7b2a2a2a69254c1dbe4d8c631824ec7f5b69f60e" +checksum = "265dca43d9dbb3d5bbb0b3ef1b0cd9044ce3aa5d697d5b66cde974d1f6063f09" dependencies = [ "amq-protocol-uri", "tcp-stream", @@ -424,9 +424,9 @@ dependencies = [ [[package]] name = "amq-protocol-types" -version = "7.2.0" +version = "7.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0acdd47054ced8b9bc89ee0dbb42ccc8028de48d8658b24de4c255a226c9bfec" +checksum = "c7412353b58923fa012feb9a64ccc0c811747babee2e5a2fd63eb102dc8054c3" dependencies = [ "cookie-factory", "nom", @@ -436,9 +436,9 @@ dependencies = [ [[package]] name = "amq-protocol-uri" -version = "7.2.0" +version = "7.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f17881b7575dab3e71403f28a3e50b71f0d1bd026829abca3c48664522ce0df0" +checksum = "2be91352c805d5704784e079117d5291fd5bf2569add53c914ebce6d1a795d33" dependencies = [ "amq-protocol-types", "percent-encoding", @@ -453,9 +453,9 @@ checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" [[package]] name = "anstream" -version = "0.6.14" +version = "0.6.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" +checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" dependencies = [ "anstyle", "anstyle-parse", @@ -468,33 +468,33 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.7" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" +checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" [[package]] name = "anstyle-parse" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" +checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad186efb764318d35165f1758e7dcef3b10628e26d41a44bc5550652e6804391" +checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" dependencies = [ "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.3" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" +checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" dependencies = [ "anstyle", "windows-sys 0.52.0", @@ -543,7 +543,7 @@ dependencies = [ "num-bigint", "num-traits", "paste", - "rustc_version 0.4.0", + "rustc_version 0.4.1", "zeroize", ] @@ -635,15 +635,15 @@ dependencies = [ [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "asn1-rs" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ad1373757efa0f70ec53939aabc7152e1591cb485208052993070ac8d2429d" +checksum = "5493c3bedbacf7fd7382c6346bbd66687d12bbaad3a89a2d2c303ee6cf20b048" dependencies = [ "asn1-rs-derive", "asn1-rs-impl", @@ -657,13 +657,13 @@ dependencies = [ [[package]] name = "asn1-rs-derive" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7378575ff571966e99a744addeff0bff98b8ada0dedf1956d59e634db95eaac1" +checksum = "965c2d33e53cb6b267e148a4cb0760bc01f4904c1cd4bb4002a085bb016d1490" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.76", "synstructure", ] @@ -675,7 +675,7 @@ checksum = "7b18050c2cd6fe86c3a76584ef5e0baf286d038cda203eb6223df2cc413565f7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] @@ -692,13 +692,13 @@ dependencies = [ [[package]] name = "async-executor" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8828ec6e544c02b0d6691d21ed9f9218d0384a82542855073c2a3f58304aaf0" +checksum = "d7ebdfa2ebdab6b1760375fa7d6f382b9f486eac35fc994625a00e89280bdbb7" dependencies = [ "async-task", "concurrent-queue", - "fastrand 2.1.0", + "fastrand 2.1.1", "futures-lite 2.3.0", "slab", ] @@ -711,7 +711,7 @@ checksum = "05b1b633a2115cd122d73b955eadd9916c18c8f510ec9cd1686404c60ad1c29c" dependencies = [ "async-channel", "async-executor", - "async-io 2.3.3", + "async-io 2.3.4", "async-lock 3.4.0", "blocking", "futures-lite 2.3.0", @@ -751,9 +751,9 @@ dependencies = [ [[package]] name = "async-io" -version = "2.3.3" +version = "2.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d6baa8f0178795da0e71bc42c9e5d13261aac7ee549853162e66a241ba17964" +checksum = "444b0228950ee6501b3568d3c93bf1176a1fdbc3b758dcd9475046d30f4dc7e8" dependencies = [ "async-lock 3.4.0", "cfg-if", @@ -761,11 +761,11 @@ dependencies = [ "futures-io", "futures-lite 2.3.0", "parking", - "polling 3.7.2", - "rustix 0.38.34", + "polling 3.7.3", + "rustix 0.38.35", "slab", "tracing", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -819,7 +819,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] @@ -836,7 +836,7 @@ checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] @@ -862,7 +862,7 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] @@ -871,33 +871,6 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" -[[package]] -name = "aws-lc-rs" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8a47f2fb521b70c11ce7369a6c5fa4bd6af7e5d62ec06303875bafe7c6ba245" -dependencies = [ - "aws-lc-sys", - "mirai-annotations", - "paste", - "zeroize", -] - -[[package]] -name = "aws-lc-sys" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2927c7af777b460b7ccd95f8b67acd7b4c04ec8896bf0c8e80ba30523cffc057" -dependencies = [ - "bindgen", - "cc", - "cmake", - "dunce", - "fs_extra", - "libc", - "paste", -] - [[package]] name = "axum" version = "0.7.5" @@ -1000,29 +973,6 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" -[[package]] -name = "bindgen" -version = "0.69.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0" -dependencies = [ - "bitflags 2.6.0", - "cexpr", - "clang-sys", - "itertools 0.12.1", - "lazy_static", - "lazycell", - "log", - "prettyplease", - "proc-macro2", - "quote", - "regex", - "rustc-hash", - "shlex", - "syn 2.0.70", - "which", -] - [[package]] name = "bit-set" version = "0.5.3" @@ -1095,9 +1045,9 @@ dependencies = [ [[package]] name = "blst" -version = "0.3.12" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62dc83a094a71d43eeadd254b1ec2d24cb6a0bb6cadce00df51f0db594711a32" +checksum = "4378725facc195f1a538864863f6de233b500a8862747e7f165078a419d5e874" dependencies = [ "cc", "glob", @@ -1125,24 +1075,25 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" dependencies = [ "serde", ] [[package]] name = "c-kzg" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdf100c4cea8f207e883ff91ca886d621d8a166cb04971dfaa9bb8fd99ed95df" +checksum = "f0307f72feab3300336fb803a57134159f6e20139af1357f36c54cb90d8e8928" dependencies = [ "blst", "cc", "glob", "hex", "libc", + "once_cell", "serde", ] @@ -1195,22 +1146,11 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.0" +version = "1.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaff6f8ce506b9773fa786672d63fc7a191ffea1be33f72bbd4aeacefca9ffc8" +checksum = "57b6a275aa2903740dc87da01c62040406b8812552e97129a63ea8850a17c6e6" dependencies = [ - "jobserver", - "libc", - "once_cell", -] - -[[package]] -name = "cexpr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" -dependencies = [ - "nom", + "shlex", ] [[package]] @@ -1256,22 +1196,11 @@ dependencies = [ "inout", ] -[[package]] -name = "clang-sys" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" -dependencies = [ - "glob", - "libc", - "libloading", -] - [[package]] name = "clap" -version = "4.5.9" +version = "4.5.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64acc1846d54c1fe936a78dc189c34e28d3f5afc348403f28ecf53660b9b8462" +checksum = "ed6719fffa43d0d87e5fd8caeab59be1554fb028cd30edc88fc4369b17971019" dependencies = [ "clap_builder", "clap_derive", @@ -1279,9 +1208,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.9" +version = "4.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb8393d67ba2e7bfaf28a23458e4e2b543cc73a99595511eb207fdb8aede942" +checksum = "216aec2b177652e3846684cbfe25c9964d18ec45234f0f5da5157b207ed1aab6" dependencies = [ "anstream", "anstyle", @@ -1291,30 +1220,21 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.8" +version = "4.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bac35c6dafb060fd4d275d9a4ffae97917c13a6327903a8be2153cd964f7085" +checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] name = "clap_lex" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" - -[[package]] -name = "cmake" -version = "0.1.50" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31c789563b815f77f4250caee12365734369f942439b7defd71e18a48197130" -dependencies = [ - "cc", -] +checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" [[package]] name = "cms" @@ -1336,9 +1256,9 @@ checksum = "67ba02a97a2bd10f4b59b25c7973101c79642302776489e030cd13cdab09ed15" [[package]] name = "colorchoice" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" +checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" [[package]] name = "compat" @@ -1432,15 +1352,15 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.12" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad" dependencies = [ "libc", ] @@ -1483,9 +1403,9 @@ dependencies = [ [[package]] name = "critical-section" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7059fff8937831a9ae6f0fe4d658ffabf58f2ca96aa9dec1c889f936f705f216" +checksum = "f64009896348fc5af4222e9cf7d7d82a95a256c634ebcf61c53e4ea461422242" [[package]] name = "crossbeam" @@ -1602,7 +1522,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] @@ -1613,7 +1533,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] @@ -1664,13 +1584,13 @@ dependencies = [ [[package]] name = "der_derive" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fe87ce4529967e0ba1dcf8450bab64d97dfd5010a6256187ffe2e43e6f0e049" +checksum = "8034092389675178f570469e6c3b0465d3d30b4505c294a6550db47f3c17ad18" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] @@ -1711,7 +1631,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] @@ -1721,7 +1641,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "206868b8242f27cecce124c19fd88157fbd0dd334df2587f36417bafbc85097b" dependencies = [ "derive_builder_core", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] @@ -1733,8 +1653,8 @@ dependencies = [ "convert_case", "proc-macro2", "quote", - "rustc_version 0.4.0", - "syn 2.0.70", + "rustc_version 0.4.1", + "syn 2.0.76", ] [[package]] @@ -1796,7 +1716,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] @@ -1813,9 +1733,9 @@ checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" [[package]] name = "dunce" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" [[package]] name = "ecdsa" @@ -1862,6 +1782,12 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef1a6892d9eef45c8fa6b9e0086428a2cca8491aca8f787c534a3d6d0bcb3ced" +[[package]] +name = "embedded-io" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edd0f118536f44f5ccd48bcb8b111bdc3de888b58c74639dfb034a357d0f206d" + [[package]] name = "enum-as-inner" version = "0.6.0" @@ -1871,14 +1797,14 @@ dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] name = "env_filter" -version = "0.1.0" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a009aa4810eb158359dda09d0c87378e4bbb89b5a801f016885a4707ba24f7ea" +checksum = "4f2c92ceda6ceec50f43169f9ee8424fe2db276791afde7b2cd8bc084cb376ab" dependencies = [ "log", "regex", @@ -1899,9 +1825,9 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.11.3" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38b35839ba51819680ba087cd351788c9a3c476841207e0b8cee0b04722343b9" +checksum = "e13fa619b91fb2381732789fc5de83b45675e882f66623b7d8cb4f643017018d" dependencies = [ "anstream", "anstyle", @@ -2001,7 +1927,7 @@ dependencies = [ "anyhow", "bytes", "criterion", - "env_logger 0.11.3", + "env_logger 0.11.5", "ethereum-types", "hashbrown", "hex", @@ -2054,9 +1980,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" +checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" [[package]] name = "fastrlp" @@ -2102,9 +2028,9 @@ dependencies = [ [[package]] name = "flagset" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdeb3aa5e95cf9aabc17f060cfa0ced7b83f042390760ca53bf09df9968acaa1" +checksum = "b3ea1ec5f8307826a5b71094dd91fc04d4ae75d5709b20ad351c7fb4815c86ec" [[package]] name = "flume" @@ -2147,12 +2073,6 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "fs_extra" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" - [[package]] name = "funty" version = "2.0.0" @@ -2228,7 +2148,7 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" dependencies = [ - "fastrand 2.1.0", + "fastrand 2.1.1", "futures-core", "futures-io", "parking", @@ -2243,7 +2163,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] @@ -2386,7 +2306,7 @@ checksum = "cdc6457c0eb62c71aac4bc17216026d8410337c4126773b9c5daba343f17964f" dependencies = [ "atomic-polyfill", "hash32", - "rustc_version 0.4.0", + "rustc_version 0.4.1", "serde", "spin", "stable_deref_trait", @@ -2440,15 +2360,6 @@ dependencies = [ "digest 0.10.7", ] -[[package]] -name = "home" -version = "0.5.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" -dependencies = [ - "windows-sys 0.52.0", -] - [[package]] name = "http" version = "1.1.0" @@ -2462,9 +2373,9 @@ dependencies = [ [[package]] name = "http-body" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", "http", @@ -2503,9 +2414,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4fe55fb7a772d59a5ff1dfbff4fe0258d19b89fec4b233e75d35d5d2316badc" +checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" dependencies = [ "bytes", "futures-channel", @@ -2539,9 +2450,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ab92f4f49ee4fb4f997c784b7a2e0fa70050211e0b6a287f898c3c9785ca956" +checksum = "cde7055719c54e36e95e8719f95883f22072a48ede39db7fc17a4e1d5281e9b9" dependencies = [ "bytes", "futures-channel", @@ -2624,9 +2535,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.6" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "93ead53efc7ea8ed3cfb0c79fc8023fbb782a5432b52830b6518941cebe6505c" dependencies = [ "equivalent", "hashbrown", @@ -2679,20 +2590,20 @@ checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "is-terminal" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" +checksum = "261f68e344040fbd0edea105bef17c66edf46f984ddb1115b775ce31be948f4b" dependencies = [ - "hermit-abi 0.3.9", + "hermit-abi 0.4.0", "libc", "windows-sys 0.52.0", ] [[package]] name = "is_terminal_polyfill" -version = "1.70.0" +version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] name = "itertools" @@ -2712,15 +2623,6 @@ dependencies = [ "either", ] -[[package]] -name = "itertools" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" -dependencies = [ - "either", -] - [[package]] name = "itertools" version = "0.13.0" @@ -2756,20 +2658,11 @@ dependencies = [ "libc", ] -[[package]] -name = "jobserver" -version = "0.1.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" -dependencies = [ - "libc", -] - [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" dependencies = [ "wasm-bindgen", ] @@ -2789,9 +2682,9 @@ dependencies = [ [[package]] name = "keccak-asm" -version = "0.1.1" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47a3633291834c4fbebf8673acbc1b04ec9d151418ff9b8e26dcd79129928758" +checksum = "422fbc7ff2f2f5bdffeb07718e5a5324dca72b0c9293d50df4026652385e3314" dependencies = [ "digest 0.10.7", "sha3-asm", @@ -2819,9 +2712,9 @@ dependencies = [ [[package]] name = "lapin" -version = "2.3.4" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fae02c316a8a5922ce7518afa6b6c00e9a099f8e59587567e3331efdd11b8ceb" +checksum = "209b09a06f4bd4952a0fd0594f90d53cf4496b062f59acc838a2823e1bb7d95c" dependencies = [ "amq-protocol", "async-global-executor-trait", @@ -2845,12 +2738,6 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" -[[package]] -name = "lazycell" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" - [[package]] name = "leader" version = "0.1.0" @@ -2861,6 +2748,7 @@ dependencies = [ "cargo_metadata", "clap", "dotenvy", + "evm_arithmetization", "futures", "ops", "paladin-core", @@ -2880,19 +2768,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.155" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" - -[[package]] -name = "libloading" -version = "0.8.4" +version = "0.2.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e310b3a6b5907f99202fcdb4960ff45b93735d7c7d96b760fcff8db2dc0e103d" -dependencies = [ - "cfg-if", - "windows-targets 0.52.6", -] +checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" [[package]] name = "libm" @@ -2912,22 +2790,22 @@ dependencies = [ [[package]] name = "linkme" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccb76662d78edc9f9bf56360d6919bdacc8b7761227727e5082f128eeb90bbf5" +checksum = "3c943daedff228392b791b33bba32e75737756e80a613e32e246c6ce9cbab20a" dependencies = [ "linkme-impl", ] [[package]] name = "linkme-impl" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8dccda732e04fa3baf2e17cf835bfe2601c7c2edafd64417c627dabae3a8cda" +checksum = "cb26336e6dc7cc76e7927d2c9e7e3bb376d7af65a6f56a0b16c47d18a9b1abc5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] @@ -2961,9 +2839,9 @@ checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "lru" -version = "0.12.3" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3262e75e648fce39813cb56ac41f3c3e3f65217ebf3844d818d1f9398cfb0dc" +checksum = "37ee39891760e7d94734f6f63fedc29a2e4a152f836120753a72503f09fcf904" dependencies = [ "hashbrown", ] @@ -3012,21 +2890,16 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.11" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ + "hermit-abi 0.3.9", "libc", "wasi", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] -[[package]] -name = "mirai-annotations" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9be0862c1b3f26a88803c4a49de6889c10e608b3ee9344e6ef5b45fb37ad3d1" - [[package]] name = "mpt_trie" version = "0.4.1" @@ -3186,22 +3059,22 @@ dependencies = [ [[package]] name = "num_enum" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" +checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179" dependencies = [ "num_enum_derive", ] [[package]] name = "num_enum_derive" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" +checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] @@ -3224,18 +3097,18 @@ dependencies = [ [[package]] name = "object" -version = "0.36.1" +version = "0.36.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "081b846d1d56ddfc18fdf1a922e4f6e07a11768ea1b92dec44e42b72712ccfce" +checksum = "27b64972346851a39438c60b341ebc01bba47464ae329e55cf343eb93964efd9" dependencies = [ "memchr", ] [[package]] name = "oid-registry" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c958dd45046245b9c3c2547369bb634eb461670b2e7e0de552905801a648d1d" +checksum = "a8d8034d9489cdaf79228eb9f6a3b8d7bb32ba00d6645ebd48eef4077ceb5bd9" dependencies = [ "asn1-rs", ] @@ -3275,7 +3148,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] @@ -3384,7 +3257,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af25dcb10b7c0ce99abee8694e2e79e4787d7f778b9339dc5a50ba6fc45e5cc9" dependencies = [ "quote", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] @@ -3504,7 +3377,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] @@ -3535,7 +3408,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] @@ -3564,12 +3437,12 @@ dependencies = [ [[package]] name = "piper" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae1d5c74c9876f070d3e8fd503d748c7d974c3e48da8f41350fa5222ef9b4391" +checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066" dependencies = [ "atomic-waker", - "fastrand 2.1.0", + "fastrand 2.1.1", "futures-io", ] @@ -3726,27 +3599,28 @@ dependencies = [ [[package]] name = "polling" -version = "3.7.2" +version = "3.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3ed00ed3fbf728b5816498ecd316d1716eecaced9c0c8d2c5a6740ca214985b" +checksum = "cc2790cd301dec6cd3b7a025e4815cf825724a51c98dccfe6a3e55f05ffb6511" dependencies = [ "cfg-if", "concurrent-queue", "hermit-abi 0.4.0", "pin-project-lite", - "rustix 0.38.34", + "rustix 0.38.35", "tracing", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "postcard" -version = "1.0.8" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a55c51ee6c0db07e68448e336cf8ea4131a620edefebf9893e759b2d793420f8" +checksum = "5f7f0a8d620d71c457dd1d47df76bb18960378da56af4527aaa10f515eee732e" dependencies = [ "cobs", - "embedded-io", + "embedded-io 0.4.0", + "embedded-io 0.6.1", "heapless", "serde", ] @@ -3759,9 +3633,12 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] [[package]] name = "pretty_env_logger" @@ -3773,16 +3650,6 @@ dependencies = [ "log", ] -[[package]] -name = "prettyplease" -version = "0.2.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" -dependencies = [ - "proc-macro2", - "syn 2.0.70", -] - [[package]] name = "primitive-types" version = "0.10.1" @@ -3808,11 +3675,11 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" dependencies = [ - "toml_edit 0.21.1", + "toml_edit", ] [[package]] @@ -3912,9 +3779,9 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" [[package]] name = "quote" -version = "1.0.36" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -4006,18 +3873,18 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c82cf8cff14456045f55ec4241383baeff27af886adb72ffb2162f99911de0fd" +checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" dependencies = [ "bitflags 2.6.0", ] [[package]] name = "redox_users" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" +checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ "getrandom", "libredox", @@ -4026,9 +3893,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.5" +version = "1.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" +checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" dependencies = [ "aho-corasick", "memchr", @@ -4076,9 +3943,9 @@ checksum = "ba39f3699c378cd8970968dcbff9c43159ea4cfbd88d43c00b22f2ef10a435d2" [[package]] name = "reqwest" -version = "0.12.5" +version = "0.12.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7d6d2a27d57148378eb5e111173f4276ad26340ecc5c49a4a2152167a2d6a37" +checksum = "f8f4955649ef5c38cc7f9e8aa41761d48fb9677197daea9984dc54f56aad5e63" dependencies = [ "base64", "bytes", @@ -4110,7 +3977,7 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "winreg", + "windows-registry", ] [[package]] @@ -4205,7 +4072,7 @@ dependencies = [ "futures", "futures-timer", "rstest_macros", - "rustc_version 0.4.0", + "rustc_version 0.4.1", ] [[package]] @@ -4221,8 +4088,8 @@ dependencies = [ "quote", "regex", "relative-path", - "rustc_version 0.4.0", - "syn 2.0.70", + "rustc_version 0.4.1", + "syn 2.0.76", "unicode-ident", ] @@ -4262,12 +4129,6 @@ version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" -[[package]] -name = "rustc-hash" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - [[package]] name = "rustc-hex" version = "2.1.0" @@ -4285,9 +4146,9 @@ dependencies = [ [[package]] name = "rustc_version" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ "semver 1.0.23", ] @@ -4317,9 +4178,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.34" +version = "0.38.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +checksum = "a85d50532239da68e9addb745ba38ff4612a242c1c7ceea689c4bc7c2f43c36f" dependencies = [ "bitflags 2.6.0", "errno", @@ -4330,13 +4191,12 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.11" +version = "0.23.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4828ea528154ae444e5a642dbb7d5623354030dc9822b83fd9bb79683c7399d0" +checksum = "c58f8c84392efc0a126acce10fa59ff7b3d2ac06ab451a33f2741989b806b044" dependencies = [ - "aws-lc-rs", - "log", "once_cell", + "ring", "rustls-pki-types", "rustls-webpki", "subtle", @@ -4345,9 +4205,9 @@ dependencies = [ [[package]] name = "rustls-connector" -version = "0.20.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "727a826801254b6cfcd2508a0508c01b7c1bca21d3673e84d86da084781b83d5" +checksum = "2a980454b497c439c274f2feae2523ed8138bbd3d323684e1435fec62f800481" dependencies = [ "log", "rustls", @@ -4358,9 +4218,9 @@ dependencies = [ [[package]] name = "rustls-native-certs" -version = "0.7.1" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a88d6d420651b496bdd98684116959239430022a115c1240e6c3993be0b15fba" +checksum = "e5bfb394eeed242e909609f56089eecfe5fda225042e8b171791b9c95f5931e5" dependencies = [ "openssl-probe", "rustls-pemfile", @@ -4371,9 +4231,9 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "2.1.2" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d" +checksum = "196fe16b00e106300d3e45ecfcb764fa292a535d7326a29a5875c579c7417425" dependencies = [ "base64", "rustls-pki-types", @@ -4381,17 +4241,16 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" +checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" [[package]] name = "rustls-webpki" -version = "0.102.5" +version = "0.102.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9a6fccd794a42c2c105b513a2f62bc3fd8f3ba57a4593677ceb0bd035164d78" +checksum = "84678086bd54edf2b415183ed7a94d0efb049f1b646a33e22a36f3794be6ae56" dependencies = [ - "aws-lc-rs", "ring", "rustls-pki-types", "untrusted", @@ -4481,9 +4340,9 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.11.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ "bitflags 2.6.0", "core-foundation", @@ -4494,9 +4353,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.11.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7" +checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" dependencies = [ "core-foundation-sys", "libc", @@ -4531,9 +4390,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.204" +version = "1.0.209" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" +checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09" dependencies = [ "serde_derive", ] @@ -4549,22 +4408,23 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.204" +version = "1.0.209" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" +checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] name = "serde_json" -version = "1.0.120" +version = "1.0.127" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" +checksum = "8043c06d9f82bd7271361ed64f415fe5e12a77fdb52e573e7f06a516dea329ad" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] @@ -4581,9 +4441,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.6" +version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" +checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" dependencies = [ "serde", ] @@ -4624,9 +4484,9 @@ dependencies = [ [[package]] name = "sha3-asm" -version = "0.1.1" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9b57fd861253bff08bb1919e995f90ba8f4889de2726091c8876f3a4e823b40" +checksum = "57d79b758b7cb2085612b11a235055e485605a5103faccdd633f35bd7aee69dd" dependencies = [ "cc", "cfg-if", @@ -4790,7 +4650,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] @@ -4812,9 +4672,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.70" +version = "2.0.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f0209b68b3613b093e0ec905354eccaedcfe83b8cb37cbdeae64026c3064c16" +checksum = "578e081a14e0cefc3279b0472138c513f37b41a08d5a3cca9b6e4e8ceb6cd525" dependencies = [ "proc-macro2", "quote", @@ -4830,7 +4690,7 @@ dependencies = [ "paste", "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] @@ -4844,6 +4704,9 @@ name = "sync_wrapper" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" +dependencies = [ + "futures-core", +] [[package]] name = "synstructure" @@ -4853,7 +4716,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] @@ -4876,14 +4739,15 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.10.1" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" dependencies = [ "cfg-if", - "fastrand 2.1.0", - "rustix 0.38.34", - "windows-sys 0.52.0", + "fastrand 2.1.1", + "once_cell", + "rustix 0.38.35", + "windows-sys 0.59.0", ] [[package]] @@ -4897,22 +4761,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.61" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.61" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] @@ -5003,21 +4867,20 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.38.0" +version = "1.39.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba4f4a02a7a80d6f274636f0aa95c7e383b912d41fe721a31f29e29698585a4a" +checksum = "9babc99b9923bfa4804bd74722ff02c0381021eafa4db9949217e3be8e84fff5" dependencies = [ "backtrace", "bytes", "libc", "mio", - "num_cpus", "parking_lot", "pin-project-lite", "signal-hook-registry", "socket2 0.5.7", "tokio-macros", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -5033,13 +4896,13 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" +checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] @@ -5093,47 +4956,36 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.14" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f49eb2ab21d2f26bd6db7bf383edc527a7ebaee412d17af4d40fdccd442f335" +checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.15", + "toml_edit", ] [[package]] name = "toml_datetime" -version = "0.6.6" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.21.1" +version = "0.22.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" -dependencies = [ - "indexmap", - "toml_datetime", - "winnow 0.5.40", -] - -[[package]] -name = "toml_edit" -version = "0.22.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d59a3a72298453f564e2b111fa896f8d07fabb36f51f06d7e875fc5e0b5a3ef1" +checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" dependencies = [ "indexmap", "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.13", + "winnow", ] [[package]] @@ -5154,15 +5006,15 @@ dependencies = [ [[package]] name = "tower-layer" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "trace_decoder" @@ -5202,7 +5054,7 @@ dependencies = [ "strum", "thiserror", "u4", - "winnow 0.6.13", + "winnow", "zk_evm_common", ] @@ -5226,7 +5078,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] @@ -5276,9 +5128,9 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "trybuild" -version = "1.0.97" +version = "1.0.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b1e5645f2ee8025c2f1d75e1138f2dd034d74e6ba54620f3c569ba2a2a1ea06" +checksum = "207aa50d36c4be8d8c6ea829478be44a372c6a77669937bb39c698e52f1491e8" dependencies = [ "glob", "serde", @@ -5413,7 +5265,7 @@ checksum = "c32e7318e93a9ac53693b6caccfb05ff22e04a44c7cf8a279051f24c09da286f" dependencies = [ "anyhow", "derive_builder", - "rustc_version 0.4.0", + "rustc_version 0.4.1", "rustversion", "time", "vergen-lib", @@ -5450,9 +5302,9 @@ dependencies = [ [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "wait-timeout" @@ -5496,34 +5348,35 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.76", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.42" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" dependencies = [ "cfg-if", "js-sys", @@ -5533,9 +5386,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -5543,28 +5396,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.76", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" dependencies = [ "js-sys", "wasm-bindgen", @@ -5580,18 +5433,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "which" -version = "4.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" -dependencies = [ - "either", - "home", - "once_cell", - "rustix 0.38.34", -] - [[package]] name = "winapi" version = "0.3.9" @@ -5610,11 +5451,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -5623,6 +5464,36 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-registry" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" +dependencies = [ + "windows-result", + "windows-strings", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-result" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-strings" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +dependencies = [ + "windows-result", + "windows-targets 0.52.6", +] + [[package]] name = "windows-sys" version = "0.48.0" @@ -5641,6 +5512,15 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + [[package]] name = "windows-targets" version = "0.48.5" @@ -5764,32 +5644,13 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.5.40" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" dependencies = [ "memchr", ] -[[package]] -name = "winnow" -version = "0.6.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59b5e5f6c299a3c7890b876a2a587f3115162487e704907d9b6cd29473052ba1" -dependencies = [ - "memchr", -] - -[[package]] -name = "winreg" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] - [[package]] name = "worker" version = "0.1.0" @@ -5875,6 +5736,7 @@ version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ + "byteorder", "zerocopy-derive", ] @@ -5886,7 +5748,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] @@ -5906,7 +5768,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] @@ -5925,6 +5787,6 @@ version = "0.1.0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.76", "trybuild", ] diff --git a/evm_arithmetization/Cargo.toml b/evm_arithmetization/Cargo.toml index 62133a099..c18bea130 100644 --- a/evm_arithmetization/Cargo.toml +++ b/evm_arithmetization/Cargo.toml @@ -64,6 +64,7 @@ parallel = [ "starky/parallel", ] polygon_pos = [] +cdk_erigon = [] [[bin]] name = "assemble" diff --git a/evm_arithmetization/benches/fibonacci_25m_gas.rs b/evm_arithmetization/benches/fibonacci_25m_gas.rs index ca2b74e04..21702d2d1 100644 --- a/evm_arithmetization/benches/fibonacci_25m_gas.rs +++ b/evm_arithmetization/benches/fibonacci_25m_gas.rs @@ -178,6 +178,7 @@ fn prepare_setup() -> anyhow::Result { Ok(GenerationInputs { signed_txns: vec![txn.to_vec()], + burn_addr: None, withdrawals: vec![], tries: tries_before, trie_roots_after, diff --git a/evm_arithmetization/src/cpu/kernel/aggregator.rs b/evm_arithmetization/src/cpu/kernel/aggregator.rs index 7069c14f6..16e3a3450 100644 --- a/evm_arithmetization/src/cpu/kernel/aggregator.rs +++ b/evm_arithmetization/src/cpu/kernel/aggregator.rs @@ -178,7 +178,15 @@ pub static KERNEL_FILES: [&str; NUMBER_KERNEL_FILES] = [ pub static KERNEL: Lazy = Lazy::new(combined_kernel); pub(crate) fn combined_kernel_from_files(files: [&str; N]) -> Kernel { - let parsed_files = files.iter().map(|f| parse(f, HashSet::new())).collect_vec(); + let mut active_features = HashSet::new(); + if cfg!(feature = "cdk_erigon") { + active_features.insert("cdk_erigon"); + } + + let parsed_files = files + .iter() + .map(|f| parse(f, &active_features)) + .collect_vec(); assemble(parsed_files, evm_constants(), true) } diff --git a/evm_arithmetization/src/cpu/kernel/asm/core/process_txn.asm b/evm_arithmetization/src/cpu/kernel/asm/core/process_txn.asm index 31540fbad..6a006ef71 100644 --- a/evm_arithmetization/src/cpu/kernel/asm/core/process_txn.asm +++ b/evm_arithmetization/src/cpu/kernel/asm/core/process_txn.asm @@ -75,6 +75,11 @@ global buy_gas: // stack: deduct_eth_status, retdest %jumpi(panic) // stack: retdest + #[cfg(feature = cdk_erigon)] + { + %add_max_burnt_eth + // stack: retdest + } global increment_sender_nonce: %mload_txn_field(@TXN_FIELD_ORIGIN) @@ -362,8 +367,38 @@ process_message_txn_fail: // stack: origin, leftover_gas_cost, leftover_gas' %add_eth // stack: leftover_gas' + + #[cfg(feature = cdk_erigon)] + { + %deduct_extra_burn_fees + } %endmacro +#[cfg(feature = cdk_erigon)] +{ + // Deduct the extra burn fees from the burn target. + %macro deduct_extra_burn_fees + // stack: leftover_gas' + %mload_global_metadata(@GLOBAL_METADATA_BURN_ADDR) DUP1 + %eq_const(@U256_MAX) %jumpi(%%deduct_extra_burn_fees_pop) + // stack: burn_target, leftover_gas' + DUP2 + %mload_global_metadata(@GLOBAL_METADATA_BLOCK_BASE_FEE) + MUL + // stack: refund_base_cost, burn_target, leftover_gas' + SWAP1 + %deduct_eth + // stack: deduct_status, leftover_gas' + %jumpi(panic) + %jump(%%deduct_extra_burn_fees_end) + %%deduct_extra_burn_fees_pop: + // stack: burn_target, leftover_gas' + POP + %%deduct_extra_burn_fees_end: + // stack: leftover_gas' + %endmacro +} + // Sets @TXN_FIELD_MAX_FEE_PER_GAS and @TXN_FIELD_MAX_PRIORITY_FEE_PER_GAS. %macro compute_fees // stack: (empty) @@ -395,6 +430,30 @@ process_message_txn_fail: // stack: gas_limit - intrinsic_gas %endmacro +#[cfg(feature = cdk_erigon)] +{ + // Refund extra burn fees to the burn target. + %macro add_max_burnt_eth + // stack: (empty) + %mload_global_metadata(@GLOBAL_METADATA_BURN_ADDR) + // If there is no burn target, we skip the transfer. + DUP1 %eq_const(@U256_MAX) %jumpi(%%add_max_burnt_eth_pop) + // stack: burn_target + %mload_global_metadata(@GLOBAL_METADATA_BLOCK_BASE_FEE) + %mload_txn_field(@TXN_FIELD_GAS_LIMIT) + MUL + // stack: max_burnt_cost, burn_target + SWAP1 + %add_eth + %jump(%%add_max_burnt_eth_end) + %%add_max_burnt_eth_pop: + // stack: burn_target + POP + %%add_max_burnt_eth_end: + // stack: (empty) + %endmacro +} + create_contract_account_fault: %revert_checkpoint // stack: address, retdest diff --git a/evm_arithmetization/src/cpu/kernel/assembler.rs b/evm_arithmetization/src/cpu/kernel/assembler.rs index 1bf97e604..8c4fb2fb0 100644 --- a/evm_arithmetization/src/cpu/kernel/assembler.rs +++ b/evm_arithmetization/src/cpu/kernel/assembler.rs @@ -764,7 +764,10 @@ mod tests { constants: HashMap, optimize: bool, ) -> Kernel { - let parsed_files = files.iter().map(|f| parse(f, HashSet::new())).collect_vec(); + let parsed_files = files + .iter() + .map(|f| parse(f, &HashSet::new())) + .collect_vec(); assemble(parsed_files, constants, optimize) } } diff --git a/evm_arithmetization/src/cpu/kernel/constants/global_metadata.rs b/evm_arithmetization/src/cpu/kernel/constants/global_metadata.rs index ce1f9f112..49fa18d78 100644 --- a/evm_arithmetization/src/cpu/kernel/constants/global_metadata.rs +++ b/evm_arithmetization/src/cpu/kernel/constants/global_metadata.rs @@ -112,10 +112,13 @@ pub(crate) enum GlobalMetadata { // Number of blob versioned hashes contained in the current type-3 transaction. BlobVersionedHashesLen, + + /// Address where the base fee to be burnt is sent. + BurnAddr, } impl GlobalMetadata { - pub(crate) const COUNT: usize = 54; + pub(crate) const COUNT: usize = 55; /// Unscales this virtual offset by their respective `Segment` value. pub(crate) const fn unscale(&self) -> usize { @@ -178,6 +181,7 @@ impl GlobalMetadata { Self::InitialStorageLinkedListLen, Self::TransientStorageLen, Self::BlobVersionedHashesLen, + Self::BurnAddr, ] } @@ -244,6 +248,7 @@ impl GlobalMetadata { Self::InitialStorageLinkedListLen => "GLOBAL_METADATA_INITIAL_STORAGE_LINKED_LIST_LEN", Self::TransientStorageLen => "GLOBAL_METADATA_TRANSIENT_STORAGE_LEN", Self::BlobVersionedHashesLen => "GLOBAL_METADATA_BLOB_VERSIONED_HASHES_LEN", + Self::BurnAddr => "GLOBAL_METADATA_BURN_ADDR", } } } diff --git a/evm_arithmetization/src/cpu/kernel/interpreter.rs b/evm_arithmetization/src/cpu/kernel/interpreter.rs index a42bc3a1e..f6e9b67ed 100644 --- a/evm_arithmetization/src/cpu/kernel/interpreter.rs +++ b/evm_arithmetization/src/cpu/kernel/interpreter.rs @@ -263,6 +263,10 @@ impl Interpreter { // Set `GlobalMetadata` values. let metadata = &inputs.block_metadata; + #[cfg(feature = "cdk_erigon")] + let burn_addr = inputs + .burn_addr + .map_or_else(U256::max_value, |addr| U256::from_big_endian(&addr.0)); let global_metadata_to_set = [ ( GlobalMetadata::BlockBeneficiary, @@ -328,6 +332,8 @@ impl Interpreter { ), (GlobalMetadata::KernelHash, h2u(KERNEL.code_hash)), (GlobalMetadata::KernelLen, KERNEL.code.len().into()), + #[cfg(feature = "cdk_erigon")] + (GlobalMetadata::BurnAddr, burn_addr), ]; self.set_global_metadata_multi_fields(&global_metadata_to_set); diff --git a/evm_arithmetization/src/cpu/kernel/mod.rs b/evm_arithmetization/src/cpu/kernel/mod.rs index 7b8a58566..ac8147488 100644 --- a/evm_arithmetization/src/cpu/kernel/mod.rs +++ b/evm_arithmetization/src/cpu/kernel/mod.rs @@ -28,7 +28,7 @@ use crate::cpu::kernel::constants::evm_constants; /// Assemble files, outputting bytes. /// This is for debugging the kernel only. pub fn assemble_to_bytes(files: &[String]) -> Vec { - let parsed_files: Vec<_> = files.iter().map(|f| parse(f, HashSet::new())).collect(); + let parsed_files: Vec<_> = files.iter().map(|f| parse(f, &HashSet::new())).collect(); let kernel = assemble(parsed_files, evm_constants(), true); kernel.code } diff --git a/evm_arithmetization/src/cpu/kernel/parser.rs b/evm_arithmetization/src/cpu/kernel/parser.rs index c661dabd2..2b117f618 100644 --- a/evm_arithmetization/src/cpu/kernel/parser.rs +++ b/evm_arithmetization/src/cpu/kernel/parser.rs @@ -12,14 +12,14 @@ use crate::cpu::kernel::ast::{File, Item, PushTarget, StackReplacement}; #[grammar = "cpu/kernel/evm_asm.pest"] struct AsmParser; -pub(crate) fn parse(s: &str, active_features: HashSet<&str>) -> File { +pub(crate) fn parse(s: &str, active_features: &HashSet<&str>) -> File { let file = AsmParser::parse(Rule::file, s) .expect("Parsing failed") .next() .unwrap(); let body = file .into_inner() - .map(|i| parse_item(i, &active_features)) + .map(|i| parse_item(i, active_features)) .collect(); File { body } } @@ -292,7 +292,7 @@ mod tests { // Test `feature_1`. let active_features = HashSet::from(["feature_1"]); - let parsed_code = parse(code, active_features); + let parsed_code = parse(code, &active_features); let final_code = assemble(vec![parsed_code], HashMap::new(), false); let expected_code = r#" @@ -318,7 +318,7 @@ mod tests { DIV "#; - let parsed_expected = parse(expected_code, HashSet::new()); + let parsed_expected = parse(expected_code, &HashSet::new()); let final_expected = assemble(vec![parsed_expected], HashMap::new(), false); assert_eq!(final_code.code, final_expected.code); @@ -326,7 +326,7 @@ mod tests { // Test `feature_2`. let active_features = HashSet::from(["feature_2"]); - let parsed_code = parse(code, active_features); + let parsed_code = parse(code, &active_features); let final_code = assemble(vec![parsed_code], HashMap::new(), false); let expected_code = r#" @@ -348,7 +348,7 @@ mod tests { MOD "#; - let parsed_expected = parse(expected_code, HashSet::new()); + let parsed_expected = parse(expected_code, &HashSet::new()); let final_expected = assemble(vec![parsed_expected], HashMap::new(), false); assert_eq!(final_code.code, final_expected.code); @@ -356,7 +356,7 @@ mod tests { // Test with both features enabled. let active_features = HashSet::from(["feature_1", "feature_2"]); - let parsed_code = parse(code, active_features); + let parsed_code = parse(code, &active_features); let final_code = assemble(vec![parsed_code], HashMap::new(), false); let expected_code = r#" @@ -387,7 +387,7 @@ mod tests { MOD "#; - let parsed_expected = parse(expected_code, HashSet::new()); + let parsed_expected = parse(expected_code, &HashSet::new()); let final_expected = assemble(vec![parsed_expected], HashMap::new(), false); assert_eq!(final_code.code, final_expected.code); @@ -395,7 +395,7 @@ mod tests { // Test with all features disabled. let active_features = HashSet::new(); - let parsed_code = parse(code, active_features); + let parsed_code = parse(code, &active_features); let final_code = assemble(vec![parsed_code], HashMap::new(), false); let expected_code = r#" @@ -412,7 +412,7 @@ mod tests { DIV "#; - let parsed_expected = parse(expected_code, HashSet::new()); + let parsed_expected = parse(expected_code, &HashSet::new()); let final_expected = assemble(vec![parsed_expected], HashMap::new(), false); assert_eq!(final_code.code, final_expected.code); diff --git a/evm_arithmetization/src/cpu/kernel/tests/add11.rs b/evm_arithmetization/src/cpu/kernel/tests/add11.rs index 89fbdec80..1840bbc07 100644 --- a/evm_arithmetization/src/cpu/kernel/tests/add11.rs +++ b/evm_arithmetization/src/cpu/kernel/tests/add11.rs @@ -181,6 +181,7 @@ fn test_add11_yml() { let inputs = GenerationInputs { signed_txns: vec![txn.to_vec()], + burn_addr: None, withdrawals: vec![], global_exit_roots: vec![], tries: tries_before, @@ -362,6 +363,7 @@ fn test_add11_yml_with_exception() { let inputs = GenerationInputs { signed_txns: vec![txn.to_vec()], + burn_addr: None, withdrawals: vec![], global_exit_roots: vec![], tries: tries_before, diff --git a/evm_arithmetization/src/cpu/kernel/tests/init_exc_stop.rs b/evm_arithmetization/src/cpu/kernel/tests/init_exc_stop.rs index e2d5fb41d..7e7e6851d 100644 --- a/evm_arithmetization/src/cpu/kernel/tests/init_exc_stop.rs +++ b/evm_arithmetization/src/cpu/kernel/tests/init_exc_stop.rs @@ -91,6 +91,7 @@ fn test_init_exc_stop() { let inputs = GenerationInputs { signed_txns: vec![], + burn_addr: None, withdrawals: vec![], tries: TrieInputs { state_trie: state_trie_before, diff --git a/evm_arithmetization/src/fixed_recursive_verifier.rs b/evm_arithmetization/src/fixed_recursive_verifier.rs index 8762896b4..5d90eb462 100644 --- a/evm_arithmetization/src/fixed_recursive_verifier.rs +++ b/evm_arithmetization/src/fixed_recursive_verifier.rs @@ -41,9 +41,10 @@ use crate::generation::segments::{GenerationSegmentData, SegmentDataIterator, Se use crate::generation::{GenerationInputs, TrimmedGenerationInputs}; use crate::get_challenges::observe_public_values_target; use crate::proof::{ - AllProof, BlockHashesTarget, BlockMetadataTarget, ExtraBlockData, ExtraBlockDataTarget, - FinalPublicValues, FinalPublicValuesTarget, MemCapTarget, PublicValues, PublicValuesTarget, - RegistersDataTarget, TrieRoots, TrieRootsTarget, DEFAULT_CAP_LEN, TARGET_HASH_SIZE, + AllProof, BlockHashesTarget, BlockMetadataTarget, BurnAddrTarget, ExtraBlockData, + ExtraBlockDataTarget, FinalPublicValues, FinalPublicValuesTarget, MemCapTarget, PublicValues, + PublicValuesTarget, RegistersDataTarget, TrieRoots, TrieRootsTarget, DEFAULT_CAP_LEN, + TARGET_HASH_SIZE, }; use crate::prover::{check_abort_signal, prove}; use crate::recursive_verifier::{ @@ -53,6 +54,8 @@ use crate::recursive_verifier::{ PlonkWrapperCircuit, PublicInputs, StarkWrapperCircuit, }; use crate::util::h256_limbs; +#[cfg(feature = "cdk_erigon")] +use crate::util::u256_limbs; use crate::verifier::initial_memory_merkle_cap; /// The recursion threshold. We end a chain of recursive proofs once we reach @@ -1029,6 +1032,21 @@ where public_values.trie_roots_after, rhs_pv.trie_roots_after, ); + + // Connect the burn address targets. + BurnAddrTarget::conditional_assert_eq( + &mut builder, + is_not_dummy, + lhs_pv.burn_addr, + rhs_pv.burn_addr.clone(), + ); + BurnAddrTarget::conditional_assert_eq( + &mut builder, + is_not_dummy, + public_values.burn_addr.clone(), + rhs_pv.burn_addr, + ); + BlockMetadataTarget::conditional_assert_eq( &mut builder, is_not_dummy, @@ -1164,6 +1182,19 @@ where public_values.trie_roots_before, lhs_pv.trie_roots_before, ); + + // Connect the burn address targets. + BurnAddrTarget::connect( + &mut builder, + lhs_pv.burn_addr.clone(), + rhs_pv.burn_addr.clone(), + ); + BurnAddrTarget::connect( + &mut builder, + public_values.burn_addr.clone(), + rhs_pv.burn_addr.clone(), + ); + Self::connect_extra_public_values( &mut builder, &public_values.extra_block_data, @@ -1336,6 +1367,18 @@ where agg_pv.extra_block_data, ); + // Connect the burn address targets. + BurnAddrTarget::connect( + &mut builder, + parent_pv.burn_addr.clone(), + agg_pv.burn_addr.clone(), + ); + BurnAddrTarget::connect( + &mut builder, + public_values.burn_addr.clone(), + agg_pv.burn_addr.clone(), + ); + // Make connections between block proofs, and check initial and final block // values. Self::connect_block_proof(&mut builder, has_parent_block, &parent_pv, &agg_pv); @@ -1763,6 +1806,9 @@ where timing: &mut TimingTree, abort_signal: Option>, ) -> anyhow::Result> { + if generation_inputs.burn_addr.is_some() && !cfg!(feature = "cdk_erigon") { + log::warn!("The burn address in the GenerationInputs will be ignored, as the `cdk_erigon` feature is not activated.") + } let all_proof = prove::( all_stark, config, @@ -2037,6 +2083,7 @@ where let agg_public_values = PublicValues { trie_roots_before: lhs_public_values.trie_roots_before.clone(), trie_roots_after: real_public_values.trie_roots_after, + burn_addr: lhs_public_values.burn_addr, extra_block_data: ExtraBlockData { checkpoint_state_trie_root: lhs_public_values .extra_block_data @@ -2281,13 +2328,33 @@ where nonzero_pis.insert(key, value); } + let burn_addr_offset = match cfg!(feature = "cdk_erigon") { + true => BurnAddrTarget::get_size(), + false => 0, + }; + + #[cfg(feature = "cdk_erigon")] + { + let burn_addr_keys = + TrieRootsTarget::SIZE * 2..TrieRootsTarget::SIZE * 2 + burn_addr_offset; + for (key, &value) in burn_addr_keys.zip_eq(&u256_limbs( + public_values + .burn_addr + .expect("We should have a burn addr when cdk_erigon is activated"), + )) { + nonzero_pis.insert(key, value); + } + } // Initialize the checkpoint state root extra data. - let checkpoint_state_trie_keys = - TrieRootsTarget::SIZE * 2 + BlockMetadataTarget::SIZE + BlockHashesTarget::SIZE - ..TrieRootsTarget::SIZE * 2 - + BlockMetadataTarget::SIZE - + BlockHashesTarget::SIZE - + 8; + let checkpoint_state_trie_keys = burn_addr_offset + + TrieRootsTarget::SIZE * 2 + + BlockMetadataTarget::SIZE + + BlockHashesTarget::SIZE + ..burn_addr_offset + + TrieRootsTarget::SIZE * 2 + + BlockMetadataTarget::SIZE + + BlockHashesTarget::SIZE + + 8; for (key, &value) in checkpoint_state_trie_keys.zip_eq(&h256_limbs::( public_values.extra_block_data.checkpoint_state_trie_root, )) { @@ -2296,9 +2363,13 @@ where // Initialize checkpoint block hashes. // These will be all zeros the initial genesis checkpoint. - let block_hashes_keys = TrieRootsTarget::SIZE * 2 + BlockMetadataTarget::SIZE - ..TrieRootsTarget::SIZE * 2 + BlockMetadataTarget::SIZE + BlockHashesTarget::SIZE - - 8; + let block_hashes_keys = + burn_addr_offset + TrieRootsTarget::SIZE * 2 + BlockMetadataTarget::SIZE + ..burn_addr_offset + + TrieRootsTarget::SIZE * 2 + + BlockMetadataTarget::SIZE + + BlockHashesTarget::SIZE + - 8; for i in 0..public_values.block_hashes.prev_hashes.len() - 1 { let targets = h256_limbs::(public_values.block_hashes.prev_hashes[i]); @@ -2306,8 +2377,11 @@ where nonzero_pis.insert(block_hashes_keys.start + 8 * (i + 1) + j, targets[j]); } } - let block_hashes_current_start = - TrieRootsTarget::SIZE * 2 + BlockMetadataTarget::SIZE + BlockHashesTarget::SIZE - 8; + let block_hashes_current_start = burn_addr_offset + + TrieRootsTarget::SIZE * 2 + + BlockMetadataTarget::SIZE + + BlockHashesTarget::SIZE + - 8; let cur_targets = h256_limbs::(public_values.block_hashes.prev_hashes[255]); for i in 0..8 { nonzero_pis.insert(block_hashes_current_start + i, cur_targets[i]); @@ -2316,7 +2390,7 @@ where // Initialize the checkpoint block number. // Subtraction would result in an invalid proof for genesis, but we shouldn't // try proving this block anyway. - let block_number_key = TrieRootsTarget::SIZE * 2 + 6; + let block_number_key = burn_addr_offset + TrieRootsTarget::SIZE * 2 + 6; nonzero_pis.insert( block_number_key, F::from_canonical_u64(public_values.block_metadata.block_number.low_u64() - 1), diff --git a/evm_arithmetization/src/generation/mod.rs b/evm_arithmetization/src/generation/mod.rs index 9f1bd05c8..16d078d89 100644 --- a/evm_arithmetization/src/generation/mod.rs +++ b/evm_arithmetization/src/generation/mod.rs @@ -1,6 +1,7 @@ use std::collections::HashMap; use anyhow::anyhow; +use ethereum_types::H160; use ethereum_types::{Address, BigEndianHash, H256, U256}; use keccak_hash::keccak; use log::log_enabled; @@ -68,6 +69,11 @@ pub struct GenerationInputs { /// A None would yield an empty proof, otherwise this contains the encoding /// of a transaction. pub signed_txns: Vec>, + /// Target address for the base fee to be 'burnt', if there is one. If + /// `None`, then the base fee is directly burnt. + /// + /// Note: this is only used when feature `cdk_erigon` is activated. + pub burn_addr: Option, /// Withdrawal pairs `(addr, amount)`. At the end of the txs, `amount` is /// added to `addr`'s balance. See EIP-4895. pub withdrawals: Vec<(Address, U256)>, @@ -132,6 +138,10 @@ pub struct TrimmedGenerationInputs { /// Information contained in the block header. pub block_metadata: BlockMetadata, + /// Address where the burnt fees are stored. Only used if the `cfg_erigon` + /// feature is activated. + pub burn_addr: Option, + /// The hash of the current block, and a list of the 256 previous block /// hashes. pub block_hashes: BlockHashes, @@ -205,6 +215,7 @@ impl GenerationInputs { trie_roots_after: self.trie_roots_after.clone(), checkpoint_state_trie_root: self.checkpoint_state_trie_root, contract_code: self.contract_code.clone(), + burn_addr: self.burn_addr, block_metadata: self.block_metadata.clone(), block_hashes: self.block_hashes.clone(), } @@ -219,6 +230,10 @@ fn apply_metadata_and_tries_memops, const D: usize> ) { let metadata = &inputs.block_metadata; let trie_roots_after = &inputs.trie_roots_after; + #[cfg(feature = "cdk_erigon")] + let burn_addr = inputs + .burn_addr + .map_or_else(U256::max_value, |addr| U256::from_big_endian(&addr.0)); let fields = [ ( GlobalMetadata::BlockBeneficiary, @@ -284,6 +299,8 @@ fn apply_metadata_and_tries_memops, const D: usize> ), (GlobalMetadata::KernelHash, h2u(KERNEL.code_hash)), (GlobalMetadata::KernelLen, KERNEL.code.len().into()), + #[cfg(feature = "cdk_erigon")] + (GlobalMetadata::BurnAddr, burn_addr), ]; let channel = MemoryChannel::GeneralPurpose(0); @@ -488,12 +505,24 @@ pub fn generate_traces, const D: usize>( gas_used_after, }; + let burn_addr = match cfg!(feature = "cdk_erigon") { + true => { + if let Some(burn_addr) = inputs.burn_addr { + Some(U256::from_big_endian(&burn_addr.0)) + } else { + Some(U256::MAX) + } + } + false => None, + }; + // `mem_before` and `mem_after` are initialized with an empty cap. // They will be set to the caps of `MemBefore` and `MemAfter` // respectively, while proving. let public_values = PublicValues { trie_roots_before, trie_roots_after, + burn_addr, block_metadata: inputs.block_metadata.clone(), block_hashes: inputs.block_hashes.clone(), extra_block_data, diff --git a/evm_arithmetization/src/get_challenges.rs b/evm_arithmetization/src/get_challenges.rs index 1fb80af6d..bb37e01f0 100644 --- a/evm_arithmetization/src/get_challenges.rs +++ b/evm_arithmetization/src/get_challenges.rs @@ -138,6 +138,33 @@ fn observe_extra_block_data_target< challenger.observe_element(extra_data.gas_used_after); } +#[cfg(feature = "cdk_erigon")] +fn observe_burn_addr, C: GenericConfig, const D: usize>( + challenger: &mut Challenger, + burn_addr: U256, +) -> Result<(), ProgramError> { + challenger.observe_elements(&u256_limbs(burn_addr)); + Ok(()) +} + +#[cfg(feature = "cdk_erigon")] +/// This will panic if no burn address was specified. +fn observe_burn_addr_target< + F: RichField + Extendable, + C: GenericConfig, + const D: usize, +>( + challenger: &mut RecursiveChallenger, + burn_addr: BurnAddrTarget, +) where + C::Hasher: AlgebraicHasher, +{ + match burn_addr { + BurnAddrTarget::BurnAddr(addr) => challenger.observe_elements(&addr), + BurnAddrTarget::Burnt() => panic!("There should be an address set in cdk_erigon."), + } +} + fn observe_block_hashes< F: RichField + Extendable, C: GenericConfig, @@ -178,7 +205,19 @@ pub(crate) fn observe_public_values< observe_trie_roots::(challenger, &public_values.trie_roots_after); observe_block_metadata::(challenger, &public_values.block_metadata)?; observe_block_hashes::(challenger, &public_values.block_hashes); - observe_extra_block_data::(challenger, &public_values.extra_block_data) + observe_extra_block_data::(challenger, &public_values.extra_block_data)?; + + #[cfg(feature = "cdk_erigon")] + { + observe_burn_addr::( + challenger, + public_values + .burn_addr + .expect("There should be an address set in cdk_erigon."), + )?; + } + + Ok(()) } pub(crate) fn observe_public_values_target< @@ -196,6 +235,8 @@ pub(crate) fn observe_public_values_target< observe_block_metadata_target::(challenger, &public_values.block_metadata); observe_block_hashes_target::(challenger, &public_values.block_hashes); observe_extra_block_data_target::(challenger, &public_values.extra_block_data); + #[cfg(feature = "cdk_erigon")] + observe_burn_addr_target::(challenger, public_values.burn_addr.clone()); } impl, C: GenericConfig, const D: usize> AllProof { diff --git a/evm_arithmetization/src/proof.rs b/evm_arithmetization/src/proof.rs index eeb0a86db..6c59b9deb 100644 --- a/evm_arithmetization/src/proof.rs +++ b/evm_arithmetization/src/proof.rs @@ -52,6 +52,9 @@ pub struct PublicValues { pub trie_roots_before: TrieRoots, /// Trie hashes after the execution of the local state transition. pub trie_roots_after: TrieRoots, + /// Address to store the base fee to be burnt: only used when feature + /// `cdk_erigon` is active. + pub burn_addr: Option, /// Block metadata: it remains unchanged within a block. pub block_metadata: BlockMetadata, /// 256 previous block hashes and current block's hash. @@ -82,6 +85,15 @@ impl PublicValues { let trie_roots_after = TrieRoots::from_public_inputs(&pis[offset..offset + TrieRootsTarget::SIZE]); offset += TrieRootsTarget::SIZE; + let burn_addr = match cfg!(feature = "cdk_erigon") { + true => Some(get_u256( + &pis[offset..offset + BurnAddrTarget::get_size()] + .try_into() + .unwrap(), + )), + false => None, + }; + offset += BurnAddrTarget::get_size(); let block_metadata = BlockMetadata::from_public_inputs(&pis[offset..offset + BlockMetadataTarget::SIZE]); offset += BlockMetadataTarget::SIZE; @@ -104,6 +116,7 @@ impl PublicValues { Self { trie_roots_before, trie_roots_after, + burn_addr, block_metadata, block_hashes, extra_block_data, @@ -476,6 +489,8 @@ pub struct PublicValuesTarget { pub trie_roots_before: TrieRootsTarget, /// Trie hashes after the execution of the local state transition. pub trie_roots_after: TrieRootsTarget, + /// Address to store the base fee to be burnt. + pub burn_addr: BurnAddrTarget, /// Block metadata: it remains unchanged within a block. pub block_metadata: BlockMetadataTarget, /// 256 previous block hashes and current block's hash. @@ -618,6 +633,11 @@ impl PublicValuesTarget { receipts_root: buffer.read_target_array()?, }; + let burn_addr = match cfg!(feature = "cdk_erigon") { + true => BurnAddrTarget::BurnAddr(buffer.read_target_array()?), + false => BurnAddrTarget::Burnt(), + }; + let block_metadata = BlockMetadataTarget { block_beneficiary: buffer.read_target_array()?, block_timestamp: buffer.read_target()?, @@ -674,6 +694,7 @@ impl PublicValuesTarget { Ok(Self { trie_roots_before, trie_roots_after, + burn_addr, block_metadata, block_hashes, extra_block_data, @@ -697,6 +718,9 @@ impl PublicValuesTarget { let trie_roots_after = TrieRootsTarget::from_public_inputs(&pis[offset..offset + TrieRootsTarget::SIZE]); offset += TrieRootsTarget::SIZE; + let burn_addr = + BurnAddrTarget::from_public_inputs(&pis[offset..offset + BurnAddrTarget::get_size()]); + offset += BurnAddrTarget::get_size(); let block_metadata = BlockMetadataTarget::from_public_inputs( &pis[offset..offset + BlockMetadataTarget::SIZE], ); @@ -724,6 +748,7 @@ impl PublicValuesTarget { Self { trie_roots_before, trie_roots_after, + burn_addr, block_metadata, block_hashes, extra_block_data, @@ -754,6 +779,7 @@ impl PublicValuesTarget { pv0.trie_roots_after, pv1.trie_roots_after, ), + burn_addr: BurnAddrTarget::select(builder, condition, pv0.burn_addr, pv1.burn_addr), block_metadata: BlockMetadataTarget::select( builder, condition, @@ -890,6 +916,115 @@ impl TrieRootsTarget { } } +/// Circuit version of `BurnAddr`. +/// Address used to store the base fee to be burnt. +#[derive(Eq, PartialEq, Debug, Clone)] +pub enum BurnAddrTarget { + BurnAddr([Target; 8]), + Burnt(), +} + +impl BurnAddrTarget { + pub fn get_size() -> usize { + match cfg!(feature = "cdk_erigon") { + true => 8, + false => 0, + } + } + + /// Extracts the burn address from the provided public input + /// `Target`s. The provided `pis` should start with the burn address. + pub(crate) fn from_public_inputs(pis: &[Target]) -> Self { + match cfg!(feature = "cdk_erigon") { + true => BurnAddrTarget::BurnAddr(pis[0..8].try_into().unwrap()), + false => BurnAddrTarget::Burnt(), + } + } + + /// If `condition`, returns the burn address in `ba0`, + /// otherwise returns the burn address in `ba1`. + /// This is a no-op if `cdk_erigon` feature is not activated. + /// + /// This will panic if the `cdk_erigon` is activated and not both + /// `BurnAddrTarget`s are `BurnAddr` variants. + pub(crate) fn select, const D: usize>( + builder: &mut CircuitBuilder, + condition: BoolTarget, + ba0: Self, + ba1: Self, + ) -> Self { + match cfg!(feature = "cdk_erigon") { + // If the `cdk_erigon` feature is activated, both `ba0` and `ba1` should be of type + // `BurnAddr`. + true => match (ba0, ba1) { + (BurnAddrTarget::BurnAddr(a0), BurnAddrTarget::BurnAddr(a1)) => { + BurnAddrTarget::BurnAddr(core::array::from_fn(|i| { + builder.select(condition, a0[i], a1[i]) + })) + } + _ => panic!("We should have already set an address (or U256::MAX) before."), + }, + false => BurnAddrTarget::Burnt(), + } + } + + /// Connects the burn address in `ba0` to the burn address in `ba1`. + /// This is a no-op if `cdk_erigon` feature is not activated. + /// + /// This will panic if the `cdk_erigon` is activated and not both + /// `BurnAddrTarget`s are `BurnAddr` variants. + pub(crate) fn connect, const D: usize>( + builder: &mut CircuitBuilder, + ba0: Self, + ba1: Self, + ) { + // There only are targets to connect if there is a burn address, i.e. when the + // `cdk_erigon` feature is active. + if cfg!(feature = "cdk_erigon") == true { + // If the `cdk_erigon` feature is activated, both `ba0` and `ba1` should be of + // type `BurnAddr`. + match (ba0, ba1) { + (BurnAddrTarget::BurnAddr(a0), BurnAddrTarget::BurnAddr(a1)) => { + for i in 0..BurnAddrTarget::get_size() { + builder.connect(a0[i], a1[i]); + } + } + _ => panic!("We should have already set an address (or U256::MAX) before."), + } + } + } + + /// If `condition`, asserts that `ba0 == ba1`. + /// This is a no-op if `cdk_erigon` feature is not activated. + /// + /// This will panic if the `cdk_erigon` is activated and not both + /// `BurnAddrTarget` are `BurnAddr` variants. + pub(crate) fn conditional_assert_eq, const D: usize>( + builder: &mut CircuitBuilder, + condition: BoolTarget, + ba0: Self, + ba1: Self, + ) { + if cfg!(feature = "cdk_erigon") { + match (ba0, ba1) { + ( + BurnAddrTarget::BurnAddr(addr_targets_0), + BurnAddrTarget::BurnAddr(addr_targets_1), + ) => { + for i in 0..BurnAddrTarget::get_size() { + builder.conditional_assert_eq( + condition.target, + addr_targets_0[i], + addr_targets_1[i], + ) + } + } + _ => panic!("There should be an address set in cdk_erigon."), + } + } + } +} + /// Circuit version of `BlockMetadata`. /// Metadata contained in a block header. Those are identical between /// all state transition proofs within the same block. diff --git a/evm_arithmetization/src/prover.rs b/evm_arithmetization/src/prover.rs index 8cef8d647..2f308898a 100644 --- a/evm_arithmetization/src/prover.rs +++ b/evm_arithmetization/src/prover.rs @@ -40,6 +40,9 @@ where F: RichField + Extendable, C: GenericConfig, { + if inputs.burn_addr.is_some() && !cfg!(feature = "cdk_erigon") { + log::warn!("The burn address in the GenerationInputs will be ignored, as the `cdk_erigon` feature is not activated.") + } // Sanity check on the provided config assert_eq!(DEFAULT_CAP_LEN, 1 << config.fri_config.cap_height); @@ -467,6 +470,9 @@ pub mod testing { /// Simulates the zkEVM CPU execution. /// It does not generate any trace or proof of correct state transition. pub fn simulate_execution(inputs: GenerationInputs) -> Result<()> { + if inputs.burn_addr.is_some() && !cfg!(feature = "cdk_erigon") { + log::warn!("The burn address in the GenerationInputs will be ignored, as the `cdk_erigon` feature is not activated.") + } let initial_stack = vec![]; let initial_offset = KERNEL.global_labels["init"]; let mut interpreter: Interpreter = diff --git a/evm_arithmetization/src/recursive_verifier.rs b/evm_arithmetization/src/recursive_verifier.rs index 8f82f4bf2..a15c86b2d 100644 --- a/evm_arithmetization/src/recursive_verifier.rs +++ b/evm_arithmetization/src/recursive_verifier.rs @@ -35,9 +35,9 @@ use crate::cpu::kernel::constants::global_metadata::GlobalMetadata; use crate::memory::segments::Segment; use crate::memory::VALUE_LIMBS; use crate::proof::{ - BlockHashes, BlockHashesTarget, BlockMetadata, BlockMetadataTarget, ExtraBlockData, - ExtraBlockDataTarget, FinalPublicValues, FinalPublicValuesTarget, MemCap, MemCapTarget, - PublicValues, PublicValuesTarget, RegistersData, RegistersDataTarget, TrieRoots, + BlockHashes, BlockHashesTarget, BlockMetadata, BlockMetadataTarget, BurnAddrTarget, + ExtraBlockData, ExtraBlockDataTarget, FinalPublicValues, FinalPublicValuesTarget, MemCap, + MemCapTarget, PublicValues, PublicValuesTarget, RegistersData, RegistersDataTarget, TrieRoots, TrieRootsTarget, DEFAULT_CAP_LEN, }; use crate::util::{h256_limbs, u256_limbs, u256_to_u32, u256_to_u64}; @@ -428,6 +428,22 @@ pub(crate) fn get_memory_extra_looking_sum_circuit, ); }); + #[cfg(feature = "cdk_erigon")] + { + let burn_addr = match public_values.burn_addr { + BurnAddrTarget::BurnAddr(addr) => addr, + BurnAddrTarget::Burnt() => panic!("There should be an address set in cdk_erigon."), + }; + sum = add_data_write( + builder, + challenge, + sum, + metadata_segment, + GlobalMetadata::BurnAddr.unscale(), + &burn_addr, + ); + } + block_fields_arrays.map(|(field, targets)| { sum = add_data_write( builder, @@ -635,6 +651,7 @@ pub(crate) fn add_virtual_public_values_public_input< ) -> PublicValuesTarget { let trie_roots_before = add_virtual_trie_roots_public_input(builder); let trie_roots_after = add_virtual_trie_roots_public_input(builder); + let burn_addr = add_virtual_burn_addr(builder); let block_metadata = add_virtual_block_metadata_public_input(builder); let block_hashes = add_virtual_block_hashes_public_input(builder); let extra_block_data = add_virtual_extra_block_data_public_input(builder); @@ -651,6 +668,7 @@ pub(crate) fn add_virtual_public_values_public_input< PublicValuesTarget { trie_roots_before, trie_roots_after, + burn_addr, block_metadata, block_hashes, extra_block_data, @@ -661,6 +679,15 @@ pub(crate) fn add_virtual_public_values_public_input< } } +pub(crate) fn add_virtual_burn_addr, const D: usize>( + builder: &mut CircuitBuilder, +) -> BurnAddrTarget { + match cfg!(feature = "cdk_erigon") { + true => BurnAddrTarget::BurnAddr(builder.add_virtual_public_input_arr()), + false => BurnAddrTarget::Burnt(), + } +} + pub(crate) fn add_virtual_trie_roots_public_input, const D: usize>( builder: &mut CircuitBuilder, ) -> TrieRootsTarget { @@ -819,6 +846,14 @@ where &public_values_target.extra_block_data, &public_values.extra_block_data, )?; + #[cfg(feature = "cdk_erigon")] + set_burn_addr_target( + witness, + &public_values_target.burn_addr, + public_values + .burn_addr + .expect("There should be an address set in cdk_erigon."), + )?; set_registers_target( witness, &public_values_target.registers_before, @@ -944,6 +979,27 @@ pub(crate) fn set_trie_roots_target( } } +#[cfg(feature = "cdk_erigon")] +pub(crate) fn set_burn_addr_target( + witness: &mut W, + burn_addr_target: &BurnAddrTarget, + burn_addr: U256, +) -> Result<(), ProgramError> +where + F: RichField + Extendable, + W: Witness, +{ + match burn_addr_target { + BurnAddrTarget::BurnAddr(addr_target) => { + let burn_addr_limbs: [F; 8] = u256_limbs::(burn_addr); + witness.set_target_arr(addr_target, &burn_addr_limbs); + } + BurnAddrTarget::Burnt() => panic!("There should be an address target set in cdk_erigon."), + } + + Ok(()) +} + pub(crate) fn set_block_metadata_target( witness: &mut W, block_metadata_target: &BlockMetadataTarget, diff --git a/evm_arithmetization/src/verifier.rs b/evm_arithmetization/src/verifier.rs index 329289c39..845c58eb5 100644 --- a/evm_arithmetization/src/verifier.rs +++ b/evm_arithmetization/src/verifier.rs @@ -274,6 +274,13 @@ where GlobalMetadata::BlockBeneficiary, U256::from_big_endian(&public_values.block_metadata.block_beneficiary.0), ), + #[cfg(feature = "cdk_erigon")] + ( + GlobalMetadata::BurnAddr, + public_values + .burn_addr + .expect("There should be an address set in cdk_erigon."), + ), ( GlobalMetadata::BlockTimestamp, public_values.block_metadata.block_timestamp, diff --git a/evm_arithmetization/tests/add11_yml.rs b/evm_arithmetization/tests/add11_yml.rs index 8de4e36ae..ed5eaaa94 100644 --- a/evm_arithmetization/tests/add11_yml.rs +++ b/evm_arithmetization/tests/add11_yml.rs @@ -187,6 +187,7 @@ fn get_generation_inputs() -> GenerationInputs { GenerationInputs { signed_txns: vec![txn.to_vec()], + burn_addr: None, withdrawals: vec![], global_exit_roots: vec![], tries: tries_before, diff --git a/evm_arithmetization/tests/erc20.rs b/evm_arithmetization/tests/erc20.rs index 13ef8ee21..b9f3d6cf0 100644 --- a/evm_arithmetization/tests/erc20.rs +++ b/evm_arithmetization/tests/erc20.rs @@ -181,6 +181,7 @@ fn test_erc20() -> anyhow::Result<()> { let inputs = GenerationInputs { signed_txns: vec![txn.to_vec()], + burn_addr: None, withdrawals: vec![], global_exit_roots: vec![], tries: tries_before, diff --git a/evm_arithmetization/tests/erc721.rs b/evm_arithmetization/tests/erc721.rs index 4cf347afc..df3099e1f 100644 --- a/evm_arithmetization/tests/erc721.rs +++ b/evm_arithmetization/tests/erc721.rs @@ -184,6 +184,7 @@ fn test_erc721() -> anyhow::Result<()> { let inputs = GenerationInputs { signed_txns: vec![txn.to_vec()], + burn_addr: None, withdrawals: vec![], global_exit_roots: vec![], tries: tries_before, diff --git a/evm_arithmetization/tests/global_exit_root.rs b/evm_arithmetization/tests/global_exit_root.rs index 302b1a143..69e45bef4 100644 --- a/evm_arithmetization/tests/global_exit_root.rs +++ b/evm_arithmetization/tests/global_exit_root.rs @@ -78,6 +78,7 @@ fn test_global_exit_root() -> anyhow::Result<()> { let inputs = GenerationInputs { signed_txns: vec![], + burn_addr: None, withdrawals: vec![], global_exit_roots, tries: TrieInputs { diff --git a/evm_arithmetization/tests/log_opcode.rs b/evm_arithmetization/tests/log_opcode.rs index 5ac537c4e..8d71e0a19 100644 --- a/evm_arithmetization/tests/log_opcode.rs +++ b/evm_arithmetization/tests/log_opcode.rs @@ -156,6 +156,13 @@ fn test_log_opcodes() -> anyhow::Result<()> { // Update the state and receipt tries after the transaction, so that we have the // correct expected tries: Update accounts + #[cfg(feature = "cdk_erigon")] + let beneficiary_account_after = AccountRlp { + nonce: 1.into(), + balance: block_metadata.block_base_fee * gas_used, + ..AccountRlp::default() + }; + #[cfg(not(feature = "cdk_erigon"))] let beneficiary_account_after = AccountRlp { nonce: 1.into(), ..AccountRlp::default() @@ -237,8 +244,14 @@ fn test_log_opcodes() -> anyhow::Result<()> { receipts_root: receipts_trie.hash(), }; + let burn_addr = match cfg!(feature = "cdk_erigon") { + true => Some(Address::from(beneficiary)), + false => None, + }; + let inputs = GenerationInputs { signed_txns: vec![txn.to_vec()], + burn_addr, withdrawals: vec![], global_exit_roots: vec![], tries: tries_before, diff --git a/evm_arithmetization/tests/selfdestruct.rs b/evm_arithmetization/tests/selfdestruct.rs index 97f41b78d..a4b6aa4f9 100644 --- a/evm_arithmetization/tests/selfdestruct.rs +++ b/evm_arithmetization/tests/selfdestruct.rs @@ -155,6 +155,7 @@ fn test_selfdestruct() -> anyhow::Result<()> { let inputs = GenerationInputs { signed_txns: vec![txn.to_vec()], + burn_addr: None, withdrawals: vec![], global_exit_roots: vec![], tries: tries_before, diff --git a/evm_arithmetization/tests/simple_transfer.rs b/evm_arithmetization/tests/simple_transfer.rs index 81cd62113..d497142a4 100644 --- a/evm_arithmetization/tests/simple_transfer.rs +++ b/evm_arithmetization/tests/simple_transfer.rs @@ -147,6 +147,7 @@ fn test_simple_transfer() -> anyhow::Result<()> { let inputs = GenerationInputs { signed_txns: vec![txn.to_vec()], + burn_addr: None, withdrawals: vec![], global_exit_roots: vec![], tries: tries_before, diff --git a/evm_arithmetization/tests/two_to_one_block.rs b/evm_arithmetization/tests/two_to_one_block.rs index 326bd08cc..ba0396693 100644 --- a/evm_arithmetization/tests/two_to_one_block.rs +++ b/evm_arithmetization/tests/two_to_one_block.rs @@ -94,6 +94,7 @@ fn dummy_payload(timestamp: u64, is_first_payload: bool) -> anyhow::Result anyhow::Result<()> { let inputs = GenerationInputs { signed_txns: vec![], + burn_addr: None, withdrawals, global_exit_roots: vec![], tries: TrieInputs { diff --git a/trace_decoder/benches/block_processing.rs b/trace_decoder/benches/block_processing.rs index 6f3319d94..c6e9716e3 100644 --- a/trace_decoder/benches/block_processing.rs +++ b/trace_decoder/benches/block_processing.rs @@ -33,7 +33,7 @@ fn criterion_benchmark(c: &mut Criterion) { block_trace, other_data, }| { - trace_decoder::entrypoint(block_trace, other_data, batch_size).unwrap() + trace_decoder::entrypoint(block_trace, other_data, batch_size, false).unwrap() }, BatchSize::LargeInput, ) diff --git a/trace_decoder/src/decoding.rs b/trace_decoder/src/decoding.rs index 28de10e61..0e044b0a8 100644 --- a/trace_decoder/src/decoding.rs +++ b/trace_decoder/src/decoding.rs @@ -1,6 +1,7 @@ use std::{cmp::min, collections::HashMap, ops::Range}; use anyhow::{anyhow, Context as _}; +use ethereum_types::H160; use ethereum_types::{Address, BigEndianHash, H256, U256, U512}; use evm_arithmetization::{ generation::{ @@ -55,6 +56,7 @@ pub fn into_txn_proof_gen_ir( withdrawals, }: ProcessedBlockTrace, other_data: OtherBlockData, + use_burn_addr: bool, batch_size: usize, ) -> anyhow::Result> { let mut curr_block_tries = PartialTrieState { @@ -91,6 +93,7 @@ pub fn into_txn_proof_gen_ir( &mut curr_block_tries, &mut extra_data, &other_data, + use_burn_addr, ) .context(format!( "at transaction range {}..{}", @@ -515,6 +518,7 @@ fn process_txn_info( >, extra_data: &mut ExtraBlockData, other_data: &OtherBlockData, + use_burn_target: bool, ) -> anyhow::Result { log::trace!( "Generating proof IR for txn {} through {}...", @@ -573,8 +577,15 @@ fn process_txn_info( delta_out, )?; + let burn_addr = match use_burn_target { + // TODO: https://github.com/0xPolygonZero/zk_evm/issues/565 + // Retrieve the actual burn address from `cdk-erigon`. + true => Some(H160::zero()), + false => None, + }; let gen_inputs = GenerationInputs { txn_number_before: extra_data.txn_number_before, + burn_addr, gas_used_before: extra_data.gas_used_before, gas_used_after: extra_data.gas_used_after, signed_txns: txn_info diff --git a/trace_decoder/src/lib.rs b/trace_decoder/src/lib.rs index bcd441438..3e0ba29f8 100644 --- a/trace_decoder/src/lib.rs +++ b/trace_decoder/src/lib.rs @@ -288,6 +288,7 @@ pub fn entrypoint( trace: BlockTrace, other: OtherBlockData, batch_size: usize, + use_burn_addr: bool, ) -> anyhow::Result> { use anyhow::Context as _; use mpt_trie::partial_trie::PartialTrie as _; @@ -437,6 +438,7 @@ pub fn entrypoint( withdrawals: other.b_data.withdrawals.clone(), }, other, + use_burn_addr, batch_size, ) } diff --git a/trace_decoder/tests/trace_decoder_tests.rs b/trace_decoder/tests/trace_decoder_tests.rs index 3d2ca96b9..63cd4dd37 100644 --- a/trace_decoder/tests/trace_decoder_tests.rs +++ b/trace_decoder/tests/trace_decoder_tests.rs @@ -77,12 +77,14 @@ fn derive_header_file_path(witness_file_path: &Path) -> Result anyhow::Result> { let block_num = block_prover_input.other_data.b_data.b_meta.block_number; let trace_decoder_output = trace_decoder::entrypoint( block_prover_input.block_trace, block_prover_input.other_data.clone(), 3, + use_burn_addr, ) .context(format!( "Failed to execute trace decoder on block {}", @@ -168,6 +170,10 @@ fn verify_generation_inputs( fn test_parsing_decoding_proving(#[case] test_witness_directory: &str) { init_logger(); + // TODO: https://github.com/0xPolygonZero/zk_evm/issues/565 + // Once CDK_ERIGON_WITNESS_DIR is available, change this so + // `use_burn_addr` is only true in that case. + let use_burn_addr = test_witness_directory != JERIGON_WITNESS_DIR; let results = find_witness_data_files(test_witness_directory) .expect("valid json data files found") .into_iter() @@ -180,7 +186,8 @@ fn test_parsing_decoding_proving(#[case] test_witness_directory: &str) { .map_ok(|block_prover_inputs| { block_prover_inputs.into_iter().map(|block_prover_input| { // Run trace decoder, create list of generation inputs - let block_generation_inputs = decode_generation_inputs(block_prover_input)?; + let block_generation_inputs = + decode_generation_inputs(block_prover_input, use_burn_addr)?; block_generation_inputs .into_par_iter() .map(|generation_inputs| { @@ -225,6 +232,10 @@ fn test_parsing_decoding_proving(#[case] test_witness_directory: &str) { fn test_generation_inputs_consistency(#[case] test_witness_directory: &str) { init_logger(); + // TODO: https://github.com/0xPolygonZero/zk_evm/issues/565 + // Once CDK_ERIGON_WITNESS_DIR is available, change this so + // `use_burn_addr` is only true in that case. + let use_burn_addr = test_witness_directory != JERIGON_WITNESS_DIR; let result: Vec> = find_witness_data_files(test_witness_directory) .expect("valid json data files found") .into_iter() @@ -254,7 +265,8 @@ fn test_generation_inputs_consistency(#[case] test_witness_directory: &str) { .map_ok(|(block_header, block_prover_input)| { let other_block_data = block_prover_input.other_data.clone(); // Run trace decoder, create generation inputs for this block - let block_generation_inputs = decode_generation_inputs(block_prover_input)?; + let block_generation_inputs = + decode_generation_inputs(block_prover_input, use_burn_addr)?; // Verify generation inputs for this block verify_generation_inputs(&block_header, &other_block_data, block_generation_inputs) }) diff --git a/zero_bin/leader/Cargo.toml b/zero_bin/leader/Cargo.toml index 73a1ef4e9..1f70f96a2 100644 --- a/zero_bin/leader/Cargo.toml +++ b/zero_bin/leader/Cargo.toml @@ -30,10 +30,12 @@ toml = { workspace = true } ops = { workspace = true } prover = { workspace = true } rpc = { workspace = true } +evm_arithmetization = { workspace = true } zero_bin_common = { workspace = true } [features] default = [] +cdk_erigon = ["prover/cdk_erigon", "evm_arithmetization/cdk_erigon", "rpc/cdk_erigon"] [build-dependencies] cargo_metadata = { workspace = true } diff --git a/zero_bin/prover/Cargo.toml b/zero_bin/prover/Cargo.toml index d0d3ee4b3..d96f2ff0f 100644 --- a/zero_bin/prover/Cargo.toml +++ b/zero_bin/prover/Cargo.toml @@ -30,6 +30,7 @@ clap = {workspace = true} [features] default = [] +cdk_erigon = [] [lints] workspace = true diff --git a/zero_bin/prover/src/lib.rs b/zero_bin/prover/src/lib.rs index 46472bc7f..0d49ca733 100644 --- a/zero_bin/prover/src/lib.rs +++ b/zero_bin/prover/src/lib.rs @@ -68,8 +68,13 @@ impl BlockProverInput { let block_number = self.get_block_number(); - let block_generation_inputs = - trace_decoder::entrypoint(self.block_trace, self.other_data, batch_size)?; + let use_burn_addr = cfg!(feature = "cdk_erigon"); + let block_generation_inputs = trace_decoder::entrypoint( + self.block_trace, + self.other_data, + batch_size, + use_burn_addr, + )?; // Create segment proof. let seg_prove_ops = ops::SegmentProof { @@ -158,8 +163,13 @@ impl BlockProverInput { let block_number = self.get_block_number(); info!("Testing witness generation for block {block_number}."); - let block_generation_inputs = - trace_decoder::entrypoint(self.block_trace, self.other_data, batch_size)?; + let use_burn_addr = cfg!(feature = "cdk_erigon"); + let block_generation_inputs = trace_decoder::entrypoint( + self.block_trace, + self.other_data, + batch_size, + use_burn_addr, + )?; let seg_ops = ops::SegmentProofTestOnly { save_inputs_on_error, diff --git a/zero_bin/rpc/Cargo.toml b/zero_bin/rpc/Cargo.toml index e6b9078e9..046461569 100644 --- a/zero_bin/rpc/Cargo.toml +++ b/zero_bin/rpc/Cargo.toml @@ -37,3 +37,6 @@ prover = { workspace = true } cargo_metadata = { workspace = true } vergen = { workspace = true } anyhow = { workspace = true } + +[features] +cdk_erigon = [] \ No newline at end of file diff --git a/zero_bin/rpc/src/main.rs b/zero_bin/rpc/src/main.rs index 411b8ed97..7ac9db60c 100644 --- a/zero_bin/rpc/src/main.rs +++ b/zero_bin/rpc/src/main.rs @@ -167,10 +167,12 @@ impl Cli { block_number ))?; + let use_burn_addr = cfg!(feature = "cdk_erigon"); let generation_inputs = trace_decoder::entrypoint( block_prover_input.block_trace, block_prover_input.other_data, batch_size, + use_burn_addr, )?; if let Some(index) = tx_info.transaction_index {