types

package
v1.17.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: Apache-2.0, MIT Imports: 48 Imported by: 133

Documentation

Overview

Code generated by github.com/filecoin-project/venus/venus-devtool/state-type-gen. DO NOT EDIT.

Code generated by github.com/filecoin-project/venus/venus-devtool/state-type-gen. DO NOT EDIT.

Code generated by github.com/filecoin-project/venus/venus-devtool/state-type-gen. DO NOT EDIT.

Code generated by github.com/filecoin-project/venus/venus-devtool/state-type-gen. DO NOT EDIT.

Code generated by github.com/filecoin-project/venus/venus-devtool/state-type-gen. DO NOT EDIT.

Code generated by github.com/filecoin-project/venus/venus-devtool/state-type-gen. DO NOT EDIT.

Code generated by github.com/filecoin-project/venus/venus-devtool/state-type-gen. DO NOT EDIT.

Code generated by github.com/filecoin-project/venus/venus-devtool/state-type-gen. DO NOT EDIT.

Code generated by github.com/filecoin-project/venus/venus-devtool/state-type-gen. DO NOT EDIT.

Code generated by github.com/filecoin-project/venus/venus-devtool/state-type-gen. DO NOT EDIT.

Code generated by github.com/filecoin-project/venus/venus-devtool/state-type-gen. DO NOT EDIT.

Code generated by github.com/filecoin-project/venus/venus-devtool/state-type-gen. DO NOT EDIT.

Index

Constants

View Source
const (
	StageIdle = SyncStateStage(iota)
	StageHeaders
	StagePersistHeaders
	StageMessages
	StageSyncComplete
	StageSyncErrored
	StageFetchingMessages
)
View Source
const (
	EthAddressLength = types.EthAddressLength
	EthBloomSize     = types.EthBloomSize
	EthHashLength    = types.EthHashLength
	SafeEpochDelay   = types.SafeEpochDelay
)
View Source
const (
	EIP1559TxType                       = types.EIP1559TxType
	EthEIP1559TxSignatureLen            = types.EthEIP1559TxSignatureLen
	EthLegacy155TxSignaturePrefix       = types.EthLegacy155TxSignaturePrefix
	EthLegacyHomesteadTxChainID         = types.EthLegacyHomesteadTxChainID
	EthLegacyHomesteadTxSignatureLen    = types.EthLegacyHomesteadTxSignatureLen
	EthLegacyHomesteadTxSignaturePrefix = types.EthLegacyHomesteadTxSignaturePrefix
	EthLegacyTxType                     = types.EthLegacyTxType
)
View Source
const (
	EventFlagIndexedKey   = 0b00000001
	EventFlagIndexedValue = 0b00000010
)

EventEntry flags defined in fvm_shared

View Source
const (
	SigTypeUnknown = SigType(math.MaxUint8)

	SigTypeSecp256k1 = SigType(iota)
	SigTypeBLS
	SigTypeDelegated
)
View Source
const (
	MTUndefined = MsgType("")
	MTUnknown   = MsgType("unknown")

	// Signing message CID. MsgMeta.Extra contains raw cbor message bytes
	MTChainMsg = MsgType("message")

	// Signing a blockheader. signing raw cbor block bytes (MsgMeta.Extra is empty)
	MTBlock = MsgType("block")

	// Signing a deal proposal. signing raw cbor proposal bytes (MsgMeta.Extra is empty)
	MTDealProposal = MsgType("dealproposal")
	// extra is nil, 'toSign' is cbor raw bytes of 'DrawRandomParams'
	//  following types follow above rule
	MTDrawRandomParam = MsgType("drawrandomparam")
	MTSignedVoucher   = MsgType("signedvoucher")
	MTStorageAsk      = MsgType("storageask")
	MTAskResponse     = MsgType("askresponse")
	MTNetWorkResponse = MsgType("networkresposne")

	// reference : storagemarket/impl/remotecli.go:330
	// sign storagemarket.ClientDeal.ProposalCid,
	// MsgMeta.Extra is nil, 'toSign' is market.ClientDealProposal
	// storagemarket.ClientDeal.ProposalCid equals cborutil.AsIpld(market.ClientDealProposal).Cid()
	MTClientDeal = MsgType("clientdeal")

	MTProviderDealState = MsgType("providerdealstate")

	MTVerifyAddress = MsgType("verifyaddress")

	MTF3 = MsgType("f3")
)
View Source
const (
	DealMaxLabelSize     = market.DealMaxLabelSize
	EpochUndefined       = market.EpochUndefined
	ProposalsAmtBitwidth = market.ProposalsAmtBitwidth
	StatesAmtBitwidth    = market.StatesAmtBitwidth
)
View Source
const (
	AddressedPartitionsMax                       = miner.AddressedPartitionsMax
	AddressedSectorsMax                          = miner.AddressedSectorsMax
	ChainFinality                                = miner.ChainFinality
	CronEventProcessEarlyTerminations            = miner.CronEventProcessEarlyTerminations
	CronEventProvingDeadline                     = miner.CronEventProvingDeadline
	CronEventWorkerKeyChange                     = miner.CronEventWorkerKeyChange
	DeadlineExpirationAmtBitwidth                = miner.DeadlineExpirationAmtBitwidth
	DeadlineOptimisticPoStSubmissionsAmtBitwidth = miner.DeadlineOptimisticPoStSubmissionsAmtBitwidth
	DeadlinePartitionsAmtBitwidth                = miner.DeadlinePartitionsAmtBitwidth
	DeclarationsMax                              = miner.DeclarationsMax
	FaultDeclarationCutoff                       = miner.FaultDeclarationCutoff
	MaxAggregateProofSize                        = miner.MaxAggregateProofSize
	MaxAggregatedSectors                         = miner.MaxAggregatedSectors
	MaxPartitionsPerDeadline                     = miner.MaxPartitionsPerDeadline
	MaxSectorExpirationExtension                 = miner.MaxSectorExpirationExtension
	MinAggregatedSectors                         = miner.MinAggregatedSectors
	MinSectorExpiration                          = miner.MinSectorExpiration
	PartitionEarlyTerminationArrayAmtBitwidth    = miner.PartitionEarlyTerminationArrayAmtBitwidth
	PartitionExpirationAmtBitwidth               = miner.PartitionExpirationAmtBitwidth
	PreCommitSectorBatchMaxSize                  = miner.PreCommitSectorBatchMaxSize
	PrecommitCleanUpAmtBitwidth                  = miner.PrecommitCleanUpAmtBitwidth
	ProveReplicaUpdatesMaxSize                   = miner.ProveReplicaUpdatesMaxSize
	SectorsAmtBitwidth                           = miner.SectorsAmtBitwidth
	WPoStChallengeLookback                       = miner.WPoStChallengeLookback
	WPoStPeriodDeadlines                         = miner.WPoStPeriodDeadlines
	WorkerKeyChangeDelay                         = miner.WorkerKeyChangeDelay
)
View Source
const (
	LaneStatesAmtBitwidth = paych.LaneStatesAmtBitwidth
	SettleDelay           = paych.SettleDelay
)
View Source
const (
	EndOfLifeClaimDropPeriod                = verifreg.EndOfLifeClaimDropPeriod
	MaximumVerifiedAllocationExpiration     = verifreg.MaximumVerifiedAllocationExpiration
	MaximumVerifiedAllocationTerm           = verifreg.MaximumVerifiedAllocationTerm
	MinimumVerifiedAllocationTerm           = verifreg.MinimumVerifiedAllocationTerm
	NoAllocationID                          = verifreg.NoAllocationID
	SignatureDomainSeparation_RemoveDataCap = verifreg.SignatureDomainSeparation_RemoveDataCap
)
View Source
const DefaultHashFunction = uint64(mh.BLAKE2B_MIN + 31)

The multihash function identifier to use for content addresses.

View Source
const EventAMTBitwidth = 5
View Source
const HeadChangeTopic = "headchange"

HeadChangeTopic is the topic used to publish new heads.

View Source
const (
	MessageVersion = types.MessageVersion
)
View Source
const (
	SignersMax = multisig.SignersMax
)

Variables

