Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement contract TTL extension functions #24

Merged
merged 7 commits into from
Aug 9, 2024
Merged

Conversation

bbyalcinkaya
Copy link
Member

@bbyalcinkaya bbyalcinkaya commented Aug 7, 2024

This PR adds expiration time (as a ledger sequence number, not a timestamp) to contract instances and contract codes. It also implements the host function for extending the contract's TTL (time-to-live).

For now, this expiration time doesn't affect the behavior. It is part of the state archival system, but we do not have state archival implemented yet.

Host function:

  • extend_current_contract_instance_and_code_ttl "l" "8"

Note: TTL = live_until - ledger_sequence_number

@bbyalcinkaya bbyalcinkaya marked this pull request as ready for review August 8, 2024 14:47
@bbyalcinkaya bbyalcinkaya marked this pull request as draft August 8, 2024 14:57
@bbyalcinkaya bbyalcinkaya marked this pull request as ready for review August 8, 2024 17:11
@bbyalcinkaya bbyalcinkaya requested a review from gtrepta August 8, 2024 17:11
@rv-jenkins rv-jenkins merged commit 0b2d0f2 into master Aug 9, 2024
3 checks passed
@rv-jenkins rv-jenkins deleted the contract-ttl branch August 9, 2024 06:27
@bbyalcinkaya bbyalcinkaya mentioned this pull request Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants