Skip to content

fix(contracts): bump multisig_governance read TTL and add TTL tests (#864) - #908

Open
jeffrey-graham wants to merge 1 commit into
ExcelDsigN-tech:mainfrom
jeffrey-graham:fix/ttl-multisig-reads-and-tests
Open

jeffrey-graham wants to merge 1 commit into
ExcelDsigN-tech:mainfrom
jeffrey-graham:fix/ttl-multisig-reads-and-tests

Conversation

@jeffrey-graham

Copy link
Copy Markdown

Overview

Completes the remaining instance TTL work tracked in #864 (follow-up to #836 and #821):

  1. Extends instance TTL on all read-only entry points (as well as __constructor, version, upgrade, and upgrade-timelock methods) in multisig_governance using bump_instance_ttl.
  2. Adds instance TTL regression tests for multisig_governance, circuit_breaker, and audit_anchor that advance the ledger sequence into the re-extension window and assert the instance TTL is restored to INSTANCE_TTL_BUMP.

Closes #864

Technical Implementation

  • contracts/multisig_governance/src/lib.rs & src/upgrade_timelock.rs:
    • Exposed bump_instance_ttl as pub(crate) and added calls across all read getters (get_current_admin, get_admin, get_target, get_pending_transfer, get_pending, has_pending_transfer, get_approval_count, get_timelock_remaining, get_proposal_count, get_signers, get_threshold, has_approved) as well as __constructor, version, upgrade, and upgrade-timelock entry points.
  • contracts/multisig_governance/src/test.rs:
    • Added test_read_and_write_entry_points_extend_instance_ttl advancing ledger sequence by 510_000 into the bump window and asserting INSTANCE_TTL_BUMP after propose_admin_transfer, get_pending_transfer, and has_approved.
  • contracts/circuit_breaker/src/test.rs:
    • Added test_admin_entry_points_extend_instance_ttl advancing ledger sequence by 510_000 into the bump window and asserting INSTANCE_TTL_BUMP after set_override_timelock and propose_override.
  • contracts/audit_anchor/src/lib.rs:
    • Added anchor_extends_instance_ttl advancing ledger sequence by 510_000 into the bump window and asserting AuditAnchor::INSTANCE_TTL_BUMP after anchor.

Test Coverage

  • cargo fmt --all -- --check: passed
  • cargo clippy -p multisig_governance -p circuit_breaker -p audit_anchor --all-targets -- -D warnings: 0 warnings
  • cargo test -p multisig_governance -p circuit_breaker -p audit_anchor -- --test-threads=1: 88 passed (52 in multisig_governance, 30 in circuit_breaker, 6 in audit_anchor)
  • WASM sizes (wasm32-unknown-unknown --release): multisig_governance.wasm 45,156 bytes, circuit_breaker.wasm 42,781 bytes, audit_anchor.wasm 6,174 bytes (all well under the 256 KiB budget).

Checklists

Issue Definition of Done

  • multisig_governance read entry points bump instance TTL using the existing bump_instance_ttl helper
  • One TTL test per contract as described above, failing if the bump is removed
  • Clippy clean with -D warnings, every wasm under 256 KiB
  • All required CI checks pass

@coderabbitai

coderabbitai Bot commented Nov 10, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 964d39a0-48a0-4047-9d53-825b39563058
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

This branch has not been deployed

No deployments
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.

TTL follow-ups: multisig_governance read-path bumps and TTL tests for multisig, circuit_breaker and audit_anchor

1 participant