View Source
var (
	AsActorV4 = types.AsActorV4
	AsActorV5 = types.AsActorV5
)
View Source
var (
	// ErrF3Disabled signals that F3 consensus process is disabled.
	ErrF3Disabled = errF3Disabled{}
	// ErrF3ParticipationTicketInvalid signals that F3ParticipationTicket cannot be decoded.
	ErrF3ParticipationTicketInvalid = errF3ParticipationTicketInvalid{}
	// ErrF3ParticipationTicketExpired signals that the current GPBFT instance as surpassed the expiry of the ticket.
	ErrF3ParticipationTicketExpired = errF3ParticipationTicketExpired{}
	// ErrF3ParticipationIssuerMismatch signals that the ticket is not issued by the current node.
	ErrF3ParticipationIssuerMismatch = errF3ParticipationIssuerMismatch{}
	// ErrF3ParticipationTooManyInstances signals that participation ticket cannot be
	// issued because it asks for too many instances.
	ErrF3ParticipationTooManyInstances = errF3ParticipationTooManyInstances{}
	// ErrF3ParticipationTicketStartBeforeExisting signals that participation ticket
	// is before the start instance of an existing lease held by the miner.
	ErrF3ParticipationTicketStartBeforeExisting = errF3ParticipationTicketStartBeforeExisting{}
	// ErrF3NotReady signals that the F3 instance isn't ready for participation yet. The caller
	// should back off and try again later.
	ErrF3NotReady = errF3NotReady{}
)
View Source
var (
	BigAdd        = types.BigAdd
	BigCmp        = types.BigCmp
	BigDiv        = types.BigDiv
	BigDivFloat   = types.BigDivFloat
	BigFromBytes  = types.BigFromBytes
	BigFromString = types.BigFromString
	BigMod        = types.BigMod
	BigMul        = types.BigMul
	BigSub        = types.BigSub
	NewInt        = types.NewInt
)
View Source
var (
	AttoFil  = types.AttoFil
	FemtoFil = types.FemtoFil
	NanoFil  = types.NanoFil
	PicoFil  = types.PicoFil
	ZeroFIL  = types.ZeroFIL
)
View Source
var (
	FromFil      = types.FromFil
	MustParseFIL = types.MustParseFIL
	ParseFIL     = types.ParseFIL
)
View Source
var (
	EmptyEthBloom     = types.EmptyEthBloom
	EmptyEthHash      = types.EmptyEthHash
	EmptyEthInt       = types.EmptyEthInt
	EmptyEthNonce     = types.EmptyEthNonce
	EmptyRootHash     = types.EmptyRootHash
	EmptyUncleHash    = types.EmptyUncleHash
	ErrInvalidAddress = types.ErrInvalidAddress
	EthBigIntZero     = types.EthBigIntZero
	FullEthBloom      = types.FullEthBloom
)
View Source
var (
	CastEthAddress                        = types.CastEthAddress
	DecodeHexString                       = types.DecodeHexString
	DecodeHexStringTrimSpace              = types.DecodeHexStringTrimSpace
	EthAddressFromActorID                 = types.EthAddressFromActorID
	EthAddressFromFilecoinAddress         = types.EthAddressFromFilecoinAddress
	EthAddressFromPubKey                  = types.EthAddressFromPubKey
	EthBloomSet                           = types.EthBloomSet
	EthHashFromCid                        = types.EthHashFromCid
	EthHashFromTxBytes                    = types.EthHashFromTxBytes
	EthUint64FromBytes                    = types.EthUint64FromBytes
	EthUint64FromHex                      = types.EthUint64FromHex
	GetContractEthAddressFromCode         = types.GetContractEthAddressFromCode
	IsEthAddress                          = types.IsEthAddress
	NewEthBlock                           = types.NewEthBlock
	NewEthBlockNumberOrHashFromHexString  = types.NewEthBlockNumberOrHashFromHexString
	NewEthBlockNumberOrHashFromNumber     = types.NewEthBlockNumberOrHashFromNumber
	NewEthBlockNumberOrHashFromPredefined = types.NewEthBlockNumberOrHashFromPredefined
	ParseEthAddress                       = types.ParseEthAddress
	ParseEthHash                          = types.ParseEthHash
	SetEip155ChainID                      = types.SetEip155ChainID
	TryEthAddressFromFilecoinAddress      = types.TryEthAddressFromFilecoinAddress
)
View Source
var (
	EthLegacy155TxSignatureLen0 = types.EthLegacy155TxSignatureLen0
	EthLegacy155TxSignatureLen1 = types.EthLegacy155TxSignatureLen1
)
View Source
var (
	EthTransactionFromSignedFilecoinMessage = types.EthTransactionFromSignedFilecoinMessage
	ParseEthTransaction                     = types.ParseEthTransaction
	ToSignedFilecoinMessage                 = types.ToSignedFilecoinMessage
)
View Source
var (
	ErrKeyInfoNotFound = fmt.Errorf("key info not found")
	ErrKeyExists       = fmt.Errorf("key already exists")
)
View Source
var (
	DecodeRLP = types.DecodeRLP
	EncodeRLP = types.EncodeRLP
)
View Source
var (
	AsDealProposalArray          = market.AsDealProposalArray
	AsSetMultimap                = market.AsSetMultimap
	DealClientCollateralBounds   = market.DealClientCollateralBounds
	DealDurationBounds           = market.DealDurationBounds
	DealPricePerEpochBounds      = market.DealPricePerEpochBounds
	DealProviderCollateralBounds = market.DealProviderCollateralBounds
	DealWeight                   = market.DealWeight
	MakeEmptySetMultimap         = market.MakeEmptySetMultimap
	NewLabelFromBytes            = market.NewLabelFromBytes
	NewLabelFromString           = market.NewLabelFromString
	StoreEmptySetMultimap        = market.StoreEmptySetMultimap
	ValidateDealsForActivation   = market.ValidateDealsForActivation
)
View Source
var (
	AggregatePreCommitNetworkFee           = miner.AggregatePreCommitNetworkFee
	AggregateProveCommitNetworkFee         = miner.AggregateProveCommitNetworkFee
	ConstructDeadline                      = miner.ConstructDeadline
	ConstructDeadlines                     = miner.ConstructDeadlines
	ConstructVestingFunds                  = miner.ConstructVestingFunds
	ExpectedRewardForPower                 = miner.ExpectedRewardForPower
	ExpectedRewardForPowerClampedAtAttoFIL = miner.ExpectedRewardForPowerClampedAtAttoFIL
	FindSector                             = miner.FindSector
	InitialPledgeForPower                  = miner.InitialPledgeForPower
	LoadExpirationQueue                    = miner.LoadExpirationQueue
	LoadSectors                            = miner.LoadSectors
	NewDeadlineInfo                        = miner.NewDeadlineInfo
	NewPowerPair                           = miner.NewPowerPair
	NewPowerPairZero                       = miner.NewPowerPairZero
	PreCommitDepositForPower               = miner.PreCommitDepositForPower
	QAPowerForSector                       = miner.QAPowerForSector
	QAPowerForWeight                       = miner.QAPowerForWeight
	QAPowerMax                             = miner.QAPowerMax
	QualityForWeight                       = miner.QualityForWeight
	QuantSpecForDeadline                   = miner.QuantSpecForDeadline
	SectorKey                              = miner.SectorKey
)
View Source
var (
	DecodeMessage = types.DecodeMessage
)
View Source
var DefaultCidBuilder = cid.V1Builder{Codec: cid.DagCBOR, MhType: DefaultHashFunction}

A builder for all blockchain CIDs. Note that sector commitments use a different scheme.

View Source
var (
	EmptyInt = types.EmptyInt
)
View Source
var EmptyTSK = TipSetKey{}
View Source
var EmptyTokenAmount = abi.TokenAmount{}
View Source
var EmptyVesting = MsigVesting{
	InitialBalance: EmptyInt,
	StartEpoch:     -1,
	UnlockDuration: -1,
}
View Source
var (
	ErrActorNotFound = types.ErrActorNotFound
)
View Source
var (
	Eth1559TxArgsFromUnsignedFilecoinMessage = types.Eth1559TxArgsFromUnsignedFilecoinMessage
)
View Source
var MarketBalanceNil = MarketBalance{}
View Source
var (
	NewEthLegacy155TxArgs = types.NewEthLegacy155TxArgs
)
View Source
var TotalFilecoinInt = types.TotalFilecoinInt
View Source
var UndefTipSet = &TipSet{}

UndefTipSet is a singleton representing a nil or undefined tipset.

View Source
var ZeroAddress = types.ZeroAddress

Functions

func BlockTopic added in v1.8.0

func BlockTopic(networkName string) string

BlockTopic returns the network pubsub topic identifier on which new blocks are announced.

func CidArrsContains added in v1.6.0

func CidArrsContains(a []cid.Cid, b cid.Cid) bool

func CidArrsEqual

func CidArrsEqual(a, b []cid.Cid) bool

func DeciStr

func DeciStr(bi BigInt) string

func DrandTopic added in v1.8.0

func DrandTopic(chainInfoJSON string) (string, error)

func IndexerIngestTopic added in v1.8.0

func IndexerIngestTopic(networkName string) string

func MessageProvider

func MessageProvider() func(t *testing.T) *Message

func MessageTopic added in v1.8.0

func MessageTopic(networkName string) string

MessageTopic returns the network pubsub topic identifier on which new messages are announced. The message payload is just a SignedMessage.

func MustParseAddress

func MustParseAddress(addr string) address.Address

func MustParseCid

func MustParseCid(c string) cid.Cid

func MustParseID

func MustParseID(id string) peer.ID

func NewGasFeeCap

func NewGasFeeCap(price int64) abi.TokenAmount

func NewGasPremium

func NewGasPremium(price int64) abi.TokenAmount

func ReverseFullBlock

func ReverseFullBlock(chain []*FullTipSet)

ReverseFullBlock reverses the order of the slice `chain`.

func ReverseTipSet

func ReverseTipSet(chain []*TipSet)

ReverseTipSet reverses the order of the slice `chain`.

func SizeStr

func SizeStr(bi BigInt) string

func TipsetProvider

func TipsetProvider() func(*testing.T) *TipSet

Types

type APIVersion added in v1.7.0

type APIVersion uint32

func NewVer added in v1.7.0

func NewVer(major, minor, patch uint8) APIVersion

func (APIVersion) EqMajorMinor added in v1.7.0

func (ve APIVersion) EqMajorMinor(v2 APIVersion) bool

func (APIVersion) Ints added in v1.7.0

func (ve APIVersion) Ints() (uint32, uint32, uint32)

Ints returns (major, minor, patch) versions

func (APIVersion) String added in v1.7.0

func (ve APIVersion) String() string

type ActivateDealsParams added in v1.8.0

type ActivateDealsParams = market.ActivateDealsParams

type ActivateDealsResult added in v1.8.0

type ActivateDealsResult = market.ActivateDealsResult

type ActiveBeneficiary added in v1.8.0

type ActiveBeneficiary = miner.ActiveBeneficiary

type ActiveSync

type ActiveSync struct {
	WorkerID uint64
	Base     *TipSet
	Target   *TipSet

	Stage  SyncStateStage
	Height abi.ChainEpoch

	Start   time.Time
	End     time.Time
	Message string
}

type Actor

type Actor = types.Actor

type ActorEvent added in v1.15.0

type ActorEvent struct {
	// Event entries in log form.
	Entries []EventEntry `json:"entries"`

	// Filecoin address of the actor that emitted this event.
	// NOTE: In a future upgrade, this will change to always be an ID address. Currently this will be
	// either the f4 address, or ID address if an f4 is not available for this actor.
	Emitter address.Address `json:"emitter"`

	// Reverted is set to true if the message that produced this event was reverted because of a network re-org
	// in that case, the event should be considered as reverted as well.
	Reverted bool `json:"reverted"`

	// Height of the tipset that contained the message that produced this event.
	Height abi.ChainEpoch `json:"height"`

	// The tipset that contained the message that produced this event.
	TipSetKey TipSetKey `json:"tipsetKey"`

	// CID of message that produced this event.
	MsgCid cid.Cid `json:"msgCid"`
}

type ActorEventBlock added in v1.15.0

type ActorEventBlock struct {
	// The value codec to match when filtering event values.
	Codec uint64 `json:"codec"`

	// The value to want to match on associated with the corresponding "event key"
	// when filtering events.
	// Should be a byte array encoded with the specified codec.
	// Assumes base64 encoding when converting to/from JSON strings.
	Value []byte `json:"value"`
}

type ActorEventFilter added in v1.15.0

type ActorEventFilter struct {
	// Matches events from one of these actors, or any actor if empty.
	// For now, this MUST be a Filecoin address.
	Addresses []address.Address `json:"addresses,omitempty"`

	// Matches events with the specified key/values, or all events if empty.
	// If the value is an empty slice, the filter will match on the key only, accepting any value.
	Fields map[string][]ActorEventBlock `json:"fields,omitempty"`

	// The height of the earliest tipset to include in the query. If empty, the query starts at the
	// last finalized tipset.
	// NOTE: In a future upgrade, this will be strict when set and will result in an error if a filter
	// cannot be fulfilled by the depth of history available in the node. Currently, the node will
	// nott return an error, but will return starting from the epoch it has data for.
	FromHeight *abi.ChainEpoch `json:"fromHeight,omitempty"`

	// The height of the latest tipset to include in the query. If empty, the query ends at the
	// latest tipset.
	ToHeight *abi.ChainEpoch `json:"toHeight,omitempty"`

	// Restricts events returned to those emitted from messages contained in this tipset.
	// If `TipSetKey` is legt empty in the filter criteria, then neither `FromHeight` nor `ToHeight` are allowed.
	TipSetKey *TipSetKey `json:"tipsetKey,omitempty"`
}

