From cc23b34d97ab52f7a89a86848bebf22304e0a308 Mon Sep 17 00:00:00 2001 From: Kevaundray Wedderburn Date: Wed, 24 Jan 2024 00:09:40 +0000 Subject: [PATCH 01/11] Modify test vectors to use valid scalars Signed-off-by: Kevaundray Wedderburn --- .../ipa_multipoint/LibIpaMultipointTest.java | 14 +- .../test/resources/genesis_lvl1_commits.json | 516 +++++++++--------- 2 files changed, 265 insertions(+), 265 deletions(-) diff --git a/ipa-multipoint/src/test/java/org/hyperledger/besu/nativelib/ipa_multipoint/LibIpaMultipointTest.java b/ipa-multipoint/src/test/java/org/hyperledger/besu/nativelib/ipa_multipoint/LibIpaMultipointTest.java index d39f61b1..e2099e4b 100644 --- a/ipa-multipoint/src/test/java/org/hyperledger/besu/nativelib/ipa_multipoint/LibIpaMultipointTest.java +++ b/ipa-multipoint/src/test/java/org/hyperledger/besu/nativelib/ipa_multipoint/LibIpaMultipointTest.java @@ -34,9 +34,9 @@ public void testCallLibrary() { @Test public void testCallLibraryCommitRoot() { - Bytes32 input = Bytes32.fromHexString("0xf6e31f7a565a390b48fdd24569ac10d43562d19de37ea951c7f9f250a339d059"); + Bytes32 input = Bytes32.fromHexString("0x00e31f7a565a390b48fdd24569ac10d43562d19de37ea951c7f9f250a339d059"); Bytes32 result = Bytes32.wrap(LibIpaMultipoint.commitRoot(input.toArray())); - Bytes32 expected = Bytes32.fromHexString("0x588f93e52b41d8d3abade94bf44a2ccd5d6ef9090a63164fba8d02c909168c53"); + Bytes32 expected = Bytes32.fromHexString("0x3337896554fd3960bef9a4d0ff658ee8ee470cf9ca88a3c807cbe128536c5c05"); assertThat(result).isEqualTo(expected); } @@ -55,24 +55,24 @@ public void testCallLibraryWithManyElements() { @Test public void testCallLibraryWithMaxElements() { - Bytes32 element = Bytes32.fromHexString("0xd36f20567f74f607d9252186ff8efed04de4578d1ddb3de4fe6c5e4249e0045b"); + Bytes32 element = Bytes32.fromHexString("0x006f20567f74f607d9252186ff8efed04de4578d1ddb3de4fe6c5e4249e0045b"); Bytes32[] arr = new Bytes32[256]; for (int i = 0; i < 256; i++) { arr[i] = element; } Bytes input = Bytes.concatenate(arr); Bytes32 result = Bytes32.wrap(LibIpaMultipoint.commit(input.toArray())); - Bytes32 expected = Bytes32.fromHexString("0x069e4460d5dd6b48cfcb0a3338a84bc6e38fe686c9d9035017570c3fa10471d6"); + Bytes32 expected = Bytes32.fromHexString("0x148badc53042581c95e71f21b2b85826bc2f4088e617cd18f488ab664af1d043"); assertThat(result).isEqualTo(expected); } @Test public void testCallLibraryPedersenHash() { // Example of passing address and trieIndex to pedersenHash. - Bytes32 address = Bytes32.fromHexString("0xed3f9549040250ec5cdef31947e5213edee80ad2d5bba35c9e48246c5d9213d6"); - Bytes32 trieIndex = Bytes32.fromHexString("0x1C4C6CE0115457AC1AB82968749EB86ED2D984743D609647AE88299989F91271"); + Bytes32 address = Bytes32.fromHexString("0x003f9549040250ec5cdef31947e5213edee80ad2d5bba35c9e48246c5d9213d6"); + Bytes32 trieIndex = Bytes32.fromHexString("0x004C6CE0115457AC1AB82968749EB86ED2D984743D609647AE88299989F91271"); byte[] total = Bytes.wrap(address, trieIndex).toArray(); Bytes result = Bytes.of(LibIpaMultipoint.pedersenHash(total)); - assertThat(result).isEqualTo(Bytes32.fromHexString("0x2e50716b7d8c6d13d6005ea248f63f5a11ed63318cad38010f4bcb9a9c2e8b43")); + assertThat(result).isEqualTo(Bytes32.fromHexString("0xbe9401ae598470e73d284279d01c8b49bf88565b14cb1a7ae829dbd78c3a5018")); } } diff --git a/ipa-multipoint/src/test/resources/genesis_lvl1_commits.json b/ipa-multipoint/src/test/resources/genesis_lvl1_commits.json index 54959192..1fd7c62c 100644 --- a/ipa-multipoint/src/test/resources/genesis_lvl1_commits.json +++ b/ipa-multipoint/src/test/resources/genesis_lvl1_commits.json @@ -1,263 +1,263 @@ [ { "frs": [ - "6804eb758a6834682402efd3306f40205d3e208914dc6242598c29334706e317", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "f913346c72bd25712e65f06d1b3af29caba93dbf6d6238a4de580d062ae82815", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "cfcf1dac557008bfe3e138c07f6aee513ecb7fa76cdf3b6627a45d773221af16", - "6926c3580cbd0b8ddcc2d6b3971bdd6d66cc1f5468955ed99ee6f8a4787bee0f", - "34f35af8bb5d79f1ef0fbc6314e25e5bd9973039410c37642e75965e57eaf613", - "79bab5867b8c876cf222cbd4440cf23ea28e14911eda6ace29255485c68d6c0d", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "b27b809d70ecd8caaeceb1a118e06c888b26beba30a1ed9c2857e553d2f27204", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "100ea0af1c5e84c8e4e4a57d62ea4e0e2a846ff058d84fbb72af4c9dfdd2e90b", - "f551c21b8eac826da24ad039d3d1e43e27732f44278496150ebddeb59c2b5b1c", - "0000000000000000000000000000000000000000000000000000000000000000", - "66ee688526f1c945796476ec3b225066ff8aa46b41c804c5a728f2c1fb93e213", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "7d8c896683ab534908c834cf93f982e5c7acc3aaa3618ae25c5e63858a840c0b", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "951aa0ab3abc6d28c6779d49019eeecbd5b3f02d50cea9053915e8f77c253f11", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "cce33d24a1a6162583d3cd56cc54227b61f5d43e11306e530d0ddf63c4325502", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "5afca51cc950030eb8577852417abc5b03c13bc326b51c4b21661a6381f46204", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "734ab606ed9f81c05e55d2a1decd22515de3a9a25f25680473cb16fb849f9119", - "73e9b1fe6a07bd714ba797c2df6fec323d04adfb83a09eb99ff27b947b3cef0b", - "744c1232f7214bddfe519a0d4fcf58e1b6f9a43fef9ef837d579ec0c226e7100", - "40f13853e642b886de94989d6415db2296a63fd915dbc10d156dec6259a0a010", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "885a882cd82387d2d48bb5996385d13ba6839056f466e606d196adc0f7341c10", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "1ca40d490210f27de563a9432f2f35eb3cd61fc520bb6e0095a2103e3b30ef1c", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "8d3adc8eaf1ab925c696b973ad80e69ac8d24c07a5d1e31f5881f7ebfc524c18", - "0000000000000000000000000000000000000000000000000000000000000000", - "c0924920ba97ee5c368de6c5aefc41799e7c69d0a3364c469b2d05f0df551c02", - "ec8561dd487f2a6accba711c21c7d73bc7e4387d1e3a27f3ba0d96f784b0bb00", - "77c6bc9e77f752e9c84d14be74b8f58da7b9a123a55cf4c78932d0dfd493bc16", - "0000000000000000000000000000000000000000000000000000000000000000", - "fee0e226245b0fe4cc44014c963a5854fb09e70653f1e1904b13f4649a2cff15", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "ee9ad6ebf7c88769c4fd2a8bd8bb6d8bccd783669f6bc7b03e66612e92c1551b", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "d5bf1c5df2e759ae77114a6f9dfb38921c0733082e95722894478c3330bdd805", - "0000000000000000000000000000000000000000000000000000000000000000", - "2c85eb5b2e89bbdc021391bad369fb04e5d38391c7c64a43d65e9a48cd5ac309", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "40d892bb67b5114961c77ba193f4f2a831cf2b846878319ec6bef3bda3618101", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "c53ade35802ae96d3da3c823115d1699f8d65403fbf6d1e1afb413d1d74e6902", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "259bee776033b635d8ad20d0a60f8b956522fb8e5744afdf41d9b581a91f500f", - "afa223f9bb19b28f19a93a3f4987312d110914e711b0e22a1face4f083accc06", - "0000000000000000000000000000000000000000000000000000000000000000", - "d6ffde7385af58ff88ece551bc3087b5fee33eaca7fdbc4d07fac09536889f1a", - "0b13c7df0499b5e45127334093bd00d7433ccd4af2003bd19c68432435a00305", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "23aae423e3c11f8d55ef458750226ff729a0a885fa5f42106fc07fabd86c9215", - "9f350795a3b5d016450f38f8b4cb80812196b4cd592153f7d1824a67aceecc07", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "2a64add363f06ee37464c03c03ebf8960f8914100d65a4182b37d009870c491b", - "0000000000000000000000000000000000000000000000000000000000000000", - "ad71b2f7d44d93a91b403f09d1807781d558050c8098ae8f981d697e5d984b1b", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "6252588a86e0cc0f0a85cbb17b9aaf7221067ac9be2dcda54bd02def37a47f04", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "8896b1ce393298d698963d10f2b1762cfe307d85ff5da072c23a38a73800bc0c", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "d8c893199fd600521decfbd83f395f4307708f1ac693a744e4fb17f916a2980a", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "b29d1a9a3e2ca80366d3bac5967027c0f73e20621dbf52223dbe09fcbeb2c41a", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "b1169d1f69ced863edaeeb5e5e3ab182f0db6ffeecfbf0b6d92d320493715517", - "0000000000000000000000000000000000000000000000000000000000000000", - "49da68d107855ff0a2a070d27ff6dec1ce06508a473ad6abcb61608b3a6ef40b", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "a642044c22fef7d73dc90601e55869bf27bab6bbad8886d9dbd867dee775a91c", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "ea8212b2b06debe5b2f22a09efdd30d3168e40bde64293325b0768145276fc1b", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "4ea5a36feda6aa3d0d4d064e2e15b2fde61f09e05172cd9bab36fb0d7c41f21c", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "d8df19e4710a169a2c552f61324e4ea1ac75bd250cb657f1131975ac5cc0360b", - "0000000000000000000000000000000000000000000000000000000000000000", - "f9dbbc87679a9df86d30957588d34021560d2b647fc3e27b1d57c8cd54431517", - "58b2e3a8085bdb890e1a8707fca3f9181606133d2649f9834402b330b0af5008", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "2902c24bed8965db3072ce3d47a16a1895b310299de0d0f1526bbc308279ed06", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "995fbd502a2240fc93a28abbd5e8db3d47c1a10055ff39b54673dd494f195a09", - "69cc9b90218cb345c1d3e76fc65281da407c497fe55e9e6669138bb472aa2817", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "9cd54dedcdbf7f25450161252ef1aa9f21c57c3d2e57ec9446a725f69201770f", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "be987936f22b7831a31deb87196235c73154fcc868f3baddca59172e1a2cb60e", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "96ee35bfdf879e03dd8e0935a5ab79e630bd9e705f7dde688b93f904ff170e16", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "d1beca90feedf267051f1562265c00ee68fd295f2096be8a911335e9c2aaf618", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "952dd827e2de282fb0a1d646be3fe0b08327e19278c9612ec0acc822fc220e11", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "ba29c6b81b076ca8b6c29b4013020c4498a2a791a5f811f2aee229e434998c0c", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "965e417a8f8b76677bfc4465e42be5a5aaa240791bac332a37c315e122533101", - "27f9d8def3b0a689791e0ea0e3dc59b52af8130b97c2ef201e6b2eff6452b106", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "671a19bc18fb12bb196e1786db29262b618fcaf901ae5a8a161059fea83b3000", - "0000000000000000000000000000000000000000000000000000000000000000", - "b80ff70477de1e5c740423d32af228abcb34089509c5eb7d48d857c4531d9805", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "404e7cebebe577c4fb9c2eabda6d3b8660d0a9341821bed7cc6c0d9a745cee19", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "348dba1ce149073c41252085f9bff540d166419c8054ecdd7e58b03301c4eb19", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "b35f894047f9f8c66cf067f10064c83c9fd5d584f7824a5bc7d40cfbf37d3303", - "0000000000000000000000000000000000000000000000000000000000000000", - "0000000000000000000000000000000000000000000000000000000000000000", - "30412eeea515ccf55ba38935388cc79b2039d6829bc1400f214c3385722e780c", - "0000000000000000000000000000000000000000000000000000000000000000", - "d30e362e36577110b65c02532db153494a216a16989ebfbb5eeea57ab81fc506", - "0000000000000000000000000000000000000000000000000000000000000000" + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7e0", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7df", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7de", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7dd", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7dc", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7db", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7da", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7d9", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7d8", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7d7", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7d6", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7d5", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7d4", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7d3", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7d2", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7d1", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7d0", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7cf", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7ce", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7cd", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7cc", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7cb", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7ca", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7c9", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7c8", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7c7", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7c6", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7c5", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7c4", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7c3", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7c2", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7c1", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7c0", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7bf", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7be", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7bd", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7bc", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7bb", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7ba", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7b9", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7b8", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7b7", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7b6", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7b5", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7b4", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7b3", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7b2", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7b1", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7b0", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7af", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7ae", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7ad", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7ac", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7ab", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7aa", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7a9", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7a8", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7a7", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7a6", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7a5", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7a4", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7a3", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7a2", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7a1", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e7a0", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e79f", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e79e", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e79d", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e79c", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e79b", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e79a", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e799", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e798", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e797", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e796", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e795", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e794", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e793", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e792", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e791", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e790", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e78f", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e78e", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e78d", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e78c", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e78b", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e78a", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e789", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e788", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e787", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e786", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e785", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e784", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e783", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e782", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e781", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e780", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e77f", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e77e", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e77d", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e77c", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e77b", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e77a", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e779", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e778", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e777", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e776", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e775", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e774", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e773", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e772", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e771", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e770", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e76f", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e76e", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e76d", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e76c", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e76b", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e76a", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e769", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e768", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e767", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e766", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e765", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e764", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e763", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e762", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e761", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e760", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e75f", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e75e", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e75d", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e75c", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e75b", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e75a", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e759", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e758", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e757", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e756", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e755", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e754", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e753", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e752", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e751", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e750", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e74f", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e74e", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e74d", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e74c", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e74b", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e74a", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e749", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e748", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e747", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e746", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e745", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e744", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e743", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e742", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e741", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e740", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e73f", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e73e", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e73d", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e73c", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e73b", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e73a", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e739", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e738", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e737", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e736", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e735", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e734", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e733", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e732", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e731", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e730", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e72f", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e72e", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e72d", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e72c", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e72b", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e72a", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e729", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e728", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e727", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e726", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e725", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e724", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e723", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e722", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e721", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e720", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e71f", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e71e", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e71d", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e71c", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e71b", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e71a", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e719", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e718", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e717", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e716", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e715", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e714", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e713", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e712", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e711", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e710", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e70f", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e70e", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e70d", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e70c", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e70b", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e70a", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e709", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e708", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e707", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e706", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e705", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e704", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e703", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e702", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e701", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e700", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e6ff", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e6fe", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e6fd", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e6fc", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e6fb", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e6fa", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e6f9", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e6f8", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e6f7", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e6f6", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e6f5", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e6f4", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e6f3", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e6f2", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e6f1", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e6f0", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e6ef", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e6ee", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e6ed", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e6ec", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e6eb", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e6ea", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e6e9", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e6e8", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e6e7", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e6e6", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e6e5", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e6e4", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e6e3", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e6e2", + "1cfb69d4ca675f520cce760202687600ff8f87007419047174fd06b52876e6e1" ], - "expected": "2c06ec40c80f2f8dbb325d0e4ea33e9383e4ff60c49313e99fdf6dba7f0d718e" + "expected": "4aa25f88fc65a75a1a490f2579164ef2a2383256fe5742767f3fa72ac7e57344" } -] +] \ No newline at end of file From 9b1d055d7d8c983ec41e4bdfa7aa4f40bfd45aa8 Mon Sep 17 00:00:00 2001 From: Kevaundray Wedderburn Date: Wed, 24 Jan 2024 00:31:55 +0000 Subject: [PATCH 02/11] fix verkle commit Signed-off-by: Kevaundray Wedderburn --- ipa-multipoint/ipa_multipoint_jni/Cargo.toml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ipa-multipoint/ipa_multipoint_jni/Cargo.toml b/ipa-multipoint/ipa_multipoint_jni/Cargo.toml index b32ec522..ec539e4b 100644 --- a/ipa-multipoint/ipa_multipoint_jni/Cargo.toml +++ b/ipa-multipoint/ipa_multipoint_jni/Cargo.toml @@ -22,8 +22,8 @@ repository = "https://github.com/hyperledger/besu-native" edition = "2018" [dependencies] -verkle-spec = { git = "https://github.com/crate-crypto/rust-verkle", branch = "master" } -verkle-trie = { git = "https://github.com/crate-crypto/rust-verkle", branch = "master" } +verkle-spec = { git = "https://github.com/crate-crypto/rust-verkle", rev = "67d47d9e78f873da7c9e72687158468041059b5d" } +verkle-trie = { git = "https://github.com/crate-crypto/rust-verkle", rev = "67d47d9e78f873da7c9e72687158468041059b5d" } ipa-multipoint = { git = "https://github.com/crate-crypto/ipa_multipoint", branch = "banderwagon_migration" } banderwagon = { git = "https://github.com/crate-crypto/banderwagon" } bandersnatch = "0.1.1" @@ -31,11 +31,13 @@ ark-ff = { version = "^0.3.0", default-features = false } ark-ec = { version = "^0.3.0", default-features = false } ark-serialize = { version = "^0.3.0", default-features = false } ark-std = { version = "^0.3.0", default-features = false } -jni = { version = "0.19.0", features = ["invocation"] } # We use invocation in tests. +jni = { version = "0.19.0", features = [ + "invocation", +] } # We use invocation in tests. hex = "0.4.3" num-bigint = "0.4.4" [lib] name = "ipa_multipoint_jni" -crate-type = ["cdylib"] \ No newline at end of file +crate-type = ["cdylib"] From bfc2d0921a3eb1ae89201466b2312c044b77084d Mon Sep 17 00:00:00 2001 From: Kevaundray Wedderburn Date: Wed, 24 Jan 2024 00:44:02 +0000 Subject: [PATCH 03/11] modify pedersenHash result Signed-off-by: Kevaundray Wedderburn --- .../besu/nativelib/ipa_multipoint/LibIpaMultipointTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipa-multipoint/src/test/java/org/hyperledger/besu/nativelib/ipa_multipoint/LibIpaMultipointTest.java b/ipa-multipoint/src/test/java/org/hyperledger/besu/nativelib/ipa_multipoint/LibIpaMultipointTest.java index e2099e4b..46e64b04 100644 --- a/ipa-multipoint/src/test/java/org/hyperledger/besu/nativelib/ipa_multipoint/LibIpaMultipointTest.java +++ b/ipa-multipoint/src/test/java/org/hyperledger/besu/nativelib/ipa_multipoint/LibIpaMultipointTest.java @@ -73,6 +73,6 @@ public void testCallLibraryPedersenHash() { Bytes32 trieIndex = Bytes32.fromHexString("0x004C6CE0115457AC1AB82968749EB86ED2D984743D609647AE88299989F91271"); byte[] total = Bytes.wrap(address, trieIndex).toArray(); Bytes result = Bytes.of(LibIpaMultipoint.pedersenHash(total)); - assertThat(result).isEqualTo(Bytes32.fromHexString("0xbe9401ae598470e73d284279d01c8b49bf88565b14cb1a7ae829dbd78c3a5018")); + assertThat(result).isEqualTo(Bytes32.fromHexString("0xff6e8f1877fd27f91772a4cec41d99d2f835d7320e929b8d509c5fa7ce095c51")); } } From 5e21c880535cece5382dd6a2e0405b9ae5b65da6 Mon Sep 17 00:00:00 2001 From: Kevaundray Wedderburn Date: Fri, 19 Jan 2024 18:21:23 +0000 Subject: [PATCH 04/11] update bindings to use ffi_interface Signed-off-by: Kevaundray Wedderburn --- ipa-multipoint/ipa_multipoint_jni/Cargo.toml | 13 +- ipa-multipoint/ipa_multipoint_jni/src/lib.rs | 180 +++++++------------ 2 files changed, 63 insertions(+), 130 deletions(-) diff --git a/ipa-multipoint/ipa_multipoint_jni/Cargo.toml b/ipa-multipoint/ipa_multipoint_jni/Cargo.toml index ec539e4b..c99090e8 100644 --- a/ipa-multipoint/ipa_multipoint_jni/Cargo.toml +++ b/ipa-multipoint/ipa_multipoint_jni/Cargo.toml @@ -22,21 +22,14 @@ repository = "https://github.com/hyperledger/besu-native" edition = "2018" [dependencies] -verkle-spec = { git = "https://github.com/crate-crypto/rust-verkle", rev = "67d47d9e78f873da7c9e72687158468041059b5d" } -verkle-trie = { git = "https://github.com/crate-crypto/rust-verkle", rev = "67d47d9e78f873da7c9e72687158468041059b5d" } -ipa-multipoint = { git = "https://github.com/crate-crypto/ipa_multipoint", branch = "banderwagon_migration" } -banderwagon = { git = "https://github.com/crate-crypto/banderwagon" } -bandersnatch = "0.1.1" -ark-ff = { version = "^0.3.0", default-features = false } -ark-ec = { version = "^0.3.0", default-features = false } -ark-serialize = { version = "^0.3.0", default-features = false } -ark-std = { version = "^0.3.0", default-features = false } +ffi_interface = { git = "https://github.com/crate-crypto/rust-verkle", rev = "13dd7e9b4cb4491230fb0bda1759ef9c62938f28" } +ipa-multipoint = { git = "https://github.com/crate-crypto/rust-verkle", rev = "13dd7e9b4cb4491230fb0bda1759ef9c62938f28" } jni = { version = "0.19.0", features = [ "invocation", ] } # We use invocation in tests. hex = "0.4.3" num-bigint = "0.4.4" - +once_cell = "1.19.0" [lib] name = "ipa_multipoint_jni" diff --git a/ipa-multipoint/ipa_multipoint_jni/src/lib.rs b/ipa-multipoint/ipa_multipoint_jni/src/lib.rs index 769104e8..ae5ddf5d 100644 --- a/ipa-multipoint/ipa_multipoint_jni/src/lib.rs +++ b/ipa-multipoint/ipa_multipoint_jni/src/lib.rs @@ -12,23 +12,27 @@ * * SPDX-License-Identifier: Apache-2.0 */ -use ark_ff::PrimeField; -use banderwagon::{Fr, multi_scalar_mul}; -use ipa_multipoint::crs::CRS; -use verkle_spec::*; -// use crate::{vergroup_to_field}; -use ark_serialize::CanonicalSerialize; -use verkle_trie::*; -// use group_to_field; +use std::convert::TryInto; -use jni::JNIEnv; +use ipa_multipoint::committer::DefaultCommitter; +use ipa_multipoint::crs::CRS; use jni::objects::JClass; use jni::sys::jbyteArray; +use jni::JNIEnv; +use once_cell::sync::Lazy; +pub struct Config { + committer: DefaultCommitter, +} -// Copied from rust-verkle: https://github.com/crate-crypto/rust-verkle/blob/581200474327f5d12629ac2e1691eff91f944cec/verkle-trie/src/constants.rs#L12 -const PEDERSEN_SEED: &'static [u8] = b"eth_verkle_oct_2021"; +// TODO: Use a pointer here instead. This is only being used so that the interface does not get changed. +// TODO: and bindings do not need to be modified. +pub static CONFIG: Lazy = Lazy::new(|| { + let crs = CRS::default(); + let committer = DefaultCommitter::new(&crs.G); + Config { committer } +}); /// Pedersen hash receives an address and a trie index and returns a hash calculated this way: /// H(constant || address_low || address_high || trie_index_low || trie_index_high) @@ -45,130 +49,66 @@ pub extern "system" fn Java_org_hyperledger_besu_nativelib_ipamultipoint_LibIpaM _class: JClass, input: jbyteArray, ) -> jbyteArray { - let input = env.convert_byte_array(input).unwrap(); - let mut address32 = [0u8; 32]; - - address32.copy_from_slice(&input[0..32]); - - let mut trie_index= [0u8; 32]; - - trie_index.copy_from_slice(&input[32..64]); - trie_index.reverse(); // reverse for little endian per specs - - let base_hash = hash_addr_int(&address32, &trie_index); - - let result = base_hash.as_fixed_bytes(); - let output = env.byte_array_from_slice(result).unwrap(); - output -} - -// Helper function to hash an address and an integer taken from rust-verkle/verkle-specs. -pub(crate) fn hash_addr_int(addr: &[u8; 32], integer: &[u8; 32]) -> H256 { - - let address_bytes = addr; + let committer = &CONFIG.committer; - let integer_bytes = integer; - let mut hash_input = [0u8; 64]; - let (first_half, second_half) = hash_input.split_at_mut(32); + let input: [u8; 64] = match input.try_into() { + Ok(input) => input, + Err(_) => { + env.throw_new( + "java/lang/IllegalArgumentException", + "Invalid input length. Should be 64-bytes.", + ) + .expect("Failed to throw exception"); + return std::ptr::null_mut(); // Return null pointer to indicate an error + } + }; - // Copy address and index into slice, then hash it - first_half.copy_from_slice(address_bytes); - second_half.copy_from_slice(integer_bytes); + let hash = ffi_interface::get_tree_key_hash(committer, input); - hash64(hash_input) + env.byte_array_from_slice(&hash).unwrap() } /// Commit receives a list of 32 byte scalars and returns a 32 byte scalar /// Scalar is actually the map_to_field(commitment) because we want to reuse the commitment in parent node. /// This is ported from rust-verkle. #[no_mangle] -pub extern "system" fn Java_org_hyperledger_besu_nativelib_ipamultipoint_LibIpaMultipoint_commit(env: JNIEnv, - _class: JClass<'_>, - input: jbyteArray) - -> jbyteArray { - // Input should be a multiple of 32-be-bytes. - let inp = env.convert_byte_array(input).expect("Cannot convert jbyteArray to rust array"); - let len = inp.len(); - if len % 32 != 0 { - env.throw_new("java/lang/IllegalArgumentException", "Invalid input length. Should be a multiple of 32-bytes.") - .expect("Failed to throw exception"); - return std::ptr::null_mut(); // Return null pointer to indicate an error - } - let n_scalars = len / 32; - if n_scalars > 256 { - env.throw_new("java/lang/IllegalArgumentException", "Invalid input length. Should be at most 256 elements of 32-bytes.") - .expect("Failed to throw exception"); - return std::ptr::null_mut(); // Return null pointer to indicate an error - } - - // Each 32-be-bytes are interpreted as field elements. - let mut scalars: Vec = Vec::with_capacity(n_scalars); - for b in inp.chunks(32) { - scalars.push(Fr::from_be_bytes_mod_order(b)); - } - - // Committing all values at once. - let bases = CRS::new(n_scalars, PEDERSEN_SEED); - let commit = multi_scalar_mul(&bases.G, &scalars); - - // Serializing via x/y in projective coordinates, to int and to scalars. - let scalar = group_to_field(&commit); - let mut scalar_bytes = [0u8; 32]; - scalar.serialize(&mut scalar_bytes[..]).expect("could not serialise Fr into a 32 byte array"); - scalar_bytes.reverse(); - - return env.byte_array_from_slice(&scalar_bytes).expect("Couldn't convert to byte array"); -} +pub extern "system" fn Java_org_hyperledger_besu_nativelib_ipamultipoint_LibIpaMultipoint_commit( + env: JNIEnv, + _class: JClass<'_>, + input: jbyteArray, +) -> jbyteArray { + let input = env + .convert_byte_array(input) + .expect("Cannot convert jbyteArray to rust array"); + let committer = &CONFIG.committer; + + let commitment = ffi_interface::commit_to_scalars(committer, &input).unwrap(); + let hash = ffi_interface::hash_commitment(commitment); + + env.byte_array_from_slice(&hash) + .expect("Couldn't convert to byte array") +} /// Commit_root receives a list of 32 byte scalars and returns a 32 byte commitment.to_bytes() /// This is ported from rust-verkle. #[no_mangle] -pub extern "system" fn Java_org_hyperledger_besu_nativelib_ipamultipoint_LibIpaMultipoint_commitRoot(env: JNIEnv, - _class: JClass<'_>, - input: jbyteArray) - -> jbyteArray { - // Input should be a multiple of 32-be-bytes. - let inp = env.convert_byte_array(input).expect("Cannot convert jbyteArray to rust array"); - let len = inp.len(); - if len % 32 != 0 { - env.throw_new("java/lang/IllegalArgumentException", "Invalid input length. Should be a multiple of 32-bytes.") - .expect("Failed to throw exception"); - return std::ptr::null_mut(); // Return null pointer to indicate an error - } - let n_scalars = len / 32; - if n_scalars > 256 { - env.throw_new("java/lang/IllegalArgumentException", "Invalid input length. Should be at most 256 elements of 32-bytes.") - .expect("Failed to throw exception"); - return std::ptr::null_mut(); // Return null pointer to indicate an error - } - - // Each 32-be-bytes are interpreted as field elements. - let mut scalars: Vec = Vec::with_capacity(n_scalars); - for b in inp.chunks(32) { - scalars.push(Fr::from_be_bytes_mod_order(b)); - } - - // Committing all values at once. - let bases = CRS::new(n_scalars, PEDERSEN_SEED); - let commit = multi_scalar_mul(&bases.G, &scalars); - - // Serializing using first affine coordinate - let commit_bytes = commit.to_bytes(); - - return env.byte_array_from_slice(&commit_bytes).expect("Couldn't convert to byte array"); -} +pub extern "system" fn Java_org_hyperledger_besu_nativelib_ipamultipoint_LibIpaMultipoint_commitRoot( + env: JNIEnv, + _class: JClass<'_>, + input: jbyteArray, +) -> jbyteArray { + let input = env + .convert_byte_array(input) + .expect("Cannot convert jbyteArray to rust array"); + + let committer = &CONFIG.committer; + let commitment = ffi_interface::commit_to_scalars(committer, &input).unwrap(); + let hash = ffi_interface::deprecated_serialize_commitment(commitment); -// Note: This is a 2 to 1 map, but the two preimages are identified to be the same -// TODO: Create a document showing that this poses no problems -pub(crate)fn group_to_field(point: &Element) -> Fr { - let base_field = point.map_to_field(); - let mut bytes = [0u8; 32]; - base_field - .serialize(&mut bytes[..]) - .expect("could not serialise point into a 32 byte array"); - Fr::from_le_bytes_mod_order(&bytes) -} \ No newline at end of file + env.byte_array_from_slice(&hash) + .expect("Couldn't convert to byte array") +} From ddc9d9faead57833fd4d07e5fd987e74b78b25b3 Mon Sep 17 00:00:00 2001 From: Kevaundray Wedderburn Date: Tue, 23 Jan 2024 15:01:52 +0000 Subject: [PATCH 05/11] use rust 1.75.0 Signed-off-by: Kevaundray Wedderburn --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2d351f05..45bbdc2a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,7 +27,7 @@ jobs: export PATH=$GOROOT/bin:$PATH # rust dependencies export CARGO_HOME="$HOME/.cargo" - curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain 1.68.2 + curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain 1.75.0 - name: Checkout Repo uses: actions/checkout@v4 with: @@ -123,7 +123,7 @@ jobs: brew install go@1.20 || true # rust dependencies export CARGO_HOME="$HOME/.cargo" - curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain 1.68.2 + curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain 1.75.0 # install both x86 and arm64 toolchains export PATH="$HOME/.cargo/bin:$PATH" rustup target add x86_64-apple-darwin @@ -189,7 +189,7 @@ jobs: brew install go@1.20 || true # rust dependencies export CARGO_HOME="$HOME/.cargo" - curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain 1.68.2 + curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain 1.75.0 # install both x86 and arm64 toolchains export PATH="$HOME/.cargo/bin:$PATH" rustup target add x86_64-apple-darwin From 516c16553241275cecd9a2b04333f3ece93b5e10 Mon Sep 17 00:00:00 2001 From: Kevaundray Wedderburn Date: Sun, 28 Jan 2024 19:57:09 +0000 Subject: [PATCH 06/11] reverse the endian for the tree_index Signed-off-by: Kevaundray Wedderburn --- ipa-multipoint/ipa_multipoint_jni/src/lib.rs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/ipa-multipoint/ipa_multipoint_jni/src/lib.rs b/ipa-multipoint/ipa_multipoint_jni/src/lib.rs index ae5ddf5d..09a9305f 100644 --- a/ipa-multipoint/ipa_multipoint_jni/src/lib.rs +++ b/ipa-multipoint/ipa_multipoint_jni/src/lib.rs @@ -53,7 +53,7 @@ pub extern "system" fn Java_org_hyperledger_besu_nativelib_ipamultipoint_LibIpaM let committer = &CONFIG.committer; - let input: [u8; 64] = match input.try_into() { + let mut input: [u8; 64] = match input.try_into() { Ok(input) => input, Err(_) => { env.throw_new( @@ -65,8 +65,17 @@ pub extern "system" fn Java_org_hyperledger_besu_nativelib_ipamultipoint_LibIpaM } }; - let hash = ffi_interface::get_tree_key_hash(committer, input); + // The tree_index is interpreted as a little endian integer + // But its given in big endian format. + // The tree_index is the last 32 bytes of the input, + // so we use this method to reverse its endian + fn reverse_last_32_bytes(arr: &mut [u8; 64]) { + let last_32 = &mut arr[32..]; + last_32.reverse(); + } + reverse_last_32_bytes(&mut input); + let hash = ffi_interface::get_tree_key_hash(committer, input); env.byte_array_from_slice(&hash).unwrap() } From d3b086769b955c065daef037851a650c0ffd9f15 Mon Sep 17 00:00:00 2001 From: Kevaundray Wedderburn Date: Sun, 28 Jan 2024 21:28:20 +0000 Subject: [PATCH 07/11] point to commit on master which uses little endian on master Signed-off-by: Kevaundray Wedderburn --- ipa-multipoint/ipa_multipoint_jni/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ipa-multipoint/ipa_multipoint_jni/Cargo.toml b/ipa-multipoint/ipa_multipoint_jni/Cargo.toml index c99090e8..d99d3e2c 100644 --- a/ipa-multipoint/ipa_multipoint_jni/Cargo.toml +++ b/ipa-multipoint/ipa_multipoint_jni/Cargo.toml @@ -22,8 +22,8 @@ repository = "https://github.com/hyperledger/besu-native" edition = "2018" [dependencies] -ffi_interface = { git = "https://github.com/crate-crypto/rust-verkle", rev = "13dd7e9b4cb4491230fb0bda1759ef9c62938f28" } -ipa-multipoint = { git = "https://github.com/crate-crypto/rust-verkle", rev = "13dd7e9b4cb4491230fb0bda1759ef9c62938f28" } +ffi_interface = { git = "https://github.com/crate-crypto/rust-verkle", rev = "ea7d2bd" } +ipa-multipoint = { git = "https://github.com/crate-crypto/rust-verkle", rev = "ea7d2bd" } jni = { version = "0.19.0", features = [ "invocation", ] } # We use invocation in tests. From 659d0f0bb29d004291bbf8e138984457488c192c Mon Sep 17 00:00:00 2001 From: Kevaundray Wedderburn Date: Sun, 28 Jan 2024 21:28:52 +0000 Subject: [PATCH 08/11] modify jni library to use little endian version of rust-verkle Signed-off-by: Kevaundray Wedderburn --- ipa-multipoint/ipa_multipoint_jni/src/lib.rs | 25 ++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/ipa-multipoint/ipa_multipoint_jni/src/lib.rs b/ipa-multipoint/ipa_multipoint_jni/src/lib.rs index 09a9305f..31f22abf 100644 --- a/ipa-multipoint/ipa_multipoint_jni/src/lib.rs +++ b/ipa-multipoint/ipa_multipoint_jni/src/lib.rs @@ -75,7 +75,7 @@ pub extern "system" fn Java_org_hyperledger_besu_nativelib_ipamultipoint_LibIpaM } reverse_last_32_bytes(&mut input); - let hash = ffi_interface::get_tree_key_hash(committer, input); + let hash = ffi_interface::get_tree_key_hash_flat_input(committer, input); env.byte_array_from_slice(&hash).unwrap() } @@ -88,14 +88,19 @@ pub extern "system" fn Java_org_hyperledger_besu_nativelib_ipamultipoint_LibIpaM _class: JClass<'_>, input: jbyteArray, ) -> jbyteArray { - let input = env + let mut input = env .convert_byte_array(input) .expect("Cannot convert jbyteArray to rust array"); let committer = &CONFIG.committer; + reverse_scalars_endian(&mut input); let commitment = ffi_interface::commit_to_scalars(committer, &input).unwrap(); - let hash = ffi_interface::hash_commitment(commitment); + + let mut hash = ffi_interface::hash_commitment(commitment); + // TODO(Big-Endian): The output of `hash_commitment` is a scalar serialized + // TODO(Big-Endian): in little endian. The previous implementation used big endian. + hash.reverse(); env.byte_array_from_slice(&hash) .expect("Couldn't convert to byte array") @@ -109,11 +114,12 @@ pub extern "system" fn Java_org_hyperledger_besu_nativelib_ipamultipoint_LibIpaM _class: JClass<'_>, input: jbyteArray, ) -> jbyteArray { - let input = env + let mut input = env .convert_byte_array(input) .expect("Cannot convert jbyteArray to rust array"); let committer = &CONFIG.committer; + reverse_scalars_endian(&mut input); let commitment = ffi_interface::commit_to_scalars(committer, &input).unwrap(); let hash = ffi_interface::deprecated_serialize_commitment(commitment); @@ -121,3 +127,14 @@ pub extern "system" fn Java_org_hyperledger_besu_nativelib_ipamultipoint_LibIpaM env.byte_array_from_slice(&hash) .expect("Couldn't convert to byte array") } + +// TODO(Big-Endian): rust-verkle now uses Little-Endian for scalars. +// TODO(Big-Endian): We switch the endianness here to match the old implementation. +// TODO(Big-Endian): Doing the switch here allows use to restrict the changes to just this part of the code, until +// TODO(Big-Endian): we are ready to change besu-verkle and other parts of the code to use little endian input. +fn reverse_scalars_endian(scalars: &mut [u8]) { + const SCALAR_SIZE: usize = 32; + for scalar in scalars.chunks_exact_mut(SCALAR_SIZE) { + scalar.reverse(); + } +} From 2faf406e564c1621ceefa4857ef1a2badefd43dc Mon Sep 17 00:00:00 2001 From: Kevaundray Wedderburn Date: Sun, 28 Jan 2024 22:29:21 +0000 Subject: [PATCH 09/11] update commit Signed-off-by: Kevaundray Wedderburn --- ipa-multipoint/ipa_multipoint_jni/Cargo.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ipa-multipoint/ipa_multipoint_jni/Cargo.toml b/ipa-multipoint/ipa_multipoint_jni/Cargo.toml index d99d3e2c..8c8b787c 100644 --- a/ipa-multipoint/ipa_multipoint_jni/Cargo.toml +++ b/ipa-multipoint/ipa_multipoint_jni/Cargo.toml @@ -22,8 +22,7 @@ repository = "https://github.com/hyperledger/besu-native" edition = "2018" [dependencies] -ffi_interface = { git = "https://github.com/crate-crypto/rust-verkle", rev = "ea7d2bd" } -ipa-multipoint = { git = "https://github.com/crate-crypto/rust-verkle", rev = "ea7d2bd" } +ffi_interface = { git = "https://github.com/crate-crypto/rust-verkle", rev = "185ccf14678ae4d2277547e2f2615933f10553b5" } jni = { version = "0.19.0", features = [ "invocation", ] } # We use invocation in tests. From 9fa6c5de08de27fb00686d06e77570feef947342 Mon Sep 17 00:00:00 2001 From: Kevaundray Wedderburn Date: Sun, 28 Jan 2024 22:29:42 +0000 Subject: [PATCH 10/11] use Context object in ffi_interface Signed-off-by: Kevaundray Wedderburn --- ipa-multipoint/ipa_multipoint_jni/src/lib.rs | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/ipa-multipoint/ipa_multipoint_jni/src/lib.rs b/ipa-multipoint/ipa_multipoint_jni/src/lib.rs index 31f22abf..b0087024 100644 --- a/ipa-multipoint/ipa_multipoint_jni/src/lib.rs +++ b/ipa-multipoint/ipa_multipoint_jni/src/lib.rs @@ -15,24 +15,14 @@ use std::convert::TryInto; -use ipa_multipoint::committer::DefaultCommitter; -use ipa_multipoint::crs::CRS; use jni::objects::JClass; use jni::sys::jbyteArray; use jni::JNIEnv; use once_cell::sync::Lazy; -pub struct Config { - committer: DefaultCommitter, -} - // TODO: Use a pointer here instead. This is only being used so that the interface does not get changed. // TODO: and bindings do not need to be modified. -pub static CONFIG: Lazy = Lazy::new(|| { - let crs = CRS::default(); - let committer = DefaultCommitter::new(&crs.G); - Config { committer } -}); +pub static CONFIG: Lazy = Lazy::new(|| ffi_interface::Context::default()); /// Pedersen hash receives an address and a trie index and returns a hash calculated this way: /// H(constant || address_low || address_high || trie_index_low || trie_index_high) From 8d0c85ade3be1d58fff04bb8526e20e340c75626 Mon Sep 17 00:00:00 2001 From: kevaundray Date: Mon, 29 Jan 2024 11:36:02 +0000 Subject: [PATCH 11/11] chore: Modify test vectors to use canonical scalars for their input (#142) Modify test vectors to use valid scalars --------- Signed-off-by: Kevaundray Wedderburn --- .../besu/nativelib/ipa_multipoint/CommitRootTest.java | 2 +- .../{genesis_lvl1_commits.json => commit_root_test.json} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename ipa-multipoint/src/test/resources/{genesis_lvl1_commits.json => commit_root_test.json} (100%) diff --git a/ipa-multipoint/src/test/java/org/hyperledger/besu/nativelib/ipa_multipoint/CommitRootTest.java b/ipa-multipoint/src/test/java/org/hyperledger/besu/nativelib/ipa_multipoint/CommitRootTest.java index 3b3fc95d..4f8e8898 100644 --- a/ipa-multipoint/src/test/java/org/hyperledger/besu/nativelib/ipa_multipoint/CommitRootTest.java +++ b/ipa-multipoint/src/test/java/org/hyperledger/besu/nativelib/ipa_multipoint/CommitRootTest.java @@ -35,7 +35,7 @@ public class CommitRootTest { private static final ObjectMapper objectMapper = new ObjectMapper(); public static List JsonData() throws IOException { - InputStream inputStream = PedersenCommitmentTest.class.getResourceAsStream("/genesis_lvl1_commits.json"); + InputStream inputStream = PedersenCommitmentTest.class.getResourceAsStream("/commit_root_test.json"); return objectMapper.readValue(inputStream, new TypeReference>() { }); } diff --git a/ipa-multipoint/src/test/resources/genesis_lvl1_commits.json b/ipa-multipoint/src/test/resources/commit_root_test.json similarity index 100% rename from ipa-multipoint/src/test/resources/genesis_lvl1_commits.json rename to ipa-multipoint/src/test/resources/commit_root_test.json