Skip to content

docs: correct storage cost ranking and entry size limit claim - #2880

Merged
kaankacar merged 1 commit into
mainfrom
fix/storage-guide-prose-2879
Oct 6, 2026
Merged

kaankacar merged 1 commit into
mainfrom
fix/storage-guide-prose-2879

Conversation

@ElliotFriend

Copy link
Copy Markdown
Contributor

Two prose fixes on the Choosing the right storage guide.

  • Cost column. Persistent and instance storage were ranked differently ("Most" vs. "More" expensive), but they are charged at the same rate. The table now matches the storage fundamentals page: temporary is cheapest, and persistent and instance are the same price. The per-call read tradeoff for instance storage is already covered in the guide's Pro/Con list.
  • Entry size limit. The guide said the ledger entry size limit "can never go down". stellar-core only checks a proposed limit against a fixed floor (contractDataEntrySizeBytes >= MinimumSorobanNetworkConfig::MAX_CONTRACT_DATA_ENTRY_SIZE_BYTES, 2,000 bytes, in src/ledger/NetworkConfig.cpp), so a validator vote could lower it. The sentence now says that and advises leaving headroom.

Fixes #2879

🤖 Generated with Claude Code

@github-actions github-actions Bot added the preview Preview builds for PRs by SDF employees. label Sep 28, 2026
@github-actions

Copy link
Copy Markdown
Contributor

@kaankacar kaankacar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kaankacar
kaankacar merged commit 68c7155 into main Oct 6, 2026
9 checks passed
@kaankacar
kaankacar deleted the fix/storage-guide-prose-2879 branch October 6, 2026 13:12
@github-actions github-actions Bot removed the preview Preview builds for PRs by SDF employees. label Oct 6, 2026
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

PR Preview: torn down

water-k-max added a commit to water-k-max/stellar-docs that referenced this pull request Oct 6, 2026
Seven of the guide's eight full contract examples did not build against
soroban-sdk 28.0.0 / stellar-cli 28.1.0, including three of the four blocks the
guide presents as the correct pattern (both "Optimal Contract" blocks and the
keyed-vecs alternative it recommends).

Storage examples: pass keys by reference (`get(&KEY)`); a bare `&str` key fails
the `TryFromVal<Env, str>` bound on `Val`; use `Symbol`/`#[contracttype]` keys;
unwrap the `Option` that `get` returns; `push_back`, not `push`, on
`soroban_sdk::Vec`; `unwrap_or_else(|| Vec::new(&env))`, because
`soroban_sdk::Vec<T>` implements neither `Default` nor `FromIterator`, so
`unwrap_or_default()` and iterator-chain `.collect()` are both unavailable; add
the missing `Vec` import and the `#[contracttype]` attribute on types used as
storage values and keys.

Token examples: SEP-41 `transfer` takes `to: MuxedAddress`, so the recipient
vectors become `Vec<MuxedAddress>` and the contract's own address is converted
with `MuxedAddress::from`.

CLI guidance: `stellar contract build` optimizes by default in current
stellar-cli, so document `--optimize=false` and how to tell which behaviour a
version has; `--cost` prints only for a sent transaction, and prints nothing
with `--send=no`.

