Skip to content

test(vapp): cover receipt gas limits and split steps - #248

Open
fakedev9999 wants to merge 2 commits into
mainfrom
fakedev9999/vapp-receipt-gas
Open

fakedev9999 wants to merge 2 commits into
mainfrom
fakedev9999/vapp-receipt-gas

Conversation

@fakedev9999

@fakedev9999 fakedev9999 commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

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 contracts and forge fmt --check --root contracts: passed.
  • From 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.

assertEq(MockERC20(PROVE).balanceOf(ALICE), 1_000);
}

function test_ReceiptGas_SplitWithdrawalsAdvanceConsecutiveRoots() public {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants