Skip to content

Commit 38c21d2

Browse files
committed
chore: pr comments
1 parent 52b3929 commit 38c21d2

4 files changed

Lines changed: 10 additions & 12 deletions

File tree

crates/events/src/enclave_event/compute_request/zk.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ use serde::{Deserialize, Serialize};
1515
/// ZK proof generation request variants.
1616
#[derive(Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
1717
pub enum ZkRequest {
18-
/// Generate proof for BFV public key (T0).
18+
/// Generate proof for BFV public key (C0).
1919
PkBfv(PkBfvProofRequest),
20-
/// Generate proof for PK generation (T1).
20+
/// Generate proof for PK generation (C1).
2121
PkGeneration(PkGenerationProofRequest),
22-
/// Generate proof for share and esm computation (T2a and T2b).
22+
/// Generate proof for share and esm computation (C2a and C2b).
2323
ShareComputation(ShareComputationProofRequest),
2424
}
2525

26-
/// Request to generate a proof for share computation (T2a or T2b).
26+
/// Request to generate a proof for share computation (C2a or C2b).
2727
#[derive(Derivative, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
2828
#[derivative(Debug)]
2929
pub struct ShareComputationProofRequest {
@@ -39,7 +39,7 @@ pub struct ShareComputationProofRequest {
3939
pub committee_size: CiphernodesCommitteeSize,
4040
}
4141

42-
/// Request to generate a proof for BFV public key generation (T0).
42+
/// Request to generate a proof for BFV public key generation (C0).
4343
#[derive(Derivative, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
4444
#[derivative(Debug)]
4545
pub struct PkBfvProofRequest {
@@ -49,7 +49,7 @@ pub struct PkBfvProofRequest {
4949
pub params_preset: BfvPreset,
5050
}
5151

52-
/// Request to generate a proof for PK share generation (T1a).
52+
/// Request to generate a proof for PK share generation (C1).
5353
#[derive(Derivative, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
5454
#[derivative(Debug)]
5555
pub struct PkGenerationProofRequest {

crates/events/src/enclave_event/share_computation_proof_signed.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// without even the implied warranty of MERCHANTABILITY
55
// or FITNESS FOR A PARTICULAR PURPOSE.
66

7-
use crate::{E3id, ProofType, SignedProofPayload};
7+
use crate::{E3id, SignedProofPayload};
88
use actix::Message;
99
use serde::{Deserialize, Serialize};
1010
use std::fmt::{self, Display};
@@ -14,7 +14,6 @@ use std::fmt::{self, Display};
1414
pub struct ShareComputationProofSigned {
1515
pub e3_id: E3id,
1616
pub party_id: u64,
17-
pub proof_type: ProofType,
1817
pub signed_proof: SignedProofPayload,
1918
}
2019

crates/keyshare/src/threshold_keyshare.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -465,14 +465,15 @@ impl ThresholdKeyshare {
465465
return Ok(());
466466
}
467467

468+
let proof_type = msg.signed_proof.payload.proof_type;
468469
info!(
469470
"Received ShareComputationProofSigned ({:?}) for party {} E3 {}",
470-
msg.proof_type, msg.party_id, msg.e3_id
471+
proof_type, msg.party_id, msg.e3_id
471472
);
472473

473474
self.state.try_mutate(&ec, |s| {
474475
let current: AggregatingDecryptionKey = s.clone().try_into()?;
475-
let updated = match msg.proof_type {
476+
let updated = match proof_type {
476477
ProofType::T1SkShareComputation => AggregatingDecryptionKey {
477478
signed_sk_share_computation_proof: Some(msg.signed_proof),
478479
..current

crates/zk-prover/src/actors/proof_request.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,6 @@ impl ProofRequestActor {
320320
ShareComputationProofSigned {
321321
e3_id: e3_id.clone(),
322322
party_id,
323-
proof_type: ProofType::T1SkShareComputation,
324323
signed_proof: signed_sk_share,
325324
},
326325
ec.clone(),
@@ -332,7 +331,6 @@ impl ProofRequestActor {
332331
ShareComputationProofSigned {
333332
e3_id: e3_id.clone(),
334333
party_id,
335-
proof_type: ProofType::T1ESmShareComputation,
336334
signed_proof: signed_e_sm_share,
337335
},
338336
ec.clone(),

0 commit comments

Comments
 (0)