type ActorState added in v1.7.0

type ActorState struct {
	Balance BigInt
	Code    cid.Cid
	State   interface{}
}

type ActorTrace added in v1.15.0

type ActorTrace struct {
	Id    abi.ActorID // nolint
	State Actor
}

func (*ActorTrace) MarshalCBOR added in v1.15.0

func (t *ActorTrace) MarshalCBOR(w io.Writer) error

func (*ActorTrace) UnmarshalCBOR added in v1.15.0

func (t *ActorTrace) UnmarshalCBOR(r io.Reader) (err error)

type ActorV4 added in v1.10.0

type ActorV4 = types.ActorV4

type AddSignerParams added in v1.10.0

type AddSignerParams = multisig.AddSignerParams

type AddVerifiedClientParams added in v1.8.0

type AddVerifiedClientParams = verifreg.AddVerifiedClientParams

type AddVerifierParams added in v1.8.0

type AddVerifierParams = verifreg.AddVerifierParams

type Allocation added in v1.8.0

type Allocation = verifreg.Allocation

type AllocationId added in v1.8.0

type AllocationId = verifreg.AllocationId

type AllocationRequest added in v1.8.0

type AllocationRequest = verifreg.AllocationRequest

type AllocationRequests added in v1.8.0

type AllocationRequests = verifreg.AllocationRequests

type AllocationsResponse added in v1.8.0

type AllocationsResponse = verifreg.AllocationsResponse

type ApplyRewardParams added in v1.8.0

type ApplyRewardParams = miner.ApplyRewardParams

type ApproveReturn added in v1.10.0

type ApproveReturn = multisig.ApproveReturn

type BeaconEntry

type BeaconEntry struct {
	Round uint64
	Data  []byte
}

func (*BeaconEntry) MarshalCBOR

func (t *BeaconEntry) MarshalCBOR(w io.Writer) error

func (*BeaconEntry) UnmarshalCBOR

func (t *BeaconEntry) UnmarshalCBOR(r io.Reader) (err error)

type BeneficiaryTerm added in v1.8.0

type BeneficiaryTerm = miner.BeneficiaryTerm

type BigInt

type BigInt = types.BigInt

type BlockHeader

type BlockHeader struct {
	// Miner is the address of the miner actor that mined this newBlock.
	Miner address.Address

	// Ticket is the ticket submitted with this newBlock.
	Ticket *Ticket

	// ElectionProof is the vrf proof giving this newBlock's miner authoring rights
	ElectionProof *ElectionProof

	// BeaconEntries contain the verifiable oracle randomness used to elect
	// this newBlock's author leader
	BeaconEntries []BeaconEntry

	// WinPoStProof are the winning post proofs
	WinPoStProof []proof.PoStProof

	// Parents is the set of parents this newBlock was based on. Typically one,
	// but can be several in the case where there were multiple winning ticket-
	// holders for an epoch.
	Parents []cid.Cid

	// ParentWeight is the aggregate chain weight of the parent set.
	ParentWeight big.Int

	// Height is the chain height of this newBlock.
	Height abi.ChainEpoch

	// ParentStateRoot is the CID of the root of the state tree after application of the messages in the parent tipset
	// to the parent tipset's state root.
	ParentStateRoot cid.Cid

	// ParentMessageReceipts is a list of receipts corresponding to the application of the messages in the parent tipset
	// to the parent tipset's state root (corresponding to this newBlock's ParentStateRoot).
	ParentMessageReceipts cid.Cid

	// Messages is the set of messages included in this newBlock
	Messages cid.Cid

	// The aggregate signature of all BLS signed messages in the newBlock
	BLSAggregate *crypto.Signature

	// The timestamp, in seconds since the Unix epoch, at which this newBlock was created.
	Timestamp uint64

	// The signature of the miner's worker key over the newBlock
	BlockSig *crypto.Signature

	// ForkSignaling is extra data used by miners to communicate
	ForkSignaling uint64

	// identical for all blocks in same tipset: the base fee after executing parent tipset
	ParentBaseFee abi.TokenAmount
	// contains filtered or unexported fields
}

BlockHeader is a newBlock in the blockchain.

func DecodeBlock

func DecodeBlock(b []byte) (*BlockHeader, error)

DecodeBlock decodes raw cbor bytes into a BlockHeader.

func (*BlockHeader) Cid

func (b *BlockHeader) Cid() cid.Cid

Cid returns the content id of this newBlock.

func (*BlockHeader) Equals

func (b *BlockHeader) Equals(other *BlockHeader) bool

Equals returns true if the BlockHeader is equal to other.

func (*BlockHeader) IsValidated

func (b *BlockHeader) IsValidated() bool

IsValidated check whether block signature is valid from memory

func (*BlockHeader) LastTicket

func (b *BlockHeader) LastTicket() *Ticket

LastTicket get ticket in block

func (*BlockHeader) MarshalCBOR

func (t *BlockHeader) MarshalCBOR(w io.Writer) error

func (*BlockHeader) Serialize

func (b *BlockHeader) Serialize() ([]byte, error)

Serialize serialize blockheader to binary

func (*BlockHeader) SerializeWithCid

func (b *BlockHeader) SerializeWithCid() (cid.Cid, []byte, error)

func (*BlockHeader) SetValidated

func (b *BlockHeader) SetValidated()

SetValidated set block signature is valid after checkout blocksig

func (*BlockHeader) SignatureData

func (b *BlockHeader) SignatureData() ([]byte, error)

SignatureData returns the newBlock's bytes with a null signature field for signature creation and verification

func (*BlockHeader) String

func (b *BlockHeader) String() string

func (*BlockHeader) ToNode

func (b *BlockHeader) ToNode() node.Node

ToNode converts the BlockHeader to an IPLD node.

func (*BlockHeader) ToStorageBlock

func (b *BlockHeader) ToStorageBlock() (blocks.Block, error)

ToStorageBlock convert blockheader to data block with cid

func (*BlockHeader) UnmarshalCBOR

func (t *BlockHeader) UnmarshalCBOR(r io.Reader) (err error)

type BlockMessages

type BlockMessages struct {
	BlsMessages   []*Message
	SecpkMessages []*SignedMessage
	Cids          []cid.Cid
}

BlsMessages[x].cid = Cids[x] SecpkMessages[y].cid = Cids[BlsMessages.length + y]

type BlockMessagesInfo

type BlockMessagesInfo struct {
	BlsMessages   []ChainMsg
	SecpkMessages []ChainMsg

	Block *BlockHeader
}

BlockMessagesInfo contains messages for one newBlock in a tipset.

type BlockMsg

type BlockMsg struct {
	Header        *BlockHeader
	BlsMessages   []cid.Cid
	SecpkMessages []cid.Cid
}

func (*BlockMsg) Cid

func (bm *BlockMsg) Cid() cid.Cid

Cid return block cid

func (*BlockMsg) MarshalCBOR

func (t *BlockMsg) MarshalCBOR(w io.Writer) error

func (*BlockMsg) Serialize

func (bm *BlockMsg) Serialize() ([]byte, error)

Serialize return blockmsg binary

func (*BlockMsg) UnmarshalCBOR

func (t *BlockMsg) UnmarshalCBOR(r io.Reader) (err error)

type BlockTemplate

type BlockTemplate struct {
	Miner            address.Address
	Parents          TipSetKey
	Ticket           *Ticket
	Eproof           *ElectionProof
	BeaconValues     []BeaconEntry
	Messages         []*SignedMessage
	Epoch            abi.ChainEpoch
	Timestamp        uint64
	WinningPoStProof []builtin.PoStProof
}

type BurnFromParams added in v1.14.0

type BurnFromParams = datacap.BurnFromParams

type BurnFromReturn added in v1.14.0

type BurnFromReturn = datacap.BurnFromReturn

type BurnParams added in v1.14.0

type BurnParams = datacap.BurnParams

type BurnReturn added in v1.14.0

type BurnReturn = datacap.BurnReturn

type ChainInfo

type ChainInfo struct {
	// The originator of the TipSetKey propagation wave.
	Source peer.ID
	// The peer that sent us the TipSetKey message.
	Sender     peer.ID
	FullTipSet *FullTipSet
}

ChainInfo is used to track metadata about a peer and its chain.

func NewChainInfo

func NewChainInfo(source peer.ID, sender peer.ID, fts *FullTipSet) *ChainInfo

NewChainInfo creates a chain info from a peer id a head tipset key and a chain height.

func (*ChainInfo) String

func (i *ChainInfo) String() string

String returns a human-readable string representation of a chain info

type ChainMessage

type ChainMessage struct {
	TS      *TipSet
	Message ChainMsg
	Block   *BlockHeader
	Receipt *MessageReceipt
}

ChainMessage is an on-chain message with its block and receipt.

type ChainMsg

type ChainMsg = types.ChainMsg

type ChangeBeneficiaryParams added in v1.8.0

type ChangeBeneficiaryParams = miner.ChangeBeneficiaryParams

type ChangeMultiaddrsParams added in v1.8.0

type ChangeMultiaddrsParams = miner.ChangeMultiaddrsParams

type ChangeNumApprovalsThresholdParams added in v1.10.0

type ChangeNumApprovalsThresholdParams = multisig.ChangeNumApprovalsThresholdParams

type ChangePeerIDParams added in v1.8.0

type ChangePeerIDParams = miner.ChangePeerIDParams

type ChangeWorkerAddressParams added in v1.8.0

type ChangeWorkerAddressParams = miner.ChangeWorkerAddressParams

type ChannelAvailableFunds

type ChannelAvailableFunds struct {
	// Channel is the address of the channel
	Channel *address.Address
	// From is the from address of the channel (channel creator)
	From address.Address
	// To is the to address of the channel
	To address.Address
	// ConfirmedAmt is the total amount of funds that have been confirmed on-chain for the channel
	ConfirmedAmt BigInt
	// PendingAmt is the amount of funds that are pending confirmation on-chain
	PendingAmt BigInt
	// NonReservedAmt is part of ConfirmedAmt that is available for use (e.g. when the payment channel was pre-funded)
	NonReservedAmt BigInt
	// PendingAvailableAmt is the amount of funds that are pending confirmation on-chain that will become available once confirmed
	PendingAvailableAmt BigInt
	// PendingWaitSentinel can be used with PaychGetWaitReady to wait for
	// confirmation of pending funds
	PendingWaitSentinel *cid.Cid
	// QueuedAmt is the amount that is queued up behind a pending request
	QueuedAmt BigInt
	// VoucherRedeemedAmt is the amount that is redeemed by vouchers on-chain
	// and in the local datastore
	VoucherReedeemedAmt BigInt
}

