Skip to content

fix: extend the token, verifier and compliance ttl - #246

Merged
hpmaxi merged 6 commits into
feedbackfrom
feat/instance-ttl
Oct 20, 2026
Merged

hpmaxi merged 6 commits into
feedbackfrom
feat/instance-ttl

Conversation

@hpmaxi

@hpmaxi hpmaxi commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Closes #268

The share token, the compliance stub and the identity verifier never extended their instance TTL. The vault and oracle extend theirs; these three did not, and on testnet their instances already read as archived. Every call that does work on them now extends the instance to 30 days, like the vault. The runbook and the written TTL policy follow in the next PR.

Changes

  • The share token extends its instance on transfer, transfer_from, approve and every role call.
  • The identity verifier extends it on allow, is_allowed and verify_identity.
  • The compliance stub extends it on every hook the token calls and on its admin calls.
  • TESTING.md lists the new tests.

Acceptance criteria

  • Each of the three contracts extends its instance on the calls listed above
  • One test per contract shows a call restoring a decayed instance

Test plan

Automated tests

  1. SOROBAN_SDK_BUILD_SYSTEM_SUPPORTS_SPEC_SHAKING_V2=1 cargo test --locked
  2. All suites pass; the new tests are the *_instance_ttl ones.

Manual verification

None; the testnet redeploy comes with the group release.

Breaking changes

None.

Checklist

  • Self-reviewed my own diff
  • Tests added or updated
  • Docs updated (if applicable)
  • No unrelated changes bundled in

Screenshots

None.

@vercel

vercel Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
strata-vault-kit-app Ready Ready Preview Oct 20, 2026 5:43pm UTC

Request Review

@hpmaxi
hpmaxi marked this pull request as ready for review October 16, 2026 23:41

@luchobonatti luchobonatti left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

  • M-09 (new balances not extended on creation) seems out of scope here. Is it planned for another PR or upstream?

}

/// OpenZeppelin leaves the instance's lifetime to the token, so every call
/// that moves shares extends it before handing over to the library.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe also extend in balance and total_supply? A later wind-down claim only reads balance, so a quiet wind-down could still let the instance lapse.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added in #276 (9516c95): balance and total_supply now extend the token's instance before they read, so a wind-down that only reads balances keeps the token alive. A test lets the instance fall below its threshold and checks that a balance read brings it back to the full 30 days.

@hpmaxi
hpmaxi changed the base branch from feat/shared-timelock-crate to feedback October 20, 2026 18:10
@hpmaxi
hpmaxi merged commit 52cedeb into feedback Oct 20, 2026
3 checks passed
@hpmaxi

hpmaxi commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

@luchobonatti On new balances not being extended when they are created: it's in this stack, in #276. Every call that writes a share balance or a freeze, and every role grant, reads the entry back through OpenZeppelin's own reads, so a new entry reaches its extend target in the transaction that creates it.

This branch was successfully deployed

1 active deployment
Preview — 306666d4 Deployed Oct 20, 2026 by vercel[bot]
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.

2 participants