Skip to content

Comments

#302 feat: successfully optimized the storage usage patterns#346

Merged
Yunusabdul38 merged 3 commits intoWeb3Novalabs:mainfrom
savagechucks:feature/Optimize_Storage_Usage_Patterns_Ttl_Instance_vs_Persistent
Feb 20, 2026
Merged

#302 feat: successfully optimized the storage usage patterns#346
Yunusabdul38 merged 3 commits intoWeb3Novalabs:mainfrom
savagechucks:feature/Optimize_Storage_Usage_Patterns_Ttl_Instance_vs_Persistent

Conversation

@savagechucks
Copy link
Contributor

close #302

I have successfully optimized the storage usage patterns for the predifi-contract smart contract!

Here's a summary of the changes made:

Moved Linear Growth Data to Persistent Storage: Keys such as Prediction, HasClaimed, OutcomeStake, UserPredictionCount, UserPredictionIndex, and Pool have been migrated from instance storage to persistent() storage, as their unbound growth risks exceeding instance storage limits.
Standardized TTLs: Implemented standard constants and helper methods (extend_instance and extend_persistent) to bump the time-to-live (TTL) to ~30 days (518,400 ledgers) when interacted with.
CI & Formatting Check: cargo fmt --all -- --check and cargo test were run successfully, passing all 30 total tests in the workspace!

@Yunusabdul38 please review

@vercel
Copy link

vercel bot commented Feb 20, 2026

@savagechucks is attempting to deploy a commit to the shola's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Collaborator

@Yunusabdul38 Yunusabdul38 left a comment

Choose a reason for hiding this comment

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

LGTM

@Yunusabdul38 Yunusabdul38 merged commit 85496ee into Web3Novalabs:main Feb 20, 2026
1 of 2 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.

Optimize Storage Usage Patterns (Ttl, Instance vs Persistent)

2 participants