Skip to content

Conversation

@MarcosNicolau
Copy link
Member

@MarcosNicolau MarcosNicolau commented Sep 24, 2025

Description

Adds a new message to retrieve the max fee of the proof with the higher nonce in the queue for a given user. If the user does not have any proof in the queue then U256::MAX is returned to act as a sentinel value and because it is indeed the maximum fee one could send.

How to test

  1. Start anvil:
make anvil_start
  1. Start the batcher:
make batcher_start_local
  1. Deposit in aligned (for example with a anvil rich account):
cd crates/cli
cargo run --release -- deposit-to-batcher \
    --amount 1ether \
    --private_key 0xdbda1821b80551c9d65939329250298aa3472ba22feea921c0cf5d620ea67b97 \
    --network devnet \
    --rpc_url http://localhost:8545
  1. Send a proof:
cargo run --release -- submit \
                --proving_system Risc0 \
                --proof ../../scripts/test_files/risc_zero/no_public_inputs/risc_zero_no_pub_input_3_0_3.proof \
                --vm_program ../../scripts/test_files/risc_zero/no_public_inputs/risc_zero_no_pub_input_id_3_0_3.bin \
                --rpc_url http://localhost:8545 \
                --network devnet \
                --default_fee_estimate \
                --private_key 0xdbda1821b80551c9d65939329250298aa3472ba22feea921c0cf5d620ea67b97 \
                --random_address
  1. Retrieve your last max fee:
cargo run --release -- get-user-last-max-fee --network devnet 0x23618e81E3f5cdF7f54C3d65f7FBc0aBf5B21E8f

Type of change

Please delete options that are not relevant.

  • New feature
  • Bug fix
  • Optimization
  • Refactor

Checklist

  • “Hotfix” to testnet, everything else to staging
  • Linked to Github Issue
  • This change depends on code or research by an external entity
    • Acknowledgements were updated to give credit
  • Unit tests added
  • This change requires new documentation.
    • Documentation has been added/updated.
  • This change is an Optimization
    • Benchmarks added/run
  • Has a known issue
  • If your PR changes the Operator compatibility (Ex: Upgrade prover versions)
    • This PR adds compatibility for operator for both versions and do not change crates/docs/examples
    • This PR updates batcher and docs/examples to the newer version. This requires the operator are already updated to be compatible

@MarcosNicolau MarcosNicolau changed the base branch from testnet to staging September 24, 2025 15:23
@MarcosNicolau MarcosNicolau marked this pull request as ready for review September 24, 2025 18:02
@JuArce JuArce added this pull request to the merge queue Oct 8, 2025
Merged via the queue into staging with commit 92f097f Oct 8, 2025
3 checks passed
@JuArce JuArce deleted the feat/batcher-get-last-max-fee-msg branch October 8, 2025 15:17
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.

4 participants