type ChannelInfo

type ChannelInfo struct {
	Channel      address.Address
	WaitSentinel cid.Cid
}

type CheckSectorProvenParams added in v1.8.0

type CheckSectorProvenParams = miner.CheckSectorProvenParams

type CheckStatus

type CheckStatus struct {
	Code CheckStatusCode
	OK   bool
	Err  string
	Hint map[string]interface{}
}

type CheckStatusCode

type CheckStatusCode int
const (

	// Message Checks
	CheckStatusMessageSerialize CheckStatusCode
	CheckStatusMessageSize
	CheckStatusMessageValidity
	CheckStatusMessageMinGas
	CheckStatusMessageMinBaseFee
	CheckStatusMessageBaseFee
	CheckStatusMessageBaseFeeLowerBound
	CheckStatusMessageBaseFeeUpperBound
	CheckStatusMessageGetStateNonce
	CheckStatusMessageNonce
	CheckStatusMessageGetStateBalance
	CheckStatusMessageBalance
)

func (CheckStatusCode) String

func (i CheckStatusCode) String() string

type CirculatingSupply

type CirculatingSupply struct {
	FilVested           abi.TokenAmount
	FilMined            abi.TokenAmount
	FilBurnt            abi.TokenAmount
	FilLocked           abi.TokenAmount
	FilCirculating      abi.TokenAmount
	FilReserveDisbursed abi.TokenAmount
}

type Claim added in v1.8.0

type Claim = verifreg.Claim

type ClaimAllocationsParams added in v1.8.0

type ClaimAllocationsParams = verifreg.ClaimAllocationsParams

type ClaimAllocationsReturn added in v1.8.0

type ClaimAllocationsReturn = verifreg.ClaimAllocationsReturn

type ClaimExtensionRequest added in v1.8.0

type ClaimExtensionRequest = verifreg.ClaimExtensionRequest

type ClaimId added in v1.8.0

type ClaimId = verifreg.ClaimId

type ClaimTerm added in v1.8.0

type ClaimTerm = verifreg.ClaimTerm

type ClientDealProposal added in v1.8.0

type ClientDealProposal = market.ClientDealProposal

type CompactPartitionsParams added in v1.8.0

type CompactPartitionsParams = miner.CompactPartitionsParams

type CompactSectorNumbersParams added in v1.8.0

type CompactSectorNumbersParams = miner.CompactSectorNumbersParams

type ComputeDataCommitmentParams added in v1.8.0

type ComputeDataCommitmentParams = market.ComputeDataCommitmentParams

type ComputeDataCommitmentReturn added in v1.8.0

type ComputeDataCommitmentReturn = market.ComputeDataCommitmentReturn

type ComputeStateOutput added in v1.7.0

type ComputeStateOutput struct {
	Root  cid.Cid
	Trace []*InvocResult
}

type ConfirmSectorProofsParams added in v1.8.0

type ConfirmSectorProofsParams = miner.ConfirmSectorProofsParams

type ConnMgrInfo added in v1.6.1

type ConnMgrInfo struct {
	FirstSeen time.Time
	Value     int
	Tags      map[string]int
	Conns     map[string]time.Time
}

type CronEventPayload added in v1.8.0

type CronEventPayload = miner.CronEventPayload

type CronEventType added in v1.8.0

type CronEventType = miner.CronEventType

type DataCap added in v1.10.0

type DataCap = verifreg.DataCap

type Deadline

type Deadline struct {
	PostSubmissions      bitfield.BitField
	DisputableProofCount uint64
}

type Deadlines added in v1.8.0

type Deadlines = miner.Deadlines

type DealArray added in v1.8.0

type DealArray = market.DealArray

type DealCollateralBounds

type DealCollateralBounds struct {
	Min abi.TokenAmount
	Max abi.TokenAmount
}

type DealLabel added in v1.8.0

type DealLabel = market.DealLabel

type DealProposal added in v1.8.0

type DealProposal = market.DealProposal

type DealSpaces added in v1.8.0

type DealSpaces = market.DealSpaces

type DealState added in v1.8.0

type DealState = market.DealState

type DeclareFaultsParams added in v1.8.0

type DeclareFaultsParams = miner.DeclareFaultsParams

type DeclareFaultsRecoveredParams added in v1.8.0

type DeclareFaultsRecoveredParams = miner.DeclareFaultsRecoveredParams

type DecreaseAllowanceParams added in v1.14.0

type DecreaseAllowanceParams = datacap.DecreaseAllowanceParams

type DeferredCronEventParams added in v1.8.0

type DeferredCronEventParams = miner.DeferredCronEventParams

type DestroyParams added in v1.14.0

type DestroyParams = datacap.DestroyParams

type DisputeWindowedPoStParams added in v1.8.0

type DisputeWindowedPoStParams = miner.DisputeWindowedPoStParams

type ElectionProof

type ElectionProof struct {
	WinCount int64

	// A proof output by running a VRF on the VRFProof of the parent ticket
	VRFProof VRFPi
}

func (*ElectionProof) ComputeWinCount

func (ep *ElectionProof) ComputeWinCount(power abi.StoragePower, totalPower abi.StoragePower) int64

ComputeWinCount uses VRFProof to compute number of wins The algorithm is based on Algorand's Sortition with Binomial distribution replaced by Poisson distribution.

func (*ElectionProof) MarshalCBOR

func (t *ElectionProof) MarshalCBOR(w io.Writer) error

func (*ElectionProof) UnmarshalCBOR

func (t *ElectionProof) UnmarshalCBOR(r io.Reader) (err error)

type ErrOutOfGas

type ErrOutOfGas struct{}

ErrOutOfGas signals that a call failed due to insufficient gas.

func (ErrOutOfGas) Error

func (ErrOutOfGas) Error() string

type EstimateMessage

type EstimateMessage struct {
	Msg  *Message
	Spec *MessageSendSpec
}

type EstimateResult

type EstimateResult struct {
	Msg *Message
	Err string
}

type Eth1559TxArgs added in v1.16.0

type Eth1559TxArgs = types.Eth1559TxArgs

type EthAddress added in v1.10.0

type EthAddress = types.EthAddress

type EthAddressList added in v1.10.0

type EthAddressList = types.EthAddressList

type EthBigInt added in v1.10.0

type EthBigInt = types.EthBigInt

type EthBlock added in v1.10.0

type EthBlock = types.EthBlock

type EthBlockNumberOrHash added in v1.14.0

type EthBlockNumberOrHash = types.EthBlockNumberOrHash

type EthBytes added in v1.10.0

type EthBytes = types.EthBytes

type EthCall added in v1.10.0

type EthCall = types.EthCall

type EthCallTraceAction added in v1.15.0

type EthCallTraceAction = types.EthCallTraceAction

type EthCallTraceResult added in v1.15.0

type EthCallTraceResult = types.EthCallTraceResult

type EthCreateTraceAction added in v1.15.0

type EthCreateTraceAction = types.EthCreateTraceAction

type EthCreateTraceResult added in v1.15.0

type EthCreateTraceResult = types.EthCreateTraceResult

type EthEstimateGasParams added in v1.15.0

type EthEstimateGasParams = types.EthEstimateGasParams

type EthFeeHistory added in v1.10.0

type EthFeeHistory = types.EthFeeHistory

type EthFeeHistoryParams added in v1.10.0

type EthFeeHistoryParams = types.EthFeeHistoryParams

type EthFilterID added in v1.10.0

type EthFilterID = types.EthFilterID

type EthFilterResult added in v1.10.0

type EthFilterResult = types.EthFilterResult

type EthFilterSpec added in v1.10.0

type EthFilterSpec = types.EthFilterSpec

type EthHash added in v1.10.0

type EthHash = types.EthHash

type EthHashList added in v1.10.0

type EthHashList = types.EthHashList

type EthLegacy155TxArgs added in v1.16.0

type EthLegacy155TxArgs = types.EthLegacy155TxArgs

type EthLegacyHomesteadTxArgs added in v1.16.0

type EthLegacyHomesteadTxArgs = types.EthLegacyHomesteadTxArgs

type EthLog added in v1.10.0

type EthLog = types.EthLog

type EthNonce added in v1.10.0

type EthNonce = types.EthNonce

type EthSubscribeParams added in v1.10.0

type EthSubscribeParams = types.EthSubscribeParams

type EthSubscriptionID added in v1.10.0

type EthSubscriptionID = types.EthSubscriptionID

type EthSubscriptionParams added in v1.10.0

type EthSubscriptionParams = types.EthSubscriptionParams

type EthSubscriptionResponse added in v1.10.0

type EthSubscriptionResponse = types.EthSubscriptionResponse

type EthSyncingResult added in v1.14.0

type EthSyncingResult = types.EthSyncingResult

type EthTopicSpec added in v1.10.0

type EthTopicSpec = types.EthTopicSpec

type EthTrace added in v1.14.0

type EthTrace = types.EthTrace

type EthTraceBlock added in v1.14.0

type EthTraceBlock = types.EthTraceBlock

type EthTraceFilterCriteria

type EthTraceFilterCriteria = types.EthTraceFilterCriteria

type EthTraceFilterResult

type EthTraceFilterResult = types.EthTraceFilterResult

type EthTraceReplayBlockTransaction added in v1.14.0

type EthTraceReplayBlockTransaction = types.EthTraceReplayBlockTransaction

type EthTraceTransaction added in v1.16.0

type EthTraceTransaction = types.EthTraceTransaction

type EthTransaction added in v1.16.0

type EthTransaction = types.EthTransaction

type EthTx added in v1.10.0

type EthTx = types.EthTx

type EthTxReceipt added in v1.10.0

type EthTxReceipt = types.EthTxReceipt

type EthUint64 added in v1.10.0

type EthUint64 = types.EthUint64

type Event added in v1.10.0

type Event struct {
	// The ID of the actor that emitted this event.
	Emitter abi.ActorID

	// Key values making up this event.
	Entries []EventEntry
}

func (*Event) MarshalCBOR added in v1.10.0

func (t *Event) MarshalCBOR(w io.Writer) error

func (*Event) UnmarshalCBOR added in v1.10.0

func (t *Event) UnmarshalCBOR(r io.Reader) (err error)

type EventEntry added in v1.10.0

type EventEntry struct {
	// A bitmap conveying metadata or hints about this entry.
	Flags uint8

	// The key of this event entry
	Key string

	// The event value's codec
	Codec uint64

	// The event value. It is encoded using the codec specified above
	Value []byte
}

