Skip to Content
ContractsReserch5. Fee Research (Block)

Block Fee Research

TL;DR

  • CreateBlock gas: ~5.3M at N=1 -> ~8.8M at N=1,000 (+67.2%), storage ~478-481Kugnot (constant)
  • Mint gas: ~7.4-7.6M (nearly constant), storage decreases with scale (117K -> ~0)
  • Install gas: ~11.7M at N=1 -> ~21.7M at N=1,000 (+85.5%), storage ~178Kugnot (constant)
  • Uninstall gas: ~8.7M at N=1 -> ~18.7M at N=1,000 (+115.3%), storage 0
  • Use gas: ~13.1M at N=1 -> ~15.5M at N=1,000 (+18.4%), storage ~372Kugnot (constant)

1) Background and Goal

Measure gas/storage costs for Block contract actions across different data scales.

Block actions (N = existing block count):

  • CreateBlock: create a new block definition
  • Mint: mint copies of an existing block to a user

Block action interactions:

  • Install / Uninstall: place/remove a block in a world position (N = existing installations, spread across chunks)
  • Use: activate an installed block (N = existing use logs)

Goals:

  • Identify gas cost growth pattern as N increases
  • Identify storage fee change pattern
  • Establish a basis for production cost estimation

2) Test Environment

  • Date: 2026-02-09
  • Execution: gnodev (local machine)
  • Gno RPC: localhost:26657
  • Chain ID: dev
  • Scripts: bin/gno/research/block.sh all, bin/gno/research/block_action.sh all
  • Milestones: 1, 500, 1,000
  • Repeat: 3

3) Results

CreateBlock

N (blocks)Gas (avg)Gas Q1Gas Q3Storage (avg)Storage Q1Storage Q3
15,290,258-0.6%+0.8%477,833-0.0%+0.0%
5007,396,478-0.0%+0.0%481,100+0.0%+0.0%
1,0008,848,114-0.0%+0.0%481,300+0.0%+0.0%

Mint

N (blocks)Gas (avg)Gas Q1Gas Q3Storage (avg)Storage Q1Storage Q3
17,440,686-0.4%+0.3%117,033-99.7%+50.0%
5007,602,248-0.4%+0.2%666-100.0%+50.2%
1,0007,629,463-0.4%+0.2%100-100.0%+50.0%

Install (N = existing installations across chunks)

N (installs)Gas (avg)Gas Q1Gas Q3Storage (avg)Storage Q1Storage Q3
111,666,002-0.0%+0.0%177,833-0.1%+0.1%
50016,656,736+0.0%+0.0%177,600+0.0%+0.0%
1,00021,660,768+0.0%+0.0%177,600+0.0%+0.0%

Uninstall (N = existing installations across chunks)

N (installs)Gas (avg)Gas Q1Gas Q3Storage (avg)Storage Q1Storage Q3
18,656,278+0.0%+0.0%00.0%0.0%
50013,646,974+0.0%+0.0%00.0%0.0%
1,00018,651,006+0.0%+0.0%00.0%0.0%

Use

N (use logs)Gas (avg)Gas Q1Gas Q3Storage (avg)Storage Q1Storage Q3
113,106,040-0.5%+0.4%371,400+0.0%+0.0%
50014,733,694-0.1%+0.0%372,800+0.0%+0.0%
1,00015,517,329-0.1%+0.0%373,100+0.0%+0.0%

4) Analysis

CreateBlock Gas Growth

RangeGas increaseIncrease rate
1 -> 500+2,106,220+39.8%
500 -> 1,000+1,451,636+19.6%
  • Sub-linear growth: per-block gas cost decreases at larger scale
  • N=1 -> 500: ~4,225 gas/block, N=500 -> 1,000: ~2,903 gas/block

Mint Gas Growth

  • Nearly constant: ~7.4-7.6M gas regardless of block count
  • Mint does not traverse the block registry — it only touches the target block

Mint Storage Anomaly

  • N=1: 117,033 ugnot (first mint allocates GRC1155 token storage)
  • N=500+: ~0-666 ugnot (subsequent mints to same block incur minimal storage)
  • High Q1/Q3 variance reflects the first-mint vs subsequent-mint difference

Install / Uninstall Gas Growth

RangeInstall increaseUninstall increase
1 -> 500+4,990,734 (+42.8%)+4,990,696 (+57.6%)
500 -> 1,000+5,004,032 (+30.0%)+5,004,032 (+36.7%)
  • Linear growth: ~10,000 gas per additional installation (both Install and Uninstall)
  • Gas increase comes from worldMap (map[chunkCoord]) deserialization — larger map = more gas
  • Storage remains constant: Install ~178K, Uninstall 0

Use Gas Growth

RangeGas increaseIncrease rate
1 -> 500+1,627,654+12.4%
500 -> 1,000+783,635+5.3%
  • Sub-linear growth due to use log accumulation
  • Storage constant at ~372K ugnot (each use creates a fixed-size log entry)

Variance

  • CreateBlock/Mint: Q1/Q3 < 1% — stable
  • Install/Uninstall: Q1/Q3 < 0.1% — deterministic
  • Use: Q1/Q3 < 0.5% — stable

5) Conclusions

  • CreateBlock scales sub-linearly: ~8.8M gas at 1,000 blocks, manageable growth
  • Mint is constant-cost: ~7.6M gas regardless of block count; first mint has higher storage (~117K) vs subsequent (~0)
  • Install/Uninstall scale linearly: ~10K gas per existing installation due to worldMap deserialization; at 1,000 installations, Install reaches ~21.7M gas
  • Use scales gently: +18% gas over 1,000 use logs, sub-linear growth
  • Storage is predictable: CreateBlock ~481K, Install ~178K, Use ~372K — all constant per call regardless of data scale
Last updated on
Docsv1.0.10