Estimated Effort: 2 weeks / 8 days
Impacted Subsystems / Files:
contracts/phase-protocol/src/lib.rs
scripts/deploy-phase-sep50.ts
Context & Problem Statement:
Soroban ledger entries require active TTL rent bumps to avoid archiving. The contract in contracts/phase-protocol/src/lib.rs mixes instance storage with persistent storage across UserPhase, TokenOwner, and Collection data keys without automated bump logic, risking protocol lockout if storage entries expire.
Technical Requirements & Scope:
- Profile storage rent costs for all
DataKey variants over 100,000 ledgers.
- Implement automated
env.storage().persistent().extend_ttl() invocations inside high-frequency functions (settle, initiate_phase, transfer).
- Create a standalone TypeScript utility script in
scripts/extend-protocol-ttl.ts that scans and extends storage TTLs for all protocol state entries.
- Document storage rent budgeting guidelines for protocol maintainers.
Multi-File Change Surface:
Touches contracts/phase-protocol/src/lib.rs storage invocation paths and adds deployment maintenance tooling under scripts/.
Acceptance Criteria:
Suggested Approach / Investigation Steps:
- Simulate 6-month ledger advancement using Soroban test environment.
- Add
extend_ttl calls inside contracts/phase-protocol/src/lib.rs.
- Validate TTL extension behavior using Stellar Expert explorer.
Estimated Effort: 2 weeks / 8 days
Impacted Subsystems / Files:
contracts/phase-protocol/src/lib.rsscripts/deploy-phase-sep50.tsContext & Problem Statement:
Soroban ledger entries require active TTL rent bumps to avoid archiving. The contract in
contracts/phase-protocol/src/lib.rsmixes instance storage with persistent storage acrossUserPhase,TokenOwner, andCollectiondata keys without automated bump logic, risking protocol lockout if storage entries expire.Technical Requirements & Scope:
DataKeyvariants over 100,000 ledgers.env.storage().persistent().extend_ttl()invocations inside high-frequency functions (settle,initiate_phase,transfer).scripts/extend-protocol-ttl.tsthat scans and extends storage TTLs for all protocol state entries.Multi-File Change Surface:
Touches
contracts/phase-protocol/src/lib.rsstorage invocation paths and adds deployment maintenance tooling underscripts/.Acceptance Criteria:
scripts/extend-protocol-ttl.tsexecutes successfully against testnet without hitting fee limits.Suggested Approach / Investigation Steps:
extend_ttlcalls insidecontracts/phase-protocol/src/lib.rs.