Documentation ¶
Index ¶
- Constants
- func AggregateSealProofs(proof5.AggregateSealVerifyProofAndInfos, [][]byte) (out []byte, err error)
- func ClearCache(uint64, string) error
- func FauxRep(abi.RegisteredSealProof, string, string) (cid.Cid, error)
- func GeneratePieceCIDFromFile(_ abi.RegisteredSealProof, _ io.Reader, _ abi.UnpaddedPieceSize) (cid.Cid, error)
- func GenerateSingleVanillaProof(replica PrivateSectorInfo, challange []uint64) ([]byte, error)
- func GenerateUnsealedCID(_ abi.RegisteredSealProof, _ []abi.PieceInfo) (cid.Cid, error)
- func GenerateWindowPoSt(abi.ActorID, SortedPrivateSectorInfo, abi.PoStRandomness) ([]proof5.PoStProof, []abi.SectorNumber, error)
- func GenerateWinningPoSt(abi.ActorID, SortedPrivateSectorInfo, abi.PoStRandomness) ([]proof5.PoStProof, error)
- func GenerateWinningPoStSectorChallenge(abi.RegisteredPoStProof, abi.ActorID, abi.PoStRandomness, uint64) ([]uint64, error)
- func GetGPUDevices() ([]string, error)
- func HashVerify(signature *Signature, messages []Message, publicKeys []PublicKey) bool
- func SealCommitPhase1(abi.RegisteredSealProof, cid.Cid, cid.Cid, string, string, abi.SectorNumber, ...) ([]byte, error)
- func SealCommitPhase2([]byte, abi.SectorNumber, abi.ActorID) ([]byte, error)
- func SealPreCommitPhase1(_ abi.RegisteredSealProof, _, _, _ string, _ abi.SectorNumber, _ abi.ActorID, ...) ([]byte, error)
- func SealPreCommitPhase2(_ []byte, _, _ string) (cid.Cid, cid.Cid, error)
- func UnsealRange(_ abi.RegisteredSealProof, _ string, _, _ *os.File, _ abi.SectorNumber, ...) error
- func Verify(signature *Signature, digests []Digest, publicKeys []PublicKey) bool
- func VerifyAggregateSeals(proof5.AggregateSealVerifyProofAndInfos) (bool, error)
- func VerifySeal(proof5.SealVerifyInfo) (bool, error)
- func VerifyWindowPoSt(proof5.WindowPoStVerifyInfo) (bool, error)
- func VerifyWinningPoSt(proof5.WinningPoStVerifyInfo) (bool, error)
- type Digest
- type FallbackChallenges
- type Message
- type PrivateKey
- type PrivateKeyGenSeed
- type PrivateSectorInfo
- type PublicKey
- type Signature
- type SortedPrivateSectorInfo
Constants ¶
View Source
const DigestBytes = 96
DigestBytes is the length of a BLS message hash/digest
View Source
const PrivateKeyBytes = 32
PrivateKeyBytes is the length of a BLS private key
View Source
const PublicKeyBytes = 48
PublicKeyBytes is the length of a BLS public key
View Source
const SignatureBytes = 96
SignatureBytes is the length of a BLS signature
Variables ¶
This section is empty.
Functions ¶
func AggregateSealProofs ¶
func AggregateSealProofs(proof5.AggregateSealVerifyProofAndInfos, [][]byte) (out []byte, err error)
func ClearCache ¶
func GeneratePieceCIDFromFile ¶
func GeneratePieceCIDFromFile(_ abi.RegisteredSealProof, _ io.Reader, _ abi.UnpaddedPieceSize) (cid.Cid, error)
func GenerateSingleVanillaProof ¶
func GenerateSingleVanillaProof(replica PrivateSectorInfo, challange []uint64) ([]byte, error)
func GenerateUnsealedCID ¶
func GenerateUnsealedCID(_ abi.RegisteredSealProof, _ []abi.PieceInfo) (cid.Cid, error)
func GenerateWindowPoSt ¶
func GenerateWindowPoSt(abi.ActorID, SortedPrivateSectorInfo, abi.PoStRandomness) ([]proof5.PoStProof, []abi.SectorNumber, error)
func GenerateWinningPoSt ¶
func GenerateWinningPoSt(abi.ActorID, SortedPrivateSectorInfo, abi.PoStRandomness) ([]proof5.PoStProof, error)
func GenerateWinningPoStSectorChallenge ¶
func GenerateWinningPoStSectorChallenge(abi.RegisteredPoStProof, abi.ActorID, abi.PoStRandomness, uint64) ([]uint64, error)
func GetGPUDevices ¶
func HashVerify ¶
func SealCommitPhase1 ¶
func SealCommitPhase1(abi.RegisteredSealProof, cid.Cid, cid.Cid, string, string, abi.SectorNumber, abi.ActorID, abi.SealRandomness, abi.InteractiveSealRandomness, []abi.PieceInfo) ([]byte, error)
func SealCommitPhase2 ¶
func SealPreCommitPhase1 ¶
func SealPreCommitPhase1(_ abi.RegisteredSealProof, _, _, _ string, _ abi.SectorNumber, _ abi.ActorID, _ abi.SealRandomness, _ []abi.PieceInfo) ([]byte, error)
func SealPreCommitPhase2 ¶
func UnsealRange ¶
func UnsealRange(_ abi.RegisteredSealProof, _ string, _, _ *os.File, _ abi.SectorNumber, _ abi.ActorID, _ abi.SealRandomness, _ cid.Cid, _, _ uint64) error
func VerifyAggregateSeals ¶
func VerifyAggregateSeals(proof5.AggregateSealVerifyProofAndInfos) (bool, error)
func VerifySeal ¶
func VerifySeal(proof5.SealVerifyInfo) (bool, error)
func VerifyWindowPoSt ¶
func VerifyWindowPoSt(proof5.WindowPoStVerifyInfo) (bool, error)
func VerifyWinningPoSt ¶
func VerifyWinningPoSt(proof5.WinningPoStVerifyInfo) (bool, error)
Types ¶
type FallbackChallenges ¶
type FallbackChallenges struct { Sectors []abi.SectorNumber Challenges map[abi.SectorNumber][]uint64 }
func GeneratePoStFallbackSectorChallenges ¶
func GeneratePoStFallbackSectorChallenges(proofType abi.RegisteredPoStProof, minerID abi.ActorID, randomness abi.PoStRandomness, sectorIds []abi.SectorNumber) (*FallbackChallenges, error)
type PrivateKey ¶
type PrivateKey [PrivateKeyBytes]byte
PrivateKey is a compressed affine
func PrivateKeyGenerate ¶
func PrivateKeyGenerate() PrivateKey
func PrivateKeyGenerateWithSeed ¶
func PrivateKeyGenerateWithSeed(seed PrivateKeyGenSeed) PrivateKey
type PrivateKeyGenSeed ¶
type PrivateKeyGenSeed [32]byte
Used when generating a private key deterministically
type PrivateSectorInfo ¶
type PrivateSectorInfo struct { abi.SectorNumber CacheDirPath string PoStProofType abi.RegisteredPoStProof SealedSectorPath string SectorInfo proof5.SectorInfo }
type PublicKey ¶
type PublicKey [PublicKeyBytes]byte
PublicKey is a compressed affine
func PrivateKeyPublicKey ¶
func PrivateKeyPublicKey(privateKey PrivateKey) PublicKey
type Signature ¶
type Signature [SignatureBytes]byte
Signature is a compressed affine
func CreateZeroSignature ¶
func CreateZeroSignature() Signature
func PrivateKeySign ¶
func PrivateKeySign(privateKey PrivateKey, message Message) *Signature
type SortedPrivateSectorInfo ¶
type SortedPrivateSectorInfo struct{ abi.SectorNumber }
func NewSortedPrivateSectorInfo ¶
func NewSortedPrivateSectorInfo(...PrivateSectorInfo) SortedPrivateSectorInfo
Click to show internal directories.
Click to hide internal directories.