diff --git a/.gitignore b/.gitignore index ed591a0..c7ced04 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,10 @@ pgo-data.profdata # MacOS nuisances .DS_Store +# IDE files +.idea/ +*.iml + # Proofs **/proof-with-pis.json **/proof-with-io.json diff --git a/contracts/fixtures/memberships_fixture.json b/contracts/fixtures/memberships_fixture.json index 7f1c337..6a541a8 100644 --- a/contracts/fixtures/memberships_fixture.json +++ b/contracts/fixtures/memberships_fixture.json @@ -1,12 +1,12 @@ { - "proofHeight": 2230264, - "trustedClientState": "0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000002207f800000000000000000000000000000000000000000000000000000000001baf8000000000000000000000000000000000000000000000000000000000001baf80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000076d6f6368612d3400000000000000000000000000000000000000000000000000", - "trustedConsensusState": "00000000000000000000000000000000000000000000000000000000668df173c7656d84561185b88f82507efaa6d578b46ebe5010c0d37de05109254d2f9ff1b655d16f9452ed96e4d7cf8143e927a1e0d9ff1e1d315f134f2ad6b798b35ce0", - "commitmentRoot": "c7656d84561185b88f82507efaa6d578b46ebe5010c0d37de05109254d2f9ff1", - "updateClientVkey": "0x00dccbd5282da6b04c730721f21b40fee41302d148eb16d1aede6632224a1874", - "membershipVkey": "0x0083f60b9a6e2c5eecbeec4d63514073ea981defcaa39e4a06339152067fa699", - "ucAndMembershipVkey": "0x0071a54676e22f1e088807fe801e79f2d419a1f48242e764b244a1683bf6a02a", - "publicValues": "0x0000000000000000000000000000000000000000000000000000000000000020c7656d84561185b88f82507efaa6d578b46ebe5010c0d37de05109254d2f9ff100000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000023636c69656e74732f30372d74656e6465726d696e742d302f636c69656e745374617465000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b70a2b2f6962632e6c69676874636c69656e74732e74656e6465726d696e742e76312e436c69656e7453746174651287010a1174686574612d746573746e65742d3030311204080110031a040880840722040880c60a2a02082832003a0510b7e3c60842190a090801180120012a0100120c0a02000110211804200c300142190a090801180120012a0100120c0a02000110201801200130014a07757067726164654a107570677261646564494243537461746550015801000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000025636c69656e74732f30372d74656e6465726d696e742d3030312f636c69656e7453746174650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "proof": "0xfedc1fcc0d7ce7cded093ee9ea239b40a14d94d862c98581a515584f993201fddd76b61003c363fcdccd6bd357cab083e3e967f7d37acf1383608ffbe5296e0b3c1cd41006b44efd613ced41440446f2acff6063b1508656848e15f509485bc383809c4826351b46edaf232b4b44a04eb29b0551c012a37efde7989f5d496ee9fb3d43410b17ecd1e1f81163fefcbba1afe0705ba3fa3f0fbfcda32a1423abdb608041a52f8afb70b2056ea04efe5d0e47c51ae03dff3c02790cf199c843298525f73bfc1519b1efdd55b1c4527fc95c2005ee517099ad4e4f75446ff224b31bd05483ba0fcb63ef34d1a8130a73af17d358c76381a06f44e06c36232d00f719b78f9aa00fd74d520a84cd2a2e865ebb98cd0c7d6719c3f1c3a04181f0f4b64e127c74390147594b132eb6cec4953da49baa5caa59e809f55d840cb450a7df53e5397c0726c0585e8f23c9ba98fb42670260fd6b8727c6e82cf3d1d718399eec621f8f970461de49dd59f99f2953aecd0be123f0b8ad087b68ba7aa7253a2f13f1c61a5b0fddd966840c6d7327e6428a9464aec9c4b0ddaf1ea7d207d8ae2cf0308bf0e920b2e4c0d381cadcddf10a83a73d1b712cb36d2056c7e26fec17d1046dd5f6fc19a4282115b13046cb032f9400e0ebf6ea935ec02dde17f8c1b83f04bf20d55f0e1c268a7aec8efccd3437351dfaa4e949257f90874c6ea20c6b869b0cb4860512bd2f331d1ca86b7f43855e565d55cad6a19553c7462f585aff8feeaf7a34041188c73c10bd6f54581a34c7568a1fc0ad23986c093ffc2cd551429f3d034a110a586174300baf80f4cbb5f99179d059520e31db66667a27f0ae32f1ddb7acbe1d3b88813d31f33e4dba96b9f2e4b95194825f54d9e5dbb5d0f7a0c751b8b20e0665fdbbe0def677bef9aab811ce863c7072aa5a0b974b72448cd1eebe0cd13a2ec7085201dc1b5b91567e1250e7ca10dc5f6534c0b5e485f5fcb2a2fdb97a6c26fa6f3bfd0cd0f2597402c306e3cc893eded6576efdc30474d738664ecf042124925db8bb6445832f77fb3e7bf3f0dc9f68c810300c9127957513bbe0efef3609ada795538a83288d4880deabf69dfcbd0ecdb709f552c18dc29b631d15f0e81095be7244df9aa4ea6dc303c394bf3c700ecb7e289aa4a7488f98b76dc8332b225bd0d3ba2da065e98a237a8505ce8c07f3bc45c6656e3f674ddbfffa4370b6", + "proofHeight": 2330000, + "trustedClientState": "000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000238d90000000000000000000000000000000000000000000000000000000000012750000000000000000000000000000000000000000000000000000000000001baf80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000076d6f6368612d3400000000000000000000000000000000000000000000000000", + "trustedConsensusState": "0000000000000000000000000000000000000000000000000000000066a03c102bab132312afa95add5dec8f90e2fdc48085e7494ca6d39ee9431ff434e22775e0373a8b805881ecdbb47fce30b66956aa13e9a573107ba9ac495b9cef3365d3", + "commitmentRoot": "2bab132312afa95add5dec8f90e2fdc48085e7494ca6d39ee9431ff434e22775", + "updateClientVkey": "0x00b8a6a2873e2eb2b0456023e69672caf877239e7c1f1b77cb84e7eb748af3eb", + "membershipVkey": "0x005dee562962534ba45f120968c2e0eaa59ace5404e49252264f9f3699edad82", + "ucAndMembershipVkey": "0x00dc223d082fda575a3950f0cf145ac567f7e479a44513e79a76f5f5529233a0", + "publicValues": "0x00000000000000000000000000000000000000000000000000000000000000202bab132312afa95add5dec8f90e2fdc48085e7494ca6d39ee9431ff434e2277500000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000023636c69656e74732f30372d74656e6465726d696e742d302f636c69656e745374617465000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b70a2b2f6962632e6c69676874636c69656e74732e74656e6465726d696e742e76312e436c69656e7453746174651287010a1174686574612d746573746e65742d3030311204080110031a040880840722040880c60a2a02082832003a0510b7e3c60842190a090801180120012a0100120c0a02000110211804200c300142190a090801180120012a0100120c0a02000110201801200130014a07757067726164654a107570677261646564494243537461746550015801000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000025636c69656e74732f30372d74656e6465726d696e742d3030312f636c69656e7453746174650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "proof": "0xfedc1fcc2f7106806a2388f5fad021402976c5eaa2d33cacf0c01464140e1fbab0cdb5c212a6301c2afea26ffe31aecdd06a6a73692c4b5fe89b41c03882658d66f8fdce022040e51c6b1dcbfc6ab33ad21fdb5bbe9eace383578d5208d25555fffffb7727f20a4d7a38c1408de8cd2b96af70b1c3cc1ea1a25d20c510f1735b09b5a34b16c4f390ef1d31c31645d81f29f70752457c5cf572c897c21bb2f19434c0a00629da202ce9cf3e1dca24ff59899b80ccc55cdbe30c3fd67f8ed6cdd7529e5624211fe33f4c27a76e02f8cf4c04eac4097fd85e6c0f55ac61a96c77df982f738003500e106ad7e9008ef56c97e825fc99de6916df0f8baf1583dd8e77558438e321ce184b2123847adf6ce4f5b3570182bda369b7c29549b75adf09d0d8e2d486021d02f7c42733a3edb25aabc0bf237518da54548922f3dffc7a1ba9f9d8cce82c4b8e1913f97dc55fbad60d7330476fcf3542c328b25ac29c9156d2701a45b4296e7a70480ca56b320eecf3b3ec55f5033bea418753c479dce2fb60bd7ae4fb19466da70b7990c4a9c830bec94fc846e266128353a29c249f793ad108433704103a3391f038004ad80f2d4c6b0af9027778cf82260bfd7ad16ccfb33cb6165a0b4ed97b31a1d50f648c8c3931aa280204ee2bdc5db1cbca11b0fa8d5659e3442ddddf649b8ad9f27a0281e37a80d680eb253a7f03335aebe42117aea1aab8ce0dd7615312f4314de60b011c494ec4fa1c170322cac312ab98694c23317f6ccc26aace6ffc5327875ae4e9c566e6a00a98d81b0139f890400f8de89ee5f0ca030b1c0ac225569668a86f153af7b119b2b9fd9ed0a41dd83eb13d48b37eaa33361f3cc82b47e4502b79a2aa20b8f29c50c6fce5949e7d160b90a5c6af70bc85af1947df96d71ab3a1aeeca5e872d3b9228a4dd0019eaa4ce532db0ebf2025385f166c3e299968d5cfc258951ffb520e36b4f64eeecfda875f34af258b014ada4c17338aea3c87d89aa712620aead4d4bb78038b9d7a693bc9d5480e7633c9053c2a572bfc3892e30c2ef3f6aa2ac4542b517d4be9c176655c9962824ab445b73d046df05b70a07f7f35e57bbb40eac40a345cf41fd369643382dbf31efc250e432be1fe67399db3efe3326c8c7efe07528a6bebee99d2f92992e6416613f1c8ae1f19cc6d872571c585c7ae95d3117e2e5b9c8c2fbf5fa722a8c900e9e7e47460", "kvPairs": "00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000023636c69656e74732f30372d74656e6465726d696e742d302f636c69656e745374617465000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b70a2b2f6962632e6c69676874636c69656e74732e74656e6465726d696e742e76312e436c69656e7453746174651287010a1174686574612d746573746e65742d3030311204080110031a040880840722040880c60a2a02082832003a0510b7e3c60842190a090801180120012a0100120c0a02000110211804200c300142190a090801180120012a0100120c0a02000110201801200130014a07757067726164654a107570677261646564494243537461746550015801000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000025636c69656e74732f30372d74656e6465726d696e742d3030312f636c69656e7453746174650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" } \ No newline at end of file diff --git a/contracts/fixtures/mock_uc_and_memberships_fixture.json b/contracts/fixtures/mock_uc_and_memberships_fixture.json index fa8e34e..eccb772 100644 --- a/contracts/fixtures/mock_uc_and_memberships_fixture.json +++ b/contracts/fixtures/mock_uc_and_memberships_fixture.json @@ -1,12 +1,12 @@ { - "trustedClientState": "0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000002207f800000000000000000000000000000000000000000000000000000000001baf8000000000000000000000000000000000000000000000000000000000001baf80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000076d6f6368612d3400000000000000000000000000000000000000000000000000", - "trustedConsensusState": "00000000000000000000000000000000000000000000000000000000668df173c7656d84561185b88f82507efaa6d578b46ebe5010c0d37de05109254d2f9ff1b655d16f9452ed96e4d7cf8143e927a1e0d9ff1e1d315f134f2ad6b798b35ce0", - "targetConsensusState": "00000000000000000000000000000000000000000000000000000000668df1ea6a10b1857c778e02df342a0471476f44bc80e94e6e53e73e33b4e2bf94261150b655d16f9452ed96e4d7cf8143e927a1e0d9ff1e1d315f134f2ad6b798b35ce0", - "targetHeight": 2230274, - "updateClientVkey": "0x00dccbd5282da6b04c730721f21b40fee41302d148eb16d1aede6632224a1874", - "membershipVkey": "0x0083f60b9a6e2c5eecbeec4d63514073ea981defcaa39e4a06339152067fa699", - "ucAndMembershipVkey": "0x0071a54676e22f1e088807fe801e79f2d419a1f48242e764b244a1683bf6a02a", - "publicValues": "0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000028000000000000000000000000000000000000000000000000000000000668df173c7656d84561185b88f82507efaa6d578b46ebe5010c0d37de05109254d2f9ff1b655d16f9452ed96e4d7cf8143e927a1e0d9ff1e1d315f134f2ad6b798b35ce000000000000000000000000000000000000000000000000000000000668df1ea6a10b1857c778e02df342a0471476f44bc80e94e6e53e73e33b4e2bf94261150b655d16f9452ed96e4d7cf8143e927a1e0d9ff1e1d315f134f2ad6b798b35ce00000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000002207f80000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000022080200000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000001baf8000000000000000000000000000000000000000000000000000000000669f3f6000000000000000000000000000000000000000000000000000000000000000076d6f6368612d34000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000023636c69656e74732f30372d74656e6465726d696e742d302f636c69656e745374617465000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b70a2b2f6962632e6c69676874636c69656e74732e74656e6465726d696e742e76312e436c69656e7453746174651287010a1174686574612d746573746e65742d3030311204080110031a040880840722040880c60a2a02082832003a0510b7e3c60842190a090801180120012a0100120c0a02000110211804200c300142190a090801180120012a0100120c0a02000110201801200130014a07757067726164654a107570677261646564494243537461746550015801000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000025636c69656e74732f30372d74656e6465726d696e742d3030312f636c69656e7453746174650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "trustedClientState": "000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000238d90000000000000000000000000000000000000000000000000000000000012750000000000000000000000000000000000000000000000000000000000001baf80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000076d6f6368612d3400000000000000000000000000000000000000000000000000", + "trustedConsensusState": "0000000000000000000000000000000000000000000000000000000066a03c102bab132312afa95add5dec8f90e2fdc48085e7494ca6d39ee9431ff434e22775e0373a8b805881ecdbb47fce30b66956aa13e9a573107ba9ac495b9cef3365d3", + "targetConsensusState": "0000000000000000000000000000000000000000000000000000000066a03c8ace271cd333ff2f0cd166fe30bcd67431aca0d94c5c8ed0079a30761311bbd3a2e0373a8b805881ecdbb47fce30b66956aa13e9a573107ba9ac495b9cef3365d3", + "targetHeight": 2330010, + "updateClientVkey": "0x00b063f9e7801cf716517d15f440ca4ed60ec44ee399f7581720abba843470e6", + "membershipVkey": "0x00cbb765f4e3196e7322a30d7963d330e3fe67eb1904b977e0cb92bb11c31e9e", + "ucAndMembershipVkey": "0x001fd7cbd018123bee2ec2dcfa2f12355138ff29bb9b68840a25026a94c46c4f", + "publicValues": "0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000002800000000000000000000000000000000000000000000000000000000066a03c102bab132312afa95add5dec8f90e2fdc48085e7494ca6d39ee9431ff434e22775e0373a8b805881ecdbb47fce30b66956aa13e9a573107ba9ac495b9cef3365d30000000000000000000000000000000000000000000000000000000066a03c8ace271cd333ff2f0cd166fe30bcd67431aca0d94c5c8ed0079a30761311bbd3a2e0373a8b805881ecdbb47fce30b66956aa13e9a573107ba9ac495b9cef3365d3000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000238d9000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000238d9a00000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000001275000000000000000000000000000000000000000000000000000000000066a0c8a000000000000000000000000000000000000000000000000000000000000000076d6f6368612d34000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000023636c69656e74732f30372d74656e6465726d696e742d302f636c69656e745374617465000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b70a2b2f6962632e6c69676874636c69656e74732e74656e6465726d696e742e76312e436c69656e7453746174651287010a1174686574612d746573746e65742d3030311204080110031a040880840722040880c60a2a02082832003a0510b7e3c60842190a090801180120012a0100120c0a02000110211804200c300142190a090801180120012a0100120c0a02000110201801200130014a07757067726164654a107570677261646564494243537461746550015801000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000025636c69656e74732f30372d74656e6465726d696e742d3030312f636c69656e7453746174650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "proof": "0x00000000", "kvPairs": "00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000023636c69656e74732f30372d74656e6465726d696e742d302f636c69656e745374617465000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b70a2b2f6962632e6c69676874636c69656e74732e74656e6465726d696e742e76312e436c69656e7453746174651287010a1174686574612d746573746e65742d3030311204080110031a040880840722040880c60a2a02082832003a0510b7e3c60842190a090801180120012a0100120c0a02000110211804200c300142190a090801180120012a0100120c0a02000110201801200130014a07757067726164654a107570677261646564494243537461746550015801000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000025636c69656e74732f30372d74656e6465726d696e742d3030312f636c69656e7453746174650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" } \ No newline at end of file diff --git a/contracts/fixtures/mock_update_client_fixture.json b/contracts/fixtures/mock_update_client_fixture.json index 033c1f5..328bbe4 100644 --- a/contracts/fixtures/mock_update_client_fixture.json +++ b/contracts/fixtures/mock_update_client_fixture.json @@ -1,11 +1,11 @@ { - "trustedClientState": "0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000002207f800000000000000000000000000000000000000000000000000000000001baf8000000000000000000000000000000000000000000000000000000000001baf80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000076d6f6368612d3400000000000000000000000000000000000000000000000000", - "trustedConsensusState": "00000000000000000000000000000000000000000000000000000000668df173c7656d84561185b88f82507efaa6d578b46ebe5010c0d37de05109254d2f9ff1b655d16f9452ed96e4d7cf8143e927a1e0d9ff1e1d315f134f2ad6b798b35ce0", - "targetConsensusState": "00000000000000000000000000000000000000000000000000000000668df1ea6a10b1857c778e02df342a0471476f44bc80e94e6e53e73e33b4e2bf94261150b655d16f9452ed96e4d7cf8143e927a1e0d9ff1e1d315f134f2ad6b798b35ce0", - "targetHeight": 2230274, - "updateClientVkey": "0x00dccbd5282da6b04c730721f21b40fee41302d148eb16d1aede6632224a1874", - "membershipVkey": "0x0083f60b9a6e2c5eecbeec4d63514073ea981defcaa39e4a06339152067fa699", - "ucAndMembershipVkey": "0x0071a54676e22f1e088807fe801e79f2d419a1f48242e764b244a1683bf6a02a", - "publicValues": "0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000668df173c7656d84561185b88f82507efaa6d578b46ebe5010c0d37de05109254d2f9ff1b655d16f9452ed96e4d7cf8143e927a1e0d9ff1e1d315f134f2ad6b798b35ce000000000000000000000000000000000000000000000000000000000668df1ea6a10b1857c778e02df342a0471476f44bc80e94e6e53e73e33b4e2bf94261150b655d16f9452ed96e4d7cf8143e927a1e0d9ff1e1d315f134f2ad6b798b35ce00000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000002207f80000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000022080200000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000001baf8000000000000000000000000000000000000000000000000000000000669f3f6000000000000000000000000000000000000000000000000000000000000000076d6f6368612d3400000000000000000000000000000000000000000000000000", + "trustedClientState": "000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000238d90000000000000000000000000000000000000000000000000000000000012750000000000000000000000000000000000000000000000000000000000001baf80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000076d6f6368612d3400000000000000000000000000000000000000000000000000", + "trustedConsensusState": "0000000000000000000000000000000000000000000000000000000066a03c102bab132312afa95add5dec8f90e2fdc48085e7494ca6d39ee9431ff434e22775e0373a8b805881ecdbb47fce30b66956aa13e9a573107ba9ac495b9cef3365d3", + "targetConsensusState": "0000000000000000000000000000000000000000000000000000000066a03c8ace271cd333ff2f0cd166fe30bcd67431aca0d94c5c8ed0079a30761311bbd3a2e0373a8b805881ecdbb47fce30b66956aa13e9a573107ba9ac495b9cef3365d3", + "targetHeight": 2330010, + "updateClientVkey": "0x00b063f9e7801cf716517d15f440ca4ed60ec44ee399f7581720abba843470e6", + "membershipVkey": "0x00cbb765f4e3196e7322a30d7963d330e3fe67eb1904b977e0cb92bb11c31e9e", + "ucAndMembershipVkey": "0x001fd7cbd018123bee2ec2dcfa2f12355138ff29bb9b68840a25026a94c46c4f", + "publicValues": "0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000066a03c102bab132312afa95add5dec8f90e2fdc48085e7494ca6d39ee9431ff434e22775e0373a8b805881ecdbb47fce30b66956aa13e9a573107ba9ac495b9cef3365d30000000000000000000000000000000000000000000000000000000066a03c8ace271cd333ff2f0cd166fe30bcd67431aca0d94c5c8ed0079a30761311bbd3a2e0373a8b805881ecdbb47fce30b66956aa13e9a573107ba9ac495b9cef3365d3000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000238d9000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000238d9a00000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000001275000000000000000000000000000000000000000000000000000000000066a0c89100000000000000000000000000000000000000000000000000000000000000076d6f6368612d3400000000000000000000000000000000000000000000000000", "proof": "0x00000000" } \ No newline at end of file diff --git a/contracts/fixtures/uc_and_memberships_fixture.json b/contracts/fixtures/uc_and_memberships_fixture.json index b99f8fe..3649327 100644 --- a/contracts/fixtures/uc_and_memberships_fixture.json +++ b/contracts/fixtures/uc_and_memberships_fixture.json @@ -1,12 +1,12 @@ { - "trustedClientState": "0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000002207f800000000000000000000000000000000000000000000000000000000001baf8000000000000000000000000000000000000000000000000000000000001baf80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000076d6f6368612d3400000000000000000000000000000000000000000000000000", - "trustedConsensusState": "00000000000000000000000000000000000000000000000000000000668df173c7656d84561185b88f82507efaa6d578b46ebe5010c0d37de05109254d2f9ff1b655d16f9452ed96e4d7cf8143e927a1e0d9ff1e1d315f134f2ad6b798b35ce0", - "targetConsensusState": "00000000000000000000000000000000000000000000000000000000668df1ea6a10b1857c778e02df342a0471476f44bc80e94e6e53e73e33b4e2bf94261150b655d16f9452ed96e4d7cf8143e927a1e0d9ff1e1d315f134f2ad6b798b35ce0", - "targetHeight": 2230274, - "updateClientVkey": "0x00dccbd5282da6b04c730721f21b40fee41302d148eb16d1aede6632224a1874", - "membershipVkey": "0x0083f60b9a6e2c5eecbeec4d63514073ea981defcaa39e4a06339152067fa699", - "ucAndMembershipVkey": "0x0071a54676e22f1e088807fe801e79f2d419a1f48242e764b244a1683bf6a02a", - "publicValues": "0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000028000000000000000000000000000000000000000000000000000000000668df173c7656d84561185b88f82507efaa6d578b46ebe5010c0d37de05109254d2f9ff1b655d16f9452ed96e4d7cf8143e927a1e0d9ff1e1d315f134f2ad6b798b35ce000000000000000000000000000000000000000000000000000000000668df1ea6a10b1857c778e02df342a0471476f44bc80e94e6e53e73e33b4e2bf94261150b655d16f9452ed96e4d7cf8143e927a1e0d9ff1e1d315f134f2ad6b798b35ce00000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000002207f80000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000022080200000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000001baf8000000000000000000000000000000000000000000000000000000000669f466100000000000000000000000000000000000000000000000000000000000000076d6f6368612d34000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000023636c69656e74732f30372d74656e6465726d696e742d302f636c69656e745374617465000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b70a2b2f6962632e6c69676874636c69656e74732e74656e6465726d696e742e76312e436c69656e7453746174651287010a1174686574612d746573746e65742d3030311204080110031a040880840722040880c60a2a02082832003a0510b7e3c60842190a090801180120012a0100120c0a02000110211804200c300142190a090801180120012a0100120c0a02000110201801200130014a07757067726164654a107570677261646564494243537461746550015801000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000025636c69656e74732f30372d74656e6465726d696e742d3030312f636c69656e7453746174650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "proof": "0xfedc1fcc1963d6881003af8ad7da5a5c51216eb6ab2928997466902a824882315d496572115fdd3d44708bfbace1dace20df9c480b6e758b6de01c375540b49fe24c9c901d723428965ffb51c99b7bac768de5ce1678d248a6caa0842ecfe237f624dc9f0c39aecb7ba2c3229898d886520f29c43f65fa2de1b3dbdd11270fdb965605e12566898340accd1540d5a2ea2b56727e76ac65cd8ee2c0a48cbf5f1b70de83d01da4b41e0fb3fb0313bcb8cc4299975a2c3927aed5213ad0c7c9c9fb3094b4e82b47b408c91cea4b961843fbd6ddb8087b13ea23596f494e52df1567019c1e9517525491dd59b0458ab18cb0c37380d13a46664591601a10b9515b69b1f96a5008bbec8540c9283d1999f8e711dcb3adfa4acccc2a1e2d4a251dba1300fdb5bc0622fc8d21fca128cfad2eb09d63665184a95a176e2eee57551c5e3da2ae6e410d3a0edaa37a1a56d3c196015d5be3d304e0d226967ba86d68ff4d647028823204f1678319eb824a87bbc335e0d74d750473777ef95b84b25b9e8193aa7c8f4502ceeb792c025c91f475f63f516ca67b98d1ef53aea2d3a217ca36e3e94b0e2400357123040b8c963d68c73e1ec20fe9dc7e2834a17bdcfeb7b5add7671c8db4159c94d5b82184a8b4f15aa35febde7adb532d606f735e9ed7eecd5e5473ae4622af36b1feb880ee565ffbfe6cc1306421ed488e62dbff64cc127c22b03189232f2c1d6203b708bf086339102a4ed6a3d056247bf923c359872a29c9389b26362b534a83ec2fb7e605032c0be1cd9ad5d47fb387587396d8fa51429b9c4907d60902717685f997f63bb6ba31f2c1388d49eaafea21122c8a4ca6d8a632bf732420ad943ef89783d5dad57382412befc57ce1d602b2c387a7816a873bfefd68292e0eb9b8899daa5cda6d964afea484330f54fe71107929dde8194a141b44939f2dd6434e68fa34ef9236a2ac7802eed9a92fb0d2082422db5dcc1152eb2b859e2c9bf3c0bbd5f8f08137059079f749aa03888780ad8baf8089c358bcd155d8361605d25dd6e747016083232994029568451d40f8225a72d0d23c2b34ae1b0f9009986dc27bb8dedeb6aa3cfc95662fb16d9998c11ca16e0b8b16229dc4ac09342b2187f2b919ffd3f16ebc77187361adf07fb116a322d7f977efc54eafb55f2c0f086c324d4a37784b8b5629a5aa4e3048ecd5e79f7ecbac480e17381cbb73d9", + "trustedClientState": "000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000238d90000000000000000000000000000000000000000000000000000000000012750000000000000000000000000000000000000000000000000000000000001baf80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000076d6f6368612d3400000000000000000000000000000000000000000000000000", + "trustedConsensusState": "0000000000000000000000000000000000000000000000000000000066a03c102bab132312afa95add5dec8f90e2fdc48085e7494ca6d39ee9431ff434e22775e0373a8b805881ecdbb47fce30b66956aa13e9a573107ba9ac495b9cef3365d3", + "targetConsensusState": "0000000000000000000000000000000000000000000000000000000066a03c8ace271cd333ff2f0cd166fe30bcd67431aca0d94c5c8ed0079a30761311bbd3a2e0373a8b805881ecdbb47fce30b66956aa13e9a573107ba9ac495b9cef3365d3", + "targetHeight": 2330010, + "updateClientVkey": "0x00b8a6a2873e2eb2b0456023e69672caf877239e7c1f1b77cb84e7eb748af3eb", + "membershipVkey": "0x005dee562962534ba45f120968c2e0eaa59ace5404e49252264f9f3699edad82", + "ucAndMembershipVkey": "0x00dc223d082fda575a3950f0cf145ac567f7e479a44513e79a76f5f5529233a0", + "publicValues": "0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000002800000000000000000000000000000000000000000000000000000000066a03c102bab132312afa95add5dec8f90e2fdc48085e7494ca6d39ee9431ff434e22775e0373a8b805881ecdbb47fce30b66956aa13e9a573107ba9ac495b9cef3365d30000000000000000000000000000000000000000000000000000000066a03c8ace271cd333ff2f0cd166fe30bcd67431aca0d94c5c8ed0079a30761311bbd3a2e0373a8b805881ecdbb47fce30b66956aa13e9a573107ba9ac495b9cef3365d3000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000238d9000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000238d9a00000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000001275000000000000000000000000000000000000000000000000000000000066a23fa200000000000000000000000000000000000000000000000000000000000000076d6f6368612d34000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000023636c69656e74732f30372d74656e6465726d696e742d302f636c69656e745374617465000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b70a2b2f6962632e6c69676874636c69656e74732e74656e6465726d696e742e76312e436c69656e7453746174651287010a1174686574612d746573746e65742d3030311204080110031a040880840722040880c60a2a02082832003a0510b7e3c60842190a090801180120012a0100120c0a02000110211804200c300142190a090801180120012a0100120c0a02000110201801200130014a07757067726164654a107570677261646564494243537461746550015801000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000025636c69656e74732f30372d74656e6465726d696e742d3030312f636c69656e7453746174650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "proof": "0xfedc1fcc0decf5c6ef20d1568f9f087047c4f426f95bbad2080fb86074fea6ab104c102a00b5203a430029799b0be9f6e5c29982b67e6e54d9e8da8aa7956d75b9cea90d0b62bec78d7fe5882af92d40c34b74eb066a02aa7aaaaae12d02dc5caa70bf480d713d5abbd7b7a499102cc8c260c4a2c8c16b90d08ddeacbbe755b91981a8f92962fa72484b245aa87f6be63e3be69f48615650fec4ba06c451f524f58a1e82168dcdeafde2997c7e7443d286082ba80368dedc8c54fe4b94a20cad10631f7a21385fce909b0927c36902932dd06f6efb0da383aadd5826e56009642463543f085d407c66c194e74bea82b4f46a4752c0a817148b730207d94980d2b55b8c0d0ca860acfd628375205a26c9a115ee11dd628cc6074ba0cd2bd613b24377f5e40f906a969862b6881fcc116bda60939d7f2f22a6fe14af14063f21a88eebf0ae1843dfce39a618366e1551e1f846f9b7e843f31ccddfdb83aaf3efd63a8543b72ab094908724bf3b46d47432e005d2b338f50aa7418e82a04b106f91338deba82a1dfab0875ed411d484c4f68df2fa5df69b9fbfbe417781a93a3aadc5db50472bba0eea4fc33a2fed9049f003fd36c49b48b31e00628e30796d771ef35bd5d5095a417034c2bec400d2aa808680513bb3fb2ca7fce197dd3e1e2d749e48687e106b7e37be6b496b8c1203b4c53ef5b80053261a0d901bf46e88e1ec27635e1f2407204d341baaa875736a576f4082ee731f541ffef4cd8909a7a0da6f4fe37e0fa511a9ce5475a3284a484265d851a8fb763ee366f0bd6237a423f3aa602c5d0070e4ec36c8839d978aef1710c0f43b155638a7988382be1ba59bf307ba256d10309fcbc955a9b3b786ac12a8d62764c527dd9ad4fe203d1897b0b85d2d002821b6235d0d1add158052a8ff38735be4727f445bea6d93a522e9e53d894b375b24c0e466dfd3d9acc2ac2bc02a7029ef674d404f10e007a703c2570acdd2a0f72b29a3496110f9cebd389421d9b369499e0b80fcadc08058ab54969440bfc1e4249be8ab9294fa69de9b850cf309d6d42274614436c1714901f21aa24ad428c403c6646a7403ec2a594877c178ecf6e9d99287797ad44e252028ad89d8cae012166393f7a88d51fbc8a42843ff66d1c941a68b7110da2f31db4a86ddf7e91fe426d3d5c4d7d54fc88006313ec5235f94d4d1d31f11d7329a1e007a92f6636dcf", "kvPairs": "00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000023636c69656e74732f30372d74656e6465726d696e742d302f636c69656e745374617465000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b70a2b2f6962632e6c69676874636c69656e74732e74656e6465726d696e742e76312e436c69656e7453746174651287010a1174686574612d746573746e65742d3030311204080110031a040880840722040880c60a2a02082832003a0510b7e3c60842190a090801180120012a0100120c0a02000110211804200c300142190a090801180120012a0100120c0a02000110201801200130014a07757067726164654a107570677261646564494243537461746550015801000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000025636c69656e74732f30372d74656e6465726d696e742d3030312f636c69656e7453746174650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" } \ No newline at end of file diff --git a/contracts/fixtures/update_client_fixture.json b/contracts/fixtures/update_client_fixture.json index e7d97f8..defce54 100644 --- a/contracts/fixtures/update_client_fixture.json +++ b/contracts/fixtures/update_client_fixture.json @@ -1,11 +1,11 @@ { - "trustedClientState": "0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000002207f800000000000000000000000000000000000000000000000000000000001baf8000000000000000000000000000000000000000000000000000000000001baf80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000076d6f6368612d3400000000000000000000000000000000000000000000000000", - "trustedConsensusState": "00000000000000000000000000000000000000000000000000000000668df173c7656d84561185b88f82507efaa6d578b46ebe5010c0d37de05109254d2f9ff1b655d16f9452ed96e4d7cf8143e927a1e0d9ff1e1d315f134f2ad6b798b35ce0", - "targetConsensusState": "00000000000000000000000000000000000000000000000000000000668df1ea6a10b1857c778e02df342a0471476f44bc80e94e6e53e73e33b4e2bf94261150b655d16f9452ed96e4d7cf8143e927a1e0d9ff1e1d315f134f2ad6b798b35ce0", - "targetHeight": 2230274, - "updateClientVkey": "0x00dccbd5282da6b04c730721f21b40fee41302d148eb16d1aede6632224a1874", - "membershipVkey": "0x0083f60b9a6e2c5eecbeec4d63514073ea981defcaa39e4a06339152067fa699", - "ucAndMembershipVkey": "0x0071a54676e22f1e088807fe801e79f2d419a1f48242e764b244a1683bf6a02a", - "publicValues": "0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000668df173c7656d84561185b88f82507efaa6d578b46ebe5010c0d37de05109254d2f9ff1b655d16f9452ed96e4d7cf8143e927a1e0d9ff1e1d315f134f2ad6b798b35ce000000000000000000000000000000000000000000000000000000000668df1ea6a10b1857c778e02df342a0471476f44bc80e94e6e53e73e33b4e2bf94261150b655d16f9452ed96e4d7cf8143e927a1e0d9ff1e1d315f134f2ad6b798b35ce00000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000002207f80000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000022080200000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000001baf8000000000000000000000000000000000000000000000000000000000669f463300000000000000000000000000000000000000000000000000000000000000076d6f6368612d3400000000000000000000000000000000000000000000000000", - "proof": "0xfedc1fcc26f9ba98aeda0dbf461c86874ecccc4d6a0493fc49d63146d1e49aa7774afc7e07cd680d9065f777d984b3a6198c66dac19ca22ea634c628b3a4a47c4a5d59810e48cdbffe763166f8ed75c506c48846ce219d26d63b9d1fcb6675bbf45c57e82dc31186f5d43a3a0650ce2007e0ec367811d4458bd46999ba90b768bde8e9c101c84e33755fa3fb78ed73563625f6d141459644e12487db7904ccf5e362846813b8fc78257cde01968b445502216197cce827bacb290afc803fe448ad8e8c501e71906c3c297d2f0e3a048c6087a2b740f791df57880af86b605fca96d1e8de0e6bd9a1a1096499bf474dc6c7969d19d118d5fab848cbe463d24a3e9fb9ea31300150ac8d925e303f61c34c4b43a9fe4160b017d82fb7661771f735074b336d1174adfc65f69f780472f19b48a498964498809152050b22955f5dc5d241a2a22821a19c153ae12bd99314bad632e21826b2bb848ae11feb8a983585a4be23e41a98ad59be638607c9134f829013a2c041be5dc1f3a6967f58309017e6bc088a003217b50da4357cfa292e260294176a38e2e62e73b7bad226570acc09e8db301ce4565f4a4b466449f879a1823aac05fb281777cfb4c7f0fc746fed3be9d9bb041814da2c1daf82d5bdc51d44896cc5c813e04aa672227f68bbd1677998dc601aad06eabb68bcec3ab7308e9266e062da889e933f8c067e45504ae633e5c77d05de1744e1a8db11a3bbe618bd6e942d70ccf428afea90c00bb955642296d3f11e5d81fa4961400360e7b13f0b85d01516b4374058130b53ceda498970297a9607e9f267e7d5ed319167441793ea791f62738c63448eec909b491aa06d00350d10da8c7033336d8752b7defe01315ed6aa8c19f85ea560176a5db6dd688280b70bc4cc2ff9482531db31e0ebdfaaf42855a918e5d9cc57eab1ace50492553c8e0678a47bff2650b5e0091f45d0b04cc78a5ccbcb90544973930b151251d74b1c079f5356a1f73eb16b2fa03df586a01ffc822365ad197787f227a7a294e6181a2449c6d8c943e82225f813a23e537e1b03dfe8e21d7015e35a12c62cc616a6670dd84077c6674129adac93b3fe6a65313151a3da7813138a023abb6347dba020113021f52e4021176fa2d7a79cfe95fa06804b37bfdde526067f861d7ab6aba72403f51e331e65478b149dac0c46e59c2c46d2b95ebfe18a4262db18cdd1232a" + "trustedClientState": "000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000238d90000000000000000000000000000000000000000000000000000000000012750000000000000000000000000000000000000000000000000000000000001baf80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000076d6f6368612d3400000000000000000000000000000000000000000000000000", + "trustedConsensusState": "0000000000000000000000000000000000000000000000000000000066a03c102bab132312afa95add5dec8f90e2fdc48085e7494ca6d39ee9431ff434e22775e0373a8b805881ecdbb47fce30b66956aa13e9a573107ba9ac495b9cef3365d3", + "targetConsensusState": "0000000000000000000000000000000000000000000000000000000066a03c8ace271cd333ff2f0cd166fe30bcd67431aca0d94c5c8ed0079a30761311bbd3a2e0373a8b805881ecdbb47fce30b66956aa13e9a573107ba9ac495b9cef3365d3", + "targetHeight": 2330010, + "updateClientVkey": "0x00b8a6a2873e2eb2b0456023e69672caf877239e7c1f1b77cb84e7eb748af3eb", + "membershipVkey": "0x005dee562962534ba45f120968c2e0eaa59ace5404e49252264f9f3699edad82", + "ucAndMembershipVkey": "0x00dc223d082fda575a3950f0cf145ac567f7e479a44513e79a76f5f5529233a0", + "publicValues": "0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000066a03c102bab132312afa95add5dec8f90e2fdc48085e7494ca6d39ee9431ff434e22775e0373a8b805881ecdbb47fce30b66956aa13e9a573107ba9ac495b9cef3365d30000000000000000000000000000000000000000000000000000000066a03c8ace271cd333ff2f0cd166fe30bcd67431aca0d94c5c8ed0079a30761311bbd3a2e0373a8b805881ecdbb47fce30b66956aa13e9a573107ba9ac495b9cef3365d3000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000238d9000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000238d9a00000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000001275000000000000000000000000000000000000000000000000000000000066a365de00000000000000000000000000000000000000000000000000000000000000076d6f6368612d3400000000000000000000000000000000000000000000000000", + "proof": "0xfedc1fcc24c655481805f42c8b8f22e968ab2f97506f902740ecdb6b94edd518477991481158eb6fbd85f8b7c6b56795e0a4e82de6f1afa30f7d720f688abf7feba9d4ed0b708984613e55e9e7a3b93d79c3267e556e924d585eb7e503b25878afd7a3b426cb1ce0ee343d3c2d2f9e58182dc12d19677a37fbb19a2533e846527d4296c52c4bf6de2a6812bef3aaae1471cf1ba8a24da64d7b173838180924698d0519a52389408e9c71b92a8aa97e3440504793e3ea4f454049b1878b0191797261d8ff2f13aa0a89d2f1499bb2504c6f225d4ebe5f90125cd0ad0b06b1396b3a8582f6045011cc5d4aa1e746a5bd69b7ebe6cf7fb45fbf0b1b9fcd91730b7d1dba8dd7035b0a45ab05acbda57fe2e8fc4f7521464fe7081e80106e1871ce2bbd11c1c30897c18f49794335ab980dc688f98f7fd132bc62c0a09eeadaea0fbd52e5b4dd2debed1d7ba5ac4e39c3b0b588451a981f69ea77172e35497cd6ead2935475191e97daa7fbb8f14d97b3262621425b0f792fa5cc9bc27bc73308439963d1ae8c11f4ff5cc261bb2d7a42101004b6792987270652c55a4a808202953574ad131a1740a2bd915159e02edf0f9bc69b270b83fde1f6cd91507bcf81cfae7496d584046bd2d3557d6559c9512eb894c85d72d6251e862fef2897780dd2330cc14e3a281316a23d96b8d5dc7360271868504ef45d0d5171e27531ba6cec82a46c3c8704c299e72a89baf38a24b2bbb53a120c76386d560ea960253259fa9e24921b64148f529dcece953bab1bd45459709bce3a0d80e1d62f21a44a7da62d7150f14319d00074d76e3754dfd6047e87fdafbc7f2e59e30c626ffb93273999f949edad140e009464288501752f5a6a9298e4ba61ff1a1bf305eaf20e6808ec6edefcfa22b7ab84a986a44481c958d4a231037c3c28fd5f28b51af87a5b4f2e936364eb06ba23424ecc3cd4028e87a023e43ca1b31ca648b26125f2ec3d9089ed75863a1631c3500e39d96cb98ed80b8a6bb72a626c08f3e2843d7ad71d6495319b265623d3914fbefa0b8e0fc8c7f42310bea3636f7db8f21e7499da6f8afcda56c59f2d6c99298ba4ed8ecbc42b737006101fb793b2c78843cd4cb5e18a4978f7a78703e83f371230c8c030acf0a81e31e60b61789e4c93287e406a0c8888649b45f72efe2781ab733d7dbd19ba80b2c29fb12503899f348a54e64823fee0d8ef934f" } \ No newline at end of file diff --git a/contracts/fixtures/verify_membership_fixture.json b/contracts/fixtures/verify_membership_fixture.json index 213a123..be87188 100644 --- a/contracts/fixtures/verify_membership_fixture.json +++ b/contracts/fixtures/verify_membership_fixture.json @@ -1,12 +1,12 @@ { - "proofHeight": 2230264, - "trustedClientState": "0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000002207f800000000000000000000000000000000000000000000000000000000001baf8000000000000000000000000000000000000000000000000000000000001baf80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000076d6f6368612d3400000000000000000000000000000000000000000000000000", - "trustedConsensusState": "00000000000000000000000000000000000000000000000000000000668df173c7656d84561185b88f82507efaa6d578b46ebe5010c0d37de05109254d2f9ff1b655d16f9452ed96e4d7cf8143e927a1e0d9ff1e1d315f134f2ad6b798b35ce0", - "commitmentRoot": "c7656d84561185b88f82507efaa6d578b46ebe5010c0d37de05109254d2f9ff1", - "updateClientVkey": "0x00dccbd5282da6b04c730721f21b40fee41302d148eb16d1aede6632224a1874", - "membershipVkey": "0x0083f60b9a6e2c5eecbeec4d63514073ea981defcaa39e4a06339152067fa699", - "ucAndMembershipVkey": "0x0071a54676e22f1e088807fe801e79f2d419a1f48242e764b244a1683bf6a02a", - "publicValues": "0x0000000000000000000000000000000000000000000000000000000000000020c7656d84561185b88f82507efaa6d578b46ebe5010c0d37de05109254d2f9ff1000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000023636c69656e74732f30372d74656e6465726d696e742d302f636c69656e745374617465000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b70a2b2f6962632e6c69676874636c69656e74732e74656e6465726d696e742e76312e436c69656e7453746174651287010a1174686574612d746573746e65742d3030311204080110031a040880840722040880c60a2a02082832003a0510b7e3c60842190a090801180120012a0100120c0a02000110211804200c300142190a090801180120012a0100120c0a02000110201801200130014a07757067726164654a107570677261646564494243537461746550015801000000000000000000", - "proof": "0xfedc1fcc012076e0e823a04de955b09b46c5a03a3a5ab78ee5c0a4c0a9dd35c3831f906d2a37fe76bf91af09a0aeb70ead54d09101b4f18f822160f9cedc9d83c1cfb3972f106ad0abe244207f2abeeaf36002d80a3a67846c50288b24c16326c2c9832105e8686fbd16d9f5ed8060aec56e2919076388dff52489da92c1c783e454c91f0a5163dbaf84969a121b3517214cebea83cd667dac6dae3955c060912e67982520280e538f7466560647b66103c51111696d1718469b6460c0ebcdd110263ee600b7b4e5f77af47d90b277166a5306cbf9279632e556d9386d249f6c9048384b11ca64f343ca9f0ddbdd4033bbb007a92975ceb87308d24d002d701f5d469046096391fa708b1185b0cadbf9437998c5ff32838ac554d0537956b760bf85e25326ed7a4f806b3b9fddd8d6ccc2cfde21ffc6edcc8e4f7fd0e01146468be8367e2753da5cb8bb000b339225d483d2e19223f6ea22c0619a057b8f5f3ec52c37f81c75d9b502357a0813a8539e204f1e65d11e8a2ed0c2f0b20f5793f12aacc9b90ab053757cd69deea1b1c5ba13eca40c93e027c2f5e7386e16f94948069785f819a3439c3d00d22d59c21facdbb9c2ca402cc886a467ded9447b03fc4b4007ab13b4ffb5077b2bdc08c3bbc2d5dcc58a39507a2d28b9873ddf5891bd8adf6e0f1e79b2bc8267e4a6781453437150912c547da164679f4a3d86feb24fe951ab57009fe412a3acb07d707a7f46f99b417fec48998a31938ba5ceecb5e548fe3a4f199a99d590a1c174c804975c3e19f837b424f7f20e268b7b87b1fa11bbf3f36006024f91efe7d1d871c22350ca1883d01741c8bd436e829259063d78c3a8d72824c1919054f1706c58f706213c0ec82d72f2a5c12c67c090d1750d0c57cf81631cd1f3f089f1d5a9a0a92da7e11832d60d57bc738a4bb815db4bd351374624421f3d572fdda05aaf4bfd2853ed0f92fc29635cd82c2b384f9ebb64fa787eb5f417f31ebd99dd32fbdd95efb02cfd2b1260af2cfb19e49cbcda8d45f6b2bc87a7032aa37123e4e463131959f7802a30d2c7f48ba24b216796e9c6e03b9a51e05e00ed66ccc323a6c5552b1734ae0aa0604594a3d607e4432f486be08f010cc3831e09d97a1f60ea417e5275349651e8c9f017ba06adedcd2719ceadc7513e3cc225d5f9a95b58476826bb10345fc02126a2850318757a6921dcf79ef8c212c44f", + "proofHeight": 2330000, + "trustedClientState": "000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000238d90000000000000000000000000000000000000000000000000000000000012750000000000000000000000000000000000000000000000000000000000001baf80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000076d6f6368612d3400000000000000000000000000000000000000000000000000", + "trustedConsensusState": "0000000000000000000000000000000000000000000000000000000066a03c102bab132312afa95add5dec8f90e2fdc48085e7494ca6d39ee9431ff434e22775e0373a8b805881ecdbb47fce30b66956aa13e9a573107ba9ac495b9cef3365d3", + "commitmentRoot": "2bab132312afa95add5dec8f90e2fdc48085e7494ca6d39ee9431ff434e22775", + "updateClientVkey": "0x00b8a6a2873e2eb2b0456023e69672caf877239e7c1f1b77cb84e7eb748af3eb", + "membershipVkey": "0x005dee562962534ba45f120968c2e0eaa59ace5404e49252264f9f3699edad82", + "ucAndMembershipVkey": "0x00dc223d082fda575a3950f0cf145ac567f7e479a44513e79a76f5f5529233a0", + "publicValues": "0x00000000000000000000000000000000000000000000000000000000000000202bab132312afa95add5dec8f90e2fdc48085e7494ca6d39ee9431ff434e22775000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000023636c69656e74732f30372d74656e6465726d696e742d302f636c69656e745374617465000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b70a2b2f6962632e6c69676874636c69656e74732e74656e6465726d696e742e76312e436c69656e7453746174651287010a1174686574612d746573746e65742d3030311204080110031a040880840722040880c60a2a02082832003a0510b7e3c60842190a090801180120012a0100120c0a02000110211804200c300142190a090801180120012a0100120c0a02000110201801200130014a07757067726164654a107570677261646564494243537461746550015801000000000000000000", + "proof": "0xfedc1fcc0d5eac3bed8054390094c280873f26ed15f519f2741e53f0967fdaee3ca5d7710d0878ff85b76b5f52d9e0e650d7f7224c0c6bdf859c2c57e7efcf855ab1c68e0c5a170b6ef5914f3d0869a2a742ec4e25e0de8150bd6e205a11d61290301efd2e37cf3f2bcf75bad5b830e03b7f8541007300988c8c7ab808f45e436c52dbf42e38891db719b52da0b27d0735df1671a0f0d0b03fe704bae09d92788a71047d24482ddbda544746d8bf67dab9f84420b9b59e1d7c03f3843e8dbc93c866fffd22d31fa59f17df872516fb246c2d6b4158dd6d8dd74b878090197cafc5f4d69d0b8524299c1d65354c59cdde6482a0d77b29cdc69bbe380ea5d827bd2c7383160a69db35e40496836c8c2a1bcbf925c6f2f529188f6b4e006fad7bc2b6dd6b252276b08d16f1c07fd6496709524ddee7fcd0dca51930793d12ab18c72e6223eb02a59af09a9362384daf3d2a75195ad903825cc06dee4002f4ef25cfa7f8e0922cc107349ed93cfbc62d59200366c5fb41021e03abad61e0b0beac1158504fd21e4aad7c16ce4bdcdbe8bd5d83c7f1c649a3698f8fe7e888cfddd2f15d11e6d92560996e096b17928f538f1c05d6fe2e2cea202da00972beecd42d8b2b3eb8ae0b446031d9cf859f2b699240977ef2c5694ee886d121f9dfbec2077f73497253206d9044a4a777562d3eea57175db35dea5b2d9dcf8c2f6a37fc1574b2c7538e2b8a477167f7e915c8a15cc533cfc6110d2400462284ba91f2ac9e4dab98e8fe086251d29e83db3da03452fdbd761f5d9e5a1949c1c128c3658cacfd5dbac4362cc7f5e45888110b39527bcecaad245e157040a708e97e0dcccb2cf62154671010a3750b68e87b0ba8c3de48ceddd20c1ddde6e0c57d17b3fa0fcd787ed6dc3929ed1df4c9d3ebcde87e5cedc2cd04c45c8744f01d744f901ebaf914b54252c40f86a3a3cde08f34abdd787ac1d27e6613f8f89d6102a6860b2fa169cbaf87912fd191ef11c72ac816d52e251d82bd8ff60daf255a51163b1e203e437b43957a258ffe4e9225a2316d85dfff963ccccb647a58f425416d11aeeee7e07f1fb3270476023abeeb8edbf2ca60155d3e92dcefa157549f2d3f05823419296893add2230268c8d16df6a9461f75c77b355cfa0311e7d5b984529adfbf905f5fac51d004703be4554e96dd36105575af610312f5a2e021c8df26fcf94c27911a978851", "kvPairs": "000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000023636c69656e74732f30372d74656e6465726d696e742d302f636c69656e745374617465000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b70a2b2f6962632e6c69676874636c69656e74732e74656e6465726d696e742e76312e436c69656e7453746174651287010a1174686574612d746573746e65742d3030311204080110031a040880840722040880c60a2a02082832003a0510b7e3c60842190a090801180120012a0100120c0a02000110211804200c300142190a090801180120012a0100120c0a02000110201801200130014a07757067726164654a107570677261646564494243537461746550015801000000000000000000" } \ No newline at end of file diff --git a/contracts/script/genesis.json b/contracts/script/genesis.json index cf6e576..bab5152 100644 --- a/contracts/script/genesis.json +++ b/contracts/script/genesis.json @@ -1,7 +1,7 @@ { - "trustedClientState": "0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000008463f200000000000000000000000000000000000000000000000000000000001baf8000000000000000000000000000000000000000000000000000000000001baf80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000076e6f626c652d3100000000000000000000000000000000000000000000000000", - "trustedConsensusState": "00000000000000000000000000000000000000000000000000000000669d1f0c68a234f66e9d5ca47cb1ef843f2a4fff0591e6d5c887aebe10a262af8988f4f6b694f433191c7b4644b4285bf994f580aa12b59229008d2b26e958f09b181535", - "updateClientVkey": "0x00e85222aaad662bbf58fcff9ee11a6d26f95b9f051c1b4f25b783e99f690fe7", - "membershipVkey": "0x0054d274cc0a556d9aed57dbebe6bb0ed845c6ab90e944ccb2e63d7debcab9c8", - "ucAndMembershipVkey": "0x0072f4731aad003ddcba4480670f329fa07cb272e94c028a2b853a9ecbeda735" + "trustedClientState": "00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000012754500000000000000000000000000000000000000000000000000000000001baf800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000673696d642d310000000000000000000000000000000000000000000000000000", + "trustedConsensusState": "0000000000000000000000000000000000000000000000000000000066a36d61154d94d8b1a960773c26199c0b1982cf3496a025e602bf2ef7e307d1e6c0fb8227aef26dd65a2fa3db2c2c9cd895141599627abdf089fcff81d827329809c076", + "updateClientVkey": "0x00b8a6a2873e2eb2b0456023e69672caf877239e7c1f1b77cb84e7eb748af3eb", + "membershipVkey": "0x005dee562962534ba45f120968c2e0eaa59ace5404e49252264f9f3699edad82", + "ucAndMembershipVkey": "0x00dc223d082fda575a3950f0cf145ac567f7e479a44513e79a76f5f5529233a0" } \ No newline at end of file diff --git a/contracts/src/SP1ICS07Tendermint.sol b/contracts/src/SP1ICS07Tendermint.sol index 7e43e2c..071b186 100644 --- a/contracts/src/SP1ICS07Tendermint.sol +++ b/contracts/src/SP1ICS07Tendermint.sol @@ -251,7 +251,8 @@ contract SP1ICS07Tendermint is ISP1ICS07Tendermint { ); require(output.env.trustingPeriod == clientState.trustingPeriod, "SP1ICS07Tendermint: trusting period mismatch"); require( - output.env.trustingPeriod == clientState.unbondingPeriod, "SP1ICS07Tendermint: unbonding period mismatch" + output.env.trustingPeriod <= clientState.unbondingPeriod, + "SP1ICS07Tendermint: trusting period longer than unbonding period" ); require( consensusStateHashes[output.trustedHeight.revisionHeight] diff --git a/e2e/interchaintestv8/sp1_ics07_test.go b/e2e/interchaintestv8/sp1_ics07_test.go index 3504022..67541ac 100644 --- a/e2e/interchaintestv8/sp1_ics07_test.go +++ b/e2e/interchaintestv8/sp1_ics07_test.go @@ -5,6 +5,7 @@ import ( "crypto/ecdsa" "encoding/hex" "os" + "strconv" "testing" "github.com/stretchr/testify/suite" @@ -67,7 +68,10 @@ func (s *SP1ICS07TendermintTestSuite) SetupSuite(ctx context.Context) { })) s.Require().True(s.Run("Deploy contracts", func() { - s.Require().NoError(operator.RunGenesis("--trust-level", testvalues.DefaultTrustLevel.String())) + s.Require().NoError(operator.RunGenesis( + "--trust-level", testvalues.DefaultTrustLevel.String(), + "--trusting-period", strconv.Itoa(testvalues.DefaultTrustPeriod), + )) stdout, _, err := eth.ForgeScript(ctx, s.UserA.KeyName(), ethereum.ForgeScriptOpts{ ContractRootDir: ".", @@ -113,7 +117,7 @@ func (s *SP1ICS07TendermintTestSuite) TestDeploy() { s.Require().Equal(simd.Config().ChainID, clientState.ChainId) s.Require().Equal(uint8(testvalues.DefaultTrustLevel.Numerator), clientState.TrustLevel.Numerator) s.Require().Equal(uint8(testvalues.DefaultTrustLevel.Denominator), clientState.TrustLevel.Denominator) - s.Require().Equal(uint32(stakingParams.UnbondingTime.Seconds()), clientState.TrustingPeriod) + s.Require().Equal(uint32(testvalues.DefaultTrustPeriod), clientState.TrustingPeriod) s.Require().Equal(uint32(stakingParams.UnbondingTime.Seconds()), clientState.UnbondingPeriod) s.Require().False(clientState.IsFrozen) s.Require().Equal(uint32(1), clientState.LatestHeight.RevisionNumber) @@ -143,7 +147,7 @@ func (s *SP1ICS07TendermintTestSuite) TestUpdateClient() { s.Require().Equal(simd.Config().ChainID, clientState.ChainId) s.Require().Equal(uint8(testvalues.DefaultTrustLevel.Numerator), clientState.TrustLevel.Numerator) s.Require().Equal(uint8(testvalues.DefaultTrustLevel.Denominator), clientState.TrustLevel.Denominator) - s.Require().Equal(uint32(stakingParams.UnbondingTime.Seconds()), clientState.TrustingPeriod) + s.Require().Equal(uint32(testvalues.DefaultTrustPeriod), clientState.TrustingPeriod) s.Require().Equal(uint32(stakingParams.UnbondingTime.Seconds()), clientState.UnbondingPeriod) s.Require().False(clientState.IsFrozen) s.Require().Equal(uint32(1), clientState.LatestHeight.RevisionNumber) diff --git a/e2e/interchaintestv8/testvalues/values.go b/e2e/interchaintestv8/testvalues/values.go index 3760e5f..8bbd341 100644 --- a/e2e/interchaintestv8/testvalues/values.go +++ b/e2e/interchaintestv8/testvalues/values.go @@ -41,4 +41,7 @@ var ( // DefaultTrustLevel is the trust level used by the SP1ICS07Tendermint contract. DefaultTrustLevel = ibctm.Fraction{Numerator: 2, Denominator: 3}.ToTendermint() + + // DefaultTrustPeriod is the trust period used by the SP1ICS07Tendermint contract. + DefaultTrustPeriod = 1209669 ) diff --git a/elf/membership-riscv32im-succinct-zkvm-elf b/elf/membership-riscv32im-succinct-zkvm-elf index 583aebd..8ce9c6a 100755 Binary files a/elf/membership-riscv32im-succinct-zkvm-elf and b/elf/membership-riscv32im-succinct-zkvm-elf differ diff --git a/elf/uc-and-membership-riscv32im-succinct-zkvm-elf b/elf/uc-and-membership-riscv32im-succinct-zkvm-elf index d501c11..dfb3ec8 100755 Binary files a/elf/uc-and-membership-riscv32im-succinct-zkvm-elf and b/elf/uc-and-membership-riscv32im-succinct-zkvm-elf differ diff --git a/elf/update-client-riscv32im-succinct-zkvm-elf b/elf/update-client-riscv32im-succinct-zkvm-elf index 41b9afe..8fe358c 100755 Binary files a/elf/update-client-riscv32im-succinct-zkvm-elf and b/elf/update-client-riscv32im-succinct-zkvm-elf differ diff --git a/justfile b/justfile index 2a72c24..e6564c5 100644 --- a/justfile +++ b/justfile @@ -45,10 +45,10 @@ fixtures prover: just build-operator @echo "Generating fixtures... This may take a while (up to 20 minutes)" parallel --progress --shebang --ungroup -j 4 ::: \ - "RUST_LOG=info SP1_PROVER={{prover}} TENDERMINT_RPC_URL='https://rpc.celestia-mocha.com/' ./target/release/operator fixtures update-client --trusted-block 2230264 --target-block 2230274 -o 'contracts/fixtures/{{ if prover == "mock" { "mock_" } else { "" } }}update_client_fixture.json'" \ - "{{ if prover == "network" { "sleep 15 &&" } else { "" } }} RUST_LOG=info SP1_PROVER={{prover}} TENDERMINT_RPC_URL='https://rpc.celestia-mocha.com/' ./target/release/operator fixtures update-client-and-membership --key-paths clients/07-tendermint-0/clientState,clients/07-tendermint-001/clientState --trusted-block 2230264 --target-block 2230274 -o 'contracts/fixtures/{{ if prover == "mock" { "mock_" } else { "" } }}uc_and_memberships_fixture.json'" \ - "{{ if prover == "network" { "sleep 30 &&" } else { "" } }} RUST_LOG=info SP1_PROVER={{prover}} TENDERMINT_RPC_URL='https://rpc.celestia-mocha.com/' ./target/release/operator fixtures membership --key-paths 'clients/07-tendermint-0/clientState' --trusted-block 2230264 -o 'contracts/fixtures/{{ if prover == "mock" { "mock_" } else { "" } }}verify_membership_fixture.json'" \ - "{{ if prover == "network" { "sleep 45 &&" } else { "" } }} RUST_LOG=info SP1_PROVER={{prover}} TENDERMINT_RPC_URL='https://rpc.celestia-mocha.com/' ./target/release/operator fixtures membership --key-paths clients/07-tendermint-0/clientState,clients/07-tendermint-001/clientState --trusted-block 2230264 -o 'contracts/fixtures/{{ if prover == "mock" { "mock_" } else { "" } }}memberships_fixture.json'" + "RUST_LOG=info SP1_PROVER={{prover}} TENDERMINT_RPC_URL='https://rpc.celestia-mocha.com/' ./target/release/operator fixtures update-client --trusted-block 2330000 --target-block 2330010 -o 'contracts/fixtures/{{ if prover == "mock" { "mock_" } else { "" } }}update_client_fixture.json'" \ + "{{ if prover == "network" { "sleep 15 &&" } else { "" } }} RUST_LOG=info SP1_PROVER={{prover}} TENDERMINT_RPC_URL='https://rpc.celestia-mocha.com/' ./target/release/operator fixtures update-client-and-membership --key-paths clients/07-tendermint-0/clientState,clients/07-tendermint-001/clientState --trusted-block 2330000 --target-block 2330010 -o 'contracts/fixtures/{{ if prover == "mock" { "mock_" } else { "" } }}uc_and_memberships_fixture.json'" \ + "{{ if prover == "network" { "sleep 30 &&" } else { "" } }} RUST_LOG=info SP1_PROVER={{prover}} TENDERMINT_RPC_URL='https://rpc.celestia-mocha.com/' ./target/release/operator fixtures membership --key-paths 'clients/07-tendermint-0/clientState' --trusted-block 2330000 -o 'contracts/fixtures/{{ if prover == "mock" { "mock_" } else { "" } }}verify_membership_fixture.json'" \ + "{{ if prover == "network" { "sleep 45 &&" } else { "" } }} RUST_LOG=info SP1_PROVER={{prover}} TENDERMINT_RPC_URL='https://rpc.celestia-mocha.com/' ./target/release/operator fixtures membership --key-paths clients/07-tendermint-0/clientState,clients/07-tendermint-001/clientState --trusted-block 2330000 -o 'contracts/fixtures/{{ if prover == "mock" { "mock_" } else { "" } }}memberships_fixture.json'" @echo "Fixtures generated at 'contracts/fixtures'" # Generate the `SP1ICS07Tendermint.json` file containing the ABI of the SP1ICS07Tendermint contract diff --git a/operator/src/cli/command.rs b/operator/src/cli/command.rs index e4cbab2..9cb8ae4 100644 --- a/operator/src/cli/command.rs +++ b/operator/src/cli/command.rs @@ -23,6 +23,23 @@ pub enum Commands { Fixtures(fixtures::Cmd), } +/// The trust options for client operations. +#[derive(Clone, Debug, Parser)] +pub struct TrustOptions { + /// Trust level. + #[clap( + long, + default_value = "1/3", + value_parser = parse_trust_threshold, + help = "Trust level as a fraction, e.g. '2/3'", + )] + pub trust_level: TrustThreshold, + + /// Trusting period. [default: 2/3 of unbonding period] + #[clap(long)] + pub trusting_period: Option, +} + /// The cli interface for the genesis command. pub mod genesis { use super::Parser; @@ -33,23 +50,21 @@ pub mod genesis { /// Trusted block height. [default: latest] #[clap(long)] pub trusted_block: Option, + /// Genesis path. #[clap(long, default_value = "../contracts/script")] pub genesis_path: String, - /// Trust level. - #[clap( - long, - default_value = "1/3", - value_parser = super::parse_trust_threshold, - help = "Trust level as a fraction, e.g. '2/3'", - )] - pub trust_level: super::TrustThreshold, + + /// Trust options + #[clap(flatten)] + pub trust_options: super::TrustOptions, } } /// The cli interface for the operator. pub mod operator { use super::Parser; + /// Command line arguments for the operator. #[derive(Parser, Debug, Clone)] pub struct Args { @@ -99,14 +114,9 @@ pub mod fixtures { #[clap(long, short = 'o')] pub output_path: String, - /// Trust level. - #[clap( - long, - default_value = "1/3", - value_parser = super::parse_trust_threshold, - help = "Trust level as a fraction, e.g. '2/3'", - )] - pub trust_level: super::TrustThreshold, + /// Trust options + #[clap(flatten)] + pub trust_options: super::TrustOptions, } /// The arguments for the `Membership` fixture executable. @@ -125,14 +135,9 @@ pub mod fixtures { #[clap(long, short = 'o')] pub output_path: String, - /// Trust level. - #[clap( - long, - default_value = "1/3", - value_parser = super::parse_trust_threshold, - help = "Trust level as a fraction, e.g. '2/3'", - )] - pub trust_level: super::TrustThreshold, + /// Trust options + #[clap(flatten)] + pub trust_options: super::TrustOptions, } /// The arguments for the `UpdateClientAndMembership` fixture executable. @@ -155,14 +160,9 @@ pub mod fixtures { #[clap(long, short = 'o')] pub output_path: String, - /// Trust level. - #[clap( - long, - default_value = "1/3", - value_parser = super::parse_trust_threshold, - help = "Trust level as a fraction, e.g. '2/3'", - )] - pub trust_level: super::TrustThreshold, + /// Trust options + #[clap(flatten)] + pub trust_options: super::TrustOptions, } } diff --git a/operator/src/helpers/light_block.rs b/operator/src/helpers/light_block.rs index d1b8ae0..a159f5d 100644 --- a/operator/src/helpers/light_block.rs +++ b/operator/src/helpers/light_block.rs @@ -20,6 +20,7 @@ pub trait LightBlockExt { &self, trust_level: TrustThreshold, unbonding_period: u32, + trusting_period: u32, ) -> anyhow::Result; /// Convert the [`LightBlock`] to a new [`ConsensusState`]. #[must_use] @@ -42,6 +43,7 @@ impl LightBlockExt for LightBlock { &self, trust_level: TrustThreshold, unbonding_period: u32, + trusting_period: u32, ) -> anyhow::Result { let chain_id = ChainId::from_str(self.signed_header.header.chain_id.as_str())?; Ok(ClientState { @@ -53,7 +55,7 @@ impl LightBlockExt for LightBlock { }, isFrozen: false, unbondingPeriod: unbonding_period, - trustingPeriod: unbonding_period, + trustingPeriod: trusting_period, }) } diff --git a/operator/src/runners/fixtures/membership.rs b/operator/src/runners/fixtures/membership.rs index f8e323e..e664f9e 100644 --- a/operator/src/runners/fixtures/membership.rs +++ b/operator/src/runners/fixtures/membership.rs @@ -66,8 +66,17 @@ pub async fn run(args: MembershipCmd) -> anyhow::Result<()> { .seconds .try_into()?; - let trusted_client_state = - trusted_light_block.to_sol_client_state(args.trust_level.try_into()?, unbonding_period)?; + // Defaults to the recommended TrustingPeriod: 2/3 of the UnbondingPeriod + let trusting_period = args + .trust_options + .trusting_period + .unwrap_or(2 * (unbonding_period / 3)); + + let trusted_client_state = trusted_light_block.to_sol_client_state( + args.trust_options.trust_level.try_into()?, + unbonding_period, + trusting_period, + )?; let trusted_consensus_state = trusted_light_block.to_consensus_state(); let commitment_root_bytes = trusted_consensus_state.root.as_bytes().to_vec(); diff --git a/operator/src/runners/fixtures/uc_and_mem.rs b/operator/src/runners/fixtures/uc_and_mem.rs index 666fde7..a67626b 100644 --- a/operator/src/runners/fixtures/uc_and_mem.rs +++ b/operator/src/runners/fixtures/uc_and_mem.rs @@ -70,8 +70,17 @@ pub async fn run(args: UpdateClientAndMembershipCmd) -> anyhow::Result<()> { .seconds .try_into()?; - let trusted_client_state = - trusted_light_block.to_sol_client_state(args.trust_level.try_into()?, unbonding_period)?; + // Defaults to the recommended TrustingPeriod: 2/3 of the UnbondingPeriod + let trusting_period = args + .trust_options + .trusting_period + .unwrap_or(2 * (unbonding_period / 3)); + + let trusted_client_state = trusted_light_block.to_sol_client_state( + args.trust_options.trust_level.try_into()?, + unbonding_period, + trusting_period, + )?; let trusted_consensus_state = trusted_light_block.to_consensus_state().into(); let proposed_header = target_light_block.into_header(&trusted_light_block); let contract_env = Env { diff --git a/operator/src/runners/fixtures/update_client.rs b/operator/src/runners/fixtures/update_client.rs index b87662f..e7fe9db 100644 --- a/operator/src/runners/fixtures/update_client.rs +++ b/operator/src/runners/fixtures/update_client.rs @@ -66,8 +66,17 @@ pub async fn run(args: UpdateClientCmd) -> anyhow::Result<()> { .seconds .try_into()?; - let trusted_client_state = - trusted_light_block.to_sol_client_state(args.trust_level.try_into()?, unbonding_period)?; + // Defaults to the recommended TrustingPeriod: 2/3 of the UnbondingPeriod + let trusting_period = args + .trust_options + .trusting_period + .unwrap_or(2 * (unbonding_period / 3)); + + let trusted_client_state = trusted_light_block.to_sol_client_state( + args.trust_options.trust_level.try_into()?, + unbonding_period, + trusting_period, + )?; let trusted_consensus_state = trusted_light_block.to_consensus_state().into(); let proposed_header = target_light_block.into_header(&trusted_light_block); let contract_env = Env { diff --git a/operator/src/runners/genesis.rs b/operator/src/runners/genesis.rs index 549fdf1..b104b3e 100644 --- a/operator/src/runners/genesis.rs +++ b/operator/src/runners/genesis.rs @@ -56,8 +56,17 @@ pub async fn run(args: Args) -> anyhow::Result<()> { .seconds .try_into()?; - let trusted_client_state = - trusted_light_block.to_sol_client_state(args.trust_level.try_into()?, unbonding_period)?; + // Defaults to the recommended TrustingPeriod: 2/3 of the UnbondingPeriod + let trusting_period = args + .trust_options + .trusting_period + .unwrap_or(2 * (unbonding_period / 3)); + + let trusted_client_state = trusted_light_block.to_sol_client_state( + args.trust_options.trust_level.try_into()?, + unbonding_period, + trusting_period, + )?; let trusted_consensus_state = trusted_light_block.to_consensus_state(); let genesis = SP1ICS07TendermintGenesis { trusted_consensus_state: hex::encode(