Documentation ¶
Index ¶
- Constants
- Variables
- type AddrUse
- type ChannelInfo
- func (ci *ChannelInfo) From() address.Address
- func (ci *ChannelInfo) HasVoucher(sv *paych.SignedVoucher) (bool, error)
- func (ci *ChannelInfo) InfoForVoucher(sv *paych.SignedVoucher) (*VoucherInfo, error)
- func (ci *ChannelInfo) MarkVoucherSubmitted(sv *paych.SignedVoucher) error
- func (t *ChannelInfo) MarshalCBOR(w io.Writer) error
- func (ci *ChannelInfo) To() address.Address
- func (t *ChannelInfo) UnmarshalCBOR(r io.Reader) error
- func (ci *ChannelInfo) WasVoucherSubmitted(sv *paych.SignedVoucher) (bool, error)
- type DagstoreInitializeAllEvent
- type DagstoreInitializeAllParams
- type DagstoreShardInfo
- type DagstoreShardResult
- type DataTransferChannel
- type DealInfo
- type DealInfoIncludePath
- type DealSchedule
- type FundedAddressState
- type GetDealSpec
- type MarketBalance
- type MinerAddress
- type MinerDeal
- type MinerID
- type MsgInfo
- type PendingDealInfo
- type PieceDealInfo
- type PieceInfo
- type ProviderDealState
- func (deal ProviderDealState) Identifier() retrievalmarket.ProviderDealIdentifier
- func (deal *ProviderDealState) IntervalLowerBound() uint64
- func (t *ProviderDealState) MarshalCBOR(w io.Writer) error
- func (deal *ProviderDealState) NextInterval() uint64
- func (deal *ProviderDealState) TotalPaidFor() uint64
- func (t *ProviderDealState) UnmarshalCBOR(r io.Reader) error
- type RetrievalAsk
- type SealSeed
- type SealTicket
- type SealedRef
- type SealedRefs
- type SectorInfo
- type SectorLog
- type SectorOffset
- type SectorSize
- type SectorState
- type SignInfo
- type User
- type VoucherInfo
- type VoucherInfos
Constants ¶
const ( Undefine = "Undefine" Assigned = "Assigned" Packing = "Packing" Proving = "Proving" )
const ( DirInbound = 1 DirOutbound = 2 )
Variables ¶
var ErrChannelNotFound = fmt.Errorf("channel not found")
Functions ¶
This section is empty.
Types ¶
type ChannelInfo ¶
type ChannelInfo struct { // ChannelID is a uuid set at channel creation ChannelID string // Channel address - may be nil if the channel hasn't been created yet Channel *address.Address // Control is the address of the local node Control address.Address // Target is the address of the remote node (on the other end of the channel) Target address.Address // Direction indicates if the channel is inbound (Control is the "to" address) // or outbound (Control is the "from" address) Direction uint64 // Vouchers is a list of all vouchers sent on the channel Vouchers []*VoucherInfo // NextLane is the number of the next lane that should be used when the // client requests a new lane (eg to create a voucher for a new deal) NextLane uint64 // Amount added to the channel. // Note: This amount is only used by GetPaych to keep track of how much // has locally been added to the channel. It should reflect the channel's // Balance on chain as long as all operations occur on the same datastore. Amount big.Int // PendingAmount is the amount that we're awaiting confirmation of PendingAmount big.Int // CreateMsg is the CID of a pending create message (while waiting for confirmation) CreateMsg *cid.Cid // AddFundsMsg is the CID of a pending add funds message (while waiting for confirmation) AddFundsMsg *cid.Cid // Settling indicates whether the channel has entered into the settling state Settling bool }
ChannelInfo keeps track of information about a channel
func (*ChannelInfo) From ¶
func (ci *ChannelInfo) From() address.Address
func (*ChannelInfo) HasVoucher ¶
func (ci *ChannelInfo) HasVoucher(sv *paych.SignedVoucher) (bool, error)
func (*ChannelInfo) InfoForVoucher ¶
func (ci *ChannelInfo) InfoForVoucher(sv *paych.SignedVoucher) (*VoucherInfo, error)
infoForVoucher gets the VoucherInfo for the given voucher. returns nil if the channel doesn't have the voucher.
func (*ChannelInfo) MarkVoucherSubmitted ¶
func (ci *ChannelInfo) MarkVoucherSubmitted(sv *paych.SignedVoucher) error
markVoucherSubmitted marks the voucher, and any vouchers of lower nonce in the same lane, as being submitted. Note: This method doesn't write anything to the store.
func (*ChannelInfo) MarshalCBOR ¶
func (t *ChannelInfo) MarshalCBOR(w io.Writer) error
func (*ChannelInfo) To ¶
func (ci *ChannelInfo) To() address.Address
func (*ChannelInfo) UnmarshalCBOR ¶
func (t *ChannelInfo) UnmarshalCBOR(r io.Reader) error
func (*ChannelInfo) WasVoucherSubmitted ¶
func (ci *ChannelInfo) WasVoucherSubmitted(sv *paych.SignedVoucher) (bool, error)
wasVoucherSubmitted returns true if the voucher has been submitted
type DagstoreInitializeAllEvent ¶
type DagstoreInitializeAllEvent struct { Key string Event string // "start", "end" Success bool Error string Total int Current int }
DagstoreInitializeAllEvent represents an initialization event.
type DagstoreShardInfo ¶
DagstoreShardInfo is the serialized form of dagstore.DagstoreShardInfo that we expose through JSON-RPC to avoid clients having to depend on the dagstore lib.
type DagstoreShardResult ¶
DagstoreShardResult enumerates results per shard.
type DataTransferChannel ¶
type DataTransferChannel struct { TransferID datatransfer.TransferID Status datatransfer.Status BaseCID cid.Cid IsInitiator bool IsSender bool Voucher string Message string OtherPeer peer.ID Transferred uint64 Stages *datatransfer.ChannelStages }
func NewDataTransferChannel ¶
func NewDataTransferChannel(hostID peer.ID, channelState datatransfer.ChannelState) DataTransferChannel
NewDataTransferChannel constructs an API DataTransferChannel type from full channel state snapshot and a host id
type DealInfo ¶
type DealInfo struct { piecestore.DealInfo market.ClientDealProposal TransferType string Root cid.Cid PublishCid cid.Cid FastRetrieval bool Status string }
type DealInfoIncludePath ¶
type DealInfoIncludePath struct { Offset abi.PaddedPieceSize Length abi.PaddedPieceSize PayloadSize abi.UnpaddedPieceSize DealID abi.DealID TotalStorageFee abi.TokenAmount market7.DealProposal FastRetrieval bool PublishCid cid.Cid }
type DealSchedule ¶
type DealSchedule struct { StartEpoch abi.ChainEpoch EndEpoch abi.ChainEpoch }
DealSchedule communicates the time interval of a piecestorage deal. The deal must appear in a sealed (proven) sector no later than StartEpoch, otherwise it is invalid.
type FundedAddressState ¶
type FundedAddressState struct { Addr address.Address // AmtReserved is the amount that must be kept in the address (cannot be // withdrawn) AmtReserved abi.TokenAmount // MsgCid is the cid of an in-progress on-chain message MsgCid *cid.Cid }
FundedAddressState keeps track of the state of an address with funds in the datastore
func (*FundedAddressState) MarshalCBOR ¶
func (t *FundedAddressState) MarshalCBOR(w io.Writer) error
func (*FundedAddressState) UnmarshalCBOR ¶
func (t *FundedAddressState) UnmarshalCBOR(r io.Reader) error
type GetDealSpec ¶
type MinerAddress ¶
type MinerAddress = address.Address
type MinerDeal ¶
type MinerDeal struct { market.ClientDealProposal ProposalCid cid.Cid AddFundsCid *cid.Cid PublishCid *cid.Cid Miner peer.ID Client peer.ID State storagemarket.StorageDealStatus PiecePath filestore.Path PayloadSize abi.UnpaddedPieceSize MetadataPath filestore.Path SlashEpoch abi.ChainEpoch FastRetrieval bool Message string FundsReserved abi.TokenAmount Ref *storagemarket.DataRef AvailableForRetrieval bool DealID abi.DealID CreationTime cbg.CborTime TransferChannelID *datatransfer.ChannelID `json:"TransferChannelId"` SectorNumber abi.SectorNumber Offset abi.PaddedPieceSize PieceStatus string InboundCAR string }
func (*MinerDeal) FilMarketMinerDeal ¶
func (deal *MinerDeal) FilMarketMinerDeal() *storagemarket.MinerDeal
type MsgInfo ¶
type MsgInfo struct { // ChannelID links the message to a channel ChannelID string // MsgCid is the CID of the message MsgCid cid.Cid // Received indicates whether a response has been received Received bool // Err is the error received in the response Err string }
MsgInfo stores information about a create channel / add funds message that has been sent
type PendingDealInfo ¶
type PendingDealInfo struct { Deals []market.ClientDealProposal PublishPeriodStart time.Time PublishPeriod time.Duration }
PendingDealInfo has info about pending deals and when they are due to be published
type PieceDealInfo ¶
type PieceDealInfo struct { PublishCid *cid.Cid DealID abi.DealID DealProposal *market7.DealProposal DealSchedule DealSchedule KeepUnsealed bool }
DealInfo is a tuple of deal identity and its schedule
type ProviderDealState ¶
type ProviderDealState struct { retrievalmarket.DealProposal StoreID uint64 SelStorageProposalCid cid.Cid ChannelID *datatransfer.ChannelID Status retrievalmarket.DealStatus Receiver peer.ID TotalSent uint64 FundsReceived abi.TokenAmount Message string CurrentInterval uint64 LegacyProtocol bool }
ProviderDealState is the current state of a deal from the point of view of a retrieval provider
func (ProviderDealState) Identifier ¶
func (deal ProviderDealState) Identifier() retrievalmarket.ProviderDealIdentifier
Identifier provides a unique id for this provider deal
func (*ProviderDealState) IntervalLowerBound ¶
func (deal *ProviderDealState) IntervalLowerBound() uint64
func (*ProviderDealState) MarshalCBOR ¶
func (t *ProviderDealState) MarshalCBOR(w io.Writer) error
func (*ProviderDealState) NextInterval ¶
func (deal *ProviderDealState) NextInterval() uint64
func (*ProviderDealState) TotalPaidFor ¶
func (deal *ProviderDealState) TotalPaidFor() uint64
func (*ProviderDealState) UnmarshalCBOR ¶
func (t *ProviderDealState) UnmarshalCBOR(r io.Reader) error
type RetrievalAsk ¶
type RetrievalAsk struct { Miner address.Address PricePerByte abi.TokenAmount UnsealPrice abi.TokenAmount PaymentInterval uint64 PaymentIntervalIncrease uint64 }
func (*RetrievalAsk) MarshalCBOR ¶
func (t *RetrievalAsk) MarshalCBOR(w io.Writer) error
func (*RetrievalAsk) UnmarshalCBOR ¶
func (t *RetrievalAsk) UnmarshalCBOR(r io.Reader) error
type SealSeed ¶
type SealSeed struct { Value abi.InteractiveSealRandomness Epoch abi.ChainEpoch }
type SealTicket ¶
type SealTicket struct { Value abi.SealRandomness Epoch abi.ChainEpoch }
type SealedRef ¶
type SealedRef struct { SectorID abi.SectorNumber Offset abi.PaddedPieceSize Size abi.UnpaddedPieceSize }
type SealedRefs ¶
type SealedRefs struct {
Refs []SealedRef
}
type SectorInfo ¶
type SectorInfo struct { SectorID abi.SectorNumber State SectorState CommD *cid.Cid CommR *cid.Cid Proof []byte Deals []abi.DealID Ticket SealTicket Seed SealSeed PreCommitMsg *cid.Cid CommitMsg *cid.Cid Retries uint64 ToUpgrade bool LastErr string Log []SectorLog // On Chain Info SealProof abi.RegisteredSealProof // The seal proof type implies the PoSt proof/s Activation abi.ChainEpoch // Epoch during which the sector proof was accepted Expiration abi.ChainEpoch // Epoch during which the sector expires DealWeight abi.DealWeight // Integral of active deals over sector lifetime VerifiedDealWeight abi.DealWeight // Integral of active verified deals over sector lifetime InitialPledge abi.TokenAmount // Pledge collected to commit this sector // Expiration Info OnTime abi.ChainEpoch // non-zero if sector is faulty, epoch at which it will be permanently // removed if it doesn't recover Early abi.ChainEpoch }
type SectorOffset ¶
type SectorOffset struct { Sector abi.SectorNumber Offset abi.PaddedPieceSize }
type SectorSize ¶
type SectorSize = abi.SectorSize
type SectorState ¶
type SectorState string
type VoucherInfo ¶
type VoucherInfo struct { Voucher *paych.SignedVoucher Proof []byte // ignored Submitted bool }
func (*VoucherInfo) MarshalCBOR ¶
func (t *VoucherInfo) MarshalCBOR(w io.Writer) error
func (*VoucherInfo) UnmarshalCBOR ¶
func (t *VoucherInfo) UnmarshalCBOR(r io.Reader) error
type VoucherInfos ¶
type VoucherInfos []*VoucherInfo
func (*VoucherInfos) Scan ¶
func (info *VoucherInfos) Scan(value interface{}) error