use cid::Cid;
use clock::ChainEpoch;
use fvm_ipld_encoding::strict_bytes;
use fvm_ipld_encoding::tuple::*;
use crate::randomness::Randomness;
use crate::sector::{
RegisteredAggregateProof, RegisteredSealProof, RegisteredUpdateProof, SectorID, SectorNumber,
};
use crate::{clock, deal, ActorID};
pub type SealRandomness = Randomness;
pub type InteractiveSealRandomness = Randomness;
#[derive(Clone, Debug, PartialEq, Eq, Serialize_tuple, Deserialize_tuple)]
pub struct SealVerifyInfo {
pub registered_proof: RegisteredSealProof,
pub sector_id: SectorID,
pub deal_ids: Vec<deal::DealID>,
pub randomness: SealRandomness,
pub interactive_randomness: InteractiveSealRandomness,
#[serde(with = "strict_bytes")]
pub proof: Vec<u8>,
pub sealed_cid: Cid, pub unsealed_cid: Cid, }
#[derive(Clone, Debug, PartialEq, Eq, Serialize_tuple, Deserialize_tuple)]
pub struct SealVerifyParams {
pub sealed_cid: Cid,
pub interactive_epoch: ChainEpoch,
pub registered_seal_proof: RegisteredSealProof,
#[serde(with = "strict_bytes")]
pub proof: Vec<u8>,
pub deal_ids: Vec<deal::DealID>,
pub sector_num: SectorNumber,
pub seal_rand_epoch: ChainEpoch,
}
#[derive(Clone, Debug, PartialEq, Eq, Serialize_tuple, Deserialize_tuple)]
pub struct AggregateSealVerifyInfo {
pub sector_number: SectorNumber,
pub randomness: SealRandomness,
pub interactive_randomness: InteractiveSealRandomness,
pub sealed_cid: Cid, pub unsealed_cid: Cid, }
#[derive(Clone, Debug, PartialEq, Eq, Serialize_tuple, Deserialize_tuple)]
pub struct AggregateSealVerifyProofAndInfos {
pub miner: ActorID,
pub seal_proof: RegisteredSealProof,
pub aggregate_proof: RegisteredAggregateProof,
#[serde(with = "strict_bytes")]
pub proof: Vec<u8>,
pub infos: Vec<AggregateSealVerifyInfo>,
}
#[derive(Clone, Debug, PartialEq, Eq, Serialize_tuple, Deserialize_tuple)]
pub struct ReplicaUpdateInfo {
pub update_proof_type: RegisteredUpdateProof,
pub old_sealed_cid: Cid,
pub new_sealed_cid: Cid,
pub new_unsealed_cid: Cid,
pub proof: Vec<u8>,
}