refactor(proposal): remove the ApproveServerUpdate proposal kind

This commit is contained in:
CleverWild
2026-08-26 14:53:38 +02:00
parent 180f93c1a7
commit aa884339f7
4 changed files with 0 additions and 49 deletions

View File

@@ -38,7 +38,6 @@ pub enum ProposalKind {
wallet_id: i32,
client_id: i32,
},
ApproveServerUpdate,
ReplaceOperator {
old_operator_id: i32,
new_pubkey: Vec<u8>,
@@ -67,7 +66,6 @@ impl ProposalKind {
buf.extend_from_slice(&client_id.to_be_bytes());
buf
}
Self::ApproveServerUpdate => vec![],
Self::ReplaceOperator {
old_operator_id,
new_pubkey,
@@ -114,7 +112,6 @@ impl ProposalKind {
client_id: i32::from_be_bytes(bytes[4..].try_into().unwrap()),
})
}
ProposalKindTag::ApproveServerUpdate => Ok(Self::ApproveServerUpdate),
ProposalKindTag::ReplaceOperator => {
let (id_bytes, rest) = payload
.split_first_chunk::<4>()
@@ -692,7 +689,6 @@ impl ProposalManager {
wallet_id,
client_id,
} => self.execute_grant_wallet_access(wallet_id, client_id).await,
ProposalKind::ApproveServerUpdate => Ok(()),
ProposalKind::ReplaceOperator {
old_operator_id,
new_pubkey,

View File

@@ -52,7 +52,6 @@ async fn handle_create(
wallet_id: p.wallet_id,
client_id: p.client_id,
},
Some(ProtoKind::ApproveServerUpdate(_)) => ProposalKind::ApproveServerUpdate,
Some(ProtoKind::ReplaceOperator(p)) => ProposalKind::ReplaceOperator {
old_operator_id: p.old_operator_id,
new_pubkey: p.new_pubkey,

View File

@@ -917,47 +917,6 @@ async fn key_rotation_requires_full_quorum() {
assert_eq!(cast(op3, &key3).await, VoteOutcome::QuorumApproved);
}
#[tokio::test]
async fn approve_server_update_reaches_quorum() {
let db = db::create_test_pool().await;
let actors = GlobalActors::spawn(db.clone()).await.unwrap();
actors
.vault
.ask(Bootstrap { seal_key: KeyCell::from([0u8; 32]) })
.await
.unwrap();
let signing_key = authn::SigningKey::generate();
let op_id = register_operator(&db, &signing_key.public_key()).await;
let proposal_id = actors
.proposal_manager
.ask(CreateProposal {
kind: ProposalKind::ApproveServerUpdate,
initiator_id: op_id,
ttl_secs: None,
})
.await
.unwrap();
let msg = make_vote_message(proposal_id, true);
let sig = signing_key
.sign_message(&msg, SigningContext::GovernanceVote)
.unwrap();
let outcome = actors
.proposal_manager
.ask(CastVote {
proposal_id,
operator_id: op_id,
approve: true,
signature: sig.to_bytes(),
})
.await
.unwrap();
assert_eq!(outcome, VoteOutcome::QuorumApproved);
}
// ─── §3.5 / §3.6 Recovery Operator tests ──────────────────────────────────
#[tokio::test]