Skip to content

Comments

feat: Add comprehensive TTL stress tests for long-term storage rent#258

Merged
Folex1275 merged 2 commits intoFolex1275:mainfrom
Haroldwonder:feature/ttl-stress-test
Feb 23, 2026
Merged

feat: Add comprehensive TTL stress tests for long-term storage rent#258
Folex1275 merged 2 commits intoFolex1275:mainfrom
Haroldwonder:feature/ttl-stress-test

Conversation

@Haroldwonder
Copy link
Contributor

  • Implement TTL extension logic in contract methods (get_stream, withdraw, create_stream)
  • Add helper function extend_contract_ttl() to ensure contract instance remains accessible
  • Create comprehensive stress tests covering 4-year vesting periods:
    • test_four_year_stream_ttl_survival: Tests stream survival over 4 years with withdrawals
    • test_multiple_streams_ttl_survival: Tests multiple streams created at different times
    • test_paused_stream_ttl_survival: Tests TTL survival during stream pause periods
  • Configure test environment with appropriate TTL settings for long-term testing
  • Verify streams remain 'Live' and withdrawable after 1, 2, and 4 year time jumps
  • Ensure TTL extension logic prevents data archival for the duration of streams

Addresses acceptance criteria:
Automated tests confirm TTL extension logic keeps data alive for stream duration
Simulation jumps ledger forward by 1, 2, and 4 years
Verification asserts stream data remains 'Live' and withdrawable after each jump

closes #47

- Implement TTL extension logic in contract methods (get_stream, withdraw, create_stream)
- Add helper function extend_contract_ttl() to ensure contract instance remains accessible
- Create comprehensive stress tests covering 4-year vesting periods:
  * test_four_year_stream_ttl_survival: Tests stream survival over 4 years with withdrawals
  * test_multiple_streams_ttl_survival: Tests multiple streams created at different times
  * test_paused_stream_ttl_survival: Tests TTL survival during stream pause periods
- Configure test environment with appropriate TTL settings for long-term testing
- Verify streams remain 'Live' and withdrawable after 1, 2, and 4 year time jumps
- Ensure TTL extension logic prevents data archival for the duration of streams

Addresses acceptance criteria:
 Automated tests confirm TTL extension logic keeps data alive for stream duration
 Simulation jumps ledger forward by 1, 2, and 4 years
 Verification asserts stream data remains 'Live' and withdrawable after each jump
@Folex1275 Folex1275 merged commit 34a5e9e into Folex1275:main Feb 23, 2026
1 check failed
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.

[Contract] Stress Test: Long-Term Storage Rent (TTL)

2 participants