From 07e23bba5000c9d67dfc1d975ac477164e56db1f Mon Sep 17 00:00:00 2001 From: srdtrk <59252793+srdtrk@users.noreply.github.com> Date: Mon, 11 Nov 2024 11:16:59 +0800 Subject: [PATCH] imp: cache membership using transient store (#130) * feat: implemented * imp: ran forge fmt * imp: regenerated abi * imp: generated new fixtures * test: added large membership test * style: forge fmt * fix: removed broken test * docs: improved natspec --- .github/workflows/e2e.yml | 2 + contracts/abi/SP1ICS07Tendermint.json | 51 ++++++++ .../membership_100-groth16_fixture.json | 10 ++ .../fixtures/membership_25-plonk_fixture.json | 10 ++ contracts/src/SP1ICS07Tendermint.sol | 77 ++++++++---- .../src/errors/ISP1ICS07TendermintErrors.sol | 5 + contracts/test/LargeMembership.t.sol | 64 ++++++++++ contracts/test/Membership.t.sol | 28 ++++- contracts/test/UcAndMembership.t.sol | 13 +- e2e/interchaintestv8/operator/operator.go | 1 + e2e/interchaintestv8/sp1_ics07_test.go | 112 ++++++++++++++++++ .../types/sp1ics07tendermint/contract.go | 23 +++- foundry.toml | 1 + justfile | 2 + 14 files changed, 363 insertions(+), 36 deletions(-) create mode 100644 contracts/fixtures/membership_100-groth16_fixture.json create mode 100644 contracts/fixtures/membership_25-plonk_fixture.json create mode 100644 contracts/test/LargeMembership.t.sol diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index edc6184..a909e08 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -51,6 +51,8 @@ jobs: - TestWithSP1ICS07TendermintTestSuite/TestDoubleSignMisbehaviour_Plonk - TestWithSP1ICS07TendermintTestSuite/TestBreakingTimeMonotonicityMisbehaviour_Groth16 - TestWithSP1ICS07TendermintTestSuite/TestBreakingTimeMonotonicityMisbehaviour_Plonk + - TestWithSP1ICS07TendermintTestSuite/Test100Membership_Groth16 + - TestWithSP1ICS07TendermintTestSuite/Test25Membership_Plonk name: ${{ matrix.test }} runs-on: ubuntu-latest steps: diff --git a/contracts/abi/SP1ICS07Tendermint.json b/contracts/abi/SP1ICS07Tendermint.json index 44f0834..bbcc7b3 100644 --- a/contracts/abi/SP1ICS07Tendermint.json +++ b/contracts/abi/SP1ICS07Tendermint.json @@ -880,6 +880,25 @@ "outputs": [], "stateMutability": "nonpayable" }, + { + "type": "function", + "name": "multicall", + "inputs": [ + { + "name": "data", + "type": "bytes[]", + "internalType": "bytes[]" + } + ], + "outputs": [ + { + "name": "results", + "type": "bytes[]", + "internalType": "bytes[]" + } + ], + "stateMutability": "nonpayable" + }, { "type": "function", "name": "updateClient", @@ -912,6 +931,17 @@ "outputs": [], "stateMutability": "pure" }, + { + "type": "error", + "name": "AddressEmptyCode", + "inputs": [ + { + "name": "target", + "type": "address", + "internalType": "address" + } + ] + }, { "type": "error", "name": "CannotHandleMisbehavior", @@ -986,6 +1016,11 @@ } ] }, + { + "type": "error", + "name": "FailedCall", + "inputs": [] + }, { "type": "error", "name": "FeatureNotSupported", @@ -1001,6 +1036,22 @@ "name": "InvalidMembershipProof", "inputs": [] }, + { + "type": "error", + "name": "KeyValuePairNotInCache", + "inputs": [ + { + "name": "path", + "type": "bytes[]", + "internalType": "bytes[]" + }, + { + "name": "value", + "type": "bytes", + "internalType": "bytes" + } + ] + }, { "type": "error", "name": "LengthIsOutOfRange", diff --git a/contracts/fixtures/membership_100-groth16_fixture.json b/contracts/fixtures/membership_100-groth16_fixture.json new file mode 100644 index 000000000..114b75a --- /dev/null +++ b/contracts/fixtures/membership_100-groth16_fixture.json @@ -0,0 +1,10 @@ +{ + "trustedClientState": "000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000017000000000000000000000000000000000000000000000000000000000012754500000000000000000000000000000000000000000000000000000000001baf8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000673696d642d310000000000000000000000000000000000000000000000000000", + "trustedConsensusState": "00000000000000000000000000000000000000000000000000000000672ef07d5916313ce1ad6c29c704566277116e22233c4a74461efb398c5d1545c3f11157bbc7242d7856f7e6cab7974edf830a50dfd7b37e66de28eb2792a492da760c4d", + "updateClientVkey": "0x00b2622defae3c538c4d7ed9ee49d3597e5befa999febeb0f66917b320931ed9", + "membershipVkey": "0x005586439d37524c259f19f472d5c744e426f591d17e53d9c7204b9f0c32021b", + "ucAndMembershipVkey": "0x000739e2042571361654fac7282ebc0d34bcddf1a7e6efd5eeea788bf1eeed32", + "misbehaviourVkey": "0x002ef072d82c5ba69565ed738589afff0bb35e0dea3993ebc1dc35551531c8ff", + "proofHeight": "00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000017", + "membershipProof": "00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000098e00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000672ef07d5916313ce1ad6c29c704566277116e22233c4a74461efb398c5d1545c3f11157bbc7242d7856f7e6cab7974edf830a50dfd7b37e66de28eb2792a492da760c4d005586439d37524c259f19f472d5c744e426f591d17e53d9c7204b9f0c32021b00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000009700000000000000000000000000000000000000000000000000000000000000968000000000000000000000000000000000000000000000000000000000000000205916313ce1ad6c29c704566277116e22233c4a74461efb398c5d1545c3f11157000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000c800000000000000000000000000000000000000000000000000000000000000de00000000000000000000000000000000000000000000000000000000000000f4000000000000000000000000000000000000000000000000000000000000010a00000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000136000000000000000000000000000000000000000000000000000000000000014c00000000000000000000000000000000000000000000000000000000000001620000000000000000000000000000000000000000000000000000000000000178000000000000000000000000000000000000000000000000000000000000018e00000000000000000000000000000000000000000000000000000000000001a400000000000000000000000000000000000000000000000000000000000001ba00000000000000000000000000000000000000000000000000000000000001d000000000000000000000000000000000000000000000000000000000000001e600000000000000000000000000000000000000000000000000000000000001fc00000000000000000000000000000000000000000000000000000000000002120000000000000000000000000000000000000000000000000000000000000228000000000000000000000000000000000000000000000000000000000000023e0000000000000000000000000000000000000000000000000000000000000254000000000000000000000000000000000000000000000000000000000000026a0000000000000000000000000000000000000000000000000000000000000280000000000000000000000000000000000000000000000000000000000000029600000000000000000000000000000000000000000000000000000000000002ac00000000000000000000000000000000000000000000000000000000000002c200000000000000000000000000000000000000000000000000000000000002d800000000000000000000000000000000000000000000000000000000000002ee0000000000000000000000000000000000000000000000000000000000000304000000000000000000000000000000000000000000000000000000000000031a00000000000000000000000000000000000000000000000000000000000003300000000000000000000000000000000000000000000000000000000000000346000000000000000000000000000000000000000000000000000000000000035c00000000000000000000000000000000000000000000000000000000000003720000000000000000000000000000000000000000000000000000000000000388000000000000000000000000000000000000000000000000000000000000039e00000000000000000000000000000000000000000000000000000000000003b400000000000000000000000000000000000000000000000000000000000003ca00000000000000000000000000000000000000000000000000000000000003e000000000000000000000000000000000000000000000000000000000000003f6000000000000000000000000000000000000000000000000000000000000040c00000000000000000000000000000000000000000000000000000000000004220000000000000000000000000000000000000000000000000000000000000438000000000000000000000000000000000000000000000000000000000000044e0000000000000000000000000000000000000000000000000000000000000464000000000000000000000000000000000000000000000000000000000000047a000000000000000000000000000000000000000000000000000000000000049000000000000000000000000000000000000000000000000000000000000004a600000000000000000000000000000000000000000000000000000000000004bc00000000000000000000000000000000000000000000000000000000000004d200000000000000000000000000000000000000000000000000000000000004e800000000000000000000000000000000000000000000000000000000000004fe0000000000000000000000000000000000000000000000000000000000000514000000000000000000000000000000000000000000000000000000000000052a00000000000000000000000000000000000000000000000000000000000005400000000000000000000000000000000000000000000000000000000000000556000000000000000000000000000000000000000000000000000000000000056c0000000000000000000000000000000000000000000000000000000000000582000000000000000000000000000000000000000000000000000000000000059800000000000000000000000000000000000000000000000000000000000005ae00000000000000000000000000000000000000000000000000000000000005c400000000000000000000000000000000000000000000000000000000000005da00000000000000000000000000000000000000000000000000000000000005f00000000000000000000000000000000000000000000000000000000000000606000000000000000000000000000000000000000000000000000000000000061c00000000000000000000000000000000000000000000000000000000000006320000000000000000000000000000000000000000000000000000000000000648000000000000000000000000000000000000000000000000000000000000065e0000000000000000000000000000000000000000000000000000000000000674000000000000000000000000000000000000000000000000000000000000068a00000000000000000000000000000000000000000000000000000000000006a000000000000000000000000000000000000000000000000000000000000006b600000000000000000000000000000000000000000000000000000000000006cc00000000000000000000000000000000000000000000000000000000000006e200000000000000000000000000000000000000000000000000000000000006f8000000000000000000000000000000000000000000000000000000000000070e0000000000000000000000000000000000000000000000000000000000000724000000000000000000000000000000000000000000000000000000000000073a00000000000000000000000000000000000000000000000000000000000007500000000000000000000000000000000000000000000000000000000000000766000000000000000000000000000000000000000000000000000000000000077c000000000000000000000000000000000000000000000000000000000000079200000000000000000000000000000000000000000000000000000000000007a800000000000000000000000000000000000000000000000000000000000007be00000000000000000000000000000000000000000000000000000000000007d400000000000000000000000000000000000000000000000000000000000007ea00000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000816000000000000000000000000000000000000000000000000000000000000082c00000000000000000000000000000000000000000000000000000000000008420000000000000000000000000000000000000000000000000000000000000858000000000000000000000000000000000000000000000000000000000000086e0000000000000000000000000000000000000000000000000000000000000884000000000000000000000000000000000000000000000000000000000000089a00000000000000000000000000000000000000000000000000000000000008b000000000000000000000000000000000000000000000000000000000000008c600000000000000000000000000000000000000000000000000000000000008dc00000000000000000000000000000000000000000000000000000000000008f20000000000000000000000000000000000000000000000000000000000000908000000000000000000000000000000000000000000000000000000000000091e0000000000000000000000000000000000000000000000000000000000000934000000000000000000000000000000000000000000000000000000000000094a000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b0214acc1e64074a301c658766c035a20e679c44c04d67374616b650000000000000000000000000000000000000000000000000000000000000000000000000b313030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001040906909000ca33fcf65de983e8ebb10da80bec048636af8c49801db2a49736a0286402c129b8e69be116f3511d9810df19a88de908d9e6f32d645e5aa5182de0cf876e2d27aebaf81f9b0b8a9c4e9346c5fddb8f99dd6ff13d0121738fcb58eb42ed548b19ac705f8d7c616a0e5317dd453f27c3685eb13ee347ea9153281b57350db75f0779f9918be71c42804f1f54b333136449c3becd25f28da815fd3cbd51021dc603b371303f1bc80b3a6b102b1a3c8cce48ec40ffbd5e425fbd80e845e73586262b1a4f8ca967d0e2e660bc9250d01b69987850db27da573f3ab4ec0c5b325cda05c80ae50763c5732354fceff9ea7661a857593d1d52344026611c1ef0bfe0d500000000000000000000000000000000000000000000000000000000" +} diff --git a/contracts/fixtures/membership_25-plonk_fixture.json b/contracts/fixtures/membership_25-plonk_fixture.json new file mode 100644 index 000000000..a891353 --- /dev/null +++ b/contracts/fixtures/membership_25-plonk_fixture.json @@ -0,0 +1,10 @@ +{ + "trustedClientState": "000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000015000000000000000000000000000000000000000000000000000000000012754500000000000000000000000000000000000000000000000000000000001baf8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000673696d642d310000000000000000000000000000000000000000000000000000", + "trustedConsensusState": "00000000000000000000000000000000000000000000000000000000672ef1d4518ba808770caf18274dbf93c2d42d0c27a3ee7372557f033e4ce2590e972190eca7aea9083acadb2b66c7e23e45fafed10d3899aa94d84f297e32b6a3c7a17f", + "updateClientVkey": "0x00b2622defae3c538c4d7ed9ee49d3597e5befa999febeb0f66917b320931ed9", + "membershipVkey": "0x005586439d37524c259f19f472d5c744e426f591d17e53d9c7204b9f0c32021b", + "ucAndMembershipVkey": "0x000739e2042571361654fac7282ebc0d34bcddf1a7e6efd5eeea788bf1eeed32", + "misbehaviourVkey": "0x002ef072d82c5ba69565ed738589afff0bb35e0dea3993ebc1dc35551531c8ff", + "proofHeight": "00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000015", + "membershipProof": "0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000002ac00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000672ef1d4518ba808770caf18274dbf93c2d42d0c27a3ee7372557f033e4ce2590e972190eca7aea9083acadb2b66c7e23e45fafed10d3899aa94d84f297e32b6a3c7a17f005586439d37524c259f19f472d5c744e426f591d17e53d9c7204b9f0c32021b0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000268000000000000000000000000000000000000000000000000000000000000026000000000000000000000000000000000000000000000000000000000000000020518ba808770caf18274dbf93c2d42d0c27a3ee7372557f033e4ce2590e972190000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000190000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000048000000000000000000000000000000000000000000000000000000000000005e0000000000000000000000000000000000000000000000000000000000000074000000000000000000000000000000000000000000000000000000000000008a00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000b600000000000000000000000000000000000000000000000000000000000000cc00000000000000000000000000000000000000000000000000000000000000e200000000000000000000000000000000000000000000000000000000000000f8000000000000000000000000000000000000000000000000000000000000010e0000000000000000000000000000000000000000000000000000000000000124000000000000000000000000000000000000000000000000000000000000013a00000000000000000000000000000000000000000000000000000000000001500000000000000000000000000000000000000000000000000000000000000166000000000000000000000000000000000000000000000000000000000000017c000000000000000000000000000000000000000000000000000000000000019200000000000000000000000000000000000000000000000000000000000001a800000000000000000000000000000000000000000000000000000000000001be00000000000000000000000000000000000000000000000000000000000001d400000000000000000000000000000000000000000000000000000000000001ea00000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000216000000000000000000000000000000000000000000000000000000000000022c0000000000000000000000000000000000000000000000000000000000000242000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b021417930e34c0119a99e68ea9351efd1c3209ca25e27374616b650000000000000000000000000000000000000000000000000000000000000000000000000a393939393939393937350000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b021417930e34c0119a99e68ea9351efd1c3209ca25e27374616b650000000000000000000000000000000000000000000000000000000000000000000000000a393939393939393937350000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b021417930e34c0119a99e68ea9351efd1c3209ca25e27374616b650000000000000000000000000000000000000000000000000000000000000000000000000a393939393939393937350000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b021417930e34c0119a99e68ea9351efd1c3209ca25e27374616b650000000000000000000000000000000000000000000000000000000000000000000000000a393939393939393937350000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b021417930e34c0119a99e68ea9351efd1c3209ca25e27374616b650000000000000000000000000000000000000000000000000000000000000000000000000a393939393939393937350000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b021417930e34c0119a99e68ea9351efd1c3209ca25e27374616b650000000000000000000000000000000000000000000000000000000000000000000000000a393939393939393937350000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b021417930e34c0119a99e68ea9351efd1c3209ca25e27374616b650000000000000000000000000000000000000000000000000000000000000000000000000a393939393939393937350000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b021417930e34c0119a99e68ea9351efd1c3209ca25e27374616b650000000000000000000000000000000000000000000000000000000000000000000000000a393939393939393937350000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b021417930e34c0119a99e68ea9351efd1c3209ca25e27374616b650000000000000000000000000000000000000000000000000000000000000000000000000a393939393939393937350000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b021417930e34c0119a99e68ea9351efd1c3209ca25e27374616b650000000000000000000000000000000000000000000000000000000000000000000000000a393939393939393937350000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b021417930e34c0119a99e68ea9351efd1c3209ca25e27374616b650000000000000000000000000000000000000000000000000000000000000000000000000a393939393939393937350000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b021417930e34c0119a99e68ea9351efd1c3209ca25e27374616b650000000000000000000000000000000000000000000000000000000000000000000000000a393939393939393937350000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b021417930e34c0119a99e68ea9351efd1c3209ca25e27374616b650000000000000000000000000000000000000000000000000000000000000000000000000a393939393939393937350000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b021417930e34c0119a99e68ea9351efd1c3209ca25e27374616b650000000000000000000000000000000000000000000000000000000000000000000000000a393939393939393937350000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b021417930e34c0119a99e68ea9351efd1c3209ca25e27374616b650000000000000000000000000000000000000000000000000000000000000000000000000a393939393939393937350000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b021417930e34c0119a99e68ea9351efd1c3209ca25e27374616b650000000000000000000000000000000000000000000000000000000000000000000000000a393939393939393937350000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b021417930e34c0119a99e68ea9351efd1c3209ca25e27374616b650000000000000000000000000000000000000000000000000000000000000000000000000a393939393939393937350000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b021417930e34c0119a99e68ea9351efd1c3209ca25e27374616b650000000000000000000000000000000000000000000000000000000000000000000000000a393939393939393937350000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b021417930e34c0119a99e68ea9351efd1c3209ca25e27374616b650000000000000000000000000000000000000000000000000000000000000000000000000a393939393939393937350000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b021417930e34c0119a99e68ea9351efd1c3209ca25e27374616b650000000000000000000000000000000000000000000000000000000000000000000000000a393939393939393937350000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b021417930e34c0119a99e68ea9351efd1c3209ca25e27374616b650000000000000000000000000000000000000000000000000000000000000000000000000a393939393939393937350000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b021417930e34c0119a99e68ea9351efd1c3209ca25e27374616b650000000000000000000000000000000000000000000000000000000000000000000000000a393939393939393937350000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b021417930e34c0119a99e68ea9351efd1c3209ca25e27374616b650000000000000000000000000000000000000000000000000000000000000000000000000a393939393939393937350000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b021417930e34c0119a99e68ea9351efd1c3209ca25e27374616b650000000000000000000000000000000000000000000000000000000000000000000000000a393939393939393937350000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000462616e6b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b021417930e34c0119a99e68ea9351efd1c3209ca25e27374616b650000000000000000000000000000000000000000000000000000000000000000000000000a3939393939393939373500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000036454bdcae3242b076d5f29a01f8a2cc5e250e3e62a1f3f267247a16b87faaebbec524f9d5b20dc265c7bfb765ad9ce77588a89631276952f24a46aaa08aa00e9ed38cfede41645ac6fa4a0df1d252e638e938a2b076098deb68b504e08bb10cbfb381625bd285438f51322a5275e9914ca614e4115839069ac347466821d21293af22b27db1b2a59c32c9c2ecd6d641f678b6a229cd8be9936425d04844d9181ccf87114450fd588ef2ad495d6d3da282d2ef64dbc117f84c700520b7453b9bc01a99dc82705c2f7b02e2c4b7267382894589b9259a63a85429630060cc9dfe04d66c9e0991b2c798e72515d906a1e22964773c5cb102ee46a5db56e60e5cea2a83cea4b0d17f58318fab78af853f748f39f76d2b650bc7cb86b377eff48d860d92a9eddac0a9692bab6e6afc70f82b1c85995530ec7562b1b1717c695343c3af6d601201a220ec7beb89f793f6a92bf1f43dfb233978cb0dff3631c0e1d2db427a5988d7f0796cae7be9a8afcf4cb40057deb4fee044138fd6c653faa8f924fc93bf4ac720173eace1bc0e915b74df9b8c6803e196d469c368d9e4ee54d533c2e8ca4de2e16529ed9d63a594a64d6884dd0a1e283560a0c1b9611dccbdbb9f92b8da07dd30d17f0d73fd9afa3aee0d982e7030ba58c3c86bb675528f2a0bd6d1b7f184118122d30a628347442095a630105747c5f61baf153aaf72b899eec23cb988b0e701eac01a5a3fc3f49b38d3a5f6306350b754f5a85b1977d940cfc37c64ebc89a625c6326c71cdb66741ff3a9db72a3e99d22cdcfd0cdc2da11d3d30265514f2102985aabe37b8919cda8d5a5fc47e9792814656caf3bd30f2413abacb389d139925b1002f2f9b0f79e2c12c9dcd78c95cb380602418462f466f960fce797e9881077f58b1da1012281f4435c45ff6c1eb38d88755afb4caee2da83354129e1cf4074b91326b013e3f99b81771945d5df3a80bae406e533603e68c7d82cf7c8e8813d668e12de82eec0d1cdc8aff91fbbabce519cd956705599f758a612fbc4f6b20783d2d2ad50f402bf3e0d6a91e4c1ba4f4f222dd496deddce9912baaf7494a0e1ecad81eda51bf210fac35e466a6cc42c52913bba201b31ddb78feb9b6c59b1b999cf0595b8393f76bc6d02978d2b9c74824b3b64a84b92f9f369d543a5f530d5ec42bc19373c9da2e32c6608e203f1b4c62e4fadce1706346ca183a45439700000000000000000000000000000000000000000000000000000000" +} diff --git a/contracts/src/SP1ICS07Tendermint.sol b/contracts/src/SP1ICS07Tendermint.sol index d789cca..315d4cc 100644 --- a/contracts/src/SP1ICS07Tendermint.sol +++ b/contracts/src/SP1ICS07Tendermint.sol @@ -6,16 +6,22 @@ import { IUpdateClientMsgs } from "./msgs/IUpdateClientMsgs.sol"; import { IMembershipMsgs } from "./msgs/IMembershipMsgs.sol"; import { IUpdateClientAndMembershipMsgs } from "./msgs/IUcAndMembershipMsgs.sol"; import { IMisbehaviourMsgs } from "./msgs/IMisbehaviourMsgs.sol"; -import { ISP1Verifier } from "@sp1-contracts/ISP1Verifier.sol"; import { ISP1ICS07TendermintErrors } from "./errors/ISP1ICS07TendermintErrors.sol"; import { ISP1ICS07Tendermint } from "./ISP1ICS07Tendermint.sol"; -import { ILightClientMsgs } from "solidity-ibc/msgs/ILightClientMsgs.sol"; -import { ILightClient } from "solidity-ibc/interfaces/ILightClient.sol"; + import { Paths } from "./utils/Paths.sol"; import { UnionMembership } from "./utils/UnionMembership.sol"; + +import { ILightClientMsgs } from "solidity-ibc/msgs/ILightClientMsgs.sol"; +import { ILightClient } from "solidity-ibc/interfaces/ILightClient.sol"; + +import { ISP1Verifier } from "@sp1-contracts/ISP1Verifier.sol"; import { SP1Verifier as SP1VerifierPlonk } from "@sp1-contracts/v3.0.0/SP1VerifierPlonk.sol"; import { SP1Verifier as SP1VerifierGroth16 } from "@sp1-contracts/v3.0.0/SP1VerifierGroth16.sol"; +import { Multicall } from "@openzeppelin/utils/Multicall.sol"; +import { TransientSlot } from "@openzeppelin/utils/TransientSlot.sol"; + /// @title SP1 ICS07 Tendermint Light Client /// @author srdtrk /// @notice This contract implements an ICS07 IBC tendermint light client using SP1. @@ -28,8 +34,11 @@ contract SP1ICS07Tendermint is IMisbehaviourMsgs, ISP1ICS07TendermintErrors, ILightClientMsgs, - ISP1ICS07Tendermint + ISP1ICS07Tendermint, + Multicall { + using TransientSlot for *; + /// @inheritdoc ISP1ICS07Tendermint bytes32 public immutable UPDATE_CLIENT_PROGRAM_VKEY; /// @inheritdoc ISP1ICS07Tendermint @@ -45,8 +54,6 @@ contract SP1ICS07Tendermint is ClientState private clientState; /// @notice The mapping from height to consensus state keccak256 hashes. mapping(uint32 height => bytes32 hash) private consensusStateHashes; - /// @notice The collection of verified SP1 proofs for caching. - mapping(bytes32 sp1ProofHash => bool isVerified) private verifiedProofs; /// @notice Allowed clock drift in seconds. /// @inheritdoc ISP1ICS07Tendermint @@ -141,6 +148,13 @@ contract SP1ICS07Tendermint is /// @return timestamp The timestamp of the trusted consensus state. /// @inheritdoc ILightClient function membership(MsgMembership calldata msgMembership) public returns (uint256 timestamp) { + if (msgMembership.proof.length == 0) { + // cached proof + return getCachedKvPair( + msgMembership.proofHeight.revisionHeight, KVPair(msgMembership.path, msgMembership.value) + ); + } + MembershipProof memory membershipProof = abi.decode(msgMembership.proof, (MembershipProof)); if (membershipProof.proofType == MembershipProofType.SP1MembershipProof) { return handleSP1MembershipProof( @@ -260,13 +274,12 @@ contract SP1ICS07Tendermint is validateMembershipOutput(output.commitmentRoot, proofHeight.revisionHeight, proof.trustedConsensusState); + verifySP1Proof(proof.sp1Proof); + // We avoid the cost of caching for single kv pairs, as reusing the proof is not necessary - if (output.kvPairs.length == 1) { - verifySP1Proof(proof.sp1Proof); - } else { - verifySP1ProofCached(proof.sp1Proof); + if (output.kvPairs.length > 1) { + cacheKvPairs(proofHeight.revisionHeight, output.kvPairs, proof.trustedConsensusState.timestamp); } - return proof.trustedConsensusState.timestamp; } @@ -314,12 +327,7 @@ contract SP1ICS07Tendermint is validateUpdateClientPublicValues(output.updateClientOutput); - // We avoid the cost of caching for single kv pairs, as reusing the proof is not necessary - if (output.kvPairs.length == 1) { - verifySP1Proof(proof.sp1Proof); - } else { - verifySP1ProofCached(proof.sp1Proof); - } + verifySP1Proof(proof.sp1Proof); } // check update result @@ -365,6 +373,12 @@ contract SP1ICS07Tendermint is output.updateClientOutput.newConsensusState ); + // We avoid the cost of caching for single kv pairs, as reusing the proof is not necessary + if (output.kvPairs.length > 1) { + cacheKvPairs( + proofHeight.revisionHeight, output.kvPairs, output.updateClientOutput.newConsensusState.timestamp + ); + } return output.updateClientOutput.newConsensusState.timestamp; } @@ -502,17 +516,28 @@ contract SP1ICS07Tendermint is VERIFIER.verifyProof(proof.vKey, proof.publicValues, proof.proof); } - /// @notice Verifies the SP1 proof and stores the hash of the proof. - /// @dev If the proof is already cached, it does not verify the proof again. - /// @param proof The SP1 proof. - function verifySP1ProofCached(SP1Proof memory proof) private { - bytes32 proofHash = keccak256(abi.encode(proof)); - if (verifiedProofs[proofHash]) { - return; + /// @notice Caches the key-value pairs to the transient storage with the timestamp. + /// @param proofHeight The height of the proof. + /// @param kvPairs The key-value pairs. + /// @param timestamp The timestamp of the trusted consensus state. + /// @dev WARNING: Transient store is not reverted even if a message within a transaction reverts. + /// @dev WARNING: This function must be called after all proof and validation checks. + function cacheKvPairs(uint32 proofHeight, KVPair[] memory kvPairs, uint256 timestamp) private { + for (uint8 i = 0; i < kvPairs.length; i++) { + bytes32 kvPairHash = keccak256(abi.encode(proofHeight, kvPairs[i])); + kvPairHash.asUint256().tstore(timestamp); } + } - VERIFIER.verifyProof(proof.vKey, proof.publicValues, proof.proof); - verifiedProofs[proofHash] = true; + /// @notice Gets the timestamp of the cached key-value pair from the transient storage. + /// @param proofHeight The height of the proof. + /// @param kvPair The key-value pair. + /// @return The timestamp of the cached key-value pair. + function getCachedKvPair(uint32 proofHeight, KVPair memory kvPair) private view returns (uint256) { + bytes32 kvPairHash = keccak256(abi.encode(proofHeight, kvPair)); + uint256 timestamp = kvPairHash.asUint256().tload(); + require(timestamp != 0, KeyValuePairNotInCache(kvPair.path, kvPair.value)); + return timestamp; } /// @notice A dummy function to generate the ABI for the parameters. diff --git a/contracts/src/errors/ISP1ICS07TendermintErrors.sol b/contracts/src/errors/ISP1ICS07TendermintErrors.sol index da09d0b..e787df0 100644 --- a/contracts/src/errors/ISP1ICS07TendermintErrors.sol +++ b/contracts/src/errors/ISP1ICS07TendermintErrors.sol @@ -111,4 +111,9 @@ interface ISP1ICS07TendermintErrors { /// @notice Returned when the membership proof is invalid. error InvalidMembershipProof(); + + /// @notice Returned when a key-value pair is not in the cache. + /// @param path The path of the key-value pair. + /// @param value The value of the key-value pair. + error KeyValuePairNotInCache(bytes[] path, bytes value); } diff --git a/contracts/test/LargeMembership.t.sol b/contracts/test/LargeMembership.t.sol new file mode 100644 index 000000000..ca50caf --- /dev/null +++ b/contracts/test/LargeMembership.t.sol @@ -0,0 +1,64 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.28; + +// solhint-disable-next-line no-global-import +import "forge-std/console.sol"; +import { MembershipTest } from "./MembershipTest.sol"; +import { ILightClient } from "solidity-ibc/interfaces/ILightClient.sol"; + +contract SP1ICS07LargeMembershipTest is MembershipTest { + SP1MembershipProof public proof; + + function setUpLargeMembershipTestWithFixture(string memory fileName) public { + setUpTestWithFixtures(fileName); + + proof = abi.decode(fixture.membershipProof.proof, (SP1MembershipProof)); + } + + function getOutput() public view returns (MembershipOutput memory) { + return abi.decode(proof.sp1Proof.publicValues, (MembershipOutput)); + } + + function test_ValidLargeCachedVerifyMembership_25_plonk() public { + ValidCachedMulticallMembershipTest("membership_25-plonk_fixture.json", 25, "25 key-value pairs with plonk"); + } + + function test_ValidLargeCachedVerifyMembership_100_groth16() public { + ValidCachedMulticallMembershipTest( + "membership_100-groth16_fixture.json", 100, "100 key-value pairs with groth16" + ); + } + + function ValidCachedMulticallMembershipTest(string memory fileName, uint32 n, string memory metadata) public { + require(n > 0, "n must be greater than 0"); + + setUpLargeMembershipTestWithFixture(fileName); + + bytes[] memory multicallData = new bytes[](n); + + multicallData[0] = abi.encodeCall( + ILightClient.membership, + MsgMembership({ + proof: abi.encode(fixture.membershipProof), + proofHeight: fixture.proofHeight, + path: getOutput().kvPairs[0].path, + value: getOutput().kvPairs[0].value + }) + ); + + for (uint32 i = 1; i < n; i++) { + multicallData[i] = abi.encodeCall( + ILightClient.membership, + MsgMembership({ + proof: bytes(""), // cached kv pairs + proofHeight: fixture.proofHeight, + path: getOutput().kvPairs[i].path, + value: getOutput().kvPairs[i].value + }) + ); + } + + ics07Tendermint.multicall(multicallData); + console.log("Proved", metadata, ", gas used: ", vm.lastCallGas().gasTotalUsed); + } +} diff --git a/contracts/test/Membership.t.sol b/contracts/test/Membership.t.sol index a91a253..1aa5880 100644 --- a/contracts/test/Membership.t.sol +++ b/contracts/test/Membership.t.sol @@ -95,22 +95,38 @@ contract SP1ICS07MembershipTest is MembershipTest { ics07Tendermint.membership(membershipMsg); - // resubmit the same proof - ics07Tendermint.membership(membershipMsg); + // resubmit cached membership proof + MsgMembership memory cachedMembershipMsg = MsgMembership({ + proof: bytes(""), + proofHeight: fixture.proofHeight, + path: verifyMembershipPath, + value: VERIFY_MEMBERSHIP_VALUE + }); + ics07Tendermint.membership(cachedMembershipMsg); console.log("Cached VerifyMembership gas used: ", vm.lastCallGas().gasTotalUsed); - // resubmit the same proof as non-membership - MsgMembership memory nonMembershipMsg = MsgMembership({ - proof: abi.encode(fixture.membershipProof), + // resubmit cached non-membership proof + MsgMembership memory cachedNonMembershipMsg = MsgMembership({ + proof: bytes(""), proofHeight: fixture.proofHeight, path: verifyNonMembershipPath, value: bytes("") }); - ics07Tendermint.membership(nonMembershipMsg); + ics07Tendermint.membership(cachedNonMembershipMsg); console.log("Cached VerifyNonMembership gas used: ", vm.lastCallGas().gasTotalUsed); + + // resubmit invalid cached membership proof + MsgMembership memory invalidCachedMembershipMsg = MsgMembership({ + proof: bytes(""), + proofHeight: fixture.proofHeight, + path: verifyMembershipPath, + value: bytes("invalid") + }); + vm.expectRevert(abi.encodeWithSelector(KeyValuePairNotInCache.selector, verifyMembershipPath, bytes("invalid"))); + ics07Tendermint.membership(invalidCachedMembershipMsg); } // Confirm that submitting an invalid proof with the real verifier fails. diff --git a/contracts/test/UcAndMembership.t.sol b/contracts/test/UcAndMembership.t.sol index 0843b2d..cdca091 100644 --- a/contracts/test/UcAndMembership.t.sol +++ b/contracts/test/UcAndMembership.t.sol @@ -127,13 +127,20 @@ contract SP1ICS07UpdateClientAndMembershipTest is MembershipTest { ics07Tendermint.getConsensusStateHash(output.updateClientOutput.newHeight.revisionHeight); assert(consensusHash == keccak256(abi.encode(output.updateClientOutput.newConsensusState))); - // resubmit the same proof - ics07Tendermint.membership(membershipMsg); + // submit cached membership proof + MsgMembership memory cachedMembershipMsg = MsgMembership({ + proof: bytes(""), + proofHeight: fixture.proofHeight, + path: verifyMembershipPath, + value: VERIFY_MEMBERSHIP_VALUE + }); + ics07Tendermint.membership(cachedMembershipMsg); console.log("Cached UpdateClientAndVerifyMembership gas used: ", vm.lastCallGas().gasTotalUsed); + // submit cached non-membership proof MsgMembership memory nonMembershipMsg = MsgMembership({ - proof: abi.encode(fixture.membershipProof), + proof: bytes(""), proofHeight: fixture.proofHeight, path: verifyNonMembershipPath, value: bytes("") diff --git a/e2e/interchaintestv8/operator/operator.go b/e2e/interchaintestv8/operator/operator.go index ced942b..a182dbd 100644 --- a/e2e/interchaintestv8/operator/operator.go +++ b/e2e/interchaintestv8/operator/operator.go @@ -58,6 +58,7 @@ func StartOperator(args ...string) error { args = append([]string{"start"}, args...) cmd := exec.Command("target/release/operator", args...) cmd.Stdout = os.Stdout + cmd.Stderr = os.Stderr return cmd.Run() } diff --git a/e2e/interchaintestv8/sp1_ics07_test.go b/e2e/interchaintestv8/sp1_ics07_test.go index a4b1235..96ed593 100644 --- a/e2e/interchaintestv8/sp1_ics07_test.go +++ b/e2e/interchaintestv8/sp1_ics07_test.go @@ -3,7 +3,10 @@ package main import ( "context" "crypto/ecdsa" + "crypto/rand" "encoding/hex" + "fmt" + mathrand "math/rand" "os" "strconv" "testing" @@ -15,6 +18,10 @@ import ( "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/ethclient" + "cosmossdk.io/math" + + "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" + sdk "github.com/cosmos/cosmos-sdk/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" abci "github.com/cometbft/cometbft/abci/types" @@ -604,3 +611,108 @@ func (s *SP1ICS07TendermintTestSuite) BreakingTimeMonotonicityMisbehaviourTest(c s.Require().True(clientState.IsFrozen) })) } + +func (s *SP1ICS07TendermintTestSuite) Test100Membership_Groth16() { + s.largeMembershipTest(100, operator.ProofTypeGroth16) +} + +func (s *SP1ICS07TendermintTestSuite) Test25Membership_Plonk() { + s.largeMembershipTest(25, operator.ProofTypePlonk) +} + +// largeMembershipTest tests membership proofs with a large number of key-value pairs +func (s *SP1ICS07TendermintTestSuite) largeMembershipTest(n uint64, pt operator.SupportedProofType) { + ctx := context.Background() + + s.SetupSuite(ctx, pt) + + eth, simd := s.ChainA, s.ChainB + + s.Require().True(s.Run(fmt.Sprintf("Large membership test with %d key-value pairs", n), func() { + membershipKeys := make([][][]byte, n) + s.Require().True(s.Run("Generate state and keys", func() { + // Messages to generate state to be used in the membership proof + msgs := []sdk.Msg{} + // Generate a random addresses + pubBz := make([]byte, ed25519.PubKeySize) + pub := &ed25519.PubKey{Key: pubBz} + for i := uint64(0); i < n; i++ { + _, err := rand.Read(pubBz) + s.Require().NoError(err) + acc := sdk.AccAddress(pub.Address()) + + // Send some funds to the address + msgs = append(msgs, banktypes.NewMsgSend(s.UserB.Address(), acc, sdk.NewCoins(sdk.NewCoin(simd.Config().Denom, math.NewInt(1))))) + + key, err := types.BankBalanceKey(s.UserB.Address(), simd.Config().Denom) + s.Require().NoError(err) + + membershipKeys[i] = [][]byte{[]byte(banktypes.StoreKey), key} + } + + // Send the messages + _, err := s.BroadcastMessages(ctx, simd, s.UserB, 2_000_000, msgs...) + s.Require().NoError(err) + })) + + // update the client + clientHeight := s.UpdateClient(ctx) + + s.Require().True(s.Run("Verify membership", func() { + rndIdx := mathrand.Intn(int(n)) + + var expValue []byte + s.Require().True(s.Run("Get expected value for the verify membership", func() { + resp, err := e2esuite.ABCIQuery(ctx, simd, &abci.RequestQuery{ + Path: fmt.Sprintf("store/%s/key", membershipKeys[rndIdx][0]), + Data: membershipKeys[rndIdx][1], + Height: int64(clientHeight.RevisionHeight) - 1, + }) + s.Require().NoError(err) + s.Require().NotEmpty(resp.Value) + + expValue = resp.Value + })) + + var fixtureName string + if s.generateFixtures { + fixtureName = fmt.Sprintf("membership_%d-%s", n, pt.String()) + } + args := append([]string{"--trust-level", testvalues.DefaultTrustLevel.String(), "--trusting-period", strconv.Itoa(testvalues.DefaultTrustPeriod), "--base64"}, pt.ToOperatorArgs()...) + proofHeight, memProof, err := operator.MembershipProof( + clientHeight.RevisionHeight, operator.ToBase64KeyPaths(membershipKeys...), + fixtureName, args..., + ) + s.Require().NoError(err) + + msg := sp1ics07tendermint.ILightClientMsgsMsgMembership{ + ProofHeight: *proofHeight, + Proof: memProof, + Path: membershipKeys[rndIdx], + Value: expValue, + } + + tx, err := s.contract.Membership(s.GetTransactOpts(s.key), msg) + s.Require().NoError(err) + + // wait until transaction is included in a block + _ = s.GetTxReciept(ctx, eth.EthereumChain, tx.Hash()) + })) + })) +} + +// UpdateClient updates the SP1ICS07Tendermint client and returns the new height +func (s *SP1ICS07TendermintTestSuite) UpdateClient(ctx context.Context) clienttypes.Height { + var updatedClientState sp1ics07tendermint.IICS07TendermintMsgsClientState + s.Require().True(s.Run("Update client", func() { + s.Require().NoError(operator.StartOperator("--only-once")) + var err error + updatedClientState, err = s.contract.GetClientState(nil) + s.Require().NoError(err) + })) + + return clienttypes.Height{ + RevisionNumber: uint64(updatedClientState.LatestHeight.RevisionNumber), + RevisionHeight: uint64(updatedClientState.LatestHeight.RevisionHeight), + } +} diff --git a/e2e/interchaintestv8/types/sp1ics07tendermint/contract.go b/e2e/interchaintestv8/types/sp1ics07tendermint/contract.go index ee30c5b..3442f0a 100644 --- a/e2e/interchaintestv8/types/sp1ics07tendermint/contract.go +++ b/e2e/interchaintestv8/types/sp1ics07tendermint/contract.go @@ -147,7 +147,7 @@ type IUpdateClientMsgsUpdateClientOutput struct { // ContractMetaData contains all meta data concerning the Contract contract. var ContractMetaData = &bind.MetaData{ - ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"updateClientProgramVkey\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"membershipProgramVkey\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"updateClientAndMembershipProgramVkey\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"misbehaviourProgramVkey\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"_clientState\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"_consensusState\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"ALLOWED_SP1_CLOCK_DRIFT\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint16\",\"internalType\":\"uint16\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"MEMBERSHIP_PROGRAM_VKEY\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"MISBEHAVIOUR_PROGRAM_VKEY\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"UPDATE_CLIENT_AND_MEMBERSHIP_PROGRAM_VKEY\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"UPDATE_CLIENT_PROGRAM_VKEY\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"VERIFIER\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractISP1Verifier\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"abiPublicTypes\",\"inputs\":[{\"name\":\"o1\",\"type\":\"tuple\",\"internalType\":\"structIMembershipMsgs.MembershipOutput\",\"components\":[{\"name\":\"commitmentRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"kvPairs\",\"type\":\"tuple[]\",\"internalType\":\"structIMembershipMsgs.KVPair[]\",\"components\":[{\"name\":\"path\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"value\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}]},{\"name\":\"o2\",\"type\":\"tuple\",\"internalType\":\"structIUpdateClientAndMembershipMsgs.UcAndMembershipOutput\",\"components\":[{\"name\":\"updateClientOutput\",\"type\":\"tuple\",\"internalType\":\"structIUpdateClientMsgs.UpdateClientOutput\",\"components\":[{\"name\":\"clientState\",\"type\":\"tuple\",\"internalType\":\"structIICS07TendermintMsgs.ClientState\",\"components\":[{\"name\":\"chainId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"trustLevel\",\"type\":\"tuple\",\"internalType\":\"structIICS07TendermintMsgs.TrustThreshold\",\"components\":[{\"name\":\"numerator\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"denominator\",\"type\":\"uint8\",\"internalType\":\"uint8\"}]},{\"name\":\"latestHeight\",\"type\":\"tuple\",\"internalType\":\"structIICS02ClientMsgs.Height\",\"components\":[{\"name\":\"revisionNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"revisionHeight\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"trustingPeriod\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"unbondingPeriod\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"isFrozen\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"zkAlgorithm\",\"type\":\"uint8\",\"internalType\":\"enumISP1Msgs.SupportedZkAlgorithm\"}]},{\"name\":\"trustedConsensusState\",\"type\":\"tuple\",\"internalType\":\"structIICS07TendermintMsgs.ConsensusState\",\"components\":[{\"name\":\"timestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"root\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"nextValidatorsHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"name\":\"newConsensusState\",\"type\":\"tuple\",\"internalType\":\"structIICS07TendermintMsgs.ConsensusState\",\"components\":[{\"name\":\"timestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"root\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"nextValidatorsHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"name\":\"time\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"trustedHeight\",\"type\":\"tuple\",\"internalType\":\"structIICS02ClientMsgs.Height\",\"components\":[{\"name\":\"revisionNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"revisionHeight\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"newHeight\",\"type\":\"tuple\",\"internalType\":\"structIICS02ClientMsgs.Height\",\"components\":[{\"name\":\"revisionNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"revisionHeight\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}]},{\"name\":\"kvPairs\",\"type\":\"tuple[]\",\"internalType\":\"structIMembershipMsgs.KVPair[]\",\"components\":[{\"name\":\"path\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"value\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}]},{\"name\":\"o3\",\"type\":\"tuple\",\"internalType\":\"structIUpdateClientMsgs.MsgUpdateClient\",\"components\":[{\"name\":\"sp1Proof\",\"type\":\"tuple\",\"internalType\":\"structISP1Msgs.SP1Proof\",\"components\":[{\"name\":\"vKey\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"publicValues\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proof\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}]},{\"name\":\"o4\",\"type\":\"tuple\",\"internalType\":\"structIMembershipMsgs.MembershipProof\",\"components\":[{\"name\":\"proofType\",\"type\":\"uint8\",\"internalType\":\"enumIMembershipMsgs.MembershipProofType\"},{\"name\":\"proof\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"o5\",\"type\":\"tuple\",\"internalType\":\"structIMembershipMsgs.SP1MembershipProof\",\"components\":[{\"name\":\"sp1Proof\",\"type\":\"tuple\",\"internalType\":\"structISP1Msgs.SP1Proof\",\"components\":[{\"name\":\"vKey\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"publicValues\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proof\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"trustedConsensusState\",\"type\":\"tuple\",\"internalType\":\"structIICS07TendermintMsgs.ConsensusState\",\"components\":[{\"name\":\"timestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"root\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"nextValidatorsHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]}]},{\"name\":\"o6\",\"type\":\"tuple\",\"internalType\":\"structIMembershipMsgs.SP1MembershipAndUpdateClientProof\",\"components\":[{\"name\":\"sp1Proof\",\"type\":\"tuple\",\"internalType\":\"structISP1Msgs.SP1Proof\",\"components\":[{\"name\":\"vKey\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"publicValues\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proof\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}]},{\"name\":\"o7\",\"type\":\"tuple\",\"internalType\":\"structIMisbehaviourMsgs.MisbehaviourOutput\",\"components\":[{\"name\":\"clientState\",\"type\":\"tuple\",\"internalType\":\"structIICS07TendermintMsgs.ClientState\",\"components\":[{\"name\":\"chainId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"trustLevel\",\"type\":\"tuple\",\"internalType\":\"structIICS07TendermintMsgs.TrustThreshold\",\"components\":[{\"name\":\"numerator\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"denominator\",\"type\":\"uint8\",\"internalType\":\"uint8\"}]},{\"name\":\"latestHeight\",\"type\":\"tuple\",\"internalType\":\"structIICS02ClientMsgs.Height\",\"components\":[{\"name\":\"revisionNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"revisionHeight\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"trustingPeriod\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"unbondingPeriod\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"isFrozen\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"zkAlgorithm\",\"type\":\"uint8\",\"internalType\":\"enumISP1Msgs.SupportedZkAlgorithm\"}]},{\"name\":\"time\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"trustedHeight1\",\"type\":\"tuple\",\"internalType\":\"structIICS02ClientMsgs.Height\",\"components\":[{\"name\":\"revisionNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"revisionHeight\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"trustedHeight2\",\"type\":\"tuple\",\"internalType\":\"structIICS02ClientMsgs.Height\",\"components\":[{\"name\":\"revisionNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"revisionHeight\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"trustedConsensusState1\",\"type\":\"tuple\",\"internalType\":\"structIICS07TendermintMsgs.ConsensusState\",\"components\":[{\"name\":\"timestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"root\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"nextValidatorsHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"name\":\"trustedConsensusState2\",\"type\":\"tuple\",\"internalType\":\"structIICS07TendermintMsgs.ConsensusState\",\"components\":[{\"name\":\"timestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"root\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"nextValidatorsHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]}]},{\"name\":\"o8\",\"type\":\"tuple\",\"internalType\":\"structIMisbehaviourMsgs.MsgSubmitMisbehaviour\",\"components\":[{\"name\":\"sp1Proof\",\"type\":\"tuple\",\"internalType\":\"structISP1Msgs.SP1Proof\",\"components\":[{\"name\":\"vKey\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"publicValues\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proof\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}]},{\"name\":\"o9\",\"type\":\"tuple\",\"internalType\":\"structIMembershipMsgs.UnionMembershipProof\",\"components\":[{\"name\":\"ics23Proof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"trustedConsensusState\",\"type\":\"tuple\",\"internalType\":\"structIICS07TendermintMsgs.ConsensusState\",\"components\":[{\"name\":\"timestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"root\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"nextValidatorsHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]}]}],\"outputs\":[],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"getClientState\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIICS07TendermintMsgs.ClientState\",\"components\":[{\"name\":\"chainId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"trustLevel\",\"type\":\"tuple\",\"internalType\":\"structIICS07TendermintMsgs.TrustThreshold\",\"components\":[{\"name\":\"numerator\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"denominator\",\"type\":\"uint8\",\"internalType\":\"uint8\"}]},{\"name\":\"latestHeight\",\"type\":\"tuple\",\"internalType\":\"structIICS02ClientMsgs.Height\",\"components\":[{\"name\":\"revisionNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"revisionHeight\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"trustingPeriod\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"unbondingPeriod\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"isFrozen\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"zkAlgorithm\",\"type\":\"uint8\",\"internalType\":\"enumISP1Msgs.SupportedZkAlgorithm\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getConsensusStateHash\",\"inputs\":[{\"name\":\"revisionHeight\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"handleUnionMembershipProof\",\"inputs\":[{\"name\":\"proofHeight\",\"type\":\"tuple\",\"internalType\":\"structIICS02ClientMsgs.Height\",\"components\":[{\"name\":\"revisionNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"revisionHeight\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"proofBytes\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"kvPath\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"kvValue\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"membership\",\"inputs\":[{\"name\":\"msgMembership\",\"type\":\"tuple\",\"internalType\":\"structILightClientMsgs.MsgMembership\",\"components\":[{\"name\":\"proof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proofHeight\",\"type\":\"tuple\",\"internalType\":\"structIICS02ClientMsgs.Height\",\"components\":[{\"name\":\"revisionNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"revisionHeight\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"path\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"value\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"misbehaviour\",\"inputs\":[{\"name\":\"misbehaviourMsg\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateClient\",\"inputs\":[{\"name\":\"updateMsg\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"enumILightClientMsgs.UpdateResult\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"upgradeClient\",\"inputs\":[{\"name\":\"\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"pure\"},{\"type\":\"error\",\"name\":\"CannotHandleMisbehavior\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ChainIdMismatch\",\"inputs\":[{\"name\":\"expected\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"actual\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"type\":\"error\",\"name\":\"ClientStateMismatch\",\"inputs\":[{\"name\":\"expected\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"actual\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"type\":\"error\",\"name\":\"ConsensusStateHashMismatch\",\"inputs\":[{\"name\":\"expected\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"actual\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"type\":\"error\",\"name\":\"ConsensusStateNotFound\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ConsensusStateRootMismatch\",\"inputs\":[{\"name\":\"expected\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"actual\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"type\":\"error\",\"name\":\"FeatureNotSupported\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"FrozenClientState\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidMembershipProof\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"LengthIsOutOfRange\",\"inputs\":[{\"name\":\"length\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"min\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"max\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"MembershipProofKeyNotFound\",\"inputs\":[{\"name\":\"path\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"}]},{\"type\":\"error\",\"name\":\"MembershipProofValueMismatch\",\"inputs\":[{\"name\":\"expected\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"actual\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"type\":\"error\",\"name\":\"ProofHeightMismatch\",\"inputs\":[{\"name\":\"expectedRevisionNumber\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"expectedRevisionHeight\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"actualRevisionNumber\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"actualRevisionHeight\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"type\":\"error\",\"name\":\"ProofIsInTheFuture\",\"inputs\":[{\"name\":\"now\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"proofTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"ProofIsTooOld\",\"inputs\":[{\"name\":\"now\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"proofTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"TrustThresholdMismatch\",\"inputs\":[{\"name\":\"expectedNumerator\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expectedDenominator\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"actualNumerator\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"actualDenominator\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"TrustingPeriodMismatch\",\"inputs\":[{\"name\":\"expected\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"actual\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"TrustingPeriodTooLong\",\"inputs\":[{\"name\":\"trustingPeriod\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"unbondingPeriod\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"UnbondingPeriodMismatch\",\"inputs\":[{\"name\":\"expected\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"actual\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"UnknownMembershipProofType\",\"inputs\":[{\"name\":\"proofType\",\"type\":\"uint8\",\"internalType\":\"uint8\"}]},{\"type\":\"error\",\"name\":\"UnknownZkAlgorithm\",\"inputs\":[{\"name\":\"algorithm\",\"type\":\"uint8\",\"internalType\":\"uint8\"}]},{\"type\":\"error\",\"name\":\"VerificationKeyMismatch\",\"inputs\":[{\"name\":\"expected\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"actual\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]}]", + ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"updateClientProgramVkey\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"membershipProgramVkey\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"updateClientAndMembershipProgramVkey\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"misbehaviourProgramVkey\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"_clientState\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"_consensusState\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"ALLOWED_SP1_CLOCK_DRIFT\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint16\",\"internalType\":\"uint16\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"MEMBERSHIP_PROGRAM_VKEY\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"MISBEHAVIOUR_PROGRAM_VKEY\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"UPDATE_CLIENT_AND_MEMBERSHIP_PROGRAM_VKEY\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"UPDATE_CLIENT_PROGRAM_VKEY\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"VERIFIER\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractISP1Verifier\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"abiPublicTypes\",\"inputs\":[{\"name\":\"o1\",\"type\":\"tuple\",\"internalType\":\"structIMembershipMsgs.MembershipOutput\",\"components\":[{\"name\":\"commitmentRoot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"kvPairs\",\"type\":\"tuple[]\",\"internalType\":\"structIMembershipMsgs.KVPair[]\",\"components\":[{\"name\":\"path\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"value\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}]},{\"name\":\"o2\",\"type\":\"tuple\",\"internalType\":\"structIUpdateClientAndMembershipMsgs.UcAndMembershipOutput\",\"components\":[{\"name\":\"updateClientOutput\",\"type\":\"tuple\",\"internalType\":\"structIUpdateClientMsgs.UpdateClientOutput\",\"components\":[{\"name\":\"clientState\",\"type\":\"tuple\",\"internalType\":\"structIICS07TendermintMsgs.ClientState\",\"components\":[{\"name\":\"chainId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"trustLevel\",\"type\":\"tuple\",\"internalType\":\"structIICS07TendermintMsgs.TrustThreshold\",\"components\":[{\"name\":\"numerator\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"denominator\",\"type\":\"uint8\",\"internalType\":\"uint8\"}]},{\"name\":\"latestHeight\",\"type\":\"tuple\",\"internalType\":\"structIICS02ClientMsgs.Height\",\"components\":[{\"name\":\"revisionNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"revisionHeight\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"trustingPeriod\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"unbondingPeriod\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"isFrozen\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"zkAlgorithm\",\"type\":\"uint8\",\"internalType\":\"enumISP1Msgs.SupportedZkAlgorithm\"}]},{\"name\":\"trustedConsensusState\",\"type\":\"tuple\",\"internalType\":\"structIICS07TendermintMsgs.ConsensusState\",\"components\":[{\"name\":\"timestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"root\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"nextValidatorsHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"name\":\"newConsensusState\",\"type\":\"tuple\",\"internalType\":\"structIICS07TendermintMsgs.ConsensusState\",\"components\":[{\"name\":\"timestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"root\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"nextValidatorsHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"name\":\"time\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"trustedHeight\",\"type\":\"tuple\",\"internalType\":\"structIICS02ClientMsgs.Height\",\"components\":[{\"name\":\"revisionNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"revisionHeight\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"newHeight\",\"type\":\"tuple\",\"internalType\":\"structIICS02ClientMsgs.Height\",\"components\":[{\"name\":\"revisionNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"revisionHeight\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]}]},{\"name\":\"kvPairs\",\"type\":\"tuple[]\",\"internalType\":\"structIMembershipMsgs.KVPair[]\",\"components\":[{\"name\":\"path\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"value\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}]},{\"name\":\"o3\",\"type\":\"tuple\",\"internalType\":\"structIUpdateClientMsgs.MsgUpdateClient\",\"components\":[{\"name\":\"sp1Proof\",\"type\":\"tuple\",\"internalType\":\"structISP1Msgs.SP1Proof\",\"components\":[{\"name\":\"vKey\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"publicValues\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proof\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}]},{\"name\":\"o4\",\"type\":\"tuple\",\"internalType\":\"structIMembershipMsgs.MembershipProof\",\"components\":[{\"name\":\"proofType\",\"type\":\"uint8\",\"internalType\":\"enumIMembershipMsgs.MembershipProofType\"},{\"name\":\"proof\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"o5\",\"type\":\"tuple\",\"internalType\":\"structIMembershipMsgs.SP1MembershipProof\",\"components\":[{\"name\":\"sp1Proof\",\"type\":\"tuple\",\"internalType\":\"structISP1Msgs.SP1Proof\",\"components\":[{\"name\":\"vKey\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"publicValues\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proof\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"name\":\"trustedConsensusState\",\"type\":\"tuple\",\"internalType\":\"structIICS07TendermintMsgs.ConsensusState\",\"components\":[{\"name\":\"timestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"root\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"nextValidatorsHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]}]},{\"name\":\"o6\",\"type\":\"tuple\",\"internalType\":\"structIMembershipMsgs.SP1MembershipAndUpdateClientProof\",\"components\":[{\"name\":\"sp1Proof\",\"type\":\"tuple\",\"internalType\":\"structISP1Msgs.SP1Proof\",\"components\":[{\"name\":\"vKey\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"publicValues\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proof\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}]},{\"name\":\"o7\",\"type\":\"tuple\",\"internalType\":\"structIMisbehaviourMsgs.MisbehaviourOutput\",\"components\":[{\"name\":\"clientState\",\"type\":\"tuple\",\"internalType\":\"structIICS07TendermintMsgs.ClientState\",\"components\":[{\"name\":\"chainId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"trustLevel\",\"type\":\"tuple\",\"internalType\":\"structIICS07TendermintMsgs.TrustThreshold\",\"components\":[{\"name\":\"numerator\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"denominator\",\"type\":\"uint8\",\"internalType\":\"uint8\"}]},{\"name\":\"latestHeight\",\"type\":\"tuple\",\"internalType\":\"structIICS02ClientMsgs.Height\",\"components\":[{\"name\":\"revisionNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"revisionHeight\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"trustingPeriod\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"unbondingPeriod\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"isFrozen\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"zkAlgorithm\",\"type\":\"uint8\",\"internalType\":\"enumISP1Msgs.SupportedZkAlgorithm\"}]},{\"name\":\"time\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"trustedHeight1\",\"type\":\"tuple\",\"internalType\":\"structIICS02ClientMsgs.Height\",\"components\":[{\"name\":\"revisionNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"revisionHeight\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"trustedHeight2\",\"type\":\"tuple\",\"internalType\":\"structIICS02ClientMsgs.Height\",\"components\":[{\"name\":\"revisionNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"revisionHeight\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"trustedConsensusState1\",\"type\":\"tuple\",\"internalType\":\"structIICS07TendermintMsgs.ConsensusState\",\"components\":[{\"name\":\"timestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"root\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"nextValidatorsHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"name\":\"trustedConsensusState2\",\"type\":\"tuple\",\"internalType\":\"structIICS07TendermintMsgs.ConsensusState\",\"components\":[{\"name\":\"timestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"root\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"nextValidatorsHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]}]},{\"name\":\"o8\",\"type\":\"tuple\",\"internalType\":\"structIMisbehaviourMsgs.MsgSubmitMisbehaviour\",\"components\":[{\"name\":\"sp1Proof\",\"type\":\"tuple\",\"internalType\":\"structISP1Msgs.SP1Proof\",\"components\":[{\"name\":\"vKey\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"publicValues\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proof\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}]},{\"name\":\"o9\",\"type\":\"tuple\",\"internalType\":\"structIMembershipMsgs.UnionMembershipProof\",\"components\":[{\"name\":\"ics23Proof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"trustedConsensusState\",\"type\":\"tuple\",\"internalType\":\"structIICS07TendermintMsgs.ConsensusState\",\"components\":[{\"name\":\"timestamp\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"root\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"nextValidatorsHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]}]}],\"outputs\":[],\"stateMutability\":\"pure\"},{\"type\":\"function\",\"name\":\"getClientState\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"tuple\",\"internalType\":\"structIICS07TendermintMsgs.ClientState\",\"components\":[{\"name\":\"chainId\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"trustLevel\",\"type\":\"tuple\",\"internalType\":\"structIICS07TendermintMsgs.TrustThreshold\",\"components\":[{\"name\":\"numerator\",\"type\":\"uint8\",\"internalType\":\"uint8\"},{\"name\":\"denominator\",\"type\":\"uint8\",\"internalType\":\"uint8\"}]},{\"name\":\"latestHeight\",\"type\":\"tuple\",\"internalType\":\"structIICS02ClientMsgs.Height\",\"components\":[{\"name\":\"revisionNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"revisionHeight\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"trustingPeriod\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"unbondingPeriod\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"isFrozen\",\"type\":\"bool\",\"internalType\":\"bool\"},{\"name\":\"zkAlgorithm\",\"type\":\"uint8\",\"internalType\":\"enumISP1Msgs.SupportedZkAlgorithm\"}]}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getConsensusStateHash\",\"inputs\":[{\"name\":\"revisionHeight\",\"type\":\"uint32\",\"internalType\":\"uint32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"handleUnionMembershipProof\",\"inputs\":[{\"name\":\"proofHeight\",\"type\":\"tuple\",\"internalType\":\"structIICS02ClientMsgs.Height\",\"components\":[{\"name\":\"revisionNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"revisionHeight\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"proofBytes\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"kvPath\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"kvValue\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"membership\",\"inputs\":[{\"name\":\"msgMembership\",\"type\":\"tuple\",\"internalType\":\"structILightClientMsgs.MsgMembership\",\"components\":[{\"name\":\"proof\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"proofHeight\",\"type\":\"tuple\",\"internalType\":\"structIICS02ClientMsgs.Height\",\"components\":[{\"name\":\"revisionNumber\",\"type\":\"uint32\",\"internalType\":\"uint32\"},{\"name\":\"revisionHeight\",\"type\":\"uint32\",\"internalType\":\"uint32\"}]},{\"name\":\"path\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"value\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[{\"name\":\"timestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"misbehaviour\",\"inputs\":[{\"name\":\"misbehaviourMsg\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"multicall\",\"inputs\":[{\"name\":\"data\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"}],\"outputs\":[{\"name\":\"results\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"updateClient\",\"inputs\":[{\"name\":\"updateMsg\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"enumILightClientMsgs.UpdateResult\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"upgradeClient\",\"inputs\":[{\"name\":\"\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"pure\"},{\"type\":\"error\",\"name\":\"AddressEmptyCode\",\"inputs\":[{\"name\":\"target\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"CannotHandleMisbehavior\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ChainIdMismatch\",\"inputs\":[{\"name\":\"expected\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"actual\",\"type\":\"string\",\"internalType\":\"string\"}]},{\"type\":\"error\",\"name\":\"ClientStateMismatch\",\"inputs\":[{\"name\":\"expected\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"actual\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"type\":\"error\",\"name\":\"ConsensusStateHashMismatch\",\"inputs\":[{\"name\":\"expected\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"actual\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"type\":\"error\",\"name\":\"ConsensusStateNotFound\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ConsensusStateRootMismatch\",\"inputs\":[{\"name\":\"expected\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"actual\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"type\":\"error\",\"name\":\"FailedCall\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"FeatureNotSupported\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"FrozenClientState\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidMembershipProof\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"KeyValuePairNotInCache\",\"inputs\":[{\"name\":\"path\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"},{\"name\":\"value\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"type\":\"error\",\"name\":\"LengthIsOutOfRange\",\"inputs\":[{\"name\":\"length\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"min\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"max\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"MembershipProofKeyNotFound\",\"inputs\":[{\"name\":\"path\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"}]},{\"type\":\"error\",\"name\":\"MembershipProofValueMismatch\",\"inputs\":[{\"name\":\"expected\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"actual\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]},{\"type\":\"error\",\"name\":\"ProofHeightMismatch\",\"inputs\":[{\"name\":\"expectedRevisionNumber\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"expectedRevisionHeight\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"actualRevisionNumber\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"actualRevisionHeight\",\"type\":\"uint64\",\"internalType\":\"uint64\"}]},{\"type\":\"error\",\"name\":\"ProofIsInTheFuture\",\"inputs\":[{\"name\":\"now\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"proofTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"ProofIsTooOld\",\"inputs\":[{\"name\":\"now\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"proofTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"TrustThresholdMismatch\",\"inputs\":[{\"name\":\"expectedNumerator\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expectedDenominator\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"actualNumerator\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"actualDenominator\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"TrustingPeriodMismatch\",\"inputs\":[{\"name\":\"expected\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"actual\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"TrustingPeriodTooLong\",\"inputs\":[{\"name\":\"trustingPeriod\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"unbondingPeriod\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"UnbondingPeriodMismatch\",\"inputs\":[{\"name\":\"expected\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"actual\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"UnknownMembershipProofType\",\"inputs\":[{\"name\":\"proofType\",\"type\":\"uint8\",\"internalType\":\"uint8\"}]},{\"type\":\"error\",\"name\":\"UnknownZkAlgorithm\",\"inputs\":[{\"name\":\"algorithm\",\"type\":\"uint8\",\"internalType\":\"uint8\"}]},{\"type\":\"error\",\"name\":\"VerificationKeyMismatch\",\"inputs\":[{\"name\":\"expected\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"actual\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]}]", } // ContractABI is the input ABI used to generate the binding from. @@ -675,6 +675,27 @@ func (_Contract *ContractTransactorSession) Misbehaviour(misbehaviourMsg []byte) return _Contract.Contract.Misbehaviour(&_Contract.TransactOpts, misbehaviourMsg) } +// Multicall is a paid mutator transaction binding the contract method 0xac9650d8. +// +// Solidity: function multicall(bytes[] data) returns(bytes[] results) +func (_Contract *ContractTransactor) Multicall(opts *bind.TransactOpts, data [][]byte) (*types.Transaction, error) { + return _Contract.contract.Transact(opts, "multicall", data) +} + +// Multicall is a paid mutator transaction binding the contract method 0xac9650d8. +// +// Solidity: function multicall(bytes[] data) returns(bytes[] results) +func (_Contract *ContractSession) Multicall(data [][]byte) (*types.Transaction, error) { + return _Contract.Contract.Multicall(&_Contract.TransactOpts, data) +} + +// Multicall is a paid mutator transaction binding the contract method 0xac9650d8. +// +// Solidity: function multicall(bytes[] data) returns(bytes[] results) +func (_Contract *ContractTransactorSession) Multicall(data [][]byte) (*types.Transaction, error) { + return _Contract.Contract.Multicall(&_Contract.TransactOpts, data) +} + // UpdateClient is a paid mutator transaction binding the contract method 0x0bece356. // // Solidity: function updateClient(bytes updateMsg) returns(uint8) diff --git a/foundry.toml b/foundry.toml index 5db627c..53ccfa9 100644 --- a/foundry.toml +++ b/foundry.toml @@ -10,6 +10,7 @@ fs_permissions = [{ access = "read-write", path = "./" },] via_ir = true no_match_path = "node_modules/**/test/**" solc = "0.8.28" +evm_version = "cancun" [fmt] bracket_spacing = true diff --git a/justfile b/justfile index 4cdefb6..43686cc 100644 --- a/justfile +++ b/justfile @@ -65,6 +65,8 @@ fixtures: build-operator "sleep 100 && RUST_LOG=info SP1_PROVER=network ./target/release/operator fixtures membership --key-paths clients/07-tendermint-0/clientState,clients/07-tendermint-001/clientState --trusted-block $TRUSTED_HEIGHT -p groth16 -o 'contracts/fixtures/memberships_fixture-groth16.json'" cd e2e/interchaintestv8 && RUST_LOG=info SP1_PROVER=network GENERATE_FIXTURES=true go test -v -run '^TestWithSP1ICS07TendermintTestSuite/TestDoubleSignMisbehaviour_Plonk$' -timeout 40m cd e2e/interchaintestv8 && RUST_LOG=info SP1_PROVER=network GENERATE_FIXTURES=true go test -v -run '^TestWithSP1ICS07TendermintTestSuite/TestBreakingTimeMonotonicityMisbehaviour_Groth16' -timeout 40m + cd e2e/interchaintestv8 && RUST_LOG=info SP1_PROVER=network GENERATE_FIXTURES=true go test -v -run '^TestWithSP1ICS07TendermintTestSuite/Test100Membership_Groth16' -timeout 40m + cd e2e/interchaintestv8 && RUST_LOG=info SP1_PROVER=network GENERATE_FIXTURES=true go test -v -run '^TestWithSP1ICS07TendermintTestSuite/Test25Membership_Plonk' -timeout 40m @echo "Fixtures generated at 'contracts/fixtures'" # Generate the `SP1ICS07Tendermint.json` file containing the ABI of the SP1ICS07Tendermint contract