Skip to content

docs: reconcile SSTORE gas to 72,000 (same on both networks, Prop #109)#34

Open
alexander-sei wants to merge 1 commit into
mainfrom
docs/reconcile-sstore-gas
Open

docs: reconcile SSTORE gas to 72,000 (same on both networks, Prop #109)#34
alexander-sei wants to merge 1 commit into
mainfrom
docs/reconcile-sstore-gas

Conversation

@alexander-sei

Copy link
Copy Markdown
Collaborator

Problem

The docs contradicted themselves on the SSTORE (storage write) gas cost, which confuses developers and any AI assistant trained on the docs:

  • skill.md — "72,000 on both mainnet and testnet"
  • ai/sei-skill/index.mdx — "72,000 on testnet, 20,000 on mainnet"
  • ai/sei-skill/prompts.mdx — example prompt implying testnet > mainnet

These can't all be right.

Resolution

SSTORE is 72,000 gas — the same on pacific-1 and atlantic-2 (it does not vary by network), governance-adjustable.

Verified empirically. I measured the marginal cost of a cold (zero→nonzero) storage write via eth_estimateGas against both live EVM RPCs (contract-creation bytecode doing 0/1/2/3 fresh writes). Both networks returned byte-for-byte identical estimates; the per-write marginal is ~74,100 = 72,000 base + 2,100 EIP-2929 cold-access + minor overhead. (Standard Ethereum would be ~22,100.)

Source of the value: mainnet governance Proposal #109 "Update EVM SSTORE set gas to 72000" (PASSED), which set the evm module param KeySeiSstoreSetGasEIP2200 = "72000". (The previously-cited "#240" was incorrect — it doesn't exist on mainnet, and on testnet it's a v6.3.0 upgrade.)

Changes

  • skill.md, ai/sei-skill/index.mdx, ai/sei-skill/prompts.mdx — state 72,000, same on both networks, governance-adjustable; cite Prop #109; the example prompt no longer implies a false testnet-vs-mainnet difference.
  • evm/differences-with-ethereum.mdx (canonical reference) — notes same-on-both + Prop #109, and warns that a forge test --gas-report --fork-url report forks state but applies revm's standard EVM schedule (~22,100), so it understates Sei's cost — use live eth_estimateGas.
  • evm/evm-parity/gas-and-fees.mdx — adds the current value, links the canonical page, and adds the same fork-report caveat.

All SSTORE statements across the affected docs now agree and point to the canonical reference.

Scope note

This PR contains only the SSTORE reconciliation in already-tracked docs. It intentionally excludes the in-progress Agent Skills registry work (.mintlify/skills/, ai/skills.mdx, evm/templates.mdx, snippets/skills-registry.jsx, and the related .gitignore/docs.json changes), which will ship separately.

🤖 Generated with Claude Code

The docs contradicted themselves on SSTORE gas cost:
- skill.md said 72,000 on both networks
- ai/sei-skill/index.mdx said 72,000 testnet / 20,000 mainnet
- ai/sei-skill/prompts.mdx implied testnet > mainnet

Verified empirically via eth_estimateGas against both live EVM RPCs: the
marginal cost of a cold (zero->nonzero) storage write is byte-for-byte
identical on pacific-1 and atlantic-2 (~74,100 = 72,000 base + 2,100
EIP-2929 cold access). The value's source is mainnet governance
Proposal #109 "Update EVM SSTORE set gas to 72000" (PASSED), which set the
evm param KeySeiSstoreSetGasEIP2200 = "72000".

- skill.md / index.mdx / prompts.mdx: state 72,000, same on both networks,
  governance-adjustable; cite Prop #109; drop the false testnet-vs-mainnet
  premise in the example prompt.
- differences-with-ethereum.mdx (canonical): note same-on-both + Prop #109,
  and warn that a `forge --fork-url` gas report uses revm's standard EVM
  schedule (~22,100), not Sei's cost.
- gas-and-fees.mdx: add the current value + the fork-report caveat.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@cursor

cursor Bot commented Jun 25, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Documentation-only changes with no runtime, auth, or deployment impact.

Overview
Aligns SSTORE documentation so everything states 72,000 gas on both mainnet and testnet, governance-adjustable, instead of the old split (e.g. 72k testnet vs 20k mainnet in sei-skill).

sei-skill / skill.md: The comparison table and critical-facts list now match that single value, link to the canonical EVM differences page, and cite governance Proposal #109 (KeySeiSstoreSetGasEIP2200) instead of the incorrect #240 reference. The example prompt in prompts.mdx no longer implies a false testnet-vs-mainnet difference.

Canonical EVM docs: evm/differences-with-ethereum.mdx adds same-on-both-networks wording, Prop #109, and guidance to use live eth_estimateGas on a Sei RPC. evm/evm-parity/gas-and-fees.mdx states the current 72k figure, cross-links the canonical section, and adds a Warning that Foundry forge test --gas-report --fork-url forks state but uses revm’s Ethereum gas schedule (~22,100 for SSTORE), so it understates Sei’s cost.

Reviewed by Cursor Bugbot for commit 9cace4a. Bugbot is set up for automated code reviews on this repo. Configure here.

@mintlify

mintlify Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
sei-docs 🟢 Ready View Preview Jun 25, 2026, 3:31 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

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.

1 participant