From df8786ec502bebc25b8ad832258cd5463b1e03c3 Mon Sep 17 00:00:00 2001 From: pmantica11 <151664502+pmantica11@users.noreply.github.com> Date: Tue, 23 Jul 2024 18:22:21 -0500 Subject: [PATCH] Add the slot value to getValidityProof (#147) * Fix concurrency * Reformat getValidityProof * Reformat the get validity proof field --- src/api/api.rs | 6 +- src/api/method/get_validity_proof.rs | 23 +++++-- tests/integration_tests/e2e_tests.rs | 6 +- tests/integration_tests/mock_tests.rs | 2 +- ...egacy_transactions-bob-validity-proof.snap | 53 ++++++++------- ...y_transactions-charles-validity-proof.snap | 53 ++++++++------- ...r_new_transactions-bob-validity-proof.snap | 53 ++++++++------- ...w_transactions-charles-validity-proof.snap | 53 ++++++++------- ...ssing_token_accounts-bob-accounts.snap.new | 65 ------------------- ...amport_transfers-payer-validity-proof.snap | 43 ++++++------ ...ort_transfers-receiver-validity-proof.snap | 53 ++++++++------- ...address_proofs_interop-validity-proof.snap | 43 ++++++------ 12 files changed, 219 insertions(+), 234 deletions(-) delete mode 100644 tests/integration_tests/snapshots/integration_tests__e2e_tests__e2e_mint_bug_missing_token_accounts-bob-accounts.snap.new diff --git a/src/api/api.rs b/src/api/api.rs index 72860a13..7ee2d43f 100644 --- a/src/api/api.rs +++ b/src/api/api.rs @@ -36,7 +36,7 @@ use super::method::get_transaction_with_compression_info::{ get_transaction_with_compression_info, GetTransactionRequest, GetTransactionResponse, }; use super::method::get_validity_proof::{ - get_validity_proof, CompressedProofWithContext, GetValidityProofRequest, + get_validity_proof, GetValidityProofRequest, GetValidityProofResponse, }; use super::method::utils::GetLatestSignaturesRequest; use super::method::utils::{AccountBalanceResponse, GetPaginatedSignaturesResponse, HashRequest}; @@ -276,7 +276,7 @@ impl PhotonApi { pub async fn get_validity_proof( &self, request: GetValidityProofRequest, - ) -> Result { + ) -> Result { get_validity_proof(self.db_conn.as_ref(), &self.prover_url, request).await } @@ -319,7 +319,7 @@ impl PhotonApi { OpenApiSpec { name: "getValidityProof".to_string(), request: Some(GetValidityProofRequest::schema().1), - response: CompressedProofWithContext::schema().1, + response: GetValidityProofResponse::schema().1, }, OpenApiSpec { name: "getCompressedTokenAccountsByOwner".to_string(), diff --git a/src/api/method/get_validity_proof.rs b/src/api/method/get_validity_proof.rs index e7754487..eb9839bf 100644 --- a/src/api/method/get_validity_proof.rs +++ b/src/api/method/get_validity_proof.rs @@ -13,8 +13,11 @@ use serde::{Deserialize, Serialize}; use std::str::FromStr; use utoipa::ToSchema; -use super::get_multiple_new_address_proofs::{ - get_multiple_new_address_proofs_helper, MerkleContextWithNewAddressProof, +use super::{ + get_multiple_new_address_proofs::{ + get_multiple_new_address_proofs_helper, MerkleContextWithNewAddressProof, + }, + utils::Context, }; lazy_static! { @@ -249,16 +252,24 @@ pub struct GetValidityProofRequest { pub newAddresses: Vec, } +#[derive(Serialize, Deserialize, ToSchema)] +#[serde(deny_unknown_fields, rename_all = "camelCase")] +pub struct GetValidityProofResponse { + pub value: CompressedProofWithContext, + pub context: Context, +} + pub async fn get_validity_proof( conn: &DatabaseConnection, prover_url: &str, request: GetValidityProofRequest, -) -> Result { +) -> Result { if request.hashes.is_empty() && request.newAddresses.is_empty() { return Err(PhotonApiError::UnexpectedError( "No hashes or new addresses provided for proof generation".to_string(), )); } + let context = Context::extract(conn).await?; let client = Client::new(); let tx = conn.begin().await?; if tx.get_database_backend() == DatabaseBackend::Postgres { @@ -328,7 +339,7 @@ pub async fn get_validity_proof( #[allow(non_snake_case)] let compressedProof = negate_and_compress_proof(proof); - Ok(CompressedProofWithContext { + let compressed_proof_with_context = CompressedProofWithContext { compressedProof, roots: account_proofs .iter() @@ -368,5 +379,9 @@ pub async fn get_validity_proof( .map(|x| x.merkleTree.clone().to_string()), ) .collect(), + }; + Ok(GetValidityProofResponse { + value: compressed_proof_with_context, + context, }) } diff --git a/tests/integration_tests/e2e_tests.rs b/tests/integration_tests/e2e_tests.rs index 66c0e25e..af7da046 100644 --- a/tests/integration_tests/e2e_tests.rs +++ b/tests/integration_tests/e2e_tests.rs @@ -122,7 +122,7 @@ async fn test_e2e_mint_and_transfer_legacy_transactions( .await .unwrap(); // The Gnark prover has some randomness. - validity_proof.compressedProof = CompressedProof::default(); + validity_proof.value.compressedProof = CompressedProof::default(); assert_json_snapshot!( format!("{}-{}-validity-proof", name.clone(), person), @@ -326,7 +326,7 @@ async fn test_e2e_mint_and_transfer_new_transactions( .await .unwrap(); // The Gnark prover has some randomness. - validity_proof.compressedProof = CompressedProof::default(); + validity_proof.value.compressedProof = CompressedProof::default(); assert_json_snapshot!( format!("{}-{}-validity-proof", name.clone(), person), @@ -538,7 +538,7 @@ async fn test_lamport_transfers( hash_list.0.len() )); // The Gnark prover has some randomness. - validity_proof.compressedProof = CompressedProof::default(); + validity_proof.value.compressedProof = CompressedProof::default(); assert_json_snapshot!( format!("{}-{}-validity-proof", name.clone(), owner_name), diff --git a/tests/integration_tests/mock_tests.rs b/tests/integration_tests/mock_tests.rs index 8f3aa617..95f4ad38 100644 --- a/tests/integration_tests/mock_tests.rs +++ b/tests/integration_tests/mock_tests.rs @@ -807,7 +807,7 @@ async fn test_get_multiple_new_address_proofs_interop( .await .unwrap(); // The Gnark prover has some randomness. - validity_proof.compressedProof = CompressedProof::default(); + validity_proof.value.compressedProof = CompressedProof::default(); insta::assert_json_snapshot!(format!("{}-validity-proof", name), validity_proof); } diff --git a/tests/integration_tests/snapshots/integration_tests__e2e_tests__e2e_mint_and_transfer_legacy_transactions-bob-validity-proof.snap b/tests/integration_tests/snapshots/integration_tests__e2e_tests__e2e_mint_and_transfer_legacy_transactions-bob-validity-proof.snap index f4bb5e0d..bd044805 100644 --- a/tests/integration_tests/snapshots/integration_tests__e2e_tests__e2e_mint_and_transfer_legacy_transactions-bob-validity-proof.snap +++ b/tests/integration_tests/snapshots/integration_tests__e2e_tests__e2e_mint_and_transfer_legacy_transactions-bob-validity-proof.snap @@ -3,29 +3,34 @@ source: tests/integration_tests/e2e_tests.rs expression: validity_proof --- { - "compressedProof": { - "a": [], - "b": [], - "c": [] + "value": { + "compressedProof": { + "a": [], + "b": [], + "c": [] + }, + "roots": [ + "jQKhAHpGbSTJLimk3bGSX7KLi7CsX6nkosS9YeCFfVs", + "jQKhAHpGbSTJLimk3bGSX7KLi7CsX6nkosS9YeCFfVs" + ], + "rootIndices": [ + 7, + 7 + ], + "leafIndices": [ + 3, + 6 + ], + "leaves": [ + "JsiSYnfKzmaxKvU8vhqsM6PiuPEFVVVwAsNcPUtDo64", + "2hXgiYUBfsVEreTuq8PKumwE1dUkkeACw4HVf9ZZoi1H" + ], + "merkleTrees": [ + "5bdFnXU47QjzGpzHfXnxcEi5WXyxzEAZzd1vrE39bf1W", + "5bdFnXU47QjzGpzHfXnxcEi5WXyxzEAZzd1vrE39bf1W" + ] }, - "roots": [ - "jQKhAHpGbSTJLimk3bGSX7KLi7CsX6nkosS9YeCFfVs", - "jQKhAHpGbSTJLimk3bGSX7KLi7CsX6nkosS9YeCFfVs" - ], - "rootIndices": [ - 7, - 7 - ], - "leafIndices": [ - 3, - 6 - ], - "leaves": [ - "JsiSYnfKzmaxKvU8vhqsM6PiuPEFVVVwAsNcPUtDo64", - "2hXgiYUBfsVEreTuq8PKumwE1dUkkeACw4HVf9ZZoi1H" - ], - "merkleTrees": [ - "5bdFnXU47QjzGpzHfXnxcEi5WXyxzEAZzd1vrE39bf1W", - "5bdFnXU47QjzGpzHfXnxcEi5WXyxzEAZzd1vrE39bf1W" - ] + "context": { + "slot": 0 + } } diff --git a/tests/integration_tests/snapshots/integration_tests__e2e_tests__e2e_mint_and_transfer_legacy_transactions-charles-validity-proof.snap b/tests/integration_tests/snapshots/integration_tests__e2e_tests__e2e_mint_and_transfer_legacy_transactions-charles-validity-proof.snap index 62d9e041..7518c027 100644 --- a/tests/integration_tests/snapshots/integration_tests__e2e_tests__e2e_mint_and_transfer_legacy_transactions-charles-validity-proof.snap +++ b/tests/integration_tests/snapshots/integration_tests__e2e_tests__e2e_mint_and_transfer_legacy_transactions-charles-validity-proof.snap @@ -3,29 +3,34 @@ source: tests/integration_tests/e2e_tests.rs expression: validity_proof --- { - "compressedProof": { - "a": [], - "b": [], - "c": [] + "value": { + "compressedProof": { + "a": [], + "b": [], + "c": [] + }, + "roots": [ + "jQKhAHpGbSTJLimk3bGSX7KLi7CsX6nkosS9YeCFfVs", + "jQKhAHpGbSTJLimk3bGSX7KLi7CsX6nkosS9YeCFfVs" + ], + "rootIndices": [ + 7, + 7 + ], + "leafIndices": [ + 5, + 4 + ], + "leaves": [ + "2uSjtTXvYYb544CrvmDsTJ98M8qdw8SFmZ5muEHnZET9", + "3a6Rs5JJ66YWEHuYm4KQuhbHAFnUszWiL8kgzV4MHFZW" + ], + "merkleTrees": [ + "5bdFnXU47QjzGpzHfXnxcEi5WXyxzEAZzd1vrE39bf1W", + "5bdFnXU47QjzGpzHfXnxcEi5WXyxzEAZzd1vrE39bf1W" + ] }, - "roots": [ - "jQKhAHpGbSTJLimk3bGSX7KLi7CsX6nkosS9YeCFfVs", - "jQKhAHpGbSTJLimk3bGSX7KLi7CsX6nkosS9YeCFfVs" - ], - "rootIndices": [ - 7, - 7 - ], - "leafIndices": [ - 5, - 4 - ], - "leaves": [ - "2uSjtTXvYYb544CrvmDsTJ98M8qdw8SFmZ5muEHnZET9", - "3a6Rs5JJ66YWEHuYm4KQuhbHAFnUszWiL8kgzV4MHFZW" - ], - "merkleTrees": [ - "5bdFnXU47QjzGpzHfXnxcEi5WXyxzEAZzd1vrE39bf1W", - "5bdFnXU47QjzGpzHfXnxcEi5WXyxzEAZzd1vrE39bf1W" - ] + "context": { + "slot": 0 + } } diff --git a/tests/integration_tests/snapshots/integration_tests__e2e_tests__e2e_mint_and_transfer_new_transactions-bob-validity-proof.snap b/tests/integration_tests/snapshots/integration_tests__e2e_tests__e2e_mint_and_transfer_new_transactions-bob-validity-proof.snap index 786a8d4d..f9acef89 100644 --- a/tests/integration_tests/snapshots/integration_tests__e2e_tests__e2e_mint_and_transfer_new_transactions-bob-validity-proof.snap +++ b/tests/integration_tests/snapshots/integration_tests__e2e_tests__e2e_mint_and_transfer_new_transactions-bob-validity-proof.snap @@ -3,29 +3,34 @@ source: tests/integration_tests/e2e_tests.rs expression: validity_proof --- { - "compressedProof": { - "a": [], - "b": [], - "c": [] + "value": { + "compressedProof": { + "a": [], + "b": [], + "c": [] + }, + "roots": [ + "ZMg67iuQAyRUALR4TmAMyWGVEXV2e8yCpRSqdnR8Y1n", + "ZMg67iuQAyRUALR4TmAMyWGVEXV2e8yCpRSqdnR8Y1n" + ], + "rootIndices": [ + 7, + 7 + ], + "leafIndices": [ + 6, + 3 + ], + "leaves": [ + "2WfNf8qZoMNGR4mAPX8toADTdRpcKYTX1KUUAEHMi7dJ", + "36ewgEJTqSu4enYGWUcxm4CYezR3kgfHBeV29WiEgKaY" + ], + "merkleTrees": [ + "5bdFnXU47QjzGpzHfXnxcEi5WXyxzEAZzd1vrE39bf1W", + "5bdFnXU47QjzGpzHfXnxcEi5WXyxzEAZzd1vrE39bf1W" + ] }, - "roots": [ - "ZMg67iuQAyRUALR4TmAMyWGVEXV2e8yCpRSqdnR8Y1n", - "ZMg67iuQAyRUALR4TmAMyWGVEXV2e8yCpRSqdnR8Y1n" - ], - "rootIndices": [ - 7, - 7 - ], - "leafIndices": [ - 6, - 3 - ], - "leaves": [ - "2WfNf8qZoMNGR4mAPX8toADTdRpcKYTX1KUUAEHMi7dJ", - "36ewgEJTqSu4enYGWUcxm4CYezR3kgfHBeV29WiEgKaY" - ], - "merkleTrees": [ - "5bdFnXU47QjzGpzHfXnxcEi5WXyxzEAZzd1vrE39bf1W", - "5bdFnXU47QjzGpzHfXnxcEi5WXyxzEAZzd1vrE39bf1W" - ] + "context": { + "slot": 0 + } } diff --git a/tests/integration_tests/snapshots/integration_tests__e2e_tests__e2e_mint_and_transfer_new_transactions-charles-validity-proof.snap b/tests/integration_tests/snapshots/integration_tests__e2e_tests__e2e_mint_and_transfer_new_transactions-charles-validity-proof.snap index 3bda4694..f5553fe0 100644 --- a/tests/integration_tests/snapshots/integration_tests__e2e_tests__e2e_mint_and_transfer_new_transactions-charles-validity-proof.snap +++ b/tests/integration_tests/snapshots/integration_tests__e2e_tests__e2e_mint_and_transfer_new_transactions-charles-validity-proof.snap @@ -3,29 +3,34 @@ source: tests/integration_tests/e2e_tests.rs expression: validity_proof --- { - "compressedProof": { - "a": [], - "b": [], - "c": [] + "value": { + "compressedProof": { + "a": [], + "b": [], + "c": [] + }, + "roots": [ + "ZMg67iuQAyRUALR4TmAMyWGVEXV2e8yCpRSqdnR8Y1n", + "ZMg67iuQAyRUALR4TmAMyWGVEXV2e8yCpRSqdnR8Y1n" + ], + "rootIndices": [ + 7, + 7 + ], + "leafIndices": [ + 4, + 5 + ], + "leaves": [ + "21a33JmBirKxeMq88LfBKfZy5VM5Gb8Jf2H6RV4zN7Xy", + "3gX31m9xhLEs2r4DR1f1gePqJyUEA3Qk38WLiYbGkonm" + ], + "merkleTrees": [ + "5bdFnXU47QjzGpzHfXnxcEi5WXyxzEAZzd1vrE39bf1W", + "5bdFnXU47QjzGpzHfXnxcEi5WXyxzEAZzd1vrE39bf1W" + ] }, - "roots": [ - "ZMg67iuQAyRUALR4TmAMyWGVEXV2e8yCpRSqdnR8Y1n", - "ZMg67iuQAyRUALR4TmAMyWGVEXV2e8yCpRSqdnR8Y1n" - ], - "rootIndices": [ - 7, - 7 - ], - "leafIndices": [ - 4, - 5 - ], - "leaves": [ - "21a33JmBirKxeMq88LfBKfZy5VM5Gb8Jf2H6RV4zN7Xy", - "3gX31m9xhLEs2r4DR1f1gePqJyUEA3Qk38WLiYbGkonm" - ], - "merkleTrees": [ - "5bdFnXU47QjzGpzHfXnxcEi5WXyxzEAZzd1vrE39bf1W", - "5bdFnXU47QjzGpzHfXnxcEi5WXyxzEAZzd1vrE39bf1W" - ] + "context": { + "slot": 0 + } } diff --git a/tests/integration_tests/snapshots/integration_tests__e2e_tests__e2e_mint_bug_missing_token_accounts-bob-accounts.snap.new b/tests/integration_tests/snapshots/integration_tests__e2e_tests__e2e_mint_bug_missing_token_accounts-bob-accounts.snap.new deleted file mode 100644 index aaa1d25d..00000000 --- a/tests/integration_tests/snapshots/integration_tests__e2e_tests__e2e_mint_bug_missing_token_accounts-bob-accounts.snap.new +++ /dev/null @@ -1,65 +0,0 @@ ---- -source: tests/integration_tests/e2e_tests.rs -assertion_line: 658 -expression: accounts ---- -{ - "context": { - "slot": 0 - }, - "value": { - "items": [ - { - "account": { - "hash": "2qxesJbpG9CiEbbmCohYNi9TGcj5QFLZuZCoZuJuuhZq", - "address": null, - "data": { - "discriminator": 2, - "data": "DFu4Y6O8tf8s399QCelPHNYBu/UnUY3ECTeGonBMeWOMejOoa7mBtexwuV511IozTVGZrjnc4qMCppBrJEwY2ugDAAAAAAAAAAAA", - "dataHash": "4AUiSWcsZJp1iFyF8rygB96oDqwvCH5j6u1iamyFXYsy" - }, - "owner": "HXVfQ44ATEi9WBKLSCCwM54KokdkzqXci9xCQ7ST9SYN", - "lamports": 0, - "tree": "5bdFnXU47QjzGpzHfXnxcEi5WXyxzEAZzd1vrE39bf1W", - "leafIndex": 0, - "seq": 1, - "slotCreated": 0 - }, - "tokenData": { - "mint": "qF1bTy2rHx2nd5cKBvui3TpyU2pKGh8yJgqXwsbJFgE", - "owner": "ATN9ubwzymxHForDhigaoyrvmHmAjWghabsShX2uzmnq", - "amount": 1000, - "delegate": null, - "state": "initialized", - "tlv": null - } - }, - { - "account": { - "hash": "45VHCTnQ9a1kkWHoNxp2dQhtudghH5oQyfCwGL4PNGPQ", - "address": null, - "data": { - "discriminator": 2, - "data": "7lu5Qsr7micrfoOqpDrhnffKisdB5dB+Ht7eA0cQ/3eMejOoa7mBtexwuV511IozTVGZrjnc4qMCppBrJEwY2ugDAAAAAAAAAAAA", - "dataHash": "2JFjd71Y29euctfBKZo5JsoyMFPKNqQJvnL63U9a2M5E" - }, - "owner": "HXVfQ44ATEi9WBKLSCCwM54KokdkzqXci9xCQ7ST9SYN", - "lamports": 0, - "tree": "5bdFnXU47QjzGpzHfXnxcEi5WXyxzEAZzd1vrE39bf1W", - "leafIndex": 3, - "seq": 4, - "slotCreated": 0 - }, - "tokenData": { - "mint": "H3T9sXX5fq8X5DfJ7FhKCZkAn6ESAWBAZmNMn3AfUUwx", - "owner": "ATN9ubwzymxHForDhigaoyrvmHmAjWghabsShX2uzmnq", - "amount": 1000, - "delegate": null, - "state": "initialized", - "tlv": null - } - } - ], - "cursor": null - } -} diff --git a/tests/integration_tests/snapshots/integration_tests__e2e_tests__lamport_transfers-payer-validity-proof.snap b/tests/integration_tests/snapshots/integration_tests__e2e_tests__lamport_transfers-payer-validity-proof.snap index 6a69a1a8..99cd220d 100644 --- a/tests/integration_tests/snapshots/integration_tests__e2e_tests__lamport_transfers-payer-validity-proof.snap +++ b/tests/integration_tests/snapshots/integration_tests__e2e_tests__lamport_transfers-payer-validity-proof.snap @@ -3,24 +3,29 @@ source: tests/integration_tests/e2e_tests.rs expression: validity_proof --- { - "compressedProof": { - "a": [], - "b": [], - "c": [] + "value": { + "compressedProof": { + "a": [], + "b": [], + "c": [] + }, + "roots": [ + "2HbXdpn6wPGZ3N9vS1pT3snYm3uHny3Fvnz55SujM53n" + ], + "rootIndices": [ + 5 + ], + "leafIndices": [ + 3 + ], + "leaves": [ + "3b5WRJGcN1dwbArdgczVmZqjMSyEsc4aVYdcfMY6N8DU" + ], + "merkleTrees": [ + "5bdFnXU47QjzGpzHfXnxcEi5WXyxzEAZzd1vrE39bf1W" + ] }, - "roots": [ - "2HbXdpn6wPGZ3N9vS1pT3snYm3uHny3Fvnz55SujM53n" - ], - "rootIndices": [ - 5 - ], - "leafIndices": [ - 3 - ], - "leaves": [ - "3b5WRJGcN1dwbArdgczVmZqjMSyEsc4aVYdcfMY6N8DU" - ], - "merkleTrees": [ - "5bdFnXU47QjzGpzHfXnxcEi5WXyxzEAZzd1vrE39bf1W" - ] + "context": { + "slot": 0 + } } diff --git a/tests/integration_tests/snapshots/integration_tests__e2e_tests__lamport_transfers-receiver-validity-proof.snap b/tests/integration_tests/snapshots/integration_tests__e2e_tests__lamport_transfers-receiver-validity-proof.snap index 78940201..5de9913a 100644 --- a/tests/integration_tests/snapshots/integration_tests__e2e_tests__lamport_transfers-receiver-validity-proof.snap +++ b/tests/integration_tests/snapshots/integration_tests__e2e_tests__lamport_transfers-receiver-validity-proof.snap @@ -3,29 +3,34 @@ source: tests/integration_tests/e2e_tests.rs expression: validity_proof --- { - "compressedProof": { - "a": [], - "b": [], - "c": [] + "value": { + "compressedProof": { + "a": [], + "b": [], + "c": [] + }, + "roots": [ + "2HbXdpn6wPGZ3N9vS1pT3snYm3uHny3Fvnz55SujM53n", + "2HbXdpn6wPGZ3N9vS1pT3snYm3uHny3Fvnz55SujM53n" + ], + "rootIndices": [ + 5, + 5 + ], + "leafIndices": [ + 2, + 4 + ], + "leaves": [ + "WtTmKGafkpBYbCeHsnLRBV97zWXYT8p91geMFQbDzxY", + "29ixTY1gc1jjuFuBbqkWiM6sCBG8Y48sPDR5YvZm9mor" + ], + "merkleTrees": [ + "5bdFnXU47QjzGpzHfXnxcEi5WXyxzEAZzd1vrE39bf1W", + "5bdFnXU47QjzGpzHfXnxcEi5WXyxzEAZzd1vrE39bf1W" + ] }, - "roots": [ - "2HbXdpn6wPGZ3N9vS1pT3snYm3uHny3Fvnz55SujM53n", - "2HbXdpn6wPGZ3N9vS1pT3snYm3uHny3Fvnz55SujM53n" - ], - "rootIndices": [ - 5, - 5 - ], - "leafIndices": [ - 2, - 4 - ], - "leaves": [ - "WtTmKGafkpBYbCeHsnLRBV97zWXYT8p91geMFQbDzxY", - "29ixTY1gc1jjuFuBbqkWiM6sCBG8Y48sPDR5YvZm9mor" - ], - "merkleTrees": [ - "5bdFnXU47QjzGpzHfXnxcEi5WXyxzEAZzd1vrE39bf1W", - "5bdFnXU47QjzGpzHfXnxcEi5WXyxzEAZzd1vrE39bf1W" - ] + "context": { + "slot": 0 + } } diff --git a/tests/integration_tests/snapshots/integration_tests__mock_tests__get_multiple_new_address_proofs_interop-validity-proof.snap b/tests/integration_tests/snapshots/integration_tests__mock_tests__get_multiple_new_address_proofs_interop-validity-proof.snap index cae96138..0ef4b901 100644 --- a/tests/integration_tests/snapshots/integration_tests__mock_tests__get_multiple_new_address_proofs_interop-validity-proof.snap +++ b/tests/integration_tests/snapshots/integration_tests__mock_tests__get_multiple_new_address_proofs_interop-validity-proof.snap @@ -3,24 +3,29 @@ source: tests/integration_tests/mock_tests.rs expression: validity_proof --- { - "compressedProof": { - "a": [], - "b": [], - "c": [] + "value": { + "compressedProof": { + "a": [], + "b": [], + "c": [] + }, + "roots": [ + "3FrGzyXtjqjnukHDS2M5oyVj8tMVcHSahcHpWBGR5MHY" + ], + "rootIndices": [ + 3 + ], + "leafIndices": [ + 0 + ], + "leaves": [ + "12nCKqGG85jHxbTeA8i2Z7D4vnNUUrQ4r5e8dv2o16X" + ], + "merkleTrees": [ + "C83cpRN6oaafjNgMQJvaYgAz592EP5wunKvbokeTKPLn" + ] }, - "roots": [ - "3FrGzyXtjqjnukHDS2M5oyVj8tMVcHSahcHpWBGR5MHY" - ], - "rootIndices": [ - 3 - ], - "leafIndices": [ - 0 - ], - "leaves": [ - "12nCKqGG85jHxbTeA8i2Z7D4vnNUUrQ4r5e8dv2o16X" - ], - "merkleTrees": [ - "C83cpRN6oaafjNgMQJvaYgAz592EP5wunKvbokeTKPLn" - ] + "context": { + "slot": 0 + } }