Documentation ¶
Index ¶
- Constants
- Variables
- func CidArrsContains(a []cid.Cid, b cid.Cid) bool
- func CidArrsEqual(a, b []cid.Cid) bool
- func DeciStr(bi BigInt) string
- func MessageProvider() func(t *testing.T) *Message
- func MustParseAddress(addr string) address.Address
- func MustParseCid(c string) cid.Cid
- func NewGasFeeCap(price int64) abi.TokenAmount
- func NewGasPremium(price int64) abi.TokenAmount
- func ReverseFullBlock(chain []*FullTipSet)
- func ReverseTipSet(chain []*TipSet)
- func SizeStr(bi BigInt) string
- func TipsetProvider() func(*testing.T) *TipSet
- type ActiveSync
- type Actor
- type BeaconEntry
- type BigInt
- type BlockHeader
- func (b *BlockHeader) Cid() cid.Cid
- func (b *BlockHeader) Equals(other *BlockHeader) bool
- func (b *BlockHeader) IsValidated() bool
- func (b *BlockHeader) LastTicket() *Ticket
- func (t *BlockHeader) MarshalCBOR(w io.Writer) error
- func (b *BlockHeader) Serialize() ([]byte, error)
- func (b *BlockHeader) SerializeWithCid() (cid.Cid, []byte, error)
- func (b *BlockHeader) SetValidated()
- func (b *BlockHeader) SignatureData() ([]byte, error)
- func (b *BlockHeader) String() string
- func (b *BlockHeader) ToNode() node.Node
- func (b *BlockHeader) ToStorageBlock() (blocks.Block, error)
- func (t *BlockHeader) UnmarshalCBOR(r io.Reader) error
- type BlockMessages
- type BlockMessagesInfo
- type BlockMsg
- type BlockTemplate
- type ChainInfo
- type ChainMessage
- type ChainMsg
- type ChannelAvailableFunds
- type ChannelInfo
- type CheckStatus
- type CheckStatusCode
- type CirculatingSupply
- type ConnectionResult
- type Deadline
- type DealCollateralBounds
- type ElectionProof
- type EstimateMessage
- type EstimateResult
- type ExecutionTrace
- type ExpTipSet
- type FIL
- type FullBlock
- type FullTipSet
- type GasTrace
- type HeadChange
- type HeadChangeType
- type InvocResult
- type KeyInfo
- type KeyType
- type Loc
- type MarketBalance
- type MarketDeal
- type Message
- type MessageCID
- type MessageCheckStatus
- type MessagePrototype
- type MessageReceipt
- type MessageRoot
- func (mr *MessageRoot) Cid() cid.Cid
- func (t *MessageRoot) MarshalCBOR(w io.Writer) error
- func (mr *MessageRoot) Serialize() ([]byte, error)
- func (mr *MessageRoot) SerializeWithCid() (cid.Cid, []byte, error)
- func (mr *MessageRoot) ToStorageBlock() (blocks.Block, error)
- func (t *MessageRoot) UnmarshalCBOR(r io.Reader) error
- type MessageSendSpec
- type MinerPower
- type MinerSectors
- type MiningBaseInfo
- type MpoolChange
- type MpoolConfig
- type MpoolUpdate
- type MsgGasCost
- type MsgLookup
- type MsgMeta
- type MsgType
- type NetworkName
- type ObjStat
- type PCHDir
- type PaddedByteIndex
- type Partition
- type PaymentInfo
- type ProtocolParams
- type RawMessage
- type RawSignedMessage
- type SectorInfo
- type SigType
- type SignedMessage
- func (smsg *SignedMessage) ChainLength() int
- func (smsg *SignedMessage) Cid() cid.Cid
- func (t *SignedMessage) MarshalCBOR(w io.Writer) error
- func (sm *SignedMessage) MarshalJSON() ([]byte, error)
- func (smsg *SignedMessage) Serialize() ([]byte, error)
- func (smsg *SignedMessage) SerializeWithCid() (cid.Cid, []byte, error)
- func (smsg *SignedMessage) String() string
- func (smsg *SignedMessage) ToStorageBlock() (blocks.Block, error)
- func (t *SignedMessage) UnmarshalCBOR(r io.Reader) error
- func (smsg *SignedMessage) VMMessage() *Message
- type SignedVoucher
- type Signer
- type Status
- type SwarmConnInfo
- type SwarmConnInfos
- type SwarmStreamInfo
- type SyncState
- type SyncStateStage
- type Target
- type TargetTracker
- type Ticket
- type TipSet
- func (ts *TipSet) At(i int) *BlockHeader
- func (ts *TipSet) Blocks() []*BlockHeader
- func (ts *TipSet) Cids() []cid.Cid
- func (ts *TipSet) Defined() bool
- func (ts *TipSet) Equals(ots *TipSet) bool
- func (ts *TipSet) Height() abi.ChainEpoch
- func (ts *TipSet) IsChildOf(parent *TipSet) bool
- func (ts *TipSet) Key() TipSetKey
- func (ts *TipSet) Len() int
- func (ts *TipSet) MarshalCBOR(w io.Writer) error
- func (ts *TipSet) MarshalJSON() ([]byte, error)
- func (ts *TipSet) MinTicket() *Ticket
- func (ts *TipSet) MinTicketBlock() *BlockHeader
- func (ts *TipSet) MinTimestamp() uint64
- func (ts *TipSet) ParentState() cid.Cid
- func (ts *TipSet) ParentWeight() big.Int
- func (ts *TipSet) Parents() TipSetKey
- func (ts TipSet) String() string
- func (ts *TipSet) ToSlice() []*BlockHeader
- func (ts *TipSet) UnmarshalCBOR(r io.Reader) error
- func (ts *TipSet) UnmarshalJSON(b []byte) error
- type TipSetKey
- func (tsk TipSetKey) Bytes() []byte
- func (tsk TipSetKey) Cids() []cid.Cid
- func (tsk TipSetKey) ContainsAll(other TipSetKey) bool
- func (tsk TipSetKey) Equals(other TipSetKey) bool
- func (tsk TipSetKey) Has(id cid.Cid) bool
- func (tsk TipSetKey) IsEmpty() bool
- func (tsk TipSetKey) MarshalCBOR(w io.Writer) error
- func (tsk TipSetKey) MarshalJSON() ([]byte, error)
- func (tsk TipSetKey) String() string
- func (tsk *TipSetKey) UnmarshalCBOR(r io.Reader) error
- func (tsk *TipSetKey) UnmarshalJSON(b []byte) error
- type UUID
- type UnpaddedByteIndex
- type VRFPi
- type Version
- type VoucherCreateResult
- type VoucherSpec
Constants ¶
const ( StageIdle = SyncStateStage(iota) StageHeaders StagePersistHeaders StageMessages StageSyncComplete StageSyncErrored StageFetchingMessages )
const ( SigTypeUnknown = SigType(math.MaxUint8) SigTypeSecp256k1 = SigType(iota) SigTypeBLS )
const ( 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") )
const DefaultHashFunction = uint64(mh.BLAKE2B_MIN + 31)
The multihash function identifier to use for content addresses.
const HeadChangeTopic = "headchange"
HeadChangeTopic is the topic used to publish new heads.
const MessageVersion = internal.MessageVersion
Variables ¶
var ( ErrKeyInfoNotFound = fmt.Errorf("key info not found") ErrKeyExists = fmt.Errorf("key already exists") )
var AttoFil = internal.AttoFil
var BigAdd = internal.BigAdd
var BigCmp = internal.BigCmp
var BigDiv = internal.BigDiv
var BigDivFloat = internal.BigDivFloat
var BigFromBytes = internal.BigFromBytes
var BigFromString = internal.BigFromString
var BigMod = internal.BigMod
var BigMul = internal.BigMul
var BigSub = internal.BigSub
var DecodeMessage = internal.DecodeMessage
var DefaultCidBuilder = cid.V1Builder{Codec: cid.DagCBOR, MhType: DefaultHashFunction}
A builder for all blockchain CIDs. Note that sector commitments use a different scheme.
var EmptyInt = internal.EmptyInt
var EmptyTSK = TipSetKey{}
var EmptyTokenAmount = abi.TokenAmount{}
var ErrActorNotFound = internal.ErrActorNotFound
var FemtoFil = internal.FemtoFil
var FromFil = internal.FromFil
var MarketBalanceNil = MarketBalance{}
var MustParseFIL = internal.MustParseFIL
var NanoFil = internal.NanoFil
var NewInt = internal.NewInt
var ParseFIL = internal.ParseFIL
var PicoFil = internal.PicoFil
var TotalFilecoinInt = internal.TotalFilecoinInt
var UndefTipSet = &TipSet{}
UndefTipSet is a singleton representing a nil or undefined tipset.
var ZeroAddress = internal.ZeroAddress
var ZeroFIL = internal.ZeroFIL
Functions ¶
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 MessageProvider ¶
func MustParseAddress ¶
func MustParseAddress(addr string) address.Address
func MustParseCid ¶
func MustParseCid(c string) cid.Cid
func NewGasFeeCap ¶
func NewGasFeeCap(price int64) abi.TokenAmount
func NewGasPremium ¶
func NewGasPremium(price int64) abi.TokenAmount
func ReverseFullBlock ¶
func ReverseFullBlock(chain []*FullTipSet)
Reverse reverses the order of the slice `chain`.
func ReverseTipSet ¶
func ReverseTipSet(chain []*TipSet)
Reverse reverses the order of the slice `chain`.
func TipsetProvider ¶
Types ¶
type ActiveSync ¶
type Actor ¶
func NewActor ¶
func NewActor(code cid.Cid, balance abi.TokenAmount, head cid.Cid) *Actor
NewActor constructs a new actor.
type BeaconEntry ¶
func (*BeaconEntry) MarshalCBOR ¶
func (t *BeaconEntry) MarshalCBOR(w io.Writer) error
func (*BeaconEntry) UnmarshalCBOR ¶
func (t *BeaconEntry) UnmarshalCBOR(r io.Reader) error
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 []proof2.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) 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 }
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 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 Head *TipSet }
ChainInfo is used to track metadata about a peer and its chain.
func NewChainInfo ¶
NewChainInfo creates a chain info from a peer id a head tipset key and a chain height.
type ChainMessage ¶
type ChainMessage struct { TS *TipSet Message *Message Block *BlockHeader Receipt *MessageReceipt }
ChainMessage is an on-chain message with its block and receipt.
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 BigInt // PendingAmt is the amount of funds that are pending confirmation on-chain PendingAmt 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 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 ConnectionResult ¶
ConnectionResult represents the result of an attempted connection from the Connect method.
type Deadline ¶
type Deadline struct { PostSubmissions bitfield.BitField DisputableProofCount uint64 }
type DealCollateralBounds ¶
type DealCollateralBounds struct { Min abi.TokenAmount Max abi.TokenAmount }
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) error
type EstimateMessage ¶
type EstimateMessage struct { Msg *Message Spec *MessageSendSpec }
type EstimateResult ¶
type ExecutionTrace ¶
type ExecutionTrace struct { Msg *Message MsgRct *MessageReceipt Error string Duration time.Duration GasCharges []*GasTrace Subcalls []ExecutionTrace }
type ExpTipSet ¶
type ExpTipSet struct { Cids []cid.Cid Blocks []*BlockHeader Height 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.
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 Location []Loc `json:"loc"` TotalGas int64 `json:"tg"` ComputeGas int64 `json:"cg"` StorageGas int64 `json:"sg"` TotalVirtualGas int64 `json:"vtg"` VirtualComputeGas int64 `json:"vcg"` VirtualStorageGas int64 `json:"vsg"` TimeTaken time.Duration `json:"tt"` Extra interface{} `json:"ex,omitempty"` Callers []uintptr `json:"-"` }
func (*GasTrace) MarshalJSON ¶
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 InvocResult ¶
type InvocResult struct { MsgCid cid.Cid Msg *Message MsgRct *MessageReceipt GasCost MsgGasCost ExecutionTrace ExecutionTrace Error string Duration time.Duration }
type KeyType ¶
type KeyType string
KeyType defines a type of a key
func SignType2Key ¶
func (*KeyType) UnmarshalJSON ¶
type MarketDeal ¶
type MarketDeal struct { Proposal market.DealProposal State market.DealState }
type MessageCID ¶
type MessageCID struct { Cid cid.Cid Message *Message }
type MessageCheckStatus ¶
type MessageCheckStatus struct { Cid cid.Cid CheckStatus }
type MessagePrototype ¶
type MessageReceipt ¶
MessageReceipt is what is returned by executing a message on the vm.
func (*MessageReceipt) MarshalCBOR ¶
func (t *MessageReceipt) MarshalCBOR(w io.Writer) error
func (*MessageReceipt) String ¶
func (r *MessageReceipt) String() string
func (*MessageReceipt) UnmarshalCBOR ¶
func (t *MessageReceipt) UnmarshalCBOR(r io.Reader) error
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) error
type MessageSendSpec ¶
type MessageSendSpec struct { MaxFee abi.TokenAmount GasOverEstimation float64 }
type MinerPower ¶
type MinerSectors ¶
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 MpoolConfig ¶
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 NetworkName ¶
type NetworkName string
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 PaymentInfo ¶
type PaymentInfo struct { Channel address.Address WaitSentinel cid.Cid Vouchers []*paych.SignedVoucher }
func (*PaymentInfo) MarshalCBOR ¶
func (t *PaymentInfo) MarshalCBOR(w io.Writer) error
func (*PaymentInfo) UnmarshalCBOR ¶
func (t *PaymentInfo) UnmarshalCBOR(r io.Reader) error
type ProtocolParams ¶
type ProtocolParams struct { Network string BlockTime time.Duration SupportedSectors []SectorInfo }
type RawMessage ¶
type RawMessage = internal.RawMessage
type RawSignedMessage ¶
type RawSignedMessage SignedMessage
type SectorInfo ¶
type SectorInfo struct { Size abi.SectorSize MaxPieceSize abi.UnpaddedPieceSize }
SectorInfo provides information about a sector construction
type SigType ¶
func KeyType2Sign ¶
type SignedMessage ¶
SignedMessage contains a message and its signature
func (*SignedMessage) Cid ¶
func (smsg *SignedMessage) Cid() cid.Cid
func (*SignedMessage) MarshalCBOR ¶
func (t *SignedMessage) MarshalCBOR(w io.Writer) error
func (*SignedMessage) MarshalJSON ¶
func (sm *SignedMessage) MarshalJSON() ([]byte, error)
func (*SignedMessage) Serialize ¶
func (smsg *SignedMessage) Serialize() ([]byte, error)
Serialize return message binary
func (*SignedMessage) SerializeWithCid ¶
func (smsg *SignedMessage) SerializeWithCid() (cid.Cid, []byte, error)
Serialize return message binary
func (*SignedMessage) String ¶
func (smsg *SignedMessage) String() string
String return message json string
func (*SignedMessage) ToStorageBlock ¶
func (smsg *SignedMessage) ToStorageBlock() (blocks.Block, error)
func (*SignedMessage) UnmarshalCBOR ¶
func (t *SignedMessage) UnmarshalCBOR(r io.Reader) error
func (*SignedMessage) VMMessage ¶
func (smsg *SignedMessage) VMMessage() *Message
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 SwarmConnInfo ¶
type SwarmConnInfo struct { Addr string Peer string Latency string Muxer string Streams []SwarmStreamInfo }
SwarmConnInfo represents details about a single swarm connection.
func (*SwarmConnInfo) Len ¶
func (ci *SwarmConnInfo) Len() int
func (*SwarmConnInfo) Less ¶
func (ci *SwarmConnInfo) Less(i, j int) bool
func (*SwarmConnInfo) Swap ¶
func (ci *SwarmConnInfo) Swap(i, j int)
type SwarmConnInfos ¶
type SwarmConnInfos struct {
Peers []SwarmConnInfo
}
SwarmConnInfos represent details about a list of swarm connections.
func (SwarmConnInfos) Len ¶
func (ci SwarmConnInfos) Len() int
func (SwarmConnInfos) Less ¶
func (ci SwarmConnInfos) Less(i, j int) bool
func (SwarmConnInfos) Swap ¶
func (ci SwarmConnInfos) Swap(i, j int)
type SwarmStreamInfo ¶
type SwarmStreamInfo struct {
Protocol string
}
SwarmStreamInfo represents details about a single swarm stream.
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 ChainInfo }
sync
type TargetTracker ¶
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.
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) Defined ¶
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) Height ¶
func (ts *TipSet) Height() abi.ChainEpoch
Height returns the height of a tipset.
func (*TipSet) MarshalJSON ¶
func (*TipSet) MinTicketBlock ¶
func (ts *TipSet) MinTicketBlock() *BlockHeader
func (*TipSet) MinTimestamp ¶
func (*TipSet) ParentState ¶
func (ts *TipSet) ParentState() cid.Cid
Parents returns the CIDs of the parents of the blocks in the tipset.
func (*TipSet) ParentWeight ¶
ParentWeight returns the tipset's ParentWeight in fixed point form.
func (TipSet) 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) UnmarshalJSON ¶
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 ¶
TipSetKeyFromBytes wraps an encoded key, validating correct decoding.
func (TipSetKey) Cids ¶
func (tsk TipSetKey) Cids() []cid.Cid
Cids returns a slice of the CIDs comprising this key.
func (TipSetKey) ContainsAll ¶
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) MarshalJSON ¶
func (*TipSetKey) UnmarshalJSON ¶
type UUID ¶
func (UUID) MarshalJSON ¶
func (*UUID) Scan ¶
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) UnmarshalJSON ¶
type UnpaddedByteIndex ¶
type UnpaddedByteIndex uint64
func (UnpaddedByteIndex) Padded ¶
func (i UnpaddedByteIndex) Padded() PaddedByteIndex
func (UnpaddedByteIndex) Valid ¶
func (i UnpaddedByteIndex) Valid() error
type Version ¶
type Version struct { Version string // APIVersion is a binary encoded semver version of the remote implementing // this api // APIVersion api.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 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 *paych.ModVerifyParams }
Source Files ¶
- actor.go
- api_types.go
- beacon.go
- bigint.go
- bigint_fil.go
- bigint_unit.go
- block_header.go
- block_message.go
- block_msg.go
- cbor_gen.go
- chain_info.go
- checkstatuscode_string.go
- complex_provider.go
- election_proof.go
- exec.go
- full_block.go
- full_tipset.go
- key_info.go
- message.go
- message_marshal.go
- message_receipt.go
- message_root.go
- mpool.go
- mpool_config.go
- msg_meta.go
- net.go
- padded_byte.go
- param.go
- paych.go
- shared_func.go
- signed_message.go
- signed_message_marshal.go
- signer.go
- supply.go
- tipset.go
- tipset_key.go
- tipset_marshal.go
- uuid.go