func (*EventEntry) MarshalCBOR added in v1.10.0

func (t *EventEntry) MarshalCBOR(w io.Writer) error

func (*EventEntry) UnmarshalCBOR added in v1.10.0

func (t *EventEntry) UnmarshalCBOR(r io.Reader) (err error)

type ExecutionTrace

type ExecutionTrace struct {
	Msg          MessageTrace
	MsgRct       ReturnTrace
	InvokedActor *ActorTrace      `json:",omitempty"`
	GasCharges   []*GasTrace      `cborgen:"maxlen=1000000000"`
	Subcalls     []ExecutionTrace `cborgen:"maxlen=1000000000"`
}

func (*ExecutionTrace) MarshalCBOR added in v1.14.0

func (t *ExecutionTrace) MarshalCBOR(w io.Writer) error

func (ExecutionTrace) SumGas added in v1.14.0

func (et ExecutionTrace) SumGas() GasTrace

func (*ExecutionTrace) UnmarshalCBOR added in v1.14.0

func (t *ExecutionTrace) UnmarshalCBOR(r io.Reader) (err error)

type ExpTipSet

type ExpTipSet struct {
	Cids   []cid.Cid
	Blocks []*BlockHeader
	Height abi.ChainEpoch
}

func (*ExpTipSet) MarshalCBOR

func (t *ExpTipSet) MarshalCBOR(w io.Writer) error

func (*ExpTipSet) UnmarshalCBOR

func (t *ExpTipSet) UnmarshalCBOR(r io.Reader) (err error)

type ExpirationExtension added in v1.8.0

type ExpirationExtension = miner.ExpirationExtension

type ExpirationExtension2 added in v1.8.0

type ExpirationExtension2 = miner.ExpirationExtension2

type ExpirationQueue added in v1.8.0

type ExpirationQueue = miner.ExpirationQueue

type ExpirationSet added in v1.8.0

type ExpirationSet = miner.ExpirationSet

type ExtendClaimTermsParams added in v1.8.0

type ExtendClaimTermsParams = verifreg.ExtendClaimTermsParams

type ExtendClaimTermsReturn added in v1.8.0

type ExtendClaimTermsReturn = verifreg.ExtendClaimTermsReturn

type ExtendSectorExpiration2Params added in v1.8.0

type ExtendSectorExpiration2Params = miner.ExtendSectorExpiration2Params

type ExtendSectorExpirationParams added in v1.8.0

type ExtendSectorExpirationParams = miner.ExtendSectorExpirationParams

type ExtendedPeerInfo added in v1.6.1

type ExtendedPeerInfo struct {
	ID          peer.ID
	Agent       string
	Addrs       []string
	Protocols   []string
	ConnMgrMeta *ConnMgrInfo
}

type F3ParticipationLease

type F3ParticipationLease struct {
	// Network is the name of the network this lease belongs to.
	Network gpbft.NetworkName
	// Issuer is the identity of the node that issued the lease.
	Issuer peer.ID
	// MinerID is the actor ID of the miner that holds the lease.
	MinerID uint64
	// FromInstance specifies the instance ID from which this lease is valid.
	FromInstance uint64
	// ValidityTerm specifies the number of instances for which the lease remains
	// valid from the FromInstance.
	ValidityTerm uint64
}

F3ParticipationLease defines the lease granted to a storage provider for participating in F3 consensus, detailing the session identifier, issuer, subject, and the expiration instance.

func (*F3ParticipationLease) MarshalCBOR

func (t *F3ParticipationLease) MarshalCBOR(w io.Writer) error

func (*F3ParticipationLease) ToInstance

func (l *F3ParticipationLease) ToInstance() uint64

func (*F3ParticipationLease) UnmarshalCBOR

func (t *F3ParticipationLease) UnmarshalCBOR(r io.Reader) (err error)

type F3ParticipationTicket

type F3ParticipationTicket []byte

F3ParticipationTicket represents a ticket that authorizes a miner to participate in the F3 consensus.

type FIL

type FIL = types.FIL

type Fault added in v1.7.0

type Fault struct {
	Miner address.Address
	Epoch abi.ChainEpoch
}

type FaultDeclaration added in v1.8.0

type FaultDeclaration = miner.FaultDeclaration

type FilterID added in v1.10.0

type FilterID [32]byte // compatible with EthHash

type ForkUpgradeParams added in v1.6.0

type ForkUpgradeParams struct {
	UpgradeSmokeHeight       abi.ChainEpoch
	UpgradeBreezeHeight      abi.ChainEpoch
	UpgradeIgnitionHeight    abi.ChainEpoch
	UpgradeLiftoffHeight     abi.ChainEpoch
	UpgradeAssemblyHeight    abi.ChainEpoch
	UpgradeRefuelHeight      abi.ChainEpoch
	UpgradeTapeHeight        abi.ChainEpoch
	UpgradeKumquatHeight     abi.ChainEpoch
	BreezeGasTampingDuration abi.ChainEpoch
	UpgradeCalicoHeight      abi.ChainEpoch
	UpgradePersianHeight     abi.ChainEpoch
	UpgradeOrangeHeight      abi.ChainEpoch
	UpgradeClausHeight       abi.ChainEpoch
	UpgradeTrustHeight       abi.ChainEpoch
	UpgradeNorwegianHeight   abi.ChainEpoch
	UpgradeTurboHeight       abi.ChainEpoch
	UpgradeHyperdriveHeight  abi.ChainEpoch
	UpgradeChocolateHeight   abi.ChainEpoch
	UpgradeOhSnapHeight      abi.ChainEpoch
	UpgradeSkyrHeight        abi.ChainEpoch
	UpgradeSharkHeight       abi.ChainEpoch
	UpgradeHyggeHeight       abi.ChainEpoch
	UpgradeLightningHeight   abi.ChainEpoch
	UpgradeThunderHeight     abi.ChainEpoch
	UpgradeWatermelonHeight  abi.ChainEpoch
	UpgradeDragonHeight      abi.ChainEpoch
	UpgradePhoenixHeight     abi.ChainEpoch
	UpgradeWaffleHeight      abi.ChainEpoch
	UpgradeTuktukHeight      abi.ChainEpoch
}

type FullBlock

type FullBlock struct {
	Header       *BlockHeader
	BLSMessages  []*Message
	SECPMessages []*SignedMessage
}

FullBlock carries a newBlock header and the message and receipt collections referenced from the header.

func (*FullBlock) Cid

func (fb *FullBlock) Cid() cid.Cid

Cid returns the FullBlock's header's Cid

type FullTipSet

type FullTipSet struct {
	Blocks []*FullBlock
	// contains filtered or unexported fields
}

FullTipSet is an expanded version of the TipSet that contains all the blocks and messages

func NewFullTipSet

func NewFullTipSet(blks []*FullBlock) *FullTipSet

func (*FullTipSet) Cids

func (fts *FullTipSet) Cids() []cid.Cid

func (*FullTipSet) TipSet

func (fts *FullTipSet) TipSet() *TipSet

TipSet returns a narrower view of this FullTipSet elliding the newBlock messages.

type GasTrace

type GasTrace struct {
	Name       string
	TotalGas   int64         `json:"tg"`
	ComputeGas int64         `json:"cg"`
	StorageGas int64         `json:"sg"`
	TimeTaken  time.Duration `json:"tt"`
}

func SumGas added in v1.14.0

func SumGas(charges []*GasTrace) GasTrace

func (*GasTrace) MarshalCBOR added in v1.14.0

func (t *GasTrace) MarshalCBOR(w io.Writer) error

func (*GasTrace) MarshalJSON

func (gt *GasTrace) MarshalJSON() ([]byte, error)

func (*GasTrace) UnmarshalCBOR added in v1.14.0

func (t *GasTrace) UnmarshalCBOR(r io.Reader) (err error)

type GetAllowanceParams added in v1.14.0

type GetAllowanceParams = datacap.GetAllowanceParams

type GetBeneficiaryReturn added in v1.8.0

type GetBeneficiaryReturn = miner.GetBeneficiaryReturn

type GetClaimsParams added in v1.8.0

type GetClaimsParams = verifreg.GetClaimsParams

type GetClaimsReturn added in v1.8.0

type GetClaimsReturn = verifreg.GetClaimsReturn

type GetControlAddressesReturn added in v1.8.0

type GetControlAddressesReturn = miner.GetControlAddressesReturn

type HeadChange

type HeadChange struct {
	Type HeadChangeType
	Val  *TipSet
}

type HeadChangeType

type HeadChangeType string
const (
	HCRevert  HeadChangeType = "revert"
	HCApply   HeadChangeType = "apply"
	HCCurrent HeadChangeType = "current"
)

type IncreaseAllowanceParams added in v1.14.0

type IncreaseAllowanceParams = datacap.IncreaseAllowanceParams

type InvocResult

type InvocResult struct {
	MsgCid         cid.Cid
	Msg            *Message
	MsgRct         *MessageReceipt
	GasCost        MsgGasCost
	ExecutionTrace ExecutionTrace
	Error          string
	Duration       time.Duration
}

type KeyInfo

type KeyInfo struct {
	Type       KeyType
	PrivateKey []byte
}

KeyInfo is used for storing keys in KeyStore

type KeyType

type KeyType string

KeyType defines a type of a key

const (
	KTUnknown         KeyType = "unknown"
	KTBLS             KeyType = "bls"
	KTSecp256k1       KeyType = "secp256k1"
	KTSecp256k1Ledger KeyType = "secp256k1-ledger"
	KTDelegated       KeyType = "delegated"
)

func SignType2Key

func SignType2Key(kt SigType) KeyType

func (*KeyType) UnmarshalJSON

func (kt *KeyType) UnmarshalJSON(bb []byte) error

type LaneState added in v1.8.0

type LaneState = paych.LaneState

type LockBalanceParams added in v1.10.0

type LockBalanceParams = multisig.LockBalanceParams

type MarketBalance

type MarketBalance struct {
	Escrow big.Int
	Locked big.Int
}

type MarketDeal

type MarketDeal struct {
	Proposal DealProposal
	State    MarketDealState
}

type MarketDealState added in v1.15.0

type MarketDealState struct {
	SectorNumber     abi.SectorNumber // 0 if not yet included in proven sector (0 is also a valid sector number).
	SectorStartEpoch abi.ChainEpoch   // -1 if not yet included in proven sector
	LastUpdatedEpoch abi.ChainEpoch   // -1 if deal state never updated
	SlashEpoch       abi.ChainEpoch   // -1 if deal never slashed
}

func MakeDealState added in v1.15.0

func MakeDealState(mds market.DealState) MarketDealState

func (MarketDealState) Iface added in v1.15.0

func (m MarketDealState) Iface() market.DealState

type MarketWithdrawBalanceParams added in v1.8.0

