-
Notifications
You must be signed in to change notification settings - Fork 45
Open
Description
Summary
MIP-009
triples the zkApp account update limit by replacing the old weighted
cost formula with a simpler segment-count rule. This is a hard fork
change. As a verifier-only node, we must accept and validate
transactions/blocks that use the new higher limits.
Background
- MIP: MIP-009
- Status: Finalization (last call deadline 2025-10-29)
- Author: Yihang Liu (o1labs)
- OCaml PR: MIP Ref Impl: Increase zkApp account update limit MinaProtocol/mina#17386
- OCaml reference:
src/lib/node_config/unconfigurable_constants/node_config_unconfigurable_constants.ml - Old formula:
10.26*np + 10.08*n2 + 9.14*n1 < 69.45 - New formula:
np + n2 + n1 <= 16 - Where
np= proof segments,n2= signed pair segments,
n1= signed single segments - Max per transaction: 31 signed/no-auth updates (16 paired
segments) or 15 proof updates + 1 fee payer segment - Prerequisite: SNARK worker proof-level parallelization from
the slot reduction MIP
Files requiring changes
1. Cost constants
crates/ledger/src/scan_state.rs(lines 14-39)GenesisConstantstruct andGENESIS_CONSTANTvalueszkapp_proof_update_cost:10.26->1.0zkapp_signed_single_update_cost:9.14->1.0zkapp_signed_pair_update_cost:10.08->1.0zkapp_transaction_cost_limit:69.45->16.0- Alternatively, simplify the formula entirely to use integer
comparison and remove the float fields
2. Cost comparison operator
crates/ledger/src/scan_state/transaction_logic/zkapp_command.rs
(line 2846)- Change
Self::zkapp_cost(...) < cost_limitto
Self::zkapp_cost(...) <= cost_limit - The MIP specifies
<=(inclusive), the old code uses<
(strict). This is the difference between allowing exactly
16 segments vs only 15. - The
zkapp_cost()function (line 2778) andvalid_size()
(line 2799) both consumeGENESIS_CONSTANT; updating the
constants + operator is sufficient
- Change
3. Test data
tools/testing/data/daemon.json(lines 4-7)- Update cost values to match the new constants
Verification path
The valid_size() method (zkapp_command.rs:2799) is used in both
verification paths:
- Transaction pool prevalidation --
transaction_pool.rs:2108callscheck_well_formedness()
which callsvalid_size() - Block application --
staged_ledger.rs:1271calls
check_commands()duringapply(), verifying transactions
in incoming blocks
Not required for verifier-only
- Block production / diff creation (
staged_ledger/resources.rs) - Scan state capacity (
transaction_capacity_log_2: 7= 128 base
jobs, already sufficient) zkapp_cmd_limit_hardcap: 128(already accommodates new limit)- SNARK verification pipeline (handles any valid proof tree)
- Consensus rules (unchanged by this MIP)
Scope
Minimal change: update 4 constants in one file, change one
comparison operator in another, and update test data. Optionally
simplify by replacing the float-based cost formula with a direct
integer segment count.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
No status