Sector Sealer

Sector Sealer

import abi "github.com/filecoin-project/specs-actors/actors/abi"
import sector "github.com/filecoin-project/specs/systems/filecoin_mining/sector"
import file "github.com/filecoin-project/specs/systems/filecoin_files/file"
import addr "github.com/filecoin-project/go-address"

type SealInputs struct {
    SectorSize       abi.SectorSize
    RegisteredProof  abi.RegisteredProof  // FIXME: Ensure this is provided.
    SectorID         abi.SectorID
    MinerID          addr.Address
    RandomSeed       abi.SealRandomness  // This should be derived from SEAL_EPOCH = CURRENT_EPOCH - FINALITY.
    UnsealedPath     file.Path
    SealedPath       file.Path
    DealIDs          [abi.DealID]
}

type CreateSealProofInputs struct {
    SectorID               abi.SectorID
    RegisteredProof        abi.RegisteredProof
    InteractiveRandomSeed  abi.InteractiveSealRandomness
    SealedPaths            [file.Path]
    SealOutputs
}

type SealOutputs struct {
    ProofAuxTmp sector.ProofAuxTmp
}

type CreateSealProofOutputs struct {
    SealInfo  abi.SealVerifyInfo
    ProofAux  sector.PersistentProofAux
}

type SectorSealer struct {
    SealSector() union {so SealOutputs, err error}
    CreateSealProof(si CreateSealProofInputs) union {so CreateSealProofOutputs, err error}

    MaxUnsealedBytesPerSector(SectorSize UInt) UInt
}