type MarketWithdrawBalanceParams = market.WithdrawBalanceParams

type Merge added in v1.8.0

type Merge = paych.Merge

type Message

type Message = types.Message

type MessageCID

type MessageCID struct {
	Cid     cid.Cid
	Message *Message
}

type MessageCheckStatus

type MessageCheckStatus struct {
	Cid cid.Cid
	CheckStatus
}

type MessageMatch added in v1.7.0

type MessageMatch struct {
	To   address.Address
	From address.Address
}

type MessagePrototype

type MessagePrototype struct {
	Message    Message
	ValidNonce bool
}

type MessageReceipt

type MessageReceipt struct {
	ExitCode exitcode.ExitCode
	Return   []byte
	GasUsed  int64

	EventsRoot *cid.Cid // Root of Event AMT with bitwidth = EventAMTBitwidth
	// contains filtered or unexported fields
}

MessageReceipt is what is returned by executing a message on the vm.

func NewMessageReceiptV0 added in v1.10.0

func NewMessageReceiptV0(exitcode exitcode.ExitCode, ret []byte, gasUsed int64) MessageReceipt

NewMessageReceiptV0 creates a new pre FIP-0049 receipt with no capability to convey events.

func NewMessageReceiptV1 added in v1.10.0

func NewMessageReceiptV1(exitcode exitcode.ExitCode, ret []byte, gasUsed int64, eventsRoot *cid.Cid) MessageReceipt

NewMessageReceiptV1 creates a new pre FIP-0049 receipt with the ability to convey events.

func (*MessageReceipt) Equals added in v1.10.0

func (mr *MessageReceipt) Equals(o *MessageReceipt) bool

func (*MessageReceipt) MarshalCBOR

func (mr *MessageReceipt) MarshalCBOR(w io.Writer) error

func (*MessageReceipt) String

func (mr *MessageReceipt) String() string

func (*MessageReceipt) UnmarshalCBOR

func (mr *MessageReceipt) UnmarshalCBOR(r io.Reader) (err error)

func (*MessageReceipt) Version added in v1.10.0

func (mr *MessageReceipt) Version() MessageReceiptVersion

type MessageReceiptVersion added in v1.10.0

type MessageReceiptVersion byte
const (
	// MessageReceiptV0 refers to pre FIP-0049 receipts.
	MessageReceiptV0 MessageReceiptVersion = 0
	// MessageReceiptV1 refers to post FIP-0049 receipts.
	MessageReceiptV1 MessageReceiptVersion = 1
)

type MessageRoot

type MessageRoot struct {
	BlsRoot   cid.Cid
	SecpkRoot cid.Cid
}

func (*MessageRoot) Cid

func (mr *MessageRoot) Cid() cid.Cid

func (*MessageRoot) MarshalCBOR

func (t *MessageRoot) MarshalCBOR(w io.Writer) error

func (*MessageRoot) Serialize

func (mr *MessageRoot) Serialize() ([]byte, error)

func (*MessageRoot) SerializeWithCid

func (mr *MessageRoot) SerializeWithCid() (cid.Cid, []byte, error)

func (*MessageRoot) ToStorageBlock

func (mr *MessageRoot) ToStorageBlock() (blocks.Block, error)

func (*MessageRoot) UnmarshalCBOR

func (t *MessageRoot) UnmarshalCBOR(r io.Reader) (err error)

type MessageSendSpec

type MessageSendSpec struct {
	MaxFee            abi.TokenAmount
	GasOverEstimation float64
	GasOverPremium    float64
}

type MessageTrace added in v1.14.0

type MessageTrace struct {
	From        address.Address
	To          address.Address
	Value       abi.TokenAmount
	Method      abi.MethodNum
	Params      []byte
	ParamsCodec uint64
	GasLimit    uint64
	ReadOnly    bool
}

func (*MessageTrace) MarshalCBOR added in v1.14.0

func (t *MessageTrace) MarshalCBOR(w io.Writer) error

func (*MessageTrace) UnmarshalCBOR added in v1.14.0

func (t *MessageTrace) UnmarshalCBOR(r io.Reader) (err error)

type MinerConstructorParams added in v1.10.0

type MinerConstructorParams = miner.MinerConstructorParams

type MinerInfo added in v1.6.0

type MinerInfo struct {
	Owner                      address.Address   // Must be an ID-address.
	Worker                     address.Address   // Must be an ID-address.
	NewWorker                  address.Address   // Must be an ID-address.
	ControlAddresses           []address.Address // Must be an ID-addresses.
	WorkerChangeEpoch          abi.ChainEpoch
	PeerId                     *peer.ID // nolint
	Multiaddrs                 []abi.Multiaddrs
	WindowPoStProofType        abi.RegisteredPoStProof
	SectorSize                 abi.SectorSize
	WindowPoStPartitionSectors uint64
	ConsensusFaultElapsed      abi.ChainEpoch
	PendingOwnerAddress        *address.Address
	Beneficiary                address.Address
	BeneficiaryTerm            *BeneficiaryTerm
	PendingBeneficiaryTerm     *PendingBeneficiaryChange
}

type MinerPower

type MinerPower struct {
	MinerPower  power.Claim
	TotalPower  power.Claim
	HasMinPower bool
}

type MinerSectors

type MinerSectors struct {
	// Live sectors that should be proven.
	Live uint64
	// Sectors actively contributing to power.
	Active uint64
	// Sectors with failed proofs.
	Faulty uint64
}

type MinerWithdrawBalanceParams added in v1.8.0

type MinerWithdrawBalanceParams = miner.WithdrawBalanceParams

type MiningBaseInfo

type MiningBaseInfo struct {
	MinerPower        abi.StoragePower
	NetworkPower      abi.StoragePower
	Sectors           []builtin.ExtendedSectorInfo
	WorkerKey         address.Address
	SectorSize        abi.SectorSize
	PrevBeaconEntry   BeaconEntry
	BeaconEntries     []BeaconEntry
	EligibleForMining bool
}

type MintParams added in v1.14.0

type MintParams = datacap.MintParams

type MintReturn added in v1.14.0

type MintReturn = datacap.MintReturn

type ModVerifyParams added in v1.8.0

type ModVerifyParams = paych.ModVerifyParams

type MpoolChange

type MpoolChange int
const (
	MpoolAdd MpoolChange = iota
	MpoolRemove
)

type MpoolConfig

type MpoolConfig struct {
	PriorityAddrs          []address.Address
	SizeLimitHigh          int
	SizeLimitLow           int
	ReplaceByFeeRatio      Percent
	PruneCooldown          time.Duration
	GasLimitOverestimation float64
}

type MpoolUpdate

type MpoolUpdate struct {
	Type    MpoolChange
	Message *SignedMessage
}

type MsgGasCost

type MsgGasCost struct {
	Message            cid.Cid // Can be different than requested, in case it was replaced, but only gas values changed
	GasUsed            abi.TokenAmount
	BaseFeeBurn        abi.TokenAmount
	OverEstimationBurn abi.TokenAmount
	MinerPenalty       abi.TokenAmount
	MinerTip           abi.TokenAmount
	Refund             abi.TokenAmount
	TotalCost          abi.TokenAmount
}

type MsgLookup

type MsgLookup struct {
	Message   cid.Cid // Can be different than requested, in case it was replaced, but only gas values changed
	Receipt   MessageReceipt
	ReturnDec interface{}
	TipSet    TipSetKey
	Height    abi.ChainEpoch
}

type MsgMeta

type MsgMeta struct {
	Type MsgType

	// Additional data related to what is signed. Should be verifiable with the
	// signed bytes (e.g. CID(Extra).Bytes() == toSign)
	Extra []byte
}

type MsgType

type MsgType string

type MsigInfo added in v1.10.0

type MsigInfo struct {
	ApprovalsThreshold uint64
	Signers            []address.Address
	InitialBalance     abi.TokenAmount
	CurrentBalance     abi.TokenAmount
	LockBalance        abi.TokenAmount
	StartEpoch         abi.ChainEpoch
	UnlockDuration     abi.ChainEpoch
}

type MsigTransaction added in v1.10.0

type MsigTransaction struct {
	ID     int64
	To     address.Address
	Value  abi.TokenAmount
	Method abi.MethodNum
	Params []byte

	Approved []address.Address
}

type MsigVesting added in v1.10.0

type MsigVesting struct {
	InitialBalance abi.TokenAmount
	StartEpoch     abi.ChainEpoch
	UnlockDuration abi.ChainEpoch
}

type MultisigConstructorParams added in v1.10.0

type MultisigConstructorParams = multisig.ConstructorParams

type NatInfo added in v1.6.1

type NatInfo struct {
	Reachability network.Reachability
	PublicAddrs  []string
}

type NetworkName

type NetworkName string
const (
	NetworkNameMain        NetworkName = "mainnet"
	NetworkNameCalibration NetworkName = "calibrationnet"
	NetworkNameButterfly   NetworkName = "butterflynet"
	NetworkNameInterop     NetworkName = "interopnet"
	NetworkNameIntegration NetworkName = "integrationnet"
	NetworkNameForce       NetworkName = "forcenet"
)

type NetworkParams added in v1.6.0

type NetworkParams struct {
	NetworkName             NetworkName
	BlockDelaySecs          uint64
	ConsensusMinerMinPower  abi.StoragePower
	SupportedProofTypes     []abi.RegisteredSealProof
	PreCommitChallengeDelay abi.ChainEpoch
	ForkUpgradeParams       ForkUpgradeParams
	Eip155ChainID           int
}

type NetworkType added in v1.6.0

type NetworkType int
const (
	NetworkDefault   NetworkType = 0
	NetworkMainnet   NetworkType = 0x1
	Network2k        NetworkType = 0x2
	NetworkDebug     NetworkType = 0x3
	NetworkCalibnet  NetworkType = 0x4
	NetworkNerpa     NetworkType = 0x5
	NetworkInterop   NetworkType = 0x6
	NetworkForce     NetworkType = 0x7
	NetworkButterfly NetworkType = 0x8

	Integrationnet NetworkType = 0x30
)

type NodeChainStatus added in v1.9.0

type NodeChainStatus struct {
	BlocksPerTipsetLast100      float64
	BlocksPerTipsetLastFinality float64
}

type NodePeerStatus added in v1.9.0

type NodePeerStatus struct {
	PeersToPublishMsgs   int
	PeersToPublishBlocks int
}

type NodeStatus added in v1.9.0

type NodeStatus struct {
	SyncStatus  NodeSyncStatus
	PeerStatus  NodePeerStatus
	ChainStatus NodeChainStatus
}

type NodeSyncStatus added in v1.9.0

type NodeSyncStatus struct {
	Epoch  uint64
	Behind uint64
}

type ObjStat

type ObjStat struct {
	Size  uint64
	Links uint64
}

