Skip to content

fix(cli-wallet): peek claim stack instead of popping for estimate-gas-only#22196

Merged
Thunkar merged 1 commit intonextfrom
claudebox/fix-estimate-gas-claim-peek
Apr 1, 2026
Merged

fix(cli-wallet): peek claim stack instead of popping for estimate-gas-only#22196
Thunkar merged 1 commit intonextfrom
claudebox/fix-estimate-gas-claim-peek

Conversation

@AztecBot
Copy link
Copy Markdown
Collaborator

Summary

When running any CLI wallet command with --estimate-gas-only and a saved fee juice claim (--payment method=fee_juice,claim=true), the wallet would pop the claim off the stack, consuming it. This meant the claim was no longer available for the actual transaction.

This PR adds a peekBridgedFeeJuice method to WalletDB that reads the top of the claim stack without removing it, and uses it when estimateOnly is true.

Changes

  • Added peekBridgedFeeJuice() to WalletDB — reads top-of-stack without decrementing the pointer
  • Threaded estimateOnly flag through to parsePaymentMethod() to select peek vs pop

Test plan

  • Run deploy-account --estimate-gas-only --payment method=fee_juice,claim=true — claim should still be available after
  • Run deploy-account --payment method=fee_juice,claim=true — claim should be consumed as before

ClaudeBox log: https://claudebox.work/s/16b824b54402040d?run=1

@AztecBot AztecBot added ci-draft Run CI on draft PRs. claudebox Owned by claudebox. it can push to this PR. labels Mar 31, 2026
@Thunkar Thunkar marked this pull request as ready for review April 1, 2026 05:57
@Thunkar Thunkar self-requested a review April 1, 2026 05:57
@Thunkar Thunkar added this pull request to the merge queue Apr 1, 2026
Merged via the queue into next with commit 9ce04f0 Apr 1, 2026
57 of 65 checks passed
@Thunkar Thunkar deleted the claudebox/fix-estimate-gas-claim-peek branch April 1, 2026 06:36
AztecBot pushed a commit that referenced this pull request Apr 1, 2026
…-only (#22196)

## Summary

When running any CLI wallet command with `--estimate-gas-only` and a
saved fee juice claim (`--payment method=fee_juice,claim=true`), the
wallet would pop the claim off the stack, consuming it. This meant the
claim was no longer available for the actual transaction.

This PR adds a `peekBridgedFeeJuice` method to `WalletDB` that reads the
top of the claim stack without removing it, and uses it when
`estimateOnly` is true.

## Changes

- Added `peekBridgedFeeJuice()` to `WalletDB` — reads top-of-stack
without decrementing the pointer
- Threaded `estimateOnly` flag through to `parsePaymentMethod()` to
select peek vs pop

## Test plan

- Run `deploy-account --estimate-gas-only --payment
method=fee_juice,claim=true` — claim should still be available after
- Run `deploy-account --payment method=fee_juice,claim=true` — claim
should be consumed as before

ClaudeBox log: https://claudebox.work/s/16b824b54402040d?run=1
@AztecBot
Copy link
Copy Markdown
Collaborator Author

AztecBot commented Apr 1, 2026

✅ Successfully backported to backport-to-v4-next-staging #22205.

AztecBot added a commit that referenced this pull request Apr 1, 2026
BEGIN_COMMIT_OVERRIDE
cherry-pick: feat: move event size check from declaration to private
emission (#22168)
fix: prevent oracle failure on tag computation for invalid recipient
(#22163)
feat: move event size check from declaration to private emission
(#22168) [v4-next backport] (#22182)
fix(cli-wallet): peek claim stack instead of popping for
estimate-gas-only (#22196)
fix: use Fr.fromString for CLI wallet claim params to handle decimal
values (#22197)
fix: indefinite retry for prover node and agent broker communication
(#22202)
END_COMMIT_OVERRIDE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-to-v4-next ci-draft Run CI on draft PRs. claudebox Owned by claudebox. it can push to this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants