auction

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2021 License: MIT Imports: 9 Imported by: 13

Documentation

Index

Constants

View Source
const (

	// MinDealDuration is the minimum allowed deal duration in epochs requested of miners.
	MinDealDuration = epochsPerDay * 365 / 2 // ~6 months
	// MaxDealDuration is the maximum allowed deal duration in epochs requested of miners.
	MaxDealDuration = epochsPerDay * 510 // As far as we know, is the safest max duration that all miners accept.
)
View Source
const AuctionTopic string = "/textile/auction/0.0.1"

AuctionTopic is used by brokers to publish and by miners to subscribe to deal auction.

Variables

This section is empty.

Functions

func BidsTopic

func BidsTopic(auctionID AuctionID) string

BidsTopic is used by miners to submit deal auction bids. "/textile/auction/0.0.1/<auction_id>/bids".

func ProposalsTopic

func ProposalsTopic(pid peer.ID) string

ProposalsTopic is used by brokers to notify a bidbot of the proposal cid.Cid for an accepted deal auction. "/textile/auction/0.0.1/<peer_id>/proposals".

func WinsTopic

func WinsTopic(pid peer.ID) string

WinsTopic is used by brokers to notify a bidbot that it has won the deal auction. "/textile/auction/0.0.1/<peer_id>/wins".

Types

type AuctionID

type AuctionID string

AuctionID is a unique identifier for an Auction.

type Bid

type Bid struct {
	MinerAddr        string
	WalletAddrSig    []byte
	BidderID         peer.ID
	AskPrice         int64 // attoFIL per GiB per epoch
	VerifiedAskPrice int64 // attoFIL per GiB per epoch
	StartEpoch       uint64
	FastRetrieval    bool
	ReceivedAt       time.Time
}

Bid defines the core bid model.

type BidID

type BidID string

BidID is a unique identifier for a Bid.

type CARIPFS

type CARIPFS struct {
	Cid        cid.Cid
	Multiaddrs []multiaddr.Multiaddr
}

CARIPFS contains details of a CAR file Cid stored in an HTTP endpoint.

type CARURL

type CARURL struct {
	URL url.URL
}

CARURL contains details of a CAR file stored in an HTTP endpoint.

type Sources

type Sources struct {
	CARURL  *CARURL
	CARIPFS *CARIPFS
}

Sources contains information about download sources for prepared data.

func (Sources) String

func (s Sources) String() string

String returns the string representation of the sources.

func (Sources) Validate

func (s Sources) Validate() error

Validate ensures Sources are valid.

type WinningBid

type WinningBid struct {
	BidderID                peer.ID
	Acknowledged            bool // Whether or not the bidder acknowledged receipt of the win
	ProposalCid             cid.Cid
	ProposalCidAcknowledged bool // Whether or not the bidder acknowledged receipt of the proposal Cid
}

WinningBid contains details about a winning bid.

Jump to

Keyboard shortcuts

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