diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7fe26d8e..1cf72d62 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,9 +2,9 @@ name: test on: push: - branches: [ "master" ] + branches: ["master"] pull_request: - branches: [ "master" ] + branches: ["master"] env: MAINNET_EXECUTION_RPC: ${{ secrets.MAINNET_EXECUTION_RPC }} diff --git a/Cargo.lock b/Cargo.lock index dfdffd41..224bb775 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -78,6 +78,8 @@ dependencies = [ "derive_more", "hex-literal", "itoa", + "proptest", + "rand 0.8.5", "ruint", "serde", "tiny-keccak 2.0.2", @@ -181,6 +183,130 @@ version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" +[[package]] +name = "ark-ff" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b3235cc41ee7a12aaaf2c575a2ad7b46713a8a50bda2fc3b003a04845c05dd6" +dependencies = [ + "ark-ff-asm 0.3.0", + "ark-ff-macros 0.3.0", + "ark-serialize 0.3.0", + "ark-std 0.3.0", + "derivative", + "num-bigint", + "num-traits", + "paste", + "rustc_version 0.3.3", + "zeroize", +] + +[[package]] +name = "ark-ff" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" +dependencies = [ + "ark-ff-asm 0.4.2", + "ark-ff-macros 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "derivative", + "digest 0.10.7", + "itertools 0.10.5", + "num-bigint", + "num-traits", + "paste", + "rustc_version 0.4.0", + "zeroize", +] + +[[package]] +name = "ark-ff-asm" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db02d390bf6643fb404d3d22d31aee1c4bc4459600aef9113833d17e786c6e44" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-asm" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fd794a08ccb318058009eefdf15bcaaaaf6f8161eb3345f907222bac38b20" +dependencies = [ + "num-bigint", + "num-traits", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-serialize" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6c2b318ee6e10f8c2853e73a83adc0ccb88995aa978d8a3408d492ab2ee671" +dependencies = [ + "ark-std 0.3.0", + "digest 0.9.0", +] + +[[package]] +name = "ark-serialize" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +dependencies = [ + "ark-std 0.4.0", + "digest 0.10.7", + "num-bigint", +] + +[[package]] +name = "ark-std" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1df2c09229cbc5a028b1d70e00fdb2acee28b1055dfb5ca73eea49c5a25c4e7c" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + +[[package]] +name = "ark-std" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + [[package]] name = "arrayvec" version = "0.5.2" @@ -230,7 +356,7 @@ checksum = "b6d7b9decdf35d8908a7e3ef02f64c5e9b1695e230154c0e8de3969142d9b94c" dependencies = [ "futures", "pharos", - "rustc_version", + "rustc_version 0.4.0", ] [[package]] @@ -248,6 +374,16 @@ version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" +[[package]] +name = "aurora-engine-modexp" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0aef7712851e524f35fbbb74fa6599c5cd8692056a1c36f9ca0d2001b670e7e5" +dependencies = [ + "hex", + "num", +] + [[package]] name = "auto_impl" version = "1.2.0" @@ -325,38 +461,6 @@ dependencies = [ "serde", ] -[[package]] -name = "bincode" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" -dependencies = [ - "serde", -] - -[[package]] -name = "bindgen" -version = "0.66.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2b84e06fc203107bfbad243f4aba2af864eb7db3b1cf46ea0a023b0b433d2a7" -dependencies = [ - "bitflags 2.6.0", - "cexpr", - "clang-sys", - "lazy_static", - "lazycell", - "log", - "peeking_take_while", - "prettyplease", - "proc-macro2", - "quote", - "regex", - "rustc-hash", - "shlex", - "syn 2.0.72", - "which", -] - [[package]] name = "bit-set" version = "0.5.3" @@ -428,22 +532,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "bls12_381" -version = "0.8.0" -source = "git+https://github.com/succinctlabs/bls12_381#0d32fdeb01fe829dd47169c79519bb2e5c0bde7f" -dependencies = [ - "digest 0.9.0", - "eyre", - "ff", - "group", - "pairing", - "rand_core 0.6.4", - "sha2 0.9.9", - "sp1-lib", - "subtle", -] - [[package]] name = "blst" version = "0.3.12" @@ -538,11 +626,10 @@ dependencies = [ [[package]] name = "c-kzg" -version = "0.1.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac926d808fb72fe09ebf471a091d6d72918876ccf0b4989766093d2d0d24a0ef" +checksum = "94a4bc5367b6284358d2a6a6a1dc2d92ec4b86034561c3b9d3341909752fd848" dependencies = [ - "bindgen", "blst", "cc", "glob", @@ -577,7 +664,7 @@ checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" dependencies = [ "camino", "cargo-platform", - "semver", + "semver 1.0.23", "serde", "serde_json", "thiserror", @@ -599,15 +686,6 @@ dependencies = [ "libc", ] -[[package]] -name = "cexpr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" -dependencies = [ - "nom", -] - [[package]] name = "cfg-if" version = "1.0.0" @@ -671,17 +749,6 @@ 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.10" @@ -832,13 +899,13 @@ checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" name = "common" version = "0.5.5" dependencies = [ - "bls12_381", "bytes", "ethers-core", "eyre", "hex", "serde", "serde_json", + "snowbridge-milagro-bls", "ssz_rs", "superstruct", "thiserror", @@ -873,7 +940,6 @@ name = "consensus" version = "0.5.5" dependencies = [ "async-trait", - "bls12_381", "bytes", "chrono", "common", @@ -890,6 +956,7 @@ dependencies = [ "retri", "serde", "serde_json", + "snowbridge-milagro-bls", "ssz_rs", "superstruct", "thiserror", @@ -903,7 +970,6 @@ dependencies = [ name = "consensus-core" version = "0.1.0" dependencies = [ - "bls12_381", "bytes", "common", "ethers-core", @@ -911,6 +977,7 @@ dependencies = [ "hex", "serde", "serde_json", + "snowbridge-milagro-bls", "ssz_rs", "superstruct", "thiserror", @@ -1209,6 +1276,17 @@ dependencies = [ "powerfmt", ] +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "derive_more" version = "0.99.18" @@ -1218,7 +1296,7 @@ dependencies = [ "convert_case", "proc-macro2", "quote", - "rustc_version", + "rustc_version 0.4.0", "syn 2.0.72", ] @@ -1636,7 +1714,7 @@ dependencies = [ "chrono", "ethers-core", "reqwest 0.11.27", - "semver", + "semver 1.0.23", "serde", "serde_json", "thiserror", @@ -1741,7 +1819,7 @@ dependencies = [ "path-slash", "rayon", "regex", - "semver", + "semver 1.0.23", "serde", "serde_json", "solang-parser", @@ -1802,6 +1880,17 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" +[[package]] +name = "fastrlp" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "139834ddba373bbdd213dffe02c8d110508dcf1726c2be27e8d1f7d7e1856418" +dependencies = [ + "arrayvec 0.7.4", + "auto_impl", + "bytes", +] + [[package]] name = "fdeflate" version = "0.3.4" @@ -1817,7 +1906,6 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" dependencies = [ - "bitvec 1.0.1", "rand_core 0.6.4", "subtle", ] @@ -3079,12 +3167,6 @@ dependencies = [ "spin 0.9.8", ] -[[package]] -name = "lazycell" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" - [[package]] name = "libc" version = "0.2.155" @@ -3170,12 +3252,6 @@ version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - [[package]] name = "miniz_oxide" version = "0.7.4" @@ -3233,16 +3309,6 @@ dependencies = [ "libc", ] -[[package]] -name = "nom" -version = "7.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" -dependencies = [ - "memchr", - "minimal-lexical", -] - [[package]] name = "nu-ansi-term" version = "0.46.0" @@ -3482,15 +3548,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" -[[package]] -name = "pairing" -version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fec4625e73cf41ef4bb6846cafa6d44736525f442ba45e407c4a000a13996f" -dependencies = [ - "group", -] - [[package]] name = "parity-scale-codec" version = "1.3.7" @@ -3563,6 +3620,12 @@ dependencies = [ "subtle", ] +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + [[package]] name = "path-slash" version = "0.2.1" @@ -3585,7 +3648,7 @@ version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5cf07ef4804cfa9aea3b04a7bbdd5a40031dbb6b4f2cbaf2b011666c80c5b4f2" dependencies = [ - "rustc_version", + "rustc_version 0.4.0", ] [[package]] @@ -3633,12 +3696,6 @@ dependencies = [ "syn 2.0.72", ] -[[package]] -name = "peeking_take_while" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" - [[package]] name = "pem" version = "1.1.1" @@ -3654,6 +3711,17 @@ version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" +[[package]] +name = "pest" +version = "2.7.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd53dff83f26735fdc1ca837098ccf133605d794cdae66acfc2bfac3ec809d95" +dependencies = [ + "memchr", + "thiserror", + "ucd-trie", +] + [[package]] name = "petgraph" version = "0.6.5" @@ -3671,7 +3739,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e9567389417feee6ce15dd6527a8a1ecac205ef62c2932bcf3d9f6fc5b78b414" dependencies = [ "futures", - "rustc_version", + "rustc_version 0.4.0", ] [[package]] @@ -3943,6 +4011,8 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4c2511913b88df1637da85cc8d96ec8e43a3f8bb8ccb71ee1ac240d6f3df58d" dependencies = [ + "bit-set", + "bit-vec", "bitflags 2.6.0", "lazy_static", "num-traits", @@ -3950,9 +4020,17 @@ dependencies = [ "rand_chacha 0.3.1", "rand_xorshift", "regex-syntax 0.8.4", + "rusty-fork", + "tempfile", "unarray", ] +[[package]] +name = "quick-error" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" + [[package]] name = "quote" version = "1.0.36" @@ -4234,7 +4312,7 @@ dependencies = [ [[package]] name = "revm" version = "3.5.0" -source = "git+https://github.com/bluealloy/revm?rev=23cbac479f616eba5ab11ddfe6d5814b9c492202#23cbac479f616eba5ab11ddfe6d5814b9c492202" +source = "git+https://github.com/bluealloy/revm?rev=50726f3e1b2f7b4d50f6755ed30a1ae3108583bf#50726f3e1b2f7b4d50f6755ed30a1ae3108583bf" dependencies = [ "auto_impl", "revm-interpreter", @@ -4246,7 +4324,7 @@ dependencies = [ [[package]] name = "revm-interpreter" version = "1.3.0" -source = "git+https://github.com/bluealloy/revm?rev=23cbac479f616eba5ab11ddfe6d5814b9c492202#23cbac479f616eba5ab11ddfe6d5814b9c492202" +source = "git+https://github.com/bluealloy/revm?rev=50726f3e1b2f7b4d50f6755ed30a1ae3108583bf#50726f3e1b2f7b4d50f6755ed30a1ae3108583bf" dependencies = [ "revm-primitives", "serde", @@ -4255,11 +4333,11 @@ dependencies = [ [[package]] name = "revm-precompile" version = "2.2.0" -source = "git+https://github.com/bluealloy/revm?rev=23cbac479f616eba5ab11ddfe6d5814b9c492202#23cbac479f616eba5ab11ddfe6d5814b9c492202" +source = "git+https://github.com/bluealloy/revm?rev=50726f3e1b2f7b4d50f6755ed30a1ae3108583bf#50726f3e1b2f7b4d50f6755ed30a1ae3108583bf" dependencies = [ + "aurora-engine-modexp", "c-kzg", "k256", - "num", "once_cell", "revm-primitives", "ripemd", @@ -4271,7 +4349,7 @@ dependencies = [ [[package]] name = "revm-primitives" version = "1.3.0" -source = "git+https://github.com/bluealloy/revm?rev=23cbac479f616eba5ab11ddfe6d5814b9c492202#23cbac479f616eba5ab11ddfe6d5814b9c492202" +source = "git+https://github.com/bluealloy/revm?rev=50726f3e1b2f7b4d50f6755ed30a1ae3108583bf#50726f3e1b2f7b4d50f6755ed30a1ae3108583bf" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -4372,8 +4450,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c3cc4c2511671f327125da14133d0c5c5d137f006a1017a16f557bc85b16286" dependencies = [ "alloy-rlp", + "ark-ff 0.3.0", + "ark-ff 0.4.2", + "bytes", + "fastrlp", + "num-bigint", + "num-traits", + "parity-scale-codec 3.6.12", + "primitive-types 0.12.2", "proptest", "rand 0.8.5", + "rlp 0.5.2", "ruint-macro", "serde", "valuable", @@ -4404,13 +4491,22 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" +[[package]] +name = "rustc_version" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" +dependencies = [ + "semver 0.11.0", +] + [[package]] name = "rustc_version" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver", + "semver 1.0.23", ] [[package]] @@ -4525,6 +4621,18 @@ version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" +[[package]] +name = "rusty-fork" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" +dependencies = [ + "fnv", + "quick-error", + "tempfile", + "wait-timeout", +] + [[package]] name = "ryu" version = "1.0.18" @@ -4555,6 +4663,7 @@ version = "2.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eca070c12893629e2cc820a9761bedf6ce1dcddc9852984d1dc734b8bd9bd024" dependencies = [ + "bitvec 1.0.1", "cfg-if", "derive_more", "parity-scale-codec 3.6.12", @@ -4632,18 +4741,18 @@ dependencies = [ [[package]] name = "secp256k1" -version = "0.27.0" +version = "0.28.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25996b82292a7a57ed3508f052cfff8640d38d32018784acd714758b43da9c8f" +checksum = "d24b59d129cdadea20aea4fb2352fa053712e5d713eee47d700cd4b2bc002f10" dependencies = [ "secp256k1-sys", ] [[package]] name = "secp256k1-sys" -version = "0.8.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70a129b9e9efbfb223753b9163c4ab3b13cff7fd9c7f010fbac25ab4099fa07e" +checksum = "e5d1746aae42c19d583c3c1a8c646bfad910498e2051c551a7f2e3c0c9fbb7eb" dependencies = [ "cc", ] @@ -4671,6 +4780,15 @@ dependencies = [ "libc", ] +[[package]] +name = "semver" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" +dependencies = [ + "semver-parser", +] + [[package]] name = "semver" version = "1.0.23" @@ -4680,6 +4798,15 @@ dependencies = [ "serde", ] +[[package]] +name = "semver-parser" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" +dependencies = [ + "pest", +] + [[package]] name = "send_wrapper" version = "0.4.0" @@ -4796,7 +4923,8 @@ dependencies = [ [[package]] name = "sha2" version = "0.9.9" -source = "git+https://github.com/sp1-patches/RustCrypto-hashes?branch=patch-sha2-v0.9.9#db82a4848f8d033eab544255e1efa036cc06f054" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" dependencies = [ "block-buffer 0.9.0", "cfg-if", @@ -4808,7 +4936,8 @@ dependencies = [ [[package]] name = "sha2" version = "0.10.8" -source = "git+https://github.com/sp1-patches/RustCrypto-hashes?branch=patch-sha2-v0.10.8#1f224388fdede7cef649bce0d63876d1a9e3f515" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if", "cpufeatures", @@ -4834,12 +4963,6 @@ dependencies = [ "lazy_static", ] -[[package]] -name = "shlex" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" - [[package]] name = "signal-hook-registry" version = "1.4.2" @@ -4908,6 +5031,20 @@ dependencies = [ "scale-info", ] +[[package]] +name = "snowbridge-milagro-bls" +version = "1.5.2" +source = "git+https://github.com/Snowfork/milagro_bls?rev=6a95c9e33c6a41d9137761e593d53742ebb964de#6a95c9e33c6a41d9137761e593d53742ebb964de" +dependencies = [ + "hex", + "lazy_static", + "parity-scale-codec 3.6.12", + "rand 0.8.5", + "scale-info", + "snowbridge-amcl", + "zeroize", +] + [[package]] name = "socket2" version = "0.5.7" @@ -4948,19 +5085,6 @@ dependencies = [ "unicode-xid", ] -[[package]] -name = "sp1-lib" -version = "1.0.1" -source = "git+https://github.com/succinctlabs/sp1.git?tag=v1.0.1#dd032eb23949828d244d1ad1f1569aa78155837c" -dependencies = [ - "anyhow", - "bincode", - "cfg-if", - "hex", - "serde", - "snowbridge-amcl", -] - [[package]] name = "spin" version = "0.5.2" @@ -5105,7 +5229,7 @@ dependencies = [ "hex", "once_cell", "reqwest 0.11.27", - "semver", + "semver 1.0.23", "serde", "serde_json", "sha2 0.10.8", @@ -5280,9 +5404,9 @@ dependencies = [ [[package]] name = "tiny-keccak" version = "2.0.2" -source = "git+https://github.com/sp1-patches/tiny-keccak?branch=patch-v2.0.2#bf0b28f63510a90c7b6c21ac6ff461c93ecd2331" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" dependencies = [ - "cfg-if", "crunchy", ] @@ -5646,6 +5770,12 @@ version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" +[[package]] +name = "ucd-trie" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" + [[package]] name = "uint" version = "0.8.5" @@ -5781,6 +5911,15 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +[[package]] +name = "wait-timeout" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" +dependencies = [ + "libc", +] + [[package]] name = "walkdir" version = "2.5.0" @@ -5934,18 +6073,6 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082" -[[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", -] - [[package]] name = "winapi" version = "0.3.9" @@ -6183,7 +6310,7 @@ dependencies = [ "js-sys", "log", "pharos", - "rustc_version", + "rustc_version 0.4.0", "send_wrapper 0.6.0", "thiserror", "wasm-bindgen", diff --git a/Cargo.toml b/Cargo.toml index f5dd9230..1bdf413b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,12 +26,13 @@ default-members = ["cli"] [workspace.dependencies] # consensus ssz-rs = { package = "ssz_rs", version = "0.9.0" } -milagro_bls = { package = "bls12_381", git = "https://github.com/succinctlabs/bls12_381"} +milagro_bls = { package = "snowbridge-milagro-bls", git = "https://github.com/Snowfork/milagro_bls", rev = "6a95c9e33c6a41d9137761e593d53742ebb964de" } # execution ethers-core = { git = "https://github.com/gakonst/ethers-rs", rev = "3bf1a9e0d698e9fdfc91d0353878901af5a5c5ef" } ethers = { git = "https://github.com/gakonst/ethers-rs", rev = "3bf1a9e0d698e9fdfc91d0353878901af5a5c5ef" } -revm = { git = "https://github.com/bluealloy/revm", rev = "23cbac479f616eba5ab11ddfe6d5814b9c492202", default-features = false, features = [ "std", +revm = { git = "https://github.com/bluealloy/revm", rev = "50726f3e1b2f7b4d50f6755ed30a1ae3108583bf", default-features = false, features = [ + "std", "serde", ] } triehash-ethereum = { git = "https://github.com/openethereum/parity-ethereum", rev = "55c90d4016505317034e3e98f699af07f5404b63" } @@ -60,11 +61,6 @@ hyper = "1.3.1" zduny-wasm-timer = "0.2.8" retri = "0.1.0" -[patch.crates-io] -sha2-v0-9-9 = { git = "https://github.com/sp1-patches/RustCrypto-hashes", package = "sha2", branch = "patch-sha2-v0.9.9" } -sha2-v0-10-8 = { git = "https://github.com/sp1-patches/RustCrypto-hashes", package = "sha2", branch = "patch-sha2-v0.10.8" } -tiny-keccak = { git = "https://github.com/sp1-patches/tiny-keccak", branch = "patch-v2.0.2" } - ###################################### # Top Level Dependencies ###################################### diff --git a/client/src/lib.rs b/client/src/lib.rs index 29b36b28..a64fd91c 100644 --- a/client/src/lib.rs +++ b/client/src/lib.rs @@ -6,4 +6,4 @@ pub mod errors; #[cfg(not(target_arch = "wasm32"))] pub mod rpc; -pub mod node; \ No newline at end of file +pub mod node; diff --git a/config/src/config.rs b/config/src/config.rs index 3bf31e9b..8ba2989a 100644 --- a/config/src/config.rs +++ b/config/src/config.rs @@ -4,8 +4,8 @@ use crate::types::ChainConfig; use crate::utils::bytes_opt_deserialize; use crate::Network; use common::config::types::Forks; -use consensus_core::calculate_fork_version; use common::utils::bytes_deserialize; +use consensus_core::calculate_fork_version; use figment::{ providers::{Format, Serialized, Toml}, Figment, diff --git a/config/src/lib.rs b/config/src/lib.rs index eeb3518b..eb8c2104 100644 --- a/config/src/lib.rs +++ b/config/src/lib.rs @@ -23,4 +23,4 @@ pub mod types; pub use types::*; /// Generic Utilities -pub mod utils; \ No newline at end of file +pub mod utils; diff --git a/consensus-core/src/consensus_core.rs b/consensus-core/src/consensus_core.rs index 88c69706..9e666796 100644 --- a/consensus-core/src/consensus_core.rs +++ b/consensus-core/src/consensus_core.rs @@ -106,7 +106,7 @@ pub fn apply_generic_update( store.current_max_active_participants = u64::max(store.current_max_active_participants, committee_bits); - let should_update_optimistic = committee_bits > safety_threshold(&store) + let should_update_optimistic = committee_bits > safety_threshold(store) && update.attested_header.slot > store.optimistic_header.slot; if should_update_optimistic { @@ -144,11 +144,15 @@ pub fn apply_generic_update( let store_period = calc_sync_period(store.finalized_header.slot.into()); if store.next_sync_committee.is_none() { - store.next_sync_committee = update.next_sync_committee.clone(); + store + .next_sync_committee + .clone_from(&update.next_sync_committee); } else if update_finalized_period == store_period + 1 { info!(target: "helios::consensus", "sync committee updated"); store.current_sync_committee = store.next_sync_committee.clone().unwrap(); - store.next_sync_committee = update.next_sync_committee.clone(); + store + .next_sync_committee + .clone_from(&update.next_sync_committee); store.previous_max_active_participants = store.current_max_active_participants; store.current_max_active_participants = 0; } diff --git a/consensus-core/src/errors.rs b/consensus-core/src/errors.rs index 6365c1b2..98a54246 100644 --- a/consensus-core/src/errors.rs +++ b/consensus-core/src/errors.rs @@ -26,4 +26,4 @@ pub enum ConsensusError { CheckpointTooOld, #[error("consensus rpc is for the incorrect network")] IncorrectRpcNetwork, -} \ No newline at end of file +} diff --git a/consensus/src/consensus.rs b/consensus/src/consensus.rs index 82d03905..f065d12a 100644 --- a/consensus/src/consensus.rs +++ b/consensus/src/consensus.rs @@ -423,7 +423,7 @@ impl Inner { } pub fn apply_update(&mut self, update: &Update) { - let new_checkpoint = apply_update(&mut self.store, &update); + let new_checkpoint = apply_update(&mut self.store, update); if new_checkpoint.is_some() { self.last_checkpoint = new_checkpoint; } @@ -456,11 +456,11 @@ impl Inner { } fn apply_finality_update(&mut self, update: &FinalityUpdate) { - let new_checkpoint = apply_finality_update(&mut self.store, &update); + let new_checkpoint = apply_finality_update(&mut self.store, update); if new_checkpoint.is_some() { self.last_checkpoint = new_checkpoint; } - self.log_finality_update(&update); + self.log_finality_update(update); } fn log_finality_update(&self, update: &FinalityUpdate) { @@ -482,11 +482,11 @@ impl Inner { } fn apply_optimistic_update(&mut self, update: &OptimisticUpdate) { - let new_checkpoint = apply_optimistic_update(&mut self.store, &update); + let new_checkpoint = apply_optimistic_update(&mut self.store, update); if new_checkpoint.is_some() { self.last_checkpoint = new_checkpoint; } - self.log_optimistic_update(&update); + self.log_optimistic_update(update); } fn log_optimistic_update(&self, update: &OptimisticUpdate) { diff --git a/consensus/src/rpc/nimbus_rpc.rs b/consensus/src/rpc/nimbus_rpc.rs index 32d40cf1..b2ef2684 100644 --- a/consensus/src/rpc/nimbus_rpc.rs +++ b/consensus/src/rpc/nimbus_rpc.rs @@ -7,9 +7,9 @@ use serde::de::DeserializeOwned; use super::ConsensusRpc; use crate::constants::MAX_REQUEST_LIGHT_CLIENT_UPDATES; +use common::errors::RpcError; use consensus_core::types::U64; use consensus_core::types::{BeaconBlock, Bootstrap, FinalityUpdate, OptimisticUpdate, Update}; -use common::errors::RpcError; #[derive(Debug)] pub struct NimbusRpc { diff --git a/execution/src/errors.rs b/execution/src/errors.rs index 453df3f3..52ef6f89 100644 --- a/execution/src/errors.rs +++ b/execution/src/errors.rs @@ -61,4 +61,4 @@ impl EvmError { } String::decode(&data[4..]).ok() } -} \ No newline at end of file +} diff --git a/execution/src/proof.rs b/execution/src/proof.rs index eeeaf608..8662d915 100644 --- a/execution/src/proof.rs +++ b/execution/src/proof.rs @@ -24,7 +24,7 @@ pub fn verify_proof(proof: &[Bytes], root: &[u8], path: &[u8], value: &[u8]) -> } } else { let nibble = get_nibble(path, path_offset); - expected_hash = node_list[nibble as usize].clone(); + expected_hash.clone_from(&node_list[nibble as usize]); path_offset += 1; } @@ -55,7 +55,7 @@ pub fn verify_proof(proof: &[Bytes], root: &[u8], path: &[u8], value: &[u8]) -> return false; } path_offset += prefix_length; - expected_hash = node_list[1].clone(); + expected_hash.clone_from(&node_list[1]); } } else { return false; diff --git a/execution/src/types.rs b/execution/src/types.rs index 6428b6c3..d6e5f7e2 100644 --- a/execution/src/types.rs +++ b/execution/src/types.rs @@ -33,4 +33,4 @@ impl fmt::Debug for CallOpts { .field("data", &hex::encode(self.data.clone().unwrap_or_default())) .finish() } -} \ No newline at end of file +}