type OnMinerSectorsTerminateParams added in v1.8.0

type OnMinerSectorsTerminateParams = market.OnMinerSectorsTerminateParams

type PCHDir

type PCHDir int
const (
	PCHUndef PCHDir = iota
	PCHInbound
	PCHOutbound
)

type PaddedByteIndex

type PaddedByteIndex uint64

type Partition

type Partition struct {
	AllSectors        bitfield.BitField
	FaultySectors     bitfield.BitField
	RecoveringSectors bitfield.BitField
	LiveSectors       bitfield.BitField
	ActiveSectors     bitfield.BitField
}

type PartitionKey added in v1.8.0

type PartitionKey = miner.PartitionKey

type PaychConstructorParams added in v1.10.0

type PaychConstructorParams = paych.ConstructorParams

type PaychGetOpts added in v1.6.0

type PaychGetOpts struct {
	OffChain bool
}

type PaymentInfo

type PaymentInfo struct {
	Channel      address.Address
	WaitSentinel cid.Cid
	Vouchers     []*SignedVoucher
}

func (*PaymentInfo) MarshalCBOR

func (t *PaymentInfo) MarshalCBOR(w io.Writer) error

func (*PaymentInfo) UnmarshalCBOR

func (t *PaymentInfo) UnmarshalCBOR(r io.Reader) (err error)

type PendingBeneficiaryChange added in v1.8.0

type PendingBeneficiaryChange = miner.PendingBeneficiaryChange

type Percent added in v1.10.2

type Percent int64

Percent stores a signed percentage as an int64. When converted to a string (or json), it's stored as a decimal with two places (e.g., 100% -> 1.00).

func (Percent) MarshalJSON added in v1.10.2

func (p Percent) MarshalJSON() ([]byte, error)

func (Percent) String added in v1.10.2

func (p Percent) String() string

func (*Percent) UnmarshalJSON added in v1.10.2

func (p *Percent) UnmarshalJSON(b []byte) error

type PoStPartition added in v1.8.0

type PoStPartition = miner.PoStPartition

type PowerPair added in v1.8.0

type PowerPair = miner.PowerPair

type PreCommitSectorBatchParams added in v1.8.0

type PreCommitSectorBatchParams = miner.PreCommitSectorBatchParams

type PreCommitSectorBatchParams2 added in v1.8.0

type PreCommitSectorBatchParams2 = miner.PreCommitSectorBatchParams2

type PreCommitSectorParams added in v1.8.0

type PreCommitSectorParams = miner.PreCommitSectorParams

type ProposalHashData added in v1.10.0

type ProposalHashData = multisig.ProposalHashData

type ProposeParams added in v1.10.0

type ProposeParams = multisig.ProposeParams

type ProposeReturn added in v1.10.0

type ProposeReturn = multisig.ProposeReturn

type ProtocolParams

type ProtocolParams struct {
	Network          string
	BlockTime        time.Duration
	SupportedSectors []SectorInfo
}

type ProveCommitAggregateParams added in v1.8.0

type ProveCommitAggregateParams = miner.ProveCommitAggregateParams

type ProveCommitSectorParams added in v1.8.0

type ProveCommitSectorParams = miner.ProveCommitSectorParams

type ProveReplicaUpdatesParams added in v1.8.0

type ProveReplicaUpdatesParams = miner.ProveReplicaUpdatesParams

type ProveReplicaUpdatesParams2 added in v1.8.0

type ProveReplicaUpdatesParams2 = miner.ProveReplicaUpdatesParams2

type PublishStorageDealsParams added in v1.8.0

type PublishStorageDealsParams = market.PublishStorageDealsParams

type PublishStorageDealsReturn added in v1.8.0

type PublishStorageDealsReturn = market.PublishStorageDealsReturn

type PubsubScore added in v1.8.0

type PubsubScore struct {
	ID    peer.ID
	Score *pubsub.PeerScoreSnapshot
}

type QuerySignRecordParams added in v1.11.0

type QuerySignRecordParams struct {
	ID      string
	Type    MsgType
	Signer  address.Address
	IsError bool
	Skip    int
	Limit   int
	After   time.Time
	Before  time.Time
}

type RawHost added in v1.6.1

type RawHost host.Host

type RawMessage

type RawMessage = types.RawMessage

type ReceiverType added in v1.8.0

type ReceiverType = verifreg.ReceiverType

type RecoveryDeclaration added in v1.8.0

type RecoveryDeclaration = miner.RecoveryDeclaration

type RemoveDataCapParams added in v1.8.0

type RemoveDataCapParams = verifreg.RemoveDataCapParams

type RemoveDataCapProposal added in v1.8.0

type RemoveDataCapProposal = verifreg.RemoveDataCapProposal

type RemoveDataCapRequest added in v1.8.0

type RemoveDataCapRequest = verifreg.RemoveDataCapRequest

type RemoveDataCapReturn added in v1.8.0

type RemoveDataCapReturn = verifreg.RemoveDataCapReturn

type RemoveExpiredAllocationsParams added in v1.8.0

type RemoveExpiredAllocationsParams = verifreg.RemoveExpiredAllocationsParams

type RemoveExpiredAllocationsReturn added in v1.8.0

type RemoveExpiredAllocationsReturn = verifreg.RemoveExpiredAllocationsReturn

type RemoveExpiredClaimsParams added in v1.8.0

type RemoveExpiredClaimsParams = verifreg.RemoveExpiredClaimsParams

type RemoveExpiredClaimsReturn added in v1.8.0

type RemoveExpiredClaimsReturn = verifreg.RemoveExpiredClaimsReturn

type RemoveSignerParams added in v1.10.0

type RemoveSignerParams = multisig.RemoveSignerParams

type ReplicaUpdate added in v1.8.0

type ReplicaUpdate = miner.ReplicaUpdate

type ReplicaUpdate2 added in v1.8.0

type ReplicaUpdate2 = miner.ReplicaUpdate2

type ReportConsensusFaultParams added in v1.8.0

type ReportConsensusFaultParams = miner.ReportConsensusFaultParams

type RestoreBytesParams added in v1.8.0

type RestoreBytesParams = verifreg.RestoreBytesParams

type ReturnTrace added in v1.14.0

type ReturnTrace struct {
	ExitCode    exitcode.ExitCode
	Return      []byte
	ReturnCodec uint64
}

func (*ReturnTrace) MarshalCBOR added in v1.14.0

func (t *ReturnTrace) MarshalCBOR(w io.Writer) error

func (*ReturnTrace) UnmarshalCBOR added in v1.14.0

func (t *ReturnTrace) UnmarshalCBOR(r io.Reader) (err error)

type RevokeAllowanceParams added in v1.14.0

type RevokeAllowanceParams = datacap.RevokeAllowanceParams

type RlpPackable added in v1.16.0

type RlpPackable = types.RlpPackable

type RmDcProposalID added in v1.8.0

type RmDcProposalID = verifreg.RmDcProposalID

type SectorAllocationClaim added in v1.8.0

type SectorAllocationClaim = verifreg.SectorAllocationClaim

type SectorClaim added in v1.8.0

type SectorClaim = miner.SectorClaim

type SectorDataSpec added in v1.8.0

type SectorDataSpec = market.SectorDataSpec

type SectorDealData added in v1.8.0

type SectorDealData = market.SectorDealData

type SectorDeals added in v1.8.0

type SectorDeals = market.SectorDeals

type SectorInfo

type SectorInfo struct {
	Size         abi.SectorSize
	MaxPieceSize abi.UnpaddedPieceSize
}

SectorInfo provides information about a sector construction

type SectorOnChainInfo added in v1.8.0

type SectorOnChainInfo = miner.SectorOnChainInfo

type SectorPreCommitInfo added in v1.8.0

type SectorPreCommitInfo = miner.SectorPreCommitInfo

type SectorPreCommitOnChainInfo added in v1.8.0

type SectorPreCommitOnChainInfo = miner.SectorPreCommitOnChainInfo

type Sectors added in v1.8.0

type Sectors = miner.Sectors

type SetMultimap added in v1.8.0

type SetMultimap = market.SetMultimap

type SigType

type SigType = crypto.SigType

func AddressProtocol2SignType added in v1.10.0

func AddressProtocol2SignType(p address.Protocol) SigType

func KeyType2Sign

func KeyType2Sign(kt KeyType) SigType

type SignRecord added in v1.11.0

type SignRecord struct {
	ID        string
	Type      MsgType
	Signer    address.Address
	Err       error
	RawMsg    []byte
	Signature *crypto.Signature
	CreateAt  time.Time
}

type SignedMessage

type SignedMessage = types.SignedMessage

type SignedVoucher

type SignedVoucher = paych.SignedVoucher

type Signer

type Signer interface {
	SignBytes(ctx context.Context, data []byte, addr address.Address) (*crypto.Signature, error)
	HasAddress(ctx context.Context, addr address.Address) (bool, error)
}

Signer signs data with a private key obtained internally from a provided address.

type Status

type Status struct {
	ControlAddr address.Address
	Direction   PCHDir
}

type SubmitWindowedPoStParams added in v1.8.0

type SubmitWindowedPoStParams = miner.SubmitWindowedPoStParams

type SwapSignerParams added in v1.10.0

type SwapSignerParams = multisig.SwapSignerParams

type SyncState

type SyncState struct {
	ActiveSyncs []ActiveSync

	VMApplied uint64
}

type SyncStateStage

type SyncStateStage int

just compatible code lotus

func (SyncStateStage) String

func (v SyncStateStage) String() string

type Target

type Target struct {
	State   SyncStateStage
	Base    *TipSet
	Current *TipSet
	Start   time.Time
	End     time.Time
	Err     error
	Head    *TipSet
	Sender  peer.ID
}

func (*Target) String added in v1.14.0

func (target *Target) String() string

type TargetTracker

type TargetTracker struct {
	History []*Target
	Buckets []*Target
}

type TerminateSectorsParams added in v1.8.0

type TerminateSectorsParams = miner.TerminateSectorsParams

type TerminateSectorsReturn added in v1.8.0

type TerminateSectorsReturn = miner.TerminateSectorsReturn

type TerminationDeclaration added in v1.8.0

type TerminationDeclaration = miner.TerminationDeclaration

type Ticket

type Ticket struct {
	// A proof output by running a VRF on the VRFProof of the parent ticket
	VRFProof VRFPi
}

A Ticket is a marker of a tick of the blockchain's clock. It is the source of randomness for proofs of storage and leader election. It is generated by the miner of a newBlock using a VRF.

func (*Ticket) Compare

func (t *Ticket) Compare(o *Ticket) int

func (*Ticket) Less

func (t *Ticket) Less(o *Ticket) bool

func (*Ticket) MarshalCBOR

func (t *Ticket) MarshalCBOR(w io.Writer) error

