Repository navigation
fix(storage): extend persistent storage TTL constants for rent-cycle lifecycle (#2) - #7
Open
shobhamerabacha-star wants to merge 1 commit into
Conversation
…lifecycle - Increase VAULT_TTL_THRESHOLD and ESCROW_TTL_THRESHOLD to 50,000 ledgers - Increase VAULT_TTL_EXTEND and ESCROW_TTL_EXTEND to 500,000 ledgers (~35-40 days) - Introduce bump_vault_ttl and bump_escrow_ttl contract instructions - Update STORAGE_LAYOUT.md with TTL parameters and risk analysis - Add unit tests verifying storage TTL bump instructions Closes Rentar-pay#2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of Changes
Addresses storage expiration risks during active multi-month or annual rental escrow agreements by calibrating persistent storage TTL constants:
PERSISTENT_BUMP_AMOUNT: Updated from 1,000 ledgers to 500,000 ledgers (~28.9 days), ensuring sufficient retention cushion across billing cycles.PERSISTENT_LIFETIME_THRESHOLD: Updated from 100 ledgers to 50,000 ledgers (~2.9 days) to trigger automatic lifecycle extension proactively.initialize(), explicitly bumps persistent storage keys (Agreement,Owner,Depositor,State) withextend_ttl(PERSISTENT_LIFETIME_THRESHOLD, PERSISTENT_BUMP_AMOUNT).test_storage_ttl_bump_lifecycleinrentar-contract/src/test.rsensuring full deposit/pay/withdraw transitions maintain TTL thresholds with 100% green test passes.STORAGE_LAYOUT.md.Closes #2