Storage prose: temporary entries are not cleared at the end of the invocation —
they live until their TTL (testnet `min_temporary_ttl` is 720 ledgers), so the
§5 description and one §3 trade-off bullet are wrong, and §5 also contradicted
itself. The instance-storage size cap is a validator-set network parameter
(testnet `contract_data_entry_size_bytes` is 65,536, not "on the order of
100 KB"), so link the live network limits instead of asserting a number. Both
points match how stellar#2880 corrected the sibling storage guide.

Also renumber the duplicated "### 5" section and level the two storage-API
headings that sat at the same depth as their parent.

Closes stellar#1845
ElliotFriend pushed a commit that referenced this pull request Oct 12, 2026
Seven of the guide's eight full contract examples did not build against
soroban-sdk 28.0.0 / stellar-cli 28.1.0, including three of the four blocks the
guide presents as the correct pattern (both "Optimal Contract" blocks and the
keyed-vecs alternative it recommends).

Storage examples: pass keys by reference (`get(&KEY)`); a bare `&str` key fails
the `TryFromVal<Env, str>` bound on `Val`; use `Symbol`/`#[contracttype]` keys;
unwrap the `Option` that `get` returns; `push_back`, not `push`, on
`soroban_sdk::Vec`; `unwrap_or_else(|| Vec::new(&env))`, because
`soroban_sdk::Vec<T>` implements neither `Default` nor `FromIterator`, so
`unwrap_or_default()` and iterator-chain `.collect()` are both unavailable; add
the missing `Vec` import and the `#[contracttype]` attribute on types used as
storage values and keys.

Token examples: SEP-41 `transfer` takes `to: MuxedAddress`, so the recipient
vectors become `Vec<MuxedAddress>` and the contract's own address is converted
with `MuxedAddress::from`.

CLI guidance: `stellar contract build` optimizes by default in current
stellar-cli, so document `--optimize=false` and how to tell which behaviour a
version has; `--cost` prints only for a sent transaction, and prints nothing
with `--send=no`.

Storage prose: temporary entries are not cleared at the end of the invocation —
they live until their TTL (testnet `min_temporary_ttl` is 720 ledgers), so the
§5 description and one §3 trade-off bullet are wrong, and §5 also contradicted
itself. The instance-storage size cap is a validator-set network parameter
(testnet `contract_data_entry_size_bytes` is 65,536, not "on the order of
100 KB"), so link the live network limits instead of asserting a number. Both
points match how #2880 corrected the sibling storage guide.

Also renumber the duplicated "### 5" section and level the two storage-API
headings that sat at the same depth as their parent.

Closes #1845
oceans404 added a commit that referenced this pull request Oct 21, 2026
Checks: scope 1 file, parity 8/8 upstream lines identical, guard
clean, mint validate passed, broken-links at baseline 8, page 200.
ElliotFriend added a commit that referenced this pull request Oct 21, 2026
Port of 68c7155 to the Mintlify tree.

Refs #2880

Co-Authored-By: Claude Opus 5.5 <[email protected]>
ElliotFriend added a commit that referenced this pull request Oct 22, 2026
)

Replaces the Docusaurus site with Mintlify's converted tree (base bcec501),
with tooling trimmed to prettier, husky, redocly, the OpenRPC build, and the
mint CLI. Commits that landed on main after bcec501 were ported by hand.

Ported:
Refs #2448
Refs #2671
Refs #2672
Refs #2727
Refs #2827
Refs #2828
Refs #2837
Refs #2856
Refs #2857
Refs #2869
Refs #2871
Refs #2878
Refs #2880
Refs #2881
Refs #2885
Refs #2886
Refs #2890
Refs #2892
Refs #2893
Refs #2895
Refs #2900
Refs #2901
Refs #2902
Refs #2903
Refs #2905
Refs #2912
Refs #2913
Refs #2915
Refs #2918
Refs #2922

Merged into the branch:
Refs #2936
Refs #2937
Refs #2938
Refs #2940

Co-authored-by: alexistabak-cpu <[email protected]>
Co-authored-by: Emir Ayral <[email protected]>
Co-authored-by: John Wooten <[email protected]>
Co-authored-by: Kaan Kacar <[email protected]>
Co-authored-by: Leigh <[email protected]>
Co-authored-by: maz <[email protected]>
Co-authored-by: Michael Lip <[email protected]>
Co-authored-by: Scopuly <[email protected]>
Co-authored-by: stellar-triage-bot[bot] <333411864+stellar-triage-bot[bot]@users.noreply.github.com>
Co-authored-by: Steph <[email protected]>
Co-authored-by: urvisavla <[email protected]>
Co-authored-by: water-k-max <[email protected]>
Co-authored-by: Wlademyr Mendes <[email protected]>
Co-Authored-by: Claude Opus 5.5 <[email protected]>
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.

Choosing the right storage: unverified claims about the entry size limit and storage cost ordering

2 participants