proposal110

package
v0.2.47 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2023 License: Apache-2.0, MIT Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// TTGraphsync means data for a deal will be transferred by graphsync
	TTGraphsync = "graphsync"

	// TTManual means data for a deal will be transferred manually and imported
	// on the provider
	TTManual = "manual"
)
View Source
const DealMaxLabelSize = 256

Variables

View Source
var EmptyDealLabel = DealLabel{}

Functions

This section is empty.

Types

type ClientDealProposal

type ClientDealProposal struct {
	Proposal        DealProposal
	ClientSignature crypto.Signature
}

func (*ClientDealProposal) MarshalCBOR

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

func (*ClientDealProposal) UnmarshalCBOR

func (t *ClientDealProposal) UnmarshalCBOR(r io.Reader) error

type DataRef

type DataRef struct {
	TransferType string
	Root         cid.Cid

	PieceCid     *cid.Cid              // Optional for non-manual transfer, will be recomputed from the data if not given
	PieceSize    abi.UnpaddedPieceSize // Optional for non-manual transfer, will be recomputed from the data if not given
	RawBlockSize uint64                // Optional: used as the denominator when calculating transfer %
}

DataRef is a reference for how data will be transferred for a given storage deal

func (*DataRef) MarshalCBOR

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

func (*DataRef) UnmarshalCBOR

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

type DealLabel

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

func NewLabelFromString

func NewLabelFromString(s string) (DealLabel, error)

func (DealLabel) IsString

func (label DealLabel) IsString() bool

func (*DealLabel) MarshalCBOR

func (label *DealLabel) MarshalCBOR(w io.Writer) error

func (*DealLabel) UnmarshalCBOR

func (label *DealLabel) UnmarshalCBOR(br io.Reader) error

type DealProposal

type DealProposal struct {
	PieceCID     cid.Cid `checked:"true"` // Checked in validateDeal, CommP
	PieceSize    abi.PaddedPieceSize
	VerifiedDeal bool
	Client       addr.Address
	Provider     addr.Address

	// Label is an arbitrary client chosen label to apply to the deal
	Label DealLabel

	// Nominal start epoch. Deal payment is linear between StartEpoch and EndEpoch,
	// with total amount StoragePricePerEpoch * (EndEpoch - StartEpoch).
	// Storage deal must appear in a sealed (proven) sector no later than StartEpoch,
	// otherwise it is invalid.
	StartEpoch           abi.ChainEpoch
	EndEpoch             abi.ChainEpoch
	StoragePricePerEpoch abi.TokenAmount

	ProviderCollateral abi.TokenAmount
	ClientCollateral   abi.TokenAmount
}

func (*DealProposal) MarshalCBOR

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

func (*DealProposal) UnmarshalCBOR

func (t *DealProposal) UnmarshalCBOR(r io.Reader) error

type Proposal

type Proposal struct {
	DealProposal  *ClientDealProposal
	Piece         *DataRef
	FastRetrieval bool
}

Proposal is the data sent over the network from client to provider when proposing a deal

func (*Proposal) MarshalCBOR

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

func (*Proposal) UnmarshalCBOR

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

type Response

type Response struct {
	State StorageDealStatus

	// DealProposalRejected
	Message  string
	Proposal cid.Cid

	// StorageDealProposalAccepted
	PublishMessage *cid.Cid
}

func (*Response) MarshalCBOR

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

func (*Response) UnmarshalCBOR

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

type SignedResponse

type SignedResponse struct {
	Response Response

	Signature *crypto.Signature
}

func (*SignedResponse) MarshalCBOR

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

func (*SignedResponse) UnmarshalCBOR

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

type StorageDealStatus

type StorageDealStatus = uint64

Jump to

Keyboard shortcuts

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