Repository navigation
test(vapp): cover receipt gas limits and split steps - #248
Open
fakedev9999 wants to merge 2 commits into
Open
fakedev9999 wants to merge 2 commits into
fakedev9999 wants to merge 2 commits into
Conversation
Farhad-Shabani
approved these changes
Nov 14, 2026
| assertEq(MockERC20(PROVE).balanceOf(ALICE), 1_000); | ||
| } | ||
|
|
||
| function test_ReceiptGas_SplitWithdrawalsAdvanceConsecutiveRoots() public { |
Collaborator
There was a problem hiding this comment.
I think we can drop SplitWithdrawalsAdvanceConsecutiveRoots. The other tests already cover this. The cold recipients test is the heavier case (1.2m gas vs 0.4m per step here), and test_Step_WhenValidTwice already checks that roots chain across steps.
This branch has not been deployed
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
Add tests for 1,000 withdrawals exceeding a gas cap, then completing in 32-receipt steps with consecutive roots.
Cover cold recipients and real prover-vault deposits, including calldata and verifier gas allowances.
Include a local integration fixture using the real Succinct token and mock proof verification.
Validation
FOUNDRY_PROFILE=deploy forge test --root contracts --match-path 'test/SuccinctVApp*.t.sol' -vv: 40 tests passed.FOUNDRY_PROFILE=deploy forge test --root contracts --match-path test/SuccinctVApp.receiptGas.t.sol --isolate: four gas tests passed.FOUNDRY_PROFILE=deploy forge build --sizes --root contractsandforge fmt --check --root contracts: passed.contracts/,FOUNDRY_PROFILE=deploy forge snapshot --no-match-test Fuzz: 199 tests passed; Forge regenerated the snapshot.Caveats
Test-only change with mocked proof verification.
These measurements do not establish an exhaustive worst-case gas proof.