diff --git a/.github/workflows/on_pull_request.yml b/.github/workflows/on_pull_request.yml index 0ebddcb..0c9afaa 100644 --- a/.github/workflows/on_pull_request.yml +++ b/.github/workflows/on_pull_request.yml @@ -5,6 +5,7 @@ on: branches: - master + # TODO: beefy machine for tests jobs: lint: name: "Lint" @@ -32,5 +33,18 @@ jobs: - name: "Install cargo-nextest" run: cargo install cargo-nextest - name: "Run tests" - run: cargo nextest run --workspace --locked + run: cargo nextest run --workspace --locked --no-default-features + test-beefy-proofs: + name: "Test Beefy Proofs" + runs-on: + group: beefygroup + steps: + - name: Checkout + uses: actions/checkout@v3 + - uses: actions-rust-lang/setup-rust-toolchain@v1 + - uses: Swatinem/rust-cache@v2 + - name: "Install cargo-nextest" + run: cargo install cargo-nextest + - name: "Run tests" + run: cargo nextest run --workspace --locked --no-default-features diff --git a/.gitignore b/.gitignore index 6728bca..e14e618 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ **/target /vendor +/build/* .direnv diff --git a/Cargo.lock b/Cargo.lock index a4c0126..f8527a3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -21,7 +21,7 @@ dependencies = [ "actix-macros", "actix-rt", "actix_derive", - "bitflags 2.4.1", + "bitflags 2.4.2", "bytes", "crossbeam-channel", "futures-core", @@ -185,9 +185,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.5" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d664a92ecae85fd0a7392615844904654d1d5f5514837f471ddef4a057aba1b6" +checksum = "6e2e1ebcb11de5c03c67de28a7df593d32191b44939c482e97702baaaa6ab6a5" dependencies = [ "anstyle", "anstyle-parse", @@ -287,9 +287,9 @@ checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" [[package]] name = "async-compression" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc2d0cfb2a7388d34f590e76686704c494ed7aaceed62ee1ba35cbf363abc2a5" +checksum = "a116f46a969224200a0a97f29cfd4c50e7534e4b4826bd23ea2c3c533039c82c" dependencies = [ "brotli", "flate2", @@ -406,12 +406,12 @@ dependencies = [ [[package]] name = "axum" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d09dbe0e490df5da9d69b36dca48a76635288a82f92eca90024883a56202026d" +checksum = "1236b4b292f6c4d6dc34604bb5120d85c3fe1d1aa596bd5cc52ca054d13e7b9e" dependencies = [ "async-trait", - "axum-core 0.4.2", + "axum-core 0.4.3", "bytes", "futures-util", "http 1.0.0", @@ -457,9 +457,9 @@ dependencies = [ [[package]] name = "axum-core" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e87c8503f93e6d144ee5690907ba22db7ba79ab001a932ab99034f0fe836b3df" +checksum = "a15c63fd72d41492dc4f497196f5da1fb04fb7529e631d73630d1b491e47a2e3" dependencies = [ "async-trait", "bytes", @@ -505,9 +505,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.6" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c79fed4cdb43e993fcdadc7e58a09fd0e3e649c4436fa11da71c9f1f3ee7feb9" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] name = "base64ct" @@ -553,9 +553,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.1" +version = "2.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" [[package]] name = "bitvec" @@ -616,11 +616,11 @@ dependencies = [ [[package]] name = "borsh" -version = "1.3.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d4d6dafc1a3bb54687538972158f07b2c948bc57d5890df22c0739098b3028" +checksum = "f58b559fd6448c6e2fd0adb5720cd98a2506594cafa4737ff98c396f3e82f667" dependencies = [ - "borsh-derive 1.3.0", + "borsh-derive 1.3.1", "cfg_aliases", ] @@ -639,12 +639,12 @@ dependencies = [ [[package]] name = "borsh-derive" -version = "1.3.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4918709cc4dd777ad2b6303ed03cb37f3ca0ccede8c1b0d28ac6db8f4710e0" +checksum = "7aadb5b6ccbd078890f6d7003694e33816e6b784358f18e15e7e6d9f065a57cd" dependencies = [ "once_cell", - "proc-macro-crate 2.0.0", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", "syn 2.0.48", @@ -895,9 +895,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.14" +version = "4.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33e92c5c1a78c62968ec57dbc2440366a2d6e5a23faf829970ff1585dc6b18e2" +checksum = "1e578d6ec4194633722ccf9544794b71b1385c3c027efe0c55db226fc880865c" dependencies = [ "clap_builder", "clap_derive", @@ -905,9 +905,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.14" +version = "4.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4323769dc8a61e2c39ad7dc26f6f2800524691a44d74fe3d1071a5c24db6370" +checksum = "4df4df40ec50c46000231c914968278b1eb05098cf8f1b3a518a95030e71d1c7" dependencies = [ "anstream", "anstyle", @@ -944,9 +944,9 @@ dependencies = [ [[package]] name = "coerce" -version = "0.8.10" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba30a4bf4bebf9112b9f42124de78b0e5dccad05c86181072663c7d8567aedec" +checksum = "3311405ed7a9b541faddd4e2de71cfa908e5558658d504f7954d2aee684b96a6" dependencies = [ "anyhow", "async-trait", @@ -974,7 +974,7 @@ dependencies = [ "tracing", "utoipa", "utoipa-swagger-ui", - "uuid 1.6.1", + "uuid 1.7.0", "valuable", ] @@ -1016,7 +1016,7 @@ version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5286a0843c21f8367f7be734f89df9b822e0321d8bcce8d6e735aadff7d74979" dependencies = [ - "base64 0.21.6", + "base64 0.21.7", "bech32", "bs58 0.5.0", "digest 0.10.7", @@ -1432,6 +1432,19 @@ dependencies = [ "syn 2.0.48", ] +[[package]] +name = "dashmap" +version = "5.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" +dependencies = [ + "cfg-if 1.0.0", + "hashbrown 0.14.3", + "lock_api 0.4.11", + "once_cell", + "parking_lot_core 0.9.9", +] + [[package]] name = "data-encoding" version = "2.5.0" @@ -1444,7 +1457,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef552e6f588e446098f6ba40d89ac146c8c7b64aade83c051ee00bb5d2bc18d" dependencies = [ - "uuid 1.6.1", + "uuid 1.7.0", ] [[package]] @@ -1769,7 +1782,7 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fe81b5c06ecfdbc71dd845216f225f53b62a10cb8a16c946836a3467f701d05b" dependencies = [ - "base64 0.21.6", + "base64 0.21.7", "bytes", "hex", "k256", @@ -1837,9 +1850,9 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.10.1" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95b3f3e67048839cb0d0781f445682a35113da7121f7c949db0e2be96a4fbece" +checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580" dependencies = [ "humantime", "is-terminal", @@ -1973,9 +1986,9 @@ dependencies = [ [[package]] name = "ethers-addressbook" -version = "2.0.11" +version = "2.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c405f24ea3a517899ba7985385c43dc4a7eb1209af3b1e0a1a32d7dcc7f8d09" +checksum = "9bf35eb7d2e2092ad41f584951e08ec7c077b142dba29c4f1b8f52d2efddc49c" dependencies = [ "ethers-core", "once_cell", @@ -2004,9 +2017,9 @@ dependencies = [ [[package]] name = "ethers-contract-abigen" -version = "2.0.11" +version = "2.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51258120c6b47ea9d9bec0d90f9e8af71c977fbefbef8213c91bfed385fe45eb" +checksum = "bbdfb952aafd385b31d316ed80d7b76215ce09743c172966d840e96924427e0c" dependencies = [ "Inflector", "const-hex", @@ -2028,9 +2041,9 @@ dependencies = [ [[package]] name = "ethers-contract-derive" -version = "2.0.11" +version = "2.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "936e7a0f1197cee2b62dc89f63eff3201dbf87c283ff7e18d86d38f83b845483" +checksum = "7465c814a2ecd0de0442160da13584205d1cdc08f4717a6511cad455bd5d7dc4" dependencies = [ "Inflector", "const-hex", @@ -2044,9 +2057,9 @@ dependencies = [ [[package]] name = "ethers-core" -version = "2.0.11" +version = "2.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f03e0bdc216eeb9e355b90cf610ef6c5bb8aca631f97b5ae9980ce34ea7878d" +checksum = "918b1a9ba585ea61022647def2f27c29ba19f6d2a4a4c8f68a9ae97fd5769737" dependencies = [ "arrayvec 0.7.4", "bytes", @@ -2074,9 +2087,9 @@ dependencies = [ [[package]] name = "ethers-etherscan" -version = "2.0.11" +version = "2.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abbac2c890bdbe0f1b8e549a53b00e2c4c1de86bb077c1094d1f38cdf9381a56" +checksum = "facabf8551b4d1a3c08cb935e7fca187804b6c2525cc0dafb8e5a6dd453a24de" dependencies = [ "chrono", "ethers-core", @@ -2123,7 +2136,7 @@ checksum = "25d6c0c9455d93d4990c06e049abf9b30daf148cf461ee939c11d88907c60816" dependencies = [ "async-trait", "auto_impl", - "base64 0.21.6", + "base64 0.21.7", "bytes", "const-hex", "enr", @@ -2173,9 +2186,9 @@ dependencies = [ [[package]] name = "ethers-solc" -version = "2.0.11" +version = "2.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a64f710586d147864cff66540a6d64518b9ff37d73ef827fee430538265b595f" +checksum = "cc2e46e3ec8ef0c986145901fa9864205dc4dcee701f9846be2d56112d34bdea" dependencies = [ "cfg-if 1.0.0", "const-hex", @@ -2483,7 +2496,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "27d12c0aed7f1e24276a241aadc4cb8ea9f83000f34bc062b7cc2d51e3b0fabd" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.4.2", "debugid", "fxhash", "serde", @@ -2576,9 +2589,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.22" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d6250322ef6e60f93f9a2162799302cd6f68f79f6e5d85c8c16f14d1d958178" +checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" dependencies = [ "bytes", "fnv", @@ -2595,9 +2608,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "991910e35c615d8cab86b5ab04be67e6ad24d2bf5f4f11fdbbed26da999bbeab" +checksum = "31d030e59af851932b72ceebadf4a2b5986dba4c3b99dd2493f8273a0f151943" dependencies = [ "bytes", "fnv", @@ -2695,9 +2708,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" +checksum = "5d3d0e0f38255e7fa3cf31335b3a56f05febd18025f4db5ef7a0cfb4f8da651f" [[package]] name = "hex" @@ -2810,7 +2823,7 @@ dependencies = [ "futures-channel", "futures-core", "futures-util", - "h2 0.3.22", + "h2 0.3.24", "http 0.2.11", "http-body 0.4.6", "httparse", @@ -2833,7 +2846,7 @@ dependencies = [ "bytes", "futures-channel", "futures-util", - "h2 0.4.1", + "h2 0.4.2", "http 1.0.0", "http-body 1.0.0", "httparse", @@ -3029,7 +3042,7 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ - "hermit-abi 0.3.3", + "hermit-abi 0.3.4", "libc", "windows-sys 0.48.0", ] @@ -3046,8 +3059,8 @@ version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bad00257d07be169d870ab665980b06cdb366d792ad690bf2e76876dc503455" dependencies = [ - "hermit-abi 0.3.3", - "rustix 0.38.28", + "hermit-abi 0.3.4", + "rustix 0.38.30", "windows-sys 0.52.0", ] @@ -3095,9 +3108,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.66" +version = "0.3.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca" +checksum = "9a1d36f1235bc969acba30b7f5990b864423a6068a10f7c90ae8f0112e3a59d1" dependencies = [ "wasm-bindgen", ] @@ -3125,7 +3138,7 @@ version = "8.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6971da4d9c3aa03c3d8f3ff0f4155b534aad021292003895a469716b2a230378" dependencies = [ - "base64 0.21.6", + "base64 0.21.7", "pem", "ring 0.16.20", "serde", @@ -3164,9 +3177,9 @@ dependencies = [ [[package]] name = "keccak" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" +checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" dependencies = [ "cpufeatures", ] @@ -3242,7 +3255,7 @@ version = "0.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.4.2", "libc", "redox_syscall 0.4.1", ] @@ -3261,9 +3274,9 @@ checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "linux-raw-sys" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" [[package]] name = "lock_api" @@ -3365,7 +3378,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2cffa4ad52c6f791f4f8b15f0c05f9824b2ced1160e88cc393d64fff9a8ac64" dependencies = [ - "rustix 0.38.28", + "rustix 0.38.30", ] [[package]] @@ -3431,7 +3444,7 @@ version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d4fa7ce7c4862db464a37b0b31d89bca874562f034bd7993895572783d02950" dependencies = [ - "base64 0.21.6", + "base64 0.21.7", "hyper 0.14.28", "indexmap 1.9.3", "ipnet", @@ -3551,7 +3564,7 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35cbb989542587b47205e608324ddd391f0cee1c22b4b64ae49f458334b95907" dependencies = [ - "borsh 1.3.0", + "borsh 1.3.1", "serde", ] @@ -3597,7 +3610,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5bffdcef917385f1ef12c0ec21b3144d2c8788dbea1015d8fed838689dc093e5" dependencies = [ "blake2", - "borsh 1.3.0", + "borsh 1.3.1", "bs58 0.4.0", "c2-chacha", "curve25519-dalek", @@ -3632,7 +3645,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "120ff206766c6bff62e919e3dcaf5c3a184a52ea072ad0947bb123768b65ece7" dependencies = [ - "borsh 1.3.0", + "borsh 1.3.1", "lazy_static", "log", "near-chain-configs", @@ -3667,8 +3680,8 @@ version = "0.2.0" dependencies = [ "anyhow", "async-trait", - "axum 0.7.3", - "borsh 1.3.0", + "axum 0.7.4", + "borsh 1.3.1", "coerce", "config", "either", @@ -3679,11 +3692,12 @@ dependencies = [ "near-crypto", "near-jsonrpc-client", "near-light-client-protocol", + "near-light-client-rpc", "near-primitives", "near-primitives-core", "pretty_env_logger", "protobuf 3.2.0", - "rand 0.7.3", + "rand 0.8.5", "reqwest", "serde", "serde_json", @@ -3693,43 +3707,82 @@ dependencies = [ ] [[package]] -name = "near-light-client-circuits" -version = "0.1.0" +name = "near-light-client-protocol" +version = "0.2.0" dependencies = [ - "borsh 1.3.0", - "ethers", + "anyhow", + "borsh 1.3.1", + "either", "hex", - "near-light-client-protocol", + "itertools 0.12.0", + "log", + "near-crypto", + "near-jsonrpc-primitives", "near-primitives", - "plonky2 0.1.4 (git+https://github.com/mir-protocol/plonky2.git)", - "plonky2x", - "pretty_assertions", + "near-primitives-core", "pretty_env_logger", + "rand 0.8.5", "serde", "serde_json", + "test-utils", + "thiserror", ] [[package]] -name = "near-light-client-protocol" +name = "near-light-client-rpc" version = "0.2.0" dependencies = [ "anyhow", - "borsh 1.3.0", + "async-trait", + "borsh 1.3.1", "either", + "futures", "hex", "itertools 0.12.0", "log", "near-crypto", + "near-jsonrpc-client", "near-jsonrpc-primitives", "near-primitives", "near-primitives-core", "pretty_env_logger", - "rand 0.7.3", + "rand 0.8.5", "serde", "serde_json", "thiserror", ] +[[package]] +name = "near-light-client-succint-operator" +version = "0.2.0" +dependencies = [ + "cfg-if 0.1.10", + "near-light-clientx", +] + +[[package]] +name = "near-light-clientx" +version = "0.1.0" +dependencies = [ + "async-trait", + "borsh 1.3.1", + "ethers", + "hex", + "log", + "near-light-client-protocol", + "near-light-client-rpc", + "near-primitives", + "plonky2 0.1.4 (git+https://github.com/mir-protocol/plonky2.git)", + "plonky2x", + "pretty_assertions", + "pretty_env_logger", + "serde", + "serde_json", + "serial_test", + "test-utils", + "tokio", +] + [[package]] name = "near-o11y" version = "0.19.0" @@ -3737,7 +3790,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2dd1e98a5d3ecd782dc59abe6341c30b4072e32b5b353a0073fe238fbb641a2a" dependencies = [ "actix", - "base64 0.21.6", + "base64 0.21.7", "clap", "near-crypto", "near-fmt", @@ -3765,7 +3818,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df64b6d50fc466b960b08ae6f3f9100581e72252bf13f37c19e6e67a12bca6e9" dependencies = [ "assert_matches", - "borsh 1.3.0", + "borsh 1.3.1", "enum-map", "near-account-id", "near-primitives-core", @@ -3784,8 +3837,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44419e132fe6c2cda430dcb5935d9f2eba9505a69a6c641ffc76a37802c2f98d" dependencies = [ "arbitrary", - "base64 0.21.6", - "borsh 1.3.0", + "base64 0.21.7", + "borsh 1.3.1", "bytesize", "cfg-if 1.0.0", "chrono", @@ -3826,8 +3879,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99513c0a2b28e2bdf6998b8cc5a84eacfd54f0d2694bb40e19ac34a14c19d73c" dependencies = [ "arbitrary", - "base64 0.21.6", - "borsh 1.3.0", + "base64 0.21.7", + "borsh 1.3.1", "bs58 0.4.0", "derive_more", "enum-map", @@ -3943,8 +3996,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21ff5288c4ace5124e9e2a88bade90363ff4e348f4e1074b909e9f699a156793" dependencies = [ "anyhow", - "base64 0.21.6", - "borsh 1.3.0", + "base64 0.21.7", + "borsh 1.3.1", "ed25519-dalek", "enum-map", "finite-wasm", @@ -4180,7 +4233,7 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.3.3", + "hermit-abi 0.3.4", "libc", ] @@ -4199,7 +4252,7 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" dependencies = [ - "proc-macro-crate 3.0.0", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", "syn 2.0.48", @@ -4256,11 +4309,11 @@ dependencies = [ [[package]] name = "openssl" -version = "0.10.62" +version = "0.10.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cde4d2d9200ad5909f8dac647e29482e07c3a35de8a13fce7c9c7747ad9f671" +checksum = "15c9d69dd87a29568d4d017cfe8ec518706046a05184e5aea92d0af890b803c8" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.4.2", "cfg-if 1.0.0", "foreign-types", "libc", @@ -4288,9 +4341,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.98" +version = "0.9.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1665caf8ab2dc9aef43d1c0023bd904633a6a05cb30b0ad59bec2ae986e57a7" +checksum = "22e1bf214306098e4832460f797824c05d25aacdf896f64a985fb0fd992454ae" dependencies = [ "cc", "libc", @@ -4723,9 +4776,9 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.28" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69d3587f8a9e599cc7ec2c00e331f71c4e69a5f9a4b8a6efd5b07466b9736f9a" +checksum = "2900ede94e305130c13ddd391e0ab7cbaeb783945ae07a279c268cb05109c6cb" [[package]] name = "platforms" @@ -4759,7 +4812,7 @@ dependencies = [ [[package]] name = "plonky2" version = "0.1.4" -source = "git+https://github.com/mir-protocol/plonky2.git#30b47998262642be54da5acf03dfca31af4d93f7" +source = "git+https://github.com/mir-protocol/plonky2.git#b8a16b39c7f84491dfae9b9dc3b7ded98bb2839b" dependencies = [ "ahash 0.8.7", "anyhow", @@ -4798,7 +4851,7 @@ dependencies = [ [[package]] name = "plonky2_field" version = "0.1.1" -source = "git+https://github.com/mir-protocol/plonky2.git#30b47998262642be54da5acf03dfca31af4d93f7" +source = "git+https://github.com/mir-protocol/plonky2.git#b8a16b39c7f84491dfae9b9dc3b7ded98bb2839b" dependencies = [ "anyhow", "itertools 0.11.0", @@ -4830,7 +4883,7 @@ dependencies = [ [[package]] name = "plonky2_maybe_rayon" version = "0.1.1" -source = "git+https://github.com/mir-protocol/plonky2.git#30b47998262642be54da5acf03dfca31af4d93f7" +source = "git+https://github.com/mir-protocol/plonky2.git#b8a16b39c7f84491dfae9b9dc3b7ded98bb2839b" dependencies = [ "rayon", ] @@ -4843,12 +4896,12 @@ source = "git+https://github.com/mir-protocol/plonky2.git?rev=2d36559d#2d36559da [[package]] name = "plonky2_util" version = "0.1.1" -source = "git+https://github.com/mir-protocol/plonky2.git#30b47998262642be54da5acf03dfca31af4d93f7" +source = "git+https://github.com/mir-protocol/plonky2.git#b8a16b39c7f84491dfae9b9dc3b7ded98bb2839b" [[package]] name = "plonky2x" version = "0.1.0" -source = "git+https://github.com/succinctlabs/succinctx.git#19a16bfd14b3367c6c022ba6477457baca9d84b3" +source = "git+https://github.com/succinctlabs/succinctx.git#889643f4b1c331ce585b992c02cadbccaa79cfc8" dependencies = [ "anyhow", "array-macro", @@ -4862,7 +4915,7 @@ dependencies = [ "digest 0.10.7", "dotenv", "ed25519-dalek", - "env_logger 0.10.1", + "env_logger 0.10.2", "ethers", "ff", "futures", @@ -4884,13 +4937,13 @@ dependencies = [ "sha256", "tokio", "tracing", - "uuid 1.6.1", + "uuid 1.7.0", ] [[package]] name = "plonky2x-derive" version = "0.1.0" -source = "git+https://github.com/succinctlabs/succinctx.git#19a16bfd14b3367c6c022ba6477457baca9d84b3" +source = "git+https://github.com/succinctlabs/succinctx.git#889643f4b1c331ce585b992c02cadbccaa79cfc8" dependencies = [ "proc-macro2", "quote", @@ -4943,7 +4996,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "865724d4dbe39d9f3dd3b52b88d859d66bcb2d6a0acfd5ea68a65fb66d4bdc1c" dependencies = [ - "env_logger 0.10.1", + "env_logger 0.10.2", "log", ] @@ -5011,9 +5064,9 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "3.0.0" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b2685dd208a3771337d8d386a89840f0f43cd68be8dae90a5f8c2384effc9cd" +checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" dependencies = [ "toml_edit 0.21.0", ] @@ -5044,9 +5097,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.76" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95fc56cda0b5c3325f5fbbd7ff9fda9e02bb00bb3dac51252d2f1bfa1cb8cc8c" +checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" dependencies = [ "unicode-ident", ] @@ -5072,7 +5125,7 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.4.2", "lazy_static", "num-traits", "rand 0.8.5", @@ -5333,9 +5386,9 @@ dependencies = [ [[package]] name = "rayon" -version = "1.8.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" +checksum = "fa7237101a77a10773db45d62004a272517633fbcc3df19d96455ede1122e051" dependencies = [ "either", "rayon-core", @@ -5343,9 +5396,9 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.12.0" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" dependencies = [ "crossbeam-deque", "crossbeam-utils", @@ -5410,13 +5463,13 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.2" +version = "1.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" dependencies = [ "aho-corasick 1.1.2", "memchr", - "regex-automata 0.4.3", + "regex-automata 0.4.4", "regex-syntax 0.8.2", ] @@ -5431,9 +5484,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +checksum = "3b7fa1134405e2ec9353fd416b17f8dacd46c473d7d3fd1cf202706a14eb792a" dependencies = [ "aho-corasick 1.1.2", "memchr", @@ -5486,12 +5539,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37b1ae8d9ac08420c66222fb9096fc5de435c3c48542bc5336c51892cffafb41" dependencies = [ "async-compression", - "base64 0.21.6", + "base64 0.21.7", "bytes", "encoding_rs", "futures-core", "futures-util", - "h2 0.3.22", + "h2 0.3.24", "http 0.2.11", "http-body 0.4.6", "hyper 0.14.28", @@ -5587,7 +5640,7 @@ dependencies = [ "rkyv_derive", "seahash", "tinyvec", - "uuid 1.6.1", + "uuid 1.7.0", ] [[package]] @@ -5731,14 +5784,14 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.28" +version = "0.38.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72e572a5e8ca657d7366229cdde4bd14c4eb5499a9573d4d366fe1b599daa316" +checksum = "322394588aaf33c24007e8bb3238ee3e4c5c09c084ab32bc73890b99ff326bca" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.4.2", "errno 0.3.8", "libc", - "linux-raw-sys 0.4.12", + "linux-raw-sys 0.4.13", "windows-sys 0.52.0", ] @@ -5760,7 +5813,7 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" dependencies = [ - "base64 0.21.6", + "base64 0.21.7", ] [[package]] @@ -6065,11 +6118,11 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.4.0" +version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64cd236ccc1b7a29e7e2739f27c0b2dd199804abc4290e32f59f3b68d6405c23" +checksum = "f58c3a1b3e418f61c25b2aeb43fc6c95eaa252b8cecdda67f401943e9e08d33f" dependencies = [ - "base64 0.21.6", + "base64 0.21.7", "chrono", "hex", "indexmap 1.9.3", @@ -6082,9 +6135,9 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.4.0" +version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93634eb5f75a2323b16de4748022ac4297f9e76b6dced2be287a099f41b5e788" +checksum = "d2068b437a31fc68f25dd7edc296b078f04b45145c199d8eed9866e45f1ff274" dependencies = [ "darling", "proc-macro2", @@ -6105,6 +6158,31 @@ dependencies = [ "unsafe-libyaml", ] +[[package]] +name = "serial_test" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "953ad9342b3aaca7cb43c45c097dd008d4907070394bd0751a0aa8817e5a018d" +dependencies = [ + "dashmap", + "futures", + "lazy_static", + "log", + "parking_lot 0.12.1", + "serial_test_derive", +] + +[[package]] +name = "serial_test_derive" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b93fb4adc70021ac1b47f7d45e8cc4169baaa7ea58483bc5b721d19a26202212" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "sha1" version = "0.10.6" @@ -6250,9 +6328,9 @@ checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" [[package]] name = "smallvec" -version = "1.11.2" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" +checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" [[package]] name = "smart-default" @@ -6515,7 +6593,7 @@ dependencies = [ "cfg-if 1.0.0", "fastrand", "redox_syscall 0.4.1", - "rustix 0.38.28", + "rustix 0.38.30", "windows-sys 0.52.0", ] @@ -6532,13 +6610,37 @@ dependencies = [ [[package]] name = "termcolor" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff1bc3d3f05aff0403e8ac0d92ced918ec05b666a43f83297ccef5bea8a3d449" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" dependencies = [ "winapi-util", ] +[[package]] +name = "test-utils" +version = "0.2.0" +dependencies = [ + "anyhow", + "borsh 1.3.1", + "derive_more", + "either", + "hex", + "itertools 0.12.0", + "log", + "near-crypto", + "near-jsonrpc-primitives", + "near-light-client-protocol", + "near-primitives", + "near-primitives-core", + "pretty_assertions", + "pretty_env_logger", + "rand 0.8.5", + "serde", + "serde_json", + "thiserror", +] + [[package]] name = "thiserror" version = "1.0.56" @@ -6817,7 +6919,7 @@ dependencies = [ "bytes", "futures-core", "futures-util", - "h2 0.3.22", + "h2 0.3.24", "http 0.2.11", "http-body 0.4.6", "hyper 0.14.28", @@ -7056,9 +7158,9 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.14" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f2528f27a9eb2b21e69c95319b30bd0efd85d09c379741b0f78ea1d86be2416" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" [[package]] name = "unicode-ident" @@ -7191,9 +7293,9 @@ dependencies = [ [[package]] name = "uuid" -version = "1.6.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e395fcf16a7a3d8127ec99782007af141946b4795001f876d54fb0d55978560" +checksum = "f00cc9702ca12d3c81455259621e676d0f7251cec66a21e98fe2e9a37db93b2a" dependencies = [ "getrandom 0.2.12", "serde", @@ -7270,9 +7372,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.89" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e" +checksum = "b1223296a201415c7fad14792dbefaace9bd52b62d33453ade1c5b5f07555406" dependencies = [ "cfg-if 1.0.0", "wasm-bindgen-macro", @@ -7280,9 +7382,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.89" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b56f625e64f3a1084ded111c4d5f477df9f8c92df113852fa5a374dbda78826" +checksum = "fcdc935b63408d58a32f8cc9738a0bffd8f05cc7c002086c6ef20b7312ad9dcd" dependencies = [ "bumpalo", "log", @@ -7295,9 +7397,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.39" +version = "0.4.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac36a15a220124ac510204aec1c3e5db8a22ab06fd6706d881dc6149f8ed9a12" +checksum = "bde2032aeb86bdfaecc8b261eef3cba735cc426c1f3a3416d1e0791be95fc461" dependencies = [ "cfg-if 1.0.0", "js-sys", @@ -7307,9 +7409,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.89" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2" +checksum = "3e4c238561b2d428924c49815533a8b9121c664599558a5d9ec51f8a1740a999" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -7317,9 +7419,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.89" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" +checksum = "bae1abb6806dc1ad9e560ed242107c0f6c84335f1749dd4e8ddb012ebd5e25a7" dependencies = [ "proc-macro2", "quote", @@ -7330,9 +7432,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.89" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f" +checksum = "4d91413b1c31d7539ba5ef2451af3f0b833a005eb27a631cec32bc0635a8602b" [[package]] name = "wasm-encoder" @@ -7688,7 +7790,7 @@ dependencies = [ "log", "object", "rustc-demangle", - "rustix 0.38.28", + "rustix 0.38.30", "serde", "serde_derive", "target-lexicon 0.12.13", @@ -7736,7 +7838,7 @@ dependencies = [ "memoffset 0.9.0", "paste", "rand 0.8.5", - "rustix 0.38.28", + "rustix 0.38.30", "sptr", "wasm-encoder 0.35.0", "wasmtime-asm-macros", @@ -7779,9 +7881,9 @@ checksum = "9dafab2db172a53e23940e0fa3078c202f567ee5f13f4b42f66b694fab43c658" [[package]] name = "web-sys" -version = "0.3.66" +version = "0.3.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50c24a44ec86bb68fbecd1b3efed7e85ea5621b39b35ef2766b66cd984f8010f" +checksum = "58cd2333b6e0be7a39605f0e255892fd7418a682d8da8fe042fe25128794d2ed" dependencies = [ "js-sys", "wasm-bindgen", @@ -7802,7 +7904,7 @@ dependencies = [ "either", "home", "once_cell", - "rustix 0.38.28", + "rustix 0.38.30", ] [[package]] @@ -7979,9 +8081,9 @@ checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" [[package]] name = "winnow" -version = "0.5.33" +version = "0.5.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7520bbdec7211caa7c4e682eb1fbe07abe20cee6756b6e00f537c82c11816aa" +checksum = "b7cf47b659b318dccbd69cc4797a39ae128f533dce7902a1096044d1967b9c16" dependencies = [ "memchr", ] diff --git a/Cargo.toml b/Cargo.toml index 521547a..32d861b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,9 +11,11 @@ resolver = "2" anyhow = "1.0" async-trait = "0.1" config = "0.13" +derive_more = "0.99" either = { version = "1.9", features = [ "serde" ] } itertools = "0.12" log = "0.4" +pretty_assertions = "1.4" pretty_env_logger = "0.5" sled = "0.34" # TODO: maybe heavy thiserror = "1.0" @@ -40,5 +42,9 @@ near-jsonrpc-primitives = "0.19" near-primitives = "0.19" near-primitives-core = "0.19" +near-light-client-protocol = { path = "crates/protocol" } +near-light-client-rpc = { path = "crates/rpc" } +near-light-clientx = { path = "circuits/plonky2x" } +test-utils = { path = "crates/test-utils" } # [patch."https://github.com/succinctlabs/succinctx.git"] # plonky2x = { path = "./vendor/succinctx/plonky2x/core" } diff --git a/bin/client/Cargo.toml b/bin/client/Cargo.toml index 678d34c..279ffa0 100644 --- a/bin/client/Cargo.toml +++ b/bin/client/Cargo.toml @@ -24,6 +24,7 @@ pretty_env_logger.workspace = true protobuf.workspace = true protocol = { path = "../../crates/protocol", package = "near-light-client-protocol" } reqwest.workspace = true +rpc = { path = "../../crates/rpc", package = "near-light-client-rpc" } serde.workspace = true serde_json.workspace = true sled.workspace = true diff --git a/bin/client/src/client/mod.rs b/bin/client/src/client/mod.rs index 205ad1e..7b7eafe 100644 --- a/bin/client/src/client/mod.rs +++ b/bin/client/src/client/mod.rs @@ -8,11 +8,11 @@ use coerce::actor::{context::ActorContext, message::Handler, Actor}; use message::{Archive, GetProof, Head, Shutdown, VerifyProof}; use near_primitives::views::validator_stake_view::ValidatorStakeView; use protocol::{Proof, Protocol}; +use rpc::LightClientRpc; use std::{str::FromStr, sync::Arc}; use tokio::time; pub mod message; -pub mod rpc; mod store; pub struct LightClient { @@ -132,7 +132,7 @@ impl LightClient { let starting_head = self .client .fetch_latest_header(&sync_from) - .await + .await? .ok_or_else(|| anyhow::anyhow!("We need a starting header"))?; log::info!("starting head: {:?}", starting_head.inner_lite.height); @@ -202,14 +202,14 @@ impl LightClient { client: rpc::NearRpcClient, ) -> Result { let head = store.head().await?; - log::debug!("Current head: {:#?}", head.inner_lite); + log::debug!("Current head: {:#?}", head); let next_header = client .fetch_latest_header( &CryptoHash::from_str(&format!("{}", head.hash())) .map_err(|e| anyhow!("Failed to parse hash: {:?}", e))?, ) - .await + .await? .ok_or_else(|| anyhow!("Failed to fetch latest header"))?; log::trace!("Got new header: {:#?}", next_header.inner_lite); @@ -252,7 +252,7 @@ impl LightClient { for req in p.0 { let proof = self .client - .fetch_light_client_proof(req, *last_verified_hash); + .fetch_light_client_proof(req.0, *last_verified_hash); futs.push(proof); } let unpin_futs: Vec<_> = futs.into_iter().map(Box::pin).collect(); @@ -306,3 +306,11 @@ impl LightClient { Ok((p, errors)) } } + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn t() {} +} diff --git a/bin/client/src/config.rs b/bin/client/src/config.rs index b8aafe3..cea5eb8 100644 --- a/bin/client/src/config.rs +++ b/bin/client/src/config.rs @@ -1,6 +1,6 @@ -use crate::client::rpc::Network; use crate::prelude::*; use config::{Config as ConfigTrait, ConfigError, Environment, File}; +use rpc::Network; use std::{env, path::PathBuf}; #[derive(Debug, Deserialize, Clone)] diff --git a/bin/operator/Cargo.toml b/bin/operator/Cargo.toml new file mode 100644 index 0000000..2437e53 --- /dev/null +++ b/bin/operator/Cargo.toml @@ -0,0 +1,20 @@ +[package] +edition.workspace = true +license.workspace = true +name = "near-light-client-succint-operator" +version.workspace = true + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[[bin]] +name = "sync" +path = "src/main.rs" +required-features = [ "sync" ] + +[dependencies] +cfg-if = "*" +near-light-clientx.workspace = true + +[features] +default = [ "sync" ] +sync = [ ] diff --git a/bin/operator/src/main.rs b/bin/operator/src/main.rs new file mode 100644 index 0000000..523c880 --- /dev/null +++ b/bin/operator/src/main.rs @@ -0,0 +1,11 @@ +use near_light_clientx::{plonky2x::backend::function::Plonky2xFunction, SyncCircuit}; + +fn main() { + cfg_if::cfg_if! { + if #[cfg(feature = "sync")] { + SyncCircuit::<1>::entrypoint(); + } else { + panic!("No circuit feature enabled"); + } + } +} diff --git a/build/.gitkeep b/build/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/circuits/plonky2x/Cargo.toml b/circuits/plonky2x/Cargo.toml index c46f82e..126d07f 100644 --- a/circuits/plonky2x/Cargo.toml +++ b/circuits/plonky2x/Cargo.toml @@ -1,25 +1,34 @@ [package] edition = "2021" -name = "near-light-client-circuits" +name = "near-light-clientx" version = "0.1.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -borsh.workspace = true -ethers = "2.0.11" -pretty_assertions = "1.4.0" -serde.workspace = true - +async-trait.workspace = true +borsh.workspace = true +ethers = "2.0.11" +hex.workspace = true +log.workspace = true +pretty_assertions = "1.4.0" +serde.workspace = true # Circuits plonky2 = { git = "https://github.com/mir-protocol/plonky2.git" } plonky2x = { git = "https://github.com/succinctlabs/succinctx.git" } -near-light-client-protocol = { path = "../../crates/protocol" } +near-light-client-protocol.workspace = true +near-light-client-rpc.workspace = true [dev-dependencies] borsh.workspace = true -hex.workspace = true near-primitives.workspace = true pretty_env_logger.workspace = true serde_json.workspace = true +serial_test = "3" +test-utils.workspace = true +tokio.workspace = true + +[features] +beefy-tests = [ ] +default = [ "beefy-tests" ] diff --git a/circuits/plonky2x/src/builder.rs b/circuits/plonky2x/src/builder.rs index 84573ef..185afa4 100644 --- a/circuits/plonky2x/src/builder.rs +++ b/circuits/plonky2x/src/builder.rs @@ -4,11 +4,12 @@ use crate::variables::{ CryptoHashVariable, HeaderVariable, MerklePathVariable, ProofVariable, StakeInfoVariable, SyncedVariable, ValidatorStakeVariable, }; +use near_light_client_protocol::config::NUM_BLOCK_PRODUCER_SEATS; use near_light_client_protocol::prelude::Itertools; use plonky2x::prelude::*; use pretty_assertions::assert_eq; -pub trait Verify, const D: usize> { +pub trait Ensure, const D: usize> { fn ensure_not_already_verified( &mut self, head: &HeaderVariable, @@ -30,8 +31,8 @@ pub trait Verify, const D: usize> { fn validate_signatures( &mut self, - approvals: BpsApprovals, - bps: BpsArr, + approvals: &BpsApprovals, + bps: &BpsArr, approval_message: ApprovalMessage, ) -> StakeInfoVariable; @@ -73,7 +74,7 @@ pub trait Verify, const D: usize> { fn assertx(&mut self, condition: BoolVariable); } -impl, const D: usize> Verify for CircuitBuilder { +impl, const D: usize> Ensure for CircuitBuilder { fn ensure_not_already_verified( &mut self, head: &HeaderVariable, @@ -87,9 +88,10 @@ impl, const D: usize> Verify for CircuitBuilder BoolVariable { - let epoch = self.is_equal(head.inner_lite.epoch_id, *epoch_id); - let next_epoch = self.is_equal(head.inner_lite.next_epoch_id, *epoch_id); - self.or(epoch, next_epoch) + let epoch_id = *epoch_id; + let this = self.is_equal(epoch_id, head.inner_lite.epoch_id); + let next = self.is_equal(epoch_id, head.inner_lite.next_epoch_id); + self.or(this, next) } fn ensure_if_next_epoch_contains_next_bps( @@ -106,8 +108,8 @@ impl, const D: usize> Verify for CircuitBuilder( &mut self, - approvals_after_next: BpsApprovals, - epoch_bps: BpsArr, + approvals_after_next: &BpsApprovals, + epoch_bps: &BpsArr, approval_message: ApprovalMessage, ) -> StakeInfoVariable { assert_eq!(approvals_after_next.is_active.len(), LEN); @@ -136,7 +138,7 @@ impl, const D: usize> Verify for CircuitBuilder, const D: usize> Verify for CircuitBuilder, const D: usize> Verify for CircuitBuilder BoolVariable { let hash = head.hash(self); - self.watch(&hash, "header hash"); self.is_equal(hash, *outcome_proof_block_hash) } @@ -201,17 +199,14 @@ impl, const D: usize> Verify for CircuitBuilder, const D: usize> Verify for CircuitBuilder, const D: usize> Verify for CircuitBuilder, const D: usize> { +pub trait Sync, const D: usize> { fn sync( &mut self, - head: HeaderVariable, - epoch_bps: BpsArr, - next_block: BlockVariable, + head: &HeaderVariable, + epoch_bps: &BpsArr, + next_block: &BlockVariable, ) -> SyncedVariable; fn reconstruct_approval_message(&mut self, next_block: &BlockVariable) -> ApprovalMessage; } -impl, const D: usize> SyncCircuit for CircuitBuilder { +impl, const D: usize> Sync for CircuitBuilder { fn sync( &mut self, - head: HeaderVariable, - epoch_bps: BpsArr, - next_block: BlockVariable, + head: &HeaderVariable, + epoch_bps: &BpsArr, + next_block: &BlockVariable, ) -> SyncedVariable { let a = self.ensure_not_already_verified(&head, &next_block.header.inner_lite.height); self.assertx(a); @@ -268,31 +262,32 @@ impl, const D: usize> SyncCircuit for CircuitBuilder self.assertx(c); let approval = self.reconstruct_approval_message(&next_block); - - let stake = self.validate_signatures(next_block.approvals_after_next, epoch_bps, approval); - + let stake = self.validate_signatures(&next_block.approvals_after_next, epoch_bps, approval); let d = self.ensure_stake_is_sufficient(&stake); self.assertx(d); + // TODO: might not need this now, also the logic is wrong because nbps is always >0 let (next_bps_epoch, next_bps) = if next_block.next_bps.len() > 0 { // TODO: hashing bps in circut let e = self.ensure_next_bps_is_valid( &next_block.header.inner_lite.next_bp_hash, - Some(&next_block.next_bp_hash), + Some(&next_block.next_bps_hash), ); self.assertx(e); + assert!(next_block.next_bps.len() == NUM_BLOCK_PRODUCER_SEATS); ( next_block.header.inner_lite.next_epoch_id, - next_block.next_bps, + next_block.next_bps.to_owned(), ) } else { let eid = self.constant::([0u8; 32].into()); - let bps = self.constant::>(Default::default()); + let bps = self.constant::>( + vec![Default::default(); NUM_BLOCK_PRODUCER_SEATS].into(), + ); (eid, bps) }; - self.watch(&next_block.header, "new_head"); SyncedVariable { - new_head: next_block.header, + new_head: next_block.header.to_owned(), next_bps_epoch, next_bps, } @@ -311,7 +306,6 @@ impl, const D: usize> SyncCircuit for CircuitBuilder input_stream.write(&next_block.header.inner_lite.height); let output_stream = self.hint(input_stream, BuildEndorsement); let msg = output_stream.read::(self); - self.watch(&msg, "approval_message"); msg } else { let mut bytes = vec![ByteVariable::zero(self)]; @@ -325,20 +319,19 @@ impl, const D: usize> SyncCircuit for CircuitBuilder } } -pub trait VerifyCircuit, const D: usize> { +pub trait Verify, const D: usize> { fn verify( &mut self, proof: ProofVariable, ) -> BoolVariable; } -impl, const D: usize> VerifyCircuit for CircuitBuilder { +impl, const D: usize> Verify for CircuitBuilder { fn verify( &mut self, proof: ProofVariable, ) -> BoolVariable { let block_hash = proof.block_header.hash(self); - self.watch(&block_hash, "proof header hash"); let block_hash_matches = self.is_equal(block_hash, proof.outcome_proof_block_hash); @@ -354,7 +347,6 @@ impl, const D: usize> VerifyCircuit for CircuitBuild let comp = self.and(block_matches, outcome_matches); let verified = self.and(comp, block_hash_matches); - self.watch(&verified, "proof verified"); self.assertx(verified); verified } @@ -384,97 +376,16 @@ fn to_le_bytes, V: CircuitVariable, const D: usize, const #[cfg(test)] mod tests { + use self::assert_eq; use super::*; + use crate::test_utils::*; use crate::variables::*; - use near_light_client_protocol::{ - prelude::{BasicProof, Header, Itertools}, - LightClientBlockView, Protocol, StakeInfo, ValidatorStake, - }; - use near_primitives::hash::CryptoHash; - use plonky2x::backend::circuit::{PublicInput, PublicOutput}; - use pretty_assertions::assert_eq; - use serde::de::DeserializeOwned; - use std::str::FromStr; - - type B = CircuitBuilder; - type PI = PublicInput; - type PO = PublicOutput; - - fn fixture(file: &str) -> T { - serde_json::from_reader(std::fs::File::open(format!("../../fixtures/{}", file)).unwrap()) - .unwrap() - } - - fn get_next_epoch() -> LightClientBlockView { - fixture("2.json") - } - - fn get_first_epoch() -> LightClientBlockView { - fixture("1.json") - } - - fn view_to_lite_view(h: LightClientBlockView) -> Header { - Header { - prev_block_hash: h.prev_block_hash, - inner_rest_hash: h.inner_rest_hash, - inner_lite: h.inner_lite, - } - } - - fn test_state() -> (Header, Vec, LightClientBlockView) { - let first = get_first_epoch(); - let next = get_next_epoch(); - - ( - view_to_lite_view(first.clone()), - first - .next_bps - .clone() - .unwrap() - .into_iter() - .map(Into::into) - .collect(), - next, - ) - } - - fn to_header(bv: LightClientBlockView) -> Header { - Header { - prev_block_hash: bv.prev_block_hash, - inner_rest_hash: bv.inner_rest_hash, - inner_lite: bv.inner_lite, - } - } - - fn builder_suite( - define: F, - writer: WriteInputs, - assertions: Assertions, - ) where - F: FnOnce(&mut B), - WriteInputs: FnOnce(&mut PI), - Assertions: FnOnce(PO), - { - pretty_env_logger::try_init().unwrap_or_default(); - - let mut builder = B::new(); - define(&mut builder); - - let circuit = builder.build(); - - let mut inputs = circuit.input(); - writer(&mut inputs); - - let (proof, output) = circuit.prove(&inputs); - - assertions(output.clone()); - - circuit.verify(&proof, &inputs, &output); - } + use near_light_client_protocol::Protocol; + use near_light_client_protocol::StakeInfo; #[test] fn test_header_hash() { - let header = to_header(fixture("1.json")); + let header = to_header(test_first().body); let expected_hash = header.hash().0; let define = |builder: &mut B| { @@ -495,7 +406,7 @@ mod tests { } #[test] - fn test_stake() { + fn test_ensure_stake() { let approved_stakes = [200, 199, 201, 0]; let define = |builder: &mut B| { @@ -535,7 +446,7 @@ mod tests { #[test] fn test_ensure_height() { - let test_header = to_header(get_first_epoch()); + let test_header = to_header(test_next().body); let define = |builder: &mut B| { let header = builder.read::(); @@ -561,10 +472,119 @@ mod tests { #[test] fn test_ensure_next_bps() { - let header = get_first_epoch(); - let bps = header.next_bps.clone().unwrap_or_default(); + let (header, bps, nbps_hash) = testnet_state(); + let bps_hash = CryptoHash::hash_borsh(bps.clone()); + + let define = |builder: &mut B| { + let header = builder.read::(); + let next_bps = builder.read::>(); + + let current = + builder.ensure_epoch_is_current_or_next(&header, &header.inner_lite.epoch_id); + builder.write::(current); + let next = + builder.ensure_epoch_is_current_or_next(&header, &header.inner_lite.next_epoch_id); + builder.write::(next); + + let contains_next_bps = builder.ensure_if_next_epoch_contains_next_bps( + &header, + &header.inner_lite.next_epoch_id, + &next_bps, + ); + builder.write::(contains_next_bps); + + let next_bps_hash = builder.constant::(bps_hash.0.into()); + let is_valid = builder + .ensure_next_bps_is_valid(&header.inner_lite.next_bp_hash, Some(&next_bps_hash)); + builder.write::(is_valid); + }; + let writer = |input: &mut PI| { + input.write::(header.clone().into()); + input.write::>(bps_to_variable(Some(bps))); + }; + let assertions = |mut output: PO| { + assert!(output.read::(), "epoch is current"); + assert!(output.read::(), "epoch is next"); + assert!(output.read::(), "next epoch has bps"); + assert!(output.read::(), "next bps is valid"); + }; + builder_suite(define, writer, assertions); + } + + #[test] + fn test_reconstruct_approval_msg() { + let (_, _, next_block) = test_state(); + let define = |builder: &mut B| { + let next_block = builder.read::(); + let os = builder.reconstruct_approval_message(&next_block); + builder.write::(os); + }; + let writer = |input: &mut PI| { + input.write::(next_block.clone().into()); + }; + let assertions = |mut output: PO| { + let created = output.read::(); + let msg = Protocol::reconstruct_approval_message(&next_block).unwrap(); + assert_eq!(msg, created); + }; + builder_suite(define, writer, assertions); + } + + #[test] + fn test_raw_le_bytes() { + let (_, _, next_block) = test_state(); + let define = |builder: &mut B| { + let next_block = builder.read::(); + + let mut bytes = vec![]; + for target in next_block.header.inner_lite.height.targets() { + let mut bits = builder.api.split_le(target, 32); + bits.reverse(); + let to_extend = bits + .chunks(8) + .rev() + .map(|chunk| { + let targets = chunk.iter().map(|b| b.target).collect_vec(); + ByteVariable::from_targets(&targets) + }) + .collect_vec(); + bytes.extend(to_extend); + } + builder.write::>(BytesVariable(bytes.try_into().unwrap())); + }; + let writer = |input: &mut PI| { + input.write::(next_block.clone().into()); + }; + let assertions = |mut output: PO| { + let bytes = output.read::>(); + println!("{:?}", bytes); + assert_eq!(bytes, next_block.inner_lite.height.to_le_bytes()); + }; + builder_suite(define, writer, assertions); + } +} + +/// These tests require either: +/// - A LOT of time if running in debug mode +/// - A LOT of RAM if running in release +/// +/// TODO: CI for only beefy tests +#[cfg(feature = "beefy-tests")] +#[cfg(test)] +mod beefy_tests { + use crate::builder::Ensure; + use crate::builder::Sync; + use crate::builder::Verify; + use crate::test_utils::*; + use crate::variables::*; + use near_light_client_protocol::prelude::BasicProof; + use serial_test::serial; + + #[test] + #[serial] + fn beefy_test_next_bps() { + let (header, bps, _) = testnet_state(); let bps_hash = CryptoHash::hash_borsh(bps.clone()); - let header = to_header(header); let define = |builder: &mut B| { let header = builder.read::(); @@ -603,7 +623,8 @@ mod tests { } #[test] - fn test_ensure_proofs() { + #[serial] + fn beefy_test_proof() { let block_root = CryptoHash::from_str("WWrLWbWHwSmjtTn5oBZPYgRCuCYn6fkYVa4yhPWNK4L").unwrap(); let p: BasicProof = fixture("old.json"); @@ -663,7 +684,8 @@ mod tests { } #[test] - fn test_inclusion_proof_blackbox() { + #[serial] + fn beefy_test_proof_blackbox() { let block_root = CryptoHash::from_str("WWrLWbWHwSmjtTn5oBZPYgRCuCYn6fkYVa4yhPWNK4L").unwrap(); @@ -698,14 +720,15 @@ mod tests { } #[test] - fn test_sync_across_epoch_boundaries() { + #[serial] + fn beefy_test_sync_across_epoch_boundaries() { let (head, next_bps, next_block) = test_state(); let define = |builder: &mut B| { let head = builder.read::(); let bps = builder.read::>(); let next_block = builder.read::(); - let synced = builder.sync(head, bps, next_block); + let synced = builder.sync(&head, &bps, &next_block); builder.write::(synced); }; let writer = |input: &mut PI| { @@ -717,11 +740,14 @@ mod tests { let header = output.read::(); println!("header: {:?}", header); }; + // TODO: next two builder_suite(define, writer, assertions); } + // TODO: probably not needed #[test] - fn test_bounded_signatures() { + #[serial] + fn beefy_test_bounded_signatures() { let (_, bps, next_block) = test_state(); const BPS_AMT: usize = 5; @@ -740,7 +766,7 @@ mod tests { let msg = builder.reconstruct_approval_message(&next_block); - builder.validate_signatures(next_block_approvals, bps, msg); + builder.validate_signatures(&next_block_approvals, &bps, msg); }; let writer = |input: &mut PI| { input.write::>( @@ -751,56 +777,4 @@ mod tests { let assertions = |mut _output: PO| {}; builder_suite(define, writer, assertions); } - - #[test] - fn test_reconstruct_approval_msg() { - let (_, _, next_block) = test_state(); - let define = |builder: &mut B| { - let next_block = builder.read::(); - let os = builder.reconstruct_approval_message(&next_block); - builder.write::(os); - }; - let writer = |input: &mut PI| { - input.write::(next_block.clone().into()); - }; - let assertions = |mut output: PO| { - let created = output.read::(); - let msg = Protocol::reconstruct_approval_message(&next_block).unwrap(); - assert_eq!(msg, created); - }; - builder_suite(define, writer, assertions); - } - - #[test] - fn test_raw_le_bytes() { - let (_, _, next_block) = test_state(); - let define = |builder: &mut B| { - let next_block = builder.read::(); - - let mut bytes = vec![]; - for target in next_block.header.inner_lite.height.targets() { - let mut bits = builder.api.split_le(target, 32); - bits.reverse(); - let to_extend = bits - .chunks(8) - .rev() - .map(|chunk| { - let targets = chunk.iter().map(|b| b.target).collect_vec(); - ByteVariable::from_targets(&targets) - }) - .collect_vec(); - bytes.extend(to_extend); - } - builder.write::>(BytesVariable(bytes.try_into().unwrap())); - }; - let writer = |input: &mut PI| { - input.write::(next_block.clone().into()); - }; - let assertions = |mut output: PO| { - let bytes = output.read::>(); - println!("{:?}", bytes); - assert_eq!(bytes, next_block.inner_lite.height.to_le_bytes()); - }; - builder_suite(define, writer, assertions); - } } diff --git a/circuits/plonky2x/src/hint.rs b/circuits/plonky2x/src/hint.rs new file mode 100644 index 0000000..5f609dc --- /dev/null +++ b/circuits/plonky2x/src/hint.rs @@ -0,0 +1,150 @@ +use crate::variables::bps_to_variable; +use crate::variables::BlockVariable; +use crate::variables::BpsArr; +use crate::variables::CryptoHashVariable; +use crate::variables::HeaderVariable; +use crate::variables::ValidatorStakeVariable; +use async_trait::async_trait; +use near_light_client_protocol::prelude::anyhow; +use near_light_client_protocol::prelude::izip; +use near_light_client_protocol::prelude::CryptoHash; +use near_light_client_protocol::prelude::Itertools; +use near_light_client_protocol::LightClientBlockLiteView; +use near_light_client_rpc::{LightClientRpc, NearRpcClient, Network}; +use plonky2x::{frontend::hint::asynchronous::hint::AsyncHint, prelude::*}; +use serde::{Deserialize, Serialize}; + +#[derive(Debug, Clone, Deserialize, Serialize)] +pub struct FetchNextHeaderInputs(pub Network); + +#[async_trait] +impl, const D: usize> AsyncHint for FetchNextHeaderInputs { + async fn hint( + &self, + input_stream: &mut ValueStream, + output_stream: &mut ValueStream, + ) { + let client = NearRpcClient::new(self.0.clone()); + + let h = input_stream.read_value::().0; + + let next = client + .fetch_latest_header(&CryptoHash(h)) + .await + .expect("Failed to fetch header") + .expect("Expected a header"); + + output_stream.write_value::(next.into()); + } +} + +impl FetchNextHeaderInputs { + pub fn fetch, const D: usize>( + self, + b: &mut CircuitBuilder, + hash: &CryptoHashVariable, + ) -> Option { + let mut input_stream = VariableStream::new(); + input_stream.write::(hash); + + let output_stream = b.async_hint(input_stream, self); + Some(output_stream.read::(b)) + } +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::{ + test_utils::{builder_suite, test_state, B, PI, PO}, + variables::{BlockVariableValue, HeaderVariableValue}, + }; + use near_light_client_protocol::{ + prelude::Header, BlockHeaderInnerLiteView, LightClientBlockView, + }; + use std::str::FromStr; + + #[test] + fn test_fetch_header() { + let (header, bps, nb) = test_state(); + + let define = |b: &mut B| { + let header = b.read::(); + let hash = header.hash(b); + let next_block = + FetchNextHeaderInputs(near_light_client_rpc::Network::Mainnet).fetch(b, &hash); + b.write::(next_block.unwrap()); + }; + let writer = |input: &mut PI| { + input.write::(header.into()); + }; + let assertions = |mut output: PO| { + let inputs = output.read::(); + let nbh: BlockVariableValue = nb.into(); + pretty_assertions::assert_eq!(format!("{:#?}", inputs), format!("{:#?}", nbh)); + }; + builder_suite(define, writer, assertions); + } + // #[test] + // fn test_fetch_info2() { + // let head = Header { + // prev_block_hash: CryptoHash::from_str("5dbt6rh82Xx6nNG1PuKoQj96g4jnWw6cyb8HNWPPkVJE") + // .unwrap(), + // inner_rest_hash: CryptoHash::from_str("DZT9p28adyuiTSbUV5bsuPRxX9K7R1bag1AeUEMhm4bh") + // .unwrap(), + // inner_lite: BlockHeaderInnerLiteView { + // height: 154654776, + // epoch_id: CryptoHash::from_str("FsJbcG3yvQQC81FVLgAsaHZrMBFbrPM22kgqfGcCdrFb") + // .unwrap(), + // next_epoch_id: CryptoHash::from_str("Fjn8T3phCCSCXSdjtQ4DqHGV86yeS2MQ92qcufCEpwbf") + // .unwrap(), + // prev_state_root: CryptoHash::from_str( + // "F2NNVhJJJdC7oWMbjpaJL3HVNK9RxcCWuTXjrM32ShuP", + // ) + // .unwrap(), + // outcome_root: CryptoHash::from_str("7SYchEDbwawjP2MVfZ2GinP8bBQU1hKFRz34b2ZzG3A8") + // .unwrap(), + // timestamp: 1705334624027402581, + // timestamp_nanosec: 1705334624027402581, + // next_bp_hash: CryptoHash::from_str("AcNatyPz9nmg2e5dMKQAbNLjFfkLgBN7AbR31vcpVJ7z") + // .unwrap(), + // block_merkle_root: CryptoHash::from_str( + // "3huzCnEQhgDDMWyVNR9kNbQFJ7qJGy1J4MBrCJAWndW9", + // ) + // .unwrap(), + // }, + // }; + // + // let define = |b: &mut B| { + // let header = b.read::(); + // let header_hash = header.hash(b); + // let mut outputs = b.async_hint( + // FetchBatchInputs::<2>::write_inputs(&header, &header_hash), + // FetchBatchInputs::<2>(near_light_client_rpc::Network::Testnet), + // ); + // let outputs = FetchBatchInputs::<2>::read_outputs(&mut outputs, b); + // + // b.write::>(outputs.0); + // for i in outputs.1.as_vec() { + // b.write::(i); + // } + // }; + // let writer = |input: &mut PI| { + // input.write::(head.into()); + // }; + // let assertions = |mut output: PO| { + // let bps = output + // .read::>() + // .into_iter() + // .map(|x| x.account_id) + // .collect_vec(); + // assert_eq!(bps.len(), 50); + // + // let inputs = output.read::(); + // println!("inputs: {:?}", inputs); + // let inputs = output.read::(); + // println!("inputs: {:?}", inputs); + // }; + // builder_suite(define, writer, assertions); + // } +} diff --git a/circuits/plonky2x/src/input.rs b/circuits/plonky2x/src/input.rs deleted file mode 100644 index 8b13789..0000000 --- a/circuits/plonky2x/src/input.rs +++ /dev/null @@ -1 +0,0 @@ - diff --git a/circuits/plonky2x/src/lib.rs b/circuits/plonky2x/src/lib.rs index dc0e003..c13306d 100644 --- a/circuits/plonky2x/src/lib.rs +++ b/circuits/plonky2x/src/lib.rs @@ -1,16 +1,25 @@ -use plonky2x::prelude::*; -use variables::{BlockVariable, BpsArr, HeaderVariable, ProofVariable, ValidatorStakeVariable}; +#![feature(generic_const_exprs)] + +use builder::Sync; +use hint::FetchNextHeaderInputs; +pub use plonky2x::{self, backend::circuit::Circuit, prelude::*}; +use variables::{ + BpsArr, CryptoHashVariable, HashBpsInputs, HeaderVariable, ValidatorStakeVariable, +}; +use variables::{BuildEndorsement, EncodeInner, SyncedVariable}; /// Building blocks injected into the CircuitBuilder mod builder; +mod hint; /// Unprefixed merkle tree without collision resistance mod merkle; mod variables; +#[cfg(test)] +mod test_utils; + // TODO: epoch sync, store head per epoch -// TODO: read bps from rainbow bridge // TODO: determine how much we can bootstrap from RB -// TODO: evm reads/writes // TODO: sync & prove for txs later than sync head // TODO: async proof requests, based on a receipt/txs id (should be able to use light client rpc lib // TODO: batch proof requests for a set of receipts/txs, must be bounded @@ -19,35 +28,102 @@ mod variables; // TODO: batching/experimental proofs // TODO[Style]: Shared trait for protocol functionality between crate <> circuit // TODO[Style]: macro to share all the same implementation with semantic type differences between -// TODO: determine fees, allows integrators to charge // protocol crate -#[derive(Debug)] -pub struct Circuit; - -pub trait SyncCircuit, const D: usize> { - fn sync( - &mut self, - head: HeaderVariable, - epoch_bps: BpsArr, - next_block: BlockVariable, - ) -> HeaderVariable; -} +// TODO: determine fees, allows integrators to charge +#[derive(Debug, Clone)] +pub struct SyncCircuit; + +impl Circuit for SyncCircuit { + fn define, const D: usize>(b: &mut CircuitBuilder) + where + <>::Config as plonky2::plonk::config::GenericConfig>::Hasher: + plonky2::plonk::config::AlgebraicHasher<>::Field>, + { + let network = near_light_client_rpc::Network::Testnet; + let trusted_head = b.evm_read::(); + + // This is a very interesting cheat to be able to get the BPS for the next epoch + // without the need to store the BPS, we can verify the hash of the BPS in the circuit + let bps = FetchNextHeaderInputs(near_light_client_rpc::Network::Testnet) + .fetch(b, &trusted_head.inner_lite.next_epoch_id) + .unwrap() + .next_bps; + let bps_hash = HashBpsInputs.hash(b, &bps); + b.assert_is_equal(trusted_head.inner_lite.next_bp_hash, bps_hash); + + let head_hash = trusted_head.hash(b); + let next_block = FetchNextHeaderInputs(network).fetch(b, &head_hash).unwrap(); + b.watch(&bps_hash, "calculate_bps_hash"); + + let synced = b.sync(&trusted_head, &bps, &next_block); + b.evm_write::(synced.new_head); + } -pub trait VerifyCircuit, const D: usize> { - // TODO: read head to determine if need to sync & prove - fn verify( - &mut self, - proof: ProofVariable, - ) -> bool; + fn register_generators, const D: usize>(registry: &mut HintRegistry) + where + <>::Config as plonky2::plonk::config::GenericConfig>::Hasher: + plonky2::plonk::config::AlgebraicHasher, + { + registry.register_async_hint::(); + registry.register_hint::(); + registry.register_hint::(); + registry.register_hint::(); + } } +#[cfg(feature = "beefy-tests")] #[cfg(test)] -mod tests { +mod beefy_tests { use super::*; + use crate::test_utils::{builder_suite, testnet_state, B, PI, PO}; + use ::test_utils::CryptoHash; + use near_light_client_protocol::{prelude::Itertools, ValidatorStake}; + use near_light_client_rpc::{LightClientRpc, NearRpcClient}; + use near_primitives::types::AccountId; + use serial_test::serial; #[test] - fn test_sync() { - // Read from aurora??? maybe + #[serial] + fn beefy_test_sync_e2e() { + const SYNC_AMT: usize = 1; + let (header, _, _) = testnet_state(); + + let define = |b: &mut B| { + SyncCircuit::::define(b); + }; + let writer = |input: &mut PI| { + input.evm_write::(header.into()); + }; + let assertions = |mut output: PO| { + println!("{:#?}", output.evm_read::()); + }; + builder_suite(define, writer, assertions); + } + + fn account_ids>(bps: Vec) -> Vec { + bps.into_iter() + .map(Into::::into) + .map(|x| x.account_id().clone()) + .collect_vec() + } + + #[tokio::test] + async fn test_epoch_madness() { + use pretty_assertions::assert_eq; + let c = NearRpcClient::new(near_light_client_rpc::Network::Testnet); + let (h, bps, n) = testnet_state(); + println!("{:#?}", h); + + assert_eq!(h.inner_lite.next_bp_hash, CryptoHash::hash_borsh(&bps)); + let bps = account_ids(bps); + + let next_epoch = c.fetch_latest_header(&h.inner_lite.next_epoch_id).await; + let ne_nbps = account_ids(next_epoch.unwrap().unwrap().next_bps.unwrap()); + assert_eq!(ne_nbps, bps); + + let nb_epoch = c.fetch_latest_header(&n.inner_lite.epoch_id).await; + let nb_nbps = account_ids(nb_epoch.unwrap().unwrap().next_bps.unwrap()); + assert_eq!(nb_nbps, bps); } #[test] diff --git a/circuits/plonky2x/src/merkle.rs b/circuits/plonky2x/src/merkle.rs index f7cb1fd..f6afdea 100644 --- a/circuits/plonky2x/src/merkle.rs +++ b/circuits/plonky2x/src/merkle.rs @@ -34,13 +34,10 @@ impl, const D: usize> NearMerkleTree for CircuitBuilder Bytes32Variable { let mut encoded_leaf = vec![]; - // Append the left bytes to the one byte. encoded_leaf.extend(left.as_bytes().to_vec()); - // Append the right bytes to the bytes so far. encoded_leaf.extend(right.as_bytes().to_vec()); - // Load the output of the hash. self.curta_sha256(&encoded_leaf) } } diff --git a/circuits/plonky2x/src/test_utils.rs b/circuits/plonky2x/src/test_utils.rs new file mode 100644 index 0000000..3220b71 --- /dev/null +++ b/circuits/plonky2x/src/test_utils.rs @@ -0,0 +1,66 @@ +pub use near_primitives::hash::CryptoHash; +pub use plonky2x::backend::circuit::{PublicInput, PublicOutput}; +pub use plonky2x::prelude::*; +pub use std::str::FromStr; +pub use test_utils::*; + +pub type B = CircuitBuilder; +pub type PI = PublicInput; +pub type PO = PublicOutput; + +pub fn builder_suite( + define: F, + writer: WriteInputs, + assertions: Assertions, +) where + F: FnOnce(&mut B), + WriteInputs: FnOnce(&mut PI), + Assertions: FnOnce(PO), +{ + pretty_env_logger::try_init().unwrap_or_default(); + + let mut builder = B::new(); + define(&mut builder); + + let circuit = builder.build(); + + let mut inputs = circuit.input(); + writer(&mut inputs); + + if let PublicInput::Bytes(bytes) = &mut inputs { + std::fs::write("input.bin", hex!(bytes)).unwrap(); + } else { + panic!("input is not bytes"); + } + + let (proof, output) = circuit.prove(&inputs); + + assertions(output.clone()); + + circuit.verify(&proof, &inputs, &output); +} + +pub fn mock_builder_suite( + define: F, + writer: WriteInputs, + assertions: Assertions, +) where + F: FnOnce(&mut B), + WriteInputs: FnOnce(&mut PI), + Assertions: FnOnce(PO), +{ + pretty_env_logger::try_init().unwrap_or_default(); + + let mut builder = B::new(); + define(&mut builder); + + let circuit = builder.mock_build(); + + let mut inputs = circuit.input(); + writer(&mut inputs); + + let (witness, output) = circuit.mock_prove(&inputs); + println!("Mock proof {:#?}", witness.full_witness()); + + assertions(output.clone()); +} diff --git a/circuits/plonky2x/src/variables.rs b/circuits/plonky2x/src/variables.rs index d49fb5f..9408a7a 100644 --- a/circuits/plonky2x/src/variables.rs +++ b/circuits/plonky2x/src/variables.rs @@ -6,13 +6,15 @@ use near_light_client_protocol::{ merkle_util::MerklePath, prelude::AccountId, prelude::CryptoHash, BlockHeaderInnerLiteView, LightClientBlockView, Signature, ValidatorStake, }; -use near_light_client_protocol::{Proof, StakeInfo, Synced}; +use near_light_client_protocol::{ + ED25519PublicKey, Proof, PublicKey, StakeInfo, Synced, ValidatorStakeView, ValidatorStakeViewV1, +}; use plonky2x::frontend::curta::ec::point::CompressedEdwardsY; +use plonky2x::frontend::curta::ec::point::CompressedEdwardsYVariable; use plonky2x::frontend::ecc::curve25519::ed25519::eddsa::EDDSASignatureVariable; use plonky2x::frontend::ecc::curve25519::ed25519::eddsa::EDDSASignatureVariableValue; use plonky2x::frontend::hint::simple::hint::Hint; use plonky2x::frontend::vars::EvmVariable; -use plonky2x::frontend::{curta::ec::point::CompressedEdwardsYVariable, uint::Uint}; use plonky2x::prelude::*; use pretty_assertions::assert_eq; use serde::{Deserialize, Serialize}; @@ -47,6 +49,8 @@ impl From for MerklePathVariableValue< .collect_vec(); // FIXME: Hmm, this seems problematic potentially since it might hash the wrong way // verify. + // + // TODO: grow these but exclude them in tree indices.resize(A, Default::default()); let mut path = path.iter().map(|x| x.hash.0.into()).collect_vec(); @@ -88,10 +92,64 @@ impl HeaderVariable { let inner_lite = self.inner_lite.hash(b); let lite_rest = b.curta_sha256_pair(inner_lite, self.inner_rest_hash); let hash = b.curta_sha256_pair(lite_rest, self.prev_block_hash); - b.watch(&hash, "header_hash"); hash } } +impl EvmVariable for HeaderVariable { + fn encode, const D: usize>( + &self, + builder: &mut CircuitBuilder, + ) -> Vec { + let mut bytes = vec![]; + bytes.extend_from_slice(&self.prev_block_hash.encode(builder)); + bytes.extend_from_slice(&self.inner_rest_hash.encode(builder)); + bytes.extend_from_slice(&self.inner_lite.encode(builder)); + assert!(bytes.len() == 64 + INNER_ENCODED_LEN); + log::debug!("encoded header {:?}", bytes.len()); + bytes + } + + fn decode, const D: usize>( + builder: &mut CircuitBuilder, + bytes: &[ByteVariable], + ) -> Self { + assert!(bytes.len() == 64 + INNER_ENCODED_LEN); + let prev_block_hash = CryptoHashVariable::decode(builder, &bytes[0..32]); + let inner_rest_hash = CryptoHashVariable::decode(builder, &bytes[32..64]); + let inner_lite = HeaderInnerVariable::decode(builder, &bytes[64..64 + INNER_ENCODED_LEN]); + Self { + prev_block_hash, + inner_rest_hash, + inner_lite, + } + } + + fn encode_value(value: Self::ValueType) -> Vec { + let mut bytes = vec![]; + bytes.extend_from_slice(&CryptoHashVariable::encode_value::( + value.prev_block_hash, + )); + bytes.extend_from_slice(&CryptoHashVariable::encode_value::( + value.inner_rest_hash, + )); + bytes.extend_from_slice(&HeaderInnerVariable::encode_value::(value.inner_lite)); + assert!(bytes.len() == 64 + INNER_ENCODED_LEN); + log::debug!("encoded header value {:?}", bytes.len()); + bytes + } + + fn decode_value(bytes: &[u8]) -> Self::ValueType { + assert!(bytes.len() == 64 + INNER_ENCODED_LEN); + let prev_block_hash = CryptoHashVariable::decode_value::(&bytes[0..32]); + let inner_rest_hash = CryptoHashVariable::decode_value::(&bytes[32..64]); + let inner_lite = HeaderInnerVariable::decode_value::(&bytes[64..]); + Self::ValueType { + prev_block_hash, + inner_rest_hash, + inner_lite, + } + } +} #[derive(CircuitVariable, Clone, Debug)] pub struct HeaderInnerVariable { @@ -124,9 +182,8 @@ impl From for HeaderInnerVariableValue, const D: usize>( + pub(crate) fn encode_borsh, const D: usize>( &self, b: &mut CircuitBuilder, ) -> BytesVariable { @@ -142,18 +199,104 @@ impl HeaderInnerVariable { input_stream.write(&self.block_merkle_root); let output_bytes = b.hint(input_stream, EncodeInner); - let bytes = output_bytes.read::>(b); - b.watch(&bytes, "inner_lite_bytes"); + let bytes = output_bytes.read::>(b); bytes } pub(crate) fn hash, const D: usize>( &self, b: &mut CircuitBuilder, ) -> CryptoHashVariable { - let bytes = self.encode(b); + let bytes = self.encode_borsh(b); b.curta_sha256(&bytes.0) } } +impl EvmVariable for HeaderInnerVariable { + fn encode, const D: usize>( + &self, + builder: &mut CircuitBuilder, + ) -> Vec { + let mut bytes = vec![]; + bytes.extend_from_slice(&self.height.encode(builder)); + bytes.extend_from_slice(&self.epoch_id.encode(builder)); + bytes.extend_from_slice(&self.next_epoch_id.encode(builder)); + bytes.extend_from_slice(&self.prev_state_root.encode(builder)); + bytes.extend_from_slice(&self.outcome_root.encode(builder)); + bytes.extend_from_slice(&self.timestamp.encode(builder)); + bytes.extend_from_slice(&self.next_bp_hash.encode(builder)); + bytes.extend_from_slice(&self.block_merkle_root.encode(builder)); + log::debug!("encoded inner: {:?}", bytes.len()); + assert_eq!(bytes.len(), INNER_ENCODED_LEN); + bytes + } + + fn decode, const D: usize>( + builder: &mut CircuitBuilder, + bytes: &[ByteVariable], + ) -> Self { + assert_eq!(bytes.len(), INNER_ENCODED_LEN); + let height = U64Variable::decode(builder, &bytes[0..8]); + let epoch_id = CryptoHashVariable::decode(builder, &bytes[8..40]); + let next_epoch_id = CryptoHashVariable::decode(builder, &bytes[40..72]); + let prev_state_root = CryptoHashVariable::decode(builder, &bytes[72..104]); + let outcome_root = CryptoHashVariable::decode(builder, &bytes[104..136]); + let timestamp = U64Variable::decode(builder, &bytes[136..144]); + let next_bp_hash = CryptoHashVariable::decode(builder, &bytes[144..176]); + let block_merkle_root = CryptoHashVariable::decode(builder, &bytes[176..INNER_ENCODED_LEN]); + Self { + height, + epoch_id, + next_epoch_id, + prev_state_root, + outcome_root, + timestamp, + next_bp_hash, + block_merkle_root, + } + } + + fn encode_value(value: Self::ValueType) -> Vec { + let mut bytes = vec![]; + bytes.extend_from_slice(&U64Variable::encode_value::(value.height)); + bytes.extend_from_slice(&CryptoHashVariable::encode_value::(value.epoch_id)); + bytes.extend_from_slice(&CryptoHashVariable::encode_value::(value.next_epoch_id)); + bytes.extend_from_slice(&CryptoHashVariable::encode_value::( + value.prev_state_root, + )); + bytes.extend_from_slice(&CryptoHashVariable::encode_value::(value.outcome_root)); + bytes.extend_from_slice(&U64Variable::encode_value::(value.timestamp)); + bytes.extend_from_slice(&CryptoHashVariable::encode_value::(value.next_bp_hash)); + bytes.extend_from_slice(&CryptoHashVariable::encode_value::( + value.block_merkle_root, + )); + log::debug!("encoded inner value: {:?}", bytes.len()); + assert_eq!(bytes.len(), INNER_ENCODED_LEN); + bytes + } + + fn decode_value(bytes: &[u8]) -> Self::ValueType { + assert_eq!(bytes.len(), INNER_ENCODED_LEN); + let height = U64Variable::decode_value::(&bytes[0..8]); + let epoch_id = CryptoHashVariable::decode_value::(&bytes[8..40]); + let next_epoch_id = CryptoHashVariable::decode_value::(&bytes[40..72]); + let prev_state_root = CryptoHashVariable::decode_value::(&bytes[72..104]); + let outcome_root = CryptoHashVariable::decode_value::(&bytes[104..136]); + let timestamp = U64Variable::decode_value::(&bytes[136..144]); + let next_bp_hash = CryptoHashVariable::decode_value::(&bytes[144..176]); + let block_merkle_root = + CryptoHashVariable::decode_value::(&bytes[176..INNER_ENCODED_LEN]); + + Self::ValueType { + height, + epoch_id, + next_epoch_id, + prev_state_root, + outcome_root, + timestamp, + next_bp_hash, + block_merkle_root, + } + } +} #[derive(Debug, Clone, Serialize, Deserialize)] pub struct EncodeInner; @@ -197,12 +340,12 @@ pub struct BlockVariable { pub next_block_inner_hash: CryptoHashVariable, pub next_bps: BpsArr, pub approvals_after_next: BpsApprovals, - pub next_bp_hash: CryptoHashVariable, + pub next_bps_hash: CryptoHashVariable, } impl From for BlockVariableValue { fn from(block: LightClientBlockView) -> Self { - let next_bp_hash = block + let next_bps_hash = block .next_bps .as_ref() .map(|bps| CryptoHash::hash_borsh(bps)) @@ -215,7 +358,7 @@ impl From for BlockVariableValue { header: block.clone().into(), next_bps: bps_to_variable(block.next_bps), approvals_after_next: block.approvals_after_next.into(), - next_bp_hash, + next_bps_hash, } } } @@ -225,12 +368,14 @@ pub(crate) fn bps_to_variable>( ) -> Vec> { next_bps .map(|next_bps| { - next_bps + let mut bps = next_bps .into_iter() .take(NUM_BLOCK_PRODUCER_SEATS) .map(Into::::into) .map(Into::>::into) - .collect() + .collect_vec(); + bps.resize(NUM_BLOCK_PRODUCER_SEATS, Default::default()); + bps }) .unwrap_or_else(|| vec![Default::default(); NUM_BLOCK_PRODUCER_SEATS]) } @@ -276,12 +421,13 @@ pub struct ValidatorStakeVariable { pub stake: BalanceVariable, } +const ACCOUNT_ID_PADDING_BYTE: u8 = b'#'; impl From for ValidatorStakeVariableValue { fn from(vs: ValidatorStake) -> Self { let public_key = CompressedEdwardsY(vs.public_key().unwrap_as_ed25519().0); let stake = vs.stake(); let mut account_id = vs.take_account_id().as_str().as_bytes().to_vec(); - account_id.resize(AccountId::MAX_LEN, 0); + account_id.resize(AccountId::MAX_LEN, ACCOUNT_ID_PADDING_BYTE); Self { account_id: account_id.try_into().unwrap(), // SAFETY: already checked this above public_key: public_key.into(), @@ -290,6 +436,24 @@ impl From for ValidatorStakeVariableValue { } } +impl Into for ValidatorStakeVariableValue { + fn into(self) -> ValidatorStakeView { + let unpadded_bytes = self + .account_id + .split(|x| *x == ACCOUNT_ID_PADDING_BYTE) + .collect_vec()[0]; + let account_id = String::from_utf8(unpadded_bytes.to_vec()).expect("invalid account bytes"); + println!("account id: {}", account_id); + let account_id = account_id.parse().expect("invalid account id"); + let public_key = PublicKey::ED25519(ED25519PublicKey(self.public_key.0.into())); + ValidatorStakeView::V1(ValidatorStakeViewV1 { + account_id, + public_key, + stake: self.stake.as_u128(), + }) + } +} + impl Default for ValidatorStakeVariableValue { fn default() -> Self { let bytes: [u8; AccountId::MAX_LEN] = [0u8; AccountId::MAX_LEN]; @@ -414,21 +578,8 @@ impl From for StakeInfoVariableValue { } } -// #[derive(Clone, Debug, Serialize, Deserialize)] -// pub struct HeaderHash; -// -// impl, const D: usize, const N: usize> Hint for HeaderHash { -// fn hint(&self, input_stream: &mut ValueStream, output_stream: &mut ValueStream) { -// let inner_lite_hash = input_stream.read_value::(); -// let inner_rest_hash = input_stream.read_value::(); -// let prev_block_hash = input_stream.read_value::(); -// -// let next_block_hash = sh; -// output_stream.write_value::(next_block_hash); -// } -// } - pub type ApprovalMessage = BytesVariable<41>; + // TODO: not sure these even need to be hints #[derive(Clone, Debug, Serialize, Deserialize)] pub struct BuildEndorsement; @@ -446,24 +597,6 @@ impl, const D: usize> Hint for BuildEndorsement { output_stream.write_value::(bytes.try_into().unwrap()); } } -// impl BuildEndorsement { -// pub fn build( -// &self, -// builder: &mut CircuitBuilder, -// next_block_hash: CryptoHash, -// next_block_height: U64Variable, -// ) -> BytesVariable { -// let mut input_stream = VariableStream::new(); -// input_stream.write(&next_block_hash); -// input_stream.write(&next_block_height); -// -// let mut output_stream = VariableStream::new(); -// let hint = BuildEndorsement::; -// let output_stream = hint.hint(&mut input_stream, &mut output_stream); -// let next_header = output_stream.read::(self); -// Self -// } -// } #[derive(CircuitVariable, Clone, Debug)] pub struct SyncedVariable { @@ -493,6 +626,44 @@ where } } +#[derive(Debug, Clone, Deserialize, Serialize)] +pub struct HashBpsInputs; + +impl, const D: usize> Hint for HashBpsInputs { + fn hint(&self, input_stream: &mut ValueStream, output_stream: &mut ValueStream) { + let bps = input_stream.read_value::>(); + let default_validator = + ValidatorStakeVariableValue::<>::Field>::default(); + + let bps = bps + .into_iter() + .filter(|x| x.account_id != default_validator.account_id) + .map(Into::::into) + .collect_vec(); + log::debug!("Bps to hash: {:#?}", bps); + let hash = CryptoHash::hash_borsh(bps); + log::debug!("Hash: {:#?}", hash); + + // TODO: figure out how to hash this in circuit + // It's non trivial because the account id is padded to the max len + output_stream.write_value::(hash.0.into()); + } +} + +impl HashBpsInputs { + pub fn hash, const D: usize>( + self, + b: &mut CircuitBuilder, + bps: &BpsArr, + ) -> CryptoHashVariable { + let mut input_stream = VariableStream::new(); + input_stream.write::>(&bps); + + let output_stream = b.hint(input_stream, self); + output_stream.read::(b) + } +} + #[cfg(test)] mod tests { use super::*; diff --git a/crates/protocol/Cargo.toml b/crates/protocol/Cargo.toml index 6daf0ac..6c2afb3 100644 --- a/crates/protocol/Cargo.toml +++ b/crates/protocol/Cargo.toml @@ -31,3 +31,4 @@ hex.workspace = true pretty_env_logger.workspace = true rand = "*" serde_json.workspace = true +test-utils.workspace = true diff --git a/crates/protocol/src/experimental.rs b/crates/protocol/src/experimental.rs index 656ad58..06be21c 100644 --- a/crates/protocol/src/experimental.rs +++ b/crates/protocol/src/experimental.rs @@ -328,23 +328,10 @@ pub fn verify_proof(proof: Proof) -> bool { pub(crate) mod tests { use super::*; use crate::merkle_util::{compute_root_from_path, compute_root_from_path_and_item}; - use near_primitives_core::types::AccountId; use std::str::FromStr; + use test_utils::fixture; pub const BLOCK_MERKLE_ROOT: &str = "WWrLWbWHwSmjtTn5oBZPYgRCuCYn6fkYVa4yhPWNK4L"; - pub const LIGHT_CLIENT_HEAD: &str = "4bM5eXMDGxpFZXbWNT6TqX1HdZsWoHZ11KerCHJ8RKmU"; - - pub fn get_constants() -> (CryptoHash, CryptoHash) { - let block_root = CryptoHash::from_str(BLOCK_MERKLE_ROOT).unwrap(); - let light_client_head = CryptoHash::from_str(LIGHT_CLIENT_HEAD).unwrap(); - (light_client_head, block_root) - } - - fn read_proof Deserialize<'a>>(path: &str) -> T { - println!("Reading {}", path); - let path = format!("../../{path}"); - serde_json::from_reader(std::fs::File::open(path).unwrap()).unwrap() - } fn write_proof(path: &str, proof: &Proof) { std::fs::write( @@ -358,12 +345,8 @@ pub(crate) mod tests { } fn proof_fixture(is_new: bool) -> BasicProof { - let path = if is_new { - "fixtures/new.json" - } else { - "fixtures/old.json" - }; - read_proof(path) + let path = if is_new { "new.json" } else { "old.json" }; + fixture(path) } #[test] @@ -490,10 +473,10 @@ pub(crate) mod tests { }) .all(|(block_root, path)| { let proof = if path.contains("old") { - let proof: BasicProof = read_proof(&path); + let proof: BasicProof = fixture(&path); Proof::new(block_root, vec![proof]) } else { - read_proof(&path) + fixture(&path) }; write_proof(&path, &proof); @@ -502,17 +485,10 @@ pub(crate) mod tests { assert!(rewritten); } - // This test populates a reasonably large batch of proofs for verifying the - // slimmer onchain light client #[test] fn batch_proofs() { let _ = pretty_env_logger::try_init(); - let (head, common_root) = get_constants(); - let receiver_id = AccountId::from_str("da.topgunbakugo.testnet").unwrap(); - - let path = "fixtures/batch.json"; - - let p = read_proof(path); + let p = fixture("batch.json"); assert!(verify_proof(p)); } } diff --git a/crates/protocol/src/lib.rs b/crates/protocol/src/lib.rs index 762a786..d7ef216 100644 --- a/crates/protocol/src/lib.rs +++ b/crates/protocol/src/lib.rs @@ -1,12 +1,15 @@ use crate::prelude::*; use error::Error; pub use merkle_util::*; +pub use near_crypto::ED25519PublicKey; pub use near_crypto::{PublicKey, Signature}; pub use near_primitives::{ block_header::ApprovalInner, block_header::BlockHeaderInnerLite, merkle::MerklePathItem, types::{validator_stake::ValidatorStake, BlockHeight, EpochId}, + views::LightClientBlockLiteView, + views::ValidatorStakeViewV1, views::{ validator_stake_view::ValidatorStakeView, BlockHeaderInnerLiteView, LightClientBlockView, }, @@ -219,7 +222,12 @@ impl Protocol { epoch_id: &CryptoHash, ) -> Result<(), Error> { if ![head.inner_lite.epoch_id, head.inner_lite.next_epoch_id].contains(epoch_id) { - log::debug!("Block is not in the current or next epoch"); + log::debug!( + "Next Block Epoch({:?}) is not in the current({:?}) or next({:?}) epoch", + epoch_id, + head.inner_lite.epoch_id, + head.inner_lite.next_epoch_id + ); Err(Error::BlockNotCurrentOrNextEpoch) } else { Ok(()) @@ -348,62 +356,24 @@ mod tests { use itertools::Itertools; use near_jsonrpc_primitives::types::light_client::RpcLightClientExecutionProofResponse; use serde_json::{self}; - - fn fixture(file: &str) -> LightClientBlockView { - serde_json::from_reader(std::fs::File::open(format!("../../fixtures/{}", file)).unwrap()) - .unwrap() - } - - fn get_next_epoch() -> LightClientBlockView { - fixture("2.json") - } - - fn get_first_epoch() -> LightClientBlockView { - fixture("1.json") - } - - fn get_current_epoch() -> LightClientBlockView { - fixture("current_epoch.json") - } - - fn view_to_lite_view(h: LightClientBlockView) -> Header { - Header { - prev_block_hash: h.prev_block_hash, - inner_rest_hash: h.inner_rest_hash, - inner_lite: h.inner_lite, - } - } - - fn test_state() -> (Header, Vec, LightClientBlockView) { - let first = get_first_epoch(); - let next = get_next_epoch(); - - ( - view_to_lite_view(first.clone()), - first - .next_bps - .clone() - .unwrap() - .into_iter() - .map(Into::into) - .collect(), - next, - ) - } + use test_utils::*; #[test] fn test_sync_across_epoch_boundaries() { - let (mut head, mut next_bps, next_block) = test_state(); + let (mut head, mut next_bps, next_block) = testnet_state(); + println!("head: {:#?}", head.inner_lite); let mut next_epoch_id = EpochId(head.inner_lite.next_epoch_id); let mut sync_and_update = |next_block: LightClientBlockView| { - let sync_next = Protocol::sync(&head, &next_bps, next_block.clone()).unwrap(); + let sync_next = Protocol::sync(&head, &next_bps[..], next_block.clone()).unwrap(); // Assert we matched the epoch id for the new BPS assert_eq!( head.inner_lite.next_epoch_id, sync_next.next_bps.as_ref().unwrap().0 .0 ); + println!("new head: {:#?}", sync_next.new_head.inner_lite); + head = sync_next.new_head; next_bps = sync_next.next_bps.unwrap().1; @@ -427,14 +397,12 @@ mod tests { sync_and_update(next_block.clone()); // Get next header, do next sync - let next_block = get_current_epoch(); - sync_and_update(next_block.clone()); + let next_block = test_last(); + sync_and_update(next_block.body); } #[test] fn test_validate_already_verified() { - pretty_env_logger::try_init().ok(); - let (head, _, _) = test_state(); assert_eq!( Protocol::ensure_not_already_verified(&head, &BlockHeight::MIN), @@ -444,8 +412,6 @@ mod tests { #[test] fn test_validate_bad_epoch() { - pretty_env_logger::try_init().ok(); - let (head, _, _) = test_state(); assert_eq!( Protocol::ensure_epoch_is_current_or_next( @@ -458,8 +424,6 @@ mod tests { #[test] fn test_next_epoch_bps_invalid() { - pretty_env_logger::try_init().ok(); - let (head, _, mut next_block) = test_state(); next_block.next_bps = None; @@ -475,8 +439,6 @@ mod tests { #[test] fn test_next_invalid_signature() { - pretty_env_logger::try_init().ok(); - let (_, next_bps, next_block) = test_state(); assert_eq!( Protocol::validate_signature( @@ -490,8 +452,6 @@ mod tests { #[test] fn test_next_invalid_signatures_no_approved_stake() { - pretty_env_logger::try_init().ok(); - let (_, next_bps, mut next_block) = test_state(); let approval_message = Protocol::reconstruct_approval_message(&next_block); @@ -514,15 +474,13 @@ mod tests { #[test] fn test_next_invalid_signatures_stake_isnt_sufficient() { - pretty_env_logger::try_init().ok(); - let (_, next_bps, next_block) = test_state(); let approval_message = Protocol::reconstruct_approval_message(&next_block); let StakeInfo { total, approved } = Protocol::validate_signatures( &next_block.approvals_after_next, - &next_bps, + &next_bps[..], &approval_message.unwrap(), ); @@ -546,8 +504,6 @@ mod tests { #[test] fn test_next_bps_invalid_hash() { - pretty_env_logger::try_init().ok(); - let (_, _, next_block) = test_state(); assert_eq!( @@ -561,8 +517,6 @@ mod tests { #[test] fn test_next_bps() { - pretty_env_logger::try_init().ok(); - let (_, _, next_block) = test_state(); assert_eq!( @@ -577,8 +531,6 @@ mod tests { #[test] fn test_next_bps_noop_on_empty() { - pretty_env_logger::try_init().ok(); - let (_, _, next_block) = test_state(); assert_eq!( Protocol::ensure_next_bps_is_valid(&next_block.inner_lite.next_bp_hash, None).unwrap(), @@ -588,7 +540,6 @@ mod tests { #[test] fn test_outcome_root() { - pretty_env_logger::try_init().ok(); let req = r#"{"outcome_proof":{"proof":[],"block_hash":"5CY72FinjVV2Hd5zRikYYMaKh67pftXJsw8vwRXAUAQF","id":"9UhBumQ3eEmPH5ALc3NwiDCQfDrFakteRD7rHE9CfZ32","outcome":{"logs":[],"receipt_ids":["2mrt6jXKwWzkGrhucAtSc8R3mjrhkwCjnqVckPdCMEDo"],"gas_burnt":2434069818500,"tokens_burnt":"243406981850000000000","executor_id":"datayalla.testnet","status":{"SuccessReceiptId":"2mrt6jXKwWzkGrhucAtSc8R3mjrhkwCjnqVckPdCMEDo"},"metadata":{"version":1,"gas_profile":null}}},"outcome_root_proof":[{"hash":"9f7YjLvzvSspJMMJ3DDTrFaEyPQ5qFqQDNoWzAbSTjTy","direction":"Right"},{"hash":"67ZxFmzWXbWJSyi7Wp9FTSbbJx2nMr7wSuW3EP1cJm4K","direction":"Left"}],"block_header_lite":{"prev_block_hash":"AEnTyGRrk2roQkYSWoqYhzkbp5SWWJtCd71ZYyj1P26i","inner_rest_hash":"G25j8jSWRyrXV317cPC3qYA4SyJWXsBfErjhBYQkxw5A","inner_lite":{"height":134481525,"epoch_id":"4tBzDozzGED3QiCRURfViVuyJy5ikaN9dVH7m2MYkTyw","next_epoch_id":"9gYJSiT3TQbKbwui5bdbzBA9PCMSSfiffWhBdMtcasm2","prev_state_root":"EwkRecSP8GRvaxL7ynCEoHhsL1ksU6FsHVLCevcccF5q","outcome_root":"8Eu5qpDUMpW5nbmTrTKmDH2VYqFEHTKPETSTpPoyGoGc","timestamp":1691615068679535000,"timestamp_nanosec":"1691615068679535094","next_bp_hash":"8LCFsP6LeueT4X3PEni9CMvH7maDYpBtfApWZdXmagss","block_merkle_root":"583vb6csYnczHyt5z6Msm4LzzGkceTZHdvXjC8vcWeGK"}},"block_proof":[{"hash":"AEnTyGRrk2roQkYSWoqYhzkbp5SWWJtCd71ZYyj1P26i","direction":"Left"},{"hash":"HgZaHXpb5zs4rxUQTeW69XBNLBJoo4sz2YEDh7aFnMpC","direction":"Left"},{"hash":"EYNXYsnESQkXo7B27a9xu6YgbDSyynNcByW5Q2SqAaKH","direction":"Right"},{"hash":"AbKbsD7snoSnmzAtwNqXLBT5sm7bZr48GCCLSdksFuzi","direction":"Left"},{"hash":"7KKmS7n3MtCfv7UqciidJ24Abqsk8m85jVQTh94KTjYS","direction":"Left"},{"hash":"5nKA1HCZMJbdCccZ16abZGEng4sMoZhKez74rcCFjnhL","direction":"Left"},{"hash":"BupagAycSLD7v42ksgMKJFiuCzCdZ6ksrGLwukw7Vfe3","direction":"Right"},{"hash":"D6v37P4kcVJh8N9bV417eqJoyMeQbuZ743oNsbKxsU7z","direction":"Right"},{"hash":"8sWxxbe1rdquP5VdYfQbw1UvtcXDRansJYJV5ySzyow4","direction":"Right"},{"hash":"CmKVKWRqEqi4UaeKKYXpPSesYqdQYwHQM3E4xLKEUAj8","direction":"Left"},{"hash":"3TvjFzVyPBvPpph5zL6VCASLCxdNeiKV6foPwUpAGqRv","direction":"Left"},{"hash":"AnzSG9f91ePS6L6ii3eAkocp4iKjp6wjzSwWsDYWLnMX","direction":"Right"},{"hash":"FYVJDL4T6c87An3pdeBvntB68NzpcPtpvLP6ifjxxNkr","direction":"Left"},{"hash":"2YMF6KE8XTz7Axj3uyAoFbZisWej9Xo8mxgVtauWCZaV","direction":"Left"},{"hash":"4BHtLcxqNfWSneBdW76qsd8om8Gjg58Qw5BX8PHz93hf","direction":"Left"},{"hash":"7G3QUT7NQSHyXNQyzm8dsaYrFk5LGhYaG7aVafKAekyG","direction":"Left"},{"hash":"3XaMNnvnX69gGqBJX43Na1bSTJ4VUe7z6h5ZYJsaSZZR","direction":"Left"},{"hash":"FKu7GtfviPioyAGXGZLBVTJeG7KY5BxGwuL447oAZxiL","direction":"Right"},{"hash":"BePd7DPKUQnGtnSds5fMJGBUwHGxSNBpaNLwceJGUcJX","direction":"Left"},{"hash":"2BVKWMd9pXZTEyE9D3KL52hAWAyMrXj1NqutamyurrY1","direction":"Left"},{"hash":"EWavHKhwQiT8ApnXvybvc9bFY6aJYJWqBhcrZpubKXtA","direction":"Left"},{"hash":"83Fsd3sdx5tsJkb6maBE1yViKiqbWCCNfJ4XZRsKnRZD","direction":"Left"},{"hash":"AaT9jQmUvVpgDHdFkLR2XctaUVdTti49enmtbT5hsoyL","direction":"Left"}]}"#; let p: RpcLightClientExecutionProofResponse = serde_json::from_str(req).unwrap(); @@ -603,12 +554,7 @@ mod tests { assert!(root_matches); } - #[test] - fn statically_test_lens() { - println!("approval: {:?}", std::mem::size_of::()); - } - - // Missed a part of LC spec regarding BPS handover, only the MAX_SEATS need to be taken + // FIXME: Missed a part of LC spec regarding BPS handover, only the MAX_SEATS need to be taken // TODO: change epoch_bps to only store MAX_SEATS and then for next #[test] fn test_enough_stake_in_next_epoch_not_this() { diff --git a/crates/protocol/src/prelude.rs b/crates/protocol/src/prelude.rs index 10089e0..9036d5d 100644 --- a/crates/protocol/src/prelude.rs +++ b/crates/protocol/src/prelude.rs @@ -1,5 +1,6 @@ pub use anyhow::anyhow; pub use anyhow::Result; +pub use itertools::izip; pub use itertools::Itertools; pub use log::{debug, error, info, trace, warn}; pub use near_primitives::types::AccountId; diff --git a/crates/rpc/Cargo.toml b/crates/rpc/Cargo.toml new file mode 100644 index 0000000..4641fba --- /dev/null +++ b/crates/rpc/Cargo.toml @@ -0,0 +1,36 @@ +[package] +edition.workspace = true +license.workspace = true +name = "near-light-client-rpc" +version.workspace = true + +[dependencies] +anyhow.workspace = true +async-trait.workspace = true +borsh.workspace = true +either.workspace = true +futures.workspace = true +itertools.workspace = true +log.workspace = true +near-crypto.workspace = true +near-jsonrpc-client.workspace = true +near-jsonrpc-primitives.workspace = true +near-primitives-core.workspace = true +near-primitives.workspace = true +serde.workspace = true +thiserror.workspace = true + +# async-trait.workspace = true +# axum.workspace = true +# coerce.workspace = true +# config.workspace = true +# near-jsonrpc-client.workspace = true +# protobuf.workspace = true +# reqwest.workspace = true +# sled.workspace = true + +[dev-dependencies] +hex.workspace = true +pretty_env_logger.workspace = true +rand = "*" +serde_json.workspace = true diff --git a/bin/client/src/client/rpc.rs b/crates/rpc/src/lib.rs similarity index 55% rename from bin/client/src/client/rpc.rs rename to crates/rpc/src/lib.rs index de9bd8d..f36e348 100644 --- a/bin/client/src/client/rpc.rs +++ b/crates/rpc/src/lib.rs @@ -1,16 +1,22 @@ -use super::message::GetProof; use crate::prelude::*; +use async_trait::async_trait; use futures::TryFutureExt; use near_jsonrpc_client::{ - methods::{self, light_client_proof::RpcLightClientExecutionProofResponse}, + methods::{ + self, light_client_proof::RpcLightClientExecutionProofResponse, + validators::RpcValidatorResponse, + }, JsonRpcClient, }; -use near_primitives::views::LightClientBlockView; +use near_primitives::{ + types::{validator_stake::ValidatorStake, ValidatorStakeV1}, + views::{validator_stake_view::ValidatorStakeView, LightClientBlockView, ValidatorStakeViewV1}, +}; use std::fmt::{Display, Formatter}; -// TODO: retry, failover rpcs +pub mod prelude; -#[derive(Debug, Clone, Deserialize, Default)] +#[derive(Debug, Clone, Serialize, Deserialize, Default)] pub enum Network { Mainnet, #[default] @@ -38,6 +44,7 @@ impl Network { } } } + impl Display for Network { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { let s = match self { @@ -68,11 +75,28 @@ impl NearRpcClient { NearRpcClient { client, archive } } +} - pub async fn fetch_latest_header( +#[async_trait] +pub trait LightClientRpc { + async fn fetch_latest_header( &self, latest_verified: &CryptoHash, - ) -> Option { + ) -> Result>; + async fn fetch_light_client_proof( + &self, + req: GetProof, + latest_verified: CryptoHash, + ) -> Result; + async fn fetch_epoch_bps(&self, epoch_id: &CryptoHash) -> Result>; +} + +#[async_trait] +impl LightClientRpc for NearRpcClient { + async fn fetch_latest_header( + &self, + latest_verified: &CryptoHash, + ) -> Result> { let req = methods::next_light_client_block::RpcLightClientNextBlockRequest { last_block_hash: *latest_verified, }; @@ -84,20 +108,16 @@ impl NearRpcClient { self.archive.call(&req) }) .await - .map_err(|e| { - log::error!("Error fetching latest header: {:?}", e); - e - }) - .ok()? + .map_err(|e| anyhow::format_err!("{:?}", e)) } - pub async fn fetch_light_client_proof( + async fn fetch_light_client_proof( &self, req: GetProof, latest_verified: CryptoHash, ) -> Result { let req = methods::light_client_proof::RpcLightClientExecutionProofRequest { - id: req.0, + id: req, light_client_head: latest_verified, }; self.client @@ -109,4 +129,41 @@ impl NearRpcClient { .await .map_err(|e| anyhow::format_err!("{:?}:{}", req.id, e)) } + + async fn fetch_epoch_bps(&self, epoch_id: &CryptoHash) -> Result> { + let req = methods::validators::RpcValidatorRequest { + epoch_reference: near_primitives::types::EpochReference::EpochId( + near_primitives::types::EpochId(*epoch_id), + ), + }; + log::debug!("requesting validators: {:?}", req); + self.client + .call(&req) + .or_else(|e| { + debug!("Error hitting main rpc, falling back to archive: {:?}", e); + self.archive.call(&req) + }) + .await + .map(|x| x.current_validators) + .map(|x| { + x.into_iter() + .map(|x| { + ValidatorStakeView::V1(ValidatorStakeViewV1 { + account_id: x.account_id, + public_key: x.public_key, + stake: x.stake, + }) + }) + .collect() + }) + .map_err(|e| anyhow::format_err!("{:?}:{}", epoch_id, e)) + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_name() {} } diff --git a/crates/rpc/src/prelude.rs b/crates/rpc/src/prelude.rs new file mode 100644 index 0000000..5553d87 --- /dev/null +++ b/crates/rpc/src/prelude.rs @@ -0,0 +1,16 @@ +pub use anyhow::anyhow; +pub use anyhow::Result; +pub use futures::FutureExt; +pub use futures::TryFutureExt; +pub use itertools::Itertools; +pub use log::{debug, error, info, trace, warn}; +pub use near_primitives::types::AccountId; +use near_primitives::types::TransactionOrReceiptId; +pub use near_primitives_core::borsh::{self, BorshDeserialize, BorshSerialize}; +pub use near_primitives_core::hash::CryptoHash; +pub use serde::{Deserialize, Serialize}; + +pub type Header = near_primitives::views::LightClientBlockLiteView; +pub type BasicProof = + near_jsonrpc_primitives::types::light_client::RpcLightClientExecutionProofResponse; +pub type GetProof = TransactionOrReceiptId; diff --git a/crates/test-utils/Cargo.toml b/crates/test-utils/Cargo.toml new file mode 100644 index 0000000..9c51369 --- /dev/null +++ b/crates/test-utils/Cargo.toml @@ -0,0 +1,31 @@ +[package] +edition.workspace = true +license.workspace = true +name = "test-utils" +version.workspace = true + +[dependencies] +anyhow.workspace = true +borsh.workspace = true +derive_more.workspace = true +either.workspace = true +itertools.workspace = true +log.workspace = true +near-crypto.workspace = true +near-jsonrpc-primitives.workspace = true +near-light-client-protocol.workspace = true +near-primitives-core.workspace = true +near-primitives.workspace = true +pretty_assertions.workspace = true +serde.workspace = true +thiserror.workspace = true +# async-trait.workspace = true +# near-jsonrpc-client.workspace = true +# protobuf.workspace = true +# reqwest.workspace = true +# sled.workspace = true + +hex.workspace = true +pretty_env_logger.workspace = true +rand = "*" +serde_json.workspace = true diff --git a/crates/test-utils/src/lib.rs b/crates/test-utils/src/lib.rs new file mode 100644 index 0000000..dc314bd --- /dev/null +++ b/crates/test-utils/src/lib.rs @@ -0,0 +1,99 @@ +use derive_more::AsRef; +use derive_more::Into; +use near_light_client_protocol::{ + prelude::{BasicProof, Header, Itertools}, + LightClientBlockView, Protocol, StakeInfo, ValidatorStake, +}; +pub use near_primitives::hash::CryptoHash; +pub use pretty_assertions::assert_eq as pas_eq; +pub use serde::de::DeserializeOwned; +use serde::{Deserialize, Serialize}; + +#[derive(Debug, Clone, Serialize, Deserialize, Into)] +pub struct LightClientFixture { + pub last_block_hash: CryptoHash, + pub body: T, +} + +pub fn fixture(file: &str) -> T { + serde_json::from_reader(std::fs::File::open(format!("../../fixtures/{}", file)).unwrap()) + .unwrap() +} + +pub fn lc(file: &str) -> LightClientFixture { + fixture(file) +} + +pub fn main_last() -> LightClientFixture { + lc("main_2.json") +} + +pub fn main_next() -> LightClientFixture { + lc("main_1.json") +} + +pub fn main_first() -> LightClientFixture { + lc("main_0.json") +} + +pub fn test_last() -> LightClientFixture { + lc("test_2.json") +} + +pub fn test_next() -> LightClientFixture { + lc("test_1.json") +} + +pub fn test_first() -> LightClientFixture { + lc("test_0.json") +} + +pub fn view_to_lite_view(h: LightClientBlockView) -> Header { + Header { + prev_block_hash: h.prev_block_hash, + inner_rest_hash: h.inner_rest_hash, + inner_lite: h.inner_lite, + } +} + +pub fn mainnet_state() -> (Header, Vec, LightClientBlockView) { + pretty_env_logger::try_init().ok(); + let first = main_first().body; + let head = view_to_lite_view(first.clone()); + let bps = first + .next_bps + .unwrap() + .into_iter() + .map(Into::into) + .collect(); + let next = main_next(); + + (head.into(), bps, next.body) +} + +pub fn testnet_state() -> (Header, Vec, LightClientBlockView) { + pretty_env_logger::try_init().ok(); + let first = test_first().body; + let head = view_to_lite_view(first.clone()); + let bps = first + .next_bps + .unwrap() + .into_iter() + .map(Into::into) + .collect(); + let next = test_next(); + + (head.into(), bps, next.body) +} + +pub fn test_state() -> (Header, Vec, LightClientBlockView) { + mainnet_state() +} + +pub fn to_header(bv: LightClientBlockView) -> Header { + Header { + prev_block_hash: bv.prev_block_hash, + inner_rest_hash: bv.inner_rest_hash, + inner_lite: bv.inner_lite, + } +} diff --git a/fixtures/86673090.json b/fixtures/86673090.json deleted file mode 100644 index a1c7b40..0000000 --- a/fixtures/86673090.json +++ /dev/null @@ -1,140 +0,0 @@ -{ - "approvals": [ - "ed25519:5EyE23RLUwqdJkPW9762sRosM838bUtn5SS2mt8e5xYriG4UfxVbEUaKPAdc9tGQkAem58hYDxvpBMoAPd2GT1sD", - "ed25519:4Mpvtnp6gASgz3pGApMG4P1Tvpxj3zkVmbqoNKvyWBrhMk8G8PdsaZyCHqzYwp43yCLb4dCFwsdDnJPmpGPdCFqq", - null, - "ed25519:4WT7358xtNLpgayEcvzRK4q3j59yVPfMnVK6rhWxUhhHvvyVmY8Q2aU5RP9v4TbGvuH4ETyJfYqu59ne5wCKcYp7", - "ed25519:5fHqyG14B24Q8BUu4dmi6VL8HLCQLu5J4WU9DmpxVQwysiEzUBBY3Gum4xHf21ordQdYUnKt43AewVqLMEwqgmfh", - "ed25519:3hKSLU2WSUitFSfiTzkvEeqTseqzn6L6Y2bFEB1zrNnCzTTmk58FVJBzzE69DLaZqfRntarqjQF2tsaiWkReaqVt", - null, - "ed25519:ccRZRiG1cjHGkshaFEbnbwdvZZBhMoQhUeupHh9rAo4VPU3XTE7merRoJRQn22uG6kcgqaENfDu8hitkeLz9h5K", - null, - null, - "ed25519:3QbVQUBnkYVfdxshCFcykn2sKeXnBsVEGQZ2aE1FMVs9Dg8fRQNBiE1znXRpRuPEFPih8HB2M8NvpCHnXVHThPEQ", - "ed25519:4FxR7aNf1B4tPHE1gPW4w5fdn5omZhgvhrFoKn9CsWxCDCnGk12mZBNJengBC5rP9yixJSN15Dj2UMFgQogeCgmo", - "ed25519:3YgSdETqTwQnaZoBM8y3W8942sLZmAgGzNXfbeV96ehXQ5L37Ye19xMng27U9cSbDRm6KhSo3DdSLBhM5PcsCJwt", - "ed25519:47Q9p7DCpDz3CFYhwSUPYymXq9xUhXZ2gAhx6ftrZFVng73n6SnBSoBUeNyLoxWooEdLzeeX6SC1gC5Gm4TdHgkH", - "ed25519:4Wb5Kjk81PYjEYPzSuTdhref8m2vdTU6aRZNFwkdrf6yDA27JhQh4QshxUqND2RGt5aygVQCQaSQE2ReWL89GaDu", - null, - "ed25519:2GpV67gpeJ5BQLkrsEQXmWvxVJEYo5LRTYKFdD1NJAW8sWuAqBTG1x86MWgFpwsgSRxt8D6BLDupVzh9uudDpbCg", - "ed25519:2QZtay8pcUY3Vd9C7Cx48rQMqMGDQSTySB9qzNtcmSyGFjCx9BTwKoQzHZNK4yMvwxTYLJr2fRANW2EYN3TEWyjK", - null, - "ed25519:4CGjzmDLbVXP5DoDrvsyYPivQiHWZtQetGRgayDisSLGM9UWVkyoMjLuohpcpYn7xjMv4zD3JDtxUVddxxmBsyky", - "ed25519:5TnzJtqpNBtBtajMV2ScZkxZ5Luyo7wgn1HZqEQMS1KaqGdtnFiSP6rR86Fk3ZimKciMexhdP8bJVKf5PRDmboqS", - "ed25519:5kFTm2sBffWSpoST9yCe28cZYFjWajdrRbBmA6aG7YCfcZmEMRbrauGepr4Kk4rUJDSy8NhDMraGkRh1j7oo1FqH", - "ed25519:3Bngm2RYrbbjUAThZ9KZpZXXh7H6GNTWdFr1ZBqxMVvPmPi9Fhnwsr8EsEZ39PavdN6UGgqPyPHXamxkb7DjxqAA", - "ed25519:5HQRYAR1Fjw8JEBGV6SBbUSoEvreVPXK4b6oBM5jBfNNTBG3rjngM2Peaox6D7yjowJfNgGonyA3UbhYbE9ZH9KM", - "ed25519:4dAS3dWvQrzZR4MGmVy6zbtvwdN9ZFRB5StbreTvDMQPsksXdFdMF3inW2GPJQv4d79yQMoXKLYyxzVE6hCUg6KY", - "ed25519:2BJwRznSvYZ8NYrh6q98ex4qQak7F1bgvKu1hds5B75ZBU7zq9RwEycJZYD2Y8NefkoxEj9ufc9oeDuXMb2bg5YT", - "ed25519:5KmYT9UNwwP6zCcKzYU4AgaKmS6EX8C9cRkcMsNaL1cNWWGLy3PBgoqvW2HHAuHg9bckSyKLxFS67BBvga5Evhqp", - "ed25519:465bTrzK51JoHU12g3ZGgnVDUt9iMzw9GKPqYbco5J2cSZGSfBEwvgN4tQn41k5HuR3DnXf63EKromZRASHmQ1Ns", - "ed25519:92UPamPaC9aubd3CV5n1xiY4n9Q56gK6N6TxGMFNuF4QPfxiTZgNTUDEqbERjd5Xr4chF9QgYHv21UYDzJLLZRF", - "ed25519:a1nHUsQcyBFDxeMqxLqrsdUGhUgZGZ9yiUAuyXP6Gk1zaaMQXzGEUW91Vytbat6wH2TYT7izAd2ocJRzHmmGFun", - "ed25519:DiqvANzRMsoVv153ktRyrdXGwzUzPEp5M2ZzMtiwHvSQ7auXM8yBgxBzV9zb4ia2KU1E2uKM3RY7m3jJQGUHWEy", - "ed25519:2uuMLXWZVTSu7F1mYna3CwMEupPByAE9Coayyvx7jY1jXJfJaT1y1DihASgcAgZdLPe9i7vm2G1rjakrmbwLXDF9", - null, - "ed25519:66ATciiU99d2RPMwnabuYE9q3hSEd3SeHefYcW2aAhNz8qZKghrmmBnRbe8qdrXbvvCaMF8oApGzK41RZixVqq2t", - "ed25519:5P5LM6xVAP6rLCMbX8aMUqUDD3Azd1BrayVSrLDrFBdd7vTZc8HVdy5uNVfQhf7kfUQTNw8YzNGaxM6WKGximP73", - "ed25519:P3JF33m6nj8L5xr2D5g8MQCbszaVAap4VWHuas66fPDArk2Vg6mKggKeeiZDvX5wtGUGnB6DWesz38YzyWPiPRR", - "ed25519:5dtM1KUy799LtskhnXZWd5ck8FdnGaCTCozXALo1KkMquWiRTSRX9yTovqs3fXfnyXPRBK8jg4Txxx7cJZjG7joQ", - "ed25519:GHsDcmB47Bv4kyThnYP4uMyAS3Ww5G698f2dxUbTMBZfptGJLsM9zEQsY2xWuN38Hu3rmvhDSpJodki4tFB2Yq1", - "ed25519:3bexxXkRpDdij9wBbwd37fCtUvSQJ9PZYALA9gN26nU5es49cYrVmPgBLDpvU8YhpGvsagW5AyWMUN6SfBbcovic", - "ed25519:4rUV6GnHkSejhb7PNBVrFafZp9eADiX6UWw3bFRSUbachSqcz9de8iJUtLZCmEdT5T3k3FYAnm3R9kZLwksh2kUx", - "ed25519:4RjXNdDiqWi7LxkHMDjM2h7ynksWqqyKC4GvzLqxbykqE6Vp7jKLcDsHFbjy5Nqa5DTqhfudji5nRVvfcXcqte12", - null, - "ed25519:2QZtay8pcUY3Vd9C7Cx48rQMqMGDQSTySB9qzNtcmSyGFjCx9BTwKoQzHZNK4yMvwxTYLJr2fRANW2EYN3TEWyjK", - "ed25519:bVXpA9Ph7bHtsRDZNfYSyCcEaXUgR6iydyuH9ZXyuZKedNBLSEXFrGEVtYo1te3ekz364u6GunaYWJNWR6dPEys", - "ed25519:4Q9BqoukYXS9fdfzJiXQMgsgLKieb1JfAa723tJ54HKg2Vx335yPxbLYtdau9bGMosVHbHE7nuC2xhZEkzaaAjwE", - "ed25519:2MrSHSYAadVazPE5GVpmmG41onoJRvFYDcAV4GWjYYX59GToZYBkN8GdZSr6MPA4GbUmMXjwq485w4QXGEyCzS6G", - "ed25519:2sjKECxBGDCMuLhbHkjNHfPeQPtUf1x5HUyB9izA3UHLXHtZJVYv7nxGfLFgeg1kXJ48PNmXqrQDX9gTKkJ2HJ49", - null, - "ed25519:ApLhgH5mWNn5FMMtNuqC6R8ufebwLvuWucboPSxp7hG1n7nuPmEoTfiY9eXE5CU61atJF6oqDXqSe1eT5gxWkxu", - "ed25519:3YfQJWcq87nvTKXDNWoSoU1Dd45bepoFsLogEBEKDM6dwVk3VwVEdbeKewfCcxqRWg6ToXL4y5cfGTP8K6Yv6UeU", - "ed25519:HGBjthmSMR1mc6by4VZys4BJJFFnFXL2FP1q8ZBo6YAUiDe5gjf7XXs3thoJQ8gTM2KSocaC79hJ6UHkzzyhQ46", - null, - "ed25519:65YrKCGddddFnXiNQM7h6gKnMAoum8gxRcF7DXkvq5c9926Rk2PjmKsTTPZFKdN5xT7F37FxRxvhpmq8FNmFgPKh", - "ed25519:2GhXAPXFSKMLCPPJBwifwt2xgMT3gxi8idz8uTahkFjejGVWLKWYhs6pE5CVVTjSrxYQVLbPWYwVbi4xzoGCvyX5", - "ed25519:F7mcPLLpVCjZBueeJSWTpVjUujeVtEWVdUUZAZngmHrctiEsQ3GPQG4tYAb4eBMqaDMR4CsaMPeDcvvucqQvS5c", - null, - null, - "ed25519:45MV7qHAkiyw3CHrSfedqB4iyQob7wGKE35w26SL2naWUEBxg68P4dy5xR8bTEzRBVjwyA9GB7jjk1GPwV4EwoBf", - null, - "ed25519:2EsSmrPm9GjbTDYUhg2ZrhT9iUpLvyuPqdeaY5VqpD6q8h4xQwECLMLBCydFurP6JR3eU4LqSvLitQJynrhqdjD5", - "ed25519:4P3EfGVSnumrypgbUY8ssc3zvGhHM67nw5pvJ6zAZLq3kMkXwnpiqoUQjgKL6ajRBUWwhJV5o3FKjvDoU3g4ZZJR", - "ed25519:5jcePF2VUe9K3UMzwkq323cLrXBG86EDz5tLoZpXBnmJ2Zq5BasYZpVQPjA33HFtoR93PH87mWUPSSyQwzrcfVme", - "ed25519:3mKQq2rUrSNCDkTBKyLFhCz2DsuyAcssmmP5kdgjLPQiG2kHpXEMQDFMo1g8RNZducCcQgFePUMNwJXMvqpp5DqG", - "ed25519:5hSuo3CxpWxEwaREGrsPpQyN8xqguJRQ1d7bRAT7QnLYQjLF1RR2xEAT5ouDSjnyDmJ9a3gd2uNTMsV6g7W3rL7X", - "ed25519:kHE4wh9kBpnzuBSHmsptMkdMZigqACiV7NMzCrGPRjrR9j9sNx7sLowhjtKxLkGvrAdaNYw2zFXQjE6jsBE2QAJ", - "ed25519:4QV34kRmmiWAugTS88AD6rSek3dgpEAZspHhvkwXrckP6carKCqngi1iHw1746395FWHhwTR13WQDeRXQV2VqYdY", - "ed25519:2ndsCzbHmr8sTVJ9qhNaD2DPv8zzmXLmCV38kSzUZv6Wur7C14YafejLn8Tbde9vgkngRv9U8JiCppUTs58rGPmw", - "ed25519:t1ot7rhp9hwRYsq28vLCijqxSc1RpX8JY9hxLaWmLWU4iAeXHs4XiGXyYr9sEtpxycENsaEyepRkGTnDZnk418p", - "ed25519:534aJtTXJVX8xCcgTVKLrs5XQeJJJtC8DczZVTCHVXb2s8o9KKxoFpY1jC4UktsJqhc61Gk1mLAn4v5omBDERdG1", - "ed25519:3uRa6zZsn5ZgsBuDSVQvDcUaxafvzhbuCFwWDeciW8Pwj9Sp9h851uePXRFXK3KNeCHYxFBDFuWnJBNipBnWhhPu", - "ed25519:f6h6a7pyNuHcvTUjiHJiHHhWdTko3vJe9CwVigse9HHbeJZyRGXZzneb8vugyRYuFc4EuSUqFNjKUWTNBh31W94", - "ed25519:3ejr97xuzX5MYJf3Ecsjb5JcxnWdG7zKYmY6asnNhLCCF1tcHKmSkzBy49ZWT1SM8YeJ53CMpce7DvAYSZiyik5H", - "ed25519:2LhrZgxTqErqwp7Fa4KGcTXKvn3nUnVvehvZEMtyTb9jG1eac4x82sHjrMC4cEQHk8JbNEiUWH2ymGkaAoR9F1LE", - "ed25519:4fUzGDTBNRCV1UoQ9Z7RSpGDnnd8DSw1NJBJ3QBtgcqS2mMY7RKSGA45kgmMGuacCeEoV7N4ozJJGmZmfXUmz4Vu", - "ed25519:kFrKBXb7WwhFL7bVwJiaKbeqfbGrqYSux8knu7quUNPRy5MiPoFyXnX5L7dvfp39yGCv3ueFvyJNt3JYNG2NVoz", - "ed25519:428dbpp38MZCT3iVYdHk1hBNi3SaZkf3BVPQzzxtQkeBEB23ciySw22ffsZZv8trX2fAcFuucnvDb6oDwvJ1MHyV", - "ed25519:p1kemVQixDh9GWc2hwFAFUNcMtHPHeXenawZyc6j1FEK4rtt1TB58PmvGB31mgqBcWVpfPpKtJe55c3ZLFTM3Vg", - "ed25519:64mijUyNR87k9Phq4YxC3EDog9cMqchXqGjszpHShdcGcs5D6j3h5jXCw2Z1KR4Ax2b3XWfg5Js1P2qxK26rnHZM", - "ed25519:4pqCeceFPwfjmVRzu2wn7RwM57pthbR3gbhvQHwvhMh8qkRbHwqxRgwypELatzHZipNYWyKUnGmkXCv7E6rawRSb", - "ed25519:3HQpQKBZH4A5XTRZ8KQgF9zM4oPZ9Lk5wvVsGiB4Ytz3WpyXnTG4EwwwxMjcLR5FSDTvGsJwWeUFRNbFt5UCazyV", - null, - "ed25519:2mfYPj9uc5Wj52Ei4yF7MdQu7HKyDQCMEtK2UYusFSi8eNamsVrsBpkhQK1sqQBYrURBMsyAbmDR7QkShn9UMJCS", - "ed25519:4jim8smGkvi3PscmJzaQrueshK2aQwDWjnLoz5fiUbAVpgbcj3P1JKmrmS445k2TUux7c13pSkE5qoF1NzYKmJeh", - "ed25519:4yWBe1o8GFkjEiso7c1PszL5LLMMDJoNvjhhFxPi6m3frKvDJmTFqALMQQBNSvTvcC9c7yMdGjf54cqLHfJ5qaRE", - "ed25519:4f13JLcebss9Af8XjBvVuskFRDgoy9rzLjBmd5BfkezPniwCAu23WcUjyhSkH6bApDf9jmCTiBR9N2BVWMkgSsQD", - "ed25519:34M1sQnVX4SrbLFLgNvc6YnBiTQZs8Z5Xg12PkjuM9YsSwDrg7JutsihTFSoZFASfPiaPrSLavB1Pi2XfZ885Vaj", - "ed25519:2wsDUAVZH6kZuHMurdBvEcgoc1pnoCXG4aF8ZhP9go5zVf9mFN2733wHypGh53hoWSK4Ybo9SfpErxLr1iPFQ3wD", - "ed25519:3je7ZxGKJVg1YvvwJ3e9RUNnsWSbvxnseUxu7A7gToJHQpBS7CGinH9BdRMjGdof1xnpropj5HKckHfxmwSnwfUw", - null, - "ed25519:31Kf4VqQ9N4icR6eHh9CrySfCDBmdo99zd1pJnumAjEiAYrRtTHXuTMXteq3GPGRGH1RoBUZoNHuoVR6cPFyE32z", - "ed25519:DqH33ngukpfKnVHyUNyQRssV2B6E39dQvPQcgprmjutV5xBfNNiYe9rk7BXdahEuCrV6rDbeRwP23gkpxyxhrUL", - "ed25519:4M3qQ2ciJnpsuuSnECYdmF9MTTj1tMZJ173xyWg8xELS14yUjgwKzXeTRYcttTWLW81Dr81PAUhxZUytmFqA1SRC", - "ed25519:7itcQvk7QKsiVEfKX5X7TfzBetxff2h4ezXfnwYTprhJH3mkh4wcRCSTcRJBqy6tLKHCfju7LeuSGTWWDRubqAs", - "ed25519:5AW64AoxQXsvRvzBX8nGAdKb89N2sM1DUfykPxHYYiKuNPW5bFBKDfZ4jA8podApKy1bkv4J3MHz6YxGaqsqmj3F", - "ed25519:36NdfXxtNavZGu7gfuA2D7rv5bxSsjUaM55TYwHiiT1ZbRxLmMu35kF6ck3zATA7f3iuEHyYAd3HUxzFP5arg9Pe", - null, - "ed25519:43y1TuLutVXWfXGE8jy3at38Rb2a6SR9WVzfgYt3GMrhg4cSN2ufczPy3UbBmyELEmPcryRtdbtg2MwSNWNXxWRj", - "ed25519:2i3PEqDsTVHPA6QUSH1ytVqBvzz5jtGSsriH8Z5qE6Mgn74ExNcTZx3SzvVBzX5Cx5EmVfcvvC2TMGg2PE1mzk5n", - "ed25519:CwvFG636dE7Y6ryYR483aDBH1vRNZbdR1ui4rz8TkFzSpmEAVzQ2ksfzQNxRgunLgG4ALm3XrXpPhTvUTVbUaRX", - "ed25519:4ZdqT5fbAAx4vWjb6dKJTwfsEbavAE7KV3QPGgnLq2mZozFLEdaG9wVaRRdjtriyLFq11qsW9mLjc89PC8msgFmf" - ], - "block_merkle_root": "G5QHBQ8qV2s65Ua7hEbChRggEZdMAuGQEWLcwJsHu6Hp", - "block_ordinal": 76633912, - "challenges_result": [], - "challenges_root": "11111111111111111111111111111111", - "chunk_headers_root": "5nRBSR5hqjQucDmP6xDT3fr3QWen96aWnq8jXAGNpnug", - "chunk_mask": [ - true, - true, - true, - true - ], - "chunk_receipts_root": "UBpXxifFY7Z4LE5UFB4x5tWYquiKHSCc9VqTLuNAWUf", - "chunk_tx_root": "F2chGkeJdCh7J4HYchAJV1Ku3TFk12RZKyC9TpYEGgz", - "chunks_included": 4, - "epoch_id": "FhmQexFCMWUBxNCWKgEKwvPbSWA4ccGMqJ7S5uTAdYYp", - "epoch_sync_data_hash": null, - "gas_price": "100000000", - "hash": "7xxCpbHg44N1jDw25MBqR5JuLCPBzzPenJS18jFmfyFd", - "height": 86673090, - "last_ds_final_block": "7aLAqDbJtwYQTVJz8xHTcRUgTYDGcYGkBptPCNXBrpSA", - "last_final_block": "8nnk9KLfnBdFbMeCSWHB2eEdZ1B7BcAzUxuX7Hcx1ZS2", - "latest_protocol_version": 58, - "next_bp_hash": "GjQ77x2L8jPUFa3Gfr5ASMrQ8d9jvQAQtmz4nSjxEibC", - "next_epoch_id": "5h3PDeeRRQjgyNvzbKepLcBJT3jWJdhu662LzfJGC8ub", - "outcome_root": "8cmecZJqqg6YE9fijMQaPqUreHp97ToB8r5kCn1MmKJ1", - "prev_hash": "7aLAqDbJtwYQTVJz8xHTcRUgTYDGcYGkBptPCNXBrpSA", - "prev_height": 86673089, - "prev_state_root": "FozYhU86PJriD5jz7sq1EZTdewUxsyxa4Raftk8t8h9S", - "random_value": "D1tx6xhfAR4cf5UMsrVou8Bb2FMc9JrfswrHs4kwawu7", - "rent_paid": "0", - "signature": "ed25519:2SHXz3ygwZGtzr6k8pmjZ68Pti2J72ChyF6tE4ftcVCYKqm1sTxBjnQsb6a5NrTjEfZtFoYkN1MHL9EGqwsMLEPy", - "timestamp": 1678091174831592651, - "timestamp_nanosec": "1678091174831592651", - "total_supply": "1123870259780195549872917842454102", - "validator_proposals": [], - "validator_reward": "0" -} \ No newline at end of file diff --git a/fixtures/86673091.json b/fixtures/86673091.json deleted file mode 100644 index 1eb2fb3..0000000 --- a/fixtures/86673091.json +++ /dev/null @@ -1,140 +0,0 @@ -{ - "approvals": [ - "ed25519:4hysQKrXdSAECK3NHuPCmSDwvWrxsjwu8sT4eDwuNSpHp7h2bfiPR7XdrcuyK87oPCUEoaKDjZx296VWJL888qmk", - null, - null, - "ed25519:5CuD2zeN5iQ2KWQGfafm6p37STZeVR7cHsgw3JxT52wpTkBzz8X3PjM9Bf2zSt46y5Aj5KGY2i1U5ocSBu71affo", - null, - "ed25519:2jdpy3KL2WNRUssWHLDkS1Ys7RVn3YZUkqHdL34XZs2sYB3HKDBeUGsFQqTB8UdLfDkHFvqeHvBydXVdxLWVSCsW", - null, - "ed25519:4ts2v9hQrqF8rJM3coooXVb8rs5sRxYRu3FXFucEHXX68MBbch8MLmYkRfa3ovTnziob6WvdgsdwroCWnF2NfaRJ", - null, - null, - "ed25519:3j2eobWVUr1G4VmFYSRynWt7a7jJhoMcWrYaAZBSGBxguSkEQ6KXKVjsFrxgKUQm5bbdBEn5XM99ugKhj9mmiysg", - "ed25519:3ExbRqni8qpT4vLnP6RLy8d9FcawgCfh3AsQrpBMT9LAhNTYGXQD22rAvd2Np22RkuTLSozK9kY3TEUiMXL8d5Jv", - "ed25519:4iSqA2tzF5WRRAJB7Bv8EFDU45Gk6krwkV21PvK4VfrMAx6s6389R3V2dEnYR4J1jNUnxXydrMkVhxmPwxRkbnJX", - "ed25519:4J8DARPsFEB5jnFqQDs9vaG4ZuVYSnZPv4kjyNoUXUkEWhuChXx2wgNZ7gqvMBcTMmR3wbmQRtHeW8KL19VMbRRn", - "ed25519:g3LuNHiyXVCv4BMrV8hPsJHUgBDqDfR1NgXE8Q1a1n739rWB61mT4E2WvGXL5RLA479gDpXD7TA9EwGdQHdiSKB", - "ed25519:4Rsp9sVTDyT2qJJyb2ZiHTqsjTRtpoEcVyE9vAC85Q7BfpKKvy9bH4cGcy42ytZBzXsXVNrgbcgCsokLpsHe4pjZ", - "ed25519:Ypypt69K5GasxXTHhMosEVSH1bf4mn8N4MPMwd9Moq6Ht6Qxbbag9Xhpavw8W5jmLDQwLoickSMreRTqDk84kKV", - "ed25519:c95VXgwgWmbocVzChZKfoY1A63EqRB3HDXSDVQp8JQKNCUobmovV57eKDTQMdVLvT5MiLRSsL19EujRdQYmBGRJ", - null, - "ed25519:3S6rvsx92WJkAJ6n4zEHrRu4AFhwxr4yy52tRbjxLysiGcpSQQMGfxHyLKFmmHBVt3Aqz77nwoosU5YAwSbwafCp", - "ed25519:5ddswmCSUMVQyXo1pGAFfJEM7WRGPVW5NJbFSJs7ncjB9jYKvKQAVsDGnx2wPUw1wUngRLKMg3RgNEJZM6JXb7Pj", - "ed25519:3gE4uHPKhJa58w9vRkzW3A2eQ2PTmyPCzgKmXNbFAiSHCdzsE8Bmi1oMLaXUmXmSEBaSQrhLNAayb9YJXEEYCYfF", - "ed25519:4CxDAGhMRrs77qKKXbWtXJncCKM9LpHVacSWLFwgyebV1eyicobUJsC1y45DpKweqXhxVfZXsuEBh24nvadM23Tm", - "ed25519:5sthkhdHNyS449bZ7KFBtCUFbsKxMWVvftwMB81HauNsrEkd3bjq94bqVUWEym1rUPEWR27H8R51WT9Ua2qsxDNS", - "ed25519:2BNuCAQ2cVpCmQ34BkKJvkKb6VPzFDm6q3L4aKurqxbkYbdR1nsH4UhE3EWC2n8Z2GGWizAGKyB5v1MsjhxNvpeE", - "ed25519:3KWeztXE9ziBeLSTQxToLTMfaA4R2jE6AVEpa53FbgxXwcP3KrtveHr5gqeGHiBCKPUc8s4b7hcTHjBK8RW7ArD4", - "ed25519:uAvRRQ1y9YKcqGtBWPuC2W4tHpEXgxpE7pYLURW7Kbxw2mu2dMUSYR4tJi885icP5Cx7AXWoSYE4Yv6Ug4Wg9bt", - "ed25519:5iY5ynmnJZ57LQ5yWxo717bLuSPkt3PuTwuYX9BwXGUcwVsa5bVTRrLs8zvZ2izJyTZugpjmH5ahdELHFJGfgQWW", - "ed25519:5tESvw7wPHPMAhiqty48J3h2fbVwYumMWyFiF6dZR5kvPd8cX7gfXeHMzntdjAxnqQAhUwQyjhPq2VfNCE9Rd9A5", - "ed25519:5CbG2TBqVGHK1H4curT63LCQ4FA6ENM8knS1aV28bQnmZKSaMjat4oGzz4D6V2CX2efwV2nZcNJAPJerSWiHSz4M", - "ed25519:34fF4fQRBVbtvQ56Vm6XRBcyYvMu8z6LrzNWrz2BHEs3dqMyv3fzJMKTNRjm7xuWGer4hciiszj141BuXB7RwAW7", - "ed25519:f3RoSCoQmXpZxVbWs6tPFgjaCXf82DnNoxgze8G183QjXVjZ1iCbwkP15YtrCkQQxSJo8S1nX48FaFwuRexrktw", - null, - "ed25519:21kyxM8TvaBc6PVWW2NSDVmirU98C4CZ4QdfTihwoKbVTnRU74jeMSttVTwtZGxqXVKJeTJ6QSizfkqxGAQFmyZ3", - "ed25519:2aMS6n4KHnrc8mfqQ5KBLVrJeM1huoWuWJW14DSvYTCjY3tBCLM2Xd92xVYaHyfo4oavMaLoVkZysXubo1L7W2PV", - null, - "ed25519:2W2juNiwbhqmxEDXQw4vPVkPufjMpJDUxGEZeKKV4V6bTtyB8mSzrXLEtKsUz4kYv9famJanDNpdJ1f9qWYELD9c", - "ed25519:5PxLWkJ9LbxNoWx81JrkFh4cqYn7FnHt6rVgMrAA6D4iE4DTSdDVJ5yPGa86W9JkmJ99xQU8f3J4RoUhs753rM7Q", - "ed25519:3qiLRz5aKjrsQSADnQ4rMoe51JwPU7bB1MEu8mvzQPLL7B1tkHVw9dBbiSJH9RE8679SYejqLH8Kv4NSkU7H7JCz", - "ed25519:52C8YkYN6mrp2ptMszbt7y7qpYAPuMooaU7AtiAPkidMLm6QsuZRDcZbcpBjfRrETS9f7AW2yrRBajjRkVbEq7AG", - "ed25519:3vWHfV5mmTG1sDWgJFiAsguo2tEb9qKFREKHABE5zgibG4smpboqBMGaxw2MZaAisfRNsXiaRX9WXHjvkqWv7DGC", - null, - "ed25519:c95VXgwgWmbocVzChZKfoY1A63EqRB3HDXSDVQp8JQKNCUobmovV57eKDTQMdVLvT5MiLRSsL19EujRdQYmBGRJ", - "ed25519:5i9S2Nsf2Wt3TMYG1smGDGcLuKhHUPr5ChecTrpBoeXHBAiQmMGdgR6RTvv5dFb35yAwKCqAaPMjGBHw7SkJghhH", - "ed25519:3afcUWK31nMf473tcKxZFMsmgwqb8sRySVwhsaY96KfvnbUXoQ1tBfsYKmemk8tRm6jpXbu7CqXmXPeKZpLCRnH5", - "ed25519:5QUTsptQa3yeBwfeyWnDNAUuEYFsQ2aa4CEhgPNEXxUqppDuHq287WnZARab3jTYdwoZu51UCU2UEEG1otvhwngF", - "ed25519:3T7uCRr99GtRBaXV7G5Jor9BQNRxMKvHvyBJWdrmbf5JtTJvTHkpRLKadcwsLSDJBx6QNYarovUCZ3M8fDodA4UH", - null, - "ed25519:2KpvvQHT4Mp2AwYijNfg4L6xo1V5VVXpBM24Ji8uAX1w5vsJ4nVdKT3Wi53YaWDheGqMRnUGs6tZjNx1XMza5wvW", - "ed25519:TQWc2qTfGP4mr831aQMGUJfk9QPpN2Whzgcq6zsSracTfuWnMQsUNVw8uVoCev9RBRXSf4HEwvAGHdc7heocF3W", - "ed25519:5mVvpNs8HYmB3WbR5GZQQsL9yG1jePTUCr9ZSkLNnYryHLcNwvXdPBtXYEXks1KsiduLznAhxTexv7q8nPTgf6y3", - null, - "ed25519:5RvkF1rmhFFg31VR8ESEAVELPAioU8Nnp8nUSsEMW7KQbixdoRX5X2XtWWyYbJCCQ4QthHH3WUZfgCFCpUfBYUDL", - "ed25519:4wDac2ivB1Gd4NtZStuoodGwmKWYhmnzLNJbdGF9Jy9GNZwKzzNmSmcSxKNx3eg3YNP3S9uJJ6JrnGJzwvs6sZJ8", - "ed25519:YR5zSdpbEeFjU15QjSy3WY74LuhcM9wm4M1ifB7nnj5jSXhhn2LyRTSMPknzWV3VW3djQtC264A9az7y3BS7db6", - null, - null, - "ed25519:4q4m9bGKT6TqjzQzDEswZ6w7SyDxiXYFPupkxwnyHtoeWbo42wrJGaeQt49NiUYpmE6cRi4cBsBRQHbJq6LBdex4", - null, - "ed25519:5xYkBJg45NvdYMj35o22Sryvwzwyhsvhvs4reJAtQgg6QuDyzsKHnLeJxrmEZGqckfaMuosXX9tmLoxJx3NAp71n", - "ed25519:4nu9xHDiGhaXqvLri9vp7HKsJ4D4MyvDL5397StAikHHukUsYDyGtgFQXnDFqpP2xddn9TzT9cQpk4rqeM6dpMqR", - "ed25519:4mxMj1Qqn79zbzb73uSzpYUVYqJ18qVF73goJj38xyt1v3iodBSuQPDUJZtotvxrfMs5FW6d5XyiwEjq848tvbU6", - null, - "ed25519:5Cm3Tuvr5ohbFSUXppjpTNWJEMg5fbzSTxsk4FqEtfFWAA6XmAW4YQehGFNXpEAcyLhUVYT7ZxjrYT6S1AhqnZQH", - "ed25519:3WyLX7a1sJoK3dD9VTpWnG5ofLcS7exgbwn7qAL7hQi8vfkxz8cMGzNpKeBt2NK1GS6RBag1i6KwN4GvpsLvJbBk", - "ed25519:2uPo4wBBeiaHZeW3zjjGjGK1FXC8Jxjx8VcucaJi5RveX249cFytx1cdZbwVh51JTTEXpYywp2R6JsFdPbkxqYZc", - "ed25519:3bR9RPz2fshcFDkT8CAjPgEUr2kDorKgFMyektyJ6Nvo4aN6tm3Qa5EZWAkYHKPNcVJzTJesBbUJAqguJgSzMkeH", - "ed25519:44MqDDL7zCQcw34PbAsxcqMSDqvLJWCNJQVPXWnKtYPGevo4mLYGjXqBHsGE2nLrL4YHxB64xUoggXvL3aCpUbNp", - "ed25519:3uCcg7NVpwRM2PKFj7eRDA3AjpWaW42Uk6M2J5fco3u1rV26nQBWWCQoxHJ3Ntza9nryveg6PkdieUipXMqWuUna", - "ed25519:3XFgvty9UsA8Ub8GkSXRB3WFwV5VQKebyECcqxKufF33CcbwZAv1k6E8KrPq43sSZD4njhoBbja6FYkxRttuGLEq", - "ed25519:3Dzmufoqbys381YscGu4gMg1VzEe1Mm298UcbYkTeJ2hbt5eJFYoquRzFfArZGahREPd3dL2pBTBp1sH9BHqQQWc", - "ed25519:4pewSif5ikGsWFs35hPVEENSxNU516GpXR8JjCnMyKC2wKeYaDz51dL5gU73tSB8HFChRpkrRWdxt7erL1nRLM5r", - "ed25519:5LnSKtHjiY8Vuzzhk2MXmLuyScpgqRFxGes1E1C4AnF3jLbhgmpK6umpW2JkS3L5TkuoTdkhMXnHFXQ3KS2mB8Hu", - "ed25519:54SZrQDqCPUbshL1XaB9JdWhtg2pXPjkbawzB2y9U2Pts6TYQHKanWyLhX2SWzPWPc2xFrAhXewqtdBJPHieSBpZ", - "ed25519:hjf3sWxwnGXiihxs9fDu52JnaBDy9d8bAZKKVMyAqtmnAK9FWSUMqHrZbYBKwLSMxoDHSTGk8F5PiAADLDZMYB1", - "ed25519:2nXfeF4BaeAHBx4NWEuPeJmtNAfSbg4Py97YiYt1Ku5uLSwoHQ3WpL9xCaiJfayEm3Bgz8GjAexPuTwevUGPEmHx", - "ed25519:2Wa2msRqAJ8eLewtDe9VFW4GR6wqJwZdG5n6wu7kqc3WzFkVfRtxEqLhHqVkA2egrqnZGaVzLTFSrkPmCoe2GudD", - "ed25519:39FsJJYaef8ui8bNbS7qaR3J6TE6798rqmhbJQETnwf5MXTRhKXwEC778YyaGB7miCAX7sGckRfLEhUhDjxPVMxV", - "ed25519:2W77QFnaUhzLBePkV4o1sezzPKNsGfo5dpueerMgiskiNfGvw7zJzLJBfgcdSMaC9vjJ5L7DFttzGWRg5DSKBBBD", - "ed25519:65YTygrJPtQYqueWoTUJfhchhBSpNEqHLFDxNbdoCQx7nTVzdRfjnDVhrohxL7qvYPH8tJ8g84MM13gADJ5haAsA", - "ed25519:4o3ZcT51drAAZAhFChSdr6c53U2Pv1nsjYt8mfzSJgRe7PjC9wPq8g14obzTR4ZPdsZuJQYMSQ7iDCZJb2nMLfcn", - "ed25519:3abrD5Lit9FC6ytmuqrmmTNrHypKrwCV3PoDhZAk5rNfFB3DhFS6jy1qj6Ladf4xmsGpGfLdXiqSm8pz1S32gAqw", - "ed25519:3Qn5w7zL3nQfbkUsvWqFkmPDBrizGouiHVnsPKqdboyMbw7YD3iuuABm82gLcXMptTvyFj4MiX5Msv4YppaFq98D", - "ed25519:EfPkfJFzLT6PbmVkJUTGfNMaSerKofUgz2a885WEV2mafB6WppADgFsDU5DPWsEU2UTZumuugNcYZC2Gdhx199h", - "ed25519:5Kz4oHu8GXb2xYEJ3cSHbM4hJskwyDYvka9Ct1xfS2KyrM8T4pCVQuzSCr9X8fCHtTw1FW4hFqx9FkU4w9u23xBm", - "ed25519:3SusMpwVsRy3zgk6QqCwtMLYZ7dkfKQBq9vn8AFfthiq4hpwVgppV6Q72PZaFXy5ryiDq2GR62BzigGjFBAyt9dg", - "ed25519:ToZE9XE5ShD6xvfk6gzHz4Su3MPq65vZtGhJ31HA6J34BspzhePtPLVLqzrKZvNWPcktwce9dZprqC4WJrC9KdF", - "ed25519:1EzjmHrNj9n7SDwDN7GccPp4X1sqZbde58TmLKtENofKVJ8nzkb9sxTLjwxRwuwRjWHt9DqZtLFivS3uQFup33m", - null, - "ed25519:2QWTEnujbuMdjyaN6aJjWZmoad7acqZ3GxZvuVNwMkVXBaTi3f8v7aaL4cdDZKvxHKLr7u9c1bpSxFcCzDnsHnBm", - "ed25519:Z2XaUQL2iABhf7jmfAJFos7hGAj891VwgAvCL5Fxtdy7miAAdmX2R1GBEG3YcytjZ3VxnDopReqddWm5PhRGeea", - "ed25519:2v7gzqt9djYH1jKLrwaza1jHHTJuUY8NX6Cwmeyj4cXYsc5RfSyBaczYUtxhBm6q6juMmUP5ZHX98CHuxw1ojrWa", - "ed25519:8RGcVPkJpUrWYSzzTr2aCNZvQGNCZ3Aw1HsRru9gSxwXHgcWKX3a89Tkq8XWyowrjGznYj5qVvcXcozXyrECSUx", - "ed25519:2X12WxxvUV1VgZcGCCLQygtK5ws9X637FyqYdZeVyMFjYkGwGFpcagdynW72VEZCbkWUW6QVcSnjgGygLk7YWBr8", - "ed25519:2XnPPTtGyygK6eDeDGiobaFyviWiWMK4ZeSNgJGDM9mmbDPB9JVjMDArZXsG1AxC8BZYoPEbksPkYMfLDqXe9EXT", - null, - "ed25519:W3nonS16Nr7ZwWCz31FLhGDAR5CsB8ugMT1WhRWCGv36187mcGZ7jPq35LD9gqNBJtY7sbipML2wCjpxtK97cKJ", - "ed25519:63nseD8cntHbP9ccPX3BErFECdnhWxGVkkr2EARDGUv62FQt1gH4UzTescV1RafQkdqPqVnVfuHdAmZnQMeydHgq", - "ed25519:5ZiwsuF9DadRmM355pudc758PqZFsfzm68RykBs3QCiDnWdF9o5vHJXYjtz6QEarxfVdnZZbKDMmb98Wd96PWnS8", - "ed25519:4mA73TyiTh8T984rt61aYSKCW3v4Agspxw1RtWPuLYwWQaKRT93b4zfvmLDRDY5AuhHKr3WFHE1aq2ofJKkJkMoc" - ], - "block_merkle_root": "yU3gW8PUfzyp4newC1Nw2PtYCaKuojHfG98LU49UKK6", - "block_ordinal": 76633913, - "challenges_result": [], - "challenges_root": "11111111111111111111111111111111", - "chunk_headers_root": "6Eesz6jrDdrUnjHY61Ywm5kZaj2bMvYGbWbCheVVSQ1W", - "chunk_mask": [ - true, - true, - true, - true - ], - "chunk_receipts_root": "DryDrLqJ3a4WhT7CHcaSKwnPbmPFtXkV6osxnNYWfcd6", - "chunk_tx_root": "8AKwCFpihT61nmj8bRHJUiCczJqe9oTw7B1QkiTiJ9W3", - "chunks_included": 4, - "epoch_id": "FhmQexFCMWUBxNCWKgEKwvPbSWA4ccGMqJ7S5uTAdYYp", - "epoch_sync_data_hash": null, - "gas_price": "100000000", - "hash": "64Ho8BgxGx7UuDsjXNbzLVt4kvVkxzt1bThCJb6e9qaq", - "height": 86673091, - "last_ds_final_block": "7xxCpbHg44N1jDw25MBqR5JuLCPBzzPenJS18jFmfyFd", - "last_final_block": "7aLAqDbJtwYQTVJz8xHTcRUgTYDGcYGkBptPCNXBrpSA", - "latest_protocol_version": 58, - "next_bp_hash": "GjQ77x2L8jPUFa3Gfr5ASMrQ8d9jvQAQtmz4nSjxEibC", - "next_epoch_id": "5h3PDeeRRQjgyNvzbKepLcBJT3jWJdhu662LzfJGC8ub", - "outcome_root": "EWmBduehGYj5diH8X7R6fC4ZFDyNUjH9Z3VUvPGLB317", - "prev_hash": "7xxCpbHg44N1jDw25MBqR5JuLCPBzzPenJS18jFmfyFd", - "prev_height": 86673090, - "prev_state_root": "A997vSvhkrTRsKRHnNvQV415Lp4BNBfAeoVBkRLwWafx", - "random_value": "46yc2RXFHjxjAz3ioW3NpoFoqmUNP5Kae5ywDDJ8ccnW", - "rent_paid": "0", - "signature": "ed25519:3EZgjArnbaJK7taUjaW7eZJjF7yNSyScjgxipnwLpVGjgSPFz1w5ptbtFXFZAvpP6s2uVqLGPmcpRcTu4JhfwNaJ", - "timestamp": 1678091176086673765, - "timestamp_nanosec": "1678091176086673765", - "total_supply": "1123870259776647285084581742454102", - "validator_proposals": [], - "validator_reward": "0" -} \ No newline at end of file diff --git a/fixtures/86673092.json b/fixtures/86673092.json deleted file mode 100644 index 99a7a67..0000000 --- a/fixtures/86673092.json +++ /dev/null @@ -1,140 +0,0 @@ -{ - "approvals": [ - "ed25519:67jvTS1VLidWiK3umjgkEMxnDaRzqVyaR6125eR8rKzSM7d1Bz5HV57cZFCEAtNaQ8pMtvBVGSSPQfxDMUbFo8zG", - null, - "ed25519:3hLHGgk7NFefLd6GutPje32o4xJvFUKbcBkfMB5h2yyKrZ5NCZm9LZ7qbR3GBqHdkkvWqtpUrDD6ma53JFWFFaUQ", - null, - "ed25519:32uV6fiDDAZQsvVK2AnfLUnP6NEFZk6XvBYzWFGBbf7ZFxg9mjyihgPoiQfAxzWdc8CxugjpCd5wDskSMsaEhC2E", - "ed25519:uzwMPcNXRrbxbX23M2qqJX2U1zEKoi2G9hzoWsLRFRqUhXrk511vyYJYR5AQrCznSFEJ2R5JQ1qiRp1wB5DAsbk", - "ed25519:51dTeJn72inchPEZzvgKbhTPyfddRkXyYZELJ67CzcgDQ3d5ug9pyuzny7dH2DVortn56wDrBfTHkexb5aHJmb5b", - "ed25519:2KZPoVcPBU3LKUzVrp9MxgvvbDEWFMWWDft1YmgsuEEKJT4qe895SYsM1jV5mBqzHnUzW5TUB5epUSDMLMd1NAoG", - null, - null, - "ed25519:4XHrP3JEvjkKPxpg4MmoXxEX7BspusUDA7gx72ViZWcRRjcLEb6xxikiJ9sPpXLkH5FkvWmvEZaYiqf85irGyUHE", - null, - "ed25519:8f1vj9P5S5RbChKCDxJH92EfKsMXUaKPiFa8unsEj3jnYygp8p56ztTCwnyhjbV52E7wS9ZvShJhSvWNQqJ5vtR", - "ed25519:3CKdu2rHSF2V9mP8oHX8VhwNaySY666xnwxoCd8eQ3AHbRYpUD4fj7USxpGHEAoZ443v6iBGzYFHYeZio1b3nwTf", - "ed25519:FYbTT88qkKcMpNUkEam8q5gWa8AoCAqQdCrjugRieHDnWpCXuSNT3d63DTu4LwpTmHcUDTA3rib5YovuEtDxnF9", - null, - "ed25519:4wGmkyNVrpDGaJXkVndR7jNMsUEaN9Sg3HK28eWFfwMeTFoyaMNGdoVmKd2fjbffR63Ue71siJKKtRGAia4ysqwb", - "ed25519:674aMxrWw9p4GZ3Tem2YG5s4Lhtru4mbxfZJkni4hLFvXCmQdtP3p6JzeGSSPnZAte7gom6PVicep1W75XTUTBcs", - "ed25519:41fPj6hoPEPLWBToLPRyNybmMoQbChU16LrpAd2o5RpCsRvVDNE4mnybnV3UHjvnZsFqoKPSA5DqB97E7EwoJZP4", - "ed25519:4nimS82UDzWww6tNihUL9swnbgp5RA9e3ki9LhpBuuqwVE6m22AbHdKrUMP7XuNCsD1MKGapYtmz4bh3USeND85D", - "ed25519:ijZYoszPyTxLDmzREKVTggoc3DXoVhDDroiCsccXTqvvipGYeUMRTqa6BH5A4GVRaUNSGsVuZrbf7HZK4VubAuf", - "ed25519:dtwsdGwh4tWNmTye3r7U8vsr3111P41ZZntMs5t8niifuxnH6HFfE2HnNw2tVzafLKjRE3uWMraby2GqqDuNjhE", - "ed25519:3SAdKNPnMG8X9W2fj9Ba5hkWn7p8RdhCc2fqP1bqa7A5RoizVGdmjPV7jaWpG7xjWHdezkJEepg3MCDxEmxESPFq", - "ed25519:2WgfVSsDkhjECtjYQPqLKEewe2eain7QCNYuMc5cByMoKvXq84TQw9DoZVGLMvYVMFvzbaUNYujpJdzT8JVgtNG4", - "ed25519:9fpfGMjUeC3DGiSnWjpDR3vRogGgT9KjnbcqGFtuGyM79fzTbjv7JBys5tH1kwug7wrcNqMfJj38BuoTxzCgy18", - "ed25519:5ecUnCj92L6NimcPGNCKEiK3bbXuv9gukjTsBhMtt2g7bdPnKotPPvKAqoLELsGanW9kUaZzpXbfHv8ptcMrdAZN", - "ed25519:3xraBpfFWCsWKjvsQMGvjzXrgbzpH5jfiXNDPGphkUCEVk8JsS9JWHiSr5SUnUvyfqcocP11SdCjQ4ahh7GeQSfX", - "ed25519:xn5PdDTveG3GometDA9JaZ7znnc4766a2ieTqa55S9kNwxsS9tUxfhagbQLNfC9pU1FQVrof1hEhK8mvfpuZ2nJ", - "ed25519:aoUsJG1X1oZPqVrYiAb2Mz6BiPCADJEzCKdaWpfPFAqgNxtTtPSJRB9WpHqH8iZ3wiqpr79rsqBYuXD7Y5R7Sg3", - "ed25519:4QnpQNystBLrpnJN66qD5GKXdBfHyv8sKXgVEd35nv7TwUk1nYfahy3HnvzL7tL2ZKfy31D9iv1kEKyUATTqMTmF", - "ed25519:3QUnnCQy5CwKNMdbn1nCYLyUd9b97FkfbPh3JajGjVHdrKeEpFecHTULSyCEU9tCLkpUCBdHZVYyckUtRhDRiL9g", - "ed25519:DGFgVg7DB9RbnDjqkoJQiJXXZwT7jdmTTkq256sToHXmzfbxQUZTjxkqRyHzKe8Sifkg8sYfWeaJbWG3RytVcCH", - "ed25519:5PiYmJAcF3TJ5FSUjJkesoTszdf9JdS7Q4P7Cj8yFLdB1pGHbDEAqZUaqFUSMBQRK5uWpPwzxQjdQ1NbqidMwoYR", - "ed25519:2KPKquRAgKjHdXUu11G4y8RwNwA8s1JMML4Bb893d9M5Guz13W2riVvVJUVwNHuajcGnGSLGhyyogTZZWYqsd4WB", - "ed25519:4uACLwWif3CXfjgZDabKCFtHHjTfSB97wrt1UegDY6h3wp69qZt9bCGLGVusUZBy42agjchNfwGNsBnVWgvdoJfs", - null, - "ed25519:3qCXS6qVfUaWMTc6CCXTR8BicsBxXhnvPGKNmE1JxKJhZguzKoaraZGSBoinHsWoudcdXjW2jxwNxRip7ShaAy2q", - "ed25519:4iN55QxwCYo4xjRtXVdyyRtWQzyKpYrEUtt58wjyYSRQc2be12WRjpqghZ4DTSssipVCibkyvb9tRf6CMVWE1Qpo", - "ed25519:2eCUMouC6eKCmxQvmYJmE28zyPmxqctVXAZwtUP8jMEg5b4MudcthP2aruMM2nRc1vqtkQXic1WgDTrWxM3YkgEz", - "ed25519:rKTS3yHaFEbeBn4J3cJh42dSEk6dsrKb83kUH1SKewJJWGF3eh7jHpYTTLkKS593P6oRsxazGgab4fC4mEhhwA7", - null, - null, - "ed25519:674aMxrWw9p4GZ3Tem2YG5s4Lhtru4mbxfZJkni4hLFvXCmQdtP3p6JzeGSSPnZAte7gom6PVicep1W75XTUTBcs", - "ed25519:2vnWtSxSkjCcL4qnaJ4EyEZxHhFUGsXcBsDxVfB3vGv1W1MGUahsRhHrHwCu6AouKqDM7wCsbatRbdVfFYgQXd4B", - "ed25519:65F6CLzh8HDxfAWrJT1KCmBp3dgLCV38QmKKqnX9H2pBBaVKa3cWRQLRRQaQtf8ERWCZxaqX3Fh2vCnBzkwCxRiM", - null, - "ed25519:itVkGX7rUD27iJqmmGDYFiZ6gPuSHrLKYSxtQgzoqFXuvzDTuhxYk2kjx4TuawFYLAzS1YNiRcQFvvCZajgVztm", - null, - "ed25519:67HZNjz32erMZwM3sKprZrC6iszp2uiuCHm7CYjVGkaCz3bMG7FtoB446zndxu5DqNQ7ruUznFpPXzNxWVc2aiWP", - "ed25519:3oTRFvvM2ac5HoJsCZjy8NJcfbT6aDZXex1qw1ekgXwoctEVkfPZkfkuYh1bDhRzidkHbDbk52AW9froYXSBrkmb", - "ed25519:2qtD3LZzYKM9fiMSCC8i3njrN8hFR5X75K6kQBSU5gJwG3bzLUgsPf65T66Ds5CUHufqX2iuqFqf1DipbYVy69wV", - null, - "ed25519:5EMM4zvAR4rrGAekZrzf4p2LfBLxqStGLn7hnyvY1gUZsvDybD6YZ7YjhBJVp9ufoagJUUQf6gftVvwmjVydYSBp", - "ed25519:2c1w892NbprjmtoRm3cJ2BxqQQGbWTqk5Px1T4Fetyni1xCbF7BpBAQkzsCBbFiGmKxRqnbouyHpQ39gdiciTEid", - "ed25519:3BWQs4xUUQe4fhJspLEQn9mBP28RieeGbACr8jcuheNDuuJuNPZPXtCjzYLGQG7qLDyQhkULC8gqoqXV2VfhZSu1", - "ed25519:5ZLgqG7z59kiWm1hzqmwnkKUcrTHNRUSfksLvDrgoExipKZ53umLDiXA2brf95jXubpCSVBMhswQ6BXNpYThw9Bu", - "ed25519:5PASfeTezoVd39cVdCVErNR68iJMF2HyGWJVRnfn7mATzkE27NSG3Cwz98h1wiqWNeNC2uUhrFr6dUDLHiyrdjAh", - "ed25519:4cdetD1Qk9vySK9fsdaaJ1Xm5jHaLpK17TrhWi9pSUeLyD6VYsh62TahKiahiWxo9bApYeatBEzEEGMb9ioaCjnn", - "ed25519:3BFggZLovnT5BCLYV3NvZaEQq7EJQMq6sbKv2CpgzwqT5tTHppDGrcVH94LcLVroPQqe6kbjnqaL9fFYiXq6b9nS", - "ed25519:2JpscRk1K6pmseRabg7RL5cwLnWhyXhUHeHKroJ2rTh2XajoyNTZhVDimD2LdGYweAgkHCFxoZSeb9ZWdTDpjRKT", - "ed25519:2NLfzwv8JpxvtBivd5ZRjjbZq4yfGFaivgwE5X3dFq71WVrg6vQRatrhM3yRHcpvrCFX4razw78JPBrcmn64MELr", - "ed25519:4JG1vnuxfzM1VDb7TSDrKprGJxeujEdqM7upugfpDiGaTP11ZmeHDS4zV5925pTWAjayD2g9XBCmFGg4SdELkZcR", - "ed25519:4qaUoRp7iw9Vd6VmV6WHi59HJBqk7XHBBYZDQz6vmUoooY1FJEs5qHUGYi9kPZpD8fzzdmPy8QYqpuSARCp6x2DV", - "ed25519:5pxGScNn8SddtRSepfTMnLQEzoVFWtSxbDzzLzJj9cpoY29LqtSaj6Rk633STexpM5Q7CumcvDNQVtLz43Nvs1k4", - null, - "ed25519:57sCrjR3QCHsdvfRzAwnEc74agcbusFtu9faL89181A9gUkAfhr82FASjGSdKpgYATLnxxtHWboWNELiCvskJsf8", - "ed25519:5ZGPE86zBZydmjisq8EKnZSR1duj1i1YXK59Hy38zkHEoiZ7jsCNda5Lo3t6b3hHv2kUenPcQjGUphv5KLrPZLjX", - null, - "ed25519:4Rf3nnn4WmCVAAya5x3oJFiyQHQ3WppHqEaeR4JdvaMMUH1ciZbb4MQ5T74ercQHUseHAn4e12MgqEvc94DZr9PC", - "ed25519:jcGkm13ikyd1pZNxTiWKoh7zc4w9vQYrXZFuRQcdz5HQ7uKcT2W66xw4yunnZJ2uXjQtHkFKnRCfFXgQrgpofZj", - "ed25519:2v2NC6HbvKqw6av2J5iCv2Uxh36tQB9sQPFWounE9zWpHAhb86onsBE6pceK8dBuGAGQ8YxoYyVeBRjHhQ72LyCb", - "ed25519:3DuxX6ypfgc3nSWrZy9oaBHygR5x8WYrwbPgXrNWKvYS2K3zLPnYPu4FqxnmZnM6AsseEHR675Fvg8NWB1B6uqt7", - "ed25519:4j2KCjvytZujGeLHDdxGSmcYWu5EopetH3UBH7XbsEcfHM36gtStBKnq6mfdu4BKVr6UD4iUsiHqpxrs28TcQKvo", - "ed25519:5a61EDB8sApuJKL6Rbe9XmtYQLMpeMg5ra3wFdduVK8AA6LbA7ZwpNHmc5nQ4ojbT9kbLEt15u3MBM2ap9RWvXdG", - "ed25519:2Wn4tFdk7vsswWYnXizp6GtAV3LRy1CKToN4x1T7KcdJSoECxxCanVuaPkf38gRahdNbkXJ4wJnft4exMV4yBeDh", - "ed25519:481GQ9h7fssDfwMtrcXWvMG4TeaSXczZ8VzxgfNLPbQpWVyGxrrwuudVpNc8MVDpPyKPX4yBWDJBL4YkXjJNLdCR", - "ed25519:5sXQUc719DfTxV4oKiGehWKgZvKo4rCikroUxhrkvEVxgU1Lo4piSHcs7msstveviPhqdtUdaSZaiaJnb4UWwHc2", - "ed25519:2cPFrC5wJH7jsQFEcuH1Vx2eANTTdovLrcscMqyozNGneo8YptkYtDZi2TkroMuGcDsazCneCyKXbAD43QDbfYBS", - "ed25519:x5kSD4ncYMSq6TZoAbugQpiTu6xLUAa3DS4pjLgFPaKnJb6HpxWCHopMPmCvk2hbzCVDMDcfmPmDo7k4giDogtq", - "ed25519:5uByef18CuCdCrfpi1BFFy8dG1aLwfdSzEMnbneMqmD3p2EGcyrCfQP9jH7HKy9Le88E6RsjPRwteq3MRpW7YW9B", - null, - null, - "ed25519:4HFBQuXUf9LakdkLF423jbhmsJNp4QjHtzhsS7YTx7oFxLm9LXTVQErz5PxMsYpcSVWADxqREyq2FN1C1tpbEEqJ", - "ed25519:3NQhhU6ufUoyDba9xptb2koT8JXELpYZZC5ou3fzpmFUBYwmLrs55RCnS2fndZZ2US1VAAGf51RVSrhkrGkmTKaF", - "ed25519:4viSJwbxURVejFXLRPeA6yaT9dS5VSgZatZ9Ru3Dmy1Rv5z9B2qy9JmUXzjuwHCdZ8VZSymzTwNmF67ydZpPsUHJ", - "ed25519:42MbZ9JDpQXqTsYeMBojen8DejrBKW3v3cSRDhbaRqK3xLhDZHCeeE6LSDQDWc1FuBtn5SNq7ZNDSq88ZUqgHWnS", - "ed25519:YqPrEWveHcCTB5atunW5bmHFCxQcZ4y9RFSTZGTtUCYXzHg8SLkGj1eNdqse9QTg5B8EFpEJsKKeXajwW9DP8om", - "ed25519:VCP7jMDSo7Ym2Hr9EQQwu9J5X2Nici6zwb4dCMRoFsWQ4bY5m5N2fC2NfahLhaTupZZjPE5fosUCJ6H7QdcgKNx", - null, - "ed25519:wPZ2njXUSi3QTEBAgKAnN9tAo1kRn9rDqpP8AEFRH5umW5XjMvqJM2b7PtNHG2nCzUxR4sLGhuTvWRzybzC7oyZ", - "ed25519:UGwNpcXTAoAeJN5GW2buzSdjN8ebrBC44Hv2amyo7y9ZqgYyn7TgeapV5WJYDofn4v3Agdx77EQsabkJv96YAuS", - "ed25519:WCst3Th2VX12DVz6KTYa1tjrGyH7xkks4BQtrrGfsZC12KV56vA9QhYtZiHhvgi25rX2wePJ8Y65wN45mvm2Siw", - "ed25519:3N95DirEpPE3YiwbYVy7s1g2rMKFNZTiWFfeC16i5dTeBtA6QwTB5uAudSViT2d7UtMjjL4UMiKuoutQuVVA4uUD", - "ed25519:ZYzjG74yTyGWpEqJSnLZdbA5ke37faAgiesRCfWZN9gz4GDmUFHxfPmS84J6cqhPng9VQgpufJDFJMQcneJYpCX", - "ed25519:G7Kqq2gZRHKL4eQGgCehAA1ZwEktZAo7XbcMdxnvF6QVDNWzGYkiZoyMErFh9dn9AKZXVxEiuVSHci1TjhiMTmx", - null, - "ed25519:3DcT7dHWyNzv5VTAMFuybxVbTKwpoYgLTvEq8mw422pHWg5wdWLo39yHRyuCgE6pjuK7HutCgcH4hXajAqAuGi3T", - "ed25519:3xBqYdR93xDUBqGciGvDbxsZ5tr2hURCsTgKEQAUEA3f49yX7iH8nT6oqxssBJZ8VCivmsTgX43smT1yuHqpP9eh", - null, - "ed25519:U1YGdZtFDm8BHE92m9baWUDt1oFGGTDwzRVd98K93GtafYUnF4UfJ97rkS56PZCuhYC3T9UgcDYo4LGnSU3QaER" - ], - "block_merkle_root": "399L6ovAtXNsNQwdziohUb4u9LJcCCSgUNjG3dFgghfD", - "block_ordinal": 76633914, - "challenges_result": [], - "challenges_root": "11111111111111111111111111111111", - "chunk_headers_root": "CnGLihV6kcFiv3sh9HEPG7HmVbF4F18iAuewFXzCuai2", - "chunk_mask": [ - true, - true, - true, - true - ], - "chunk_receipts_root": "8ac3b7gAbK2R1ZxKEJUd1JnrdHU3jQqALb9AmR1XDC4b", - "chunk_tx_root": "BkA7s42AmLGQwGxq286d5r2SH3Qt9arXxQhK7PeVqJ5M", - "chunks_included": 4, - "epoch_id": "FhmQexFCMWUBxNCWKgEKwvPbSWA4ccGMqJ7S5uTAdYYp", - "epoch_sync_data_hash": null, - "gas_price": "100000000", - "hash": "Doy7Y7aVMgN8YhdAseGBMHNmYoqzWsXszqJ7MFLNMcQ7", - "height": 86673092, - "last_ds_final_block": "64Ho8BgxGx7UuDsjXNbzLVt4kvVkxzt1bThCJb6e9qaq", - "last_final_block": "7xxCpbHg44N1jDw25MBqR5JuLCPBzzPenJS18jFmfyFd", - "latest_protocol_version": 58, - "next_bp_hash": "GjQ77x2L8jPUFa3Gfr5ASMrQ8d9jvQAQtmz4nSjxEibC", - "next_epoch_id": "5h3PDeeRRQjgyNvzbKepLcBJT3jWJdhu662LzfJGC8ub", - "outcome_root": "FWTgtobyEuNjujYoC1NPSLsBqHi9iZCVhvFefZrTbw6c", - "prev_hash": "64Ho8BgxGx7UuDsjXNbzLVt4kvVkxzt1bThCJb6e9qaq", - "prev_height": 86673091, - "prev_state_root": "E2zn3eDHtVWNjzjSLiitA4RTeL9qdyhDNxbqMVH2thJa", - "random_value": "4wDPEBNbGTg8hH2nGpZyTH7EBRN4KquqxGgNS919qMmr", - "rent_paid": "0", - "signature": "ed25519:2FVbjWHr6mSFUpRVF9o7T5WAyGdN634FnTjRmptHCN8MprqgkiVY1PZHjNUjUakDNzxTw7jGPHHsYHxZa21uMUmX", - "timestamp": 1678091177281053676, - "timestamp_nanosec": "1678091177281053676", - "total_supply": "1123870259775456041476524242454102", - "validator_proposals": [], - "validator_reward": "0" -} \ No newline at end of file diff --git a/fixtures/current_epoch.json b/fixtures/current_epoch.json deleted file mode 100644 index 20ecc1d..0000000 --- a/fixtures/current_epoch.json +++ /dev/null @@ -1,721 +0,0 @@ -{ - "approvals_after_next": [ - "ed25519:2VhGGz8cojutZkdWbZ3bUUc4fqVdM6oo3zBtadCfa2HpUw8revjxpbbs4upmF7JFEWgwgfnX8nnDregKLvEjgc7m", - null, - "ed25519:49KmyiPyt5q51xdtDkcQ3ETtyPsUq8ddUWPttNLrnGNKhCwpykaPy8zNhXiFYPQEaZ21SAB5Euo3k7U2kb7mFJcC", - "ed25519:2xvJ1PY4cbZ7DnVoQhX24Bi47ef6z23FByTjK5sbtZYer2W639KUaKSeEVQAs5Jz4jWbCpBGjDNRRgLNUBh8ZUfi", - "ed25519:49dng3dQytReroebX6po1S7y7JmewstX5JdbW2yK5tqzfdAbzyizozfYb3jS7FWpqcbVCU8j7hTep3rAX3xeWRDu", - "ed25519:4Xa1VPFo9WjcFKAFjRmvB4uAGcQVkrVMrgo7vX3MBYr6cDaXCRrKjk4UFzYqGJtD4jvkZrN7CH2LYmKm7QiE9U8s", - "ed25519:5i9irHTS7p1W1tHmi7ANfWfr4Epcn9VHFeNs3Uvq39CknfCW5xf3HnZXfcKMJXW9DX1qCmMU9eTBaYygZ5BZa8tR", - null, - null, - null, - null, - "ed25519:2wnBH5A73zCforWmtYQX2jmjF3DAo8Z3XcxvjFMiGjemYy1KbxLqhCjwfpeN2xB7ZCREEuBE6yriutFvtAvDWZdv", - "ed25519:2B7PqahnewnRz296wDYxpUCeSobM9w2sLYviGubk2h38sEvUWbgBi5Jxvbck9ADMPNEyiYEbetr95Zfv57tjm4fR", - "ed25519:5AWEsgjcn4QstDAdVYCJTTnjEyvCZ25Cp4h6canRJhFDFcUShkRSTBR38XoCKo9Amn7C1JWqVxkgk4wpogXSHcjD", - "ed25519:49efUuXm3BM5XY3HSFSPjtv47w5JuRtg1AGH5ojFtzBTvVsqgEVXpKXi6ZupDxMT26d9g3jyFWqzvis4PTHMD4Jg", - "ed25519:ePPSYDSAK4R1wmQc9HwbCuZd2FYgqRNknkFwREJSaA32sHHPykNoAJza8T1a8GVzHoTJFaaXNF1H5Apvg8ysqFo", - null, - "ed25519:3CqKXCuBtYkvwk5xsRwRCoYFwQeEScCUbJGuZZzn8H1hJkb7eSZAtvouUxVVMaRxyPGZciyFaLhpoX6X6veGbjqa", - "ed25519:4xfsJpdJApuRveVRsdMpuK7mDdx1MP3uL3U3Cnib5J5sQPbUS33MzegaFLr8LcYeUTLsSCT6ycMi4k7eeC4cx2uy", - "ed25519:4HnubxkveyE15tMZNcEDLq5DxxLyFT17XpsMD2jsw5BGUb6qCnTZuG5E8KQuvvbLMNcqnA9vrnhWbd2LxqtghaUs", - null, - "ed25519:562BGk9m5WwT2CruNiKTYJnquQjFadeURRYA97xZ6e4R6Gu19QAYkcryjCePZyS4kEKm2xjefDqpTaSgf2Kaf2VH", - null, - "ed25519:SvdETeddpFKbtHDCrvTnJKnu6SvE2mu1evahcPrf2RmqZK6Cz8dzAMykjvE2fVcxP46M3opovaFZxzc7o7Wt8cP", - "ed25519:2xPkMJbmdTbiXDhZ3R7QNaVL7Gh9qVaSXbon9LaKUg9aVtJZTxTVHXGDLC9rdU5Xkq35UGmzPyqVjULLUawZuGnV", - "ed25519:2oDV64kdMt4a2VuRiTeAoVu8Fpdz5RMs2twSFKYi7D6chBGjHxNrYGtLxhxFAScqDVmxDjUoRK1Dnvdytvtgd2n1", - "ed25519:4gVh6trN6irVVsTQMyQFdE1z2GJcfDuVbwCLz76CRP6UJ1LAB8Lk11TfXeckKy39qrExZjgpUxpfJidXYN7xYGYR", - "ed25519:PDxVou7E2mrxojsX42mL9zv73stcp8TdDAjb1UDT2F4MN8yd4YR7yYpsrK1NRxL2W7osAHyLnE1peWHdqBvzkLs", - "ed25519:4Cah1td6h1zgswNwSNosVicXWbQ38WUjEM782Zm556WWSsSYgjGezYy3vsvkABQuCPorBSHxngPgTYohcSzwo5j7", - null, - "ed25519:2Pm6xG7LvKD9fMEvtSkvMRizPFPP5qBrh29YqDvkCKmoYMJBZSoQJP7kSECWSdJannn1hJkzg8AUFE87FRvCh8E8", - "ed25519:2TNsyhbGWnJfN9e8Yaaggfbf3Yu7w7JpGAQnUe7LkzBKfruLF9yDxaAo4yc5CVJiVqX13NnQfPLcVPpaD1wgMFfV", - "ed25519:41CHKZLBr3pM2eE5wXjgaXrBM7ugTiBBn2JSfar2tHhoAtSKNimfyfws9DemJDs7LB8CBNc85WtqdwGgCsB1nWfP", - null, - null, - "ed25519:3ePYVb2Vnq2x8hm7sgoZWNVC3Hbx8RVXs37AVCpo1eLLLeReRocMDnDUsTss7kBHqMwi5QpZ8ZBUEocYFFX4MYhD", - "ed25519:h3YGEEUj628izdmDR4eBmqYhtFcMfQM14gpL8cmHzE1eCpLmVWE18xQFcdbGLAoW8RGsVPaYdBHbrkGznNA6rT3", - "ed25519:52wySwA9PdQNbrcJnw5oeaK86UGjKP1z8QcWPZZmi68indUqyHgo8x355AkH5hw61DoxGfZ2SCTMGSV9u2b5n8FU", - "ed25519:4ecMCbGYYkBFU8Udth8uozYMnvkQqNde41ZyzBfzABFSoxxv9rK7Tc1BfCeedtUJvmqGUWpwQ9wcWHgKT8BYqNf5", - "ed25519:23SyCVTm5KWjHHkAs4GFCZTvzZhB3G4QtpJNeSz8JgZdT6A77dabePnUqWpMMENF7rKF1dr8bri9doJR37PZB4bU", - null, - "ed25519:4saccLgvU75D4nBJWSPzd71mqtRGHhv2Kx5CtmGSGLxGG1Sd2BmZtrL9rHksQGjRVKxmHswv9RRDdj7JRKqCVJJx", - "ed25519:3CqKXCuBtYkvwk5xsRwRCoYFwQeEScCUbJGuZZzn8H1hJkb7eSZAtvouUxVVMaRxyPGZciyFaLhpoX6X6veGbjqa", - null, - "ed25519:5XmffM6JMYCQQum9764cGxRA7xDGYMUpY3T5Jaiv89f2XHNniA4ZHUN6LkWnnZbdbj97cJYbstvTgCspbWQvVdfH", - "ed25519:4J5LPAdP7Cbe4foYg3qQdTQyxLDVbZk79BR1xJEY1TQJrtJq9JyJPqHXxYibCqeAPVqXhWXJzMzn7BGjYuff8znN", - null, - "ed25519:47Hydvzd8rUcaWF7bkV1Vap7yPvFK7PeMSGMvhjRzNdfqjvEBiJoR4t9ktYVphx9BCQSzDQYdxjysR7yAMykq9rb", - "ed25519:4894KtUJZ6Fp1eoMWnUo3gPZLnMS8q2CMMGRYjXxTiEfM8oRDjzUKhg4x1QLUwCWoq593UpcyroqhcAUkufLXkgD", - null, - "ed25519:5wvk8hNhNzUefu2ig3eyPcx9FHQAqTa9ScornNdGQ7X5VFECzDtXKZh49VDs3SiSAyC8iuB8FgJdxmUq1b39Xoxk", - null, - "ed25519:21KSxZzZtDkLLH5RuJ1auP73qkuL4WXyRLtdvq1XSRrH8Yk1AyqhsJ54YbRbbXmetpRuXuHKENwN1hQsNd37vQZd", - "ed25519:4NcmdYz5VjHKmSRboX8NYsZLRGtGe6bPMcpCcWQdQfTXezDY6EtYL8awXWd6Y3kxaaZkJJ69FuFBazjtTTWADivu", - "ed25519:34sdiKBSp2jkjTySbM14ivoXseRBxpYus7jAfsBNnaa4KPxhpLXVW32proR1YCt732AErg2KnyC7xkJc3Y6CVJ8V", - null, - "ed25519:4aijMmx4KWhS4XmxBfxVCxnJ4s8Yz3iRrFBLYXywb5v13CtKxW9VKSNqwAXJw6jndVaPTo7rz53CsSWNG8CEujgz", - "ed25519:52MtGXV8G1Tq6jWWZZXxBVGVQQK8Egz2yt4TRMqEe4YPDgo9PmCwoNbpzPTSdBQXi4hwFDHpSP5aU1DdjnFLkrFA", - null, - "ed25519:5xBStwognhUYGVzX4dDyVTvJ5HpT5wqFnLcAbNVK9XAJXdivcZqX5MjFBLiwyPHUpPKvx25UEztbtpQVyTqjaorq", - null, - "ed25519:2GhyEXY4wR9iqWshGEF1tQ5Fwb6M6ZGUeXUwQjHed5eUQs71YwuYUyACgSH5VoMiJwGhPhitrjwBVqV9eLHbmDzv", - "ed25519:31wQipuDcL6FwTDd3NCwaqiUDyi7cZUcr7qUF54sU1akdrkQmdHmx1wvoYXf9CU6jrAnF8qrvhridMdgVtZPZvx1", - "ed25519:4DqZuCJx1pW7zYqqU1rU5K6Qf7TjP5LnVU89PfNkmnwfRcQeHaunkky5JC9qYNZLgpQ1nufb583DsakHD25fDNvJ", - "ed25519:5EoXqxQa1TcMsjh6DfzQqbkMJe6Gc2VeyJaFCNhaHuMgN9AEa394cpaQrceS8h9mowNDHGJU6KGHSUCbPrPXv3et", - "ed25519:59hxAGF8dSHwLaepMQKPHxqvFGHszQJfLhLjtjoXKYbidPfEPr1ZAF84X2npHoQ7SHwf7Ev47zEY2RCNUjvY4TuA", - "ed25519:2rKQJBW1LKRvh3Z134e8oNravs9q84Gr72NdrZTbHu8eepp7SgUoAPexCRgCh4f3ubeG5wE6yMdHRB1WTZ8RrCgd", - null, - "ed25519:46TMbMumBmNEP6cLDtS2LshuznVHoFdxzmqYunkqeQm5S761Q6LfgxHkLXx424NFjyebAhmWk6z5bVYHCtyczxJN", - "ed25519:2gWgD8Kyobc9XXGJ4346BVA4rB6wKMXjZyN6GsQPLNCsZEgR8cTk6gxhwgxHxUPDGkob8bsFmqU5hh8Xbochkb3s", - null, - "ed25519:61hGSWPcfZ6YxYW41WG69jhr9c5UrA2XrE2KZEEPHJkDHV4dJBFWvhtt8hXNz4cmPai2uwCy2DZSUgBYSR9sjaYn", - "ed25519:5MZU8UxnychBdGxzNH5k3fa37zRV7hgiauZRuPNXks5J4EgBS8UQxZU1JUnD4j4JhEQRAUmfJ1J5S6VPfKbQHSbX", - "ed25519:5EXH5GeSKE5T85XCuTbF5cMQbUPYG3nzXyKYM9eQL87v83v2U2dHaENa5AjgfY6NmXdfJjC7wNQuo2inASWvYFTi", - null, - null, - null, - "ed25519:5a38NPqoMHpXDqTthFZPFjKnv3cS7pyrrT5ziGNCwGBfaGk1VVyqrtDawmhKMBs8xhUmktXeXP9Wv2PQGdVkxh3", - "ed25519:5mG8yAgauHMZMyFMrPvQw8qGQ7D2xiksE4vekVPWH4bEbxUuwJtdHr5cQgqY87KfSqqbkgrcxozKGRi3CFVapm9g", - "ed25519:4BjQpErboUNcF28gzdxdKQWvRDb7SVZjx65knyCSqseHkZBRT25AfAJkdy8Ra6rPx43xK3YPxu38hbZmKG9nxFkn", - null, - "ed25519:3Uoo5KSZKfPGACtJLiH3KhFBs9N8iohXy5iUPK4BG3EFGHsPcUKLVboWnPevNRx7hcpmKsyxQbcRdndetDMVTWvi", - "ed25519:5uTYvfbViRcsmox5UPkfkzHmEQ9Z5uxdeZ6NvmtTwsyidqEYN1evryH1USrpmZR4t2gswDSLitoSywEFftZ6GmGB", - "ed25519:2B3V7Ms1ZPKcZ5NqJXW9MgRDgHW21gJV1kCu8nKASK451MdVUEdBTd4cyuAqduv5RZQd7F16XytdG7PDXam9BQcA", - "ed25519:AJZ6918C6QkmnS9CA6ZUAAgqPhCaq7Sqb2ZFPWVE84cRsubN9EAR1zK2dBRxX9ZtQhheyzAHy6RwCN8EDRJUHTM", - "ed25519:5VvRCFWLATSRSdEE85NQV3wNhRMnvmeXiV4oSHKyGwi8nowdVmnwmAT4kb7ro6Z1A74hYDqsRQjW4PC4Cxarcxq8", - null, - "ed25519:4PEddhHi6rrKjULmA5J4Sq5djmZ447CGuDQwUEhe2HNCxmLNWQ9njV7kxihmD4M5oidfvLvmdF7z9aDFfkzZBYfW", - "ed25519:5HVs2UR3Ba5ELFjHUmMVfww8M21K4K9wodqBHhXntuRk53GBZnLx8V8eqA5KVbSCJeZZktoeTyqMT9Pa5jMaCKHW", - "ed25519:31RMTcGQ546gn4MXUyytA6ugo1pKXVMa77cVMWtzMLHb6kQF4cPw4gdVE5B69waSaL1GzBtN7Ra7PMDgsMWoN8D6", - null, - "ed25519:vCcvHzko2DqtAtgPeodUzQ3ctemmZKwva5N6xroMcdxYW4CYiG4cgjseq4C72kGuoo1fmt8AQV1HSaG6wd7xeLA", - "ed25519:4Gpvq9SWy6ARfNKHMw6gEC6AmF1EMqXUbdkKW1tGGpw8ySrrPw1ZqFfqAVCyVueteZBgQLp7MSsiBp2v97Z3M4DV", - "ed25519:3Wn5NkmKk9RA5moGFTr5oW5QvHyF3fCnMVjDXDPi8WhwsgHQ9oEHpGpiFkpKKuJj1hTgeP4Yo76w1Nyv2Ya53XFt", - "ed25519:5nGyhoz9wwJJwaDMGnBN3fpxaMVNzSeBrTx2F1v6R6nTRS3Fd16vpGCezCr2r8BSzCMZDrTAqqXb62HeyXZGZbpj", - "ed25519:2WGZQemboLuyCrqoBKAD4GEGkWXCAo5SoN8z5oNzrNHJewesycHwrvoSuw8mmMSPBUQutqnowMtMxsPbgmJnxTpx", - "ed25519:5EzFyykbaPjWrkPRgE5CWkLSkKrA2PGkfPucSJDB4Tzw5VETAS6TuusEAD9TVH9zpHmWvQ6qcxHMgD5ycUKWXsuu", - "ed25519:4Qrtz6NqwegmRV3KWMKVXPiPQ2xJGKyVLwTQZ5gRipHUVaU6ovtoCh2Knk5rLr3BthZumWXYzbQiumS3Adq2GZWA", - null, - "ed25519:5sMjvdios6LjjCGiU2MMo7fjjkchJuxTwXroKWGD8jkzqFqGjyb1tEiD24sbHtuGdW1DTKLFLGzvLqKrexmf3vU8", - null - ], - "inner_lite": { - "block_merkle_root": "ExTQ1q1HvfPZy7BehiR8JmgwUd9j3DTzHrTPmr6r9scd", - "epoch_id": "5h3PDeeRRQjgyNvzbKepLcBJT3jWJdhu662LzfJGC8ub", - "height": 86716292, - "next_bp_hash": "ALsAx1zoiwiCvcJoSrNuGbtTk3XcUcXdMBGaZAW9C36m", - "next_epoch_id": "BCC27fXZwLaqs3MmuhvVfiSHtHjSw2y4zQfP6RTCT2QS", - "outcome_root": "EwkVmmLtfMwR29qGPUDVAEVPJZFPWjqTGBGpYDxLSja3", - "prev_state_root": "8NnmP9ZsBesVgrLwWbLTNVGp9T8NK2oRcBLAsL7eZsCp", - "timestamp": 1678142413035318546, - "timestamp_nanosec": "1678142413035318546" - }, - "inner_rest_hash": "49Jsd8ULPst4hPqn9gLV42pncN2B73Xgab18S4BRARMt", - "next_block_inner_hash": "381NRbYEm7wo1miWJhCvyGFC7WuMyhTJkDP62rrPmm79", - "next_bps": [ - { - "account_id": "figment.poolv1.near", - "public_key": "ed25519:7RjyY1bRKDqkshbKZtgpQdwsdxou8j9my8g1hPKZ9ngM", - "stake": "39206129243863608141066930499972", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "staked.poolv1.near", - "public_key": "ed25519:3JBVXqenru2ErAM1kHQ8qfd29dCkURLd6JKrFgtmcDTZ", - "stake": "33419809779120392920269809612199", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "astro-stakers.poolv1.near", - "public_key": "ed25519:2nPSBCzjqikgwrqUMcuEVReJhmkC91eqJGPGqH9sZc28", - "stake": "27294688224403596819807905373855", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "bzam6yjpnfnxsdmjf6pw.poolv1.near", - "public_key": "ed25519:2ZJqaaCAisK4u8E2i611zFfvNmrvevovnU3M7SpGHkLY", - "stake": "23416062305792484840940844551487", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "zavodil.poolv1.near", - "public_key": "ed25519:HHARoU1hANWF9hu7YRstDDvgyigBhUeUuqecRVr8dpUz", - "stake": "17630216582180625016114945099933", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "binancenode1.poolv1.near", - "public_key": "ed25519:Bb7uPEocbsiQwRfPmsiiiM88DodtuYnBDi6dKZ4JZo2N", - "stake": "14048896105546755595738737008478", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "yes_protocol1.poolv1.near", - "public_key": "ed25519:4bnrmHSMYkvsgjbQSaCY3AFwrfS1w17ACEUQdn7aC4iT", - "stake": "13632840600753345981723601120095", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "staking_yes_protocol1.poolv1.near", - "public_key": "ed25519:CVVcLtfAWj6k1DqKJwhYBQwjMQFmXzFY2NBdMxp1RqL1", - "stake": "13548114501459907012425142831555", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "epic.poolv1.near", - "public_key": "ed25519:68HExKDtw1CjGzopZ8fMAMhMSZRVKRhwLzLQmGKtFNzT", - "stake": "13361490946637633806027080459531", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "electric.poolv1.near", - "public_key": "ed25519:GpSr5KAZMZ1Cb4dHMRUVhmp95y2fmWtm4dEjAr8iAva5", - "stake": "13094194582706200726499022124313", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "aurora.pool.near", - "public_key": "ed25519:FZKXoWHFCXMrKiXjAKFdHo5g9PDom4bWMRFERBfufi2Y", - "stake": "12455530195608719577803023115066", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "stake1.poolv1.near", - "public_key": "ed25519:7EiVt9i7SmULDKEnAXBFSMzwUmZdxUYDFkP73MZuCH1h", - "stake": "11723004342951596666411372180029", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "sweat_validator.poolv1.near", - "public_key": "ed25519:677kArWPFPRDgWEBHqHj6BCmEdTVBsAcjQAc75Gtyq2j", - "stake": "11061535470684271849484334918122", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "dqw9k3e4422cxt92masmy.poolv1.near", - "public_key": "ed25519:EPNc2bHqRCz6TKLstNiusv9qZCRBL63zViwUAcgoZJZj", - "stake": "10479308296906700818189011839258", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "future_is_near.poolv1.near", - "public_key": "ed25519:F3vEGwYYGisaXwKJWrYgorB95DfArDby8bK5wydxD5fp", - "stake": "10309322520727981661721876402207", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "rekt.poolv1.near", - "public_key": "ed25519:FoAaUdVKEHtVokG1aVmJNou61YcfQhXmaZ5Hnfsz4fHC", - "stake": "10079667782041637158777028934416", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "kiln.poolv1.near", - "public_key": "ed25519:GAekByYrSuo3seuaGQx7V1ZTC3gWZY8JxZJ4aWW76LiT", - "stake": "7980652394651037069871965079140", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "nearcrowd.poolv1.near", - "public_key": "ed25519:He7QeRuwizNEhBioYG3u4DZ8jWXyETiyNzFD3MkTjDMf", - "stake": "7002893129834998728551934925199", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "finoa.poolv1.near", - "public_key": "ed25519:62gxgzoie7FiK9dnWuiwM1bbuvhpceYDavK7SgdfEMJc", - "stake": "6862544459467539008922458111228", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "d1.poolv1.near", - "public_key": "ed25519:7ZhMRwnSHGJtWjGBZiRhhSi6XyqKeNHtnEXsVTNdrsk6", - "stake": "6522886931909028877795116092724", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "continue.poolv1.near", - "public_key": "ed25519:9rDZywYL3tnvzj6hnePw3MaPFPfSeSCLxBp1niTGbMaK", - "stake": "6418629997062742180813621956876", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "anonymous.poolv1.near", - "public_key": "ed25519:Hoj7LbPwNwAkLFhf8z2aDF1BG6NDSrq1BfkdaKqPfbXx", - "stake": "6271712752150531999559361269851", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "hashquark.poolv1.near", - "public_key": "ed25519:3YDdmN1vhF7yAWnYxGMHY46jcLE9h11HvEeF6Kntugeq", - "stake": "6176316778768669484263610930775", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "foundry.poolv1.near", - "public_key": "ed25519:5Qx8Fq3SK4Vu1sRRpf2HsNGLAqdNqgkKEebHMniLWhkW", - "stake": "5925879216899098565250728067432", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "near-fans.poolv1.near", - "public_key": "ed25519:AgV97ssnHm7qN8JhYZjwyDtuaT6Ms3Fgbw3WeAC8M3iF", - "stake": "5646665045313893189005647236282", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "stakin.poolv1.near", - "public_key": "ed25519:85UGfKdVoxX9u86JsBMxmVHBguYonnM3vTR2WoD5GkEg", - "stake": "5583623315375786166458286896325", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "neardevgov.poolv1.near", - "public_key": "ed25519:FsZH8qQGfHRxFUbrK5pCEDgN758ZmqUtcUtYRWWGCcAG", - "stake": "5554866332371942354526927649509", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "hb436_pool.poolv1.near", - "public_key": "ed25519:7oU4C3vWqkeup7aMfjyV1ojt7yKX7ShLfvNCahBRy1eW", - "stake": "5396966930657509205043842792722", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "chorusone.poolv1.near", - "public_key": "ed25519:AZwJAgu2qRxHwdpj8ioZEFGcc2jbaZGN7ZvUe7CuXtM7", - "stake": "5287147598217926353386779299664", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "08investinwomen_runbybisontrails.poolv1.near", - "public_key": "ed25519:C6yqxQ3suwjmm8ufG5e3BsHiwxUs9h839FCneF41V7TM", - "stake": "4857774634147130373813689246471", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "p2p-org.poolv1.near", - "public_key": "ed25519:J441YAvvYvjWs3aVzjc5KLLWRzmhQTEMaymPyWFkMGeG", - "stake": "4723790666044236105496108137009", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "northernlights.poolv1.near", - "public_key": "ed25519:7HXh6iS9Rh92Uj1c5T9fPjQXPLnti4Rr2cJQcJEYpdGV", - "stake": "4712387224906733281947973541174", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "nearfans.poolv1.near", - "public_key": "ed25519:GM8vWM4TqTt7jh3sXYCAs2KPyn4vEmAceteBGEFYhyku", - "stake": "4710423887240747307183606599570", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "everstake.poolv1.near", - "public_key": "ed25519:4JLvwa1r2eAxHLyKeDJnpqMG5f2Z9rr49rwuTwb9g8u2", - "stake": "4623315567330451805820491717070", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "openshards.poolv1.near", - "public_key": "ed25519:4Xm73PiAGMZu3mZg4gF7j96iTAFHGbPvqzxBaTgKP4ub", - "stake": "4611959073339809590025288736983", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "dokiacapital.poolv1.near", - "public_key": "ed25519:FGcJJeWMyx1xDbfkcPM2oMeUeGaADJuPmeqx5rjsHn7t", - "stake": "4332759036466228308554905977698", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "accomplice.poolv1.near", - "public_key": "ed25519:5ck255MtkoGQxh9LfjNtdb4M7WHkUmjU7SBJCEkZP2B7", - "stake": "4266120587684739122299552723543", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "cryptium.poolv1.near", - "public_key": "ed25519:5Y9hW8cKBb5RnsJBqttHHC5ujz5zcZZ5xnrJPwkCWmGQ", - "stake": "4227791919561939934282903484058", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "blockdaemon.poolv1.near", - "public_key": "ed25519:3GNFSJiFQQ1rnR68T4eZRff2omPhg1CTewUHBJpQAdyc", - "stake": "4197683971126897677552917113311", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "pandora.poolv1.near", - "public_key": "ed25519:53N7KBhSkEP6tLuQmxZV9fAK16D1C2kWnuzes8KNyS7P", - "stake": "4146080022605167207664031127947", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "bisontrails.poolv1.near", - "public_key": "ed25519:Emk6wQJtpQZRJCvvPmmwP9GD2Pk37xxRpmb5uRvJpX62", - "stake": "4038512909923817748075892748374", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "smart-stake.poolv1.near", - "public_key": "ed25519:A6wpkLQiYqPZ1rbd9s5S1Bg3LxccVsQqiCRDUXwzJ6Hx", - "stake": "4003234307493046391337326649739", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "nc2.poolv1.near", - "public_key": "ed25519:He7QeRuwizNEhBioYG3u4DZ8jWXyETiyNzFD3MkTjDMf", - "stake": "3869238705002385060975735647681", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "ideocolabventures.poolv1.near", - "public_key": "ed25519:6NFuvrmnJiokXibR9Z7TUHjB4NJnD1rJAHhBu9JWmBdh", - "stake": "3771051905041496783453388460098", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "stakesabai.poolv1.near", - "public_key": "ed25519:6abauNvvWnEkagjVpWRy2tZJdzPkmqurUjteMTKk5KQF", - "stake": "3535334314397193862153015712370", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "buildlinks.poolv1.near", - "public_key": "ed25519:Hd3irGt4zEqRPAzcFszX3oTkVWRFFxdecDvShCJSS1Wg", - "stake": "3526372164342614084796298814676", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "sharpdarts.poolv1.near", - "public_key": "ed25519:9XMHXqv7rM3QQxzjUu7dfKD7GhMkq8CEceaPdkhiBQUX", - "stake": "3434848476944224053624702383467", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "consensus_finoa_01.poolv1.near", - "public_key": "ed25519:3LqCGkM3uLjQjPmd3yVyaEnceinEL4cBfUm9vp5hJRTJ", - "stake": "3210187970648326218235433796250", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "nodeasy.poolv1.near", - "public_key": "ed25519:8mjespqqUePSYSsxYxPqCUsZUuMxVJr1vjBRwFeCke5K", - "stake": "3175117754588187183467391312105", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "consensus_finoa_00.poolv1.near", - "public_key": "ed25519:62c41nzrrZAspLnPBC2A112PXBhJuj1cGkVE3ANwbzat", - "stake": "3137487132332056735962851894070", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "dsrvlabs.poolv1.near", - "public_key": "ed25519:9SACdsDDgXA2WZLfJvpkKbu22Exxtc4CMbeHmVnN2P4a", - "stake": "3068789867106978388439487819348", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "lux.poolv1.near", - "public_key": "ed25519:HzTGTDfTz63QGvvUdMGozFeaENFGyYAoSrqYJb23qZFN", - "stake": "3028423991046584165619348124538", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "lunanova.poolv1.near", - "public_key": "ed25519:qkfP4NsSuHybdLhdvvYQ2Y9xWPsd249thEvrzbJBKNc", - "stake": "2870316617608351013129493882339", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "brea.poolv1.near", - "public_key": "ed25519:8dce49J5G28yMGRcSiDnYNFh7GBSma8TmYaw5mGTSH1Z", - "stake": "2761858870237463180720625792343", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "zkv_staketosupportprivacy.poolv1.near", - "public_key": "ed25519:2kAo86DW8mDaLDg37rFhQY8UYSZVq1CtegUHBEDvpSMA", - "stake": "2689727012142129963731924151456", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "baziliknear.poolv1.near", - "public_key": "ed25519:E4LAWdgLifBEoaWvhRNy5vpdAnUc3GsUHePeiAurZY5v", - "stake": "2688388636772692288448305121899", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "erm.poolv1.near", - "public_key": "ed25519:88nnN6LAuCbJaj9wucd1WUMfTtdv2s3njpvozHft8oQ5", - "stake": "2535798066743341414045251252289", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "fish.poolv1.near", - "public_key": "ed25519:27KegJd17HeXHk9h5MqkT35QAuvYvo5GFgPTpSVU4kPN", - "stake": "2359349916980152012597982756209", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "01node.poolv1.near", - "public_key": "ed25519:5xz7EbcnPqabwoFezdJBxieK8S7XLsdHHuLwM4vLLhFt", - "stake": "2330998910140068045131278690848", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "stardust.poolv1.near", - "public_key": "ed25519:6rxCJpTnrT6NFuGg6d5Dj3FEUz1ScNU9u35ywB3dYhrX", - "stake": "2179193523704935865995375845863", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "republic.poolv1.near", - "public_key": "ed25519:5sT6xtwxvLARW6y3KURYmyFd5SokJFhiK4jyqbamzzZ6", - "stake": "2124651577543740701890267481063", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "moonlet.poolv1.near", - "public_key": "ed25519:GkDwzPckMfhkdYgyFG69Uph8RJ12BcV9xNeZW2q93ZJD", - "stake": "2060503312099452529479997679460", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "allnodes.poolv1.near", - "public_key": "ed25519:AGEeyukQdMtg8EttsU39YLgryhao8yQeVwQTut5bbWdL", - "stake": "2041189719996971478342261526212", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "masternode24.poolv1.near", - "public_key": "ed25519:5ZyaXsGCya4Sch5bqUfohvo7iRFYB9ancRouggWRsiDU", - "stake": "2013012692631849510294424733258", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "legends.poolv1.near", - "public_key": "ed25519:DNK46DeHKeJPF9YetmNxZnqtpkeLjdUb9ezSRCue3TpB", - "stake": "1968963206127000985432877551650", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "fresh.poolv1.near", - "public_key": "ed25519:6YHLXhohY8kMnkp5Jw4HrJ52xtdyt1rcP6AaWkKzh3ED", - "stake": "1908553262368274972364412463603", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "nearkoreahub.poolv1.near", - "public_key": "ed25519:HUKmMJ59Hht8rcGG6uZ9M4qWsfbTCDtBgyV93YZnPXGE", - "stake": "1811363932350908894826349268172", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "inotel.poolv1.near", - "public_key": "ed25519:DmEDRntb9NwfbfdvDf6wzjsw1vxzQcJAAhFL2J75iLwr", - "stake": "1783140530783276198612825703651", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "appload.poolv1.near", - "public_key": "ed25519:6LbMVL6otkvZbpuC9sN3z7EXSMo3PT9noPeBdBZTFneM", - "stake": "1777016586059857984166086383996", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "qbit.poolv1.near", - "public_key": "ed25519:5DqZLnDu6PMEyhJzc5NhiMsoWeYMWG1bC4AULyafoXMv", - "stake": "1652745895856216988922137332983", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "jazza.poolv1.near", - "public_key": "ed25519:EW66Fkv7XcE9FiybuYtVURjHhYeEgwWWpzF685Vi7foY", - "stake": "1600810581770426565414413340826", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "avado.poolv1.near", - "public_key": "ed25519:FdLWsf42e3Sc7bdKMtxJMgWRP21ysZDSXFnS2vTwTaaA", - "stake": "1505671712920196582626546247266", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "satori.poolv1.near", - "public_key": "ed25519:9r8HYmw8mbys2Ng9BaKeQqZnaQTGCcBUbMatV5NeeWJj", - "stake": "1505563874806956005096650532342", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "ledgerbyfigment.poolv1.near", - "public_key": "ed25519:4JJTNeMaSb8W3NELh2rkkrDCqG1VpM3gdJ1hc9HFTBmN", - "stake": "1378902973337960064375143109943", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "atomic-nodes.poolv1.near", - "public_key": "ed25519:CpVAHE3JpfDoEPqjBDgYEjgG8JhM5BFKbjUD2N1EuvAL", - "stake": "1320330340013835475473012378960", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "pandateam.poolv1.near", - "public_key": "ed25519:Cu83NRziNLiT6HLu9kJ8svFoftZQ9wVmjScxjqCybppt", - "stake": "1319203644166316104758512034128", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "staking_sp2.poolv1.near", - "public_key": "ed25519:CS4uHAipvtxGz9irnoCX7SxT6d8zKpDj8Y3Fyf2zVgBp", - "stake": "1189875320275820429094732822094", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "nonli-near.poolv1.near", - "public_key": "ed25519:91jusDFxjY32h51tfq2HoKhoPbGs66s88t1v2oZPBSxC", - "stake": "1185432705606468385332754514200", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "bridgetower_v1.poolv1.near", - "public_key": "ed25519:AHgnnt8yhNBpoZChBiHXfjaH6X2zMZaDDXmmSWHvDcWL", - "stake": "1035663254387646835799962119440", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "stakely_io.poolv1.near", - "public_key": "ed25519:HWp9E3gP91s25ddMS9xUWuzbJUpVGiPoitu5bT6hqMHs", - "stake": "1021258364486646824071027357415", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "calimero.pool.near", - "public_key": "ed25519:7A9aFJtr9yWh5eyAUUUSdXMoxzi1qBjshiVCjsDWWa1J", - "stake": "1015874783766921089538649131256", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "staking_opp_disc.poolv1.near", - "public_key": "ed25519:8XbCfLQVSwtwaBajvByG87CxPPbaFdryz5qEkde1fSGv", - "stake": "945252783112950401552190350991", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "galactic.poolv1.near", - "public_key": "ed25519:GFK83N32DbERtFg8rkpfNBsKtkFpmNQzyKFM9kJvPCMG", - "stake": "831246120998540891354298874477", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "cryptogarik.poolv1.near", - "public_key": "ed25519:45zFAC8pLgwn1d5pSBpBHesWbzngfRgd92zaom7K8m8j", - "stake": "828004032171300648370990744344", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "optimusvalidatornetwork.poolv1.near", - "public_key": "ed25519:C3CJMKaWdEzkqyNCKwnKud6wDNnzs7Ura63k16zm4LUU", - "stake": "801755793868841694119971272782", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "pathrocknetwork.poolv1.near", - "public_key": "ed25519:2iJQLVXubWafG7K1NzGVvjP54UJCgVg3cuPMktw8r7uQ", - "stake": "798288406254751164539305822812", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "dexagon.poolv1.near", - "public_key": "ed25519:AQHwptR3Ho348BpFXJDjkxpWMW5ZwN7xWM3XWAWSEEgs", - "stake": "781119997524930787753273551265", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "staking-power.poolv1.near", - "public_key": "ed25519:42ikqyV1BYmSnhHJ9EsLLy9kgeAg1mC3qqU1AJGaTEaW", - "stake": "739158259862982574010823948092", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "infiniteloop.poolv1.near", - "public_key": "ed25519:9BUwtDegzwKcmJBjLgUDLHc3pePgPKcWJXYGcZb33Nyr", - "stake": "694945966749165983829361965202", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "prophet.poolv1.near", - "public_key": "ed25519:BV5b4DpgCUy1TEitE4TVPhpTY7uDNpHc8DBPyH6cYCBq", - "stake": "671635020628939237380029587432", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "bitcoinsuisse.poolv1.near", - "public_key": "ed25519:Cy2sboVqjDk6d3d2A2AJZBdFvokjk7sjZpYATLjcQSCj", - "stake": "664239734198440103401629427218", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "cryptoblossom.poolv1.near", - "public_key": "ed25519:5opTNJEkCBYuyMgAghY2Sxp4bBtXYQtbEvZ3Wc5Awohb", - "stake": "657665183791735436571718632241", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "kosmos_and_p2p.poolv1.near", - "public_key": "ed25519:41GWxdQHe4Y2fuisvz5k5G2NwDFEavRkisoZkB5tfJuC", - "stake": "636577548907797834502568994402", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "readylayerone_staking.poolv1.near", - "public_key": "ed25519:6AuBsxxSCYHkuJW9Rhf7HK2qYKErtThZUrN5HFDnQ9eg", - "stake": "627738918419591761430004629136", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "n0ok.poolv1.near", - "public_key": "ed25519:EC1p3w9hd4XkYoUiAKc8PSQGVFGiUXTDJvqkurRdAFz5", - "stake": "603091766828423031754951292758", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "dragonfly.poolv1.near", - "public_key": "ed25519:6Gj8MRp9KqfdiXa35LJcZnqeBNNEZoYk6ysvpzHaruvq", - "stake": "573145205007582852162929757548", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "pangdao.poolv1.near", - "public_key": "ed25519:C35kAQVW6MHoWtUZ599WHXamRXVZnrHMVD1q85FERiem", - "stake": "536104952358448307683904244716", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "nearua.poolv1.near", - "public_key": "ed25519:6YRLTm4coawMYrchYs1ex5BLY7xtnPrnvGWgk6NJAQvy", - "stake": "471397693642001593493614085881", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "galaxydigital.poolv1.near", - "public_key": "ed25519:8ZD8CcSzSfVsYo7XyABHJsYcrpBE3EL5MwukoEfrNYMR", - "stake": "448811822469059379056147844225", - "validator_stake_struct_version": "V1" - }, - { - "account_id": "grassets.poolv1.near", - "public_key": "ed25519:GS8uhr7mhsBWB5c1JgvsJzpwZDGrcnB9Xnw7YRyMSQP5", - "stake": "418986205174954907945983151920", - "validator_stake_struct_version": "V1" - } - ], - "prev_block_hash": "HrafGqcmmviAysiDHZypHiqj5W6Edr7QLUK2rkP6dCRA" -} \ No newline at end of file diff --git a/fixtures/e2e_bps.json b/fixtures/e2e_bps.json new file mode 100644 index 0000000..9b1db62 --- /dev/null +++ b/fixtures/e2e_bps.json @@ -0,0 +1,86 @@ +[ + { + "validator_stake_struct_version": "V1", + "account_id": "01node.pool.f863973.m0", + "public_key": "ed25519:3iNqnvBgxJPXCxu6hNdvJso1PEAc1miAD35KQMBCA3aL", + "stake": "11170441638409425668975791338168" + }, + { + "validator_stake_struct_version": "V1", + "account_id": "aurora.pool.f863973.m0", + "public_key": "ed25519:9c7mczZpNzJz98V1sDeGybfD4gMybP4JKHotH8RrrHTm", + "stake": "17889966138083499342131296757169" + }, + { + "validator_stake_struct_version": "V1", + "account_id": "bee1stake.pool.f863973.m0", + "public_key": "ed25519:B7Mwy3sCCJ6GZzEojsKFXMjLQfVXPDC4Q1LjuHoZcyM6", + "stake": "951628760573009933043158953323" + }, + { + "validator_stake_struct_version": "V1", + "account_id": "bisontrails.pool.f863973.m0", + "public_key": "ed25519:8g4P5EXyp2b2pfVMHY1QLfkRcY59hjPfWrFCKUWX3RmR", + "stake": "784322861597508336390510885838" + }, + { + "validator_stake_struct_version": "V1", + "account_id": "everstake.pool.f863973.m0", + "public_key": "ed25519:4LDN8tZUTRRc4siGmYCPA67tRyxStACDchdGDZYKdFsw", + "stake": "3424542870162917789465110810613" + }, + { + "validator_stake_struct_version": "V1", + "account_id": "forked.pool.f863973.m0", + "public_key": "ed25519:5CTpVEzEdmn5wK4y5e7DsqtRvQs3bM1ypUNU2RGj3mtL", + "stake": "19553588599682112903267112637" + }, + { + "validator_stake_struct_version": "V1", + "account_id": "kiln.pool.f863973.m0", + "public_key": "ed25519:Bq8fe1eUgDRexX2CYDMhMMQBiN13j8vTAVFyTNhEfh1W", + "stake": "7466078259126542726635504903558" + }, + { + "validator_stake_struct_version": "V1", + "account_id": "lavenderfive.pool.f863973.m0", + "public_key": "ed25519:AzwAiLDqprZKpDjhsH7dfyvFdfSasmPTjuJUAHfX1Pg4", + "stake": "30215218325260022435961435186" + }, + { + "validator_stake_struct_version": "V1", + "account_id": "ni.pool.f863973.m0", + "public_key": "ed25519:GfCfFkLk2twbAWdsS3tr7C2eaiHN3znSfbshS5e8NqBS", + "stake": "3102526369640411151678859285501" + }, + { + "validator_stake_struct_version": "V1", + "account_id": "p2p-org.pool.f863973.m0", + "public_key": "ed25519:5qyxefArHQfABdNv9ELuEiWcEo7DTzABM9LrMAKTCY3Z", + "stake": "100198001398444504508422270154" + }, + { + "validator_stake_struct_version": "V1", + "account_id": "pathrocknetwork.pool.f863973.m0", + "public_key": "ed25519:CGzLGZEMb84nRSRZ7Au1ETAoQyN7SQXQi55fYafXq736", + "stake": "1716080041801977779897178399888" + }, + { + "validator_stake_struct_version": "V1", + "account_id": "stakely_v2.pool.f863973.m0", + "public_key": "ed25519:7BanKZKGvFjK5Yy83gfJ71vPhqRwsDDyVHrV2FMJCUWr", + "stake": "5536803168134829098864689871766" + }, + { + "validator_stake_struct_version": "V1", + "account_id": "stakesstone.pool.f863973.m0", + "public_key": "ed25519:3aAdsKUuzZbjW9hHnmLWFRKwXjmcxsnLNLfNL4gP1wJ8", + "stake": "1884761660283483727605426573806" + }, + { + "validator_stake_struct_version": "V1", + "account_id": "wolfedge-capital-testnet.pool.f863973.m0", + "public_key": "ed25519:CQEMcPQz6sqhAgoBm9ka9UeVcXj5NpNpRtDYYGkPggvg", + "stake": "4110455987307868059339044490" + } +] \ No newline at end of file diff --git a/fixtures/e2e_header.json b/fixtures/e2e_header.json new file mode 100644 index 0000000..7613b96 --- /dev/null +++ b/fixtures/e2e_header.json @@ -0,0 +1,15 @@ +{ + "prev_block_hash": "5dbt6rh82Xx6nNG1PuKoQj96g4jnWw6cyb8HNWPPkVJE", + "inner_rest_hash": "DZT9p28adyuiTSbUV5bsuPRxX9K7R1bag1AeUEMhm4bh", + "inner_lite": { + "height": 154654776, + "epoch_id": "FsJbcG3yvQQC81FVLgAsaHZrMBFbrPM22kgqfGcCdrFb", + "next_epoch_id": "Fjn8T3phCCSCXSdjtQ4DqHGV86yeS2MQ92qcufCEpwbf", + "prev_state_root": "F2NNVhJJJdC7oWMbjpaJL3HVNK9RxcCWuTXjrM32ShuP", + "outcome_root": "7SYchEDbwawjP2MVfZ2GinP8bBQU1hKFRz34b2ZzG3A8", + "timestamp": 1705334624027402581, + "timestamp_nanosec": "1705334624027402581", + "next_bp_hash": "AcNatyPz9nmg2e5dMKQAbNLjFfkLgBN7AbR31vcpVJ7z", + "block_merkle_root": "3huzCnEQhgDDMWyVNR9kNbQFJ7qJGy1J4MBrCJAWndW9" + } +} \ No newline at end of file diff --git a/fixtures/1.json b/fixtures/main_0.json similarity index 99% rename from fixtures/1.json rename to fixtures/main_0.json index 538b2ed..f8c0993 100644 --- a/fixtures/1.json +++ b/fixtures/main_0.json @@ -1,4 +1,6 @@ { + "last_block_hash": "G2zUHxU5d5mbXXCAgQdKtK3c9epb1mjqg3QYhzYSN7pZ", + "body": { "approvals_after_next": [ null, null, @@ -717,4 +719,5 @@ } ], "prev_block_hash": "B7dCe8xYAY8b379K626jDq7UiLqHDGSaN99YWZvixVAo" -} \ No newline at end of file +} +} diff --git a/fixtures/2.json b/fixtures/main_1.json similarity index 99% rename from fixtures/2.json rename to fixtures/main_1.json index b5b8fcf..9027d4e 100644 --- a/fixtures/2.json +++ b/fixtures/main_1.json @@ -1,4 +1,6 @@ { + "last_block_hash": "B35Jn6mLXACRcsf6PATMixqgzqJZd71JaNh1LScJjFuJ", + "body": { "approvals_after_next": [ "ed25519:5vvbBTHSa1zmqDRPLSSNZXCQQWuEpT3rvhWZTUyCHULHemVnGZU6asN9m9z7ArurmQYZKWKJhRXfWMipBQAHxRjf", null, @@ -717,4 +719,5 @@ } ], "prev_block_hash": "64Ho8BgxGx7UuDsjXNbzLVt4kvVkxzt1bThCJb6e9qaq" -} \ No newline at end of file +} +} diff --git a/fixtures/main_2.json b/fixtures/main_2.json new file mode 100644 index 0000000..8e906e0 --- /dev/null +++ b/fixtures/main_2.json @@ -0,0 +1,724 @@ +{ + "last_block_hash": "Doy7Y7aVMgN8YhdAseGBMHNmYoqzWsXszqJ7MFLNMcQ7", + "body": { + "approvals_after_next": [ + "ed25519:2VhGGz8cojutZkdWbZ3bUUc4fqVdM6oo3zBtadCfa2HpUw8revjxpbbs4upmF7JFEWgwgfnX8nnDregKLvEjgc7m", + null, + "ed25519:49KmyiPyt5q51xdtDkcQ3ETtyPsUq8ddUWPttNLrnGNKhCwpykaPy8zNhXiFYPQEaZ21SAB5Euo3k7U2kb7mFJcC", + "ed25519:2xvJ1PY4cbZ7DnVoQhX24Bi47ef6z23FByTjK5sbtZYer2W639KUaKSeEVQAs5Jz4jWbCpBGjDNRRgLNUBh8ZUfi", + "ed25519:49dng3dQytReroebX6po1S7y7JmewstX5JdbW2yK5tqzfdAbzyizozfYb3jS7FWpqcbVCU8j7hTep3rAX3xeWRDu", + "ed25519:4Xa1VPFo9WjcFKAFjRmvB4uAGcQVkrVMrgo7vX3MBYr6cDaXCRrKjk4UFzYqGJtD4jvkZrN7CH2LYmKm7QiE9U8s", + "ed25519:5i9irHTS7p1W1tHmi7ANfWfr4Epcn9VHFeNs3Uvq39CknfCW5xf3HnZXfcKMJXW9DX1qCmMU9eTBaYygZ5BZa8tR", + null, + null, + null, + null, + "ed25519:2wnBH5A73zCforWmtYQX2jmjF3DAo8Z3XcxvjFMiGjemYy1KbxLqhCjwfpeN2xB7ZCREEuBE6yriutFvtAvDWZdv", + "ed25519:2B7PqahnewnRz296wDYxpUCeSobM9w2sLYviGubk2h38sEvUWbgBi5Jxvbck9ADMPNEyiYEbetr95Zfv57tjm4fR", + "ed25519:5AWEsgjcn4QstDAdVYCJTTnjEyvCZ25Cp4h6canRJhFDFcUShkRSTBR38XoCKo9Amn7C1JWqVxkgk4wpogXSHcjD", + "ed25519:49efUuXm3BM5XY3HSFSPjtv47w5JuRtg1AGH5ojFtzBTvVsqgEVXpKXi6ZupDxMT26d9g3jyFWqzvis4PTHMD4Jg", + "ed25519:ePPSYDSAK4R1wmQc9HwbCuZd2FYgqRNknkFwREJSaA32sHHPykNoAJza8T1a8GVzHoTJFaaXNF1H5Apvg8ysqFo", + null, + "ed25519:3CqKXCuBtYkvwk5xsRwRCoYFwQeEScCUbJGuZZzn8H1hJkb7eSZAtvouUxVVMaRxyPGZciyFaLhpoX6X6veGbjqa", + "ed25519:4xfsJpdJApuRveVRsdMpuK7mDdx1MP3uL3U3Cnib5J5sQPbUS33MzegaFLr8LcYeUTLsSCT6ycMi4k7eeC4cx2uy", + "ed25519:4HnubxkveyE15tMZNcEDLq5DxxLyFT17XpsMD2jsw5BGUb6qCnTZuG5E8KQuvvbLMNcqnA9vrnhWbd2LxqtghaUs", + null, + "ed25519:562BGk9m5WwT2CruNiKTYJnquQjFadeURRYA97xZ6e4R6Gu19QAYkcryjCePZyS4kEKm2xjefDqpTaSgf2Kaf2VH", + null, + "ed25519:SvdETeddpFKbtHDCrvTnJKnu6SvE2mu1evahcPrf2RmqZK6Cz8dzAMykjvE2fVcxP46M3opovaFZxzc7o7Wt8cP", + "ed25519:2xPkMJbmdTbiXDhZ3R7QNaVL7Gh9qVaSXbon9LaKUg9aVtJZTxTVHXGDLC9rdU5Xkq35UGmzPyqVjULLUawZuGnV", + "ed25519:2oDV64kdMt4a2VuRiTeAoVu8Fpdz5RMs2twSFKYi7D6chBGjHxNrYGtLxhxFAScqDVmxDjUoRK1Dnvdytvtgd2n1", + "ed25519:4gVh6trN6irVVsTQMyQFdE1z2GJcfDuVbwCLz76CRP6UJ1LAB8Lk11TfXeckKy39qrExZjgpUxpfJidXYN7xYGYR", + "ed25519:PDxVou7E2mrxojsX42mL9zv73stcp8TdDAjb1UDT2F4MN8yd4YR7yYpsrK1NRxL2W7osAHyLnE1peWHdqBvzkLs", + "ed25519:4Cah1td6h1zgswNwSNosVicXWbQ38WUjEM782Zm556WWSsSYgjGezYy3vsvkABQuCPorBSHxngPgTYohcSzwo5j7", + null, + "ed25519:2Pm6xG7LvKD9fMEvtSkvMRizPFPP5qBrh29YqDvkCKmoYMJBZSoQJP7kSECWSdJannn1hJkzg8AUFE87FRvCh8E8", + "ed25519:2TNsyhbGWnJfN9e8Yaaggfbf3Yu7w7JpGAQnUe7LkzBKfruLF9yDxaAo4yc5CVJiVqX13NnQfPLcVPpaD1wgMFfV", + "ed25519:41CHKZLBr3pM2eE5wXjgaXrBM7ugTiBBn2JSfar2tHhoAtSKNimfyfws9DemJDs7LB8CBNc85WtqdwGgCsB1nWfP", + null, + null, + "ed25519:3ePYVb2Vnq2x8hm7sgoZWNVC3Hbx8RVXs37AVCpo1eLLLeReRocMDnDUsTss7kBHqMwi5QpZ8ZBUEocYFFX4MYhD", + "ed25519:h3YGEEUj628izdmDR4eBmqYhtFcMfQM14gpL8cmHzE1eCpLmVWE18xQFcdbGLAoW8RGsVPaYdBHbrkGznNA6rT3", + "ed25519:52wySwA9PdQNbrcJnw5oeaK86UGjKP1z8QcWPZZmi68indUqyHgo8x355AkH5hw61DoxGfZ2SCTMGSV9u2b5n8FU", + "ed25519:4ecMCbGYYkBFU8Udth8uozYMnvkQqNde41ZyzBfzABFSoxxv9rK7Tc1BfCeedtUJvmqGUWpwQ9wcWHgKT8BYqNf5", + "ed25519:23SyCVTm5KWjHHkAs4GFCZTvzZhB3G4QtpJNeSz8JgZdT6A77dabePnUqWpMMENF7rKF1dr8bri9doJR37PZB4bU", + null, + "ed25519:4saccLgvU75D4nBJWSPzd71mqtRGHhv2Kx5CtmGSGLxGG1Sd2BmZtrL9rHksQGjRVKxmHswv9RRDdj7JRKqCVJJx", + "ed25519:3CqKXCuBtYkvwk5xsRwRCoYFwQeEScCUbJGuZZzn8H1hJkb7eSZAtvouUxVVMaRxyPGZciyFaLhpoX6X6veGbjqa", + null, + "ed25519:5XmffM6JMYCQQum9764cGxRA7xDGYMUpY3T5Jaiv89f2XHNniA4ZHUN6LkWnnZbdbj97cJYbstvTgCspbWQvVdfH", + "ed25519:4J5LPAdP7Cbe4foYg3qQdTQyxLDVbZk79BR1xJEY1TQJrtJq9JyJPqHXxYibCqeAPVqXhWXJzMzn7BGjYuff8znN", + null, + "ed25519:47Hydvzd8rUcaWF7bkV1Vap7yPvFK7PeMSGMvhjRzNdfqjvEBiJoR4t9ktYVphx9BCQSzDQYdxjysR7yAMykq9rb", + "ed25519:4894KtUJZ6Fp1eoMWnUo3gPZLnMS8q2CMMGRYjXxTiEfM8oRDjzUKhg4x1QLUwCWoq593UpcyroqhcAUkufLXkgD", + null, + "ed25519:5wvk8hNhNzUefu2ig3eyPcx9FHQAqTa9ScornNdGQ7X5VFECzDtXKZh49VDs3SiSAyC8iuB8FgJdxmUq1b39Xoxk", + null, + "ed25519:21KSxZzZtDkLLH5RuJ1auP73qkuL4WXyRLtdvq1XSRrH8Yk1AyqhsJ54YbRbbXmetpRuXuHKENwN1hQsNd37vQZd", + "ed25519:4NcmdYz5VjHKmSRboX8NYsZLRGtGe6bPMcpCcWQdQfTXezDY6EtYL8awXWd6Y3kxaaZkJJ69FuFBazjtTTWADivu", + "ed25519:34sdiKBSp2jkjTySbM14ivoXseRBxpYus7jAfsBNnaa4KPxhpLXVW32proR1YCt732AErg2KnyC7xkJc3Y6CVJ8V", + null, + "ed25519:4aijMmx4KWhS4XmxBfxVCxnJ4s8Yz3iRrFBLYXywb5v13CtKxW9VKSNqwAXJw6jndVaPTo7rz53CsSWNG8CEujgz", + "ed25519:52MtGXV8G1Tq6jWWZZXxBVGVQQK8Egz2yt4TRMqEe4YPDgo9PmCwoNbpzPTSdBQXi4hwFDHpSP5aU1DdjnFLkrFA", + null, + "ed25519:5xBStwognhUYGVzX4dDyVTvJ5HpT5wqFnLcAbNVK9XAJXdivcZqX5MjFBLiwyPHUpPKvx25UEztbtpQVyTqjaorq", + null, + "ed25519:2GhyEXY4wR9iqWshGEF1tQ5Fwb6M6ZGUeXUwQjHed5eUQs71YwuYUyACgSH5VoMiJwGhPhitrjwBVqV9eLHbmDzv", + "ed25519:31wQipuDcL6FwTDd3NCwaqiUDyi7cZUcr7qUF54sU1akdrkQmdHmx1wvoYXf9CU6jrAnF8qrvhridMdgVtZPZvx1", + "ed25519:4DqZuCJx1pW7zYqqU1rU5K6Qf7TjP5LnVU89PfNkmnwfRcQeHaunkky5JC9qYNZLgpQ1nufb583DsakHD25fDNvJ", + "ed25519:5EoXqxQa1TcMsjh6DfzQqbkMJe6Gc2VeyJaFCNhaHuMgN9AEa394cpaQrceS8h9mowNDHGJU6KGHSUCbPrPXv3et", + "ed25519:59hxAGF8dSHwLaepMQKPHxqvFGHszQJfLhLjtjoXKYbidPfEPr1ZAF84X2npHoQ7SHwf7Ev47zEY2RCNUjvY4TuA", + "ed25519:2rKQJBW1LKRvh3Z134e8oNravs9q84Gr72NdrZTbHu8eepp7SgUoAPexCRgCh4f3ubeG5wE6yMdHRB1WTZ8RrCgd", + null, + "ed25519:46TMbMumBmNEP6cLDtS2LshuznVHoFdxzmqYunkqeQm5S761Q6LfgxHkLXx424NFjyebAhmWk6z5bVYHCtyczxJN", + "ed25519:2gWgD8Kyobc9XXGJ4346BVA4rB6wKMXjZyN6GsQPLNCsZEgR8cTk6gxhwgxHxUPDGkob8bsFmqU5hh8Xbochkb3s", + null, + "ed25519:61hGSWPcfZ6YxYW41WG69jhr9c5UrA2XrE2KZEEPHJkDHV4dJBFWvhtt8hXNz4cmPai2uwCy2DZSUgBYSR9sjaYn", + "ed25519:5MZU8UxnychBdGxzNH5k3fa37zRV7hgiauZRuPNXks5J4EgBS8UQxZU1JUnD4j4JhEQRAUmfJ1J5S6VPfKbQHSbX", + "ed25519:5EXH5GeSKE5T85XCuTbF5cMQbUPYG3nzXyKYM9eQL87v83v2U2dHaENa5AjgfY6NmXdfJjC7wNQuo2inASWvYFTi", + null, + null, + null, + "ed25519:5a38NPqoMHpXDqTthFZPFjKnv3cS7pyrrT5ziGNCwGBfaGk1VVyqrtDawmhKMBs8xhUmktXeXP9Wv2PQGdVkxh3", + "ed25519:5mG8yAgauHMZMyFMrPvQw8qGQ7D2xiksE4vekVPWH4bEbxUuwJtdHr5cQgqY87KfSqqbkgrcxozKGRi3CFVapm9g", + "ed25519:4BjQpErboUNcF28gzdxdKQWvRDb7SVZjx65knyCSqseHkZBRT25AfAJkdy8Ra6rPx43xK3YPxu38hbZmKG9nxFkn", + null, + "ed25519:3Uoo5KSZKfPGACtJLiH3KhFBs9N8iohXy5iUPK4BG3EFGHsPcUKLVboWnPevNRx7hcpmKsyxQbcRdndetDMVTWvi", + "ed25519:5uTYvfbViRcsmox5UPkfkzHmEQ9Z5uxdeZ6NvmtTwsyidqEYN1evryH1USrpmZR4t2gswDSLitoSywEFftZ6GmGB", + "ed25519:2B3V7Ms1ZPKcZ5NqJXW9MgRDgHW21gJV1kCu8nKASK451MdVUEdBTd4cyuAqduv5RZQd7F16XytdG7PDXam9BQcA", + "ed25519:AJZ6918C6QkmnS9CA6ZUAAgqPhCaq7Sqb2ZFPWVE84cRsubN9EAR1zK2dBRxX9ZtQhheyzAHy6RwCN8EDRJUHTM", + "ed25519:5VvRCFWLATSRSdEE85NQV3wNhRMnvmeXiV4oSHKyGwi8nowdVmnwmAT4kb7ro6Z1A74hYDqsRQjW4PC4Cxarcxq8", + null, + "ed25519:4PEddhHi6rrKjULmA5J4Sq5djmZ447CGuDQwUEhe2HNCxmLNWQ9njV7kxihmD4M5oidfvLvmdF7z9aDFfkzZBYfW", + "ed25519:5HVs2UR3Ba5ELFjHUmMVfww8M21K4K9wodqBHhXntuRk53GBZnLx8V8eqA5KVbSCJeZZktoeTyqMT9Pa5jMaCKHW", + "ed25519:31RMTcGQ546gn4MXUyytA6ugo1pKXVMa77cVMWtzMLHb6kQF4cPw4gdVE5B69waSaL1GzBtN7Ra7PMDgsMWoN8D6", + null, + "ed25519:vCcvHzko2DqtAtgPeodUzQ3ctemmZKwva5N6xroMcdxYW4CYiG4cgjseq4C72kGuoo1fmt8AQV1HSaG6wd7xeLA", + "ed25519:4Gpvq9SWy6ARfNKHMw6gEC6AmF1EMqXUbdkKW1tGGpw8ySrrPw1ZqFfqAVCyVueteZBgQLp7MSsiBp2v97Z3M4DV", + "ed25519:3Wn5NkmKk9RA5moGFTr5oW5QvHyF3fCnMVjDXDPi8WhwsgHQ9oEHpGpiFkpKKuJj1hTgeP4Yo76w1Nyv2Ya53XFt", + "ed25519:5nGyhoz9wwJJwaDMGnBN3fpxaMVNzSeBrTx2F1v6R6nTRS3Fd16vpGCezCr2r8BSzCMZDrTAqqXb62HeyXZGZbpj", + "ed25519:2WGZQemboLuyCrqoBKAD4GEGkWXCAo5SoN8z5oNzrNHJewesycHwrvoSuw8mmMSPBUQutqnowMtMxsPbgmJnxTpx", + "ed25519:5EzFyykbaPjWrkPRgE5CWkLSkKrA2PGkfPucSJDB4Tzw5VETAS6TuusEAD9TVH9zpHmWvQ6qcxHMgD5ycUKWXsuu", + "ed25519:4Qrtz6NqwegmRV3KWMKVXPiPQ2xJGKyVLwTQZ5gRipHUVaU6ovtoCh2Knk5rLr3BthZumWXYzbQiumS3Adq2GZWA", + null, + "ed25519:5sMjvdios6LjjCGiU2MMo7fjjkchJuxTwXroKWGD8jkzqFqGjyb1tEiD24sbHtuGdW1DTKLFLGzvLqKrexmf3vU8", + null + ], + "inner_lite": { + "block_merkle_root": "ExTQ1q1HvfPZy7BehiR8JmgwUd9j3DTzHrTPmr6r9scd", + "epoch_id": "5h3PDeeRRQjgyNvzbKepLcBJT3jWJdhu662LzfJGC8ub", + "height": 86716292, + "next_bp_hash": "ALsAx1zoiwiCvcJoSrNuGbtTk3XcUcXdMBGaZAW9C36m", + "next_epoch_id": "BCC27fXZwLaqs3MmuhvVfiSHtHjSw2y4zQfP6RTCT2QS", + "outcome_root": "EwkVmmLtfMwR29qGPUDVAEVPJZFPWjqTGBGpYDxLSja3", + "prev_state_root": "8NnmP9ZsBesVgrLwWbLTNVGp9T8NK2oRcBLAsL7eZsCp", + "timestamp": 1678142413035318546, + "timestamp_nanosec": "1678142413035318546" + }, + "inner_rest_hash": "49Jsd8ULPst4hPqn9gLV42pncN2B73Xgab18S4BRARMt", + "next_block_inner_hash": "381NRbYEm7wo1miWJhCvyGFC7WuMyhTJkDP62rrPmm79", + "next_bps": [ + { + "account_id": "figment.poolv1.near", + "public_key": "ed25519:7RjyY1bRKDqkshbKZtgpQdwsdxou8j9my8g1hPKZ9ngM", + "stake": "39206129243863608141066930499972", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "staked.poolv1.near", + "public_key": "ed25519:3JBVXqenru2ErAM1kHQ8qfd29dCkURLd6JKrFgtmcDTZ", + "stake": "33419809779120392920269809612199", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "astro-stakers.poolv1.near", + "public_key": "ed25519:2nPSBCzjqikgwrqUMcuEVReJhmkC91eqJGPGqH9sZc28", + "stake": "27294688224403596819807905373855", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "bzam6yjpnfnxsdmjf6pw.poolv1.near", + "public_key": "ed25519:2ZJqaaCAisK4u8E2i611zFfvNmrvevovnU3M7SpGHkLY", + "stake": "23416062305792484840940844551487", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "zavodil.poolv1.near", + "public_key": "ed25519:HHARoU1hANWF9hu7YRstDDvgyigBhUeUuqecRVr8dpUz", + "stake": "17630216582180625016114945099933", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "binancenode1.poolv1.near", + "public_key": "ed25519:Bb7uPEocbsiQwRfPmsiiiM88DodtuYnBDi6dKZ4JZo2N", + "stake": "14048896105546755595738737008478", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "yes_protocol1.poolv1.near", + "public_key": "ed25519:4bnrmHSMYkvsgjbQSaCY3AFwrfS1w17ACEUQdn7aC4iT", + "stake": "13632840600753345981723601120095", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "staking_yes_protocol1.poolv1.near", + "public_key": "ed25519:CVVcLtfAWj6k1DqKJwhYBQwjMQFmXzFY2NBdMxp1RqL1", + "stake": "13548114501459907012425142831555", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "epic.poolv1.near", + "public_key": "ed25519:68HExKDtw1CjGzopZ8fMAMhMSZRVKRhwLzLQmGKtFNzT", + "stake": "13361490946637633806027080459531", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "electric.poolv1.near", + "public_key": "ed25519:GpSr5KAZMZ1Cb4dHMRUVhmp95y2fmWtm4dEjAr8iAva5", + "stake": "13094194582706200726499022124313", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "aurora.pool.near", + "public_key": "ed25519:FZKXoWHFCXMrKiXjAKFdHo5g9PDom4bWMRFERBfufi2Y", + "stake": "12455530195608719577803023115066", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "stake1.poolv1.near", + "public_key": "ed25519:7EiVt9i7SmULDKEnAXBFSMzwUmZdxUYDFkP73MZuCH1h", + "stake": "11723004342951596666411372180029", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "sweat_validator.poolv1.near", + "public_key": "ed25519:677kArWPFPRDgWEBHqHj6BCmEdTVBsAcjQAc75Gtyq2j", + "stake": "11061535470684271849484334918122", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "dqw9k3e4422cxt92masmy.poolv1.near", + "public_key": "ed25519:EPNc2bHqRCz6TKLstNiusv9qZCRBL63zViwUAcgoZJZj", + "stake": "10479308296906700818189011839258", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "future_is_near.poolv1.near", + "public_key": "ed25519:F3vEGwYYGisaXwKJWrYgorB95DfArDby8bK5wydxD5fp", + "stake": "10309322520727981661721876402207", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "rekt.poolv1.near", + "public_key": "ed25519:FoAaUdVKEHtVokG1aVmJNou61YcfQhXmaZ5Hnfsz4fHC", + "stake": "10079667782041637158777028934416", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "kiln.poolv1.near", + "public_key": "ed25519:GAekByYrSuo3seuaGQx7V1ZTC3gWZY8JxZJ4aWW76LiT", + "stake": "7980652394651037069871965079140", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "nearcrowd.poolv1.near", + "public_key": "ed25519:He7QeRuwizNEhBioYG3u4DZ8jWXyETiyNzFD3MkTjDMf", + "stake": "7002893129834998728551934925199", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "finoa.poolv1.near", + "public_key": "ed25519:62gxgzoie7FiK9dnWuiwM1bbuvhpceYDavK7SgdfEMJc", + "stake": "6862544459467539008922458111228", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "d1.poolv1.near", + "public_key": "ed25519:7ZhMRwnSHGJtWjGBZiRhhSi6XyqKeNHtnEXsVTNdrsk6", + "stake": "6522886931909028877795116092724", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "continue.poolv1.near", + "public_key": "ed25519:9rDZywYL3tnvzj6hnePw3MaPFPfSeSCLxBp1niTGbMaK", + "stake": "6418629997062742180813621956876", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "anonymous.poolv1.near", + "public_key": "ed25519:Hoj7LbPwNwAkLFhf8z2aDF1BG6NDSrq1BfkdaKqPfbXx", + "stake": "6271712752150531999559361269851", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "hashquark.poolv1.near", + "public_key": "ed25519:3YDdmN1vhF7yAWnYxGMHY46jcLE9h11HvEeF6Kntugeq", + "stake": "6176316778768669484263610930775", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "foundry.poolv1.near", + "public_key": "ed25519:5Qx8Fq3SK4Vu1sRRpf2HsNGLAqdNqgkKEebHMniLWhkW", + "stake": "5925879216899098565250728067432", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "near-fans.poolv1.near", + "public_key": "ed25519:AgV97ssnHm7qN8JhYZjwyDtuaT6Ms3Fgbw3WeAC8M3iF", + "stake": "5646665045313893189005647236282", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "stakin.poolv1.near", + "public_key": "ed25519:85UGfKdVoxX9u86JsBMxmVHBguYonnM3vTR2WoD5GkEg", + "stake": "5583623315375786166458286896325", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "neardevgov.poolv1.near", + "public_key": "ed25519:FsZH8qQGfHRxFUbrK5pCEDgN758ZmqUtcUtYRWWGCcAG", + "stake": "5554866332371942354526927649509", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "hb436_pool.poolv1.near", + "public_key": "ed25519:7oU4C3vWqkeup7aMfjyV1ojt7yKX7ShLfvNCahBRy1eW", + "stake": "5396966930657509205043842792722", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "chorusone.poolv1.near", + "public_key": "ed25519:AZwJAgu2qRxHwdpj8ioZEFGcc2jbaZGN7ZvUe7CuXtM7", + "stake": "5287147598217926353386779299664", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "08investinwomen_runbybisontrails.poolv1.near", + "public_key": "ed25519:C6yqxQ3suwjmm8ufG5e3BsHiwxUs9h839FCneF41V7TM", + "stake": "4857774634147130373813689246471", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "p2p-org.poolv1.near", + "public_key": "ed25519:J441YAvvYvjWs3aVzjc5KLLWRzmhQTEMaymPyWFkMGeG", + "stake": "4723790666044236105496108137009", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "northernlights.poolv1.near", + "public_key": "ed25519:7HXh6iS9Rh92Uj1c5T9fPjQXPLnti4Rr2cJQcJEYpdGV", + "stake": "4712387224906733281947973541174", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "nearfans.poolv1.near", + "public_key": "ed25519:GM8vWM4TqTt7jh3sXYCAs2KPyn4vEmAceteBGEFYhyku", + "stake": "4710423887240747307183606599570", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "everstake.poolv1.near", + "public_key": "ed25519:4JLvwa1r2eAxHLyKeDJnpqMG5f2Z9rr49rwuTwb9g8u2", + "stake": "4623315567330451805820491717070", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "openshards.poolv1.near", + "public_key": "ed25519:4Xm73PiAGMZu3mZg4gF7j96iTAFHGbPvqzxBaTgKP4ub", + "stake": "4611959073339809590025288736983", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "dokiacapital.poolv1.near", + "public_key": "ed25519:FGcJJeWMyx1xDbfkcPM2oMeUeGaADJuPmeqx5rjsHn7t", + "stake": "4332759036466228308554905977698", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "accomplice.poolv1.near", + "public_key": "ed25519:5ck255MtkoGQxh9LfjNtdb4M7WHkUmjU7SBJCEkZP2B7", + "stake": "4266120587684739122299552723543", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "cryptium.poolv1.near", + "public_key": "ed25519:5Y9hW8cKBb5RnsJBqttHHC5ujz5zcZZ5xnrJPwkCWmGQ", + "stake": "4227791919561939934282903484058", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "blockdaemon.poolv1.near", + "public_key": "ed25519:3GNFSJiFQQ1rnR68T4eZRff2omPhg1CTewUHBJpQAdyc", + "stake": "4197683971126897677552917113311", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "pandora.poolv1.near", + "public_key": "ed25519:53N7KBhSkEP6tLuQmxZV9fAK16D1C2kWnuzes8KNyS7P", + "stake": "4146080022605167207664031127947", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "bisontrails.poolv1.near", + "public_key": "ed25519:Emk6wQJtpQZRJCvvPmmwP9GD2Pk37xxRpmb5uRvJpX62", + "stake": "4038512909923817748075892748374", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "smart-stake.poolv1.near", + "public_key": "ed25519:A6wpkLQiYqPZ1rbd9s5S1Bg3LxccVsQqiCRDUXwzJ6Hx", + "stake": "4003234307493046391337326649739", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "nc2.poolv1.near", + "public_key": "ed25519:He7QeRuwizNEhBioYG3u4DZ8jWXyETiyNzFD3MkTjDMf", + "stake": "3869238705002385060975735647681", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "ideocolabventures.poolv1.near", + "public_key": "ed25519:6NFuvrmnJiokXibR9Z7TUHjB4NJnD1rJAHhBu9JWmBdh", + "stake": "3771051905041496783453388460098", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "stakesabai.poolv1.near", + "public_key": "ed25519:6abauNvvWnEkagjVpWRy2tZJdzPkmqurUjteMTKk5KQF", + "stake": "3535334314397193862153015712370", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "buildlinks.poolv1.near", + "public_key": "ed25519:Hd3irGt4zEqRPAzcFszX3oTkVWRFFxdecDvShCJSS1Wg", + "stake": "3526372164342614084796298814676", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "sharpdarts.poolv1.near", + "public_key": "ed25519:9XMHXqv7rM3QQxzjUu7dfKD7GhMkq8CEceaPdkhiBQUX", + "stake": "3434848476944224053624702383467", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "consensus_finoa_01.poolv1.near", + "public_key": "ed25519:3LqCGkM3uLjQjPmd3yVyaEnceinEL4cBfUm9vp5hJRTJ", + "stake": "3210187970648326218235433796250", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "nodeasy.poolv1.near", + "public_key": "ed25519:8mjespqqUePSYSsxYxPqCUsZUuMxVJr1vjBRwFeCke5K", + "stake": "3175117754588187183467391312105", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "consensus_finoa_00.poolv1.near", + "public_key": "ed25519:62c41nzrrZAspLnPBC2A112PXBhJuj1cGkVE3ANwbzat", + "stake": "3137487132332056735962851894070", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "dsrvlabs.poolv1.near", + "public_key": "ed25519:9SACdsDDgXA2WZLfJvpkKbu22Exxtc4CMbeHmVnN2P4a", + "stake": "3068789867106978388439487819348", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "lux.poolv1.near", + "public_key": "ed25519:HzTGTDfTz63QGvvUdMGozFeaENFGyYAoSrqYJb23qZFN", + "stake": "3028423991046584165619348124538", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "lunanova.poolv1.near", + "public_key": "ed25519:qkfP4NsSuHybdLhdvvYQ2Y9xWPsd249thEvrzbJBKNc", + "stake": "2870316617608351013129493882339", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "brea.poolv1.near", + "public_key": "ed25519:8dce49J5G28yMGRcSiDnYNFh7GBSma8TmYaw5mGTSH1Z", + "stake": "2761858870237463180720625792343", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "zkv_staketosupportprivacy.poolv1.near", + "public_key": "ed25519:2kAo86DW8mDaLDg37rFhQY8UYSZVq1CtegUHBEDvpSMA", + "stake": "2689727012142129963731924151456", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "baziliknear.poolv1.near", + "public_key": "ed25519:E4LAWdgLifBEoaWvhRNy5vpdAnUc3GsUHePeiAurZY5v", + "stake": "2688388636772692288448305121899", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "erm.poolv1.near", + "public_key": "ed25519:88nnN6LAuCbJaj9wucd1WUMfTtdv2s3njpvozHft8oQ5", + "stake": "2535798066743341414045251252289", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "fish.poolv1.near", + "public_key": "ed25519:27KegJd17HeXHk9h5MqkT35QAuvYvo5GFgPTpSVU4kPN", + "stake": "2359349916980152012597982756209", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "01node.poolv1.near", + "public_key": "ed25519:5xz7EbcnPqabwoFezdJBxieK8S7XLsdHHuLwM4vLLhFt", + "stake": "2330998910140068045131278690848", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "stardust.poolv1.near", + "public_key": "ed25519:6rxCJpTnrT6NFuGg6d5Dj3FEUz1ScNU9u35ywB3dYhrX", + "stake": "2179193523704935865995375845863", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "republic.poolv1.near", + "public_key": "ed25519:5sT6xtwxvLARW6y3KURYmyFd5SokJFhiK4jyqbamzzZ6", + "stake": "2124651577543740701890267481063", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "moonlet.poolv1.near", + "public_key": "ed25519:GkDwzPckMfhkdYgyFG69Uph8RJ12BcV9xNeZW2q93ZJD", + "stake": "2060503312099452529479997679460", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "allnodes.poolv1.near", + "public_key": "ed25519:AGEeyukQdMtg8EttsU39YLgryhao8yQeVwQTut5bbWdL", + "stake": "2041189719996971478342261526212", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "masternode24.poolv1.near", + "public_key": "ed25519:5ZyaXsGCya4Sch5bqUfohvo7iRFYB9ancRouggWRsiDU", + "stake": "2013012692631849510294424733258", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "legends.poolv1.near", + "public_key": "ed25519:DNK46DeHKeJPF9YetmNxZnqtpkeLjdUb9ezSRCue3TpB", + "stake": "1968963206127000985432877551650", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "fresh.poolv1.near", + "public_key": "ed25519:6YHLXhohY8kMnkp5Jw4HrJ52xtdyt1rcP6AaWkKzh3ED", + "stake": "1908553262368274972364412463603", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "nearkoreahub.poolv1.near", + "public_key": "ed25519:HUKmMJ59Hht8rcGG6uZ9M4qWsfbTCDtBgyV93YZnPXGE", + "stake": "1811363932350908894826349268172", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "inotel.poolv1.near", + "public_key": "ed25519:DmEDRntb9NwfbfdvDf6wzjsw1vxzQcJAAhFL2J75iLwr", + "stake": "1783140530783276198612825703651", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "appload.poolv1.near", + "public_key": "ed25519:6LbMVL6otkvZbpuC9sN3z7EXSMo3PT9noPeBdBZTFneM", + "stake": "1777016586059857984166086383996", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "qbit.poolv1.near", + "public_key": "ed25519:5DqZLnDu6PMEyhJzc5NhiMsoWeYMWG1bC4AULyafoXMv", + "stake": "1652745895856216988922137332983", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "jazza.poolv1.near", + "public_key": "ed25519:EW66Fkv7XcE9FiybuYtVURjHhYeEgwWWpzF685Vi7foY", + "stake": "1600810581770426565414413340826", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "avado.poolv1.near", + "public_key": "ed25519:FdLWsf42e3Sc7bdKMtxJMgWRP21ysZDSXFnS2vTwTaaA", + "stake": "1505671712920196582626546247266", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "satori.poolv1.near", + "public_key": "ed25519:9r8HYmw8mbys2Ng9BaKeQqZnaQTGCcBUbMatV5NeeWJj", + "stake": "1505563874806956005096650532342", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "ledgerbyfigment.poolv1.near", + "public_key": "ed25519:4JJTNeMaSb8W3NELh2rkkrDCqG1VpM3gdJ1hc9HFTBmN", + "stake": "1378902973337960064375143109943", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "atomic-nodes.poolv1.near", + "public_key": "ed25519:CpVAHE3JpfDoEPqjBDgYEjgG8JhM5BFKbjUD2N1EuvAL", + "stake": "1320330340013835475473012378960", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "pandateam.poolv1.near", + "public_key": "ed25519:Cu83NRziNLiT6HLu9kJ8svFoftZQ9wVmjScxjqCybppt", + "stake": "1319203644166316104758512034128", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "staking_sp2.poolv1.near", + "public_key": "ed25519:CS4uHAipvtxGz9irnoCX7SxT6d8zKpDj8Y3Fyf2zVgBp", + "stake": "1189875320275820429094732822094", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "nonli-near.poolv1.near", + "public_key": "ed25519:91jusDFxjY32h51tfq2HoKhoPbGs66s88t1v2oZPBSxC", + "stake": "1185432705606468385332754514200", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "bridgetower_v1.poolv1.near", + "public_key": "ed25519:AHgnnt8yhNBpoZChBiHXfjaH6X2zMZaDDXmmSWHvDcWL", + "stake": "1035663254387646835799962119440", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "stakely_io.poolv1.near", + "public_key": "ed25519:HWp9E3gP91s25ddMS9xUWuzbJUpVGiPoitu5bT6hqMHs", + "stake": "1021258364486646824071027357415", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "calimero.pool.near", + "public_key": "ed25519:7A9aFJtr9yWh5eyAUUUSdXMoxzi1qBjshiVCjsDWWa1J", + "stake": "1015874783766921089538649131256", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "staking_opp_disc.poolv1.near", + "public_key": "ed25519:8XbCfLQVSwtwaBajvByG87CxPPbaFdryz5qEkde1fSGv", + "stake": "945252783112950401552190350991", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "galactic.poolv1.near", + "public_key": "ed25519:GFK83N32DbERtFg8rkpfNBsKtkFpmNQzyKFM9kJvPCMG", + "stake": "831246120998540891354298874477", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "cryptogarik.poolv1.near", + "public_key": "ed25519:45zFAC8pLgwn1d5pSBpBHesWbzngfRgd92zaom7K8m8j", + "stake": "828004032171300648370990744344", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "optimusvalidatornetwork.poolv1.near", + "public_key": "ed25519:C3CJMKaWdEzkqyNCKwnKud6wDNnzs7Ura63k16zm4LUU", + "stake": "801755793868841694119971272782", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "pathrocknetwork.poolv1.near", + "public_key": "ed25519:2iJQLVXubWafG7K1NzGVvjP54UJCgVg3cuPMktw8r7uQ", + "stake": "798288406254751164539305822812", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "dexagon.poolv1.near", + "public_key": "ed25519:AQHwptR3Ho348BpFXJDjkxpWMW5ZwN7xWM3XWAWSEEgs", + "stake": "781119997524930787753273551265", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "staking-power.poolv1.near", + "public_key": "ed25519:42ikqyV1BYmSnhHJ9EsLLy9kgeAg1mC3qqU1AJGaTEaW", + "stake": "739158259862982574010823948092", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "infiniteloop.poolv1.near", + "public_key": "ed25519:9BUwtDegzwKcmJBjLgUDLHc3pePgPKcWJXYGcZb33Nyr", + "stake": "694945966749165983829361965202", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "prophet.poolv1.near", + "public_key": "ed25519:BV5b4DpgCUy1TEitE4TVPhpTY7uDNpHc8DBPyH6cYCBq", + "stake": "671635020628939237380029587432", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "bitcoinsuisse.poolv1.near", + "public_key": "ed25519:Cy2sboVqjDk6d3d2A2AJZBdFvokjk7sjZpYATLjcQSCj", + "stake": "664239734198440103401629427218", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "cryptoblossom.poolv1.near", + "public_key": "ed25519:5opTNJEkCBYuyMgAghY2Sxp4bBtXYQtbEvZ3Wc5Awohb", + "stake": "657665183791735436571718632241", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "kosmos_and_p2p.poolv1.near", + "public_key": "ed25519:41GWxdQHe4Y2fuisvz5k5G2NwDFEavRkisoZkB5tfJuC", + "stake": "636577548907797834502568994402", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "readylayerone_staking.poolv1.near", + "public_key": "ed25519:6AuBsxxSCYHkuJW9Rhf7HK2qYKErtThZUrN5HFDnQ9eg", + "stake": "627738918419591761430004629136", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "n0ok.poolv1.near", + "public_key": "ed25519:EC1p3w9hd4XkYoUiAKc8PSQGVFGiUXTDJvqkurRdAFz5", + "stake": "603091766828423031754951292758", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "dragonfly.poolv1.near", + "public_key": "ed25519:6Gj8MRp9KqfdiXa35LJcZnqeBNNEZoYk6ysvpzHaruvq", + "stake": "573145205007582852162929757548", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "pangdao.poolv1.near", + "public_key": "ed25519:C35kAQVW6MHoWtUZ599WHXamRXVZnrHMVD1q85FERiem", + "stake": "536104952358448307683904244716", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "nearua.poolv1.near", + "public_key": "ed25519:6YRLTm4coawMYrchYs1ex5BLY7xtnPrnvGWgk6NJAQvy", + "stake": "471397693642001593493614085881", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "galaxydigital.poolv1.near", + "public_key": "ed25519:8ZD8CcSzSfVsYo7XyABHJsYcrpBE3EL5MwukoEfrNYMR", + "stake": "448811822469059379056147844225", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "grassets.poolv1.near", + "public_key": "ed25519:GS8uhr7mhsBWB5c1JgvsJzpwZDGrcnB9Xnw7YRyMSQP5", + "stake": "418986205174954907945983151920", + "validator_stake_struct_version": "V1" + } + ], + "prev_block_hash": "HrafGqcmmviAysiDHZypHiqj5W6Edr7QLUK2rkP6dCRA" + } + } diff --git a/fixtures/test_0.json b/fixtures/test_0.json new file mode 100644 index 0000000..30b103c --- /dev/null +++ b/fixtures/test_0.json @@ -0,0 +1,247 @@ +{ + "last_block_hash": "6taaeb6h2uJcuUvvmwXpYgagYvyHsFanWhm2ziGGHCff", + "body": { + "approvals_after_next": [ + "ed25519:VK3Hhut16e5agbePKPfsyrLVQRJGQwWamSRTRCQwJNFL7FuKtxfoPiRNbaYoEcUqSGvYNK8LXru4etnNtCQZyf2", + "ed25519:3AzJSuR438NiC53Rx2BqjcxxeFKQcXBPspJfTyQ5CAuSmrazNJ1vsXgub1dfJWGkLB9m7zD16AghdHbwyxHa3gwo", + "ed25519:4gFgfJefgLs78u1PfQckGstEbhLK1TCtDWCXUiYLHiXvGFVmPWgZbtU57DJbiLQqYkKUN2yfRohRTZA6w52TAcVS", + "ed25519:5Q3QdNsCa9j3siWQNAHXk4FTsiKntFwB1sFE4zUuM6S6gPx1cniPFEg3VfoShpVR9M9VPAr3AVfRmDFQGCvcvcKq", + "ed25519:2X1uEUuWGBF9D6FgK6GGXf3qVjeiqa4F4UzCatdtmRA6MPrePbv9W5AmGgaEePuYv81WytXU1xmfSGfaHhbpYyEt", + "ed25519:ftssnQfBCA8iEYLTcAkupddx82df53Hjm6T7qvD1ZWwmMF7CQDkKPxnBMC6CVL6wPrZX6Dsrz18RCTmyks3M7gV", + "ed25519:4d4kPwBhg27K8ZMC5A4MgVDu4kbKmZ6nMQUTQBfXsShGS5DwAyCks4f1jKWnbh8jW4bJERiJUWH4mhHStfoNNbgF", + "ed25519:3d3VNqdXZQyfKudgfAPmMr645Rn3RUxFNYsvsJJUkPmV75vbMYZyKLAGgXKNGUddtwawDrnRjbvJtaMwFraCSb4X", + "ed25519:63qxBKg1npU8SzanxtTZmz6BPQGoZyihe2rXko8DAyM9Kmxrg3xrQyoyk9yk9Mxa6kgw6HNTpPAEbSLVewzhzxB2", + "ed25519:124mNKfU8gHtMdCnhZMLfiREpy6Lh2ZQYLo1KJo8JThqQp4BwqJ4wMCGvDp7jcCBBfHWzXz1eqnZWMWFubvcZnXT", + "ed25519:4dq1ud5d12SNzcdGP2rFdJYH91a9FVGRteoRirNBudhz2LmiiEANqgfkB93SmxA7BuQRdKYkK42hbSNUPXdGQxWj", + "ed25519:4DozYNm9f9suvuWj87QfAMfquaEqJJpZi8cPMH8u8h3re9BMwbvu1RfVLZEaWziihwCQUJWV7Meiat5wfqj5FUt5", + "ed25519:5sp9Awt7UzzJGiJN3jMF2jSP5nxU2E1wC6PVoKL57XgTfmWkdxQUmNgev8HPZruMvVWRYkpW1dYa9hibRuPU9sQV", + "ed25519:29ByUDGKUE6c7rZA5A1nVaNK14Z6dHgMT6ejAnirvTgRci5EEmjUdJS69XES6Pk9VxeDTi1X19Hnnw67KPyQMHbC", + "ed25519:2Myim4fHvkaAJWpaeAavoF42nkvAqaTVixnav4v7fSPHFWgXLNM5L8FNZowzfBfKimu3juHSf5fNUtht7Y8ZU2oT", + "ed25519:4qNiUd6fM6aXRqBuda2Pvwjt5h3EPuvTrryXUUjoaz9c5Uh9Q2pYyY7k6ENC2RkNGxmTMzGKbhMmXQKpVesADcrJ", + "ed25519:2nBVHpagEujexVf3PJUkBxPdA7mWadZkKMmcZ3KyKNaue7ya7UrUB8yDUG9DoFkP5ZbYdZmkrdWDboFSUEMjB1ae", + null, + null, + "ed25519:3zWa7NL6WJz3MYgPGjKGf9eEAG4qCAdHwBmV3zuxAoE8RTQkhj91WnXfZd5o2TrtHQDJYKLAsaGd7EikiBar7Bs", + "ed25519:67Ph2NiNfr9LERQdRh25npY1xmimC9m1L1ofaW5jXuvbG4Byfp7WoC9DXrfWzjLuwK9tKS4oQLC6gLaHefVn5DiV", + "ed25519:3UbX3YBcyARb4CbtFRnzA25qRKswvFiLLgsZ8VAEjs7D1qoG75B7UpRh8aYrXK2U2WuFEkzLb9dQVRb7mzLUxjfT", + "ed25519:2wuLqd2ZNdTfHF367bzFXL7NV2Qk3m6YNEeCdMASnx1sUB4BULm3Q4WNF9ZGrAKSMAaEyxKGFA3tvyKDxoSk1wve", + null, + "ed25519:7mbR6ii13WLpPn1m259ym4k3Rb2DxbU8NKdo5VjaGNt2VnAqYojLW9gKa9HMErJP2bUPZTj9BsjGBCNjCZ1cDzx", + "ed25519:2UP2VsEcgSubk9AgKAHJ9pAM9imrF4Ms5rQvsPynU5w33HpjxHS7gzsakcdXq94SCgScTV3y6oU2SZ4PijKTmsKt", + "ed25519:3maB3cKsDSL7AJu8s3cmnJcpekjU93mhdnQH5UWTeLdDmEbnmZEHAewSBFqhCwFe5hHKgapKSV9VoMCRnwsgrVtw", + "ed25519:2KEVy7rQ6FK91yMc6mgF8ueP1vpr5c1eLBMxhn64nmtVzU5V3tQjD4jjrBQkTYD5eaGqvke2noTiU93DTHQzRU3T", + "ed25519:4wj8EycC9K7aQ8JpGTTrY5K2adqxZL76p8kvjjyKaqXip4dE9HwXRFqh7cTgy3sXbQvdJtxSZ64njHeDoWvJD1Ct", + null, + null, + null + ], + "inner_lite": { + "block_merkle_root": "3huzCnEQhgDDMWyVNR9kNbQFJ7qJGy1J4MBrCJAWndW9", + "epoch_id": "FsJbcG3yvQQC81FVLgAsaHZrMBFbrPM22kgqfGcCdrFb", + "height": 154654776, + "next_bp_hash": "AcNatyPz9nmg2e5dMKQAbNLjFfkLgBN7AbR31vcpVJ7z", + "next_epoch_id": "Fjn8T3phCCSCXSdjtQ4DqHGV86yeS2MQ92qcufCEpwbf", + "outcome_root": "7SYchEDbwawjP2MVfZ2GinP8bBQU1hKFRz34b2ZzG3A8", + "prev_state_root": "F2NNVhJJJdC7oWMbjpaJL3HVNK9RxcCWuTXjrM32ShuP", + "timestamp": 1705334624027402581, + "timestamp_nanosec": "1705334624027402581" + }, + "inner_rest_hash": "DZT9p28adyuiTSbUV5bsuPRxX9K7R1bag1AeUEMhm4bh", + "next_block_inner_hash": "DNCadyQPnQNYU3hA99zY2RfPQY4JpfRJeT8PewWpWQRQ", + "next_bps": [ + { + "account_id": "node1", + "public_key": "ed25519:6DSjZ8mvsRZDvFqFxo8tCKePG96omXW7eVYVSySmDk8e", + "stake": "51965991496563659315960459285056", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "node2", + "public_key": "ed25519:GkDv7nSMS3xcqA45cpMvFmfV1o4fRF6zYo1JRR6mNqg5", + "stake": "51956315551249534697100259004698", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "node3", + "public_key": "ed25519:ydgzeXHJ5Xyt7M1gXLxqLBW1Ejx6scNV5Nx2pxFM8su", + "stake": "51901364964498492263434600300098", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "node0", + "public_key": "ed25519:7PGseFbWxvYVgZ89K1uTJKYoKetWs7BJtbyXDzfbAcqX", + "stake": "51807871317794349436390749741568", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "aurora.pool.f863973.m0", + "public_key": "ed25519:9c7mczZpNzJz98V1sDeGybfD4gMybP4JKHotH8RrrHTm", + "stake": "17889547137784368999057296757171", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "legends.pool.f863973.m0", + "public_key": "ed25519:AhQ6sUifJYgjqarXSAzdDZU9ZixpUesP9JEH1Vr7NbaF", + "stake": "16201913225042074278623061793112", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "01node.pool.f863973.m0", + "public_key": "ed25519:3iNqnvBgxJPXCxu6hNdvJso1PEAc1miAD35KQMBCA3aL", + "stake": "11170441638122498891243391338168", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "fastvalidator.pool.f863973.m0", + "public_key": "ed25519:93EQCbHLEY6cMuxDNe8LysWPy8zv5VsoqvHppMbMndpZ", + "stake": "10592433670906673196820699139628", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "kiln.pool.f863973.m0", + "public_key": "ed25519:Bq8fe1eUgDRexX2CYDMhMMQBiN13j8vTAVFyTNhEfh1W", + "stake": "7466078258914882102490404903558", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "stakely_v2.pool.f863973.m0", + "public_key": "ed25519:7BanKZKGvFjK5Yy83gfJ71vPhqRwsDDyVHrV2FMJCUWr", + "stake": "5536803167995073895287889871766", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "fastvalidator2.pool.f863973.m0", + "public_key": "ed25519:4BYnfLhhvNkcDe6U4W43uAqBXDaxM6DcN3YAbLKNUWSh", + "stake": "5302106052281372493614954324464", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "fastvalidator1.pool.f863973.m0", + "public_key": "ed25519:GSeKR7hJrgfBJ4FjS4GwQYaQzcVhuDun3PcjWZh4nGpT", + "stake": "5291814124144644904379619249839", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "chorusone.pool.f863973.m0", + "public_key": "ed25519:3TkUuDpzrq75KtJhkuLfNNJBPHR5QEWpDxrter3znwto", + "stake": "3830782869095601550208218306826", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "everstake.pool.f863973.m0", + "public_key": "ed25519:4LDN8tZUTRRc4siGmYCPA67tRyxStACDchdGDZYKdFsw", + "stake": "3424542869832679924363110810613", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "ni.pool.f863973.m0", + "public_key": "ed25519:GfCfFkLk2twbAWdsS3tr7C2eaiHN3znSfbshS5e8NqBS", + "stake": "3102526368747483216749759285501", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "foundryusa.pool.f863973.m0", + "public_key": "ed25519:ABGnMW8c87ZKWxvZLLWgvrNe72HN7UoSf4cTBxCHbEE5", + "stake": "2969728543420726431634300166705", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "chorus-one.pool.f863973.m0", + "public_key": "ed25519:6LFwyEEsqhuDxorWfsKcPPs324zLWTaoqk4o6RDXN7Qc", + "stake": "2699586772185217175436266507686", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "lunanova2.pool.f863973.m0", + "public_key": "ed25519:9Jv6e9Kye4wM9EL1XJvXY8CYsLi1HLdRKnTzXBQY44w9", + "stake": "2621112518848962964878885105004", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "valeraverim.pool.f863973.m0", + "public_key": "ed25519:3686ABqNUZc1qhLWLHg5xZpBzrWPiUCMNZxcCNmg3e2s", + "stake": "2470287532644478855780095683680", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "nodeasy.pool.f863973.m0", + "public_key": "ed25519:25Dhg8NBvQhsVTuugav3t1To1X1zKiomDmnh8yN9hHMb", + "stake": "2422603751767713530958290540330", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "stakesstone.pool.f863973.m0", + "public_key": "ed25519:3aAdsKUuzZbjW9hHnmLWFRKwXjmcxsnLNLfNL4gP1wJ8", + "stake": "1884761660146474524590126573806", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "pathrocknetwork.pool.f863973.m0", + "public_key": "ed25519:CGzLGZEMb84nRSRZ7Au1ETAoQyN7SQXQi55fYafXq736", + "stake": "1716080041579049406737178399888", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "dsrvlabs.pool.f863973.m0", + "public_key": "ed25519:61ei2efmmLkeDR1CG6JDEC2U3oZCUuC2K1X16Vmxrud9", + "stake": "1582167714882447593375801170700", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "bee1stake.pool.f863973.m0", + "public_key": "ed25519:B7Mwy3sCCJ6GZzEojsKFXMjLQfVXPDC4Q1LjuHoZcyM6", + "stake": "951628760427592588357858953323", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "bisontrails.pool.f863973.m0", + "public_key": "ed25519:8g4P5EXyp2b2pfVMHY1QLfkRcY59hjPfWrFCKUWX3RmR", + "stake": "784322861457562867996710885838", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "pennyvalidators.pool.f863973.m0", + "public_key": "ed25519:HiHdwq9rxi9hyxaGkazDHbYu4XL1j3J4TjgHQioyhEva", + "stake": "453985902267796464609404547243", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "nw.pool.devnet", + "public_key": "ed25519:65XTtuthwFDL9LpK9FJystfEvJ6brtBpfYSnRMa5a2wN", + "stake": "351594742984477077395922766923", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "leadnode.pool.f863973.m0", + "public_key": "ed25519:CdP6CBFETfWYzrEedmpeqkR6rsJNeT22oUFn2mEDGk5i", + "stake": "222791099831338589442315274396", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "blueprint.pool.f863973.m0", + "public_key": "ed25519:DUfxa8EUaTQyVXgEm4NFCtiez7jsjbM3m838c7aRSEBn", + "stake": "138000501667279356740025791621", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "al3c5.pool.f863973.m0", + "public_key": "ed25519:BoYixTjyBePQ1VYP3s29rZfjtz1FLQ9og4FWZB5UgWCZ", + "stake": "113955994115662929112230612769", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "cymac.pool.f863973.m0", + "public_key": "ed25519:EzUKatz6stcg4pKA2HpwhQXhSDvef3Cxyo6zvsz87est", + "stake": "112838247651548890239554150501", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "a41.pool.f863973.m0", + "public_key": "ed25519:Gzg8dYaeBe6ime9dsMKUFiRZeWLjQ3VHjBCbapjsCmUf", + "stake": "55030000541997702601700000000", + "validator_stake_struct_version": "V1" + } + ], + "prev_block_hash": "5dbt6rh82Xx6nNG1PuKoQj96g4jnWw6cyb8HNWPPkVJE" + } +} diff --git a/fixtures/test_1.json b/fixtures/test_1.json new file mode 100644 index 0000000..59e84c3 --- /dev/null +++ b/fixtures/test_1.json @@ -0,0 +1,248 @@ +{ + "last_block_hash": "A6XdHk59MvQf3aMA4Fo4AbqFBRMrFTPkMzbK4xKi4Pyr", + "body": { + "approvals_after_next": [ + "ed25519:4iYR8JPp96vrgh4X7vJt6x4iXkcz8xNKzMzn9Zy9393grrahCNnpKUAFzfjynoa3pDaaFVH4TG9i3kC277GCqDh", + "ed25519:4JQWoZN6GwuXityiM9FtzutPSFT6NT4w9HyRVEHr77KCMASo65gg2WEbSxKr9b8hgKnxqsYtEnPURZo8158ZXgLu", + "ed25519:4miyB7FCbkEPARW5vZh5PkdjN2T3xU4kbdQTEJh34E9J94qQkNJxibw59cFkHYQ8p5jZNTJm8gqo2WRZ1C5MT5ys", + "ed25519:23sAhk87wCEk9y127pVTxzEHuPiPnhuGayqsm84ZDEssDZmmwBJV2AwgtJ8je7LLf3q5w58YH7ZdiCKRmRJVHU6y", + "ed25519:3Nxn2PXkn3ebBjeTggZtZxatCfVvBND5pK9JafrruEt4Mvm7vrTVb3wS5n6iiwzzgqPi2futbrrGg6hD159Tywcb", + "ed25519:4JDewsvjKo6b5qbi8TJT5QvG2oMDXjp6UGyD77cMiC9yBbpnsvqtqucT1ovWEZAejSEteTKh8MwTYNG4fqGxkgEK", + "ed25519:53ExLA4n8k8GPRtx9gyG3GAUkzVWMEMHfWP9JNxhfWnPvnFKdF4Rx7qt9LGMSxh6hHxPBwYrqrM2MJGiXTBBmU9g", + "ed25519:2b5RQYp2CQRC6Kde3Uw8gHpyPKbJJGHedBPDkPojFNddYDMU1xVxHe62RV3cUxv4pNr3GtC4ytdSzkjXyqXnUZWg", + "ed25519:Ck7SvjdBK6NshMJHHQ1mH8mTsRRXbxg9V9QdZF3MzyAZWv9sNZoovCyuSJQjJdnmZR41ZeYZhPMAYKa7rwii6ZV", + "ed25519:5T3eJwLWefGRpGKfMArKoY93nwgQbvN4tpTN5ETH7EDB89kpixn54k3HNR21hnwg5ZDuC4ZEPf97CCoWao5VDqmh", + "ed25519:5VeUZVNrTqqfyT6FdRukznT6AB8X8fR43Mv4aTPuNjneKpEXWeiPtWrQniQnaiz64CikMhi5K67FuuP48uDY62Ya", + "ed25519:45BerwL4v3JgXXcUnLAW3UAw8iTanQLo2okYbmzVkmSNB62GtmPf2PESEbgrd4jr3VNreb7oSxd7k3LAgNEV7Exn", + "ed25519:5tAqssJmXV6Fcy8T6qQ9W819om6c93Fmz5fk1iFDu2mnTw1bfYrNVPZxwbjNMxyU6EzSu4cjykBVmcGXm7EJtHr8", + "ed25519:462bhuLShbMmu6K8RkC6uc6fKmGmTzpC4iJcEqSdH5BS2q7sLmU2j2PWwAedg2Z8nXjVYRMCzci3FeYPZR8fkZK4", + "ed25519:4JMdzn7HHrkpZh4yvY6Cx9cyfHSE44tj8jABhty14WJccJTugomC8xDLQE6HYTuxgXrpVmS8Dz8oK3fzwMSZeWsr", + "ed25519:4yEHBfzWYhC7SSonhczffKvwWRJE5ViMXSkXpowAgZHbJMF2iKJtMfQk9jvf8XPWzsMj9W8eEBsmZfDLHVc1hyA6", + "ed25519:vhEsZ3bry9yHtLQjiWD6KZZYSfZp6Aea6zrDaF4Z8eJi6ESkaNzKksjrXRyroXWhbyZtQVTqJDtz44t6AJAA8D1", + "ed25519:4BqS5LjoEkS3CvvgfhgTiYsyoxTdg1wLYTUxyizENxpKUWvFVZPCeG4PTR7hGBth7nL1Duoh35bWr1Zhwnw5PwHc", + null, + null, + "ed25519:2QphJc3W6cuM9pKP3UJ1Rb31V3gfsNck4TrCkJesxQjTRD8vUoPJHRdmuNyh7x7uKEiy9Fm1nPzLdJUKvnpBvsXe", + "ed25519:4fjjCEvCr3Vd8kyjv1YYfXxZD3YcPmjxnEbeE4KdAA7pPip4FfbaAtv69rpguWP2YjQwRrW9rn6eVYvSXBFtVQJc", + "ed25519:4kGKNsRxhx3XzV2gapzpxfczyKyMxzsdWfUbDSZWRAbLK1965EKjuFXTqhhvHC5vS2L1MiYtHWDi9zwzDk8zYiyG", + "ed25519:Ff7Zj6HHHhLXfH8T3kKsQxJVF5EQLmLdTwBXtszLUaL3Um7qR1ZamXAxURXsK2cdgfbtpJkV4DwaH5Vx5VLZmow", + "ed25519:5gUPptJB6aDKJTELCVQBvK5DHAtPkMcMMSrEDTBdfkt7hGA9TmEbTcAyz1RSANRCzzUDphtMemD2VGLJen23yWpK", + "ed25519:274QMhhCkbkh6QpCQZ2q8eDGHMe7zoNDcun3GJPCgKnzfQ9e9hgndruuua8R5D68bTeEd3E5vsCzs3XgFdKYYkTL", + "ed25519:4tRmVgq11TpQgDKVuvj5RVRD7qFhrv8ztQRxPu6c8y4KfbE7xKGdPFEeG7UXWXruZFs1wrGKTu8HJyLrjVpWcDHD", + null, + "ed25519:4HvAS18pettmeiAinDe3ZoLTFLNjpRzUVmafqYqRT21RyGLxxH1cyTz5ER2h5U5PYLewCdkVNwEbXsfH56dqyiD9", + null, + "ed25519:3bCdULXmujMamQiwfNnkvVjjbLDedDNdr9Mpcp7zrSAp32ZC5QWMuPFAv8tG8QFV9mdT1Yk3K25NLe32x9EhwU8N", + "ed25519:XM5mNvN284AwzhT1BPs7MTt4UeESpvp73LyYg5ZXizKXJpo1j1xaQbh45Dru74qVP7uZp599Zbyo5reTe1bK2yA", + null + ], + "inner_lite": { + "block_merkle_root": "5geZEhgh6CExgjagwJ99fgQtf5Ej6dHL6WNJ7fNXgG8c", + "epoch_id": "Fjn8T3phCCSCXSdjtQ4DqHGV86yeS2MQ92qcufCEpwbf", + "height": 154697976, + "next_bp_hash": "HiGgVkmWFuvHdLaBCrp7G5Q9yzmSrxmyA78QhoVqHHwS", + "next_epoch_id": "FgBfwcG3XMnWBkqu3xbYH8Guju8iBNJHJcvxdHsL6svr", + "outcome_root": "2DoUX6XsDr5BxRN821ZxTLYYcQBzSSxPMTqMU4TLfu35", + "prev_state_root": "J28Pfz9gHzXsChqW2U5ArTcMkTc1ATx6duk7rynkTnHZ", + "timestamp": 1705361606832234145, + "timestamp_nanosec": "1705361606832234145" + }, + "inner_rest_hash": "2VFJq5AJCKnnai6mZFYtCyn1ZM6GmB4w5Rjy1StE7HXE", + "next_block_inner_hash": "FFUJkMD1wEQYLH3JBrhKGBCySXVvsp79zUBZF4ifyHnE", + "next_bps": [ + { + "account_id": "node1", + "public_key": "ed25519:6DSjZ8mvsRZDvFqFxo8tCKePG96omXW7eVYVSySmDk8e", + "stake": "51980883591416601010719726777959", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "node2", + "public_key": "ed25519:GkDv7nSMS3xcqA45cpMvFmfV1o4fRF6zYo1JRR6mNqg5", + "stake": "51971204873229463484002611006028", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "node3", + "public_key": "ed25519:ydgzeXHJ5Xyt7M1gXLxqLBW1Ejx6scNV5Nx2pxFM8su", + "stake": "51916238539076580840311339695332", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "node0", + "public_key": "ed25519:7PGseFbWxvYVgZ89K1uTJKYoKetWs7BJtbyXDzfbAcqX", + "stake": "51822718099537070721488806689276", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "aurora.pool.f863973.m0", + "public_key": "ed25519:9c7mczZpNzJz98V1sDeGybfD4gMybP4JKHotH8RrrHTm", + "stake": "17895092803259114287724420293384", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "legends.pool.f863973.m0", + "public_key": "ed25519:AhQ6sUifJYgjqarXSAzdDZU9ZixpUesP9JEH1Vr7NbaF", + "stake": "16206556269879622555039863033060", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "01node.pool.f863973.m0", + "public_key": "ed25519:3iNqnvBgxJPXCxu6hNdvJso1PEAc1miAD35KQMBCA3aL", + "stake": "11173642795262854946815330034213", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "fastvalidator.pool.f863973.m0", + "public_key": "ed25519:93EQCbHLEY6cMuxDNe8LysWPy8zv5VsoqvHppMbMndpZ", + "stake": "10595469185547409447626687991414", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "kiln.pool.f863973.m0", + "public_key": "ed25519:Bq8fe1eUgDRexX2CYDMhMMQBiN13j8vTAVFyTNhEfh1W", + "stake": "7468217842007976196291671160040", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "stakely_v2.pool.f863973.m0", + "public_key": "ed25519:7BanKZKGvFjK5Yy83gfJ71vPhqRwsDDyVHrV2FMJCUWr", + "stake": "5538389871199320877264924449940", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "fastvalidator2.pool.f863973.m0", + "public_key": "ed25519:4BYnfLhhvNkcDe6U4W43uAqBXDaxM6DcN3YAbLKNUWSh", + "stake": "5303625497287173100081594363152", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "fastvalidator1.pool.f863973.m0", + "public_key": "ed25519:GSeKR7hJrgfBJ4FjS4GwQYaQzcVhuDun3PcjWZh4nGpT", + "stake": "5293330619752851761190952982195", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "chorusone.pool.f863973.m0", + "public_key": "ed25519:3TkUuDpzrq75KtJhkuLfNNJBPHR5QEWpDxrter3znwto", + "stake": "3831880671335147210435951074724", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "everstake.pool.f863973.m0", + "public_key": "ed25519:4LDN8tZUTRRc4siGmYCPA67tRyxStACDchdGDZYKdFsw", + "stake": "3425524339069666388552956739441", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "ni.pool.f863973.m0", + "public_key": "ed25519:GfCfFkLk2twbAWdsS3tr7C2eaiHN3znSfbshS5e8NqBS", + "stake": "3103415468246532541895473430716", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "foundryusa.pool.f863973.m0", + "public_key": "ed25519:ABGnMW8c87ZKWxvZLLWgvrNe72HN7UoSf4cTBxCHbEE5", + "stake": "2970579589997198167425850722035", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "chorus-one.pool.f863973.m0", + "public_key": "ed25519:6LFwyEEsqhuDxorWfsKcPPs324zLWTaoqk4o6RDXN7Qc", + "stake": "2700360401758961539837510871690", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "lunanova2.pool.f863973.m0", + "public_key": "ed25519:9Jv6e9Kye4wM9EL1XJvXY8CYsLi1HLdRKnTzXBQY44w9", + "stake": "2621863661185071626699112987798", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "valeraverim.pool.f863973.m0", + "public_key": "ed25519:3686ABqNUZc1qhLWLHg5xZpBzrWPiUCMNZxcCNmg3e2s", + "stake": "2470287532644478855780095683680", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "stakesstone.pool.f863973.m0", + "public_key": "ed25519:3aAdsKUuzZbjW9hHnmLWFRKwXjmcxsnLNLfNL4gP1wJ8", + "stake": "1885301783710511590471643861522", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "pathrocknetwork.pool.f863973.m0", + "public_key": "ed25519:CGzLGZEMb84nRSRZ7Au1ETAoQyN7SQXQi55fYafXq736", + "stake": "1716571825486169408513188183201", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "dsrvlabs.pool.f863973.m0", + "public_key": "ed25519:61ei2efmmLkeDR1CG6JDEC2U3oZCUuC2K1X16Vmxrud9", + "stake": "1582621122794136327048654501834", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "bee1stake.pool.f863973.m0", + "public_key": "ed25519:B7Mwy3sCCJ6GZzEojsKFXMjLQfVXPDC4Q1LjuHoZcyM6", + "stake": "951901472501611026961984404965", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "bisontrails.pool.f863973.m0", + "public_key": "ed25519:8g4P5EXyp2b2pfVMHY1QLfkRcY59hjPfWrFCKUWX3RmR", + "stake": "784547628028533758413173572394", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "pennyvalidators.pool.f863973.m0", + "public_key": "ed25519:HiHdwq9rxi9hyxaGkazDHbYu4XL1j3J4TjgHQioyhEva", + "stake": "454116002760902808255722029483", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "nw.pool.devnet", + "public_key": "ed25519:65XTtuthwFDL9LpK9FJystfEvJ6brtBpfYSnRMa5a2wN", + "stake": "351695500847678181284638315706", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "leadnode.pool.f863973.m0", + "public_key": "ed25519:CdP6CBFETfWYzrEedmpeqkR6rsJNeT22oUFn2mEDGk5i", + "stake": "222854945937138358386550711453", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "blueprint.pool.f863973.m0", + "public_key": "ed25519:DUfxa8EUaTQyVXgEm4NFCtiez7jsjbM3m838c7aRSEBn", + "stake": "138040049008009637755493563288", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "al3c5.pool.f863973.m0", + "public_key": "ed25519:BoYixTjyBePQ1VYP3s29rZfjtz1FLQ9og4FWZB5UgWCZ", + "stake": "113955994115662929112230612769", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "cymac.pool.f863973.m0", + "public_key": "ed25519:EzUKatz6stcg4pKA2HpwhQXhSDvef3Cxyo6zvsz87est", + "stake": "112870584143910008966689700738", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "p2p-org.pool.f863973.m0", + "public_key": "ed25519:5qyxefArHQfABdNv9ELuEiWcEo7DTzABM9LrMAKTCY3Z", + "stake": "100198001398444504508422270154", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "a41.pool.f863973.m0", + "public_key": "ed25519:Gzg8dYaeBe6ime9dsMKUFiRZeWLjQ3VHjBCbapjsCmUf", + "stake": "55030000541997702601700000000", + "validator_stake_struct_version": "V1" + } + ], + "prev_block_hash": "ATa5K9ofmjtLXsgkp2VNQhALi5hgJPmojMVQ1MtYUa8e" + } + } diff --git a/fixtures/test_2.json b/fixtures/test_2.json new file mode 100644 index 0000000..3e55f48 --- /dev/null +++ b/fixtures/test_2.json @@ -0,0 +1,235 @@ +{ + "last_block_hash": "EAUfcEw9BMjf1TqwqprD5rcMXbGrXmjdmmihLWEYbigA", + "body": { + "approvals_after_next": [ + "ed25519:EjkN3ekQRFPnAW9MFjTGE7ntb6V16spgMB6YYnejRzs6mzfbp6UB4ELHUR7tezZZyVL7AgAgAHwtHPBnJC6HHFf", + "ed25519:EPFUZAu9SXM8rm3JQMZdY4tF4nicUH8zPEdVnF96ukAZpHwFeUQKDLmrrWjopA95FhykvQTmuQUjYfNLTvDeXYi", + "ed25519:3uVsabfdcWDPeRK6yCinDWXonXxWhu6qv1MAHMHTYYsB6tcFCi3GLbdsddcdmTg2sDCbJUpkfwC51ZbUB7QATzx7", + "ed25519:fjdgPLhjDaLKQaUvPGuRkaAwUxFKA9rgkDT8uRQCqtts8oM3ZyS6gmkz53x3VLBFoWWDyM6aZCXQCvakpq1eEAe", + null, + null, + "ed25519:4kxomt3EQriQubccMgnUg9eQ5nkM7z4Fb3suA3nKQVc3D5P9HkvzN6wF5zEkvvG2TUELFDrCckbuLGFb38N4zDQc", + null, + null, + null, + null, + null, + "ed25519:5FVqGn2MK2CAWtzJmhPt9XktRvU9d6KNJ8BGST55qoKPJ9vZzADBDcW18iXHT8HqWixqBDLm5f9M46z2RSZoA64Z", + null, + "ed25519:4SHM7cVMmtpWcrJRcVLL5SU14WeyEpHGSEuvaU4hnr3NypKyekv6vMWdCU4DTTR6BoQjhYvtWXeqqZtMvPsJ9j7s", + null, + "ed25519:34EDE41YUxvrS6KSBkvM6VRMHzempoYawFt1bJrGLD9KRuYWJCJBQmt6axJuwh49tLpYMe4TCqw6Sq5C5kdDVzjY", + null, + null, + null, + null, + null, + null, + null, + "ed25519:5cEY3iPBcoooFKMds1zubY23yvfCaCARBm43Qv8xMrTuH6iPUW1Wjmvf8kc5SdC46HzBjYRXueZEURZuSQ5oeXnx", + null, + null, + null, + null, + "ed25519:5Z18ZBq9iQ3m6cZ8R3fsZ5ipJU81rqMmHnipstRfTX77AJshFCBpP8TxA8fK7aN44nrHdabncCJ9jFo6msWTzCnW", + null, + null + ], + "inner_lite": { + "block_merkle_root": "4Bo6a89Pr9AmKqBF54PExQ5J6QnuMgmac3SooXftFirj", + "epoch_id": "FgBfwcG3XMnWBkqu3xbYH8Guju8iBNJHJcvxdHsL6svr", + "height": 154741176, + "next_bp_hash": "2bg8kQAwnTYZetw6BRpWBvw69BSF9WE4Zws2bQgNyNcm", + "next_epoch_id": "EPpSEMnWuzHW4aTQ5hfAbkG4EyT8z7g9JvnUZH4yQFS5", + "outcome_root": "7Ntnzqbsmgg5g4vKGfyzR19ZswdXriYXzhzpCJgR89Zz", + "prev_state_root": "7ynM1RWwXiJtEVqFi9Zjn54FD9j7qU4wDNcBRLs9iPSu", + "timestamp": 1705388244771412430, + "timestamp_nanosec": "1705388244771412430" + }, + "inner_rest_hash": "VF86i5AC81TCtEfRfG1m4tZCz5DGt8FUYbiVfjajk4D", + "next_block_inner_hash": "HPX8ijJhWVtLh3cSupas2vudKFAZefvufA6zpxv5zoem", + "next_bps": [ + { + "account_id": "node1", + "public_key": "ed25519:6DSjZ8mvsRZDvFqFxo8tCKePG96omXW7eVYVSySmDk8e", + "stake": "51995849873243611939132459599779", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "node2", + "public_key": "ed25519:GkDv7nSMS3xcqA45cpMvFmfV1o4fRF6zYo1JRR6mNqg5", + "stake": "51986168368370021532730821376618", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "node3", + "public_key": "ed25519:ydgzeXHJ5Xyt7M1gXLxqLBW1Ejx6scNV5Nx2pxFM8su", + "stake": "51931186208367497781029863589354", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "node0", + "public_key": "ed25519:7PGseFbWxvYVgZ89K1uTJKYoKetWs7BJtbyXDzfbAcqX", + "stake": "51837638842520506321820685079720", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "aurora.pool.f863973.m0", + "public_key": "ed25519:9c7mczZpNzJz98V1sDeGybfD4gMybP4JKHotH8RrrHTm", + "stake": "17900245019402583650133465073632", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "legends.pool.f863973.m0", + "public_key": "ed25519:AhQ6sUifJYgjqarXSAzdDZU9ZixpUesP9JEH1Vr7NbaF", + "stake": "16211222444669702135933673463207", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "01node.pool.f863973.m0", + "public_key": "ed25519:3iNqnvBgxJPXCxu6hNdvJso1PEAc1miAD35KQMBCA3aL", + "stake": "11176821118717456771315953721266", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "fastvalidator.pool.f863973.m0", + "public_key": "ed25519:93EQCbHLEY6cMuxDNe8LysWPy8zv5VsoqvHppMbMndpZ", + "stake": "10598519821992269587094887938586", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "kiln.pool.f863973.m0", + "public_key": "ed25519:Bq8fe1eUgDRexX2CYDMhMMQBiN13j8vTAVFyTNhEfh1W", + "stake": "7470359030070502795722434017080", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "stakely_v2.pool.f863973.m0", + "public_key": "ed25519:7BanKZKGvFjK5Yy83gfJ71vPhqRwsDDyVHrV2FMJCUWr", + "stake": "5539984478778409079274412314443", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "fastvalidator2.pool.f863973.m0", + "public_key": "ed25519:4BYnfLhhvNkcDe6U4W43uAqBXDaxM6DcN3YAbLKNUWSh", + "stake": "5305152511612693872683364078590", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "fastvalidator1.pool.f863973.m0", + "public_key": "ed25519:GSeKR7hJrgfBJ4FjS4GwQYaQzcVhuDun3PcjWZh4nGpT", + "stake": "5294854669987962601093008353993", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "chorusone.pool.f863973.m0", + "public_key": "ed25519:3TkUuDpzrq75KtJhkuLfNNJBPHR5QEWpDxrter3znwto", + "stake": "3832983942424293301319485066620", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "everstake.pool.f863973.m0", + "public_key": "ed25519:4LDN8tZUTRRc4siGmYCPA67tRyxStACDchdGDZYKdFsw", + "stake": "3426510612590284723534740848915", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "ni.pool.f863973.m0", + "public_key": "ed25519:GfCfFkLk2twbAWdsS3tr7C2eaiHN3znSfbshS5e8NqBS", + "stake": "3104309000394639023138702227876", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "foundryusa.pool.f863973.m0", + "public_key": "ed25519:ABGnMW8c87ZKWxvZLLWgvrNe72HN7UoSf4cTBxCHbEE5", + "stake": "2971434876176689081354111194088", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "chorus-one.pool.f863973.m0", + "public_key": "ed25519:6LFwyEEsqhuDxorWfsKcPPs324zLWTaoqk4o6RDXN7Qc", + "stake": "2701137886711820880744418684468", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "lunanova2.pool.f863973.m0", + "public_key": "ed25519:9Jv6e9Kye4wM9EL1XJvXY8CYsLi1HLdRKnTzXBQY44w9", + "stake": "2622618545437785136715521089346", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "stakesstone.pool.f863973.m0", + "public_key": "ed25519:3aAdsKUuzZbjW9hHnmLWFRKwXjmcxsnLNLfNL4gP1wJ8", + "stake": "1885844597972525233055555116008", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "pathrocknetwork.pool.f863973.m0", + "public_key": "ed25519:CGzLGZEMb84nRSRZ7Au1ETAoQyN7SQXQi55fYafXq736", + "stake": "1717066059294035141561843218976", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "dsrvlabs.pool.f863973.m0", + "public_key": "ed25519:61ei2efmmLkeDR1CG6JDEC2U3oZCUuC2K1X16Vmxrud9", + "stake": "1583076789418337934155466345470", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "bee1stake.pool.f863973.m0", + "public_key": "ed25519:B7Mwy3sCCJ6GZzEojsKFXMjLQfVXPDC4Q1LjuHoZcyM6", + "stake": "952175543126836190103726170469", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "bisontrails.pool.f863973.m0", + "public_key": "ed25519:8g4P5EXyp2b2pfVMHY1QLfkRcY59hjPfWrFCKUWX3RmR", + "stake": "784773514321136890208157331616", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "pennyvalidators.pool.f863973.m0", + "public_key": "ed25519:HiHdwq9rxi9hyxaGkazDHbYu4XL1j3J4TjgHQioyhEva", + "stake": "454246751367119221511607975024", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "nw.pool.devnet", + "public_key": "ed25519:65XTtuthwFDL9LpK9FJystfEvJ6brtBpfYSnRMa5a2wN", + "stake": "351796760649730627846279409552", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "leadnode.pool.f863973.m0", + "public_key": "ed25519:CdP6CBFETfWYzrEedmpeqkR6rsJNeT22oUFn2mEDGk5i", + "stake": "222919110100903924760392563095", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "blueprint.pool.f863973.m0", + "public_key": "ed25519:DUfxa8EUaTQyVXgEm4NFCtiez7jsjbM3m838c7aRSEBn", + "stake": "138079793355047795768517097405", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "cymac.pool.f863973.m0", + "public_key": "ed25519:EzUKatz6stcg4pKA2HpwhQXhSDvef3Cxyo6zvsz87est", + "stake": "112903081724858326049928307120", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "p2p-org.pool.f863973.m0", + "public_key": "ed25519:5qyxefArHQfABdNv9ELuEiWcEo7DTzABM9LrMAKTCY3Z", + "stake": "100198001398444504508422270154", + "validator_stake_struct_version": "V1" + }, + { + "account_id": "a41.pool.f863973.m0", + "public_key": "ed25519:Gzg8dYaeBe6ime9dsMKUFiRZeWLjQ3VHjBCbapjsCmUf", + "stake": "55045849262927169777589487275", + "validator_stake_struct_version": "V1" + } + ], + "prev_block_hash": "EqCBWBif1xyr6pq4Kvr6s4aPhEMRqBerfDVBJp4GDDUG" + } +} diff --git a/fixtures/well_known_header.json b/fixtures/well_known_header.json deleted file mode 100644 index c21a06c..0000000 --- a/fixtures/well_known_header.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "height": 4, - "prev_height": 3, - "epoch_id": "11111111111111111111111111111111", - "next_epoch_id": "AuatKw3hiGmXed3uT2u4Die6ZRGZhEHn34kTyVpGnYLM", - "prev_hash": "BUcVEkMq3DcZzDGgeh1sb7FFuD86XYcXpEt25Cf34LuP", - "prev_state_root": "Bn786g4GdJJigSP4qRSaVCfeMotWVX88cV1LTZhD6o3z", - "chunk_receipts_root": "9ETNjrt6MkwTgSVMMbpukfxRshSD1avBUUa4R4NuqwHv", - "chunk_headers_root": "Fk7jeakmi8eruvv4L4ToKs7MV1YG64ETZtASQYjGBWK1", - "chunk_tx_root": "7tkzFg8RHBmMw1ncRJZCCZAizgq4rwCftTKYLce8RU8t", - "outcome_root": "7tkzFg8RHBmMw1ncRJZCCZAizgq4rwCftTKYLce8RU8t", - "chunks_included": 1, - "challenges_root": "11111111111111111111111111111111", - "timestamp": 1642022757141096960, - "timestamp_nanosec": "1642022757141096960", - "random_value": "GxYrjCxQtfG2K7hX6w4aPs3usTskzfCkbVc2icSQMF7h", - "validator_proposals": [], - "chunk_mask": [ - true - ], - "gas_price": "1000000000", - "block_ordinal": 4, - "rent_paid": "0", - "validator_reward": "0", - "total_supply": "3000000000000000000000000000000000", - "challenges_result": [], - "last_final_block": "GTudmqKJQjEVCrdi31vcHqXoEpvEScmZ9BhBf3gPJ4pp", - "last_ds_final_block": "BUcVEkMq3DcZzDGgeh1sb7FFuD86XYcXpEt25Cf34LuP", - "next_bp_hash": "236RGxQc2xSqukyiBkixtZSqKu679ZxeS6vP8zzAL9vW", - "block_merkle_root": "Gf3uWgULzc5WDuaAq4feehh7M1TFRFxTWVv2xH6AsnpA", - "epoch_sync_data_hash": "4JTQn5LGcxdx4xstsAXgXHcP3oHKatzdzHBw6atBDSWV", - "approvals": [ - "ed25519:5Jdeg8rk5hAbcooyxXQSTcxBgUK39Z8Qtfkhqmpi26biU26md5wBiFvkAEGXrMyn3sgq3cTMG8Lr3HD7RxWPjkPh", - "ed25519: 4vqTaN6bucu6ALsb1m15e8HWGGxLQeKJhWrcU8zPRrzfkZbakaSzW8rfas2ZG89rFKheZUyrnZRKooRny6YKFyKi" - ], - "signature": "ed25519:5mGi9dyuyt7TnSpPFjbEWSJThDdiEV9NNQB11knXvRbxSv8XfBT5tdVVFypeqpZjeB3fD7qgJpWhTj3KvdGbcXdu", - "latest_protocol_version": 50 -} \ No newline at end of file diff --git a/succinct.json b/succinct.json new file mode 100644 index 0000000..b87fd55 --- /dev/null +++ b/succinct.json @@ -0,0 +1,14 @@ +{ + "entrypoints": [ + { + "name": "sync", + "framework": "plonky2x", + "baseDir": ".", + "buildCommand": "cargo build --release --bin sync && mv target/release/sync build/ && RUST_LOG=debug ./build/sync build", + "proveCommand": "RUST_LOG=debug ./build/sync prove input.json", + "requiredArtifacts": [ + "sync" + ] + } + ] +}