> For the complete documentation index, see [llms.txt](https://soroban-cost-estimator.gitbook.io/soroban-cost_estimator-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://soroban-cost-estimator.gitbook.io/soroban-cost_estimator-docs/config-diff.md).

# config diff

Compare the network's current resource-pricing configuration against the most recent snapshot.

## Flags

```
Usage: soroban-cost-estimator config diff [OPTIONS]

Options:
      --network <NETWORK>  Network to compare against [default: testnet]
      --against <AGAINST>  Explicit snapshot path to compare against (defaults to latest)
  -h, --help               Print help
```

## Behavior

* Fetches the current config, then compares it **field by field** against the latest snapshot for the network (or the snapshot at `--against`).
* `💰` marks a **pricing** change — a rate that feeds the fee math; `📋` marks a non-pricing change (a cap, limit, or window size).
* Always cross-references the estimate cache and reports cached estimates recorded at an earlier ledger as potentially stale.
* **Exit code 0** when nothing changed; **exit code 1** when a pricing change was detected — scripts and CI can branch on it.

## Example — nothing changed

```bash
soroban-cost-estimator config diff --network testnet
```

Actual output from a live testnet run (snapshot taken seconds earlier):

```
Config diff: 2026-08-04T07:15:38.487702259+00:00 (ledger 3470630) → 2026-08-04T07:15:39.237129507+00:00 (ledger 3470630)
Network: testnet

✅ No changes detected.

  1 cached estimate(s) from earlier ledger(s) — may be stale:
    - (wasm upload) @ ledger 0 (current: 3470630)
```

Note the stale-cache cross-reference: this machine had one cached estimate recorded at ledger 0, so the tool names it.See [Caching](/soroban-cost_estimator-docs/caching.md) for how that works.

## Example — comparing against an explicit snapshot

```bash
soroban-cost-estimator config diff --network testnet \
  --against ~/.soroban-cost-estimator/snapshots/testnet-2026-08-04T07-15-38.487702259+00-00.json
```

## What a pricing change looks like

If a protocol vote had moved a rate, the output would list the changed fields instead of "No changes detected", for example:

```
Config diff: 2026-07-31T13-14-29.307394561+00:00 (ledger 3470630) → 2026-08-04T07:15:39.237129507+00:00 (ledger 3470630)
Network: testnet

Found 1 field change(s):

  💰 contract_compute.fee_rate_per_instructions_increment
      Old: 5
      New: 7

⚠️  Pricing changes detected! Your cached estimates may be stale.
```

and the command exits **1**. Re-run `estimate` for the affected contracts and refresh the snapshots. See [Config Drift](/soroban-cost_estimator-docs/config-drift.md) for the workflow this enables.


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://soroban-cost-estimator.gitbook.io/soroban-cost_estimator-docs/config-diff.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