func (*Ticket) Quality

func (t *Ticket) Quality() float64

func (Ticket) String

func (t Ticket) String() string

String returns the string representation of the VRFProof of the ticket

func (*Ticket) UnmarshalCBOR

func (t *Ticket) UnmarshalCBOR(r io.Reader) (err error)

type TipSet

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

TipSet is a non-empty, immutable set of blocks at the same height with the same parent set. Blocks in a tipset are canonically ordered by ticket. Blocks may be iterated either via ToSlice() (which involves a shallow copy) or efficiently by index with At(). TipSet is a lightweight value type; passing by pointer is usually unnecessary.

Canonical tipset newBlock ordering does not match the order of CIDs in a TipSetKey used as a tipset "key".

func NewTipSet

func NewTipSet(bhs []*BlockHeader) (*TipSet, error)

func (*TipSet) At

func (ts *TipSet) At(i int) *BlockHeader

At returns the i'th newBlock in the tipset. An index outside the half-open range [0, Len()) will panic.

func (*TipSet) Blocks

func (ts *TipSet) Blocks() []*BlockHeader

func (*TipSet) Cids

func (ts *TipSet) Cids() []cid.Cid

func (*TipSet) Contains added in v1.15.0

func (ts *TipSet) Contains(oc cid.Cid) bool

func (*TipSet) Defined

func (ts *TipSet) Defined() bool

Defined checks whether the tipset is defined. Invoking any other methods on an undefined tipset will result in undefined behaviour (c.f. cid.Undef)

func (*TipSet) Equals

func (ts *TipSet) Equals(ots *TipSet) bool

func (*TipSet) Height

func (ts *TipSet) Height() abi.ChainEpoch

Height returns the height of a tipset.

func (*TipSet) IsChildOf

func (ts *TipSet) IsChildOf(parent *TipSet) bool

func (*TipSet) Key

func (ts *TipSet) Key() TipSetKey

Key returns a key for the tipset.

func (*TipSet) Len

func (ts *TipSet) Len() int

Len returns the number of blocks in the tipset.

func (*TipSet) MarshalCBOR

func (ts *TipSet) MarshalCBOR(w io.Writer) error

func (*TipSet) MarshalJSON

func (ts *TipSet) MarshalJSON() ([]byte, error)

func (*TipSet) MinTicket

func (ts *TipSet) MinTicket() *Ticket

MinTicket returns the smallest ticket of all blocks in the tipset.

func (*TipSet) MinTicketBlock

func (ts *TipSet) MinTicketBlock() *BlockHeader

func (*TipSet) MinTimestamp

func (ts *TipSet) MinTimestamp() uint64

func (*TipSet) ParentState

func (ts *TipSet) ParentState() cid.Cid

ParentState returns the CIDs of the parents of the blocks in the tipset.

func (*TipSet) ParentWeight

func (ts *TipSet) ParentWeight() big.Int

ParentWeight returns the tipset's ParentWeight in fixed point form.

func (*TipSet) Parents

func (ts *TipSet) Parents() TipSetKey

Parents returns the CIDs of the parents of the blocks in the tipset.

func (TipSet) String

func (ts TipSet) String() string

String returns a formatted string of the CIDs in the TipSet. "{ <cid1> <cid2> <cid3> }" Note: existing callers use this as a unique key for the tipset. We should change them to use the TipSetKey explicitly

func (*TipSet) ToSlice

func (ts *TipSet) ToSlice() []*BlockHeader

ToSlice returns an ordered slice of pointers to the tipset's blocks.

func (*TipSet) UnmarshalCBOR

func (ts *TipSet) UnmarshalCBOR(r io.Reader) error

func (*TipSet) UnmarshalJSON

func (ts *TipSet) UnmarshalJSON(b []byte) error

type TipSetKey

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

A TipSetKey is an immutable collection of CIDs forming a unique key for a tipset. The CIDs are assumed to be distinct and in canonical order. Two keys with the same CIDs in a different order are not considered equal. TipSetKey is a lightweight value type, and may be compared for equality with ==.

func NewTipSetKey

func NewTipSetKey(cids ...cid.Cid) TipSetKey

NewTipSetKey builds a new key from a slice of CIDs. The CIDs are assumed to be ordered correctly.

func TipSetKeyFromBytes

func TipSetKeyFromBytes(encoded []byte) (TipSetKey, error)

TipSetKeyFromBytes wraps an encoded key, validating correct decoding.

func (TipSetKey) Bytes

func (tsk TipSetKey) Bytes() []byte

Bytes returns a binary representation of the key.

func (TipSetKey) Cid added in v1.10.0

func (tsk TipSetKey) Cid() (cid.Cid, error)

func (TipSetKey) Cids

func (tsk TipSetKey) Cids() []cid.Cid

Cids returns a slice of the CIDs comprising this key.

func (TipSetKey) ContainsAll

func (tsk TipSetKey) ContainsAll(other TipSetKey) bool

ContainsAll checks if another set is a subset of this one. We can assume that the relative order of members of one key is maintained in the other since we assume that all ids are sorted by corresponding newBlock ticket value.

func (TipSetKey) Equals

func (tsk TipSetKey) Equals(other TipSetKey) bool

Equals checks whether the set contains exactly the same CIDs as another.

func (TipSetKey) Has

func (tsk TipSetKey) Has(id cid.Cid) bool

Has checks whether the set contains `id`.

func (TipSetKey) IsEmpty

func (tsk TipSetKey) IsEmpty() bool

func (TipSetKey) MarshalCBOR

func (tsk TipSetKey) MarshalCBOR(writer io.Writer) error

func (TipSetKey) MarshalJSON

func (tsk TipSetKey) MarshalJSON() ([]byte, error)

func (TipSetKey) String

func (tsk TipSetKey) String() string

String returns a human-readable representation of the key.

func (TipSetKey) ToStorageBlock added in v1.10.0

func (tsk TipSetKey) ToStorageBlock() (block.Block, error)

func (*TipSetKey) UnmarshalCBOR

func (tsk *TipSetKey) UnmarshalCBOR(reader io.Reader) error

func (*TipSetKey) UnmarshalJSON

func (tsk *TipSetKey) UnmarshalJSON(b []byte) error

func (TipSetKey) V0MarshalCBOR added in v1.10.0

func (tsk TipSetKey) V0MarshalCBOR(w io.Writer) error

todo: remove after nv18

func (*TipSetKey) V0UnmarshalCBOR added in v1.10.0

func (tsk *TipSetKey) V0UnmarshalCBOR(r io.Reader) error

todo: remove after nv18

type TokenState added in v1.14.0

type TokenState = datacap.TokenState

type Transaction added in v1.10.0

type Transaction = multisig.Transaction

type TransferFromParams added in v1.14.0

type TransferFromParams = datacap.TransferFromParams

type TransferFromReturn added in v1.14.0

type TransferFromReturn = datacap.TransferFromReturn

type TransferParams added in v1.14.0

type TransferParams = datacap.TransferParams

type TransferReturn added in v1.14.0

type TransferReturn = datacap.TransferReturn

type TxnID added in v1.10.0

type TxnID = multisig.TxnID

type TxnIDParams added in v1.10.0

type TxnIDParams = multisig.TxnIDParams

type UUID

type UUID uuid.UUID

func NewUUID

func NewUUID() UUID

func ParseUUID

func ParseUUID(uid string) (UUID, error)

func (UUID) IsEmpty

func (uid UUID) IsEmpty() bool

func (UUID) MarshalBinary added in v1.6.0

func (uid UUID) MarshalBinary() ([]byte, error)

func (UUID) MarshalJSON

func (uid UUID) MarshalJSON() ([]byte, error)

func (*UUID) Scan

func (uid *UUID) Scan(value interface{}) error

Scan assigns a value from a database driver. An error should be returned if the value cannot be stored without loss of information.

Reference types such as []byte are only valid until the next call to Scan and should not be retained. Their underlying memory is owned by the driver. If retention is necessary, copy their values before the next call to Scan.

func (UUID) String

func (uid UUID) String() string

func (*UUID) UnmarshalBinary added in v1.6.0

func (uid *UUID) UnmarshalBinary(b []byte) error

func (*UUID) UnmarshalJSON

func (uid *UUID) UnmarshalJSON(b []byte) error

func (UUID) Value

func (uid UUID) Value() (driver.Value, error)

Value implement sql.Scanner

type UniversalReceiverParams added in v1.8.0

type UniversalReceiverParams = verifreg.UniversalReceiverParams

type UnpaddedByteIndex

type UnpaddedByteIndex uint64

func (UnpaddedByteIndex) Padded

func (UnpaddedByteIndex) Valid

func (i UnpaddedByteIndex) Valid() error

type UpdateChannelStateParams added in v1.8.0

type UpdateChannelStateParams = paych.UpdateChannelStateParams

type UseBytesParams added in v1.8.0

type UseBytesParams = verifreg.UseBytesParams

type VRFPi

type VRFPi []byte

VRFPi is the proof output from running a VRF.

func (VRFPi) Digest

func (p VRFPi) Digest() [32]byte

Digest returns the digest (hash) of a proof, for use generating challenges etc.

type VerifiedDealInfo added in v1.8.0

type VerifiedDealInfo = market.VerifiedDealInfo

type VerifyDealsForActivationParams added in v1.8.0

type VerifyDealsForActivationParams = market.VerifyDealsForActivationParams

type VerifyDealsForActivationReturn added in v1.8.0

type VerifyDealsForActivationReturn = market.VerifyDealsForActivationReturn

type Version

type Version struct {
	Version string

	// APIVersion is a binary encoded semver version of the remote implementing
	// this api
	//
	APIVersion APIVersion
}

Version provides various build-time information

type VestSpec added in v1.8.0

type VestSpec = miner.VestSpec

type VestingFund added in v1.8.0

type VestingFund = miner.VestingFund

type VestingFunds added in v1.8.0

type VestingFunds = miner.VestingFunds

type VoucherCreateResult

type VoucherCreateResult struct {
	// Voucher that was created, or nil if there was an error or if there
	// were insufficient funds in the channel
	Voucher *SignedVoucher
	// Shortfall is the additional amount that would be needed in the channel
	// in order to be able to create the voucher
	Shortfall BigInt
}

VoucherCreateResult is the response to calling PaychVoucherCreate

type VoucherSpec

type VoucherSpec struct {
	Amount      BigInt
	TimeLockMin abi.ChainEpoch
	TimeLockMax abi.ChainEpoch
	MinSettle   abi.ChainEpoch

	Extra *ModVerifyParams
}

type WindowedPoSt added in v1.8.0

type WindowedPoSt = miner.WindowedPoSt

type WorkerKeyChange added in v1.8.0

type WorkerKeyChange = miner.WorkerKeyChange

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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