1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
use std::path::PathBuf;
use crate::{Commitment, RegisteredPoStProof};
pub type VanillaProofBytes = Vec<u8>;
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub struct PrivateReplicaInfo {
pub(crate) registered_proof: RegisteredPoStProof,
pub(crate) comm_r: Commitment,
pub(crate) cache_dir: PathBuf,
pub(crate) replica_path: PathBuf,
}
impl PrivateReplicaInfo {
pub fn new(
registered_proof: RegisteredPoStProof,
comm_r: Commitment,
cache_dir: PathBuf,
replica_path: PathBuf,
) -> Self {
PrivateReplicaInfo {
registered_proof,
comm_r,
cache_dir,
replica_path,
}
}
}
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub struct PublicReplicaInfo {
pub(crate) registered_proof: RegisteredPoStProof,
pub(crate) comm_r: Commitment,
}
impl PublicReplicaInfo {
pub fn new(registered_proof: RegisteredPoStProof, comm_r: Commitment) -> Self {
PublicReplicaInfo {
registered_proof,
comm_r,
}
}
}