From 19d27836e47e55243c4e9e14172352af3098246c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Est=C3=A9fano=20Bargas?= Date: Fri, 16 Aug 2024 18:46:40 -0300 Subject: [PATCH 01/32] Copy mina operator --- operator/mina_account/lib/.gitignore | 5 + operator/mina_account/lib/Cargo.lock | 2363 +++++++++++++++++ operator/mina_account/lib/Cargo.toml | 34 + operator/mina_account/lib/mina_verifier.h | 6 + .../mina_account/lib/src/consensus_state.rs | 47 + operator/mina_account/lib/src/devnet_vk.json | 492 ++++ operator/mina_account/lib/src/lib.rs | 248 ++ operator/mina_account/lib/src/mainnet_vk.json | 485 ++++ .../mina_account/lib/src/verifier_index.rs | 276 ++ operator/mina_account/mina.go | 32 + operator/mina_account/mina_test.go | 37 + 11 files changed, 4025 insertions(+) create mode 100644 operator/mina_account/lib/.gitignore create mode 100644 operator/mina_account/lib/Cargo.lock create mode 100644 operator/mina_account/lib/Cargo.toml create mode 100644 operator/mina_account/lib/mina_verifier.h create mode 100644 operator/mina_account/lib/src/consensus_state.rs create mode 100644 operator/mina_account/lib/src/devnet_vk.json create mode 100644 operator/mina_account/lib/src/lib.rs create mode 100644 operator/mina_account/lib/src/mainnet_vk.json create mode 100644 operator/mina_account/lib/src/verifier_index.rs create mode 100644 operator/mina_account/mina.go create mode 100644 operator/mina_account/mina_test.go diff --git a/operator/mina_account/lib/.gitignore b/operator/mina_account/lib/.gitignore new file mode 100644 index 000000000..17e14b11c --- /dev/null +++ b/operator/mina_account/lib/.gitignore @@ -0,0 +1,5 @@ +/target + +libmina_state_verifier.so +libmina_state_verifier.a +libmina_state_verifier.dylib diff --git a/operator/mina_account/lib/Cargo.lock b/operator/mina_account/lib/Cargo.lock new file mode 100644 index 000000000..54c705236 --- /dev/null +++ b/operator/mina_account/lib/Cargo.lock @@ -0,0 +1,2363 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "addr2line" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "ahash" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" +dependencies = [ + "getrandom", + "once_cell", + "version_check", +] + +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "anyhow" +version = "1.0.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" + +[[package]] +name = "ark-ec" +version = "0.3.0" +source = "git+https://github.com/openmina/algebra?branch=openmina#017531e7aaa15a2c856532b0843876e371b01122" +dependencies = [ + "ark-ff", + "ark-serialize", + "ark-std", + "derivative", + "num-traits", + "rayon", + "zeroize", +] + +[[package]] +name = "ark-ff" +version = "0.3.0" +source = "git+https://github.com/openmina/algebra?branch=openmina#017531e7aaa15a2c856532b0843876e371b01122" +dependencies = [ + "ark-ff-asm", + "ark-ff-macros", + "ark-serialize", + "ark-std", + "derivative", + "num-bigint", + "num-traits", + "paste", + "rayon", + "rustc_version 0.3.3", + "zeroize", +] + +[[package]] +name = "ark-ff-asm" +version = "0.3.0" +source = "git+https://github.com/openmina/algebra?branch=openmina#017531e7aaa15a2c856532b0843876e371b01122" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.3.0" +source = "git+https://github.com/openmina/algebra?branch=openmina#017531e7aaa15a2c856532b0843876e371b01122" +dependencies = [ + "num-bigint", + "num-traits", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-poly" +version = "0.3.0" +source = "git+https://github.com/openmina/algebra?branch=openmina#017531e7aaa15a2c856532b0843876e371b01122" +dependencies = [ + "ark-ff", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.11.2", + "rayon", +] + +[[package]] +name = "ark-serialize" +version = "0.3.0" +source = "git+https://github.com/openmina/algebra?branch=openmina#017531e7aaa15a2c856532b0843876e371b01122" +dependencies = [ + "ark-serialize-derive", + "ark-std", + "digest 0.9.0", +] + +[[package]] +name = "ark-serialize-derive" +version = "0.3.0" +source = "git+https://github.com/openmina/algebra?branch=openmina#017531e7aaa15a2c856532b0843876e371b01122" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-std" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1df2c09229cbc5a028b1d70e00fdb2acee28b1055dfb5ca73eea49c5a25c4e7c" +dependencies = [ + "num-traits", + "rand", + "rayon", +] + +[[package]] +name = "arrayref" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" + +[[package]] +name = "arrayvec" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" + +[[package]] +name = "async-channel" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" +dependencies = [ + "concurrent-queue", + "event-listener", + "futures-core", +] + +[[package]] +name = "atomic-polyfill" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cf2bce30dfe09ef0bfaef228b9d414faaf7e563035494d7fe092dba54b300f4" +dependencies = [ + "critical-section", +] + +[[package]] +name = "autocfg" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" + +[[package]] +name = "backtrace" +version = "0.3.73" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + +[[package]] +name = "base64" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "bcs" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85b6598a2f5d564fb7855dc6b06fd1c38cff5a72bd8b863a4d021938497b440a" +dependencies = [ + "serde", + "thiserror", +] + +[[package]] +name = "binprot" +version = "0.1.8" +source = "git+https://github.com/openmina/binprot-rs?rev=2b5a909#2b5a9099a1c5640559d04e39899da301aebc8023" +dependencies = [ + "binprot_derive", + "byteorder", + "md5", +] + +[[package]] +name = "binprot_derive" +version = "0.1.7" +source = "git+https://github.com/openmina/binprot-rs?rev=2b5a909#2b5a9099a1c5640559d04e39899da301aebc8023" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitvec" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] + +[[package]] +name = "blake2" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "blake2b_simd" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23285ad32269793932e830392f2fe2f83e26488fd3ec778883a93c8323735780" +dependencies = [ + "arrayref", + "arrayvec", + "constant_time_eq", +] + +[[package]] +name = "blake2s_simd" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94230421e395b9920d23df13ea5d77a20e1725331f90fbbf6df6040b33f756ae" +dependencies = [ + "arrayref", + "arrayvec", + "constant_time_eq", +] + +[[package]] +name = "blake3" +version = "1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d08263faac5cde2a4d52b513dadb80846023aade56fcd8fc99ba73ba8050e92" +dependencies = [ + "arrayref", + "arrayvec", + "cc", + "cfg-if", + "constant_time_eq", +] + +[[package]] +name = "block-buffer" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +dependencies = [ + "generic-array", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "bs58" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" +dependencies = [ + "sha2 0.9.9", +] + +[[package]] +name = "bs58" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "bumpalo" +version = "3.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "cc" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "907d8581360765417f8f2e0e7d602733bbed60156b4465b7617243689ef9b83d" + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "chrono" +version = "0.4.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +dependencies = [ + "android-tzdata", + "iana-time-zone", + "js-sys", + "num-traits", + "serde", + "wasm-bindgen", + "windows-targets", +] + +[[package]] +name = "cobs" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67ba02a97a2bd10f4b59b25c7973101c79642302776489e030cd13cdab09ed15" + +[[package]] +name = "concurrent-queue" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "constant_time_eq" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" + +[[package]] +name = "convert_case" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" + +[[package]] +name = "core-foundation-sys" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" + +[[package]] +name = "core2" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b49ba7ef1ad6107f8824dbe97de947cbaac53c44e7f9756a1fba0d37c1eec505" +dependencies = [ + "memchr", +] + +[[package]] +name = "cpufeatures" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +dependencies = [ + "libc", +] + +[[package]] +name = "crc32fast" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "critical-section" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7059fff8937831a9ae6f0fe4d658ffabf58f2ca96aa9dec1c889f936f705f216" + +[[package]] +name = "crossbeam-deque" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "darling" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c" +dependencies = [ + "darling_core 0.13.4", + "darling_macro 0.13.4", +] + +[[package]] +name = "darling" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" +dependencies = [ + "darling_core 0.20.10", + "darling_macro 0.20.10", +] + +[[package]] +name = "darling_core" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim 0.10.0", + "syn 1.0.109", +] + +[[package]] +name = "darling_core" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim 0.11.1", + "syn 2.0.71", +] + +[[package]] +name = "darling_macro" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" +dependencies = [ + "darling_core 0.13.4", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "darling_macro" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" +dependencies = [ + "darling_core 0.20.10", + "quote", + "syn 2.0.71", +] + +[[package]] +name = "deranged" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +dependencies = [ + "powerfmt", + "serde", +] + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" +dependencies = [ + "convert_case", + "proc-macro2", + "quote", + "rustc_version 0.4.0", + "syn 2.0.71", +] + +[[package]] +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +dependencies = [ + "generic-array", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer 0.10.4", + "crypto-common", + "subtle", +] + +[[package]] +name = "disjoint-set" +version = "0.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d102f1a462fdcdddce88d6d46c06c074a2d2749b262230333726b06c52bb7585" + +[[package]] +name = "either" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" + +[[package]] +name = "embedded-io" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef1a6892d9eef45c8fa6b9e0086428a2cca8491aca8f787c534a3d6d0bcb3ced" + +[[package]] +name = "enum_dispatch" +version = "0.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa18ce2bc66555b3218614519ac839ddb759a7d6720732f979ef8d13be147ecd" +dependencies = [ + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.71", +] + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "event-listener" +version = "2.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + +[[package]] +name = "futures" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" + +[[package]] +name = "futures-executor" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" + +[[package]] +name = "futures-macro" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.71", +] + +[[package]] +name = "futures-sink" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" + +[[package]] +name = "futures-task" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" + +[[package]] +name = "futures-util" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi", + "wasm-bindgen", +] + +[[package]] +name = "gimli" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" + +[[package]] +name = "groupmap" +version = "0.1.0" +source = "git+https://github.com/openmina/proof-systems?branch=ledger-newtypes-rampup4-vrf#44e0d3b98b8747de54e595f53d97c035ff43167c" +dependencies = [ + "ark-ec", + "ark-ff", + "rand", +] + +[[package]] +name = "hash32" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0c35f58762feb77d74ebe43bdbc3210f09be9fe6742234d573bacc26ed92b67" +dependencies = [ + "byteorder", +] + +[[package]] +name = "hashbrown" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" +dependencies = [ + "ahash", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" + +[[package]] +name = "heapless" +version = "0.7.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdc6457c0eb62c71aac4bc17216026d8410337c4126773b9c5daba343f17964f" +dependencies = [ + "atomic-polyfill", + "hash32", + "rustc_version 0.4.0", + "serde", + "spin", + "stable_deref_trait", +] + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +dependencies = [ + "serde", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", + "serde", +] + +[[package]] +name = "indexmap" +version = "2.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +dependencies = [ + "equivalent", + "hashbrown 0.14.5", + "serde", +] + +[[package]] +name = "instant" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" + +[[package]] +name = "js-sys" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "keccak" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" +dependencies = [ + "cpufeatures", +] + +[[package]] +name = "kimchi" +version = "0.1.0" +source = "git+https://github.com/openmina/proof-systems?branch=ledger-newtypes-rampup4-vrf#44e0d3b98b8747de54e595f53d97c035ff43167c" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-poly", + "ark-serialize", + "blake2", + "disjoint-set", + "groupmap", + "hex", + "itertools", + "mina-curves", + "mina-poseidon", + "num-bigint", + "num-derive", + "num-integer", + "num-traits", + "o1-utils 0.1.0 (git+https://github.com/openmina/proof-systems?branch=ledger-newtypes-rampup4-vrf)", + "once_cell", + "poly-commitment", + "rand", + "rand_core", + "rayon", + "rmp-serde", + "serde", + "serde_with 1.14.0", + "strum", + "strum_macros", + "thiserror", + "turshi", +] + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" + +[[package]] +name = "libc" +version = "0.2.155" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" + +[[package]] +name = "linkme" +version = "0.3.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccb76662d78edc9f9bf56360d6919bdacc8b7761227727e5082f128eeb90bbf5" +dependencies = [ + "linkme-impl", +] + +[[package]] +name = "linkme-impl" +version = "0.3.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dccda732e04fa3baf2e17cf835bfe2601c7c2edafd64417c627dabae3a8cda" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.71", +] + +[[package]] +name = "lock_api" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" + +[[package]] +name = "md5" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "490cc448043f947bae3cbee9c203358d62dbee0db12107a74be5c30ccfd09771" + +[[package]] +name = "memchr" +version = "2.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" + +[[package]] +name = "mina-curves" +version = "0.1.0" +source = "git+https://github.com/openmina/proof-systems?branch=ledger-newtypes-rampup4-vrf#44e0d3b98b8747de54e595f53d97c035ff43167c" +dependencies = [ + "ark-ec", + "ark-ff", +] + +[[package]] +name = "mina-hasher" +version = "0.1.0" +source = "git+https://github.com/openmina/proof-systems?branch=ledger-newtypes-rampup4-vrf#44e0d3b98b8747de54e595f53d97c035ff43167c" +dependencies = [ + "ark-ff", + "bitvec", + "mina-curves", + "mina-poseidon", + "o1-utils 0.1.0 (git+https://github.com/openmina/proof-systems?branch=ledger-newtypes-rampup4-vrf)", + "serde", +] + +[[package]] +name = "mina-p2p-messages" +version = "0.6.4" +source = "git+https://github.com/lambdaclass/openmina/?branch=mina_bridge#fb6768dffc184e10d47f1082e800e79b8a5b68a4" +dependencies = [ + "ark-ff", + "base64 0.13.1", + "binprot", + "binprot_derive", + "blake2", + "bs58 0.4.0", + "derive_more", + "hex", + "mina-curves", + "mina-hasher", + "mina-poseidon", + "mina-signer", + "o1-utils 0.1.0 (git+https://github.com/openmina/proof-systems?branch=ledger-newtypes-rampup4-vrf)", + "rsexp", + "serde", + "serde_json", + "sha2 0.10.8", + "thiserror", + "time", +] + +[[package]] +name = "mina-poseidon" +version = "0.1.0" +source = "git+https://github.com/openmina/proof-systems?branch=ledger-newtypes-rampup4-vrf#44e0d3b98b8747de54e595f53d97c035ff43167c" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-poly", + "mina-curves", + "o1-utils 0.1.0 (git+https://github.com/openmina/proof-systems?branch=ledger-newtypes-rampup4-vrf)", + "once_cell", + "rand", + "rayon", + "serde", + "serde_with 1.14.0", +] + +[[package]] +name = "mina-signer" +version = "0.1.0" +source = "git+https://github.com/openmina/proof-systems?branch=ledger-newtypes-rampup4-vrf#44e0d3b98b8747de54e595f53d97c035ff43167c" +dependencies = [ + "ark-ec", + "ark-ff", + "bitvec", + "blake2", + "bs58 0.4.0", + "hex", + "mina-curves", + "mina-hasher", + "o1-utils 0.1.0 (git+https://github.com/openmina/proof-systems?branch=ledger-newtypes-rampup4-vrf)", + "rand", + "sha2 0.10.8", + "thiserror", +] + +[[package]] +name = "mina-state-verifier-ffi" +version = "0.1.0" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-poly", + "ark-serialize", + "base64 0.22.1", + "blake2", + "bs58 0.5.1", + "hex", + "kimchi", + "lazy_static", + "mina-curves", + "mina-p2p-messages", + "mina-tree", + "o1-utils 0.1.0 (git+https://github.com/lambdaclass/proof-systems?branch=add-verifier-serializations)", + "once_cell", + "poly-commitment", + "rmp-serde", + "serde", + "serde_json", +] + +[[package]] +name = "mina-tree" +version = "0.6.0" +source = "git+https://github.com/lambdaclass/openmina/?branch=mina_bridge#fb6768dffc184e10d47f1082e800e79b8a5b68a4" +dependencies = [ + "anyhow", + "ark-ec", + "ark-ff", + "ark-poly", + "ark-serialize", + "backtrace", + "base64 0.13.1", + "bitvec", + "blake2", + "bs58 0.4.0", + "chrono", + "crc32fast", + "derive_more", + "getrandom", + "hex", + "itertools", + "kimchi", + "lazy_static", + "libc", + "mina-curves", + "mina-hasher", + "mina-p2p-messages", + "mina-poseidon", + "mina-signer", + "num-bigint", + "o1-utils 0.1.0 (git+https://github.com/openmina/proof-systems?branch=ledger-newtypes-rampup4-vrf)", + "once_cell", + "openmina-core", + "poly-commitment", + "postcard", + "rand", + "rand_pcg", + "rand_seeder", + "rayon", + "serde", + "serde_json", + "serde_with 3.8.3", + "sha2 0.10.8", + "static_assertions", + "thiserror", + "tuple-map", + "uuid", + "wasm-bindgen", + "wasm_thread", +] + +[[package]] +name = "miniz_oxide" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" +dependencies = [ + "adler", +] + +[[package]] +name = "multihash" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfd8a792c1694c6da4f68db0a9d707c72bd260994da179e6030a5dcee00bb815" +dependencies = [ + "blake2b_simd", + "blake2s_simd", + "blake3", + "core2", + "digest 0.10.7", + "multihash-derive", + "sha2 0.10.8", + "sha3", + "unsigned-varint", +] + +[[package]] +name = "multihash-derive" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6d4752e6230d8ef7adf7bd5d8c4b1f6561c1014c5ba9a37445ccefe18aa1db" +dependencies = [ + "proc-macro-crate", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 1.0.109", + "synstructure", +] + +[[package]] +name = "num-bigint" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" +dependencies = [ + "num-integer", + "num-traits", + "rand", + "serde", +] + +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + +[[package]] +name = "num-derive" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "o1-utils" +version = "0.1.0" +source = "git+https://github.com/lambdaclass/proof-systems?branch=add-verifier-serializations#5bdeab3c2a43a671645952f63b9354b7a20b2326" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-poly", + "ark-serialize", + "bcs", + "hex", + "num-bigint", + "num-integer", + "num-traits", + "rand", + "rand_core", + "rayon", + "serde", + "serde_with 3.8.3", + "sha2 0.10.8", + "thiserror", +] + +[[package]] +name = "o1-utils" +version = "0.1.0" +source = "git+https://github.com/openmina/proof-systems?branch=ledger-newtypes-rampup4-vrf#44e0d3b98b8747de54e595f53d97c035ff43167c" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-poly", + "ark-serialize", + "bcs", + "hex", + "num-bigint", + "num-integer", + "num-traits", + "rand", + "rand_core", + "rayon", + "serde", + "serde_with 1.14.0", + "sha2 0.10.8", + "thiserror", +] + +[[package]] +name = "object" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "081b846d1d56ddfc18fdf1a922e4f6e07a11768ea1b92dec44e42b72712ccfce" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "opaque-debug" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" + +[[package]] +name = "openmina-core" +version = "0.6.0" +source = "git+https://github.com/lambdaclass/openmina/?branch=mina_bridge#fb6768dffc184e10d47f1082e800e79b8a5b68a4" +dependencies = [ + "ark-ff", + "binprot", + "binprot_derive", + "hex", + "lazy_static", + "md5", + "mina-hasher", + "mina-p2p-messages", + "multihash", + "openmina-macros", + "redux", + "serde", + "sha2 0.10.8", + "slab", + "time", + "tokio", + "tracing", +] + +[[package]] +name = "openmina-macros" +version = "0.6.0" +source = "git+https://github.com/lambdaclass/openmina/?branch=mina_bridge#fb6768dffc184e10d47f1082e800e79b8a5b68a4" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.71", +] + +[[package]] +name = "parking_lot" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" +dependencies = [ + "instant", + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" +dependencies = [ + "cfg-if", + "instant", + "libc", + "redox_syscall", + "smallvec", + "winapi", +] + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[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 = "pin-project-lite" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "poly-commitment" +version = "0.1.0" +source = "git+https://github.com/openmina/proof-systems?branch=ledger-newtypes-rampup4-vrf#44e0d3b98b8747de54e595f53d97c035ff43167c" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-poly", + "ark-serialize", + "blake2", + "groupmap", + "itertools", + "mina-curves", + "mina-poseidon", + "o1-utils 0.1.0 (git+https://github.com/openmina/proof-systems?branch=ledger-newtypes-rampup4-vrf)", + "once_cell", + "rand", + "rand_core", + "rayon", + "serde", + "serde_with 1.14.0", + "thiserror", +] + +[[package]] +name = "postcard" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a55c51ee6c0db07e68448e336cf8ea4131a620edefebf9893e759b2d793420f8" +dependencies = [ + "cobs", + "embedded-io", + "heapless", + "serde", +] + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "proc-macro-crate" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e17d47ce914bf4de440332250b0edd23ce48c005f59fab39d3335866b114f11a" +dependencies = [ + "thiserror", + "toml", +] + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "syn 1.0.109", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", +] + +[[package]] +name = "proc-macro2" +version = "1.0.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "radium" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] + +[[package]] +name = "rand_pcg" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59cad018caf63deb318e5a4586d99a24424a364f40f1e5778c29aca23f4fc73e" +dependencies = [ + "rand_core", +] + +[[package]] +name = "rand_seeder" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf2890aaef0aa82719a50e808de264f9484b74b442e1a3a0e5ee38243ac40bdb" +dependencies = [ + "rand_core", +] + +[[package]] +name = "rayon" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "redox_syscall" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +dependencies = [ + "bitflags", +] + +[[package]] +name = "redux" +version = "0.1.0" +source = "git+https://github.com/openmina/redux-rs.git?rev=2d1d8db#2d1d8dbd7239c0aec91db8f11126b90068dc848b" +dependencies = [ + "enum_dispatch", + "linkme", + "paste", + "serde", + "wasm-timer", +] + +[[package]] +name = "rmp" +version = "0.8.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "228ed7c16fa39782c3b3468e974aec2795e9089153cd08ee2e9aefb3613334c4" +dependencies = [ + "byteorder", + "num-traits", + "paste", +] + +[[package]] +name = "rmp-serde" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52e599a477cf9840e92f2cde9a7189e67b42c57532749bf90aea6ec10facd4db" +dependencies = [ + "byteorder", + "rmp", + "serde", +] + +[[package]] +name = "rsexp" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3df9a9b6491d42c0fc527e92a87525c17e45c6b9c22345702a6dc0400320bf1" + +[[package]] +name = "rustc-demangle" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" + +[[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 1.0.23", +] + +[[package]] +name = "rustversion" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" + +[[package]] +name = "ryu" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" + +[[package]] +name = "semver-parser" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" +dependencies = [ + "pest", +] + +[[package]] +name = "serde" +version = "1.0.204" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.204" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.71", +] + +[[package]] +name = "serde_json" +version = "1.0.120" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_with" +version = "1.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "678b5a069e50bf00ecd22d0cd8ddf7c236f68581b03db652061ed5eb13a312ff" +dependencies = [ + "serde", + "serde_with_macros 1.5.2", +] + +[[package]] +name = "serde_with" +version = "3.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e73139bc5ec2d45e6c5fd85be5a46949c1c39a4c18e56915f5eb4c12f975e377" +dependencies = [ + "base64 0.22.1", + "chrono", + "hex", + "indexmap 1.9.3", + "indexmap 2.2.6", + "serde", + "serde_derive", + "serde_json", + "serde_with_macros 3.8.3", + "time", +] + +[[package]] +name = "serde_with_macros" +version = "1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e182d6ec6f05393cc0e5ed1bf81ad6db3a8feedf8ee515ecdd369809bcce8082" +dependencies = [ + "darling 0.13.4", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "serde_with_macros" +version = "3.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b80d3d6b56b64335c0180e5ffde23b3c5e08c14c585b51a15bd0e95393f46703" +dependencies = [ + "darling 0.20.10", + "proc-macro2", + "quote", + "syn 2.0.71", +] + +[[package]] +name = "sha2" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", + "digest 0.9.0", + "opaque-debug", +] + +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha3" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" +dependencies = [ + "digest 0.10.7", + "keccak", +] + +[[package]] +name = "slab" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", + "serde", +] + +[[package]] +name = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +dependencies = [ + "lock_api", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "strum" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" + +[[package]] +name = "strum_macros" +version = "0.24.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "rustversion", + "syn 1.0.109", +] + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.71" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b146dcf730474b4bcd16c311627b31ede9ab149045db4d6088b3becaea046462" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "synstructure" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", + "unicode-xid", +] + +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + +[[package]] +name = "thiserror" +version = "1.0.62" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2675633b1499176c2dff06b0856a27976a8f9d436737b4cf4f312d4d91d8bbb" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.62" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d20468752b09f49e909e55a5d338caa8bedf615594e9d80bc4c565d30faf798c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.71", +] + +[[package]] +name = "time" +version = "0.3.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" +dependencies = [ + "deranged", + "itoa", + "num-conv", + "powerfmt", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" + +[[package]] +name = "time-macros" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tinyvec" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.38.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba4f4a02a7a80d6f274636f0aa95c7e383b912d41fe721a31f29e29698585a4a" +dependencies = [ + "backtrace", + "pin-project-lite", +] + +[[package]] +name = "toml" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +dependencies = [ + "serde", +] + +[[package]] +name = "tracing" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +dependencies = [ + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.71", +] + +[[package]] +name = "tracing-core" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +dependencies = [ + "once_cell", +] + +[[package]] +name = "tuple-map" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23d5919d7121237af683b7fa982450597b1eaa2643e597aec3b519e4e5ab3d62" + +[[package]] +name = "turshi" +version = "0.1.0" +source = "git+https://github.com/openmina/proof-systems?branch=ledger-newtypes-rampup4-vrf#44e0d3b98b8747de54e595f53d97c035ff43167c" +dependencies = [ + "ark-ff", + "hex", + "o1-utils 0.1.0 (git+https://github.com/openmina/proof-systems?branch=ledger-newtypes-rampup4-vrf)", +] + +[[package]] +name = "typenum" +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 = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "unicode-xid" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" + +[[package]] +name = "unsigned-varint" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6889a77d49f1f013504cec6bf97a2c730394adedaeb1deb5ea08949a50541105" + +[[package]] +name = "uuid" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" +dependencies = [ + "getrandom", +] + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.71", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.71", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" + +[[package]] +name = "wasm-timer" +version = "0.2.5" +source = "git+https://github.com/fusetim/wasm-timer?branch=tim-add-missing-methods#39e1c2818944f804d68d64dae0d5639d22b0e59e" +dependencies = [ + "futures", + "js-sys", + "parking_lot", + "pin-utils", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "wasm_thread" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a52fc987e67957cab58160d1ea273a2886972ef6f59c7fa0c02e9fe2c8e11706" +dependencies = [ + "async-channel", + "futures", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "web-sys" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-core" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] + +[[package]] +name = "zeroize" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.71", +] diff --git a/operator/mina_account/lib/Cargo.toml b/operator/mina_account/lib/Cargo.toml new file mode 100644 index 000000000..153275d1c --- /dev/null +++ b/operator/mina_account/lib/Cargo.toml @@ -0,0 +1,34 @@ +[package] +name = "mina-state-verifier-ffi" +version = "0.1.0" +edition = "2021" + +[lib] +crate-type = ["cdylib", "staticlib", "lib"] + +[dependencies] +kimchi = { git = "https://github.com/openmina/proof-systems", branch = "ledger-newtypes-rampup4-vrf" } +poly-commitment = { git = "https://github.com/openmina/proof-systems", branch = "ledger-newtypes-rampup4-vrf" } +mina-curves = { git = "https://github.com/openmina/proof-systems", branch = "ledger-newtypes-rampup4-vrf" } +o1-utils = { git = "https://github.com/lambdaclass/proof-systems", branch = "add-verifier-serializations" } +ark-ff = { version = "0.3.0", features = ["parallel", "asm"] } +ark-ec = { version = "0.3.0", features = ["parallel"] } +ark-poly = { version = "0.3.0", features = ["parallel"] } +ark-serialize = "0.3.0" +serde = "1.0.197" +rmp-serde = "1.1.2" +serde_json = "1.0.118" +hex = "0.4.3" +mina-tree = { git = "https://github.com/lambdaclass/openmina/", branch = "mina_bridge" } +mina-p2p-messages = { git = "https://github.com/lambdaclass/openmina/", branch = "mina_bridge" } +base64 = "0.22.1" +bs58 = "0.5.1" +lazy_static = "1.5.0" +blake2 = "0.10.6" +once_cell = "1.19.0" + +[patch.crates-io] +ark-ff = { git = "https://github.com/openmina/algebra", branch = "openmina" } +ark-ec = { git = "https://github.com/openmina/algebra", branch = "openmina" } +ark-poly = { git = "https://github.com/openmina/algebra", branch = "openmina" } +ark-serialize = { git = "https://github.com/openmina/algebra", branch = "openmina" } diff --git a/operator/mina_account/lib/mina_verifier.h b/operator/mina_account/lib/mina_verifier.h new file mode 100644 index 000000000..ce007ae49 --- /dev/null +++ b/operator/mina_account/lib/mina_verifier.h @@ -0,0 +1,6 @@ +#include + +bool verify_protocol_state_proof_ffi(unsigned char *proof_buffer, + unsigned int proof_len, + unsigned char *public_input_buffer, + unsigned int public_input_len); diff --git a/operator/mina_account/lib/src/consensus_state.rs b/operator/mina_account/lib/src/consensus_state.rs new file mode 100644 index 000000000..e2b4467aa --- /dev/null +++ b/operator/mina_account/lib/src/consensus_state.rs @@ -0,0 +1,47 @@ +use blake2::{Blake2b512, Digest}; +use kimchi::o1_utils::FieldHelpers; +use mina_p2p_messages::{hash::MinaHash, v2::MinaStateProtocolStateValueStableV2}; + +#[derive(PartialEq)] +pub enum LongerChainResult { + Tip, + Candidate, +} + +pub fn select_longer_chain( + candidate: &MinaStateProtocolStateValueStableV2, + tip: &MinaStateProtocolStateValueStableV2, +) -> LongerChainResult { + let candidate_block_height = &candidate.body.consensus_state.blockchain_length.as_u32(); + let tip_block_height = &tip.body.consensus_state.blockchain_length.as_u32(); + + if candidate_block_height > tip_block_height { + return LongerChainResult::Candidate; + } + // tiebreak logic + else if candidate_block_height == tip_block_height { + // compare last VRF digests lexicographically + if hash_last_vrf(candidate) > hash_last_vrf(tip) { + return LongerChainResult::Candidate; + } else if hash_last_vrf(candidate) == hash_last_vrf(tip) { + // compare consensus state hashes lexicographically + if hash_state(candidate) > hash_state(tip) { + return LongerChainResult::Candidate; + } + } + } + + LongerChainResult::Tip +} + +fn hash_last_vrf(chain: &MinaStateProtocolStateValueStableV2) -> String { + let mut hasher = Blake2b512::new(); + hasher.update(chain.body.consensus_state.last_vrf_output.as_slice()); + let digest = hasher.finalize().to_vec(); + + hex::encode(&digest) +} + +fn hash_state(chain: &MinaStateProtocolStateValueStableV2) -> String { + MinaHash::hash(chain).to_hex() +} diff --git a/operator/mina_account/lib/src/devnet_vk.json b/operator/mina_account/lib/src/devnet_vk.json new file mode 100644 index 000000000..0e5160bb6 --- /dev/null +++ b/operator/mina_account/lib/src/devnet_vk.json @@ -0,0 +1,492 @@ +{ + "commitments": { + "sigma_comm": [ + [ + "0x16A2CBB00F33D627AAEFB19EAF5424680EF37F77C87558AF424130A927D08BAC", + "0x089F70D3C7690C8421C293C01F7A67EB2997E5B96AF11408D88884A6AD328E37" + ], + [ + "0x22CFAD2E118F91BE8E133664585947E25A282017E007700D67F0D72999639BCC", + "0x31AA847B558743C3CAD651B085327F0B67E1C1BFEA2FF472976589ADD952E6D4" + ], + [ + "0x02FB6661EE11262AFC7C8B0389A9B1E4ED18263C3F2468AAF035A07ECC61C9EB", + "0x30705D77AB82D6BAAC8E23640BBAB40F7E7FB53826CD5011575CAE52C6D0517D" + ], + [ + "0x0FD615E77CF392BE8285848DF60D4F87350ABCD65200FC4932E309133D145D05", + "0x3E75EA0E3810A97D8F1D1F8A6B0F9AE5D0F68AE34A4D0EFC29F00AB3BF6D480E" + ], + [ + "0x20C89F37CF8E43831F077DFF9AB9A676907BF9A0F64E418A643667808AB72DAB", + "0x389F98A86437D8A7F667ABB9B0B0DEACBD7E420B583B795363EBCECDBF1C187B" + ], + [ + "0x13548AEE4F67B7B90418512F400B79A69E156A801DE46233C756F9B67A9ABDD1", + "0x25F561C9531A0C83099AC722322A39DC653BC314D63A971624D1D3315B3DA0D5" + ], + [ + "0x20216D064B7466C42626F66F3F141997E6F29D17CC6EBA8FF91E1E03D31FE555", + "0x0082380869AFA6A961738C93BCEEA3042F3ECEA143A585B565A2BF6BD78A1224" + ] + ], + "coefficients_comm": [ + [ + "0x26EC10122354E7DEC10E83F7D26D4311863753F37489FFD2F5D634958C876CB4", + "0x25AB47DC77226E515B05BD2C1DFB025477F54FFBB9B62F4B2914306C2D1AEB6D" + ], + [ + "0x08060FD15238AE40E726A04EA5C1AE41D8A1D267C9AF7355A8D6C70607139922", + "0x13D36CAD9C78FD0AF514AB7ECAC433592389AE84283024B1D4C85D2E8C952B28" + ], + [ + "0x3AE007735587246066F71A1F09801C359E393CBF49DBDFEDD01E61AA88ECAF0F", + "0x15882EBC62C0E9BC93A14F2CB2ECE43402063B50C09CE735E56D51447689D2C6" + ], + [ + "0x3DCBFD7F258F598AEFB560A1B3BCE632B4AC20534FEFF3B35C82082FE708B236", + "0x254668B50AB44E074902E0DB981FDF045FC614C1E61EBDDA27C06DF9131FC71A" + ], + [ + "0x364F1609C5A72CC0A6F5966400AE1A5AA4B7684805B46D0EE09001F7618DD614", + "0x0F3E45A3DEC2B73BEC5E91ED78BB750B87C02A2339E5A40C2D51FAA0EE1D5B7E" + ], + [ + "0x2EA4EF211B04C50C1680CE1E38DACAE3EC40FAC3216A6D4157B29D6053C812E8", + "0x310B3ECB01C946FE01F766DF1249FD36E4AE2EAEB450D93DFDE08AE9D24BB7BC" + ], + [ + "0x3E32E6702761E653043644E9DC5D75FE7A351B764CD90D72DD1176DB1A541121", + "0x0454C684E407E066394B31CFCCBAF22844B7E17D162EFE860030960A38AD2B2E" + ], + [ + "0x1AE2CE814A97742F41565FEB5881767A2BCF55981A3C8ED33BAE069CBE652FCA", + "0x14DC3F97387117CCA4884F28DCC82C9CF1B7101623B481FD3D1588F568B3E26B" + ], + [ + "0x0A10FA40BB6C61E8185412EE2BAE86C51D19EA7276593DFA7FA3FABB0345521F", + "0x3A8ACF73B5EF4E52ED5DC96404A60C69A067B84FE77211C5407A48437BD5CF89" + ], + [ + "0x21B2C2D62891139A91056B9D298DA8713B7ADA51963B864A5A2376771A1AA766", + "0x1AC7782A588865397F219624D70D11A109283E82B9CD50FFEE23753461E755FE" + ], + [ + "0x2763E7A5B2C387147A0381B50D5C504A5012B7F7CA474C2B4A351011B9BBD036", + "0x13DEA6F4AEBDC606331746A886756C7EA266A52F60B45DE5544A04BFDB277455" + ], + [ + "0x32596E43A053571EE478A3106CABFE9ECB29437F78A978409B4DDE33FE637103", + "0x3D76AF5EE3EFF37E666087AC2827A8BD0D9690BF440FF24434DA3E6AFF7A2AF4" + ], + [ + "0x1D73FE7224F38A37B2C69E22FA6750BABAED17B0F9998877B33E488D9063CE8E", + "0x3E24CEADB1BDA92A0DBDA0F90DF3B8FBD7C6F7ABCC039E9D41AB6916A799F645" + ], + [ + "0x2FDF5D887BC70465AFAC06B7A43632732B5AF0B933EA045D35E99D532BD44CAF", + "0x211A76FD7B76DF3E693CAA0BBB5C178D5DDE827AB6A902AF04AB39D8040E29DF" + ], + [ + "0x0D29BA887D54D915CFB321573463A3CAF5C354848A51FFD6D4FFC0E0B4464D39", + "0x232829C5C662E87CD033AFB3E84E86EC342F4942AC9D75123A21172EE06CF567" + ] + ], + "generic_comm": [ + "0x363662743B4E693E18C0CF5FB651DF1205BB27FABCD93ADF54ECD973B21B921B", + "0x116FBA051A4A146C88BCB0F2B56309429CD63514EEEFBE6EA0B39927E72BB20C" + ], + "psm_comm": [ + "0x0A8B3EF5670C6367C721EDAA40AF511C18B1602A4732FEA01124D5D949304324", + "0x1DBE04516C4A33CDFBBD1F54F413B9F21B5D41B6CD668B249879A2688693E51B" + ], + "complete_add_comm": [ + "0x1E859218F11F787CE75C06FD5303457CBD307BDEEB693CC66A235CB85B314D4B", + "0x228167E190903072E8F34BD7AF61A0C02DE0BC3D54FF8760A2BCBFDD6A880688" + ], + "mul_comm": [ + "0x3EC97D3A8CD405A92B31B67184817925B99B1527065A28677AEAAEC37CC7B9C5", + "0x3844006206FF29A55DBB44A3D06E46610639E24E960B4BC32A663EEC4D04C689" + ], + "emul_comm": [ + "0x114772020FAF5E6660D7D75B666B7121829027A866A8214B42899E824D820CB9", + "0x01F7FC015E2F0C5E02E34F0FD6FBA0FCE01E40EA183F0F6F7C197553524A96B9" + ], + "endomul_scalar_comm": [ + "0x04C30A9B6412594ECD5EEFCA20D4B759BBC52B08868E01F74FDC82B557A76ADD", + "0x019413D8112950CB93D20BA29452DC281FFE1A692706C34BD148E331F844D244" + ] + }, + "index": { + "domain": { + "log_size_of_group": 14, + "group_gen": "0x1E5587687024253BB079B38D9C5371594958E496C605D3BD898B34D068AFBEE7" + }, + "max_poly_size": 32768, + "public": 40, + "prev_challenges": 2, + "srs": null, + "evals": { + "sigma_comm": [ + { + "unshifted": [ + [ + "Finite", + [ + "0x16A2CBB00F33D627AAEFB19EAF5424680EF37F77C87558AF424130A927D08BAC", + "0x089F70D3C7690C8421C293C01F7A67EB2997E5B96AF11408D88884A6AD328E37" + ] + ] + ], + "shifted": null + }, + { + "unshifted": [ + [ + "Finite", + [ + "0x22CFAD2E118F91BE8E133664585947E25A282017E007700D67F0D72999639BCC", + "0x31AA847B558743C3CAD651B085327F0B67E1C1BFEA2FF472976589ADD952E6D4" + ] + ] + ], + "shifted": null + }, + { + "unshifted": [ + [ + "Finite", + [ + "0x02FB6661EE11262AFC7C8B0389A9B1E4ED18263C3F2468AAF035A07ECC61C9EB", + "0x30705D77AB82D6BAAC8E23640BBAB40F7E7FB53826CD5011575CAE52C6D0517D" + ] + ] + ], + "shifted": null + }, + { + "unshifted": [ + [ + "Finite", + [ + "0x0FD615E77CF392BE8285848DF60D4F87350ABCD65200FC4932E309133D145D05", + "0x3E75EA0E3810A97D8F1D1F8A6B0F9AE5D0F68AE34A4D0EFC29F00AB3BF6D480E" + ] + ] + ], + "shifted": null + }, + { + "unshifted": [ + [ + "Finite", + [ + "0x20C89F37CF8E43831F077DFF9AB9A676907BF9A0F64E418A643667808AB72DAB", + "0x389F98A86437D8A7F667ABB9B0B0DEACBD7E420B583B795363EBCECDBF1C187B" + ] + ] + ], + "shifted": null + }, + { + "unshifted": [ + [ + "Finite", + [ + "0x13548AEE4F67B7B90418512F400B79A69E156A801DE46233C756F9B67A9ABDD1", + "0x25F561C9531A0C83099AC722322A39DC653BC314D63A971624D1D3315B3DA0D5" + ] + ] + ], + "shifted": null + }, + { + "unshifted": [ + [ + "Finite", + [ + "0x20216D064B7466C42626F66F3F141997E6F29D17CC6EBA8FF91E1E03D31FE555", + "0x0082380869AFA6A961738C93BCEEA3042F3ECEA143A585B565A2BF6BD78A1224" + ] + ] + ], + "shifted": null + } + ], + "coefficients_comm": [ + { + "unshifted": [ + [ + "Finite", + [ + "0x26EC10122354E7DEC10E83F7D26D4311863753F37489FFD2F5D634958C876CB4", + "0x25AB47DC77226E515B05BD2C1DFB025477F54FFBB9B62F4B2914306C2D1AEB6D" + ] + ] + ], + "shifted": null + }, + { + "unshifted": [ + [ + "Finite", + [ + "0x08060FD15238AE40E726A04EA5C1AE41D8A1D267C9AF7355A8D6C70607139922", + "0x13D36CAD9C78FD0AF514AB7ECAC433592389AE84283024B1D4C85D2E8C952B28" + ] + ] + ], + "shifted": null + }, + { + "unshifted": [ + [ + "Finite", + [ + "0x3AE007735587246066F71A1F09801C359E393CBF49DBDFEDD01E61AA88ECAF0F", + "0x15882EBC62C0E9BC93A14F2CB2ECE43402063B50C09CE735E56D51447689D2C6" + ] + ] + ], + "shifted": null + }, + { + "unshifted": [ + [ + "Finite", + [ + "0x3DCBFD7F258F598AEFB560A1B3BCE632B4AC20534FEFF3B35C82082FE708B236", + "0x254668B50AB44E074902E0DB981FDF045FC614C1E61EBDDA27C06DF9131FC71A" + ] + ] + ], + "shifted": null + }, + { + "unshifted": [ + [ + "Finite", + [ + "0x364F1609C5A72CC0A6F5966400AE1A5AA4B7684805B46D0EE09001F7618DD614", + "0x0F3E45A3DEC2B73BEC5E91ED78BB750B87C02A2339E5A40C2D51FAA0EE1D5B7E" + ] + ] + ], + "shifted": null + }, + { + "unshifted": [ + [ + "Finite", + [ + "0x2EA4EF211B04C50C1680CE1E38DACAE3EC40FAC3216A6D4157B29D6053C812E8", + "0x310B3ECB01C946FE01F766DF1249FD36E4AE2EAEB450D93DFDE08AE9D24BB7BC" + ] + ] + ], + "shifted": null + }, + { + "unshifted": [ + [ + "Finite", + [ + "0x3E32E6702761E653043644E9DC5D75FE7A351B764CD90D72DD1176DB1A541121", + "0x0454C684E407E066394B31CFCCBAF22844B7E17D162EFE860030960A38AD2B2E" + ] + ] + ], + "shifted": null + }, + { + "unshifted": [ + [ + "Finite", + [ + "0x1AE2CE814A97742F41565FEB5881767A2BCF55981A3C8ED33BAE069CBE652FCA", + "0x14DC3F97387117CCA4884F28DCC82C9CF1B7101623B481FD3D1588F568B3E26B" + ] + ] + ], + "shifted": null + }, + { + "unshifted": [ + [ + "Finite", + [ + "0x0A10FA40BB6C61E8185412EE2BAE86C51D19EA7276593DFA7FA3FABB0345521F", + "0x3A8ACF73B5EF4E52ED5DC96404A60C69A067B84FE77211C5407A48437BD5CF89" + ] + ] + ], + "shifted": null + }, + { + "unshifted": [ + [ + "Finite", + [ + "0x21B2C2D62891139A91056B9D298DA8713B7ADA51963B864A5A2376771A1AA766", + "0x1AC7782A588865397F219624D70D11A109283E82B9CD50FFEE23753461E755FE" + ] + ] + ], + "shifted": null + }, + { + "unshifted": [ + [ + "Finite", + [ + "0x2763E7A5B2C387147A0381B50D5C504A5012B7F7CA474C2B4A351011B9BBD036", + "0x13DEA6F4AEBDC606331746A886756C7EA266A52F60B45DE5544A04BFDB277455" + ] + ] + ], + "shifted": null + }, + { + "unshifted": [ + [ + "Finite", + [ + "0x32596E43A053571EE478A3106CABFE9ECB29437F78A978409B4DDE33FE637103", + "0x3D76AF5EE3EFF37E666087AC2827A8BD0D9690BF440FF24434DA3E6AFF7A2AF4" + ] + ] + ], + "shifted": null + }, + { + "unshifted": [ + [ + "Finite", + [ + "0x1D73FE7224F38A37B2C69E22FA6750BABAED17B0F9998877B33E488D9063CE8E", + "0x3E24CEADB1BDA92A0DBDA0F90DF3B8FBD7C6F7ABCC039E9D41AB6916A799F645" + ] + ] + ], + "shifted": null + }, + { + "unshifted": [ + [ + "Finite", + [ + "0x2FDF5D887BC70465AFAC06B7A43632732B5AF0B933EA045D35E99D532BD44CAF", + "0x211A76FD7B76DF3E693CAA0BBB5C178D5DDE827AB6A902AF04AB39D8040E29DF" + ] + ] + ], + "shifted": null + }, + { + "unshifted": [ + [ + "Finite", + [ + "0x0D29BA887D54D915CFB321573463A3CAF5C354848A51FFD6D4FFC0E0B4464D39", + "0x232829C5C662E87CD033AFB3E84E86EC342F4942AC9D75123A21172EE06CF567" + ] + ] + ], + "shifted": null + } + ], + "generic_comm": { + "unshifted": [ + [ + "Finite", + [ + "0x363662743B4E693E18C0CF5FB651DF1205BB27FABCD93ADF54ECD973B21B921B", + "0x116FBA051A4A146C88BCB0F2B56309429CD63514EEEFBE6EA0B39927E72BB20C" + ] + ] + ], + "shifted": null + }, + "psm_comm": { + "unshifted": [ + [ + "Finite", + [ + "0x0A8B3EF5670C6367C721EDAA40AF511C18B1602A4732FEA01124D5D949304324", + "0x1DBE04516C4A33CDFBBD1F54F413B9F21B5D41B6CD668B249879A2688693E51B" + ] + ] + ], + "shifted": null + }, + "complete_add_comm": { + "unshifted": [ + [ + "Finite", + [ + "0x1E859218F11F787CE75C06FD5303457CBD307BDEEB693CC66A235CB85B314D4B", + "0x228167E190903072E8F34BD7AF61A0C02DE0BC3D54FF8760A2BCBFDD6A880688" + ] + ] + ], + "shifted": null + }, + "mul_comm": { + "unshifted": [ + [ + "Finite", + [ + "0x3EC97D3A8CD405A92B31B67184817925B99B1527065A28677AEAAEC37CC7B9C5", + "0x3844006206FF29A55DBB44A3D06E46610639E24E960B4BC32A663EEC4D04C689" + ] + ] + ], + "shifted": null + }, + "emul_comm": { + "unshifted": [ + [ + "Finite", + [ + "0x114772020FAF5E6660D7D75B666B7121829027A866A8214B42899E824D820CB9", + "0x01F7FC015E2F0C5E02E34F0FD6FBA0FCE01E40EA183F0F6F7C197553524A96B9" + ] + ] + ], + "shifted": null + }, + "endomul_scalar_comm": { + "unshifted": [ + [ + "Finite", + [ + "0x04C30A9B6412594ECD5EEFCA20D4B759BBC52B08868E01F74FDC82B557A76ADD", + "0x019413D8112950CB93D20BA29452DC281FFE1A692706C34BD148E331F844D244" + ] + ] + ], + "shifted": null + }, + "xor_comm": null, + "range_check0_comm": null, + "range_check1_comm": null, + "foreign_field_add_comm": null, + "foreign_field_mul_comm": null, + "rot_comm": null + }, + "shifts": [ + "0x0000000000000000000000000000000000000000000000000000000000000001", + "0x00B9CDC8FD0BD4B27E2A74AF7AEBD5734D52D75BDF85EBF1CAD03413E914A2E3", + "0x007CF68160D84012626E0046A932AD12E68B3394D6E2A001A537FFB40D3527C6", + "0x0077D45AECB939AE97A3952B48189964AA209609F19BE4A4B89F339A33440F6D", + "0x0077C7E54505D4771F6AF1FED2195500481EF1F3C0397B0AC819E678BD2309B4", + "0x00B3AF68ECC6AE7A4727F0708EDF4736BE1C99281FA380846E42264C62407484", + "0x00381CA4536FC0ED935D50A74A87136F1A0675B618898DBCE67E564AB20174A1" + ], + "lookup_index": null, + "zk_rows": 3 + }, + "data": { + "constraints": 16384 + } +} diff --git a/operator/mina_account/lib/src/lib.rs b/operator/mina_account/lib/src/lib.rs new file mode 100644 index 000000000..1ef87cdfe --- /dev/null +++ b/operator/mina_account/lib/src/lib.rs @@ -0,0 +1,248 @@ +mod consensus_state; + +use std::array::TryFromSliceError; + +use ark_ec::short_weierstrass_jacobian::GroupAffine; +use base64::prelude::*; +use consensus_state::{select_longer_chain, LongerChainResult}; +use kimchi::mina_curves::pasta::{Fp, PallasParameters}; +use kimchi::o1_utils::FieldHelpers; +use kimchi::verifier_index::VerifierIndex; +use lazy_static::lazy_static; +use mina_p2p_messages::binprot::BinProtRead; +use mina_p2p_messages::hash::MinaHash; +use mina_p2p_messages::v2::{MinaBaseProofStableV2, MinaStateProtocolStateValueStableV2}; +use mina_tree::proofs::verification::verify_block; +use mina_tree::verifier::get_srs; +use verifier_index::deserialize_blockchain_vk; + +mod verifier_index; + +lazy_static! { + static ref VERIFIER_INDEX: VerifierIndex> = + deserialize_blockchain_vk().unwrap(); +} + +// TODO(xqft): check proof size +const MAX_PROOF_SIZE: usize = 16 * 1024; +const MAX_PUB_INPUT_SIZE: usize = 6 * 1024; +const STATE_HASH_SIZE: usize = 32; + +#[no_mangle] +pub extern "C" fn verify_protocol_state_proof_ffi( + proof_bytes: &[u8; MAX_PROOF_SIZE], + proof_len: usize, + public_input_bytes: &[u8; MAX_PUB_INPUT_SIZE], + public_input_len: usize, +) -> bool { + let protocol_state_proof = match parse_proof(&proof_bytes[..proof_len]) { + Ok(protocol_state_proof) => protocol_state_proof, + Err(err) => { + eprintln!("Failed to parse protocol state proof: {}", err); + return false; + } + }; + + let (candidate_hash, tip_hash, candidate_state, tip_state) = + match parse_pub_inputs(&public_input_bytes[..public_input_len]) { + Ok(protocol_state_pub) => protocol_state_pub, + Err(err) => { + eprintln!("Failed to parse protocol state public inputs: {}", err); + return false; + } + }; + + // TODO(xqft): this can be a batcher's pre-verification check (but don't remove it from here) + if MinaHash::hash(&tip_state) != tip_hash { + eprintln!("The tip's protocol state doesn't match the hash provided as public input"); + return false; + } + if MinaHash::hash(&candidate_state) != candidate_hash { + eprintln!("The candidate's protocol state doesn't match the hash provided as public input"); + return false; + } + + // TODO(xqft): srs should be a static, but can't make it so because it doesn't have all its + // parameters initialized. + let srs = get_srs::(); + let srs = srs.lock().unwrap(); + + // Consensus check: Short fork rule + let longer_chain = select_longer_chain(&candidate_state, &tip_state); + if longer_chain == LongerChainResult::Tip { + eprintln!("Consensus check failed"); + return false; + } + + // Pickles verification + verify_block(&protocol_state_proof, candidate_hash, &VERIFIER_INDEX, &srs) +} + +pub fn parse_hash(pub_inputs: &[u8], offset: &mut usize) -> Result { + let hash = pub_inputs + .get(*offset..*offset + STATE_HASH_SIZE) + .ok_or("Failed to slice candidate hash".to_string()) + .and_then(|bytes| Fp::from_bytes(bytes).map_err(|err| err.to_string()))?; + + *offset += STATE_HASH_SIZE; + + Ok(hash) +} + +pub fn parse_state( + pub_inputs: &[u8], + offset: &mut usize, +) -> Result { + let state_len: usize = pub_inputs + .get(*offset..*offset + 4) + .ok_or("Failed to slice state len".to_string()) + .and_then(|slice| { + slice + .try_into() + .map_err(|err: TryFromSliceError| err.to_string()) + }) + .map(u32::from_be_bytes) + .and_then(|len| usize::try_from(len).map_err(|err| err.to_string()))?; + + let state = pub_inputs + .get(*offset + 4..*offset + 4 + state_len) + .ok_or("Failed to slice state".to_string()) + .and_then(|bytes| std::str::from_utf8(bytes).map_err(|err| err.to_string())) + .and_then(|base64| { + BASE64_STANDARD + .decode(base64) + .map_err(|err| err.to_string()) + }) + .and_then(|binprot| { + MinaStateProtocolStateValueStableV2::binprot_read(&mut binprot.as_slice()) + .map_err(|err| err.to_string()) + })?; + + *offset += 4 + state_len; + + Ok(state) +} + +pub fn parse_pub_inputs( + pub_inputs: &[u8], +) -> Result< + ( + Fp, + Fp, + MinaStateProtocolStateValueStableV2, + MinaStateProtocolStateValueStableV2, + ), + String, +> { + let mut offset = 0; + + let candidate_hash = parse_hash(pub_inputs, &mut offset)?; + let tip_hash = parse_hash(pub_inputs, &mut offset)?; + + let candidate_state = parse_state(pub_inputs, &mut offset)?; + let tip_state = parse_state(pub_inputs, &mut offset)?; + + Ok((candidate_hash, tip_hash, candidate_state, tip_state)) +} + +pub fn parse_proof(proof_bytes: &[u8]) -> Result { + std::str::from_utf8(proof_bytes) + .map_err(|err| err.to_string()) + .and_then(|base64| { + BASE64_URL_SAFE + .decode(base64) + .map_err(|err| err.to_string()) + }) + .and_then(|binprot| { + MinaBaseProofStableV2::binprot_read(&mut binprot.as_slice()) + .map_err(|err| err.to_string()) + }) +} + +#[cfg(test)] +mod test { + use super::*; + + const PROOF_BYTES: &[u8] = + include_bytes!("../../../../batcher/aligned/test_files/mina/protocol_state.proof"); + const PUB_INPUT_BYTES: &[u8] = + include_bytes!("../../../../batcher/aligned/test_files/mina/protocol_state.pub"); + const PROTOCOL_STATE_BAD_HASH_PUB_BYTES: &[u8] = + include_bytes!("../../../../batcher/aligned/test_files/mina/protocol_state_bad_hash.pub"); + const PROTOCOL_STATE_BAD_CONSENSUS_PUB_BYTES: &[u8] = include_bytes!( + "../../../../batcher/aligned/test_files/mina/protocol_state_bad_consensus.pub" + ); + + #[test] + fn parse_protocol_state_proof_does_not_fail() { + parse_proof(PROOF_BYTES).unwrap(); + } + + #[test] + fn parse_protocol_state_pub_does_not_fail() { + parse_pub_inputs(PUB_INPUT_BYTES).unwrap(); + } + + #[test] + fn protocol_state_proof_verifies() { + let mut proof_buffer = [0u8; super::MAX_PROOF_SIZE]; + let proof_size = PROOF_BYTES.len(); + assert!(proof_size <= proof_buffer.len()); + proof_buffer[..proof_size].clone_from_slice(PROOF_BYTES); + + let mut pub_input_buffer = [0u8; super::MAX_PUB_INPUT_SIZE]; + let pub_input_size = PUB_INPUT_BYTES.len(); + assert!(pub_input_size <= pub_input_buffer.len()); + pub_input_buffer[..pub_input_size].clone_from_slice(PUB_INPUT_BYTES); + + let result = verify_protocol_state_proof_ffi( + &proof_buffer, + proof_size, + &pub_input_buffer, + pub_input_size, + ); + assert!(result); + } + + #[test] + fn proof_of_protocol_state_with_bad_hash_does_not_verify() { + let mut proof_buffer = [0u8; super::MAX_PROOF_SIZE]; + let proof_size = PROOF_BYTES.len(); + assert!(proof_size <= proof_buffer.len()); + proof_buffer[..proof_size].clone_from_slice(PROOF_BYTES); + + let mut pub_input_buffer = [0u8; super::MAX_PUB_INPUT_SIZE]; + let pub_input_size = PROTOCOL_STATE_BAD_HASH_PUB_BYTES.len(); + assert!(pub_input_size <= pub_input_buffer.len()); + pub_input_buffer[..pub_input_size].clone_from_slice(PROTOCOL_STATE_BAD_HASH_PUB_BYTES); + + let result = verify_protocol_state_proof_ffi( + &proof_buffer, + proof_size, + &pub_input_buffer, + pub_input_size, + ); + assert!(!result); + } + + #[test] + fn proof_of_protocol_state_with_bad_consensus_does_not_verify() { + let mut proof_buffer = [0u8; super::MAX_PROOF_SIZE]; + let proof_size = PROOF_BYTES.len(); + assert!(proof_size <= proof_buffer.len()); + proof_buffer[..proof_size].clone_from_slice(PROOF_BYTES); + + let mut pub_input_buffer = [0u8; super::MAX_PUB_INPUT_SIZE]; + let pub_input_size = PROTOCOL_STATE_BAD_CONSENSUS_PUB_BYTES.len(); + assert!(pub_input_size <= pub_input_buffer.len()); + pub_input_buffer[..pub_input_size].clone_from_slice(PROTOCOL_STATE_BAD_CONSENSUS_PUB_BYTES); + + let result = verify_protocol_state_proof_ffi( + &proof_buffer, + proof_size, + &pub_input_buffer, + pub_input_size, + ); + assert!(!result); + } +} diff --git a/operator/mina_account/lib/src/mainnet_vk.json b/operator/mina_account/lib/src/mainnet_vk.json new file mode 100644 index 000000000..c3d121114 --- /dev/null +++ b/operator/mina_account/lib/src/mainnet_vk.json @@ -0,0 +1,485 @@ +{ + "commitments": { + "sigma_comm": [ + [ + "0x16A2CBB00F33D627AAEFB19EAF5424680EF37F77C87558AF424130A927D08BAC", + "0x089F70D3C7690C8421C293C01F7A67EB2997E5B96AF11408D88884A6AD328E37" + ], + [ + "0x22CFAD2E118F91BE8E133664585947E25A282017E007700D67F0D72999639BCC", + "0x31AA847B558743C3CAD651B085327F0B67E1C1BFEA2FF472976589ADD952E6D4" + ], + [ + "0x02FB6661EE11262AFC7C8B0389A9B1E4ED18263C3F2468AAF035A07ECC61C9EB", + "0x30705D77AB82D6BAAC8E23640BBAB40F7E7FB53826CD5011575CAE52C6D0517D" + ], + [ + "0x0FD615E77CF392BE8285848DF60D4F87350ABCD65200FC4932E309133D145D05", + "0x3E75EA0E3810A97D8F1D1F8A6B0F9AE5D0F68AE34A4D0EFC29F00AB3BF6D480E" + ], + [ + "0x20C89F37CF8E43831F077DFF9AB9A676907BF9A0F64E418A643667808AB72DAB", + "0x389F98A86437D8A7F667ABB9B0B0DEACBD7E420B583B795363EBCECDBF1C187B" + ], + [ + "0x13548AEE4F67B7B90418512F400B79A69E156A801DE46233C756F9B67A9ABDD1", + "0x25F561C9531A0C83099AC722322A39DC653BC314D63A971624D1D3315B3DA0D5" + ], + [ + "0x20216D064B7466C42626F66F3F141997E6F29D17CC6EBA8FF91E1E03D31FE555", + "0x0082380869AFA6A961738C93BCEEA3042F3ECEA143A585B565A2BF6BD78A1224" + ] + ], + "coefficients_comm": [ + [ + "0x34858195AC3FFEBA04F0FAAF38F2574CD903985B56DCAEF53C29EF52CF70FB65", + "0x0D3DD0931D64868F70BE25C6B2CA4D5CA5C6B80763CAFE2B64AEF5F74E653C05" + ], + [ + "0x08060FD15238AE40E726A04EA5C1AE41D8A1D267C9AF7355A8D6C70607139922", + "0x13D36CAD9C78FD0AF514AB7ECAC433592389AE84283024B1D4C85D2E8C952B28" + ], + [ + "0x3AE007735587246066F71A1F09801C359E393CBF49DBDFEDD01E61AA88ECAF0F", + "0x15882EBC62C0E9BC93A14F2CB2ECE43402063B50C09CE735E56D51447689D2C6" + ], + [ + "0x3DCBFD7F258F598AEFB560A1B3BCE632B4AC20534FEFF3B35C82082FE708B236", + "0x254668B50AB44E074902E0DB981FDF045FC614C1E61EBDDA27C06DF9131FC71A" + ], + [ + "0x364F1609C5A72CC0A6F5966400AE1A5AA4B7684805B46D0EE09001F7618DD614", + "0x0F3E45A3DEC2B73BEC5E91ED78BB750B87C02A2339E5A40C2D51FAA0EE1D5B7E" + ], + [ + "0x0BE841A33AB98E3392CB8E27AB1AF419454643CD3668FCC76D249D9AB80AA2AB", + "0x3A92B08771858E78BFC2676B128A9AC404797775D140C2C022AEEC8F69182A2E" + ], + [ + "0x3E32E6702761E653043644E9DC5D75FE7A351B764CD90D72DD1176DB1A541121", + "0x0454C684E407E066394B31CFCCBAF22844B7E17D162EFE860030960A38AD2B2E" + ], + [ + "0x1AE2CE814A97742F41565FEB5881767A2BCF55981A3C8ED33BAE069CBE652FCA", + "0x14DC3F97387117CCA4884F28DCC82C9CF1B7101623B481FD3D1588F568B3E26B" + ], + [ + "0x0A10FA40BB6C61E8185412EE2BAE86C51D19EA7276593DFA7FA3FABB0345521F", + "0x3A8ACF73B5EF4E52ED5DC96404A60C69A067B84FE77211C5407A48437BD5CF89" + ], + [ + "0x21B2C2D62891139A91056B9D298DA8713B7ADA51963B864A5A2376771A1AA766", + "0x1AC7782A588865397F219624D70D11A109283E82B9CD50FFEE23753461E755FE" + ], + [ + "0x2763E7A5B2C387147A0381B50D5C504A5012B7F7CA474C2B4A351011B9BBD036", + "0x13DEA6F4AEBDC606331746A886756C7EA266A52F60B45DE5544A04BFDB277455" + ], + [ + "0x32596E43A053571EE478A3106CABFE9ECB29437F78A978409B4DDE33FE637103", + "0x3D76AF5EE3EFF37E666087AC2827A8BD0D9690BF440FF24434DA3E6AFF7A2AF4" + ], + [ + "0x1D73FE7224F38A37B2C69E22FA6750BABAED17B0F9998877B33E488D9063CE8E", + "0x3E24CEADB1BDA92A0DBDA0F90DF3B8FBD7C6F7ABCC039E9D41AB6916A799F645" + ], + [ + "0x2FDF5D887BC70465AFAC06B7A43632732B5AF0B933EA045D35E99D532BD44CAF", + "0x211A76FD7B76DF3E693CAA0BBB5C178D5DDE827AB6A902AF04AB39D8040E29DF" + ], + [ + "0x0D29BA887D54D915CFB321573463A3CAF5C354848A51FFD6D4FFC0E0B4464D39", + "0x232829C5C662E87CD033AFB3E84E86EC342F4942AC9D75123A21172EE06CF567" + ] + ], + "generic_comm": [ + "0x363662743B4E693E18C0CF5FB651DF1205BB27FABCD93ADF54ECD973B21B921B", + "0x116FBA051A4A146C88BCB0F2B56309429CD63514EEEFBE6EA0B39927E72BB20C" + ], + "psm_comm": [ + "0x0A8B3EF5670C6367C721EDAA40AF511C18B1602A4732FEA01124D5D949304324", + "0x1DBE04516C4A33CDFBBD1F54F413B9F21B5D41B6CD668B249879A2688693E51B" + ], + "complete_add_comm": [ + "0x1E859218F11F787CE75C06FD5303457CBD307BDEEB693CC66A235CB85B314D4B", + "0x228167E190903072E8F34BD7AF61A0C02DE0BC3D54FF8760A2BCBFDD6A880688" + ], + "mul_comm": [ + "0x3EC97D3A8CD405A92B31B67184817925B99B1527065A28677AEAAEC37CC7B9C5", + "0x3844006206FF29A55DBB44A3D06E46610639E24E960B4BC32A663EEC4D04C689" + ], + "emul_comm": [ + "0x114772020FAF5E6660D7D75B666B7121829027A866A8214B42899E824D820CB9", + "0x01F7FC015E2F0C5E02E34F0FD6FBA0FCE01E40EA183F0F6F7C197553524A96B9" + ], + "endomul_scalar_comm": [ + "0x04C30A9B6412594ECD5EEFCA20D4B759BBC52B08868E01F74FDC82B557A76ADD", + "0x019413D8112950CB93D20BA29452DC281FFE1A692706C34BD148E331F844D244" + ] + }, + "index": { + "domain": { + "log_size_of_group": 14, + "group_gen": "0x1E5587687024253BB079B38D9C5371594958E496C605D3BD898B34D068AFBEE7" + }, + "max_poly_size": 32768, + "public": 40, + "prev_challenges": 2, + "srs": null, + "evals": { + "sigma_comm": [ + { + "unshifted": [ + [ + "Finite", + [ + "0x16A2CBB00F33D627AAEFB19EAF5424680EF37F77C87558AF424130A927D08BAC", + "0x089F70D3C7690C8421C293C01F7A67EB2997E5B96AF11408D88884A6AD328E37" + ] + ] + ], + "shifted": null + }, + { + "unshifted": [ + [ + "Finite", + [ + "0x22CFAD2E118F91BE8E133664585947E25A282017E007700D67F0D72999639BCC", + "0x31AA847B558743C3CAD651B085327F0B67E1C1BFEA2FF472976589ADD952E6D4" + ] + ] + ], + "shifted": null + }, + { + "unshifted": [ + [ + "Finite", + [ + "0x02FB6661EE11262AFC7C8B0389A9B1E4ED18263C3F2468AAF035A07ECC61C9EB", + "0x30705D77AB82D6BAAC8E23640BBAB40F7E7FB53826CD5011575CAE52C6D0517D" + ] + ] + ], + "shifted": null + }, + { + "unshifted": [ + [ + "Finite", + [ + "0x0FD615E77CF392BE8285848DF60D4F87350ABCD65200FC4932E309133D145D05", + "0x3E75EA0E3810A97D8F1D1F8A6B0F9AE5D0F68AE34A4D0EFC29F00AB3BF6D480E" + ] + ] + ], + "shifted": null + }, + { + "unshifted": [ + [ + "Finite", + [ + "0x20C89F37CF8E43831F077DFF9AB9A676907BF9A0F64E418A643667808AB72DAB", + "0x389F98A86437D8A7F667ABB9B0B0DEACBD7E420B583B795363EBCECDBF1C187B" + ] + ] + ], + "shifted": null + }, + { + "unshifted": [ + [ + "Finite", + [ + "0x13548AEE4F67B7B90418512F400B79A69E156A801DE46233C756F9B67A9ABDD1", + "0x25F561C9531A0C83099AC722322A39DC653BC314D63A971624D1D3315B3DA0D5" + ] + ] + ], + "shifted": null + }, + { + "unshifted": [ + [ + "Finite", + [ + "0x20216D064B7466C42626F66F3F141997E6F29D17CC6EBA8FF91E1E03D31FE555", + "0x0082380869AFA6A961738C93BCEEA3042F3ECEA143A585B565A2BF6BD78A1224" + ] + ] + ], + "shifted": null + } + ], + "coefficients_comm": [ + { + "unshifted": [ + [ + "Finite", + [ + "0x34858195AC3FFEBA04F0FAAF38F2574CD903985B56DCAEF53C29EF52CF70FB65", + "0x0D3DD0931D64868F70BE25C6B2CA4D5CA5C6B80763CAFE2B64AEF5F74E653C05" + ] + ] + ], + "shifted": null + }, + { + "unshifted": [ + [ + "Finite", + [ + "0x08060FD15238AE40E726A04EA5C1AE41D8A1D267C9AF7355A8D6C70607139922", + "0x13D36CAD9C78FD0AF514AB7ECAC433592389AE84283024B1D4C85D2E8C952B28" + ] + ] + ], + "shifted": null + }, + { + "unshifted": [ + [ + "Finite", + [ + "0x3AE007735587246066F71A1F09801C359E393CBF49DBDFEDD01E61AA88ECAF0F", + "0x15882EBC62C0E9BC93A14F2CB2ECE43402063B50C09CE735E56D51447689D2C6" + ] + ] + ], + "shifted": null + }, + { + "unshifted": [ + [ + "Finite", + [ + "0x3DCBFD7F258F598AEFB560A1B3BCE632B4AC20534FEFF3B35C82082FE708B236", + "0x254668B50AB44E074902E0DB981FDF045FC614C1E61EBDDA27C06DF9131FC71A" + ] + ] + ], + "shifted": null + }, + { + "unshifted": [ + [ + "Finite", + [ + "0x364F1609C5A72CC0A6F5966400AE1A5AA4B7684805B46D0EE09001F7618DD614", + "0x0F3E45A3DEC2B73BEC5E91ED78BB750B87C02A2339E5A40C2D51FAA0EE1D5B7E" + ] + ] + ], + "shifted": null + }, + { + "unshifted": [ + [ + "Finite", + [ + "0x0BE841A33AB98E3392CB8E27AB1AF419454643CD3668FCC76D249D9AB80AA2AB", + "0x3A92B08771858E78BFC2676B128A9AC404797775D140C2C022AEEC8F69182A2E" + ] + ] + ], + "shifted": null + }, + { + "unshifted": [ + [ + "Finite", + [ + "0x3E32E6702761E653043644E9DC5D75FE7A351B764CD90D72DD1176DB1A541121", + "0x0454C684E407E066394B31CFCCBAF22844B7E17D162EFE860030960A38AD2B2E" + ] + ] + ], + "shifted": null + }, + { + "unshifted": [ + [ + "Finite", + [ + "0x1AE2CE814A97742F41565FEB5881767A2BCF55981A3C8ED33BAE069CBE652FCA", + "0x14DC3F97387117CCA4884F28DCC82C9CF1B7101623B481FD3D1588F568B3E26B" + ] + ] + ], + "shifted": null + }, + { + "unshifted": [ + [ + "Finite", + [ + "0x0A10FA40BB6C61E8185412EE2BAE86C51D19EA7276593DFA7FA3FABB0345521F", + "0x3A8ACF73B5EF4E52ED5DC96404A60C69A067B84FE77211C5407A48437BD5CF89" + ] + ] + ], + "shifted": null + }, + { + "unshifted": [ + [ + "Finite", + [ + "0x21B2C2D62891139A91056B9D298DA8713B7ADA51963B864A5A2376771A1AA766", + "0x1AC7782A588865397F219624D70D11A109283E82B9CD50FFEE23753461E755FE" + ] + ] + ], + "shifted": null + }, + { + "unshifted": [ + [ + "Finite", + [ + "0x2763E7A5B2C387147A0381B50D5C504A5012B7F7CA474C2B4A351011B9BBD036", + "0x13DEA6F4AEBDC606331746A886756C7EA266A52F60B45DE5544A04BFDB277455" + ] + ] + ], + "shifted": null + }, + { + "unshifted": [ + [ + "Finite", + [ + "0x32596E43A053571EE478A3106CABFE9ECB29437F78A978409B4DDE33FE637103", + "0x3D76AF5EE3EFF37E666087AC2827A8BD0D9690BF440FF24434DA3E6AFF7A2AF4" + ] + ] + ], + "shifted": null + }, + { + "unshifted": [ + [ + "Finite", + [ + "0x1D73FE7224F38A37B2C69E22FA6750BABAED17B0F9998877B33E488D9063CE8E", + "0x3E24CEADB1BDA92A0DBDA0F90DF3B8FBD7C6F7ABCC039E9D41AB6916A799F645" + ] + ] + ], + "shifted": null + }, + { + "unshifted": [ + [ + "Finite", + [ + "0x2FDF5D887BC70465AFAC06B7A43632732B5AF0B933EA045D35E99D532BD44CAF", + "0x211A76FD7B76DF3E693CAA0BBB5C178D5DDE827AB6A902AF04AB39D8040E29DF" + ] + ] + ], + "shifted": null + }, + { + "unshifted": [ + [ + "Finite", + [ + "0x0D29BA887D54D915CFB321573463A3CAF5C354848A51FFD6D4FFC0E0B4464D39", + "0x232829C5C662E87CD033AFB3E84E86EC342F4942AC9D75123A21172EE06CF567" + ] + ] + ], + "shifted": null + } + ], + "generic_comm": { + "unshifted": [ + [ + "Finite", + [ + "0x363662743B4E693E18C0CF5FB651DF1205BB27FABCD93ADF54ECD973B21B921B", + "0x116FBA051A4A146C88BCB0F2B56309429CD63514EEEFBE6EA0B39927E72BB20C" + ] + ] + ], + "shifted": null + }, + "psm_comm": { + "unshifted": [ + [ + "Finite", + [ + "0x0A8B3EF5670C6367C721EDAA40AF511C18B1602A4732FEA01124D5D949304324", + "0x1DBE04516C4A33CDFBBD1F54F413B9F21B5D41B6CD668B249879A2688693E51B" + ] + ] + ], + "shifted": null + }, + "complete_add_comm": { + "unshifted": [ + [ + "Finite", + [ + "0x1E859218F11F787CE75C06FD5303457CBD307BDEEB693CC66A235CB85B314D4B", + "0x228167E190903072E8F34BD7AF61A0C02DE0BC3D54FF8760A2BCBFDD6A880688" + ] + ] + ], + "shifted": null + }, + "mul_comm": { + "unshifted": [ + [ + "Finite", + [ + "0x3EC97D3A8CD405A92B31B67184817925B99B1527065A28677AEAAEC37CC7B9C5", + "0x3844006206FF29A55DBB44A3D06E46610639E24E960B4BC32A663EEC4D04C689" + ] + ] + ], + "shifted": null + }, + "emul_comm": { + "unshifted": [ + [ + "Finite", + [ + "0x114772020FAF5E6660D7D75B666B7121829027A866A8214B42899E824D820CB9", + "0x01F7FC015E2F0C5E02E34F0FD6FBA0FCE01E40EA183F0F6F7C197553524A96B9" + ] + ] + ], + "shifted": null + }, + "endomul_scalar_comm": { + "unshifted": [ + [ + "Finite", + [ + "0x04C30A9B6412594ECD5EEFCA20D4B759BBC52B08868E01F74FDC82B557A76ADD", + "0x019413D8112950CB93D20BA29452DC281FFE1A692706C34BD148E331F844D244" + ] + ] + ], + "shifted": null + } + }, + "shifts": [ + "0x0000000000000000000000000000000000000000000000000000000000000001", + "0x00B9CDC8FD0BD4B27E2A74AF7AEBD5734D52D75BDF85EBF1CAD03413E914A2E3", + "0x007CF68160D84012626E0046A932AD12E68B3394D6E2A001A537FFB40D3527C6", + "0x0077D45AECB939AE97A3952B48189964AA209609F19BE4A4B89F339A33440F6D", + "0x0077C7E54505D4771F6AF1FED2195500481EF1F3C0397B0AC819E678BD2309B4", + "0x00B3AF68ECC6AE7A4727F0708EDF4736BE1C99281FA380846E42264C62407484", + "0x00381CA4536FC0ED935D50A74A87136F1A0675B618898DBCE67E564AB20174A1" + ], + "lookup_index": null + }, + "data": { + "constraints": 16384 + } +} diff --git a/operator/mina_account/lib/src/verifier_index.rs b/operator/mina_account/lib/src/verifier_index.rs new file mode 100644 index 000000000..4cf12ea76 --- /dev/null +++ b/operator/mina_account/lib/src/verifier_index.rs @@ -0,0 +1,276 @@ +use std::{array, sync::Arc}; + +use ark_ff::{Field, PrimeField}; +use ark_poly::{ + univariate::DensePolynomial, EvaluationDomain, Radix2EvaluationDomain, UVPolynomial, +}; +use kimchi::{ + circuits::{ + constraints::FeatureFlags, + expr::Linearization, + lookup::lookups::{LookupFeatures, LookupPatterns}, + }, + linearization::expr_linearization, + mina_curves::pasta::{Fp, Fq, Pallas, Vesta}, + poly_commitment::{srs::SRS, PolyComm}, + verifier_index::VerifierIndex, +}; +use serde::Deserialize; + +const BLOCKCHAIN_VK_JSON: &str = include_str!("mainnet_vk.json"); + +#[derive(Deserialize)] +struct BlockchainVerificationKey { + commitments: Commitments, + index: Index, +} + +#[derive(Deserialize)] +struct Commitments { + sigma_comm: [JSONPolyComm; 7], + coefficients_comm: [JSONPolyComm; 15], + generic_comm: JSONPolyComm, + psm_comm: JSONPolyComm, + complete_add_comm: JSONPolyComm, + mul_comm: JSONPolyComm, + emul_comm: JSONPolyComm, + endomul_scalar_comm: JSONPolyComm, +} + +#[derive(Deserialize)] +struct Index { + domain: Domain, + max_poly_size: usize, + public: usize, + prev_challenges: usize, + shifts: [JSONFq; 7], +} + +#[derive(Deserialize)] +struct Domain { + log_size_of_group: usize, +} + +#[derive(Deserialize)] +struct JSONFp(String); +#[derive(Deserialize)] +struct JSONFq(String); + +#[derive(Deserialize)] +struct JSONGroupAffine(JSONFp, JSONFp); + +#[derive(Deserialize)] +struct JSONPolyComm(JSONGroupAffine); + +impl TryInto for JSONFp { + type Error = String; + + fn try_into(self) -> Result { + let bytes = hex::decode(self.0.trim_start_matches("0x")).map_err(|err| err.to_string())?; + Ok(Fp::from_be_bytes_mod_order(&bytes)) + } +} + +impl TryInto for JSONFq { + type Error = String; + + fn try_into(self) -> Result { + let bytes = hex::decode(self.0.trim_start_matches("0x")).map_err(|err| err.to_string())?; + Ok(Fq::from_be_bytes_mod_order(&bytes)) + } +} + +impl TryInto for JSONGroupAffine { + type Error = String; + + fn try_into(self) -> Result { + // FIXME(xqft): handle point at infinity + Ok(Pallas::new(self.0.try_into()?, self.1.try_into()?, false)) + } +} + +impl TryInto> for JSONPolyComm { + type Error = String; + + fn try_into(self) -> Result, Self::Error> { + Ok(PolyComm { + unshifted: vec![self.0.try_into()?], + shifted: None, + }) + } +} + +pub fn deserialize_blockchain_vk() -> Result, String> { + let vk: BlockchainVerificationKey = + serde_json::from_str(BLOCKCHAIN_VK_JSON).map_err(|err| err.to_string())?; + + let max_poly_size = vk.index.max_poly_size; + let domain = Radix2EvaluationDomain::new(1 << vk.index.domain.log_size_of_group) + .ok_or("failed to create domain".to_owned())?; + + let Commitments { + sigma_comm, + coefficients_comm, + generic_comm, + psm_comm, + complete_add_comm, + mul_comm, + emul_comm, + endomul_scalar_comm, + } = vk.commitments; + let empty_poly_comm = |_| PolyComm::new(Vec::new(), None); + + let sigma_comm = { + let mut new_sigma_comm = array::from_fn(empty_poly_comm); + for (comm, new_comm) in sigma_comm.into_iter().zip(new_sigma_comm.iter_mut()) { + *new_comm = comm.try_into()? + } + new_sigma_comm + }; + let coefficients_comm = { + let mut new_coefficients_comm = array::from_fn(empty_poly_comm); + for (comm, new_comm) in coefficients_comm + .into_iter() + .zip(new_coefficients_comm.iter_mut()) + { + *new_comm = comm.try_into()? + } + new_coefficients_comm + }; + let generic_comm = generic_comm.try_into()?; + let psm_comm = psm_comm.try_into()?; + let complete_add_comm = complete_add_comm.try_into()?; + let mul_comm = mul_comm.try_into()?; + let emul_comm = emul_comm.try_into()?; + let endomul_scalar_comm = endomul_scalar_comm.try_into()?; + + let shift = vk.index.shifts; + let shift = { + let mut new_shift = array::from_fn(|_| Fq::from(0)); + for (comm, new_comm) in shift.into_iter().zip(new_shift.iter_mut()) { + *new_comm = comm.try_into()? + } + new_shift + }; + + // The code below was taken from OpenMina + // https://github.com/openmina/openmina/blob/main/ledger/src/proofs/verifier_index.rs#L151 + + let (endo, _) = poly_commitment::srs::endos::(); + + let feature_flags = FeatureFlags { + range_check0: false, + range_check1: false, + foreign_field_add: false, + foreign_field_mul: false, + xor: false, + rot: false, + lookup_features: LookupFeatures { + patterns: LookupPatterns { + xor: false, + lookup: false, + range_check: false, + foreign_field_mul: false, + }, + joint_lookup_used: false, + uses_runtime_tables: false, + }, + }; + + let (mut linearization, powers_of_alpha) = expr_linearization(Some(&feature_flags), true); + + let linearization = Linearization { + constant_term: linearization.constant_term, + index_terms: { + // Make the verifier index deterministic + linearization + .index_terms + .sort_by_key(|&(columns, _)| columns); + linearization.index_terms + }, + }; + + // https://github.com/o1-labs/proof-systems/blob/2702b09063c7a48131173d78b6cf9408674fd67e/kimchi/src/verifier_index.rs#L310-L314 + let srs = { + let mut srs = SRS::create(max_poly_size); + srs.add_lagrange_basis(domain); + Arc::new(srs) + }; + + // https://github.com/o1-labs/proof-systems/blob/2702b09063c7a48131173d78b6cf9408674fd67e/kimchi/src/verifier_index.rs#L319 + let zkpm = zk_polynomial(domain); + + // https://github.com/o1-labs/proof-systems/blob/2702b09063c7a48131173d78b6cf9408674fd67e/kimchi/src/verifier_index.rs#L324 + let w = zk_w3(domain); + + Ok(VerifierIndex { + domain, + max_poly_size: vk.index.max_poly_size, + srs: once_cell::sync::OnceCell::from(srs), + public: vk.index.public, + prev_challenges: vk.index.prev_challenges, + + sigma_comm, + coefficients_comm, + generic_comm, + psm_comm, + complete_add_comm, + mul_comm, + emul_comm, + endomul_scalar_comm, + + range_check0_comm: None, + range_check1_comm: None, + foreign_field_add_comm: None, + foreign_field_mul_comm: None, + xor_comm: None, + rot_comm: None, + + shift, + zkpm: once_cell::sync::OnceCell::from(zkpm), + w: once_cell::sync::OnceCell::from(w), + endo, + lookup_index: None, + linearization, + powers_of_alpha, + }) +} + +// The code below was taken from OpenMina +// https://github.com/openmina/openmina/blob/main/ledger/src/proofs/verifier_index.rs#L151 +/// Returns the end of the circuit, which is used for introducing zero-knowledge in the permutation polynomial +pub fn zk_w3(domain: Radix2EvaluationDomain) -> Fq { + const ZK_ROWS: u64 = 3; + domain.group_gen.pow([domain.size - (ZK_ROWS)]) +} + +// The code below was taken from OpenMina +// https://github.com/openmina/openmina/blob/main/ledger/src/proofs/verifier_index.rs#L151 +/// Computes the zero-knowledge polynomial for blinding the permutation polynomial: `(x-w^{n-k})(x-w^{n-k-1})...(x-w^n)`. +/// Currently, we use k = 3 for 2 blinding factors, +/// see +pub fn zk_polynomial(domain: Radix2EvaluationDomain) -> DensePolynomial { + let w3 = zk_w3(domain); + let w2 = domain.group_gen * w3; + let w1 = domain.group_gen * w2; + + // (x-w3)(x-w2)(x-w1) = + // x^3 - x^2(w1+w2+w3) + x(w1w2+w1w3+w2w3) - w1w2w3 + let w1w2 = w1 * w2; + DensePolynomial::from_coefficients_slice(&[ + -w1w2 * w3, // 1 + w1w2 + (w1 * w3) + (w3 * w2), // x + -w1 - w2 - w3, // x^2 + Fq::from(1), // x^3 + ]) +} + +#[cfg(test)] +mod test { + use super::deserialize_blockchain_vk; + + #[test] + fn deserialize_blockchain_vk_does_not_fail() { + deserialize_blockchain_vk().unwrap(); + } +} diff --git a/operator/mina_account/mina.go b/operator/mina_account/mina.go new file mode 100644 index 000000000..fe00fb24e --- /dev/null +++ b/operator/mina_account/mina.go @@ -0,0 +1,32 @@ +package mina + +/* +#cgo darwin LDFLAGS: -L./lib -lmina_state_verifier +#cgo linux LDFLAGS: -L./lib -lmina_state_verifier -ldl -lrt -lm + +#include "lib/mina_verifier.h" +*/ +import "C" +import ( + "fmt" + "time" + "unsafe" +) + +// TODO(xqft): check proof size +const MAX_PROOF_SIZE = 16 * 1024 +const MAX_PUB_INPUT_SIZE = 6 * 1024 + +func timer() func() { + start := time.Now() + return func() { + fmt.Printf("Mina block verification took %v\n", time.Since(start)) + } +} + +func VerifyProtocolStateProof(proofBuffer [MAX_PROOF_SIZE]byte, proofLen uint, pubInputBuffer [MAX_PUB_INPUT_SIZE]byte, pubInputLen uint) bool { + defer timer()() + proofPtr := (*C.uchar)(unsafe.Pointer(&proofBuffer[0])) + pubInputPtr := (*C.uchar)(unsafe.Pointer(&pubInputBuffer[0])) + return (bool)(C.verify_protocol_state_proof_ffi(proofPtr, (C.uint)(proofLen), pubInputPtr, (C.uint)(pubInputLen))) +} diff --git a/operator/mina_account/mina_test.go b/operator/mina_account/mina_test.go new file mode 100644 index 000000000..697f7c005 --- /dev/null +++ b/operator/mina_account/mina_test.go @@ -0,0 +1,37 @@ +package mina_test + +import ( + "fmt" + "os" + "testing" + + "github.com/yetanotherco/aligned_layer/operator/mina" +) + +func TestMinaStateProofVerifies(t *testing.T) { + fmt.Println(os.Getwd()) + proofFile, err := os.Open("../../batcher/aligned/test_files/mina/protocol_state.proof") + if err != nil { + t.Errorf("could not open mina state proof file") + } + + proofBuffer := make([]byte, mina.MAX_PROOF_SIZE) + proofLen, err := proofFile.Read(proofBuffer) + if err != nil { + t.Errorf("could not read bytes from mina state proof file") + } + + pubInputFile, err := os.Open("../../batcher/aligned/test_files/mina/protocol_state.pub") + if err != nil { + t.Errorf("could not open mina state hash file") + } + pubInputBuffer := make([]byte, mina.MAX_PUB_INPUT_SIZE) + pubInputLen, err := pubInputFile.Read(pubInputBuffer) + if err != nil { + t.Errorf("could not read bytes from mina state hash") + } + + if !mina.VerifyProtocolStateProof(([mina.MAX_PROOF_SIZE]byte)(proofBuffer), uint(proofLen), ([mina.MAX_PUB_INPUT_SIZE]byte)(pubInputBuffer), uint(pubInputLen)) { + t.Errorf("proof did not verify") + } +} From 6a0ca58acf9a8630da040f82c9dd0162994c04a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Est=C3=A9fano=20Bargas?= Date: Mon, 19 Aug 2024 14:46:51 -0300 Subject: [PATCH 02/32] Mockup account verifier --- operator/mina_account/lib/Cargo.lock | 50 +- operator/mina_account/lib/Cargo.toml | 2 +- .../mina_account/lib/mina_account_verifier.h | 6 + operator/mina_account/lib/mina_verifier.h | 6 - .../mina_account/lib/src/consensus_state.rs | 47 -- operator/mina_account/lib/src/devnet_vk.json | 492 ------------------ operator/mina_account/lib/src/lib.rs | 249 ++------- operator/mina_account/lib/src/mainnet_vk.json | 485 ----------------- .../mina_account/lib/src/verifier_index.rs | 276 ---------- .../mina_account/{mina.go => mina_account.go} | 0 .../{mina_test.go => mina_account_test.go} | 0 11 files changed, 71 insertions(+), 1542 deletions(-) create mode 100644 operator/mina_account/lib/mina_account_verifier.h delete mode 100644 operator/mina_account/lib/mina_verifier.h delete mode 100644 operator/mina_account/lib/src/consensus_state.rs delete mode 100644 operator/mina_account/lib/src/devnet_vk.json delete mode 100644 operator/mina_account/lib/src/mainnet_vk.json delete mode 100644 operator/mina_account/lib/src/verifier_index.rs rename operator/mina_account/{mina.go => mina_account.go} (100%) rename operator/mina_account/{mina_test.go => mina_account_test.go} (100%) diff --git a/operator/mina_account/lib/Cargo.lock b/operator/mina_account/lib/Cargo.lock index 54c705236..ff6be75f0 100644 --- a/operator/mina_account/lib/Cargo.lock +++ b/operator/mina_account/lib/Cargo.lock @@ -1030,6 +1030,31 @@ version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" +[[package]] +name = "mina-account-verifier-ffi" +version = "0.1.0" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-poly", + "ark-serialize", + "base64 0.22.1", + "blake2", + "bs58 0.5.1", + "hex", + "kimchi", + "lazy_static", + "mina-curves", + "mina-p2p-messages", + "mina-tree", + "o1-utils 0.1.0 (git+https://github.com/lambdaclass/proof-systems?branch=add-verifier-serializations)", + "once_cell", + "poly-commitment", + "rmp-serde", + "serde", + "serde_json", +] + [[package]] name = "mina-curves" version = "0.1.0" @@ -1114,31 +1139,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "mina-state-verifier-ffi" -version = "0.1.0" -dependencies = [ - "ark-ec", - "ark-ff", - "ark-poly", - "ark-serialize", - "base64 0.22.1", - "blake2", - "bs58 0.5.1", - "hex", - "kimchi", - "lazy_static", - "mina-curves", - "mina-p2p-messages", - "mina-tree", - "o1-utils 0.1.0 (git+https://github.com/lambdaclass/proof-systems?branch=add-verifier-serializations)", - "once_cell", - "poly-commitment", - "rmp-serde", - "serde", - "serde_json", -] - [[package]] name = "mina-tree" version = "0.6.0" diff --git a/operator/mina_account/lib/Cargo.toml b/operator/mina_account/lib/Cargo.toml index 153275d1c..d58843d48 100644 --- a/operator/mina_account/lib/Cargo.toml +++ b/operator/mina_account/lib/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "mina-state-verifier-ffi" +name = "mina-account-verifier-ffi" version = "0.1.0" edition = "2021" diff --git a/operator/mina_account/lib/mina_account_verifier.h b/operator/mina_account/lib/mina_account_verifier.h new file mode 100644 index 000000000..15b3d7e25 --- /dev/null +++ b/operator/mina_account/lib/mina_account_verifier.h @@ -0,0 +1,6 @@ +#include + +bool verify_account_inclusion_ffi(unsigned char *proof_buffer, + unsigned int proof_len, + unsigned char *public_input_buffer, + unsigned int public_input_len); diff --git a/operator/mina_account/lib/mina_verifier.h b/operator/mina_account/lib/mina_verifier.h deleted file mode 100644 index ce007ae49..000000000 --- a/operator/mina_account/lib/mina_verifier.h +++ /dev/null @@ -1,6 +0,0 @@ -#include - -bool verify_protocol_state_proof_ffi(unsigned char *proof_buffer, - unsigned int proof_len, - unsigned char *public_input_buffer, - unsigned int public_input_len); diff --git a/operator/mina_account/lib/src/consensus_state.rs b/operator/mina_account/lib/src/consensus_state.rs deleted file mode 100644 index e2b4467aa..000000000 --- a/operator/mina_account/lib/src/consensus_state.rs +++ /dev/null @@ -1,47 +0,0 @@ -use blake2::{Blake2b512, Digest}; -use kimchi::o1_utils::FieldHelpers; -use mina_p2p_messages::{hash::MinaHash, v2::MinaStateProtocolStateValueStableV2}; - -#[derive(PartialEq)] -pub enum LongerChainResult { - Tip, - Candidate, -} - -pub fn select_longer_chain( - candidate: &MinaStateProtocolStateValueStableV2, - tip: &MinaStateProtocolStateValueStableV2, -) -> LongerChainResult { - let candidate_block_height = &candidate.body.consensus_state.blockchain_length.as_u32(); - let tip_block_height = &tip.body.consensus_state.blockchain_length.as_u32(); - - if candidate_block_height > tip_block_height { - return LongerChainResult::Candidate; - } - // tiebreak logic - else if candidate_block_height == tip_block_height { - // compare last VRF digests lexicographically - if hash_last_vrf(candidate) > hash_last_vrf(tip) { - return LongerChainResult::Candidate; - } else if hash_last_vrf(candidate) == hash_last_vrf(tip) { - // compare consensus state hashes lexicographically - if hash_state(candidate) > hash_state(tip) { - return LongerChainResult::Candidate; - } - } - } - - LongerChainResult::Tip -} - -fn hash_last_vrf(chain: &MinaStateProtocolStateValueStableV2) -> String { - let mut hasher = Blake2b512::new(); - hasher.update(chain.body.consensus_state.last_vrf_output.as_slice()); - let digest = hasher.finalize().to_vec(); - - hex::encode(&digest) -} - -fn hash_state(chain: &MinaStateProtocolStateValueStableV2) -> String { - MinaHash::hash(chain).to_hex() -} diff --git a/operator/mina_account/lib/src/devnet_vk.json b/operator/mina_account/lib/src/devnet_vk.json deleted file mode 100644 index 0e5160bb6..000000000 --- a/operator/mina_account/lib/src/devnet_vk.json +++ /dev/null @@ -1,492 +0,0 @@ -{ - "commitments": { - "sigma_comm": [ - [ - "0x16A2CBB00F33D627AAEFB19EAF5424680EF37F77C87558AF424130A927D08BAC", - "0x089F70D3C7690C8421C293C01F7A67EB2997E5B96AF11408D88884A6AD328E37" - ], - [ - "0x22CFAD2E118F91BE8E133664585947E25A282017E007700D67F0D72999639BCC", - "0x31AA847B558743C3CAD651B085327F0B67E1C1BFEA2FF472976589ADD952E6D4" - ], - [ - "0x02FB6661EE11262AFC7C8B0389A9B1E4ED18263C3F2468AAF035A07ECC61C9EB", - "0x30705D77AB82D6BAAC8E23640BBAB40F7E7FB53826CD5011575CAE52C6D0517D" - ], - [ - "0x0FD615E77CF392BE8285848DF60D4F87350ABCD65200FC4932E309133D145D05", - "0x3E75EA0E3810A97D8F1D1F8A6B0F9AE5D0F68AE34A4D0EFC29F00AB3BF6D480E" - ], - [ - "0x20C89F37CF8E43831F077DFF9AB9A676907BF9A0F64E418A643667808AB72DAB", - "0x389F98A86437D8A7F667ABB9B0B0DEACBD7E420B583B795363EBCECDBF1C187B" - ], - [ - "0x13548AEE4F67B7B90418512F400B79A69E156A801DE46233C756F9B67A9ABDD1", - "0x25F561C9531A0C83099AC722322A39DC653BC314D63A971624D1D3315B3DA0D5" - ], - [ - "0x20216D064B7466C42626F66F3F141997E6F29D17CC6EBA8FF91E1E03D31FE555", - "0x0082380869AFA6A961738C93BCEEA3042F3ECEA143A585B565A2BF6BD78A1224" - ] - ], - "coefficients_comm": [ - [ - "0x26EC10122354E7DEC10E83F7D26D4311863753F37489FFD2F5D634958C876CB4", - "0x25AB47DC77226E515B05BD2C1DFB025477F54FFBB9B62F4B2914306C2D1AEB6D" - ], - [ - "0x08060FD15238AE40E726A04EA5C1AE41D8A1D267C9AF7355A8D6C70607139922", - "0x13D36CAD9C78FD0AF514AB7ECAC433592389AE84283024B1D4C85D2E8C952B28" - ], - [ - "0x3AE007735587246066F71A1F09801C359E393CBF49DBDFEDD01E61AA88ECAF0F", - "0x15882EBC62C0E9BC93A14F2CB2ECE43402063B50C09CE735E56D51447689D2C6" - ], - [ - "0x3DCBFD7F258F598AEFB560A1B3BCE632B4AC20534FEFF3B35C82082FE708B236", - "0x254668B50AB44E074902E0DB981FDF045FC614C1E61EBDDA27C06DF9131FC71A" - ], - [ - "0x364F1609C5A72CC0A6F5966400AE1A5AA4B7684805B46D0EE09001F7618DD614", - "0x0F3E45A3DEC2B73BEC5E91ED78BB750B87C02A2339E5A40C2D51FAA0EE1D5B7E" - ], - [ - "0x2EA4EF211B04C50C1680CE1E38DACAE3EC40FAC3216A6D4157B29D6053C812E8", - "0x310B3ECB01C946FE01F766DF1249FD36E4AE2EAEB450D93DFDE08AE9D24BB7BC" - ], - [ - "0x3E32E6702761E653043644E9DC5D75FE7A351B764CD90D72DD1176DB1A541121", - "0x0454C684E407E066394B31CFCCBAF22844B7E17D162EFE860030960A38AD2B2E" - ], - [ - "0x1AE2CE814A97742F41565FEB5881767A2BCF55981A3C8ED33BAE069CBE652FCA", - "0x14DC3F97387117CCA4884F28DCC82C9CF1B7101623B481FD3D1588F568B3E26B" - ], - [ - "0x0A10FA40BB6C61E8185412EE2BAE86C51D19EA7276593DFA7FA3FABB0345521F", - "0x3A8ACF73B5EF4E52ED5DC96404A60C69A067B84FE77211C5407A48437BD5CF89" - ], - [ - "0x21B2C2D62891139A91056B9D298DA8713B7ADA51963B864A5A2376771A1AA766", - "0x1AC7782A588865397F219624D70D11A109283E82B9CD50FFEE23753461E755FE" - ], - [ - "0x2763E7A5B2C387147A0381B50D5C504A5012B7F7CA474C2B4A351011B9BBD036", - "0x13DEA6F4AEBDC606331746A886756C7EA266A52F60B45DE5544A04BFDB277455" - ], - [ - "0x32596E43A053571EE478A3106CABFE9ECB29437F78A978409B4DDE33FE637103", - "0x3D76AF5EE3EFF37E666087AC2827A8BD0D9690BF440FF24434DA3E6AFF7A2AF4" - ], - [ - "0x1D73FE7224F38A37B2C69E22FA6750BABAED17B0F9998877B33E488D9063CE8E", - "0x3E24CEADB1BDA92A0DBDA0F90DF3B8FBD7C6F7ABCC039E9D41AB6916A799F645" - ], - [ - "0x2FDF5D887BC70465AFAC06B7A43632732B5AF0B933EA045D35E99D532BD44CAF", - "0x211A76FD7B76DF3E693CAA0BBB5C178D5DDE827AB6A902AF04AB39D8040E29DF" - ], - [ - "0x0D29BA887D54D915CFB321573463A3CAF5C354848A51FFD6D4FFC0E0B4464D39", - "0x232829C5C662E87CD033AFB3E84E86EC342F4942AC9D75123A21172EE06CF567" - ] - ], - "generic_comm": [ - "0x363662743B4E693E18C0CF5FB651DF1205BB27FABCD93ADF54ECD973B21B921B", - "0x116FBA051A4A146C88BCB0F2B56309429CD63514EEEFBE6EA0B39927E72BB20C" - ], - "psm_comm": [ - "0x0A8B3EF5670C6367C721EDAA40AF511C18B1602A4732FEA01124D5D949304324", - "0x1DBE04516C4A33CDFBBD1F54F413B9F21B5D41B6CD668B249879A2688693E51B" - ], - "complete_add_comm": [ - "0x1E859218F11F787CE75C06FD5303457CBD307BDEEB693CC66A235CB85B314D4B", - "0x228167E190903072E8F34BD7AF61A0C02DE0BC3D54FF8760A2BCBFDD6A880688" - ], - "mul_comm": [ - "0x3EC97D3A8CD405A92B31B67184817925B99B1527065A28677AEAAEC37CC7B9C5", - "0x3844006206FF29A55DBB44A3D06E46610639E24E960B4BC32A663EEC4D04C689" - ], - "emul_comm": [ - "0x114772020FAF5E6660D7D75B666B7121829027A866A8214B42899E824D820CB9", - "0x01F7FC015E2F0C5E02E34F0FD6FBA0FCE01E40EA183F0F6F7C197553524A96B9" - ], - "endomul_scalar_comm": [ - "0x04C30A9B6412594ECD5EEFCA20D4B759BBC52B08868E01F74FDC82B557A76ADD", - "0x019413D8112950CB93D20BA29452DC281FFE1A692706C34BD148E331F844D244" - ] - }, - "index": { - "domain": { - "log_size_of_group": 14, - "group_gen": "0x1E5587687024253BB079B38D9C5371594958E496C605D3BD898B34D068AFBEE7" - }, - "max_poly_size": 32768, - "public": 40, - "prev_challenges": 2, - "srs": null, - "evals": { - "sigma_comm": [ - { - "unshifted": [ - [ - "Finite", - [ - "0x16A2CBB00F33D627AAEFB19EAF5424680EF37F77C87558AF424130A927D08BAC", - "0x089F70D3C7690C8421C293C01F7A67EB2997E5B96AF11408D88884A6AD328E37" - ] - ] - ], - "shifted": null - }, - { - "unshifted": [ - [ - "Finite", - [ - "0x22CFAD2E118F91BE8E133664585947E25A282017E007700D67F0D72999639BCC", - "0x31AA847B558743C3CAD651B085327F0B67E1C1BFEA2FF472976589ADD952E6D4" - ] - ] - ], - "shifted": null - }, - { - "unshifted": [ - [ - "Finite", - [ - "0x02FB6661EE11262AFC7C8B0389A9B1E4ED18263C3F2468AAF035A07ECC61C9EB", - "0x30705D77AB82D6BAAC8E23640BBAB40F7E7FB53826CD5011575CAE52C6D0517D" - ] - ] - ], - "shifted": null - }, - { - "unshifted": [ - [ - "Finite", - [ - "0x0FD615E77CF392BE8285848DF60D4F87350ABCD65200FC4932E309133D145D05", - "0x3E75EA0E3810A97D8F1D1F8A6B0F9AE5D0F68AE34A4D0EFC29F00AB3BF6D480E" - ] - ] - ], - "shifted": null - }, - { - "unshifted": [ - [ - "Finite", - [ - "0x20C89F37CF8E43831F077DFF9AB9A676907BF9A0F64E418A643667808AB72DAB", - "0x389F98A86437D8A7F667ABB9B0B0DEACBD7E420B583B795363EBCECDBF1C187B" - ] - ] - ], - "shifted": null - }, - { - "unshifted": [ - [ - "Finite", - [ - "0x13548AEE4F67B7B90418512F400B79A69E156A801DE46233C756F9B67A9ABDD1", - "0x25F561C9531A0C83099AC722322A39DC653BC314D63A971624D1D3315B3DA0D5" - ] - ] - ], - "shifted": null - }, - { - "unshifted": [ - [ - "Finite", - [ - "0x20216D064B7466C42626F66F3F141997E6F29D17CC6EBA8FF91E1E03D31FE555", - "0x0082380869AFA6A961738C93BCEEA3042F3ECEA143A585B565A2BF6BD78A1224" - ] - ] - ], - "shifted": null - } - ], - "coefficients_comm": [ - { - "unshifted": [ - [ - "Finite", - [ - "0x26EC10122354E7DEC10E83F7D26D4311863753F37489FFD2F5D634958C876CB4", - "0x25AB47DC77226E515B05BD2C1DFB025477F54FFBB9B62F4B2914306C2D1AEB6D" - ] - ] - ], - "shifted": null - }, - { - "unshifted": [ - [ - "Finite", - [ - "0x08060FD15238AE40E726A04EA5C1AE41D8A1D267C9AF7355A8D6C70607139922", - "0x13D36CAD9C78FD0AF514AB7ECAC433592389AE84283024B1D4C85D2E8C952B28" - ] - ] - ], - "shifted": null - }, - { - "unshifted": [ - [ - "Finite", - [ - "0x3AE007735587246066F71A1F09801C359E393CBF49DBDFEDD01E61AA88ECAF0F", - "0x15882EBC62C0E9BC93A14F2CB2ECE43402063B50C09CE735E56D51447689D2C6" - ] - ] - ], - "shifted": null - }, - { - "unshifted": [ - [ - "Finite", - [ - "0x3DCBFD7F258F598AEFB560A1B3BCE632B4AC20534FEFF3B35C82082FE708B236", - "0x254668B50AB44E074902E0DB981FDF045FC614C1E61EBDDA27C06DF9131FC71A" - ] - ] - ], - "shifted": null - }, - { - "unshifted": [ - [ - "Finite", - [ - "0x364F1609C5A72CC0A6F5966400AE1A5AA4B7684805B46D0EE09001F7618DD614", - "0x0F3E45A3DEC2B73BEC5E91ED78BB750B87C02A2339E5A40C2D51FAA0EE1D5B7E" - ] - ] - ], - "shifted": null - }, - { - "unshifted": [ - [ - "Finite", - [ - "0x2EA4EF211B04C50C1680CE1E38DACAE3EC40FAC3216A6D4157B29D6053C812E8", - "0x310B3ECB01C946FE01F766DF1249FD36E4AE2EAEB450D93DFDE08AE9D24BB7BC" - ] - ] - ], - "shifted": null - }, - { - "unshifted": [ - [ - "Finite", - [ - "0x3E32E6702761E653043644E9DC5D75FE7A351B764CD90D72DD1176DB1A541121", - "0x0454C684E407E066394B31CFCCBAF22844B7E17D162EFE860030960A38AD2B2E" - ] - ] - ], - "shifted": null - }, - { - "unshifted": [ - [ - "Finite", - [ - "0x1AE2CE814A97742F41565FEB5881767A2BCF55981A3C8ED33BAE069CBE652FCA", - "0x14DC3F97387117CCA4884F28DCC82C9CF1B7101623B481FD3D1588F568B3E26B" - ] - ] - ], - "shifted": null - }, - { - "unshifted": [ - [ - "Finite", - [ - "0x0A10FA40BB6C61E8185412EE2BAE86C51D19EA7276593DFA7FA3FABB0345521F", - "0x3A8ACF73B5EF4E52ED5DC96404A60C69A067B84FE77211C5407A48437BD5CF89" - ] - ] - ], - "shifted": null - }, - { - "unshifted": [ - [ - "Finite", - [ - "0x21B2C2D62891139A91056B9D298DA8713B7ADA51963B864A5A2376771A1AA766", - "0x1AC7782A588865397F219624D70D11A109283E82B9CD50FFEE23753461E755FE" - ] - ] - ], - "shifted": null - }, - { - "unshifted": [ - [ - "Finite", - [ - "0x2763E7A5B2C387147A0381B50D5C504A5012B7F7CA474C2B4A351011B9BBD036", - "0x13DEA6F4AEBDC606331746A886756C7EA266A52F60B45DE5544A04BFDB277455" - ] - ] - ], - "shifted": null - }, - { - "unshifted": [ - [ - "Finite", - [ - "0x32596E43A053571EE478A3106CABFE9ECB29437F78A978409B4DDE33FE637103", - "0x3D76AF5EE3EFF37E666087AC2827A8BD0D9690BF440FF24434DA3E6AFF7A2AF4" - ] - ] - ], - "shifted": null - }, - { - "unshifted": [ - [ - "Finite", - [ - "0x1D73FE7224F38A37B2C69E22FA6750BABAED17B0F9998877B33E488D9063CE8E", - "0x3E24CEADB1BDA92A0DBDA0F90DF3B8FBD7C6F7ABCC039E9D41AB6916A799F645" - ] - ] - ], - "shifted": null - }, - { - "unshifted": [ - [ - "Finite", - [ - "0x2FDF5D887BC70465AFAC06B7A43632732B5AF0B933EA045D35E99D532BD44CAF", - "0x211A76FD7B76DF3E693CAA0BBB5C178D5DDE827AB6A902AF04AB39D8040E29DF" - ] - ] - ], - "shifted": null - }, - { - "unshifted": [ - [ - "Finite", - [ - "0x0D29BA887D54D915CFB321573463A3CAF5C354848A51FFD6D4FFC0E0B4464D39", - "0x232829C5C662E87CD033AFB3E84E86EC342F4942AC9D75123A21172EE06CF567" - ] - ] - ], - "shifted": null - } - ], - "generic_comm": { - "unshifted": [ - [ - "Finite", - [ - "0x363662743B4E693E18C0CF5FB651DF1205BB27FABCD93ADF54ECD973B21B921B", - "0x116FBA051A4A146C88BCB0F2B56309429CD63514EEEFBE6EA0B39927E72BB20C" - ] - ] - ], - "shifted": null - }, - "psm_comm": { - "unshifted": [ - [ - "Finite", - [ - "0x0A8B3EF5670C6367C721EDAA40AF511C18B1602A4732FEA01124D5D949304324", - "0x1DBE04516C4A33CDFBBD1F54F413B9F21B5D41B6CD668B249879A2688693E51B" - ] - ] - ], - "shifted": null - }, - "complete_add_comm": { - "unshifted": [ - [ - "Finite", - [ - "0x1E859218F11F787CE75C06FD5303457CBD307BDEEB693CC66A235CB85B314D4B", - "0x228167E190903072E8F34BD7AF61A0C02DE0BC3D54FF8760A2BCBFDD6A880688" - ] - ] - ], - "shifted": null - }, - "mul_comm": { - "unshifted": [ - [ - "Finite", - [ - "0x3EC97D3A8CD405A92B31B67184817925B99B1527065A28677AEAAEC37CC7B9C5", - "0x3844006206FF29A55DBB44A3D06E46610639E24E960B4BC32A663EEC4D04C689" - ] - ] - ], - "shifted": null - }, - "emul_comm": { - "unshifted": [ - [ - "Finite", - [ - "0x114772020FAF5E6660D7D75B666B7121829027A866A8214B42899E824D820CB9", - "0x01F7FC015E2F0C5E02E34F0FD6FBA0FCE01E40EA183F0F6F7C197553524A96B9" - ] - ] - ], - "shifted": null - }, - "endomul_scalar_comm": { - "unshifted": [ - [ - "Finite", - [ - "0x04C30A9B6412594ECD5EEFCA20D4B759BBC52B08868E01F74FDC82B557A76ADD", - "0x019413D8112950CB93D20BA29452DC281FFE1A692706C34BD148E331F844D244" - ] - ] - ], - "shifted": null - }, - "xor_comm": null, - "range_check0_comm": null, - "range_check1_comm": null, - "foreign_field_add_comm": null, - "foreign_field_mul_comm": null, - "rot_comm": null - }, - "shifts": [ - "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x00B9CDC8FD0BD4B27E2A74AF7AEBD5734D52D75BDF85EBF1CAD03413E914A2E3", - "0x007CF68160D84012626E0046A932AD12E68B3394D6E2A001A537FFB40D3527C6", - "0x0077D45AECB939AE97A3952B48189964AA209609F19BE4A4B89F339A33440F6D", - "0x0077C7E54505D4771F6AF1FED2195500481EF1F3C0397B0AC819E678BD2309B4", - "0x00B3AF68ECC6AE7A4727F0708EDF4736BE1C99281FA380846E42264C62407484", - "0x00381CA4536FC0ED935D50A74A87136F1A0675B618898DBCE67E564AB20174A1" - ], - "lookup_index": null, - "zk_rows": 3 - }, - "data": { - "constraints": 16384 - } -} diff --git a/operator/mina_account/lib/src/lib.rs b/operator/mina_account/lib/src/lib.rs index 1ef87cdfe..881bf693a 100644 --- a/operator/mina_account/lib/src/lib.rs +++ b/operator/mina_account/lib/src/lib.rs @@ -1,248 +1,77 @@ -mod consensus_state; - -use std::array::TryFromSliceError; - -use ark_ec::short_weierstrass_jacobian::GroupAffine; -use base64::prelude::*; -use consensus_state::{select_longer_chain, LongerChainResult}; -use kimchi::mina_curves::pasta::{Fp, PallasParameters}; use kimchi::o1_utils::FieldHelpers; -use kimchi::verifier_index::VerifierIndex; -use lazy_static::lazy_static; -use mina_p2p_messages::binprot::BinProtRead; -use mina_p2p_messages::hash::MinaHash; -use mina_p2p_messages::v2::{MinaBaseProofStableV2, MinaStateProtocolStateValueStableV2}; -use mina_tree::proofs::verification::verify_block; -use mina_tree::verifier::get_srs; -use verifier_index::deserialize_blockchain_vk; - -mod verifier_index; - -lazy_static! { - static ref VERIFIER_INDEX: VerifierIndex> = - deserialize_blockchain_vk().unwrap(); -} +use mina_curves::pasta::Fp; -// TODO(xqft): check proof size +// TODO(xqft): check sizes const MAX_PROOF_SIZE: usize = 16 * 1024; const MAX_PUB_INPUT_SIZE: usize = 6 * 1024; -const STATE_HASH_SIZE: usize = 32; +const HASH_SIZE: usize = 32; #[no_mangle] -pub extern "C" fn verify_protocol_state_proof_ffi( +pub extern "C" fn verify_account_inclusion_ffi( proof_bytes: &[u8; MAX_PROOF_SIZE], proof_len: usize, public_input_bytes: &[u8; MAX_PUB_INPUT_SIZE], public_input_len: usize, ) -> bool { - let protocol_state_proof = match parse_proof(&proof_bytes[..proof_len]) { - Ok(protocol_state_proof) => protocol_state_proof, - Err(err) => { - eprintln!("Failed to parse protocol state proof: {}", err); - return false; - } - }; + // TODO(xqft): we need to send account data as part of the proof. This way + // some account fields (like public key) can be included in the public inputs + // and validated in this verifier. A smart contract could implement Poseidon + // and hash the data itself but it's prohibitively expensive. - let (candidate_hash, tip_hash, candidate_state, tip_state) = + let (merkle_root, account_hash) = match parse_pub_inputs(&public_input_bytes[..public_input_len]) { - Ok(protocol_state_pub) => protocol_state_pub, + Ok(pub_inputs) => pub_inputs, Err(err) => { - eprintln!("Failed to parse protocol state public inputs: {}", err); + eprintln!("Failed to parse public inputs: {}", err); return false; } }; - // TODO(xqft): this can be a batcher's pre-verification check (but don't remove it from here) - if MinaHash::hash(&tip_state) != tip_hash { - eprintln!("The tip's protocol state doesn't match the hash provided as public input"); - return false; - } - if MinaHash::hash(&candidate_state) != candidate_hash { - eprintln!("The candidate's protocol state doesn't match the hash provided as public input"); - return false; - } - - // TODO(xqft): srs should be a static, but can't make it so because it doesn't have all its - // parameters initialized. - let srs = get_srs::(); - let srs = srs.lock().unwrap(); - - // Consensus check: Short fork rule - let longer_chain = select_longer_chain(&candidate_state, &tip_state); - if longer_chain == LongerChainResult::Tip { - eprintln!("Consensus check failed"); - return false; - } + let merkle_proof = match parse_proof(&proof_bytes[..proof_len]) { + Ok(proof) => proof, + Err(err) => { + eprintln!("Failed to parse merkle proof: {}", err); + return false; + } + }; - // Pickles verification - verify_block(&protocol_state_proof, candidate_hash, &VERIFIER_INDEX, &srs) + todo!() } pub fn parse_hash(pub_inputs: &[u8], offset: &mut usize) -> Result { let hash = pub_inputs - .get(*offset..*offset + STATE_HASH_SIZE) + .get(*offset..*offset + HASH_SIZE) .ok_or("Failed to slice candidate hash".to_string()) .and_then(|bytes| Fp::from_bytes(bytes).map_err(|err| err.to_string()))?; - *offset += STATE_HASH_SIZE; + *offset += HASH_SIZE; Ok(hash) } -pub fn parse_state( - pub_inputs: &[u8], - offset: &mut usize, -) -> Result { - let state_len: usize = pub_inputs - .get(*offset..*offset + 4) - .ok_or("Failed to slice state len".to_string()) - .and_then(|slice| { - slice - .try_into() - .map_err(|err: TryFromSliceError| err.to_string()) - }) - .map(u32::from_be_bytes) - .and_then(|len| usize::try_from(len).map_err(|err| err.to_string()))?; - - let state = pub_inputs - .get(*offset + 4..*offset + 4 + state_len) - .ok_or("Failed to slice state".to_string()) - .and_then(|bytes| std::str::from_utf8(bytes).map_err(|err| err.to_string())) - .and_then(|base64| { - BASE64_STANDARD - .decode(base64) - .map_err(|err| err.to_string()) - }) - .and_then(|binprot| { - MinaStateProtocolStateValueStableV2::binprot_read(&mut binprot.as_slice()) - .map_err(|err| err.to_string()) - })?; - - *offset += 4 + state_len; - - Ok(state) -} - -pub fn parse_pub_inputs( - pub_inputs: &[u8], -) -> Result< - ( - Fp, - Fp, - MinaStateProtocolStateValueStableV2, - MinaStateProtocolStateValueStableV2, - ), - String, -> { +pub fn parse_pub_inputs(pub_inputs: &[u8]) -> Result<(Fp, Fp), String> { let mut offset = 0; - let candidate_hash = parse_hash(pub_inputs, &mut offset)?; - let tip_hash = parse_hash(pub_inputs, &mut offset)?; + let merkle_root = parse_hash(pub_inputs, &mut offset)?; + let account_hash = parse_hash(pub_inputs, &mut offset)?; - let candidate_state = parse_state(pub_inputs, &mut offset)?; - let tip_state = parse_state(pub_inputs, &mut offset)?; - - Ok((candidate_hash, tip_hash, candidate_state, tip_state)) + Ok((merkle_root, account_hash)) } -pub fn parse_proof(proof_bytes: &[u8]) -> Result { - std::str::from_utf8(proof_bytes) - .map_err(|err| err.to_string()) - .and_then(|base64| { - BASE64_URL_SAFE - .decode(base64) - .map_err(|err| err.to_string()) - }) - .and_then(|binprot| { - MinaBaseProofStableV2::binprot_read(&mut binprot.as_slice()) - .map_err(|err| err.to_string()) - }) +pub fn parse_proof(proof_bytes: &[u8]) -> Result<(), String> { + todo!() + // std::str::from_utf8(proof_bytes) + // .map_err(|err| err.to_string()) + // .and_then(|base64| { + // BASE64_URL_SAFE + // .decode(base64) + // .map_err(|err| err.to_string()) + // }) + // .and_then(|binprot| { + // MinaBaseProofStableV2::binprot_read(&mut binprot.as_slice()) + // .map_err(|err| err.to_string()) + // }) } #[cfg(test)] -mod test { - use super::*; - - const PROOF_BYTES: &[u8] = - include_bytes!("../../../../batcher/aligned/test_files/mina/protocol_state.proof"); - const PUB_INPUT_BYTES: &[u8] = - include_bytes!("../../../../batcher/aligned/test_files/mina/protocol_state.pub"); - const PROTOCOL_STATE_BAD_HASH_PUB_BYTES: &[u8] = - include_bytes!("../../../../batcher/aligned/test_files/mina/protocol_state_bad_hash.pub"); - const PROTOCOL_STATE_BAD_CONSENSUS_PUB_BYTES: &[u8] = include_bytes!( - "../../../../batcher/aligned/test_files/mina/protocol_state_bad_consensus.pub" - ); - - #[test] - fn parse_protocol_state_proof_does_not_fail() { - parse_proof(PROOF_BYTES).unwrap(); - } - - #[test] - fn parse_protocol_state_pub_does_not_fail() { - parse_pub_inputs(PUB_INPUT_BYTES).unwrap(); - } - - #[test] - fn protocol_state_proof_verifies() { - let mut proof_buffer = [0u8; super::MAX_PROOF_SIZE]; - let proof_size = PROOF_BYTES.len(); - assert!(proof_size <= proof_buffer.len()); - proof_buffer[..proof_size].clone_from_slice(PROOF_BYTES); - - let mut pub_input_buffer = [0u8; super::MAX_PUB_INPUT_SIZE]; - let pub_input_size = PUB_INPUT_BYTES.len(); - assert!(pub_input_size <= pub_input_buffer.len()); - pub_input_buffer[..pub_input_size].clone_from_slice(PUB_INPUT_BYTES); - - let result = verify_protocol_state_proof_ffi( - &proof_buffer, - proof_size, - &pub_input_buffer, - pub_input_size, - ); - assert!(result); - } - - #[test] - fn proof_of_protocol_state_with_bad_hash_does_not_verify() { - let mut proof_buffer = [0u8; super::MAX_PROOF_SIZE]; - let proof_size = PROOF_BYTES.len(); - assert!(proof_size <= proof_buffer.len()); - proof_buffer[..proof_size].clone_from_slice(PROOF_BYTES); - - let mut pub_input_buffer = [0u8; super::MAX_PUB_INPUT_SIZE]; - let pub_input_size = PROTOCOL_STATE_BAD_HASH_PUB_BYTES.len(); - assert!(pub_input_size <= pub_input_buffer.len()); - pub_input_buffer[..pub_input_size].clone_from_slice(PROTOCOL_STATE_BAD_HASH_PUB_BYTES); - - let result = verify_protocol_state_proof_ffi( - &proof_buffer, - proof_size, - &pub_input_buffer, - pub_input_size, - ); - assert!(!result); - } - - #[test] - fn proof_of_protocol_state_with_bad_consensus_does_not_verify() { - let mut proof_buffer = [0u8; super::MAX_PROOF_SIZE]; - let proof_size = PROOF_BYTES.len(); - assert!(proof_size <= proof_buffer.len()); - proof_buffer[..proof_size].clone_from_slice(PROOF_BYTES); - - let mut pub_input_buffer = [0u8; super::MAX_PUB_INPUT_SIZE]; - let pub_input_size = PROTOCOL_STATE_BAD_CONSENSUS_PUB_BYTES.len(); - assert!(pub_input_size <= pub_input_buffer.len()); - pub_input_buffer[..pub_input_size].clone_from_slice(PROTOCOL_STATE_BAD_CONSENSUS_PUB_BYTES); - - let result = verify_protocol_state_proof_ffi( - &proof_buffer, - proof_size, - &pub_input_buffer, - pub_input_size, - ); - assert!(!result); - } -} +mod test {} diff --git a/operator/mina_account/lib/src/mainnet_vk.json b/operator/mina_account/lib/src/mainnet_vk.json deleted file mode 100644 index c3d121114..000000000 --- a/operator/mina_account/lib/src/mainnet_vk.json +++ /dev/null @@ -1,485 +0,0 @@ -{ - "commitments": { - "sigma_comm": [ - [ - "0x16A2CBB00F33D627AAEFB19EAF5424680EF37F77C87558AF424130A927D08BAC", - "0x089F70D3C7690C8421C293C01F7A67EB2997E5B96AF11408D88884A6AD328E37" - ], - [ - "0x22CFAD2E118F91BE8E133664585947E25A282017E007700D67F0D72999639BCC", - "0x31AA847B558743C3CAD651B085327F0B67E1C1BFEA2FF472976589ADD952E6D4" - ], - [ - "0x02FB6661EE11262AFC7C8B0389A9B1E4ED18263C3F2468AAF035A07ECC61C9EB", - "0x30705D77AB82D6BAAC8E23640BBAB40F7E7FB53826CD5011575CAE52C6D0517D" - ], - [ - "0x0FD615E77CF392BE8285848DF60D4F87350ABCD65200FC4932E309133D145D05", - "0x3E75EA0E3810A97D8F1D1F8A6B0F9AE5D0F68AE34A4D0EFC29F00AB3BF6D480E" - ], - [ - "0x20C89F37CF8E43831F077DFF9AB9A676907BF9A0F64E418A643667808AB72DAB", - "0x389F98A86437D8A7F667ABB9B0B0DEACBD7E420B583B795363EBCECDBF1C187B" - ], - [ - "0x13548AEE4F67B7B90418512F400B79A69E156A801DE46233C756F9B67A9ABDD1", - "0x25F561C9531A0C83099AC722322A39DC653BC314D63A971624D1D3315B3DA0D5" - ], - [ - "0x20216D064B7466C42626F66F3F141997E6F29D17CC6EBA8FF91E1E03D31FE555", - "0x0082380869AFA6A961738C93BCEEA3042F3ECEA143A585B565A2BF6BD78A1224" - ] - ], - "coefficients_comm": [ - [ - "0x34858195AC3FFEBA04F0FAAF38F2574CD903985B56DCAEF53C29EF52CF70FB65", - "0x0D3DD0931D64868F70BE25C6B2CA4D5CA5C6B80763CAFE2B64AEF5F74E653C05" - ], - [ - "0x08060FD15238AE40E726A04EA5C1AE41D8A1D267C9AF7355A8D6C70607139922", - "0x13D36CAD9C78FD0AF514AB7ECAC433592389AE84283024B1D4C85D2E8C952B28" - ], - [ - "0x3AE007735587246066F71A1F09801C359E393CBF49DBDFEDD01E61AA88ECAF0F", - "0x15882EBC62C0E9BC93A14F2CB2ECE43402063B50C09CE735E56D51447689D2C6" - ], - [ - "0x3DCBFD7F258F598AEFB560A1B3BCE632B4AC20534FEFF3B35C82082FE708B236", - "0x254668B50AB44E074902E0DB981FDF045FC614C1E61EBDDA27C06DF9131FC71A" - ], - [ - "0x364F1609C5A72CC0A6F5966400AE1A5AA4B7684805B46D0EE09001F7618DD614", - "0x0F3E45A3DEC2B73BEC5E91ED78BB750B87C02A2339E5A40C2D51FAA0EE1D5B7E" - ], - [ - "0x0BE841A33AB98E3392CB8E27AB1AF419454643CD3668FCC76D249D9AB80AA2AB", - "0x3A92B08771858E78BFC2676B128A9AC404797775D140C2C022AEEC8F69182A2E" - ], - [ - "0x3E32E6702761E653043644E9DC5D75FE7A351B764CD90D72DD1176DB1A541121", - "0x0454C684E407E066394B31CFCCBAF22844B7E17D162EFE860030960A38AD2B2E" - ], - [ - "0x1AE2CE814A97742F41565FEB5881767A2BCF55981A3C8ED33BAE069CBE652FCA", - "0x14DC3F97387117CCA4884F28DCC82C9CF1B7101623B481FD3D1588F568B3E26B" - ], - [ - "0x0A10FA40BB6C61E8185412EE2BAE86C51D19EA7276593DFA7FA3FABB0345521F", - "0x3A8ACF73B5EF4E52ED5DC96404A60C69A067B84FE77211C5407A48437BD5CF89" - ], - [ - "0x21B2C2D62891139A91056B9D298DA8713B7ADA51963B864A5A2376771A1AA766", - "0x1AC7782A588865397F219624D70D11A109283E82B9CD50FFEE23753461E755FE" - ], - [ - "0x2763E7A5B2C387147A0381B50D5C504A5012B7F7CA474C2B4A351011B9BBD036", - "0x13DEA6F4AEBDC606331746A886756C7EA266A52F60B45DE5544A04BFDB277455" - ], - [ - "0x32596E43A053571EE478A3106CABFE9ECB29437F78A978409B4DDE33FE637103", - "0x3D76AF5EE3EFF37E666087AC2827A8BD0D9690BF440FF24434DA3E6AFF7A2AF4" - ], - [ - "0x1D73FE7224F38A37B2C69E22FA6750BABAED17B0F9998877B33E488D9063CE8E", - "0x3E24CEADB1BDA92A0DBDA0F90DF3B8FBD7C6F7ABCC039E9D41AB6916A799F645" - ], - [ - "0x2FDF5D887BC70465AFAC06B7A43632732B5AF0B933EA045D35E99D532BD44CAF", - "0x211A76FD7B76DF3E693CAA0BBB5C178D5DDE827AB6A902AF04AB39D8040E29DF" - ], - [ - "0x0D29BA887D54D915CFB321573463A3CAF5C354848A51FFD6D4FFC0E0B4464D39", - "0x232829C5C662E87CD033AFB3E84E86EC342F4942AC9D75123A21172EE06CF567" - ] - ], - "generic_comm": [ - "0x363662743B4E693E18C0CF5FB651DF1205BB27FABCD93ADF54ECD973B21B921B", - "0x116FBA051A4A146C88BCB0F2B56309429CD63514EEEFBE6EA0B39927E72BB20C" - ], - "psm_comm": [ - "0x0A8B3EF5670C6367C721EDAA40AF511C18B1602A4732FEA01124D5D949304324", - "0x1DBE04516C4A33CDFBBD1F54F413B9F21B5D41B6CD668B249879A2688693E51B" - ], - "complete_add_comm": [ - "0x1E859218F11F787CE75C06FD5303457CBD307BDEEB693CC66A235CB85B314D4B", - "0x228167E190903072E8F34BD7AF61A0C02DE0BC3D54FF8760A2BCBFDD6A880688" - ], - "mul_comm": [ - "0x3EC97D3A8CD405A92B31B67184817925B99B1527065A28677AEAAEC37CC7B9C5", - "0x3844006206FF29A55DBB44A3D06E46610639E24E960B4BC32A663EEC4D04C689" - ], - "emul_comm": [ - "0x114772020FAF5E6660D7D75B666B7121829027A866A8214B42899E824D820CB9", - "0x01F7FC015E2F0C5E02E34F0FD6FBA0FCE01E40EA183F0F6F7C197553524A96B9" - ], - "endomul_scalar_comm": [ - "0x04C30A9B6412594ECD5EEFCA20D4B759BBC52B08868E01F74FDC82B557A76ADD", - "0x019413D8112950CB93D20BA29452DC281FFE1A692706C34BD148E331F844D244" - ] - }, - "index": { - "domain": { - "log_size_of_group": 14, - "group_gen": "0x1E5587687024253BB079B38D9C5371594958E496C605D3BD898B34D068AFBEE7" - }, - "max_poly_size": 32768, - "public": 40, - "prev_challenges": 2, - "srs": null, - "evals": { - "sigma_comm": [ - { - "unshifted": [ - [ - "Finite", - [ - "0x16A2CBB00F33D627AAEFB19EAF5424680EF37F77C87558AF424130A927D08BAC", - "0x089F70D3C7690C8421C293C01F7A67EB2997E5B96AF11408D88884A6AD328E37" - ] - ] - ], - "shifted": null - }, - { - "unshifted": [ - [ - "Finite", - [ - "0x22CFAD2E118F91BE8E133664585947E25A282017E007700D67F0D72999639BCC", - "0x31AA847B558743C3CAD651B085327F0B67E1C1BFEA2FF472976589ADD952E6D4" - ] - ] - ], - "shifted": null - }, - { - "unshifted": [ - [ - "Finite", - [ - "0x02FB6661EE11262AFC7C8B0389A9B1E4ED18263C3F2468AAF035A07ECC61C9EB", - "0x30705D77AB82D6BAAC8E23640BBAB40F7E7FB53826CD5011575CAE52C6D0517D" - ] - ] - ], - "shifted": null - }, - { - "unshifted": [ - [ - "Finite", - [ - "0x0FD615E77CF392BE8285848DF60D4F87350ABCD65200FC4932E309133D145D05", - "0x3E75EA0E3810A97D8F1D1F8A6B0F9AE5D0F68AE34A4D0EFC29F00AB3BF6D480E" - ] - ] - ], - "shifted": null - }, - { - "unshifted": [ - [ - "Finite", - [ - "0x20C89F37CF8E43831F077DFF9AB9A676907BF9A0F64E418A643667808AB72DAB", - "0x389F98A86437D8A7F667ABB9B0B0DEACBD7E420B583B795363EBCECDBF1C187B" - ] - ] - ], - "shifted": null - }, - { - "unshifted": [ - [ - "Finite", - [ - "0x13548AEE4F67B7B90418512F400B79A69E156A801DE46233C756F9B67A9ABDD1", - "0x25F561C9531A0C83099AC722322A39DC653BC314D63A971624D1D3315B3DA0D5" - ] - ] - ], - "shifted": null - }, - { - "unshifted": [ - [ - "Finite", - [ - "0x20216D064B7466C42626F66F3F141997E6F29D17CC6EBA8FF91E1E03D31FE555", - "0x0082380869AFA6A961738C93BCEEA3042F3ECEA143A585B565A2BF6BD78A1224" - ] - ] - ], - "shifted": null - } - ], - "coefficients_comm": [ - { - "unshifted": [ - [ - "Finite", - [ - "0x34858195AC3FFEBA04F0FAAF38F2574CD903985B56DCAEF53C29EF52CF70FB65", - "0x0D3DD0931D64868F70BE25C6B2CA4D5CA5C6B80763CAFE2B64AEF5F74E653C05" - ] - ] - ], - "shifted": null - }, - { - "unshifted": [ - [ - "Finite", - [ - "0x08060FD15238AE40E726A04EA5C1AE41D8A1D267C9AF7355A8D6C70607139922", - "0x13D36CAD9C78FD0AF514AB7ECAC433592389AE84283024B1D4C85D2E8C952B28" - ] - ] - ], - "shifted": null - }, - { - "unshifted": [ - [ - "Finite", - [ - "0x3AE007735587246066F71A1F09801C359E393CBF49DBDFEDD01E61AA88ECAF0F", - "0x15882EBC62C0E9BC93A14F2CB2ECE43402063B50C09CE735E56D51447689D2C6" - ] - ] - ], - "shifted": null - }, - { - "unshifted": [ - [ - "Finite", - [ - "0x3DCBFD7F258F598AEFB560A1B3BCE632B4AC20534FEFF3B35C82082FE708B236", - "0x254668B50AB44E074902E0DB981FDF045FC614C1E61EBDDA27C06DF9131FC71A" - ] - ] - ], - "shifted": null - }, - { - "unshifted": [ - [ - "Finite", - [ - "0x364F1609C5A72CC0A6F5966400AE1A5AA4B7684805B46D0EE09001F7618DD614", - "0x0F3E45A3DEC2B73BEC5E91ED78BB750B87C02A2339E5A40C2D51FAA0EE1D5B7E" - ] - ] - ], - "shifted": null - }, - { - "unshifted": [ - [ - "Finite", - [ - "0x0BE841A33AB98E3392CB8E27AB1AF419454643CD3668FCC76D249D9AB80AA2AB", - "0x3A92B08771858E78BFC2676B128A9AC404797775D140C2C022AEEC8F69182A2E" - ] - ] - ], - "shifted": null - }, - { - "unshifted": [ - [ - "Finite", - [ - "0x3E32E6702761E653043644E9DC5D75FE7A351B764CD90D72DD1176DB1A541121", - "0x0454C684E407E066394B31CFCCBAF22844B7E17D162EFE860030960A38AD2B2E" - ] - ] - ], - "shifted": null - }, - { - "unshifted": [ - [ - "Finite", - [ - "0x1AE2CE814A97742F41565FEB5881767A2BCF55981A3C8ED33BAE069CBE652FCA", - "0x14DC3F97387117CCA4884F28DCC82C9CF1B7101623B481FD3D1588F568B3E26B" - ] - ] - ], - "shifted": null - }, - { - "unshifted": [ - [ - "Finite", - [ - "0x0A10FA40BB6C61E8185412EE2BAE86C51D19EA7276593DFA7FA3FABB0345521F", - "0x3A8ACF73B5EF4E52ED5DC96404A60C69A067B84FE77211C5407A48437BD5CF89" - ] - ] - ], - "shifted": null - }, - { - "unshifted": [ - [ - "Finite", - [ - "0x21B2C2D62891139A91056B9D298DA8713B7ADA51963B864A5A2376771A1AA766", - "0x1AC7782A588865397F219624D70D11A109283E82B9CD50FFEE23753461E755FE" - ] - ] - ], - "shifted": null - }, - { - "unshifted": [ - [ - "Finite", - [ - "0x2763E7A5B2C387147A0381B50D5C504A5012B7F7CA474C2B4A351011B9BBD036", - "0x13DEA6F4AEBDC606331746A886756C7EA266A52F60B45DE5544A04BFDB277455" - ] - ] - ], - "shifted": null - }, - { - "unshifted": [ - [ - "Finite", - [ - "0x32596E43A053571EE478A3106CABFE9ECB29437F78A978409B4DDE33FE637103", - "0x3D76AF5EE3EFF37E666087AC2827A8BD0D9690BF440FF24434DA3E6AFF7A2AF4" - ] - ] - ], - "shifted": null - }, - { - "unshifted": [ - [ - "Finite", - [ - "0x1D73FE7224F38A37B2C69E22FA6750BABAED17B0F9998877B33E488D9063CE8E", - "0x3E24CEADB1BDA92A0DBDA0F90DF3B8FBD7C6F7ABCC039E9D41AB6916A799F645" - ] - ] - ], - "shifted": null - }, - { - "unshifted": [ - [ - "Finite", - [ - "0x2FDF5D887BC70465AFAC06B7A43632732B5AF0B933EA045D35E99D532BD44CAF", - "0x211A76FD7B76DF3E693CAA0BBB5C178D5DDE827AB6A902AF04AB39D8040E29DF" - ] - ] - ], - "shifted": null - }, - { - "unshifted": [ - [ - "Finite", - [ - "0x0D29BA887D54D915CFB321573463A3CAF5C354848A51FFD6D4FFC0E0B4464D39", - "0x232829C5C662E87CD033AFB3E84E86EC342F4942AC9D75123A21172EE06CF567" - ] - ] - ], - "shifted": null - } - ], - "generic_comm": { - "unshifted": [ - [ - "Finite", - [ - "0x363662743B4E693E18C0CF5FB651DF1205BB27FABCD93ADF54ECD973B21B921B", - "0x116FBA051A4A146C88BCB0F2B56309429CD63514EEEFBE6EA0B39927E72BB20C" - ] - ] - ], - "shifted": null - }, - "psm_comm": { - "unshifted": [ - [ - "Finite", - [ - "0x0A8B3EF5670C6367C721EDAA40AF511C18B1602A4732FEA01124D5D949304324", - "0x1DBE04516C4A33CDFBBD1F54F413B9F21B5D41B6CD668B249879A2688693E51B" - ] - ] - ], - "shifted": null - }, - "complete_add_comm": { - "unshifted": [ - [ - "Finite", - [ - "0x1E859218F11F787CE75C06FD5303457CBD307BDEEB693CC66A235CB85B314D4B", - "0x228167E190903072E8F34BD7AF61A0C02DE0BC3D54FF8760A2BCBFDD6A880688" - ] - ] - ], - "shifted": null - }, - "mul_comm": { - "unshifted": [ - [ - "Finite", - [ - "0x3EC97D3A8CD405A92B31B67184817925B99B1527065A28677AEAAEC37CC7B9C5", - "0x3844006206FF29A55DBB44A3D06E46610639E24E960B4BC32A663EEC4D04C689" - ] - ] - ], - "shifted": null - }, - "emul_comm": { - "unshifted": [ - [ - "Finite", - [ - "0x114772020FAF5E6660D7D75B666B7121829027A866A8214B42899E824D820CB9", - "0x01F7FC015E2F0C5E02E34F0FD6FBA0FCE01E40EA183F0F6F7C197553524A96B9" - ] - ] - ], - "shifted": null - }, - "endomul_scalar_comm": { - "unshifted": [ - [ - "Finite", - [ - "0x04C30A9B6412594ECD5EEFCA20D4B759BBC52B08868E01F74FDC82B557A76ADD", - "0x019413D8112950CB93D20BA29452DC281FFE1A692706C34BD148E331F844D244" - ] - ] - ], - "shifted": null - } - }, - "shifts": [ - "0x0000000000000000000000000000000000000000000000000000000000000001", - "0x00B9CDC8FD0BD4B27E2A74AF7AEBD5734D52D75BDF85EBF1CAD03413E914A2E3", - "0x007CF68160D84012626E0046A932AD12E68B3394D6E2A001A537FFB40D3527C6", - "0x0077D45AECB939AE97A3952B48189964AA209609F19BE4A4B89F339A33440F6D", - "0x0077C7E54505D4771F6AF1FED2195500481EF1F3C0397B0AC819E678BD2309B4", - "0x00B3AF68ECC6AE7A4727F0708EDF4736BE1C99281FA380846E42264C62407484", - "0x00381CA4536FC0ED935D50A74A87136F1A0675B618898DBCE67E564AB20174A1" - ], - "lookup_index": null - }, - "data": { - "constraints": 16384 - } -} diff --git a/operator/mina_account/lib/src/verifier_index.rs b/operator/mina_account/lib/src/verifier_index.rs deleted file mode 100644 index 4cf12ea76..000000000 --- a/operator/mina_account/lib/src/verifier_index.rs +++ /dev/null @@ -1,276 +0,0 @@ -use std::{array, sync::Arc}; - -use ark_ff::{Field, PrimeField}; -use ark_poly::{ - univariate::DensePolynomial, EvaluationDomain, Radix2EvaluationDomain, UVPolynomial, -}; -use kimchi::{ - circuits::{ - constraints::FeatureFlags, - expr::Linearization, - lookup::lookups::{LookupFeatures, LookupPatterns}, - }, - linearization::expr_linearization, - mina_curves::pasta::{Fp, Fq, Pallas, Vesta}, - poly_commitment::{srs::SRS, PolyComm}, - verifier_index::VerifierIndex, -}; -use serde::Deserialize; - -const BLOCKCHAIN_VK_JSON: &str = include_str!("mainnet_vk.json"); - -#[derive(Deserialize)] -struct BlockchainVerificationKey { - commitments: Commitments, - index: Index, -} - -#[derive(Deserialize)] -struct Commitments { - sigma_comm: [JSONPolyComm; 7], - coefficients_comm: [JSONPolyComm; 15], - generic_comm: JSONPolyComm, - psm_comm: JSONPolyComm, - complete_add_comm: JSONPolyComm, - mul_comm: JSONPolyComm, - emul_comm: JSONPolyComm, - endomul_scalar_comm: JSONPolyComm, -} - -#[derive(Deserialize)] -struct Index { - domain: Domain, - max_poly_size: usize, - public: usize, - prev_challenges: usize, - shifts: [JSONFq; 7], -} - -#[derive(Deserialize)] -struct Domain { - log_size_of_group: usize, -} - -#[derive(Deserialize)] -struct JSONFp(String); -#[derive(Deserialize)] -struct JSONFq(String); - -#[derive(Deserialize)] -struct JSONGroupAffine(JSONFp, JSONFp); - -#[derive(Deserialize)] -struct JSONPolyComm(JSONGroupAffine); - -impl TryInto for JSONFp { - type Error = String; - - fn try_into(self) -> Result { - let bytes = hex::decode(self.0.trim_start_matches("0x")).map_err(|err| err.to_string())?; - Ok(Fp::from_be_bytes_mod_order(&bytes)) - } -} - -impl TryInto for JSONFq { - type Error = String; - - fn try_into(self) -> Result { - let bytes = hex::decode(self.0.trim_start_matches("0x")).map_err(|err| err.to_string())?; - Ok(Fq::from_be_bytes_mod_order(&bytes)) - } -} - -impl TryInto for JSONGroupAffine { - type Error = String; - - fn try_into(self) -> Result { - // FIXME(xqft): handle point at infinity - Ok(Pallas::new(self.0.try_into()?, self.1.try_into()?, false)) - } -} - -impl TryInto> for JSONPolyComm { - type Error = String; - - fn try_into(self) -> Result, Self::Error> { - Ok(PolyComm { - unshifted: vec![self.0.try_into()?], - shifted: None, - }) - } -} - -pub fn deserialize_blockchain_vk() -> Result, String> { - let vk: BlockchainVerificationKey = - serde_json::from_str(BLOCKCHAIN_VK_JSON).map_err(|err| err.to_string())?; - - let max_poly_size = vk.index.max_poly_size; - let domain = Radix2EvaluationDomain::new(1 << vk.index.domain.log_size_of_group) - .ok_or("failed to create domain".to_owned())?; - - let Commitments { - sigma_comm, - coefficients_comm, - generic_comm, - psm_comm, - complete_add_comm, - mul_comm, - emul_comm, - endomul_scalar_comm, - } = vk.commitments; - let empty_poly_comm = |_| PolyComm::new(Vec::new(), None); - - let sigma_comm = { - let mut new_sigma_comm = array::from_fn(empty_poly_comm); - for (comm, new_comm) in sigma_comm.into_iter().zip(new_sigma_comm.iter_mut()) { - *new_comm = comm.try_into()? - } - new_sigma_comm - }; - let coefficients_comm = { - let mut new_coefficients_comm = array::from_fn(empty_poly_comm); - for (comm, new_comm) in coefficients_comm - .into_iter() - .zip(new_coefficients_comm.iter_mut()) - { - *new_comm = comm.try_into()? - } - new_coefficients_comm - }; - let generic_comm = generic_comm.try_into()?; - let psm_comm = psm_comm.try_into()?; - let complete_add_comm = complete_add_comm.try_into()?; - let mul_comm = mul_comm.try_into()?; - let emul_comm = emul_comm.try_into()?; - let endomul_scalar_comm = endomul_scalar_comm.try_into()?; - - let shift = vk.index.shifts; - let shift = { - let mut new_shift = array::from_fn(|_| Fq::from(0)); - for (comm, new_comm) in shift.into_iter().zip(new_shift.iter_mut()) { - *new_comm = comm.try_into()? - } - new_shift - }; - - // The code below was taken from OpenMina - // https://github.com/openmina/openmina/blob/main/ledger/src/proofs/verifier_index.rs#L151 - - let (endo, _) = poly_commitment::srs::endos::(); - - let feature_flags = FeatureFlags { - range_check0: false, - range_check1: false, - foreign_field_add: false, - foreign_field_mul: false, - xor: false, - rot: false, - lookup_features: LookupFeatures { - patterns: LookupPatterns { - xor: false, - lookup: false, - range_check: false, - foreign_field_mul: false, - }, - joint_lookup_used: false, - uses_runtime_tables: false, - }, - }; - - let (mut linearization, powers_of_alpha) = expr_linearization(Some(&feature_flags), true); - - let linearization = Linearization { - constant_term: linearization.constant_term, - index_terms: { - // Make the verifier index deterministic - linearization - .index_terms - .sort_by_key(|&(columns, _)| columns); - linearization.index_terms - }, - }; - - // https://github.com/o1-labs/proof-systems/blob/2702b09063c7a48131173d78b6cf9408674fd67e/kimchi/src/verifier_index.rs#L310-L314 - let srs = { - let mut srs = SRS::create(max_poly_size); - srs.add_lagrange_basis(domain); - Arc::new(srs) - }; - - // https://github.com/o1-labs/proof-systems/blob/2702b09063c7a48131173d78b6cf9408674fd67e/kimchi/src/verifier_index.rs#L319 - let zkpm = zk_polynomial(domain); - - // https://github.com/o1-labs/proof-systems/blob/2702b09063c7a48131173d78b6cf9408674fd67e/kimchi/src/verifier_index.rs#L324 - let w = zk_w3(domain); - - Ok(VerifierIndex { - domain, - max_poly_size: vk.index.max_poly_size, - srs: once_cell::sync::OnceCell::from(srs), - public: vk.index.public, - prev_challenges: vk.index.prev_challenges, - - sigma_comm, - coefficients_comm, - generic_comm, - psm_comm, - complete_add_comm, - mul_comm, - emul_comm, - endomul_scalar_comm, - - range_check0_comm: None, - range_check1_comm: None, - foreign_field_add_comm: None, - foreign_field_mul_comm: None, - xor_comm: None, - rot_comm: None, - - shift, - zkpm: once_cell::sync::OnceCell::from(zkpm), - w: once_cell::sync::OnceCell::from(w), - endo, - lookup_index: None, - linearization, - powers_of_alpha, - }) -} - -// The code below was taken from OpenMina -// https://github.com/openmina/openmina/blob/main/ledger/src/proofs/verifier_index.rs#L151 -/// Returns the end of the circuit, which is used for introducing zero-knowledge in the permutation polynomial -pub fn zk_w3(domain: Radix2EvaluationDomain) -> Fq { - const ZK_ROWS: u64 = 3; - domain.group_gen.pow([domain.size - (ZK_ROWS)]) -} - -// The code below was taken from OpenMina -// https://github.com/openmina/openmina/blob/main/ledger/src/proofs/verifier_index.rs#L151 -/// Computes the zero-knowledge polynomial for blinding the permutation polynomial: `(x-w^{n-k})(x-w^{n-k-1})...(x-w^n)`. -/// Currently, we use k = 3 for 2 blinding factors, -/// see -pub fn zk_polynomial(domain: Radix2EvaluationDomain) -> DensePolynomial { - let w3 = zk_w3(domain); - let w2 = domain.group_gen * w3; - let w1 = domain.group_gen * w2; - - // (x-w3)(x-w2)(x-w1) = - // x^3 - x^2(w1+w2+w3) + x(w1w2+w1w3+w2w3) - w1w2w3 - let w1w2 = w1 * w2; - DensePolynomial::from_coefficients_slice(&[ - -w1w2 * w3, // 1 - w1w2 + (w1 * w3) + (w3 * w2), // x - -w1 - w2 - w3, // x^2 - Fq::from(1), // x^3 - ]) -} - -#[cfg(test)] -mod test { - use super::deserialize_blockchain_vk; - - #[test] - fn deserialize_blockchain_vk_does_not_fail() { - deserialize_blockchain_vk().unwrap(); - } -} diff --git a/operator/mina_account/mina.go b/operator/mina_account/mina_account.go similarity index 100% rename from operator/mina_account/mina.go rename to operator/mina_account/mina_account.go diff --git a/operator/mina_account/mina_test.go b/operator/mina_account/mina_account_test.go similarity index 100% rename from operator/mina_account/mina_test.go rename to operator/mina_account/mina_account_test.go From 7e63c68b793d99ec9c07f52d7f2ae35aec90c1a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Est=C3=A9fano=20Bargas?= Date: Mon, 19 Aug 2024 14:53:33 -0300 Subject: [PATCH 03/32] Update gitignore --- operator/mina_account/lib/.gitignore | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/operator/mina_account/lib/.gitignore b/operator/mina_account/lib/.gitignore index 17e14b11c..515b4e71b 100644 --- a/operator/mina_account/lib/.gitignore +++ b/operator/mina_account/lib/.gitignore @@ -1,5 +1,5 @@ /target -libmina_state_verifier.so -libmina_state_verifier.a -libmina_state_verifier.dylib +libmina_account_verifier.so +libmina_account_verifier.a +libmina_account_verifier.dylib From 17c9f0c6f3d02145f798dcdcfe1c9330dc0f6985 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Est=C3=A9fano=20Bargas?= Date: Mon, 19 Aug 2024 16:08:36 -0300 Subject: [PATCH 04/32] Added new proving system to batcher --- Makefile | 25 +++++++++++++++++++++ batcher/aligned-batcher/.env.dev | 2 +- batcher/aligned-batcher/src/zk_utils/mod.rs | 9 ++++++++ batcher/aligned-sdk/src/core/types.rs | 1 + batcher/aligned/src/main.rs | 9 ++++++++ 5 files changed, 45 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index e7b31a3e6..1fc49cf2d 100644 --- a/Makefile +++ b/Makefile @@ -644,6 +644,27 @@ test_mina_go_bindings_linux: build_mina_linux @echo "Testing Mina Go bindings..." go test ./operator/mina/... -v +__MINA_ACCOUNT_FFI__: ## +build_mina_account_macos: + @cd operator/mina_account/lib && cargo build --release + @cp operator/mina_account/lib/target/release/libmina_account_verifier_ffi.dylib operator/mina_account/lib/libmina_account_verifier.dylib + +build_mina_account_linux: + @cd operator/mina_account/lib && cargo build --release + @cp operator/mina_account/lib/target/release/libmina_account_verifier_ffi.so operator/mina_account/lib/libmina_account_verifier.so + +test_mina_account_rust_ffi: + @echo "Testing Mina Account Rust FFI source code..." + @cd operator/mina_account/lib && cargo t --release + +test_mina_account_go_bindings_macos: build_mina_account_macos + @echo "Testing Mina Account Go bindings..." + go test ./operator/mina_account/... -v + +test_mina_go_bindings_linux: build_mina_linux + @echo "Testing Mina Account Go bindings..." + go test ./operator/mina_account/... -v + __BUILD_ALL_FFI__: build_all_ffi: ## Build all FFIs @@ -657,6 +678,8 @@ build_all_ffi_macos: ## Build all FFIs for macOS @$(MAKE) build_merkle_tree_macos @$(MAKE) build_halo2_ipa_macos @$(MAKE) build_halo2_kzg_macos + @$(MAKE) build_mina_macos + @$(MAKE) build_mina_account_macos @echo "All macOS FFIs built successfully." build_all_ffi_linux: ## Build all FFIs for Linux @@ -666,6 +689,8 @@ build_all_ffi_linux: ## Build all FFIs for Linux @$(MAKE) build_merkle_tree_linux @$(MAKE) build_halo2_ipa_linux @$(MAKE) build_halo2_kzg_linux + @$(MAKE) build_mina_linxu + @$(MAKE) build_mina_account_linux @echo "All Linux FFIs built successfully." diff --git a/batcher/aligned-batcher/.env.dev b/batcher/aligned-batcher/.env.dev index dbfb12046..8a36d83eb 100644 --- a/batcher/aligned-batcher/.env.dev +++ b/batcher/aligned-batcher/.env.dev @@ -2,7 +2,7 @@ AWS_SECRET_ACCESS_KEY=test AWS_REGION=us-east-2 AWS_ACCESS_KEY_ID=test AWS_BUCKET_NAME=aligned.storage -STORAGE_ENDPOINT=http://localhost:4566/aligned.storage +STORAGE_ENDPOINT="https://mina-bridge.s3.us-west-2.amazonaws.com" LOCALSTACK_ENDPOINT_URL=http://localhost:4566 RUST_LOG=info RUST_BACKTRACE=1 diff --git a/batcher/aligned-batcher/src/zk_utils/mod.rs b/batcher/aligned-batcher/src/zk_utils/mod.rs index f065d5053..ddd32a337 100644 --- a/batcher/aligned-batcher/src/zk_utils/mod.rs +++ b/batcher/aligned-batcher/src/zk_utils/mod.rs @@ -98,5 +98,14 @@ fn verify_internal(verification_data: &VerificationData) -> bool { // verifier. These checks are fast and if they aren't successful then the Pickles proof // isn't valid. } + ProvingSystemId::MinaAccount => { + verification_data + .pub_input + .as_ref() + .expect("Public input is required"); + true + // TODO(xqft): add basic integrity checks (e.g. length of merkle proof being multiple of 32 + // bytes, etc) + } } } diff --git a/batcher/aligned-sdk/src/core/types.rs b/batcher/aligned-sdk/src/core/types.rs index bec9265f4..9fff6c420 100644 --- a/batcher/aligned-sdk/src/core/types.rs +++ b/batcher/aligned-sdk/src/core/types.rs @@ -20,6 +20,7 @@ pub enum ProvingSystemId { Halo2IPA, Risc0, Mina, + MinaAccount, } #[derive(Debug, Serialize, Deserialize, Clone)] diff --git a/batcher/aligned/src/main.rs b/batcher/aligned/src/main.rs index 6c5233e1b..66446f0a3 100644 --- a/batcher/aligned/src/main.rs +++ b/batcher/aligned/src/main.rs @@ -228,6 +228,8 @@ pub enum ProvingSystemArg { Risc0, #[clap(name = "Mina")] Mina, + #[clap(name = "MinaAccount")] + MinaAccount, } const ANVIL_PRIVATE_KEY: &str = "2a871d0798f97d79848a013d4936a73bf4cc922c825d33c1cf7073dff6d409c6"; // Anvil address 9 @@ -243,6 +245,7 @@ impl From for ProvingSystemId { ProvingSystemArg::Halo2IPA => ProvingSystemId::Halo2IPA, ProvingSystemArg::Risc0 => ProvingSystemId::Risc0, ProvingSystemArg::Mina => ProvingSystemId::Mina, + ProvingSystemArg::MinaAccount => ProvingSystemId::MinaAccount, } } } @@ -577,6 +580,12 @@ fn verification_data_from_args(args: SubmitArgs) -> Result { + pub_input = Some(read_file_option( + "--public_input", + args.pub_input_file_name, + )?) + } } let proof_generator_addr = Address::from_str(&args.proof_generator_addr).map_err(|e| { From 4160da81e7e43689da2edd299caccf7c7c047194 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Est=C3=A9fano=20Bargas?= Date: Mon, 19 Aug 2024 16:33:20 -0300 Subject: [PATCH 05/32] Fix Makefile --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 1fc49cf2d..02d622061 100644 --- a/Makefile +++ b/Makefile @@ -661,7 +661,7 @@ test_mina_account_go_bindings_macos: build_mina_account_macos @echo "Testing Mina Account Go bindings..." go test ./operator/mina_account/... -v -test_mina_go_bindings_linux: build_mina_linux +test_mina_account_go_bindings_linux: build_mina_linux @echo "Testing Mina Account Go bindings..." go test ./operator/mina_account/... -v From a598c68badf1524d949d1ecd9654946ea415f29b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Est=C3=A9fano=20Bargas?= Date: Mon, 19 Aug 2024 17:58:22 -0300 Subject: [PATCH 06/32] Deserialize merkle proof, added verify_merkle_proof() --- operator/mina_account/lib/src/lib.rs | 48 +++++++++++++------ .../mina_account/lib/src/merkle_verifier.rs | 36 ++++++++++++++ 2 files changed, 70 insertions(+), 14 deletions(-) create mode 100644 operator/mina_account/lib/src/merkle_verifier.rs diff --git a/operator/mina_account/lib/src/lib.rs b/operator/mina_account/lib/src/lib.rs index 881bf693a..ca27c70d6 100644 --- a/operator/mina_account/lib/src/lib.rs +++ b/operator/mina_account/lib/src/lib.rs @@ -1,10 +1,15 @@ use kimchi::o1_utils::FieldHelpers; +use merkle_verifier::verify_merkle_proof; use mina_curves::pasta::Fp; +use mina_tree::MerklePath; + +mod merkle_verifier; // TODO(xqft): check sizes const MAX_PROOF_SIZE: usize = 16 * 1024; const MAX_PUB_INPUT_SIZE: usize = 6 * 1024; const HASH_SIZE: usize = 32; +const MERKLE_PATH_LEN_SIZE: usize = 4; #[no_mangle] pub extern "C" fn verify_account_inclusion_ffi( @@ -35,7 +40,7 @@ pub extern "C" fn verify_account_inclusion_ffi( } }; - todo!() + verify_merkle_proof(account_hash, merkle_proof, merkle_root) } pub fn parse_hash(pub_inputs: &[u8], offset: &mut usize) -> Result { @@ -58,19 +63,34 @@ pub fn parse_pub_inputs(pub_inputs: &[u8]) -> Result<(Fp, Fp), String> { Ok((merkle_root, account_hash)) } -pub fn parse_proof(proof_bytes: &[u8]) -> Result<(), String> { - todo!() - // std::str::from_utf8(proof_bytes) - // .map_err(|err| err.to_string()) - // .and_then(|base64| { - // BASE64_URL_SAFE - // .decode(base64) - // .map_err(|err| err.to_string()) - // }) - // .and_then(|binprot| { - // MinaBaseProofStableV2::binprot_read(&mut binprot.as_slice()) - // .map_err(|err| err.to_string()) - // }) +pub fn parse_proof(proof_bytes: &[u8]) -> Result, String> { + let merkle_path_bytes = proof_bytes + .get(MERKLE_PATH_LEN_SIZE..) + .ok_or("Failed to slice merkle path".to_string())? + .chunks_exact(HASH_SIZE + 1); + + if !merkle_path_bytes.remainder().is_empty() { + return Err(format!( + "Merkle path bytes not a multiple of HASH_SIZE + 1 ({})", + HASH_SIZE + 1 + )); + } + + merkle_path_bytes + .map(|bytes| { + let left_or_right = bytes + .first() + .ok_or("left_or_right byte not found".to_string())?; + let hash = Fp::from_bytes(bytes).map_err(|err| { + format!("Failed to convert merkle hash into field element: {err}") + })?; + match left_or_right { + 0 => Ok(MerklePath::Left(hash)), + 1 => Ok(MerklePath::Right(hash)), + _ => Err("Unexpected left_or_right byte".to_string()), + } + }) + .collect() } #[cfg(test)] diff --git a/operator/mina_account/lib/src/merkle_verifier.rs b/operator/mina_account/lib/src/merkle_verifier.rs new file mode 100644 index 000000000..dbf1d72ba --- /dev/null +++ b/operator/mina_account/lib/src/merkle_verifier.rs @@ -0,0 +1,36 @@ +use mina_curves::pasta::Fp; +use mina_p2p_messages::v2::hash_with_kimchi; +use mina_tree::MerklePath; +use std::fmt::Write; + +/// Based on OpenMina's implementation +/// https://github.com/openmina/openmina/blob/d790af59a8bd815893f7773f659351b79ed87648/ledger/src/account/account.rs#L1444 +pub fn verify_merkle_proof(merkle_leaf: Fp, merkle_path: Vec, merkle_root: Fp) -> bool { + let mut param = String::with_capacity(16); + + let calculated_root = + merkle_path + .iter() + .enumerate() + .fold(merkle_leaf, |accum, (depth, path)| { + let hashes = match path { + MerklePath::Left(right) => [accum, *right], + MerklePath::Right(left) => [*left, accum], + }; + + param.clear(); + write!(&mut param, "MinaMklTree{:03}", depth).unwrap(); + + hash_with_kimchi(param.as_str(), &hashes) + }); + + calculated_root == merkle_root +} + +#[cfg(test)] +mod test { + #[test] + fn test_verify_merkle_proof() { + todo!(); + } +} From 66fc5d3df92634d2212af9f29f014f9e009c09be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Est=C3=A9fano=20Bargas?= Date: Mon, 19 Aug 2024 17:59:38 -0300 Subject: [PATCH 07/32] Remove proof slicing --- operator/mina_account/lib/src/lib.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/operator/mina_account/lib/src/lib.rs b/operator/mina_account/lib/src/lib.rs index ca27c70d6..2c7aab76c 100644 --- a/operator/mina_account/lib/src/lib.rs +++ b/operator/mina_account/lib/src/lib.rs @@ -9,7 +9,6 @@ mod merkle_verifier; const MAX_PROOF_SIZE: usize = 16 * 1024; const MAX_PUB_INPUT_SIZE: usize = 6 * 1024; const HASH_SIZE: usize = 32; -const MERKLE_PATH_LEN_SIZE: usize = 4; #[no_mangle] pub extern "C" fn verify_account_inclusion_ffi( @@ -64,10 +63,7 @@ pub fn parse_pub_inputs(pub_inputs: &[u8]) -> Result<(Fp, Fp), String> { } pub fn parse_proof(proof_bytes: &[u8]) -> Result, String> { - let merkle_path_bytes = proof_bytes - .get(MERKLE_PATH_LEN_SIZE..) - .ok_or("Failed to slice merkle path".to_string())? - .chunks_exact(HASH_SIZE + 1); + let merkle_path_bytes = proof_bytes.chunks_exact(HASH_SIZE + 1); if !merkle_path_bytes.remainder().is_empty() { return Err(format!( From a90a4ca4fb7d948d2fb4d019e75d91a1ef5c0614 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Est=C3=A9fano=20Bargas?= Date: Tue, 20 Aug 2024 16:27:50 -0300 Subject: [PATCH 08/32] Update go modules --- ...73TCmBJRW9GzvTJK443DPx2YbqcyoLc56g1ny9.proof | Bin 0 -> 1155 bytes ...hs73TCmBJRW9GzvTJK443DPx2YbqcyoLc56g1ny9.pub | 1 + common/proving_systems.go | 9 ++++++++- operator/mina_account/mina_account.go | 14 +++++++------- operator/mina_account/mina_account_test.go | 16 ++++++++-------- operator/pkg/operator.go | 11 +++++++++++ 6 files changed, 35 insertions(+), 16 deletions(-) create mode 100644 batcher/aligned/test_files/mina/account_B62qrQKS9ghd91shs73TCmBJRW9GzvTJK443DPx2YbqcyoLc56g1ny9.proof create mode 100644 batcher/aligned/test_files/mina/account_B62qrQKS9ghd91shs73TCmBJRW9GzvTJK443DPx2YbqcyoLc56g1ny9.pub diff --git a/batcher/aligned/test_files/mina/account_B62qrQKS9ghd91shs73TCmBJRW9GzvTJK443DPx2YbqcyoLc56g1ny9.proof b/batcher/aligned/test_files/mina/account_B62qrQKS9ghd91shs73TCmBJRW9GzvTJK443DPx2YbqcyoLc56g1ny9.proof new file mode 100644 index 0000000000000000000000000000000000000000..7d80710ebd59f2d5dec17ef4c5a6aae5d1de6ef0 GIT binary patch literal 1155 zcmV-}1bq7e00+)B!=Bu7O#x3xhB^4B0KPlpZ|K(reiwQoRanyw0I=T{6>=il08x27 z(&LXkL5AisGdnsuZYGrS++tq+00EcJZd_+Rx-K!OvRCmYKM*5_%!~=4Bs_^mXgMWu z6)yn%5Y!+kY5KC1unXVZbKKXZ zVOw1L0&#d12?px6mdKJA0kK5N_iIAP136X%rLdK zmwh>w4m8e!05TT=%n&cyq6F3Ar=7{lCT|dq(X$~2$=C$Lxt=~Bp6QC|JMPX=`Zi71%syvQV%dn&b^C&V5BTR}|X3E8_=z{5A^ zanrZyx#qMKhK~ctGwiEMJukK1UL84cBad1{HP} z0H4v|SIvR8*XUCb)M>+YTu2x%2i`%c8$ifX&T`C8831vQ?#)Go2J#vzu=?IcPH&Ql)PPHHORu_KFyd zn2h+)QzcrNd`zmhFz>4^iQ zdu^Nr06E3eI_RZpbkHfm*YYF}*ATfKV>f@V)4I$xnv?fv8UVN7;DOQ88F^L`NsU7K VHg5R*Z$>u@j^uB7Gpd}G6%oJ#3RD09 literal 0 HcmV?d00001 diff --git a/batcher/aligned/test_files/mina/account_B62qrQKS9ghd91shs73TCmBJRW9GzvTJK443DPx2YbqcyoLc56g1ny9.pub b/batcher/aligned/test_files/mina/account_B62qrQKS9ghd91shs73TCmBJRW9GzvTJK443DPx2YbqcyoLc56g1ny9.pub new file mode 100644 index 000000000..3cd639772 --- /dev/null +++ b/batcher/aligned/test_files/mina/account_B62qrQKS9ghd91shs73TCmBJRW9GzvTJK443DPx2YbqcyoLc56g1ny9.pub @@ -0,0 +1 @@ +â1¥AªšFËÌ°.–’~)ïs-K›.Œs·/ÿnVÜ6ÿz[2Á5€ï)lÎË„nPùÉó-:]ƒ¥r4b' \ No newline at end of file diff --git a/common/proving_systems.go b/common/proving_systems.go index c69c7e305..f4af65d43 100644 --- a/common/proving_systems.go +++ b/common/proving_systems.go @@ -16,10 +16,11 @@ const ( Halo2IPA Risc0 Mina + MinaAccount ) func (t *ProvingSystemId) String() string { - return [...]string{"GnarkPlonkBls12_381", "GnarkPlonkBn254", "Groth16Bn254", "SP1", "Halo2IPA", "Mina"}[*t] + return [...]string{"GnarkPlonkBls12_381", "GnarkPlonkBn254", "Groth16Bn254", "SP1", "Halo2IPA", "Mina", "MinaAccount"}[*t] } func ProvingSystemIdFromString(provingSystem string) (ProvingSystemId, error) { @@ -41,6 +42,9 @@ func ProvingSystemIdFromString(provingSystem string) (ProvingSystemId, error) { case "Mina": return Mina, nil } + case "MinaAccount": + return MinaAccount, nil + } return 0, fmt.Errorf("unknown proving system: %s", provingSystem) } @@ -64,6 +68,9 @@ func ProvingSystemIdToString(provingSystem ProvingSystemId) (string, error) { case Mina: return "Mina", nil } + case MinaAccount: + return "MinaAccount", nil + } return "", fmt.Errorf("unknown proving system: %d", provingSystem) } diff --git a/operator/mina_account/mina_account.go b/operator/mina_account/mina_account.go index fe00fb24e..372707a2c 100644 --- a/operator/mina_account/mina_account.go +++ b/operator/mina_account/mina_account.go @@ -1,10 +1,10 @@ -package mina +package mina_account /* -#cgo darwin LDFLAGS: -L./lib -lmina_state_verifier -#cgo linux LDFLAGS: -L./lib -lmina_state_verifier -ldl -lrt -lm +#cgo darwin LDFLAGS: -L./lib -lmina_account_verifier +#cgo linux LDFLAGS: -L./lib -lmina_account_verifier -ldl -lrt -lm -#include "lib/mina_verifier.h" +#include "lib/mina_account_verifier.h" */ import "C" import ( @@ -20,13 +20,13 @@ const MAX_PUB_INPUT_SIZE = 6 * 1024 func timer() func() { start := time.Now() return func() { - fmt.Printf("Mina block verification took %v\n", time.Since(start)) + fmt.Printf("Mina account verification took %v\n", time.Since(start)) } } -func VerifyProtocolStateProof(proofBuffer [MAX_PROOF_SIZE]byte, proofLen uint, pubInputBuffer [MAX_PUB_INPUT_SIZE]byte, pubInputLen uint) bool { +func VerifyAccountInclusion(proofBuffer [MAX_PROOF_SIZE]byte, proofLen uint, pubInputBuffer [MAX_PUB_INPUT_SIZE]byte, pubInputLen uint) bool { defer timer()() proofPtr := (*C.uchar)(unsafe.Pointer(&proofBuffer[0])) pubInputPtr := (*C.uchar)(unsafe.Pointer(&pubInputBuffer[0])) - return (bool)(C.verify_protocol_state_proof_ffi(proofPtr, (C.uint)(proofLen), pubInputPtr, (C.uint)(pubInputLen))) + return (bool)(C.verify_account_inclusion_ffi(proofPtr, (C.uint)(proofLen), pubInputPtr, (C.uint)(pubInputLen))) } diff --git a/operator/mina_account/mina_account_test.go b/operator/mina_account/mina_account_test.go index 697f7c005..7ed9165b3 100644 --- a/operator/mina_account/mina_account_test.go +++ b/operator/mina_account/mina_account_test.go @@ -5,33 +5,33 @@ import ( "os" "testing" - "github.com/yetanotherco/aligned_layer/operator/mina" + "github.com/lambdaclass/aligned_layer/operator/mina_account" ) func TestMinaStateProofVerifies(t *testing.T) { fmt.Println(os.Getwd()) - proofFile, err := os.Open("../../batcher/aligned/test_files/mina/protocol_state.proof") + proofFile, err := os.Open("../../batcher/aligned/test_files/mina/account_B62qrQKS9ghd91shs73TCmBJRW9GzvTJK443DPx2YbqcyoLc56g1ny9.proof") if err != nil { - t.Errorf("could not open mina state proof file") + t.Errorf("could not open mina account proof file") } proofBuffer := make([]byte, mina.MAX_PROOF_SIZE) proofLen, err := proofFile.Read(proofBuffer) if err != nil { - t.Errorf("could not read bytes from mina state proof file") + t.Errorf("could not read bytes from mina account proof file") } - pubInputFile, err := os.Open("../../batcher/aligned/test_files/mina/protocol_state.pub") + pubInputFile, err := os.Open("../../batcher/aligned/test_files/mina/account_B62qrQKS9ghd91shs73TCmBJRW9GzvTJK443DPx2YbqcyoLc56g1ny9.pub") if err != nil { - t.Errorf("could not open mina state hash file") + t.Errorf("could not open mina account pub inputs file") } pubInputBuffer := make([]byte, mina.MAX_PUB_INPUT_SIZE) pubInputLen, err := pubInputFile.Read(pubInputBuffer) if err != nil { - t.Errorf("could not read bytes from mina state hash") + t.Errorf("could not read bytes from mina account pub inputs hash") } - if !mina.VerifyProtocolStateProof(([mina.MAX_PROOF_SIZE]byte)(proofBuffer), uint(proofLen), ([mina.MAX_PUB_INPUT_SIZE]byte)(pubInputBuffer), uint(pubInputLen)) { + if !mina_account.VerifyAccountInclusion(([mina.MAX_PROOF_SIZE]byte)(proofBuffer), uint(proofLen), ([mina.MAX_PUB_INPUT_SIZE]byte)(pubInputBuffer), uint(pubInputLen)) { t.Errorf("proof did not verify") } } diff --git a/operator/pkg/operator.go b/operator/pkg/operator.go index 6d8339da2..895e60c9f 100644 --- a/operator/pkg/operator.go +++ b/operator/pkg/operator.go @@ -367,6 +367,17 @@ func (o *Operator) verify(verificationData VerificationData, results chan bool) verificationResult := mina.VerifyProtocolStateProof(([mina.MAX_PROOF_SIZE]byte)(proofBuffer), proofLen, ([mina.MAX_PUB_INPUT_SIZE]byte)(pubInputBuffer), (uint)(pubInputLen)) o.Logger.Infof("Mina state proof verification result: %t", verificationResult) results <- verificationResult + case common.MinaAccount: + proofLen := (uint)(len(verificationData.Proof)) + pubInputLen := (uint)(len(verificationData.PubInput)) + proofBuffer := make([]byte, mina.MAX_PROOF_SIZE) + copy(proofBuffer, verificationData.Proof) + pubInputBuffer := make([]byte, mina.MAX_PUB_INPUT_SIZE) + copy(pubInputBuffer, verificationData.PubInput) + + verificationResult := mina.VerifyAccountInclusion(([mina.MAX_PROOF_SIZE]byte)(proofBuffer), proofLen, ([mina.MAX_PUB_INPUT_SIZE]byte)(pubInputBuffer), (uint)(pubInputLen)) + o.Logger.Infof("Mina account inclusion proof verification result: %t", verificationResult) + results <- verificationResult default: o.Logger.Error("Unrecognized proving system ID") results <- false From 958cf2e21688f66ee7b33c2203c25c0879e9d721 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Est=C3=A9fano=20Bargas?= Date: Tue, 20 Aug 2024 16:38:34 -0300 Subject: [PATCH 09/32] Change yetanotherco modules to lambdaclass --- operator/cmd/actions/deposit_into_strategy.go | 2 +- operator/cmd/actions/register.go | 4 ++-- operator/cmd/actions/start.go | 4 ++-- operator/cmd/main.go | 2 +- operator/halo2ipa/halo2ipa_test.go | 2 +- operator/halo2kzg/halo2kzg_test.go | 2 +- operator/mina/mina_test.go | 2 +- operator/pkg/operator.go | 22 +++++++++---------- operator/pkg/register.go | 4 ++-- operator/pkg/rpc_client.go | 2 +- operator/pkg/s3.go | 2 +- operator/pkg/verification_data.go | 2 +- operator/risc_zero/risc_zero_test.go | 2 +- operator/sp1/sp1_test.go | 2 +- 14 files changed, 27 insertions(+), 27 deletions(-) diff --git a/operator/cmd/actions/deposit_into_strategy.go b/operator/cmd/actions/deposit_into_strategy.go index 47e2ffde5..01c99e29d 100644 --- a/operator/cmd/actions/deposit_into_strategy.go +++ b/operator/cmd/actions/deposit_into_strategy.go @@ -12,7 +12,7 @@ import ( "github.com/Layr-Labs/eigensdk-go/signerv2" "github.com/ethereum/go-ethereum/common" "github.com/urfave/cli/v2" - "github.com/yetanotherco/aligned_layer/core/config" + "github.com/lambdaclass/aligned_layer/core/config" ) var ( diff --git a/operator/cmd/actions/register.go b/operator/cmd/actions/register.go index bfc9ad87a..05cd6b758 100644 --- a/operator/cmd/actions/register.go +++ b/operator/cmd/actions/register.go @@ -2,12 +2,12 @@ package actions import ( "context" - operator "github.com/yetanotherco/aligned_layer/operator/pkg" + operator "github.com/lambdaclass/aligned_layer/operator/pkg" "time" "github.com/ethereum/go-ethereum/crypto" "github.com/urfave/cli/v2" - "github.com/yetanotherco/aligned_layer/core/config" + "github.com/lambdaclass/aligned_layer/core/config" ) var registerFlags = []cli.Flag{ diff --git a/operator/cmd/actions/start.go b/operator/cmd/actions/start.go index adfb4b385..4cbe2cba8 100644 --- a/operator/cmd/actions/start.go +++ b/operator/cmd/actions/start.go @@ -6,8 +6,8 @@ import ( sdkutils "github.com/Layr-Labs/eigensdk-go/utils" "github.com/urfave/cli/v2" - "github.com/yetanotherco/aligned_layer/core/config" - operator "github.com/yetanotherco/aligned_layer/operator/pkg" + "github.com/lambdaclass/aligned_layer/core/config" + operator "github.com/lambdaclass/aligned_layer/operator/pkg" ) var StartFlags = []cli.Flag{ diff --git a/operator/cmd/main.go b/operator/cmd/main.go index 7496aa126..4b6526003 100644 --- a/operator/cmd/main.go +++ b/operator/cmd/main.go @@ -5,7 +5,7 @@ import ( "os" "github.com/urfave/cli/v2" - "github.com/yetanotherco/aligned_layer/operator/cmd/actions" + "github.com/lambdaclass/aligned_layer/operator/cmd/actions" ) var ( diff --git a/operator/halo2ipa/halo2ipa_test.go b/operator/halo2ipa/halo2ipa_test.go index 4b634ae2f..e8084b5e9 100644 --- a/operator/halo2ipa/halo2ipa_test.go +++ b/operator/halo2ipa/halo2ipa_test.go @@ -2,7 +2,7 @@ package halo2ipa_test import ( "encoding/binary" - "github.com/yetanotherco/aligned_layer/operator/halo2ipa" + "github.com/lambdaclass/aligned_layer/operator/halo2ipa" "os" "testing" ) diff --git a/operator/halo2kzg/halo2kzg_test.go b/operator/halo2kzg/halo2kzg_test.go index b43ce10e8..056c14cd7 100644 --- a/operator/halo2kzg/halo2kzg_test.go +++ b/operator/halo2kzg/halo2kzg_test.go @@ -2,7 +2,7 @@ package halo2kzg_test import ( "encoding/binary" - "github.com/yetanotherco/aligned_layer/operator/halo2kzg" + "github.com/lambdaclass/aligned_layer/operator/halo2kzg" "os" "testing" ) diff --git a/operator/mina/mina_test.go b/operator/mina/mina_test.go index 697f7c005..9ec1bf5fa 100644 --- a/operator/mina/mina_test.go +++ b/operator/mina/mina_test.go @@ -5,7 +5,7 @@ import ( "os" "testing" - "github.com/yetanotherco/aligned_layer/operator/mina" + "github.com/lambdaclass/aligned_layer/operator/mina" ) func TestMinaStateProofVerifies(t *testing.T) { diff --git a/operator/pkg/operator.go b/operator/pkg/operator.go index 895e60c9f..8fcadd65b 100644 --- a/operator/pkg/operator.go +++ b/operator/pkg/operator.go @@ -11,15 +11,15 @@ import ( "time" "github.com/ethereum/go-ethereum/crypto" - "github.com/yetanotherco/aligned_layer/operator/mina" - "github.com/yetanotherco/aligned_layer/operator/risc_zero" + "github.com/lambdaclass/aligned_layer/operator/mina" + "github.com/lambdaclass/aligned_layer/operator/risc_zero" "github.com/prometheus/client_golang/prometheus" - "github.com/yetanotherco/aligned_layer/metrics" + "github.com/lambdaclass/aligned_layer/metrics" - "github.com/yetanotherco/aligned_layer/operator/halo2ipa" - "github.com/yetanotherco/aligned_layer/operator/halo2kzg" - "github.com/yetanotherco/aligned_layer/operator/sp1" + "github.com/lambdaclass/aligned_layer/operator/halo2ipa" + "github.com/lambdaclass/aligned_layer/operator/halo2kzg" + "github.com/lambdaclass/aligned_layer/operator/sp1" "github.com/Layr-Labs/eigensdk-go/crypto/bls" "github.com/Layr-Labs/eigensdk-go/logging" @@ -30,12 +30,12 @@ import ( "github.com/consensys/gnark/backend/witness" ethcommon "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/event" - "github.com/yetanotherco/aligned_layer/common" - servicemanager "github.com/yetanotherco/aligned_layer/contracts/bindings/AlignedLayerServiceManager" - "github.com/yetanotherco/aligned_layer/core/chainio" - "github.com/yetanotherco/aligned_layer/core/types" + "github.com/lambdaclass/aligned_layer/common" + servicemanager "github.com/lambdaclass/aligned_layer/contracts/bindings/AlignedLayerServiceManager" + "github.com/lambdaclass/aligned_layer/core/chainio" + "github.com/lambdaclass/aligned_layer/core/types" - "github.com/yetanotherco/aligned_layer/core/config" + "github.com/lambdaclass/aligned_layer/core/config" ) type Operator struct { diff --git a/operator/pkg/register.go b/operator/pkg/register.go index 1a8275515..ef8f55bf2 100644 --- a/operator/pkg/register.go +++ b/operator/pkg/register.go @@ -6,8 +6,8 @@ import ( "time" "github.com/Layr-Labs/eigensdk-go/types" - "github.com/yetanotherco/aligned_layer/core/chainio" - "github.com/yetanotherco/aligned_layer/core/config" + "github.com/lambdaclass/aligned_layer/core/chainio" + "github.com/lambdaclass/aligned_layer/core/config" ) // RegisterOperator operator registers the operator with the given public key for the given quorum IDs. diff --git a/operator/pkg/rpc_client.go b/operator/pkg/rpc_client.go index 6eb0d7ea2..072d804e1 100644 --- a/operator/pkg/rpc_client.go +++ b/operator/pkg/rpc_client.go @@ -6,7 +6,7 @@ import ( "time" "github.com/Layr-Labs/eigensdk-go/logging" - "github.com/yetanotherco/aligned_layer/core/types" + "github.com/lambdaclass/aligned_layer/core/types" ) // AggregatorRpcClient is the client to communicate with the aggregator via RPC diff --git a/operator/pkg/s3.go b/operator/pkg/s3.go index 7f60b60e3..a9cc0bd13 100644 --- a/operator/pkg/s3.go +++ b/operator/pkg/s3.go @@ -6,7 +6,7 @@ import ( "io" "net/http" - "github.com/yetanotherco/aligned_layer/operator/merkle_tree" + "github.com/lambdaclass/aligned_layer/operator/merkle_tree" ) func (o *Operator) getBatchFromS3(batchURL string, expectedMerkleRoot [32]byte) ([]VerificationData, error) { diff --git a/operator/pkg/verification_data.go b/operator/pkg/verification_data.go index edc98926d..99084ae42 100644 --- a/operator/pkg/verification_data.go +++ b/operator/pkg/verification_data.go @@ -1,7 +1,7 @@ package operator import ( - "github.com/yetanotherco/aligned_layer/common" + "github.com/lambdaclass/aligned_layer/common" ) type VerificationData struct { diff --git a/operator/risc_zero/risc_zero_test.go b/operator/risc_zero/risc_zero_test.go index 7aa23a582..139d86a62 100644 --- a/operator/risc_zero/risc_zero_test.go +++ b/operator/risc_zero/risc_zero_test.go @@ -4,7 +4,7 @@ import ( "os" "testing" - "github.com/yetanotherco/aligned_layer/operator/risc_zero" + "github.com/lambdaclass/aligned_layer/operator/risc_zero" ) func TestFibonacciRiscZeroProofVerifies(t *testing.T) { diff --git a/operator/sp1/sp1_test.go b/operator/sp1/sp1_test.go index d1593225e..e17a2e26f 100644 --- a/operator/sp1/sp1_test.go +++ b/operator/sp1/sp1_test.go @@ -4,7 +4,7 @@ import ( "os" "testing" - "github.com/yetanotherco/aligned_layer/operator/sp1" + "github.com/lambdaclass/aligned_layer/operator/sp1" ) const MaxProofSize = 2 * 1024 * 1024 From b5526cb75dc3537588894c76e81012b7c10c2d25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Est=C3=A9fano=20Bargas?= Date: Tue, 20 Aug 2024 16:45:41 -0300 Subject: [PATCH 10/32] Revert "Change yetanotherco modules to lambdaclass" This reverts commit 958cf2e21688f66ee7b33c2203c25c0879e9d721. --- operator/cmd/actions/deposit_into_strategy.go | 2 +- operator/cmd/actions/register.go | 4 ++-- operator/cmd/actions/start.go | 4 ++-- operator/cmd/main.go | 2 +- operator/halo2ipa/halo2ipa_test.go | 2 +- operator/halo2kzg/halo2kzg_test.go | 2 +- operator/mina/mina_test.go | 2 +- operator/pkg/operator.go | 22 +++++++++---------- operator/pkg/register.go | 4 ++-- operator/pkg/rpc_client.go | 2 +- operator/pkg/s3.go | 2 +- operator/pkg/verification_data.go | 2 +- operator/risc_zero/risc_zero_test.go | 2 +- operator/sp1/sp1_test.go | 2 +- 14 files changed, 27 insertions(+), 27 deletions(-) diff --git a/operator/cmd/actions/deposit_into_strategy.go b/operator/cmd/actions/deposit_into_strategy.go index 01c99e29d..47e2ffde5 100644 --- a/operator/cmd/actions/deposit_into_strategy.go +++ b/operator/cmd/actions/deposit_into_strategy.go @@ -12,7 +12,7 @@ import ( "github.com/Layr-Labs/eigensdk-go/signerv2" "github.com/ethereum/go-ethereum/common" "github.com/urfave/cli/v2" - "github.com/lambdaclass/aligned_layer/core/config" + "github.com/yetanotherco/aligned_layer/core/config" ) var ( diff --git a/operator/cmd/actions/register.go b/operator/cmd/actions/register.go index 05cd6b758..bfc9ad87a 100644 --- a/operator/cmd/actions/register.go +++ b/operator/cmd/actions/register.go @@ -2,12 +2,12 @@ package actions import ( "context" - operator "github.com/lambdaclass/aligned_layer/operator/pkg" + operator "github.com/yetanotherco/aligned_layer/operator/pkg" "time" "github.com/ethereum/go-ethereum/crypto" "github.com/urfave/cli/v2" - "github.com/lambdaclass/aligned_layer/core/config" + "github.com/yetanotherco/aligned_layer/core/config" ) var registerFlags = []cli.Flag{ diff --git a/operator/cmd/actions/start.go b/operator/cmd/actions/start.go index 4cbe2cba8..adfb4b385 100644 --- a/operator/cmd/actions/start.go +++ b/operator/cmd/actions/start.go @@ -6,8 +6,8 @@ import ( sdkutils "github.com/Layr-Labs/eigensdk-go/utils" "github.com/urfave/cli/v2" - "github.com/lambdaclass/aligned_layer/core/config" - operator "github.com/lambdaclass/aligned_layer/operator/pkg" + "github.com/yetanotherco/aligned_layer/core/config" + operator "github.com/yetanotherco/aligned_layer/operator/pkg" ) var StartFlags = []cli.Flag{ diff --git a/operator/cmd/main.go b/operator/cmd/main.go index 4b6526003..7496aa126 100644 --- a/operator/cmd/main.go +++ b/operator/cmd/main.go @@ -5,7 +5,7 @@ import ( "os" "github.com/urfave/cli/v2" - "github.com/lambdaclass/aligned_layer/operator/cmd/actions" + "github.com/yetanotherco/aligned_layer/operator/cmd/actions" ) var ( diff --git a/operator/halo2ipa/halo2ipa_test.go b/operator/halo2ipa/halo2ipa_test.go index e8084b5e9..4b634ae2f 100644 --- a/operator/halo2ipa/halo2ipa_test.go +++ b/operator/halo2ipa/halo2ipa_test.go @@ -2,7 +2,7 @@ package halo2ipa_test import ( "encoding/binary" - "github.com/lambdaclass/aligned_layer/operator/halo2ipa" + "github.com/yetanotherco/aligned_layer/operator/halo2ipa" "os" "testing" ) diff --git a/operator/halo2kzg/halo2kzg_test.go b/operator/halo2kzg/halo2kzg_test.go index 056c14cd7..b43ce10e8 100644 --- a/operator/halo2kzg/halo2kzg_test.go +++ b/operator/halo2kzg/halo2kzg_test.go @@ -2,7 +2,7 @@ package halo2kzg_test import ( "encoding/binary" - "github.com/lambdaclass/aligned_layer/operator/halo2kzg" + "github.com/yetanotherco/aligned_layer/operator/halo2kzg" "os" "testing" ) diff --git a/operator/mina/mina_test.go b/operator/mina/mina_test.go index 9ec1bf5fa..697f7c005 100644 --- a/operator/mina/mina_test.go +++ b/operator/mina/mina_test.go @@ -5,7 +5,7 @@ import ( "os" "testing" - "github.com/lambdaclass/aligned_layer/operator/mina" + "github.com/yetanotherco/aligned_layer/operator/mina" ) func TestMinaStateProofVerifies(t *testing.T) { diff --git a/operator/pkg/operator.go b/operator/pkg/operator.go index 8fcadd65b..895e60c9f 100644 --- a/operator/pkg/operator.go +++ b/operator/pkg/operator.go @@ -11,15 +11,15 @@ import ( "time" "github.com/ethereum/go-ethereum/crypto" - "github.com/lambdaclass/aligned_layer/operator/mina" - "github.com/lambdaclass/aligned_layer/operator/risc_zero" + "github.com/yetanotherco/aligned_layer/operator/mina" + "github.com/yetanotherco/aligned_layer/operator/risc_zero" "github.com/prometheus/client_golang/prometheus" - "github.com/lambdaclass/aligned_layer/metrics" + "github.com/yetanotherco/aligned_layer/metrics" - "github.com/lambdaclass/aligned_layer/operator/halo2ipa" - "github.com/lambdaclass/aligned_layer/operator/halo2kzg" - "github.com/lambdaclass/aligned_layer/operator/sp1" + "github.com/yetanotherco/aligned_layer/operator/halo2ipa" + "github.com/yetanotherco/aligned_layer/operator/halo2kzg" + "github.com/yetanotherco/aligned_layer/operator/sp1" "github.com/Layr-Labs/eigensdk-go/crypto/bls" "github.com/Layr-Labs/eigensdk-go/logging" @@ -30,12 +30,12 @@ import ( "github.com/consensys/gnark/backend/witness" ethcommon "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/event" - "github.com/lambdaclass/aligned_layer/common" - servicemanager "github.com/lambdaclass/aligned_layer/contracts/bindings/AlignedLayerServiceManager" - "github.com/lambdaclass/aligned_layer/core/chainio" - "github.com/lambdaclass/aligned_layer/core/types" + "github.com/yetanotherco/aligned_layer/common" + servicemanager "github.com/yetanotherco/aligned_layer/contracts/bindings/AlignedLayerServiceManager" + "github.com/yetanotherco/aligned_layer/core/chainio" + "github.com/yetanotherco/aligned_layer/core/types" - "github.com/lambdaclass/aligned_layer/core/config" + "github.com/yetanotherco/aligned_layer/core/config" ) type Operator struct { diff --git a/operator/pkg/register.go b/operator/pkg/register.go index ef8f55bf2..1a8275515 100644 --- a/operator/pkg/register.go +++ b/operator/pkg/register.go @@ -6,8 +6,8 @@ import ( "time" "github.com/Layr-Labs/eigensdk-go/types" - "github.com/lambdaclass/aligned_layer/core/chainio" - "github.com/lambdaclass/aligned_layer/core/config" + "github.com/yetanotherco/aligned_layer/core/chainio" + "github.com/yetanotherco/aligned_layer/core/config" ) // RegisterOperator operator registers the operator with the given public key for the given quorum IDs. diff --git a/operator/pkg/rpc_client.go b/operator/pkg/rpc_client.go index 072d804e1..6eb0d7ea2 100644 --- a/operator/pkg/rpc_client.go +++ b/operator/pkg/rpc_client.go @@ -6,7 +6,7 @@ import ( "time" "github.com/Layr-Labs/eigensdk-go/logging" - "github.com/lambdaclass/aligned_layer/core/types" + "github.com/yetanotherco/aligned_layer/core/types" ) // AggregatorRpcClient is the client to communicate with the aggregator via RPC diff --git a/operator/pkg/s3.go b/operator/pkg/s3.go index a9cc0bd13..7f60b60e3 100644 --- a/operator/pkg/s3.go +++ b/operator/pkg/s3.go @@ -6,7 +6,7 @@ import ( "io" "net/http" - "github.com/lambdaclass/aligned_layer/operator/merkle_tree" + "github.com/yetanotherco/aligned_layer/operator/merkle_tree" ) func (o *Operator) getBatchFromS3(batchURL string, expectedMerkleRoot [32]byte) ([]VerificationData, error) { diff --git a/operator/pkg/verification_data.go b/operator/pkg/verification_data.go index 99084ae42..edc98926d 100644 --- a/operator/pkg/verification_data.go +++ b/operator/pkg/verification_data.go @@ -1,7 +1,7 @@ package operator import ( - "github.com/lambdaclass/aligned_layer/common" + "github.com/yetanotherco/aligned_layer/common" ) type VerificationData struct { diff --git a/operator/risc_zero/risc_zero_test.go b/operator/risc_zero/risc_zero_test.go index 139d86a62..7aa23a582 100644 --- a/operator/risc_zero/risc_zero_test.go +++ b/operator/risc_zero/risc_zero_test.go @@ -4,7 +4,7 @@ import ( "os" "testing" - "github.com/lambdaclass/aligned_layer/operator/risc_zero" + "github.com/yetanotherco/aligned_layer/operator/risc_zero" ) func TestFibonacciRiscZeroProofVerifies(t *testing.T) { diff --git a/operator/sp1/sp1_test.go b/operator/sp1/sp1_test.go index e17a2e26f..d1593225e 100644 --- a/operator/sp1/sp1_test.go +++ b/operator/sp1/sp1_test.go @@ -4,7 +4,7 @@ import ( "os" "testing" - "github.com/lambdaclass/aligned_layer/operator/sp1" + "github.com/yetanotherco/aligned_layer/operator/sp1" ) const MaxProofSize = 2 * 1024 * 1024 From 59ee79a5a18f865fbbea3579eed3897c87e0aa67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Est=C3=A9fano=20Bargas?= Date: Tue, 20 Aug 2024 16:48:43 -0300 Subject: [PATCH 11/32] Fix go modules --- go.mod | 2 ++ operator/mina_account/mina_account_test.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 2b35f3da8..c8093a440 100644 --- a/go.mod +++ b/go.mod @@ -93,3 +93,5 @@ require ( ) replace github.com/Layr-Labs/eigensdk-go => github.com/yetanotherco/eigensdk-go v0.1.10-0.20240805154752-29f4d3457921 + +replace github.com/yetanotherco/aligned_layer => github.com/lambdaclass/aligned_layer v0.0.0-20240819205938-66fc5d3df926 diff --git a/operator/mina_account/mina_account_test.go b/operator/mina_account/mina_account_test.go index 7ed9165b3..e4692b51a 100644 --- a/operator/mina_account/mina_account_test.go +++ b/operator/mina_account/mina_account_test.go @@ -5,7 +5,7 @@ import ( "os" "testing" - "github.com/lambdaclass/aligned_layer/operator/mina_account" + "github.com/yetanotherco/aligned_layer/operator/mina_account" ) func TestMinaStateProofVerifies(t *testing.T) { From d2af2d6a7064b61155a665207e0494a896cc89ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Est=C3=A9fano=20Bargas?= Date: Tue, 20 Aug 2024 17:06:20 -0300 Subject: [PATCH 12/32] Change go module name --- go.mod | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index c8093a440..a34f9d8d3 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/yetanotherco/aligned_layer +module github.com/lambdaclass/aligned_layer go 1.22.2 @@ -13,6 +13,7 @@ require ( require ( github.com/consensys/gnark v0.10.0 github.com/consensys/gnark-crypto v0.12.2-0.20240215234832-d72fcb379d3e + github.com/yetanotherco/aligned_layer v0.0.0-00010101000000-000000000000 ) require ( @@ -94,4 +95,4 @@ require ( replace github.com/Layr-Labs/eigensdk-go => github.com/yetanotherco/eigensdk-go v0.1.10-0.20240805154752-29f4d3457921 -replace github.com/yetanotherco/aligned_layer => github.com/lambdaclass/aligned_layer v0.0.0-20240819205938-66fc5d3df926 +replace github.com/yetanotherco/aligned_layer => github.com/lambdaclass/aligned_layer account_inclusion_verifier From 5d0618c2e4c043b55e5c26b931e4b527bd59d258 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Est=C3=A9fano=20Bargas?= Date: Tue, 20 Aug 2024 17:15:31 -0300 Subject: [PATCH 13/32] Change libmerkle_tree path --- operator/merkle_tree/merkle_tree.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/operator/merkle_tree/merkle_tree.go b/operator/merkle_tree/merkle_tree.go index 05921cf7f..7c3c6b000 100644 --- a/operator/merkle_tree/merkle_tree.go +++ b/operator/merkle_tree/merkle_tree.go @@ -1,8 +1,8 @@ package merkle_tree /* -#cgo linux LDFLAGS: ${SRCDIR}/lib/libmerkle_tree.a -ldl -lrt -lm -lssl -lcrypto -Wl,--allow-multiple-definition -#cgo darwin LDFLAGS: ${SRCDIR}/lib/libmerkle_tree.dylib +#cgo linux LDFLAGS: ./lib/libmerkle_tree.a -ldl -lrt -lm -lssl -lcrypto -Wl,--allow-multiple-definition +#cgo darwin LDFLAGS: ./lib/libmerkle_tree.dylib #include "lib/merkle_tree.h" */ From 2b353e2ab1db5d8152b19971f5f0bd1797a22120 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Est=C3=A9fano=20Bargas?= Date: Tue, 20 Aug 2024 17:25:30 -0300 Subject: [PATCH 14/32] Update lib merkle tree path --- go.mod | 10 +-- go.sum | 102 +--------------------------- operator/merkle_tree/merkle_tree.go | 4 +- 3 files changed, 5 insertions(+), 111 deletions(-) diff --git a/go.mod b/go.mod index a34f9d8d3..90f216c06 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,6 @@ require ( ) require ( - github.com/DataDog/zstd v1.5.2 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect github.com/StackExchange/wmi v1.2.1 // indirect github.com/aws/aws-sdk-go-v2 v1.26.1 // indirect @@ -56,38 +55,31 @@ require ( github.com/holiman/uint256 v1.2.4 // indirect github.com/ingonyama-zk/icicle v0.0.0-20230928131117-97f0079e5c71 // indirect github.com/ingonyama-zk/iciclegnark v0.1.0 // indirect - github.com/klauspost/compress v1.17.7 // indirect github.com/lmittmann/tint v1.0.4 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect - github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mmcloughlin/addchain v0.4.0 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/common v0.52.2 // indirect github.com/prometheus/procfs v0.13.0 // indirect - github.com/rivo/uniseg v0.4.4 // indirect - github.com/rs/cors v1.8.3 // indirect github.com/rs/zerolog v1.32.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/shirou/gopsutil v3.21.6+incompatible // indirect github.com/shurcooL/graphql v0.0.0-20230722043721-ed46e5a46466 // indirect github.com/stretchr/testify v1.9.0 // indirect github.com/supranational/blst v0.3.11 // indirect - github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect github.com/x448/float16 v0.8.4 // indirect github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect - golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 // indirect golang.org/x/mod v0.17.0 // indirect golang.org/x/net v0.24.0 // indirect golang.org/x/sync v0.7.0 // indirect golang.org/x/sys v0.19.0 // indirect golang.org/x/tools v0.20.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240730163845-b1a4ccb954bf // indirect google.golang.org/protobuf v1.34.2 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect rsc.io/tmplfunc v0.0.3 // indirect @@ -95,4 +87,4 @@ require ( replace github.com/Layr-Labs/eigensdk-go => github.com/yetanotherco/eigensdk-go v0.1.10-0.20240805154752-29f4d3457921 -replace github.com/yetanotherco/aligned_layer => github.com/lambdaclass/aligned_layer account_inclusion_verifier +replace github.com/yetanotherco/aligned_layer => github.com/lambdaclass/aligned_layer v0.0.0-20240819205938-66fc5d3df926 diff --git a/go.sum b/go.sum index 6fda24e8a..a13e58aac 100644 --- a/go.sum +++ b/go.sum @@ -56,9 +56,6 @@ github.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk= github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/cockroachdb/errors v1.11.1 h1:xSEW75zKaKCWzR3OfxXUxgrk/NtT4G1MiOv5lWZazG8= github.com/cockroachdb/errors v1.11.1/go.mod h1:8MUxA3Gi6b25tYlFEBGLf+D8aISL+M4MIpiWMSNRfxw= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= @@ -88,8 +85,6 @@ github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233 h1:d28BXYi+wUp github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233/go.mod h1:geZJZH3SzKCqnz5VT0q/DyIG/tvu/dZk+VIfXicupJs= github.com/crate-crypto/go-kzg-4844 v1.0.0 h1:TsSgHwrkTKecKJ4kadtHi4b3xHW5dCFUDFnUp1TsawI= github.com/crate-crypto/go-kzg-4844 v1.0.0/go.mod h1:1kMhvPgI0Ky3yIa+9lFySEBUBXkYxeOi8ZF1sYioxhc= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/deckarep/golang-set/v2 v2.1.0 h1:g47V4Or+DUdzbs8FxCCmgb6VYd+ptPAngjM6dtGktsI= @@ -114,9 +109,6 @@ github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2 github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fjl/memsize v0.0.2 h1:27txuSD9or+NZlnOWdKUxeBzTAUkWCVh+4Gf2dWFOzA= github.com/fjl/memsize v0.0.2/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/fxamacker/cbor/v2 v2.5.0 h1:oHsG0V/Q6E/wqTS2O1Cozzsy69nqCiguo5Q1a1ADivE= @@ -134,7 +126,6 @@ github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= -github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= @@ -144,29 +135,14 @@ github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keL github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= -github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20240207164012-fb44976bdcd5 h1:E/LAvt58di64hlYjx7AsNS6C/ysHWYo+2qPCZKTQhRo= github.com/google/pprof v0.0.0-20240207164012-fb44976bdcd5/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= @@ -182,10 +158,8 @@ github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZ github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= github.com/holiman/uint256 v1.2.4 h1:jUc4Nk8fm9jZabQuqr2JzednajVmBpC+oiTiXZJEApU= github.com/holiman/uint256 v1.2.4/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc= github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8= -github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ingonyama-zk/icicle v0.0.0-20230928131117-97f0079e5c71 h1:YxI1RTPzpFJ3MBmxPl3Bo0F7ume7CmQEC1M9jL6CT94= github.com/ingonyama-zk/icicle v0.0.0-20230928131117-97f0079e5c71/go.mod h1:kAK8/EoN7fUEmakzgZIYdWy1a2rBnpCaZLqSHwZWxEk= github.com/ingonyama-zk/iciclegnark v0.1.0 h1:88MkEghzjQBMjrYRJFxZ9oR9CTIpB8NG2zLeCJSvXKQ= @@ -200,6 +174,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/lambdaclass/aligned_layer v0.0.0-20240819205938-66fc5d3df926 h1:MZSrf2DFdKZSBzE9EXqzuDU77cIwNC2oLZSJyodBa64= +github.com/lambdaclass/aligned_layer v0.0.0-20240819205938-66fc5d3df926/go.mod h1:tG9y36YVwt6h32SJJlR+A1s+Cy2JfP5A96ZyrhVGbZc= github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c= github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= github.com/lmittmann/tint v1.0.4 h1:LeYihpJ9hyGvE0w+K2okPTGUdVLfng1+nDNVR4vWISc= @@ -233,26 +209,14 @@ github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= -github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= -github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= -github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= -github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= -github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= @@ -288,9 +252,6 @@ github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/status-im/keycard-go v0.2.0 h1:QDLFswOQu1r5jsycloeQh3bVU8n/NatHHaZobtDnDzA= github.com/status-im/keycard-go v0.2.0/go.mod h1:wlp8ZLbsmrF6g6WjugPAx+IzoLrkdf9+mHxBEeo3Hbg= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/supranational/blst v0.3.11 h1:LyU6FolezeWAhvQk0k6O/d49jqgO52MSDDfYgbeoEm4= @@ -313,7 +274,6 @@ github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRT github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= github.com/yetanotherco/eigensdk-go v0.1.10-0.20240805154752-29f4d3457921 h1:bYER70hS8+Qx//uWWhm0+WymLTKHiqfbJkphteKUxPc= github.com/yetanotherco/eigensdk-go v0.1.10-0.20240805154752-29f4d3457921/go.mod h1:XcLVDtlB1vOPj63D236b451+SC75B8gwgkpNhYHSxNs= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= @@ -332,48 +292,17 @@ go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 h1:985EYyeCOxTpcgOTJpflJUwOeEz0CQOdPt73OzpE9F8= golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -382,50 +311,23 @@ golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.20.0 h1:hz/CVckiOxybQvFw6h7b/q80NTr9IUQb4s1IIzW7KNY= golang.org/x/tools v0.20.0/go.mod h1:WvitBU7JJf6A4jOdg4S1tviW9bhUxkgeCui/0JHctQg= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= google.golang.org/genproto/googleapis/rpc v0.0.0-20240730163845-b1a4ccb954bf h1:liao9UHurZLtiEwBgT9LMOnKYsHze6eA6w1KQCMVN2Q= google.golang.org/genproto/googleapis/rpc v0.0.0-20240730163845-b1a4ccb954bf/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= google.golang.org/grpc v1.58.3 h1:BjnpXut1btbtgN/6sp+brB2Kbm2LjNXnidYujAVbSoQ= google.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/operator/merkle_tree/merkle_tree.go b/operator/merkle_tree/merkle_tree.go index 7c3c6b000..de3a602d6 100644 --- a/operator/merkle_tree/merkle_tree.go +++ b/operator/merkle_tree/merkle_tree.go @@ -1,8 +1,8 @@ package merkle_tree /* -#cgo linux LDFLAGS: ./lib/libmerkle_tree.a -ldl -lrt -lm -lssl -lcrypto -Wl,--allow-multiple-definition -#cgo darwin LDFLAGS: ./lib/libmerkle_tree.dylib +#cgo linux LDFLAGS: -L./lib -llibmerkle_tree -ldl -lrt -lm -lssl -lcrypto -Wl,--allow-multiple-definition +#cgo darwin LDFLAGS: -L./lib -llibmerkle_tree #include "lib/merkle_tree.h" */ From b0c70c2ab3bd658ebbfd7357afc854007d9b6dca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Est=C3=A9fano=20Bargas?= Date: Tue, 20 Aug 2024 17:27:31 -0300 Subject: [PATCH 15/32] Update go mod replace --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 90f216c06..c8c26b4c9 100644 --- a/go.mod +++ b/go.mod @@ -87,4 +87,4 @@ require ( replace github.com/Layr-Labs/eigensdk-go => github.com/yetanotherco/eigensdk-go v0.1.10-0.20240805154752-29f4d3457921 -replace github.com/yetanotherco/aligned_layer => github.com/lambdaclass/aligned_layer v0.0.0-20240819205938-66fc5d3df926 +replace github.com/yetanotherco/aligned_layer => github.com/lambdaclass/aligned_layer v0.0.0-20240820200620-d2af2d6a7064 diff --git a/go.sum b/go.sum index a13e58aac..ea85b1bae 100644 --- a/go.sum +++ b/go.sum @@ -174,8 +174,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/lambdaclass/aligned_layer v0.0.0-20240819205938-66fc5d3df926 h1:MZSrf2DFdKZSBzE9EXqzuDU77cIwNC2oLZSJyodBa64= -github.com/lambdaclass/aligned_layer v0.0.0-20240819205938-66fc5d3df926/go.mod h1:tG9y36YVwt6h32SJJlR+A1s+Cy2JfP5A96ZyrhVGbZc= +github.com/lambdaclass/aligned_layer v0.0.0-20240820200620-d2af2d6a7064 h1:y6S/vT8v6v6uRe9mEUUirxSGQVPKqikHC9eITFD3KH0= +github.com/lambdaclass/aligned_layer v0.0.0-20240820200620-d2af2d6a7064/go.mod h1:B6Dau6SoFJmpHQOAyq6m2VMHwWP2IhCXnXdbAPdXzUI= github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c= github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= github.com/lmittmann/tint v1.0.4 h1:LeYihpJ9hyGvE0w+K2okPTGUdVLfng1+nDNVR4vWISc= From a9ab0f2b65868be21166223dffd463f85e1af166 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Est=C3=A9fano=20Bargas?= Date: Tue, 20 Aug 2024 17:33:36 -0300 Subject: [PATCH 16/32] Fix case --- common/proving_systems.go | 2 -- go.mod | 2 +- go.sum | 34 ++++++++++++++++------------------ 3 files changed, 17 insertions(+), 21 deletions(-) diff --git a/common/proving_systems.go b/common/proving_systems.go index f4af65d43..8a35024f7 100644 --- a/common/proving_systems.go +++ b/common/proving_systems.go @@ -41,7 +41,6 @@ func ProvingSystemIdFromString(provingSystem string) (ProvingSystemId, error) { return Risc0, nil case "Mina": return Mina, nil - } case "MinaAccount": return MinaAccount, nil } @@ -67,7 +66,6 @@ func ProvingSystemIdToString(provingSystem ProvingSystemId) (string, error) { return "Risc0", nil case Mina: return "Mina", nil - } case MinaAccount: return "MinaAccount", nil } diff --git a/go.mod b/go.mod index c8c26b4c9..7c9e07cbb 100644 --- a/go.mod +++ b/go.mod @@ -87,4 +87,4 @@ require ( replace github.com/Layr-Labs/eigensdk-go => github.com/yetanotherco/eigensdk-go v0.1.10-0.20240805154752-29f4d3457921 -replace github.com/yetanotherco/aligned_layer => github.com/lambdaclass/aligned_layer v0.0.0-20240820200620-d2af2d6a7064 +replace github.com/yetanotherco/aligned_layer => . diff --git a/go.sum b/go.sum index ea85b1bae..f3434f87d 100644 --- a/go.sum +++ b/go.sum @@ -2,8 +2,8 @@ dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= -github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= -github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= +github.com/DataDog/zstd v1.4.5 h1:EndNeuB0l9syBZhut0wns3gV1hL8zX8LIu6ZiVHWLIQ= +github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/Microsoft/hcsshim v0.11.4 h1:68vKo2VN8DE9AdN4tnkWnmdhqdbpUFM8OF3Airm7fz8= @@ -166,16 +166,14 @@ github.com/ingonyama-zk/iciclegnark v0.1.0 h1:88MkEghzjQBMjrYRJFxZ9oR9CTIpB8NG2z github.com/ingonyama-zk/iciclegnark v0.1.0/go.mod h1:wz6+IpyHKs6UhMMoQpNqz1VY+ddfKqC/gRwR/64W6WU= github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus= github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= -github.com/klauspost/compress v1.17.7 h1:ehO88t2UGzQK66LMdE8tibEd1ErmzZjNEqWkjLAKQQg= -github.com/klauspost/compress v1.17.7/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= +github.com/klauspost/compress v1.16.0 h1:iULayQNOReoYUe+1qtKOqw9CwJv3aNQu8ivo7lw1HU4= +github.com/klauspost/compress v1.16.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/lambdaclass/aligned_layer v0.0.0-20240820200620-d2af2d6a7064 h1:y6S/vT8v6v6uRe9mEUUirxSGQVPKqikHC9eITFD3KH0= -github.com/lambdaclass/aligned_layer v0.0.0-20240820200620-d2af2d6a7064/go.mod h1:B6Dau6SoFJmpHQOAyq6m2VMHwWP2IhCXnXdbAPdXzUI= github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c= github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= github.com/lmittmann/tint v1.0.4 h1:LeYihpJ9hyGvE0w+K2okPTGUdVLfng1+nDNVR4vWISc= @@ -192,8 +190,8 @@ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWE github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= -github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= -github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag= +github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/pointerstructure v1.2.0 h1:O+i9nHnXS3l/9Wu7r4NrEdwA2VFTicjUEN1uBnDo34A= github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4= github.com/mmcloughlin/addchain v0.4.0 h1:SobOdjm2xLj1KkXN5/n0xTIWyZA2+s99UCY1iPfkHRY= @@ -229,12 +227,12 @@ github.com/prometheus/common v0.52.2 h1:LW8Vk7BccEdONfrJBDffQGRtpSzi5CQaRZGtboOO github.com/prometheus/common v0.52.2/go.mod h1:lrWtQx+iDfn2mbH5GUzlH9TSHyfZpHkSiG1W7y3sF2Q= github.com/prometheus/procfs v0.13.0 h1:GqzLlQyfsPbaEHaQkO7tbDlriv/4o5Hudv6OXHGKX7o= github.com/prometheus/procfs v0.13.0/go.mod h1:cd4PFCR54QLnGKPaKGA6l+cfuNXtht43ZKY6tow0Y1g= -github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= -github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= +github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= +github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= -github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= -github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= +github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.32.0 h1:keLypqrlIjaFsbmJOBdB/qvyF8KEtCWHwobLp5l/mQ0= github.com/rs/zerolog v1.32.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= @@ -256,8 +254,8 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/supranational/blst v0.3.11 h1:LyU6FolezeWAhvQk0k6O/d49jqgO52MSDDfYgbeoEm4= github.com/supranational/blst v0.3.11/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= -github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d h1:vfofYNRScrDdvS342BElfbETmL1Aiz3i2t0zfRj16Hs= -github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d/go.mod h1:RRCYJbIwD5jmqPI9XoAFR0OcDxqUctll6zUj/+B4S48= +github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= +github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= github.com/testcontainers/testcontainers-go v0.30.0 h1:jmn/XS22q4YRrcMwWg0pAwlClzs/abopbsBzrepyc4E= github.com/testcontainers/testcontainers-go v0.30.0/go.mod h1:K+kHNGiM5zjklKjgTtcrEetF3uhWbMUyqAQoyoh8Pf0= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= @@ -294,8 +292,8 @@ go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= -golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 h1:985EYyeCOxTpcgOTJpflJUwOeEz0CQOdPt73OzpE9F8= -golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI= +golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8kdjVDVAiFMtgUdTSRQ= +golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= @@ -317,8 +315,8 @@ golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.20.0 h1:hz/CVckiOxybQvFw6h7b/q80NTr9IUQb4s1IIzW7KNY= golang.org/x/tools v0.20.0/go.mod h1:WvitBU7JJf6A4jOdg4S1tviW9bhUxkgeCui/0JHctQg= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240730163845-b1a4ccb954bf h1:liao9UHurZLtiEwBgT9LMOnKYsHze6eA6w1KQCMVN2Q= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240730163845-b1a4ccb954bf/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= google.golang.org/grpc v1.58.3 h1:BjnpXut1btbtgN/6sp+brB2Kbm2LjNXnidYujAVbSoQ= google.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= From 43da621a3a571025a6205814d41f6e8c818db580 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Est=C3=A9fano=20Bargas?= Date: Tue, 20 Aug 2024 17:34:43 -0300 Subject: [PATCH 17/32] Revert "Update lib merkle tree path" This reverts commit 2b353e2ab1db5d8152b19971f5f0bd1797a22120. --- go.sum | 32 ++++++++++++++--------------- operator/merkle_tree/merkle_tree.go | 4 ++-- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/go.sum b/go.sum index f3434f87d..df3d76697 100644 --- a/go.sum +++ b/go.sum @@ -2,8 +2,8 @@ dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= -github.com/DataDog/zstd v1.4.5 h1:EndNeuB0l9syBZhut0wns3gV1hL8zX8LIu6ZiVHWLIQ= -github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= +github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= +github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/Microsoft/hcsshim v0.11.4 h1:68vKo2VN8DE9AdN4tnkWnmdhqdbpUFM8OF3Airm7fz8= @@ -166,8 +166,8 @@ github.com/ingonyama-zk/iciclegnark v0.1.0 h1:88MkEghzjQBMjrYRJFxZ9oR9CTIpB8NG2z github.com/ingonyama-zk/iciclegnark v0.1.0/go.mod h1:wz6+IpyHKs6UhMMoQpNqz1VY+ddfKqC/gRwR/64W6WU= github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus= github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= -github.com/klauspost/compress v1.16.0 h1:iULayQNOReoYUe+1qtKOqw9CwJv3aNQu8ivo7lw1HU4= -github.com/klauspost/compress v1.16.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.7 h1:ehO88t2UGzQK66LMdE8tibEd1ErmzZjNEqWkjLAKQQg= +github.com/klauspost/compress v1.17.7/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -190,8 +190,8 @@ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWE github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= -github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag= -github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/pointerstructure v1.2.0 h1:O+i9nHnXS3l/9Wu7r4NrEdwA2VFTicjUEN1uBnDo34A= github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4= github.com/mmcloughlin/addchain v0.4.0 h1:SobOdjm2xLj1KkXN5/n0xTIWyZA2+s99UCY1iPfkHRY= @@ -227,12 +227,12 @@ github.com/prometheus/common v0.52.2 h1:LW8Vk7BccEdONfrJBDffQGRtpSzi5CQaRZGtboOO github.com/prometheus/common v0.52.2/go.mod h1:lrWtQx+iDfn2mbH5GUzlH9TSHyfZpHkSiG1W7y3sF2Q= github.com/prometheus/procfs v0.13.0 h1:GqzLlQyfsPbaEHaQkO7tbDlriv/4o5Hudv6OXHGKX7o= github.com/prometheus/procfs v0.13.0/go.mod h1:cd4PFCR54QLnGKPaKGA6l+cfuNXtht43ZKY6tow0Y1g= -github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= -github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= +github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= +github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= -github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= -github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= +github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= +github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.32.0 h1:keLypqrlIjaFsbmJOBdB/qvyF8KEtCWHwobLp5l/mQ0= github.com/rs/zerolog v1.32.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= @@ -254,8 +254,8 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/supranational/blst v0.3.11 h1:LyU6FolezeWAhvQk0k6O/d49jqgO52MSDDfYgbeoEm4= github.com/supranational/blst v0.3.11/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= -github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= -github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= +github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d h1:vfofYNRScrDdvS342BElfbETmL1Aiz3i2t0zfRj16Hs= +github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d/go.mod h1:RRCYJbIwD5jmqPI9XoAFR0OcDxqUctll6zUj/+B4S48= github.com/testcontainers/testcontainers-go v0.30.0 h1:jmn/XS22q4YRrcMwWg0pAwlClzs/abopbsBzrepyc4E= github.com/testcontainers/testcontainers-go v0.30.0/go.mod h1:K+kHNGiM5zjklKjgTtcrEetF3uhWbMUyqAQoyoh8Pf0= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= @@ -292,8 +292,8 @@ go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= -golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8kdjVDVAiFMtgUdTSRQ= -golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= +golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 h1:985EYyeCOxTpcgOTJpflJUwOeEz0CQOdPt73OzpE9F8= +golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI= golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= @@ -315,8 +315,8 @@ golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.20.0 h1:hz/CVckiOxybQvFw6h7b/q80NTr9IUQb4s1IIzW7KNY= golang.org/x/tools v0.20.0/go.mod h1:WvitBU7JJf6A4jOdg4S1tviW9bhUxkgeCui/0JHctQg= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240730163845-b1a4ccb954bf h1:liao9UHurZLtiEwBgT9LMOnKYsHze6eA6w1KQCMVN2Q= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240730163845-b1a4ccb954bf/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= google.golang.org/grpc v1.58.3 h1:BjnpXut1btbtgN/6sp+brB2Kbm2LjNXnidYujAVbSoQ= google.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= diff --git a/operator/merkle_tree/merkle_tree.go b/operator/merkle_tree/merkle_tree.go index de3a602d6..7c3c6b000 100644 --- a/operator/merkle_tree/merkle_tree.go +++ b/operator/merkle_tree/merkle_tree.go @@ -1,8 +1,8 @@ package merkle_tree /* -#cgo linux LDFLAGS: -L./lib -llibmerkle_tree -ldl -lrt -lm -lssl -lcrypto -Wl,--allow-multiple-definition -#cgo darwin LDFLAGS: -L./lib -llibmerkle_tree +#cgo linux LDFLAGS: ./lib/libmerkle_tree.a -ldl -lrt -lm -lssl -lcrypto -Wl,--allow-multiple-definition +#cgo darwin LDFLAGS: ./lib/libmerkle_tree.dylib #include "lib/merkle_tree.h" */ From 9597acade33f72ed31999177f34316bf42f43bb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Est=C3=A9fano=20Bargas?= Date: Tue, 20 Aug 2024 17:35:02 -0300 Subject: [PATCH 18/32] Revert "Change libmerkle_tree path" This reverts commit 5d0618c2e4c043b55e5c26b931e4b527bd59d258. --- operator/merkle_tree/merkle_tree.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/operator/merkle_tree/merkle_tree.go b/operator/merkle_tree/merkle_tree.go index 7c3c6b000..05921cf7f 100644 --- a/operator/merkle_tree/merkle_tree.go +++ b/operator/merkle_tree/merkle_tree.go @@ -1,8 +1,8 @@ package merkle_tree /* -#cgo linux LDFLAGS: ./lib/libmerkle_tree.a -ldl -lrt -lm -lssl -lcrypto -Wl,--allow-multiple-definition -#cgo darwin LDFLAGS: ./lib/libmerkle_tree.dylib +#cgo linux LDFLAGS: ${SRCDIR}/lib/libmerkle_tree.a -ldl -lrt -lm -lssl -lcrypto -Wl,--allow-multiple-definition +#cgo darwin LDFLAGS: ${SRCDIR}/lib/libmerkle_tree.dylib #include "lib/merkle_tree.h" */ From a9577df56ce45731b326f57128a0f7ea3e46b298 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Est=C3=A9fano=20Bargas?= Date: Tue, 20 Aug 2024 17:39:44 -0300 Subject: [PATCH 19/32] Add mina_account operator import, fix test module name --- go.sum | 32 +++++++++++----------- operator/mina_account/mina_account_test.go | 2 +- operator/pkg/operator.go | 3 +- 3 files changed, 19 insertions(+), 18 deletions(-) diff --git a/go.sum b/go.sum index df3d76697..f3434f87d 100644 --- a/go.sum +++ b/go.sum @@ -2,8 +2,8 @@ dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= -github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= -github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= +github.com/DataDog/zstd v1.4.5 h1:EndNeuB0l9syBZhut0wns3gV1hL8zX8LIu6ZiVHWLIQ= +github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/Microsoft/hcsshim v0.11.4 h1:68vKo2VN8DE9AdN4tnkWnmdhqdbpUFM8OF3Airm7fz8= @@ -166,8 +166,8 @@ github.com/ingonyama-zk/iciclegnark v0.1.0 h1:88MkEghzjQBMjrYRJFxZ9oR9CTIpB8NG2z github.com/ingonyama-zk/iciclegnark v0.1.0/go.mod h1:wz6+IpyHKs6UhMMoQpNqz1VY+ddfKqC/gRwR/64W6WU= github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus= github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= -github.com/klauspost/compress v1.17.7 h1:ehO88t2UGzQK66LMdE8tibEd1ErmzZjNEqWkjLAKQQg= -github.com/klauspost/compress v1.17.7/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= +github.com/klauspost/compress v1.16.0 h1:iULayQNOReoYUe+1qtKOqw9CwJv3aNQu8ivo7lw1HU4= +github.com/klauspost/compress v1.16.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -190,8 +190,8 @@ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWE github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= -github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= -github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag= +github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/pointerstructure v1.2.0 h1:O+i9nHnXS3l/9Wu7r4NrEdwA2VFTicjUEN1uBnDo34A= github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4= github.com/mmcloughlin/addchain v0.4.0 h1:SobOdjm2xLj1KkXN5/n0xTIWyZA2+s99UCY1iPfkHRY= @@ -227,12 +227,12 @@ github.com/prometheus/common v0.52.2 h1:LW8Vk7BccEdONfrJBDffQGRtpSzi5CQaRZGtboOO github.com/prometheus/common v0.52.2/go.mod h1:lrWtQx+iDfn2mbH5GUzlH9TSHyfZpHkSiG1W7y3sF2Q= github.com/prometheus/procfs v0.13.0 h1:GqzLlQyfsPbaEHaQkO7tbDlriv/4o5Hudv6OXHGKX7o= github.com/prometheus/procfs v0.13.0/go.mod h1:cd4PFCR54QLnGKPaKGA6l+cfuNXtht43ZKY6tow0Y1g= -github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= -github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= +github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= +github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= -github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= -github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= +github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.32.0 h1:keLypqrlIjaFsbmJOBdB/qvyF8KEtCWHwobLp5l/mQ0= github.com/rs/zerolog v1.32.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= @@ -254,8 +254,8 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/supranational/blst v0.3.11 h1:LyU6FolezeWAhvQk0k6O/d49jqgO52MSDDfYgbeoEm4= github.com/supranational/blst v0.3.11/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= -github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d h1:vfofYNRScrDdvS342BElfbETmL1Aiz3i2t0zfRj16Hs= -github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d/go.mod h1:RRCYJbIwD5jmqPI9XoAFR0OcDxqUctll6zUj/+B4S48= +github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= +github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= github.com/testcontainers/testcontainers-go v0.30.0 h1:jmn/XS22q4YRrcMwWg0pAwlClzs/abopbsBzrepyc4E= github.com/testcontainers/testcontainers-go v0.30.0/go.mod h1:K+kHNGiM5zjklKjgTtcrEetF3uhWbMUyqAQoyoh8Pf0= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= @@ -292,8 +292,8 @@ go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= -golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 h1:985EYyeCOxTpcgOTJpflJUwOeEz0CQOdPt73OzpE9F8= -golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI= +golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8kdjVDVAiFMtgUdTSRQ= +golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= @@ -315,8 +315,8 @@ golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.20.0 h1:hz/CVckiOxybQvFw6h7b/q80NTr9IUQb4s1IIzW7KNY= golang.org/x/tools v0.20.0/go.mod h1:WvitBU7JJf6A4jOdg4S1tviW9bhUxkgeCui/0JHctQg= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240730163845-b1a4ccb954bf h1:liao9UHurZLtiEwBgT9LMOnKYsHze6eA6w1KQCMVN2Q= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240730163845-b1a4ccb954bf/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= google.golang.org/grpc v1.58.3 h1:BjnpXut1btbtgN/6sp+brB2Kbm2LjNXnidYujAVbSoQ= google.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= diff --git a/operator/mina_account/mina_account_test.go b/operator/mina_account/mina_account_test.go index e4692b51a..e35d95962 100644 --- a/operator/mina_account/mina_account_test.go +++ b/operator/mina_account/mina_account_test.go @@ -1,4 +1,4 @@ -package mina_test +package mina_account_test import ( "fmt" diff --git a/operator/pkg/operator.go b/operator/pkg/operator.go index 895e60c9f..d494bc2ba 100644 --- a/operator/pkg/operator.go +++ b/operator/pkg/operator.go @@ -12,6 +12,7 @@ import ( "github.com/ethereum/go-ethereum/crypto" "github.com/yetanotherco/aligned_layer/operator/mina" + "github.com/yetanotherco/aligned_layer/operator/mina_account" "github.com/yetanotherco/aligned_layer/operator/risc_zero" "github.com/prometheus/client_golang/prometheus" @@ -375,7 +376,7 @@ func (o *Operator) verify(verificationData VerificationData, results chan bool) pubInputBuffer := make([]byte, mina.MAX_PUB_INPUT_SIZE) copy(pubInputBuffer, verificationData.PubInput) - verificationResult := mina.VerifyAccountInclusion(([mina.MAX_PROOF_SIZE]byte)(proofBuffer), proofLen, ([mina.MAX_PUB_INPUT_SIZE]byte)(pubInputBuffer), (uint)(pubInputLen)) + verificationResult := mina_account.VerifyAccountInclusion(([mina.MAX_PROOF_SIZE]byte)(proofBuffer), proofLen, ([mina.MAX_PUB_INPUT_SIZE]byte)(pubInputBuffer), (uint)(pubInputLen)) o.Logger.Infof("Mina account inclusion proof verification result: %t", verificationResult) results <- verificationResult default: From 3b36365aee6a3c2f1cee94eed9eaf039e3bf2788 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Est=C3=A9fano=20Bargas?= Date: Wed, 21 Aug 2024 11:02:55 -0300 Subject: [PATCH 20/32] Temporal fix for internal package import --- aggregator/cmd/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aggregator/cmd/main.go b/aggregator/cmd/main.go index 608d93e44..ccb3184fb 100644 --- a/aggregator/cmd/main.go +++ b/aggregator/cmd/main.go @@ -7,7 +7,7 @@ import ( "os" "github.com/urfave/cli/v2" - "github.com/yetanotherco/aligned_layer/aggregator/internal/pkg" + "github.com/lambdaclass/aligned_layer/aggregator/internal/pkg" "github.com/yetanotherco/aligned_layer/core/config" ) From b4476386036de3306ba1cc24a70adcac7768afe3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Est=C3=A9fano=20Bargas?= Date: Wed, 21 Aug 2024 11:23:35 -0300 Subject: [PATCH 21/32] Fix merkle proof deserialization --- operator/mina_account/lib/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/operator/mina_account/lib/src/lib.rs b/operator/mina_account/lib/src/lib.rs index 2c7aab76c..1e39a2ded 100644 --- a/operator/mina_account/lib/src/lib.rs +++ b/operator/mina_account/lib/src/lib.rs @@ -77,7 +77,7 @@ pub fn parse_proof(proof_bytes: &[u8]) -> Result, String> { let left_or_right = bytes .first() .ok_or("left_or_right byte not found".to_string())?; - let hash = Fp::from_bytes(bytes).map_err(|err| { + let hash = Fp::from_bytes(&bytes[1..]).map_err(|err| { format!("Failed to convert merkle hash into field element: {err}") })?; match left_or_right { From ce8a2067412ff7b7132ff3c7b225bd81783b4bdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Est=C3=A9fano=20Bargas?= Date: Wed, 21 Aug 2024 11:25:45 -0300 Subject: [PATCH 22/32] Added clarifying comment --- aggregator/cmd/main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/aggregator/cmd/main.go b/aggregator/cmd/main.go index ccb3184fb..abeead972 100644 --- a/aggregator/cmd/main.go +++ b/aggregator/cmd/main.go @@ -7,7 +7,9 @@ import ( "os" "github.com/urfave/cli/v2" - "github.com/lambdaclass/aligned_layer/aggregator/internal/pkg" + // TODO(xqft): used lambdaclass below as a temporary solution, can't + // import the internal package when in presence of a replace directive. + "github.com/lambdaclass/aligned_layer/aggregator/internal/pkg" "github.com/yetanotherco/aligned_layer/core/config" ) From 38755a24b704b7d22a4bef7313ba72b3cf7cfb3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Est=C3=A9fano=20Bargas?= Date: Wed, 21 Aug 2024 12:19:15 -0300 Subject: [PATCH 23/32] Added candidate ledger hash to state proof pub inputs --- operator/mina/lib/src/lib.rs | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/operator/mina/lib/src/lib.rs b/operator/mina/lib/src/lib.rs index 1ef87cdfe..ccaa32f5d 100644 --- a/operator/mina/lib/src/lib.rs +++ b/operator/mina/lib/src/lib.rs @@ -43,7 +43,7 @@ pub extern "C" fn verify_protocol_state_proof_ffi( } }; - let (candidate_hash, tip_hash, candidate_state, tip_state) = + let (candidate_ledger_hash, candidate_hash, tip_hash, candidate_state, tip_state) = match parse_pub_inputs(&public_input_bytes[..public_input_len]) { Ok(protocol_state_pub) => protocol_state_pub, Err(err) => { @@ -52,11 +52,33 @@ pub extern "C" fn verify_protocol_state_proof_ffi( } }; + let expected_candidate_ledger_hash = match candidate_state + .body + .blockchain_state + .staged_ledger_hash + .non_snark + .ledger_hash + .to_fp() + { + Ok(hash) => hash, + Err(err) => { + eprintln!("Failed to parse candidate ledger hash: {}", err); + return false; + } + }; + + // TODO(xqft): this can be a batcher's pre-verification check (but don't remove it from here) + if candidate_ledger_hash != expected_candidate_ledger_hash { + eprintln!("Candidate ledger hash on public inputs doesn't match the encoded state's one"); + return false; + } + // TODO(xqft): this can be a batcher's pre-verification check (but don't remove it from here) if MinaHash::hash(&tip_state) != tip_hash { eprintln!("The tip's protocol state doesn't match the hash provided as public input"); return false; } + // TODO(xqft): this can be a batcher's pre-verification check (but don't remove it from here) if MinaHash::hash(&candidate_state) != candidate_hash { eprintln!("The candidate's protocol state doesn't match the hash provided as public input"); return false; @@ -127,6 +149,7 @@ pub fn parse_pub_inputs( pub_inputs: &[u8], ) -> Result< ( + Fp, Fp, Fp, MinaStateProtocolStateValueStableV2, @@ -136,13 +159,21 @@ pub fn parse_pub_inputs( > { let mut offset = 0; + let candidate_ledger_hash = parse_hash(pub_inputs, &mut offset)?; + let candidate_hash = parse_hash(pub_inputs, &mut offset)?; let tip_hash = parse_hash(pub_inputs, &mut offset)?; let candidate_state = parse_state(pub_inputs, &mut offset)?; let tip_state = parse_state(pub_inputs, &mut offset)?; - Ok((candidate_hash, tip_hash, candidate_state, tip_state)) + Ok(( + candidate_ledger_hash, + candidate_hash, + tip_hash, + candidate_state, + tip_state, + )) } pub fn parse_proof(proof_bytes: &[u8]) -> Result { From 3f7dbd195327c239347108cb4dcd5aead7a80282 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Est=C3=A9fano=20Bargas?= Date: Wed, 21 Aug 2024 15:13:46 -0300 Subject: [PATCH 24/32] Fix proof prechecks --- batcher/aligned-batcher/src/mina/mod.rs | 3 ++- .../test_files/mina/protocol_state.proof | 2 +- .../test_files/mina/protocol_state.pub | Bin 4184 -> 4224 bytes 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/batcher/aligned-batcher/src/mina/mod.rs b/batcher/aligned-batcher/src/mina/mod.rs index d9329a9f8..acae21d83 100644 --- a/batcher/aligned-batcher/src/mina/mod.rs +++ b/batcher/aligned-batcher/src/mina/mod.rs @@ -60,7 +60,8 @@ pub fn check_state(pub_inputs: &[u8], offset: &mut usize) -> Result<(), String> pub fn check_pub_inputs(pub_inputs: &[u8]) -> Result<(), String> { let mut offset = 0; - check_hash(pub_inputs, &mut offset)?; // candidate hash + check_hash(pub_inputs, &mut offset)?; // candidate ledger hash + check_hash(pub_inputs, &mut offset)?; // candidate state hash check_hash(pub_inputs, &mut offset)?; // tip hash check_state(pub_inputs, &mut offset)?; // candidate state diff --git a/batcher/aligned/test_files/mina/protocol_state.proof b/batcher/aligned/test_files/mina/protocol_state.proof index b6cb9a77e..c8ad39179 100644 --- a/batcher/aligned/test_files/mina/protocol_state.proof +++ b/batcher/aligned/test_files/mina/protocol_state.proof @@ -1 +1 @@ -_Lv7VSktF9BO_CBCP0MdA43bAPzWnmS_blpEs_wn-Po60UA6LAD8OnQM1iQrN1v8JCJKxPop0CIA_DxsfKp1tzSL_FqAvS4JuRZuAAAAAAAAAAAAAPzDAMf31ltx0fylD3Ya_pCJ3QD88PGgK6udrf384tCnM7e-QUcA_G4G13VT-oR-_Ogdi609yUCzAPxw__6U-pfTJ_x6hf1Qnz38DQD83SZkbZJS8dX8rG9VU4SPq4oA_O-Hc7EGIBXY_NqlvsSvClcLAPxDdvMnN5aEO_ymd6MLZtErDAD88zxqWOpBX078zle6PirPZCEA_DO6I51iogYg_Fvbo4ltj-J2APzUFgmtlpTCtPxbWO0Yo3h6aAD8HYRxK3HR_Vn8WBYWKPOGrN8A_DpfDdDuHRBI_M1Ol-TDaaGlAPwqKVxpIaKuV_zlSVj4aXIfFQD80sGCFJ49ktH80BxelE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_6322NODofUZuCMrXXtOaM06eiMmBcIBUz8bWdkMEimDm9Nu5BltYbKc0NfM2t8VE_Lbu5AaTvXKJYBlNBFGvhkRH0b5baAeT4qQh4Yh_NnW5RuAjTi7DS8_kgGoeIJYsyfsvbYDnaFcY_CUzSY1oMJLrlsFurFeVwY= \ No newline at end of file diff --git a/batcher/aligned/test_files/mina/protocol_state.pub b/batcher/aligned/test_files/mina/protocol_state.pub index 939ad9bf0d6e45ac388685b5a22a584030d97162..1fb6d8b915720986dcc2d1876b34f6803eae520e 100644 GIT binary patch literal 4224 zcmd_tISBMv9RTnTD?u$}MX>RxBP5xbT!monWRgsh$(=@WPwxA~PQ*e`OF^(!aAmDT zaQm&~gRLwStaZ21de`~ZLah9@5q5o5ityf__doK>SM{Gf{_>so{`xj?fBA=>{qaX1 z{N}}*ZuidnKYkPXyZynAfA1UnufP2c9lr;C;ln>e_OIUk(=WdCm7o9ZGjANf{Nc;D zlsERT{jU1K+b>b8f9nPR{V#v>AHP5U^ozfJ|3mh3%e&uwul@Rq7oYw7u)?iN=CA_j zzHV!d0AjMTbT|GOWH)IJvd7qBQ4RMfX`FF&_j2lWg9^rVxr^{D&44xA)}rVet6rwz zaPx@0-I06A7Y`RW4~tnDkb;IM4+BP>o*aP@u@;yV?dE_@c@eogAO~aRQGTu*A`^QZ zA0x)n6mfYaL+=ut%6=gLM@0&e@u0^>zWUrHJ4;wi4IfAdU+!{!Sfi$+r@DJq|pixw;?{ zJmek(qXU{`C1$<&IBPg~G$MGH7>_J8h{m#Gu~`R|5%lWax1tPpLeJ?o z7b5Tg)u64u=xw}z>%4-7j+o49$!tz8UEGE&`%=mip(YcU0uT>BK2 zk)N=|KI3I?(*5SPK{gUdo$&Ib*t3j(K*nqWe8WodD9QorJo=C(-F+Ioi|(Ae-hiz% z1+|DcAJW1Itbp;*h=>JKRf~AJ!7f|qf{Al@9BF=ft*C@h;C5=*EI$X`ZS@oVR8E1k z5AD*l)kEOb`y#`%DCJ^&fEteM8f0W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u, 22 Aug 2024 16:50:59 -0300 Subject: [PATCH 25/32] Add support for account_id_hash --- operator/mina_account/lib/Cargo.lock | 1 + operator/mina_account/lib/Cargo.toml | 1 + operator/mina_account/lib/src/lib.rs | 49 ++++++++++++++++++++-------- 3 files changed, 38 insertions(+), 13 deletions(-) diff --git a/operator/mina_account/lib/Cargo.lock b/operator/mina_account/lib/Cargo.lock index ff6be75f0..53ebdb14f 100644 --- a/operator/mina_account/lib/Cargo.lock +++ b/operator/mina_account/lib/Cargo.lock @@ -1053,6 +1053,7 @@ dependencies = [ "rmp-serde", "serde", "serde_json", + "sha3", ] [[package]] diff --git a/operator/mina_account/lib/Cargo.toml b/operator/mina_account/lib/Cargo.toml index d58843d48..3afe0ed17 100644 --- a/operator/mina_account/lib/Cargo.toml +++ b/operator/mina_account/lib/Cargo.toml @@ -26,6 +26,7 @@ bs58 = "0.5.1" lazy_static = "1.5.0" blake2 = "0.10.6" once_cell = "1.19.0" +sha3 = "0.10.8" [patch.crates-io] ark-ff = { git = "https://github.com/openmina/algebra", branch = "openmina" } diff --git a/operator/mina_account/lib/src/lib.rs b/operator/mina_account/lib/src/lib.rs index 1e39a2ded..eca07954e 100644 --- a/operator/mina_account/lib/src/lib.rs +++ b/operator/mina_account/lib/src/lib.rs @@ -8,7 +8,8 @@ mod merkle_verifier; // TODO(xqft): check sizes const MAX_PROOF_SIZE: usize = 16 * 1024; const MAX_PUB_INPUT_SIZE: usize = 6 * 1024; -const HASH_SIZE: usize = 32; +const MINA_HASH_SIZE: usize = 32; +const KECCAK_HASH_SIZE: usize = 32; #[no_mangle] pub extern "C" fn verify_account_inclusion_ffi( @@ -22,7 +23,7 @@ pub extern "C" fn verify_account_inclusion_ffi( // and validated in this verifier. A smart contract could implement Poseidon // and hash the data itself but it's prohibitively expensive. - let (merkle_root, account_hash) = + let (merkle_root, account_hash, _account_id_hash) = match parse_pub_inputs(&public_input_bytes[..public_input_len]) { Ok(pub_inputs) => pub_inputs, Err(err) => { @@ -39,36 +40,58 @@ pub extern "C" fn verify_account_inclusion_ffi( } }; + // TODO(xqft): when the needed account GraphQL query is done, do: + // 1. send encoded account as part of the proof + // 2. define account_id from encoded account. + // 2. assert keccak256(account_id) == account_id_hash + verify_merkle_proof(account_hash, merkle_proof, merkle_root) } -pub fn parse_hash(pub_inputs: &[u8], offset: &mut usize) -> Result { +fn parse_mina_hash(pub_inputs: &[u8], offset: &mut usize) -> Result { let hash = pub_inputs - .get(*offset..*offset + HASH_SIZE) - .ok_or("Failed to slice candidate hash".to_string()) + .get(*offset..*offset + MINA_HASH_SIZE) + .ok_or("Failed to slice Mina hash".to_string()) .and_then(|bytes| Fp::from_bytes(bytes).map_err(|err| err.to_string()))?; - *offset += HASH_SIZE; + *offset += MINA_HASH_SIZE; + + Ok(hash) +} + +fn parse_keccak256_hash( + pub_inputs: &[u8], + offset: &mut usize, +) -> Result<[u8; KECCAK_HASH_SIZE], String> { + let mut hash = [0; KECCAK_HASH_SIZE]; + hash.copy_from_slice( + pub_inputs + .get(*offset..*offset + KECCAK_HASH_SIZE) + .ok_or("Failed to slice keccak hash".to_string())?, + ); + + *offset += KECCAK_HASH_SIZE; Ok(hash) } -pub fn parse_pub_inputs(pub_inputs: &[u8]) -> Result<(Fp, Fp), String> { +fn parse_pub_inputs(pub_inputs: &[u8]) -> Result<(Fp, Fp, [u8; KECCAK_HASH_SIZE]), String> { let mut offset = 0; - let merkle_root = parse_hash(pub_inputs, &mut offset)?; - let account_hash = parse_hash(pub_inputs, &mut offset)?; + let merkle_root = parse_mina_hash(pub_inputs, &mut offset)?; + let account_hash = parse_mina_hash(pub_inputs, &mut offset)?; + let account_id_hash = parse_keccak256_hash(&pub_inputs, &mut offset)?; - Ok((merkle_root, account_hash)) + Ok((merkle_root, account_hash, account_id_hash)) } -pub fn parse_proof(proof_bytes: &[u8]) -> Result, String> { - let merkle_path_bytes = proof_bytes.chunks_exact(HASH_SIZE + 1); +fn parse_proof(proof_bytes: &[u8]) -> Result, String> { + let merkle_path_bytes = proof_bytes.chunks_exact(MINA_HASH_SIZE + 1); if !merkle_path_bytes.remainder().is_empty() { return Err(format!( "Merkle path bytes not a multiple of HASH_SIZE + 1 ({})", - HASH_SIZE + 1 + MINA_HASH_SIZE + 1 )); } From 141356b5f7b6d9daac419121d96fb51649621623 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Est=C3=A9fano=20Bargas?= Date: Thu, 22 Aug 2024 17:24:27 -0300 Subject: [PATCH 26/32] Added verify merkle test --- .../mina_account/lib/src/merkle_verifier.rs | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/operator/mina_account/lib/src/merkle_verifier.rs b/operator/mina_account/lib/src/merkle_verifier.rs index dbf1d72ba..d5f6ca13b 100644 --- a/operator/mina_account/lib/src/merkle_verifier.rs +++ b/operator/mina_account/lib/src/merkle_verifier.rs @@ -23,14 +23,29 @@ pub fn verify_merkle_proof(merkle_leaf: Fp, merkle_path: Vec, merkle hash_with_kimchi(param.as_str(), &hashes) }); - calculated_root == merkle_root } #[cfg(test)] mod test { + use ark_serialize::CanonicalDeserialize; + + use super::*; + #[test] fn test_verify_merkle_proof() { - todo!(); + let merkle_leaf = Fp::from(0); + let merkle_path = vec![ + MerklePath::Left(Fp::from(0)), + MerklePath::Right(Fp::from(0)), + ]; + let merkle_root = Fp::deserialize( + &[ + 140u8, 130, 39, 24, 215, 108, 36, 34, 181, 80, 10, 131, 110, 152, 243, 145, 144, + 175, 100, 161, 62, 28, 236, 143, 184, 143, 185, 114, 129, 4, 63, 47, + ][..], + ) + .unwrap(); + assert!(verify_merkle_proof(merkle_leaf, merkle_path, merkle_root)) } } From 1e6a45727581a298d69c7ee0e3cfd997945d185a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Est=C3=A9fano=20Bargas?= Date: Thu, 22 Aug 2024 17:25:49 -0300 Subject: [PATCH 27/32] Fix go binding test --- ...TCmBJRW9GzvTJK443DPx2YbqcyoLc56g1ny9.proof | Bin 1155 -> 1155 bytes ...73TCmBJRW9GzvTJK443DPx2YbqcyoLc56g1ny9.pub | 2 +- operator/mina_account/mina_account_test.go | 6 +++--- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/batcher/aligned/test_files/mina/account_B62qrQKS9ghd91shs73TCmBJRW9GzvTJK443DPx2YbqcyoLc56g1ny9.proof b/batcher/aligned/test_files/mina/account_B62qrQKS9ghd91shs73TCmBJRW9GzvTJK443DPx2YbqcyoLc56g1ny9.proof index 7d80710ebd59f2d5dec17ef4c5a6aae5d1de6ef0..7b38edac7c20a06c34b3f0d4bbf9dc4347a179f9 100644 GIT binary patch delta 512 zcmV+b0{{Jk34;lcLqWVi)E<(la(Qvx9@Q7SkEpMVrQ)Z%9|)%lWY9K8Q6T`50RmaK z;@2p+fhj&Y;6oAPLr$?c+b*B=3kKY%x2*z^gd%@hYL9J0pzNjc>f;6Wi57-_*dSp$ z@HU3gn3FUFO{y^gfAz9NT|+4S7))8{T%tJw6zJbRue*3(so6=MaN}tz0RPz8pl)xV zTc&@A*sN0lCBxx7JLnh320N8)z0sV}Gy!i}?1m`ng$P6#^^n&w1?W9iyCM>2j-J!w z-GqNaw>>-obP_Cy`JG-|X%yBHT9uz}w8{OLDLu6R3~Y3Q2?S9R0eR`XDd%YkxAvr5 zmEfmr%K;@aPW%q6gqeYX)T|>GF9CYF)&nQsZ^25ovG?8)YGGa_Cjtq&a4FO zVFm#OA&K0OCrga7dTOMPb}d#G>(5E7rWB`NAP4c0BUe)mRhTY#01qN;F<_1 z`TgNrI|Hqn)U-4_67 zT%f_tLl!BHb*dBl!&k?`0T00!w^F*`PvuZAJKYfg66(*v%LMc(S&L0UBOjgpEc7o9 zFXR&*CA()=nuvnvIRVL}1%iW1;nZVHY%+)4iCi??bc-OStR+InTM8rz{syyB0x<$@ C;_XZT delta 512 zcmV+b0{{Jk34;lcLqV6%Zd_+Rx-K!OvRCmYKM*5_%!~=4Bs_^mXgMWu6)yn%5Y!+k zY7NAwmDohSWl9mrtDpkC#<&r?=w5OR0&S2{++aTzm)vDG0m0rnZjq^Q4-{q7 zBy%0+!Ig5I%sqk`x&Yi)SiD;X9sw!o)MK7c26D%uR**4IxSZ38D46TK$RwA0Dz%*_ z#2x`#K}_Na*}GQ2!#C$~)3@p6QdFTFgyw%ib!4Y4{2VJb09xa}Gylw?h$vORB3aIZ z&U0;0^uyhSmHCf%y}9gk4FD=vS4P%wY53$s6B?t~SiyS@ Date: Thu, 22 Aug 2024 17:26:03 -0300 Subject: [PATCH 28/32] Remove unused test module --- operator/mina_account/lib/src/lib.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/operator/mina_account/lib/src/lib.rs b/operator/mina_account/lib/src/lib.rs index eca07954e..75df8317e 100644 --- a/operator/mina_account/lib/src/lib.rs +++ b/operator/mina_account/lib/src/lib.rs @@ -111,6 +111,3 @@ fn parse_proof(proof_bytes: &[u8]) -> Result, String> { }) .collect() } - -#[cfg(test)] -mod test {} From 2ca07abb9fa46a8cfb2d62ec076c30b6f7f5cf4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Est=C3=A9fano=20Bargas?= Date: Fri, 23 Aug 2024 12:19:32 -0300 Subject: [PATCH 29/32] Fix CI --- .github/workflows/build-go.yml | 2 ++ operator/mina_account/lib/src/lib.rs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-go.yml b/.github/workflows/build-go.yml index 420a54847..791d99641 100644 --- a/.github/workflows/build-go.yml +++ b/.github/workflows/build-go.yml @@ -30,6 +30,8 @@ jobs: run: make build_merkle_tree_linux - name: Build Mina bindings run: make build_mina_linux + - name: Build Mina Account bindings + run: make build_mina_account_linux - name: Build operator run: go build operator/cmd/main.go - name: Build aggregator diff --git a/operator/mina_account/lib/src/lib.rs b/operator/mina_account/lib/src/lib.rs index 75df8317e..0f4d99934 100644 --- a/operator/mina_account/lib/src/lib.rs +++ b/operator/mina_account/lib/src/lib.rs @@ -80,7 +80,7 @@ fn parse_pub_inputs(pub_inputs: &[u8]) -> Result<(Fp, Fp, [u8; KECCAK_HASH_SIZE] let merkle_root = parse_mina_hash(pub_inputs, &mut offset)?; let account_hash = parse_mina_hash(pub_inputs, &mut offset)?; - let account_id_hash = parse_keccak256_hash(&pub_inputs, &mut offset)?; + let account_id_hash = parse_keccak256_hash(pub_inputs, &mut offset)?; Ok((merkle_root, account_hash, account_id_hash)) } From c3c7b84d509cf4f0081d37d6c3de2a7b3bbd4952 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Est=C3=A9fano=20Bargas?= Date: Mon, 26 Aug 2024 11:26:22 -0300 Subject: [PATCH 30/32] Update Makefile Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 02d622061..cc4c76767 100644 --- a/Makefile +++ b/Makefile @@ -689,7 +689,7 @@ build_all_ffi_linux: ## Build all FFIs for Linux @$(MAKE) build_merkle_tree_linux @$(MAKE) build_halo2_ipa_linux @$(MAKE) build_halo2_kzg_linux - @$(MAKE) build_mina_linxu + @$(MAKE) build_mina_linux @$(MAKE) build_mina_account_linux @echo "All Linux FFIs built successfully." From 4bd61407251b57e9916f72392c797feb3bfe3eb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Est=C3=A9fano=20Bargas?= Date: Mon, 26 Aug 2024 11:27:18 -0300 Subject: [PATCH 31/32] Update operator/mina_account/lib/src/lib.rs Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> --- operator/mina_account/lib/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/operator/mina_account/lib/src/lib.rs b/operator/mina_account/lib/src/lib.rs index 0f4d99934..10c1955a5 100644 --- a/operator/mina_account/lib/src/lib.rs +++ b/operator/mina_account/lib/src/lib.rs @@ -43,7 +43,7 @@ pub extern "C" fn verify_account_inclusion_ffi( // TODO(xqft): when the needed account GraphQL query is done, do: // 1. send encoded account as part of the proof // 2. define account_id from encoded account. - // 2. assert keccak256(account_id) == account_id_hash + // 3. assert keccak256(account_id) == account_id_hash verify_merkle_proof(account_hash, merkle_proof, merkle_root) } From 06bc10c8ad218e0e8df3ec98b69e6c59e188133a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Est=C3=A9fano=20Bargas?= Date: Mon, 26 Aug 2024 11:27:55 -0300 Subject: [PATCH 32/32] Update .env.dev --- batcher/aligned-batcher/.env.dev | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/batcher/aligned-batcher/.env.dev b/batcher/aligned-batcher/.env.dev index 8a36d83eb..dbfb12046 100644 --- a/batcher/aligned-batcher/.env.dev +++ b/batcher/aligned-batcher/.env.dev @@ -2,7 +2,7 @@ AWS_SECRET_ACCESS_KEY=test AWS_REGION=us-east-2 AWS_ACCESS_KEY_ID=test AWS_BUCKET_NAME=aligned.storage -STORAGE_ENDPOINT="https://mina-bridge.s3.us-west-2.amazonaws.com" +STORAGE_ENDPOINT=http://localhost:4566/aligned.storage LOCALSTACK_ENDPOINT_URL=http://localhost:4566 RUST_LOG=info RUST_BACKTRACE=1