Skip to content

feat(scripts): storage rent estimator CLI (#290) - #348

Merged
miss-yusrah merged 1 commit into
Stellar-TrustBridge:mainfrom
jones43r:feature/290-storage-rent-estimator-cli
Aug 31, 2026
Merged

feat(scripts): storage rent estimator CLI (#290)#348
miss-yusrah merged 1 commit into
Stellar-TrustBridge:mainfrom
jones43r:feature/290-storage-rent-estimator-cli

Conversation

@jones43r

Copy link
Copy Markdown
Contributor

Summary

Adds scripts/storage_rent_estimator.py, a pure-function CLI that consumes docs/storage-rent-estimator.inputs.v1.json and prints on-chain persistent + instance storage entry counts for a given contributor count N. It also cross-checks chunk_size in the inputs JSON against CHUNK_SIZE in src/storage.rs and warns to stderr on any drift.

  • Formula stays pinned in docs/STORAGE_RENT_ESTIMATOR.md; the CLI only implements the documented entry-count formulas (no on-chain estimator changes).
  • Handles the zero-user edge case and schema versioning (estimator_inputs_version == 1).
  • Golden-output fixture: scripts/testdata/storage-rent-estimator.golden.txt.
  • Golden test scripts/test_storage_rent_estimator.sh, wired into the CI quality job, also asserts the chunk-size mismatch warning fires.
  • README pointer in scripts/README.md and a CLI pointer in docs/STORAGE_RENT_ESTIMATOR.md.

Validation

  • python3 -m py_compile scripts/storage_rent_estimator.py
  • bash scripts/test_storage_rent_estimator.sh → PASS
  • Manual runs for N=0, N=10 (--json), N=250

Closes: #290

Adds scripts/storage_rent_estimator.py: a pure-function CLI that consumes
docs/storage-rent-estimator.inputs.v1.json, prints on-chain persistent and
instance entry counts for a given contributor count, and warns when
chunk_size in the inputs JSON drifts from CHUNK_SIZE in src/storage.rs.

Includes a golden-output test (wired into CI) and README/doc pointers.

Closes: Stellar-TrustBridge#290
@drips-wave

drips-wave Bot commented Aug 29, 2026

Copy link
Copy Markdown

@jones43r Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@miss-yusrah
miss-yusrah merged commit 0e13752 into Stellar-TrustBridge:main Aug 31, 2026
0 of 4 checks passed
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.

Storage rent estimator CLI consuming storage-rent-estimator.inputs.v1.json

2 participants