> For the complete documentation index, see [llms.txt](https://docs.megaeth.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.megaeth.com/mega-evme/configuration/salt-buckets.md). Agents can also search and read this documentation through its [MCP server](https://docs.megaeth.com/~gitbook/mcp).

# SALT Buckets

Control SALT bucket capacities to test dynamic storage gas pricing.

MegaETH uses SALT buckets to dynamically scale storage gas costs. Each account and storage slot maps to a SALT bucket; the gas cost of storage operations is multiplied by a factor derived from the bucket's capacity. Crowded state regions become progressively more expensive, while fresh storage (minimum-sized buckets) is free.

The `--bucket-capacity` flag lets you configure bucket capacities for testing how storage gas costs behave under different state conditions.

## Options

| Flag                              | Default | Description                      |
| --------------------------------- | ------- | -------------------------------- |
| `--bucket-capacity <ID:CAPACITY>` | empty   | Set bucket capacity (repeatable) |

Format: `bucket_id:capacity`, where:

* `bucket_id` — 32-bit bucket identifier
* `capacity` — current capacity in bytes

## Examples

```bash
# Single bucket
mega-evme run --codefile contract.hex --bucket-capacity 123:1000000

# Multiple buckets
mega-evme run --codefile contract.hex \
  --bucket-capacity 123:1000000 \
  --bucket-capacity 456:2000000 \
  --bucket-capacity 789:500000

# Combined with state and tracing to observe gas costs
mega-evme tx \
  --receiver 0x1234... \
  --input 0x55... \
  --bucket-capacity 1:1000 \
  --trace --tracer opcode
```

## Notes

* Without any `--bucket-capacity` flags, all buckets default to the minimum size, which means storage operations incur zero storage gas.
* This option is available in `run`, `tx`, and online `replay`; an offline replay (`--rpc.replay-file`) rejects it and takes the capacities from the fixture envelope.
* SALT-based dynamic gas pricing is active from the MiniRex behavior onward. In `Equivalence` mode — including the alias spec `MiniRex1`, which executes `Equivalence` behavior — bucket capacities have no effect.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.megaeth.com/mega-evme/configuration/salt-buckets.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
