Documentation ¶
Index ¶
- Constants
- Variables
- func AggregateSealProofs(aggregateInfo proof.AggregateSealVerifyProofAndInfos, proofs [][]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) ([]proof.PoStProof, []abi.SectorNumber, error)
- func GenerateWindowPoStWithVanilla(proofType abi.RegisteredPoStProof, minerID abi.ActorID, ...) ([]proof.PoStProof, error)
- func GenerateWinningPoSt(abi.ActorID, SortedPrivateSectorInfo, abi.PoStRandomness) ([]proof.PoStProof, error)
- func GenerateWinningPoStSectorChallenge(abi.RegisteredPoStProof, abi.ActorID, abi.PoStRandomness, uint64) ([]uint64, error)
- func GenerateWinningPoStWithVanilla(proofType abi.RegisteredPoStProof, minerID abi.ActorID, ...) ([]proof.PoStProof, error)
- func GetGPUDevices() ([]string, error)
- func HashVerify(signature *Signature, messages []Message, publicKeys []PublicKey) bool
- func MergeWindowPoStPartitionProofs(proofType abi.RegisteredPoStProof, partitionProofs []PartitionProof) (*proof.PoStProof, error)
- 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(aggregate proof.AggregateSealVerifyProofAndInfos) (bool, error)
- func VerifySeal(proof.SealVerifyInfo) (bool, error)
- func VerifyWindowPoSt(proof.WindowPoStVerifyInfo) (bool, error)
- func VerifyWinningPoSt(proof.WinningPoStVerifyInfo) (bool, error)
- type ApplyRet
- type Digest
- type FVM
- type FVMOpts
- type FallbackChallenges
- type FunctionsSectorUpdate
- func (FunctionsSectorUpdate) DecodeFrom(proofType abi.RegisteredUpdateProof, outDataPath string, replicaPath string, ...) error
- func (FunctionsSectorUpdate) EncodeInto(proofType abi.RegisteredUpdateProof, newReplicaPath string, ...) (sealedCID cid.Cid, unsealedCID cid.Cid, err error)
- func (FunctionsSectorUpdate) GenerateUpdateProof(proofType abi.RegisteredUpdateProof, oldSealedCID cid.Cid, ...) ([]byte, error)
- func (FunctionsSectorUpdate) GenerateUpdateProofWithVanilla(proofType abi.RegisteredUpdateProof, oldSealedCID cid.Cid, ...) ([]byte, error)
- func (FunctionsSectorUpdate) GenerateUpdateVanillaProofs(proofType abi.RegisteredUpdateProof, oldSealedCID cid.Cid, ...) ([][]byte, error)
- func (FunctionsSectorUpdate) RemoveData(proofType abi.RegisteredUpdateProof, sectorKeyPath string, ...) error
- func (FunctionsSectorUpdate) VerifyUpdateProof(info proof.ReplicaUpdateInfo) (bool, error)
- func (FunctionsSectorUpdate) VerifyVanillaProofs(proofType abi.RegisteredUpdateProof, oldSealedCID cid.Cid, ...) (bool, error)
- type Message
- type PartitionProof
- 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 ¶
View Source
var SectorUpdate = FunctionsSectorUpdate{}
Functions ¶
func AggregateSealProofs ¶ added in v0.2.0
func AggregateSealProofs(aggregateInfo proof.AggregateSealVerifyProofAndInfos, proofs [][]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) ([]proof.PoStProof, []abi.SectorNumber, error)
func GenerateWindowPoStWithVanilla ¶ added in v0.4.0
func GenerateWindowPoStWithVanilla( proofType abi.RegisteredPoStProof, minerID abi.ActorID, randomness abi.PoStRandomness, proofs [][]byte, ) ([]proof.PoStProof, error)
func GenerateWinningPoSt ¶
func GenerateWinningPoSt(abi.ActorID, SortedPrivateSectorInfo, abi.PoStRandomness) ([]proof.PoStProof, error)
func GenerateWinningPoStSectorChallenge ¶
func GenerateWinningPoStSectorChallenge(abi.RegisteredPoStProof, abi.ActorID, abi.PoStRandomness, uint64) ([]uint64, error)
func GenerateWinningPoStWithVanilla ¶ added in v0.4.0
func GenerateWinningPoStWithVanilla( proofType abi.RegisteredPoStProof, minerID abi.ActorID, randomness abi.PoStRandomness, proofs [][]byte, ) ([]proof.PoStProof, error)
func GetGPUDevices ¶
func HashVerify ¶
func MergeWindowPoStPartitionProofs ¶ added in v0.4.0
func MergeWindowPoStPartitionProofs( proofType abi.RegisteredPoStProof, partitionProofs []PartitionProof, ) (*proof.PoStProof, error)
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 ¶ added in v0.2.0
func VerifyAggregateSeals(aggregate proof.AggregateSealVerifyProofAndInfos) (bool, error)
func VerifySeal ¶
func VerifySeal(proof.SealVerifyInfo) (bool, error)
func VerifyWindowPoSt ¶
func VerifyWindowPoSt(proof.WindowPoStVerifyInfo) (bool, error)
func VerifyWinningPoSt ¶
func VerifyWinningPoSt(proof.WinningPoStVerifyInfo) (bool, error)
Types ¶
type ApplyRet ¶ added in v0.4.0
type ApplyRet struct { Return []byte ExitCode uint64 GasUsed int64 MinerPenalty abi.TokenAmount MinerTip abi.TokenAmount BaseFeeBurn abi.TokenAmount OverEstimationBurn abi.TokenAmount Refund abi.TokenAmount GasRefund int64 GasBurned int64 ExecTraceBytes []byte FailureInfo string EventsRoot *cid.Cid EventsBytes []byte }
type FVM ¶ added in v0.4.0
type FVM struct{}
func (*FVM) ApplyImplicitMessage ¶ added in v0.4.0
func (*FVM) ApplyMessage ¶ added in v0.4.0
type FVMOpts ¶ added in v0.4.0
type FVMOpts struct { FVMVersion uint64 Externs cgo.Externs Epoch abi.ChainEpoch Timestamp uint64 ChainID uint64 BaseFee abi.TokenAmount BaseCircSupply abi.TokenAmount NetworkVersion network.Version StateBase cid.Cid Manifest cid.Cid Tracing bool Debug bool ActorRedirect cid.Cid }
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 FunctionsSectorUpdate ¶ added in v0.3.0
type FunctionsSectorUpdate struct{}
func (FunctionsSectorUpdate) DecodeFrom ¶ added in v0.3.0
func (FunctionsSectorUpdate) DecodeFrom( proofType abi.RegisteredUpdateProof, outDataPath string, replicaPath string, sectorKeyPath string, sectorKeyCachePath string, unsealedCID cid.Cid, ) error
func (FunctionsSectorUpdate) EncodeInto ¶ added in v0.3.0
func (FunctionsSectorUpdate) GenerateUpdateProof ¶ added in v0.3.0
func (FunctionsSectorUpdate) GenerateUpdateProof( proofType abi.RegisteredUpdateProof, oldSealedCID cid.Cid, newSealedCID cid.Cid, unsealedCID cid.Cid, newReplicaPath string, newReplicaCachePath string, sectorKeyPath string, sectorKeyCachePath string, ) ([]byte, error)
func (FunctionsSectorUpdate) GenerateUpdateProofWithVanilla ¶ added in v0.3.0
func (FunctionsSectorUpdate) GenerateUpdateProofWithVanilla( proofType abi.RegisteredUpdateProof, oldSealedCID cid.Cid, newSealedCID cid.Cid, unsealedCID cid.Cid, vanillaProofs [][]byte, ) ([]byte, error)
func (FunctionsSectorUpdate) GenerateUpdateVanillaProofs ¶ added in v0.3.0
func (FunctionsSectorUpdate) GenerateUpdateVanillaProofs( proofType abi.RegisteredUpdateProof, oldSealedCID cid.Cid, newSealedCID cid.Cid, unsealedCID cid.Cid, newReplicaPath string, newReplicaCachePath string, sectorKeyPath string, sectorKeyCachePath string, ) ([][]byte, error)
func (FunctionsSectorUpdate) RemoveData ¶ added in v0.3.0
func (FunctionsSectorUpdate) RemoveData( proofType abi.RegisteredUpdateProof, sectorKeyPath string, sectorKeyCachePath string, replicaPath string, replicaCachePath string, dataPath string, unsealedCID cid.Cid, ) error
func (FunctionsSectorUpdate) VerifyUpdateProof ¶ added in v0.3.0
func (FunctionsSectorUpdate) VerifyUpdateProof(info proof.ReplicaUpdateInfo) (bool, error)
func (FunctionsSectorUpdate) VerifyVanillaProofs ¶ added in v0.3.0
func (FunctionsSectorUpdate) VerifyVanillaProofs( proofType abi.RegisteredUpdateProof, oldSealedCID cid.Cid, newSealedCID cid.Cid, unsealedCID cid.Cid, vanillaProofs [][]byte, ) (bool, error)
type PartitionProof ¶ added in v0.4.0
func GenerateSinglePartitionWindowPoStWithVanilla ¶ added in v0.4.0
func GenerateSinglePartitionWindowPoStWithVanilla( proofType abi.RegisteredPoStProof, minerID abi.ActorID, randomness abi.PoStRandomness, proofs [][]byte, partitionIndex uint, ) (*PartitionProof, 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 proof.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.