Repository navigation
fix(contracts): bump multisig_governance read TTL and add TTL tests (#864) - #908
Open
jeffrey-graham wants to merge 1 commit into
Open
jeffrey-graham wants to merge 1 commit into
jeffrey-graham wants to merge 1 commit into
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
This branch has not been deployed
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.
Overview
Completes the remaining instance TTL work tracked in #864 (follow-up to #836 and #821):
__constructor,version,upgrade, and upgrade-timelock methods) inmultisig_governanceusingbump_instance_ttl.multisig_governance,circuit_breaker, andaudit_anchorthat advance the ledger sequence into the re-extension window and assert the instance TTL is restored toINSTANCE_TTL_BUMP.Closes #864
Technical Implementation
contracts/multisig_governance/src/lib.rs&src/upgrade_timelock.rs:bump_instance_ttlaspub(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:test_read_and_write_entry_points_extend_instance_ttladvancing ledger sequence by510_000into the bump window and assertingINSTANCE_TTL_BUMPafterpropose_admin_transfer,get_pending_transfer, andhas_approved.contracts/circuit_breaker/src/test.rs:test_admin_entry_points_extend_instance_ttladvancing ledger sequence by510_000into the bump window and assertingINSTANCE_TTL_BUMPafterset_override_timelockandpropose_override.contracts/audit_anchor/src/lib.rs:anchor_extends_instance_ttladvancing ledger sequence by510_000into the bump window and assertingAuditAnchor::INSTANCE_TTL_BUMPafteranchor.Test Coverage
cargo fmt --all -- --check: passedcargo clippy -p multisig_governance -p circuit_breaker -p audit_anchor --all-targets -- -D warnings: 0 warningscargo test -p multisig_governance -p circuit_breaker -p audit_anchor -- --test-threads=1: 88 passed (52 inmultisig_governance, 30 incircuit_breaker, 6 inaudit_anchor)wasm32-unknown-unknown --release):multisig_governance.wasm45,156 bytes,circuit_breaker.wasm42,781 bytes,audit_anchor.wasm6,174 bytes (all well under the 256 KiB budget).Checklists
Issue Definition of Done
multisig_governanceread entry points bump instance TTL using the existingbump_instance_ttlhelper-D warnings, every wasm under 256 KiB