use std::path::PathBuf;
use crate::{Commitment, RegisteredPoStProof};
pub type VanillaProofBytes = Vec<u8>;
#[repr(transparent)]
#[derive(Clone, Debug)]
pub struct PartitionProofBytes(pub 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,
}
}
}