From 322ef5388b398e9bc9b21d104e87903f98fff0cc Mon Sep 17 00:00:00 2001 From: TDemeco Date: Mon, 13 Jan 2025 19:14:51 -0300 Subject: [PATCH] docs: :memo: amend review --- test/scripts/generateFileSystemBenchmarkProofs.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/test/scripts/generateFileSystemBenchmarkProofs.ts b/test/scripts/generateFileSystemBenchmarkProofs.ts index 62eda46fd..a90261e03 100644 --- a/test/scripts/generateFileSystemBenchmarkProofs.ts +++ b/test/scripts/generateFileSystemBenchmarkProofs.ts @@ -277,19 +277,21 @@ async function generateBenchmarkProofs() { ); // * For a MSP accepting storage requests, we need to generate a non-inclusion proof to be used - // * when accepting from 1 to 10 (MaxBatchMspRespondStorageRequests) file keys and rejecting 1 to 10 (MaxBatchMspRespondStorageRequests) - // * file keys. This has to be done for 1 to 10 (MaxBatchMspRespondStorageRequests) buckets. + // * when accepting from 1 to 10 file keys and rejecting 1 to 10 file keys. This has to be done for 1 to 10 buckets. + // * The reason we use 1 to 10 as the range is because it's big enough for Substrate to extrapolate the information + // * given by the benchmarks to other cases with good precision while being small enough to not take ages to run. // * We also need to generate the file key proofs for each one of the file keys to be accepted. // To do this, we generate a non-inclusion forest proof for N file keys (which must be the ones not // added to the Forest in the previous step of this script) and add the proof to the array. Then, generate for each file key its proof. // Finally, repeat this for each bucket. // * For a BSP confirming storing, we need the same thing (a non-inclusion forest proof for 1 to 10 file keys that // * the BSP wants to confirm) and the file key proofs for each one of the file keys. - // Since the BSP only requires one non-inclusion proof and 1 to 10 (MaxBatchBspConfirmStoring) file key proofs, we reutilise the - // non-inclusion proof from the first bucket and generate the corresponding file key proofs since the challenges for the BSP are different. + // Since the BSP only requires one non-inclusion proof and 1 to 10 (MaxBatchBspConfirmStoring) file key proofs, we reuse the + // non-inclusion proof from the first bucket (setting the root of the BSP to the root of that bucket) but generate the corresponding + // file key proofs since the challenges for the BSP are different. - const maxBatchMspRespondStorageRequests = 10; - for (let i = 1; i <= maxBatchMspRespondStorageRequests; i++) { + const amountOfNonInclusionProofsToGenerate = 10; + for (let i = 1; i <= amountOfNonInclusionProofsToGenerate; i++) { // We generate a non-inclusion proof for i file keys of the nonStoredFileKeys array for each bucket. const nonInclusionProofsForCase: string[] = []; const allFileKeysToAccept: string[] = [];