-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: ✨ finish File System pallet benchmarking #307
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
beast
// 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Since the BSP only requires one non-inclusion proof and 1 to 10 (MaxBatchBspConfirmStoring) file key proofs, we reutilise the | |
// Since the BSP only requires one non-inclusion proof and 1 to 10 (MaxBatchBspConfirmStoring) file key proofs, we reuse the |
// * 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume this means you'll set the BSP's root to be the root of the bucket, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep!
This PR completes the benchmarking of the File System pallet.
generateFileKeyProofBspConfirm
andgenerateFileKeyProofMspAccept
) which generate the file key proof needed by BSPs or MSPs to confirm or accept a storage request, using the special chunk challenges given by the runtime.ProcessSubmitProofRequest
event, to avoid submitting proofs if there're no challenges to respond to.runtime-benchmarks
feature flag since that scenario does not have them, so I though might as well add a check there since it doesn't hurt and gives us a bit more flexibility with random challenges in the future.bsp_confirm_storing
extrinsic of the File System pallet to use the already-existing structFileKeyWithProof
instead of a tuple of the file key and proof to make it tidier. Modified all interactions withbsp_confirm_storing
to accomodate for this change.decrease_capacity_used
for MSPs in both thedelete_file
andpending_file_deletion_request_submit_proof
extrinsics of the File System pallet. Previously, used capacity of the MSP that held the deleted file wasn't being updated when it should after verifying the inclusion proof.benchmark_proofs_template.rs
template file, which is used by the script that generates the proofs required to benchmark the File System pallet.StorageRequestTtl
when compiling with theruntime-benchmarks
feature flag to 2000 to avoid storage requests expiring when generating the required file key proofs in the aforementioned script.benchmarking.rs
file.newBucket
method of the integration testing API to be able to receive the MSP ID that should store the new bucket.