Documentation ¶
Index ¶
- Variables
- type NilFaultChecker
- type Syscalls
- func (s *Syscalls) BatchVerifySeals(ctx context.Context, vis map[address.Address][]proof5.SealVerifyInfo) (map[address.Address][]bool, error)
- func (s *Syscalls) ComputeUnsealedSectorCID(_ context.Context, proof abi.RegisteredSealProof, pieces []abi.PieceInfo) (cid.Cid, error)
- func (s *Syscalls) HashBlake2b(data []byte) [32]byte
- func (s *Syscalls) VerifyAggregateSeals(aggregate proof5.AggregateSealVerifyProofAndInfos) error
- func (s *Syscalls) VerifyConsensusFault(ctx context.Context, h1, h2, extra []byte, curEpoch abi.ChainEpoch, ...) (*vmr.ConsensusFault, error)
- func (s *Syscalls) VerifyPoSt(ctx context.Context, info proof5.WindowPoStVerifyInfo) error
- func (s *Syscalls) VerifyReplicaUpdate(update proof7.ReplicaUpdateInfo) error
- func (s *Syscalls) VerifySeal(_ context.Context, info proof5.SealVerifyInfo) error
- func (s *Syscalls) VerifySignature(ctx context.Context, view vm.SyscallsStateView, signature crypto.Signature, ...) error
Constants ¶
This section is empty.
Variables ¶
var BatchSealVerifyParallelism = 2 * goruntime.NumCPU()
Functions ¶
This section is empty.
Types ¶
type NilFaultChecker ¶
type NilFaultChecker struct { }
func (*NilFaultChecker) VerifyConsensusFault ¶
func (n *NilFaultChecker) VerifyConsensusFault(_ context.Context, _, _, _ []byte, _ abi.ChainEpoch, _ vm.VmMessage, _ cbornode.IpldStore, _ vm.SyscallsStateView, _ vmcontext.LookbackStateGetter) (*rt5.ConsensusFault, error)
type Syscalls ¶
type Syscalls struct {
// contains filtered or unexported fields
}
Syscalls contains the concrete implementation of VM system calls, including connection to proof verification and blockchain inspection. Errors returned by these methods are intended to be returned to the actor code to respond to: they must be entirely deterministic and repeatable by other implementations. Any non-deterministic error will instead trigger a panic. TODO: determine a more robust mechanism for distinguishing transient runtime failures from deterministic errors in VM and supporting code. https://github.com/filecoin-project/venus/issues/3844
func NewSyscalls ¶
func NewSyscalls(faultChecker faultChecker, verifier ffiwrapper.Verifier) *Syscalls
func (*Syscalls) BatchVerifySeals ¶
func (s *Syscalls) BatchVerifySeals(ctx context.Context, vis map[address.Address][]proof5.SealVerifyInfo) (map[address.Address][]bool, error)
BatchVerifySeals batch verify windows post
func (*Syscalls) ComputeUnsealedSectorCID ¶
func (s *Syscalls) ComputeUnsealedSectorCID(_ context.Context, proof abi.RegisteredSealProof, pieces []abi.PieceInfo) (cid.Cid, error)
ComputeUnsealedSectorCID Computes an unsealed sector CID (CommD) from its constituent piece CIDs (CommPs) and sizes.
func (*Syscalls) HashBlake2b ¶
HashBlake2b Hashes input data using blake2b with 256 bit output.
func (*Syscalls) VerifyAggregateSeals ¶ added in v0.9.7
func (s *Syscalls) VerifyAggregateSeals(aggregate proof5.AggregateSealVerifyProofAndInfos) error
func (*Syscalls) VerifyConsensusFault ¶
func (s *Syscalls) VerifyConsensusFault(ctx context.Context, h1, h2, extra []byte, curEpoch abi.ChainEpoch, msg vm.VmMessage, gasIpld cbornode.IpldStore, view vm.SyscallsStateView, getter vmcontext.LookbackStateGetter) (*vmr.ConsensusFault, error)
Verifies that two block headers provide proof of a consensus fault: - both headers mined by the same actor - headers are different - first header is of the same or lower epoch as the second - at least one of the headers appears in the current chain at or after epoch `earliest` - the headers provide evidence of a fault (see the spec for the different fault types). The parameters are all serialized block headers. The third "extra" parameter is consulted only for the "parent grinding fault", in which case it must be the sibling of h1 (same parent tipset) and one of the blocks in the parent of h2 (i.e. h2's grandparent). Returns nil and an error if the headers don't prove a fault.
func (*Syscalls) VerifyPoSt ¶
VerifyPoSt verify windows post
func (*Syscalls) VerifyReplicaUpdate ¶ added in v1.2.0
func (s *Syscalls) VerifyReplicaUpdate(update proof7.ReplicaUpdateInfo) error
func (*Syscalls) VerifySeal ¶
VerifySeal returns true if the sealing operation from which its inputs were derived was valid, and false if not.