consensusfault

package
v1.15.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2024 License: Apache-2.0, MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsensusFaultChecker

type ConsensusFaultChecker struct {
	// contains filtered or unexported fields
}

Checks the validity of reported consensus faults.

func NewFaultChecker

func NewFaultChecker(chain chainReader, fork fork.IFork) *ConsensusFaultChecker

func (*ConsensusFaultChecker) VerifyConsensusFault

func (s *ConsensusFaultChecker) VerifyConsensusFault(ctx context.Context, h1, h2, extra []byte, curEpoch abi.ChainEpoch, msg vm.VmMessage, gasIpld cbornode.IpldStore, view vm.SyscallsStateView, getter vmcontext.LookbackStateGetter) (*runtime7.ConsensusFault, error)

Checks validity of the submitted consensus fault with the two block headers needed to prove the fault and an optional extra one to check common ancestry (as needed). Note that the blocks are ordered: the method requires a.Epoch() <= b.Epoch().

type FaultStateView

type FaultStateView interface {
	ResolveToDeterministicAddress(ctx context.Context, address address.Address) (address.Address, error)
	MinerInfo(ctx context.Context, maddr address.Address, nv network.Version) (*miner.MinerInfo, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL