test(pdp): establish addPieces storage baseline - #291
Draft
Kubuxu wants to merge 1 commit into
Draft
Conversation
Record storage reads, writes, KAMT object locality, and persistent slot growth for additions to an existing data set. This establishes the baseline for the compact piece representation work. Signed-off-by: Jakub Sztandera <oss@kubuxu.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
addPieceson an existing, seeded data set.slot >> 5.Motivation
EVM gas usage does not map cleanly to Filecoin storage costs. This test establishes a storage-oriented baseline for the compact piece representation work in #286.
The test seeds the data set before recording so shared counters already occupy storage, then records adding four canonical pieces. This isolates steady-state piece addition from data-set creation and first-piece initialization.
Current Baseline
The 20 newly occupied slots correspond to five slots per piece in the current representation.
The assertions intentionally characterize the current implementation. As the compact representation is implemented, they should be updated to make the resulting storage improvement explicit.
Testing Performed
forge test --match-contract PDPVerifierStorageTest -vvScope
The current draft only adds test infrastructure and baseline assertions. It does not change contract behavior or storage layout.