feat(v2): add admin rotation - #144
Conversation
| env.storage().instance().set(&DataKey::Admin, &new_admin); | ||
| env.storage() | ||
| .instance() | ||
| .extend_ttl(INSTANCE_LIFETIME_THRESHOLD, INSTANCE_BUMP_AMOUNT); |
There was a problem hiding this comment.
set_admin extends instance-storage TTL, but the existing set_paused_v2 doesn't. If set_admin is the only admin-initiated instance-storage-touching call over a long stretch, the instance entry still risks TTL expiration since set_paused_v2 never extends it. Consider fixing this at the shared level (a helper both functions call) rather than only in the function this PR adds.
| assertions. The admin cannot insert a voter, remove one, alter weight, or change a | ||
| pinned policy. | ||
|
|
||
| The admin address itself can be rotated through `set_admin(new_admin)`. The call |
There was a problem hiding this comment.
This note explains set_admin's semantics, but docs/src/DEPLOYMENT.md's separate Admin runbook section (Pausing during an incident, Rotating the resolver committee) has no equivalent step-by-step example for rotating the admin key. An operator following that runbook during an incident has no set_admin invocation example to copy, unlike pause and resolver rotation. Please add one there too.
514233d to
fec3633
Compare
|
Addressed both review points in commit
|
collinsezedike
left a comment
There was a problem hiding this comment.
@dimin4241-svg thank you for the contribution. This looks good, there is nothing to flag.
Summary
Adds the same direct, current-admin-authorized
set_adminmechanism to Tholos v2. Rotation takes effect immediately, emitsAdminUpdated, and changes only who may invoke existing admin controls; pinned assertion policy and economics are unaffected. The v2 administration design documentation is updated.Closes #129
Test plan
cargo fmt --check,cargo clippy --workspace --all-targets -- -D warnings, andcargo testpass locally (make check)CONTRACT.mdupdated if the public interface changed — not applicable because it documents v1;V2_RESOLUTION.mdis updated insteadset_paused_v2, and confirmed the new admin was accepted