apitypes

package
v0.9.7-rc2 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2021 License: Apache-2.0, MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StageIdle = SyncStateStage(iota)
	StageHeaders
	StagePersistHeaders
	StageMessages
	StageSyncComplete
	StageSyncErrored
	StageFetchingMessages
)

Variables

View Source
var MarketBalanceNil = MarketBalance{}

Functions

This section is empty.

Types

type ActiveSync

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

	Stage  SyncStateStage
	Height abi.ChainEpoch

	Start   time.Time
	End     time.Time
	Message string
}

type BlockMessages

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

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

type BlockTemplate

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

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 amount of funds that have been confirmed on-chain
	// for the channel
	ConfirmedAmt big.Int
	// PendingAmt is the amount of funds that are pending confirmation on-chain
	PendingAmt big.Int
	// 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 big.Int
	// VoucherRedeemedAmt is the amount that is redeemed by vouchers on-chain
	// and in the local datastore
	VoucherReedeemedAmt big.Int
}

type ChannelInfo

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

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
)

type ComputeStateOutput

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

type Deadline

type Deadline struct {
	PostSubmissions      bitfield.BitField
	DisputableProofCount uint64
}

type InvocResult

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

type MarketBalance

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

type MarketDeal

type MarketDeal struct {
	Proposal market.DealProposal
	State    market.DealState
}

type Message

type Message struct {
	Cid     cid.Cid
	Message *types.UnsignedMessage
}

type MessageCheckStatus

type MessageCheckStatus struct {
	Cid cid.Cid
	CheckStatus
}

type MessagePrototype

type MessagePrototype struct {
	Message    types.Message
	ValidNonce bool
}

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 MiningBaseInfo

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

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 = chain.MsgLookup

type NetworkName

type NetworkName string

type ObjStat

type ObjStat struct {
	Size  uint64
	Links uint64
}

type Partition

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

type PaymentInfo

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

type ProtocolParams

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

ProtocolParams contains parameters that modify the filecoin nodes protocol

type SectorInfo

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

SectorInfo provides information about a sector construction

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 Version

type Version struct {
	Version string

	// APIVersion is a binary encoded semver version of the remote implementing
	// this api
	//
	// See APIVersion in build/version.go
	APIVersion constants.Version
}

Version provides various build-time information

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 *paych.SignedVoucher
	// Shortfall is the additional amount that would be needed in the channel
	// in order to be able to create the voucher
	Shortfall big.Int
}

VoucherCreateResult is the response to calling PaychVoucherCreate

type VoucherSpec

type VoucherSpec struct {
	Amount      big.Int
	TimeLockMin abi.ChainEpoch
	TimeLockMax abi.ChainEpoch
	MinSettle   abi.ChainEpoch

	Extra *paych.ModVerifyParams
}

Jump to

Keyboard shortcuts

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