webrpc

package
v1.27.2 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2025 License: Apache-2.0, MIT Imports: 79 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Routes

func Routes(r *mux.Router, deps *deps.Deps, debug bool)

Types

type ActorDeadline added in v1.23.0

type ActorDeadline struct {
	Empty      bool
	Current    bool
	Proven     bool
	PartFaulty bool
	Faulty     bool
	Count      *DeadlineCount
}

type ActorDetail added in v1.24.4

type ActorDetail struct {
	Summary                ActorSummary
	OwnerAddress           string
	Beneficiary            string
	WorkerAddress          string
	WorkerBalance          string
	PeerID                 string
	Address                []string
	SectorSize             abi.SectorSize
	PendingOwnerAddress    *string
	BeneficiaryTerm        *BeneficiaryTerm
	PendingBeneficiaryTerm *PendingBeneficiaryChange
	Wallets                []WalletInfo
}

type ActorSummary added in v1.23.0

type ActorSummary struct {
	Address string
	CLayers []string

	QualityAdjustedPower string
	RawBytePower         string

	ActorBalance, ActorAvailable, VestingFunds, InitialPledgeRequirement, PreCommitDeposits string

	Win1, Win7, Win30 int64

	Deadlines []ActorDeadline
}

type AddrInfo added in v1.24.3

type AddrInfo struct {
	ID    string   `json:"ID"`
	Addrs []string `json:"Addrs"`
}
type Advertisement struct {
	Slash string `json:"/"`
}

type AllowDeny added in v1.24.3

type AllowDeny struct {
	Wallet string `db:"wallet" json:"wallet"`
	Status bool   `db:"status" json:"status"`
}

type BalanceMgrRule added in v1.26.0

type BalanceMgrRule struct {
	ID              int64   `json:"id"`
	SubjectAddress  string  `json:"subject_address"`
	SecondAddress   string  `json:"second_address"`
	ActionType      string  `json:"action_type"`
	SubjectType     string  `json:"subject_type"`
	LowWatermark    string  `json:"low_watermark"`
	HighWatermark   string  `json:"high_watermark"`
	TaskID          *int64  `json:"task_id,omitempty"`
	LastMsgCID      *string `json:"last_msg_cid,omitempty"`
	LastMsgSentAt   *string `json:"last_msg_sent_at,omitempty"`
	LastMsgLandedAt *string `json:"last_msg_landed_at,omitempty"`
}

BalanceMgrRule represents a balance manager rule with display-friendly fields. Watermark values are returned as short FIL strings (e.g. "0.25 FIL"). Nullable DB fields are returned as pointers so JSON omits them when nil. Time values are formatted on the JS side – we simply expose RFC3339 strings.

NOTE: Any new columns that should be exposed can be trivially added here.

type BeneficiaryTerm added in v1.24.4

type BeneficiaryTerm struct {
	Quota      string
	UsedQuota  string
	Expiration abi.ChainEpoch
}

type ClientFilter added in v1.24.3

type ClientFilter struct {
	Name   string `db:"name" json:"name"`
	Active bool   `db:"active" json:"active"`

	Wallets []string `db:"wallets" json:"wallets"`
	Peers   []string `db:"peer_ids" json:"peers"`

	PricingFilters []string `db:"pricing_filters" json:"pricing_filters"`

	MaxDealsPerHour    int64 `db:"max_deals_per_hour" json:"max_deals_per_hour"`
	MaxDealSizePerHour int64 `db:"max_deal_size_per_hour" json:"max_deal_size_per_hour"`

	Info string `db:"additional_info" json:"info"`
}

type ClientMessage added in v1.26.0

type ClientMessage struct {
	StartedAt   time.Time  `json:"started_at"`
	SignedCID   string     `json:"signed_cid"`
	Wallet      int64      `json:"wallet"`
	Action      string     `json:"action"`
	Success     *bool      `json:"success,omitempty"`
	CompletedAt *time.Time `json:"completed_at,omitempty"`

	Address address.Address `json:"address" db:"-"`
}

Define a struct to represent a client message.

type ContentInfo added in v1.27.2

type ContentInfo struct {
	PieceCID string `json:"piece_cid"`
	Offset   uint64 `json:"offset"`
	Size     uint64 `json:"size"`

	Err string `json:"err"`
}

ContentInfo represents information about content location

type DeadlineCount added in v1.24.4

type DeadlineCount struct {
	Total      uint64
	Active     uint64
	Live       uint64
	Fault      uint64
	Recovering uint64
}

type DeadlineDetail added in v1.27.2

type DeadlineDetail struct {
	SpID                 int64                   `json:"sp_id"`
	SPAddress            string                  `json:"sp_address"`
	Deadline             uint64                  `json:"deadline"`
	PostSubmissions      string                  `json:"post_submissions"`
	DisputableProofCount uint64                  `json:"disputable_proof_count"`
	Partitions           []DeadlinePartitionInfo `json:"partitions"`
}

type DeadlinePartitionInfo added in v1.27.2

type DeadlinePartitionInfo struct {
	Partition         uint64 `json:"partition"`
	AllSectors        uint64 `json:"all_sectors"`
	FaultySectors     uint64 `json:"faulty_sectors"`
	RecoveringSectors uint64 `json:"recovering_sectors"`
	LiveSectors       uint64 `json:"live_sectors"`
	ActiveSectors     uint64 `json:"active_sectors"`
}

type DeadlineStats added in v1.27.2

type DeadlineStats struct {
	SpID              int64  `json:"sp_id"`
	SPAddress         string `json:"sp_address"`
	Deadline          int64  `json:"deadline"`
	Count             int64  `json:"count"`
	AllSectors        int64  `json:"all_sectors"`
	FaultySectors     int64  `json:"faulty_sectors"`
	RecoveringSectors int64  `json:"recovering_sectors"`
	LiveSectors       int64  `json:"live_sectors"`
	ActiveSectors     int64  `json:"active_sectors"`
	PostSubmissions   string `json:"post_submissions"`
}

type DefaultFilterBehaviourResponse added in v1.25.0

type DefaultFilterBehaviourResponse struct {
	AllowDealsFromUnknownClients             bool            `json:"allow_deals_from_unknown_clients"`
	IsDealRejectedWhenCidGravityNotReachable bool            `json:"is_deal_rejected_when_cid_gravity_not_reachable"`
	IsCidGravityEnabled                      map[string]bool `json:"cid_gravity_status"`
}

type EntryInfo added in v1.24.3

type EntryInfo struct {
	PieceCID string `db:"piece_cid"`
	FromCar  bool   `db:"from_car"`

	FirstCID    NullString `db:"first_cid"`
	StartOffset NullInt64  `db:"start_offset"`
	NumBlocks   int64      `db:"num_blocks"`

	PrevCID NullString `db:"prev_cid"`

	Err  *string
	Size int64
}

type FSPDPOffering added in v1.27.2

type FSPDPOffering struct {
	ServiceURL                 string `json:"service_url"`
	MinPieceSizeInBytes        int64  `json:"min_size"`
	MaxPieceSizeInBytes        int64  `json:"max_size"`
	IpniPiece                  bool   `json:"ipni_piece"`
	IpniIpfs                   bool   `json:"ipni_ipfs"`
	StoragePricePerTibPerMonth int64  `json:"price"`
	MinProvingPeriodInEpochs   int64  `json:"min_proving_period"`
	Location                   string `json:"location"`
}

type FSRegistryStatus added in v1.27.2

type FSRegistryStatus struct {
	Address      string            `json:"address"`
	ID           int64             `json:"id"`
	Active       bool              `json:"status"`
	Name         string            `json:"name"`
	Description  string            `json:"description"`
	Payee        string            `json:"payee"`
	PDPService   *FSPDPOffering    `json:"pdp_service"`
	Capabilities map[string]string `json:"capabilities"`
}

type FileLocations added in v1.23.0

type FileLocations struct {
	StorageID string
	Urls      []string
}

type HarmonyMachineDesc

type HarmonyMachineDesc struct {
	MachineID   int64  `db:"machine_id"`
	Name        string `db:"machine_name"`
	MachineAddr string `db:"host_and_port"`
	Actors      string `db:"miners"`
}

type HarmonyTask added in v1.24.3

type HarmonyTask struct {
	ID         int64      `db:"id"`
	Name       string     `db:"name"`
	UpdateTime time.Time  `db:"update_time"`
	PostedTime time.Time  `db:"posted_time"`
	OwnerID    NullInt64  `db:"owner_id"`
	OwnerAddr  NullString `db:"owner_addr"`
	OwnerName  NullString `db:"owner_name"`
}

HarmonyTask represents the current state of a task.

type HarmonyTaskHistory

type HarmonyTaskHistory struct {
	ID     int64  `db:"id"`
	TaskID int64  `db:"task_id"`
	Name   string `db:"name"`

	WorkStart time.Time `db:"work_start"`
	WorkEnd   time.Time `db:"work_end"`
	Posted    time.Time `db:"posted"`

	Took string `db:"-"`

	Result bool   `db:"result"`
	Err    string `db:"err"`

	CompletedBy     string     `db:"completed_by_host_and_port"`
	CompletedById   NullInt64  `db:"completed_by_machine"`
	CompletedByName NullString `db:"completed_by_machine_name"`

	Events []*SectorEvent `db:"-"`
}

type HarmonyTaskStats

type HarmonyTaskStats struct {
	Name       string `db:"name"`
	TrueCount  int    `db:"true_count"`
	FalseCount int    `db:"false_count"`
	TotalCount int    `db:"total_count"`
}

type IPNI added in v1.24.3

type IPNI struct {
	SpId       int64            `db:"sp_id" json:"sp_id"`
	PeerID     string           `db:"peer_id" json:"peer_id"`
	Head       string           `db:"head" json:"head"`
	Miner      string           `json:"miner"`
	SyncStatus []IpniSyncStatus `json:"sync_status"`
}

type IpniAd added in v1.24.3

type IpniAd struct {
	AdCid           string     `db:"ad_cid" json:"ad_cid"`
	ContextID       []byte     `db:"context_id" json:"context_id"`
	IsRM            bool       `db:"is_rm" json:"is_rm"`
	IsSkip          bool       `db:"is_skip" json:"is_skip"`
	PreviousAd      NullString `db:"previous"`
	Previous        string     `json:"previous"`
	SpID            int64      `db:"sp_id" json:"sp_id"`
	Addresses       NullString `db:"addresses"`
	AddressesString string     `json:"addresses"`
	Entries         string     `db:"entries" json:"entries"`
	PieceCid        string     `json:"piece_cid"`
	PieceSize       int64      `json:"piece_size"`
	Miner           string     `json:"miner"`

	EntryCount int64 `json:"entry_count"`
	CIDCount   int64 `json:"cid_count"`

	AdCids     []string `db:"-" json:"ad_cids"`
	PieceCidV2 string   `db:"-" json:"piece_cid_v2"`
}

type IpniSyncStatus added in v1.24.3

type IpniSyncStatus struct {
	Service               string    `json:"service"`
	RemoteAd              string    `json:"remote_ad"`
	PublisherAddress      string    `json:"publisher_address"`
	Address               string    `json:"address"`
	LastAdvertisementTime time.Time `json:"last_advertisement_time"`
	Error                 string    `json:"error"`
}

type LocationTable added in v1.23.0

type LocationTable struct {
	PathType        *string
	PathTypeRowSpan int

	FileType        *string
	FileTypeRowSpan int

	Locations []FileLocations
}

type MK12Deal added in v1.24.3

type MK12Deal struct {
	UUID              string          `db:"uuid" json:"uuid"`
	SpId              int64           `db:"sp_id" json:"sp_id"`
	CreatedAt         time.Time       `db:"created_at" json:"created_at"`
	SignedProposalCid string          `db:"signed_proposal_cid" json:"signed_proposal_cid"`
	ProposalSignature []byte          `db:"proposal_signature" json:"proposal_signature"`
	Proposal          json.RawMessage `db:"proposal" json:"proposal"`
	ProposalCid       string          `db:"proposal_cid" json:"proposal_cid"`
	Offline           bool            `db:"offline" json:"offline"`
	Verified          bool            `db:"verified" json:"verified"`
	StartEpoch        int64           `db:"start_epoch" json:"start_epoch"`
	EndEpoch          int64           `db:"end_epoch" json:"end_epoch"`
	ClientPeerId      string          `db:"client_peer_id" json:"client_peer_id"`
	ChainDealId       sql.NullInt64   `db:"chain_deal_id" json:"chain_deal_id"`
	PublishCid        sql.NullString  `db:"publish_cid" json:"publish_cid"`
	PieceCid          string          `db:"piece_cid" json:"piece_cid"`
	PieceSize         int64           `db:"piece_size" json:"piece_size"`
	FastRetrieval     bool            `db:"fast_retrieval" json:"fast_retrieval"`
	AnnounceToIPNI    bool            `db:"announce_to_ipni" json:"announce_to_ipni"`
	URL               sql.NullString  `db:"url" json:"url"`
	URLHeaders        json.RawMessage `db:"url_headers" json:"url_headers"`
	Error             sql.NullString  `db:"error" json:"error"`
	IsDDO             bool            `db:"is_ddo" json:"is_ddo"`

	Addr string `db:"-" json:"addr"`
}

MK12Deal represents a record from market_mk12_deals or market_direct_deals table

type MK12DealPipeline added in v1.24.3

type MK12DealPipeline struct {
	UUID              string          `db:"uuid" json:"uuid"`
	SpId              int64           `db:"sp_id" json:"sp_id"`
	Started           sql.NullBool    `db:"started" json:"started"`
	PieceCid          string          `db:"piece_cid" json:"piece_cid"`
	PieceSize         int64           `db:"piece_size" json:"piece_size"`
	RawSize           sql.NullInt64   `db:"raw_size" json:"raw_size"`
	Offline           bool            `db:"offline" json:"offline"`
	URL               sql.NullString  `db:"url" json:"url"`
	Headers           json.RawMessage `db:"headers" json:"headers"`
	CommpTaskId       sql.NullInt64   `db:"commp_task_id" json:"commp_task_id"`
	AfterCommp        sql.NullBool    `db:"after_commp" json:"after_commp"`
	PsdTaskId         sql.NullInt64   `db:"psd_task_id" json:"psd_task_id"`
	AfterPsd          sql.NullBool    `db:"after_psd" json:"after_psd"`
	PsdWaitTime       sql.NullTime    `db:"psd_wait_time" json:"psd_wait_time"`
	FindDealTaskId    sql.NullInt64   `db:"find_deal_task_id" json:"find_deal_task_id"`
	AfterFindDeal     sql.NullBool    `db:"after_find_deal" json:"after_find_deal"`
	Sector            sql.NullInt64   `db:"sector" json:"sector"`
	RegSealProof      sql.NullInt64   `db:"reg_seal_proof" json:"reg_seal_proof"`
	SectorOffset      sql.NullInt64   `db:"sector_offset" json:"sector_offset"`
	Sealed            sql.NullBool    `db:"sealed" json:"sealed"`
	ShouldIndex       sql.NullBool    `db:"should_index" json:"should_index"`
	IndexingCreatedAt sql.NullTime    `db:"indexing_created_at" json:"indexing_created_at"`
	IndexingTaskId    sql.NullInt64   `db:"indexing_task_id" json:"indexing_task_id"`
	Indexed           sql.NullBool    `db:"indexed" json:"indexed"`
	Announce          sql.NullBool    `db:"announce" json:"announce"`
	Complete          bool            `db:"complete" json:"complete"`
	CreatedAt         time.Time       `db:"created_at" json:"created_at"`
}

MK12DealPipeline represents a record from market_mk12_deal_pipeline table

type MK12Pipeline added in v1.24.3

type MK12Pipeline struct {
	// Cache line 1 (bytes 0-64): Hot path - piece identification and early checks
	UUID      string `db:"uuid" json:"uuid"`             // 16 bytes (0-16)
	SpID      int64  `db:"sp_id" json:"sp_id"`           // 8 bytes (16-24)
	PieceCid  string `db:"piece_cid" json:"piece_cid"`   // 16 bytes (24-40)
	PieceSize int64  `db:"piece_size" json:"piece_size"` // 8 bytes (40-48)
	Offline   bool   `db:"offline" json:"offline"`       // 1 byte (48-49) - checked early for download decisions
	Started   bool   `db:"started" json:"started"`       // 1 byte (49-50) - checked early
	// Cache line 2 (bytes 64-128): Task IDs and stage tracking (NullInt64 = 16 bytes)
	CommTaskID     sql.NullInt64 `db:"commp_task_id" json:"commp_task_id"`         // 16 bytes
	PSDTaskID      sql.NullInt64 `db:"psd_task_id" json:"psd_task_id"`             // 16 bytes
	FindDealTaskID sql.NullInt64 `db:"find_deal_task_id" json:"find_deal_task_id"` // 16 bytes
	AfterCommp     bool          `db:"after_commp" json:"after_commp"`             // 1 byte
	AfterPSD       bool          `db:"after_psd" json:"after_psd"`                 // 1 byte
	AfterFindDeal  bool          `db:"after_find_deal" json:"after_find_deal"`     // 1 byte
	// Cache line 3 (bytes 128-192): Sector placement and sizing (NullInt64 = 16 bytes)
	RawSize sql.NullInt64 `db:"raw_size" json:"raw_size"`           // 16 bytes
	Sector  sql.NullInt64 `db:"sector" json:"sector"`               // 16 bytes
	Offset  sql.NullInt64 `db:"sector_offset" json:"sector_offset"` // 16 bytes
	// Cache line 4 (bytes 192-256): Timing information
	PSDWaitTime sql.NullTime `db:"psd_wait_time" json:"psd_wait_time"` // 32 bytes (NullTime)
	CreatedAt   time.Time    `db:"created_at" json:"created_at"`       // 24 bytes
	// Cache line 5+ (bytes 256+): Data URL and larger fields (NullString = 24 bytes)
	URL        sql.NullString `db:"url" json:"url"`         // 24 bytes - only for online deals
	PieceCidV2 string         `db:"-" json:"piece_cid_v2"`  // 16 bytes - computed field
	Miner      string         `json:"miner"`                // 16 bytes - display field
	Headers    []byte         `db:"headers" json:"headers"` // 24 bytes - only for online deals
	// Status bools: rarely checked ones at end
	Indexed  bool `db:"indexed" json:"indexed"`   // checked for indexing
	Announce bool `db:"announce" json:"announce"` // checked for IPNI announce
	Complete bool `db:"complete" json:"complete"` // checked for completion
}

type MK12PipelineFailedStats added in v1.27.2

type MK12PipelineFailedStats struct {
	DownloadingFailed int64
	CommPFailed       int64
	PSDFailed         int64
	FindDealFailed    int64
	IndexFailed       int64
}

type MK20DDOPipeline added in v1.27.2

type MK20DDOPipeline struct {
	ID               string         `db:"id" json:"id"`
	SpId             int64          `db:"sp_id" json:"sp_id"`
	Contract         string         `db:"contract" json:"contract"`
	Client           string         `db:"client" json:"client"`
	PieceCidV2       string         `db:"piece_cid_v2" json:"piece_cid_v2"`
	PieceCid         string         `db:"piece_cid" json:"piece_cid"`
	PieceSize        int64          `db:"piece_size" json:"piece_size"`
	RawSize          uint64         `db:"raw_size" json:"raw_size"`
	Offline          bool           `db:"offline" json:"offline"`
	URL              sql.NullString `db:"url" json:"url"`
	Indexing         bool           `db:"indexing" json:"indexing"`
	Announce         bool           `db:"announce" json:"announce"`
	AllocationID     sql.NullInt64  `db:"allocation_id" json:"allocation_id"`
	Duration         int64          `db:"duration" json:"duration"`
	PieceAggregation int            `db:"piece_aggregation" json:"piece_aggregation"`

	Started    bool `db:"started" json:"started"`
	Downloaded bool `db:"downloaded" json:"downloaded"`

	CommpTaskId sql.NullInt64 `db:"commp_task_id" json:"commp_task_id"`
	AfterCommp  bool          `db:"after_commp" json:"after_commp"`

	DealAggregation   int           `db:"deal_aggregation" json:"deal_aggregation"`
	AggregationIndex  int64         `db:"aggr_index" json:"aggr_index"`
	AggregationTaskID sql.NullInt64 `db:"agg_task_id" json:"agg_task_id"`
	Aggregated        bool          `db:"aggregated" json:"aggregated"`

	Sector       sql.NullInt64 `db:"sector" json:"sector"`
	RegSealProof sql.NullInt64 `db:"reg_seal_proof" json:"reg_seal_proof"`
	SectorOffset sql.NullInt64 `db:"sector_offset" json:"sector_offset"`
	Sealed       bool          `db:"sealed" json:"sealed"`

	IndexingCreatedAt sql.NullTime  `db:"indexing_created_at" json:"indexing_created_at"`
	IndexingTaskId    sql.NullInt64 `db:"indexing_task_id" json:"indexing_task_id"`
	Indexed           bool          `db:"indexed" json:"indexed"`

	Complete  bool      `db:"complete" json:"complete"`
	CreatedAt time.Time `db:"created_at" json:"created_at"`

	Miner string `db:"-" json:"miner"`
}

MK20DealPipeline represents a record from market_mk20_ddo_pipeline table

type MK20PDPDealList added in v1.27.2

type MK20PDPDealList struct {
	ID         string     `db:"id" json:"id"`
	CreatedAt  time.Time  `db:"created_at" json:"created_at"`
	PieceCidV2 NullString `db:"piece_cid_v2" json:"piece_cid_v2"`
	Processed  bool       `db:"processed" json:"processed"`
	Error      NullString `db:"error" json:"error"`
}

type MK20PDPPipeline added in v1.27.2

type MK20PDPPipeline struct {
	ID              string `db:"id" json:"id"`
	Client          string `db:"client" json:"client"`
	PieceCidV2      string `db:"piece_cid_v2" json:"piece_cid_v2"`
	Indexing        bool   `db:"indexing" json:"indexing"`
	Announce        bool   `db:"announce" json:"announce"`
	AnnouncePayload bool   `db:"announce_payload" json:"announce_payload"`

	Downloaded bool `db:"downloaded" json:"downloaded"`

	CommpTaskId NullInt64 `db:"commp_task_id" json:"commp_task_id"`
	AfterCommp  bool      `db:"after_commp" json:"after_commp"`

	DealAggregation   int       `db:"deal_aggregation" json:"deal_aggregation"`
	AggregationIndex  int64     `db:"aggr_index" json:"aggr_index"`
	AggregationTaskID NullInt64 `db:"agg_task_id" json:"agg_task_id"`
	Aggregated        bool      `db:"aggregated" json:"aggregated"`

	AddPieceTaskID NullInt64 `db:"add_piece_task_id" json:"add_piece_task_id"`
	AfterAddPiece  bool      `db:"after_add_piece" json:"after_add_piece"`

	AfterAddPieceMsg bool `db:"after_add_piece_msg" json:"after_add_piece_msg"`

	SaveCacheTaskID NullInt64 `db:"save_cache_task_id" json:"save_cache_task_id"`
	AfterSaveCache  bool      `db:"after_save_cache" json:"after_save_cache"`

	IndexingCreatedAt NullTime  `db:"indexing_created_at" json:"indexing_created_at"`
	IndexingTaskId    NullInt64 `db:"indexing_task_id" json:"indexing_task_id"`
	Indexed           bool      `db:"indexed" json:"indexed"`

	Complete  bool      `db:"complete" json:"complete"`
	CreatedAt time.Time `db:"created_at" json:"created_at"`

	Miner string `db:"-" json:"miner"`
}

MK20PDPPipeline represents a record from market_mk20_PDP_pipeline table

type MK20PDPPipelineFailedStats added in v1.27.2

type MK20PDPPipelineFailedStats struct {
	DownloadingFailed int64
	CommPFailed       int64
	AggFailed         int64
	AddPieceFailed    int64
	SaveCacheFailed   int64
	IndexFailed       int64
}

type MK20PipelineFailedStats added in v1.27.2

type MK20PipelineFailedStats struct {
	DownloadingFailed int64
	CommPFailed       int64
	AggFailed         int64
	IndexFailed       int64
}

type MK20StorageDeal added in v1.27.2

type MK20StorageDeal struct {
	Deal   *mk20.Deal `json:"deal"`
	DDOErr NullString `json:"ddoerr"`
	PDPErr NullString `json:"pdperr"`
	DDOId  NullInt64  `json:"ddoid"`
}

type MK20StorageDealList added in v1.27.2

type MK20StorageDealList struct {
	ID         string     `db:"id" json:"id"`
	CreatedAt  time.Time  `db:"created_at" json:"created_at"`
	PieceCidV2 NullString `db:"piece_cid_v2" json:"piece_cid_v2"`
	Processed  bool       `db:"processed" json:"processed"`
	Error      NullString `db:"error" json:"error"`
	Miner      NullString `db:"miner" json:"miner"`
}

type MachineInfo added in v1.23.0

type MachineInfo struct {
	Info struct {
		Name           string
		Host           string
		ID             int64
		LastContact    string
		CPU            int64
		Memory         int64
		GPU            float64
		Layers         string
		Unschedulable  bool
		RunningTasks   int
		Tasks          string
		Miners         string
		StartupTime    *time.Time
		RestartRequest *time.Time
	}

	// Storage
	Storage []struct {
		ID            string
		URLs          string
		Weight        int64
		MaxStorage    int64
		CanSeal       bool
		CanStore      bool
		Groups        string
		AllowTo       string
		AllowTypes    string
		DenyTypes     string
		Capacity      int64
		Available     int64
		FSAvailable   int64
		Reserved      int64
		Used          int64
		AllowMiners   string
		DenyMiners    string
		LastHeartbeat time.Time
		HeartbeatErr  *string

		UsedPercent     float64
		ReservedPercent float64
	}

	// Storage URL Liveness
	StorageURLs []struct {
		StorageID      string
		URL            string
		LastChecked    time.Time
		LastLive       *time.Time
		LastDead       *time.Time
		LastDeadReason *string
	}

	// Tasks
	RunningTasks []struct {
		ID           int64
		Task         string
		Posted       string
		UpdateTime   string
		InitiatedBy  *int64
		AddedBy      int64
		PreviousTask *int64
		Retries      int64

		PoRepSector, PoRepSectorSP *int64
		PoRepSectorMiner           string
	}

	FinishedTasks []struct {
		ID      int64
		TaskID  int64
		Task    string
		Posted  string
		Start   string
		End     string
		Queued  string
		Took    string
		Result  bool
		Outcome string
		Message string
	}
}

type MachineSummary added in v1.23.0

type MachineSummary struct {
	Address      string
	ID           int64
	Name         string
	SinceContact string

	Tasks          string
	Cpu            int
	RamHumanized   string
	Gpu            int
	Layers         string
	Uptime         string
	Unschedulable  bool
	RestartRequest string
	Restarting     bool
	RunningTasks   int
}

type MarketBalanceStatus added in v1.24.3

type MarketBalanceStatus struct {
	Miner         string           `json:"miner"`
	MarketBalance string           `json:"market_balance"`
	Balances      []WalletBalances `json:"balances"`
}

type MessageDetail added in v1.24.3

type MessageDetail struct {
	FromKey                 string          `db:"from_key" json:"from_key"`
	ToAddr                  string          `db:"to_addr" json:"to_addr"`
	SendReason              string          `db:"send_reason" json:"send_reason"`
	SendTaskID              int64           `db:"send_task_id" json:"send_task_id"`
	UnsignedData            []byte          `db:"unsigned_data" json:"unsigned_data"`
	UnsignedCID             string          `db:"unsigned_cid" json:"unsigned_cid"`
	Nonce                   NullInt64       `db:"nonce" json:"nonce"`
	SignedData              []byte          `db:"signed_data" json:"signed_data"`
	SignedJSON              json.RawMessage `db:"signed_json" json:"signed_json"`
	SignedCID               string          `db:"signed_cid" json:"signed_cid"`
	SendTime                NullTime        `db:"send_time" json:"send_time"`
	SendSuccess             NullBool        `db:"send_success" json:"send_success"`
	SendError               NullString      `db:"send_error" json:"send_error"`
	WaiterMachineID         NullInt64       `db:"waiter_machine_id" json:"waiter_machine_id"`
	ExecutedTSKCID          NullString      `db:"executed_tsk_cid" json:"executed_tsk_cid"`
	ExecutedTSKEpoch        NullInt64       `db:"executed_tsk_epoch" json:"executed_tsk_epoch"`
	ExecutedMsgCID          NullString      `db:"executed_msg_cid" json:"executed_msg_cid"`
	ExecutedMsgData         json.RawMessage `db:"executed_msg_data" json:"executed_msg_data"`
	ExecutedReceiptExitCode NullInt64       `db:"executed_rcpt_exitcode" json:"executed_rcpt_exitcode"`
	ExecutedReceiptReturn   []byte          `db:"executed_rcpt_return" json:"executed_rcpt_return"`
	ExecutedReceiptGasUsed  NullInt64       `db:"executed_rcpt_gas_used" json:"executed_rcpt_gas_used"`

	ValueStr string `db:"-" json:"value_str"`
	FeeStr   string `db:"-" json:"fee_str"`
}

type NullBool added in v1.27.2

type NullBool sql.NullBool

NullBool mirrors sql.NullBool but marshals to JSON as a bool with false as the zero-value when the DB value is NULL.

func (NullBool) MarshalJSON added in v1.27.2

func (nb NullBool) MarshalJSON() ([]byte, error)

func (*NullBool) Scan added in v1.27.2

func (nb *NullBool) Scan(value any) error

func (NullBool) Value added in v1.27.2

func (nb NullBool) Value() (driver.Value, error)

type NullInt64 added in v1.27.2

type NullInt64 sql.NullInt64

NullInt64 mirrors sql.NullInt64 but marshals to JSON as an int64 with 0 as the zero-value when the DB value is NULL.

func (NullInt64) MarshalJSON added in v1.27.2

func (ni NullInt64) MarshalJSON() ([]byte, error)

func (*NullInt64) Scan added in v1.27.2

func (ni *NullInt64) Scan(value any) error

func (NullInt64) Value added in v1.27.2

func (ni NullInt64) Value() (driver.Value, error)

type NullString added in v1.27.2

type NullString sql.NullString

NullString preserves the convenience of sql.NullString for scanning but marshals to JSON as a plain string, returning "" when the value is invalid.

func (NullString) MarshalJSON added in v1.27.2

func (ns NullString) MarshalJSON() ([]byte, error)

func (*NullString) Scan added in v1.27.2

func (ns *NullString) Scan(value any) error

func (NullString) Value added in v1.27.2

func (ns NullString) Value() (driver.Value, error)

type NullTime added in v1.27.2

type NullTime sql.NullTime

NullTime mirrors sql.NullTime but marshals to JSON as a time.Time, falling back to the zero time when the DB value is NULL.

func (NullTime) MarshalJSON added in v1.27.2

func (nt NullTime) MarshalJSON() ([]byte, error)

func (*NullTime) Scan added in v1.27.2

func (nt *NullTime) Scan(value any) error

func (NullTime) Value added in v1.27.2

func (nt NullTime) Value() (driver.Value, error)

type OpenDealInfo added in v1.23.0

type OpenDealInfo struct {
	Actor        int64     `db:"sp_id"`
	SectorNumber uint64    `db:"sector_number"`
	PieceCID     string    `db:"piece_cid"`
	PieceSize    uint64    `db:"piece_size"`
	RawSize      uint64    `db:"data_raw_size"`
	CreatedAt    time.Time `db:"created_at"`
	SnapDeals    bool      `db:"is_snap"`

	PieceSizeStr string `db:"-"`
	CreatedAtStr string `db:"-"`
	PieceCidV2   string `db:"-"`

	Miner string
}

type PDPOwnerAddress added in v1.25.1

type PDPOwnerAddress struct {
	Address string `db:"address" json:"address"`
}

type PDPService added in v1.25.1

type PDPService struct {
	ID        int64  `db:"id" json:"id"`
	Name      string `db:"service_label" json:"name"`
	PubKey    []byte `db:"pubkey"`   // Stored as bytes in DB, converted to PEM string in JSON
	PubKeyStr string `json:"pubkey"` // PEM string for JSON response
}

PDPService represents a PDP service

type ParkedPieceRef added in v1.24.3

type ParkedPieceRef struct {
	RefID       int64           `db:"ref_id" json:"ref_id"`
	PieceID     int64           `db:"piece_id" json:"piece_id"`
	DataURL     sql.NullString  `db:"data_url" json:"data_url"`
	DataHeaders json.RawMessage `db:"data_headers" json:"data_headers"`
}

type ParkedPieceState added in v1.24.3

type ParkedPieceState struct {
	ID              int64            `db:"id" json:"id"`
	PieceCID        string           `db:"piece_cid" json:"piece_cid"`
	PiecePaddedSize int64            `db:"piece_padded_size" json:"piece_padded_size"`
	PieceRawSize    int64            `db:"piece_raw_size" json:"piece_raw_size"`
	Complete        bool             `db:"complete" json:"complete"`
	CreatedAt       time.Time        `db:"created_at" json:"created_at"`
	TaskID          sql.NullInt64    `db:"task_id" json:"task_id"`
	CleanupTaskID   sql.NullInt64    `db:"cleanup_task_id" json:"cleanup_task_id"`
	Refs            []ParkedPieceRef `json:"refs"`
}

type ParsedResponse added in v1.24.3

type ParsedResponse struct {
	AddrInfo              AddrInfo       `json:"AddrInfo"`
	LastAdvertisement     Advertisement  `json:"LastAdvertisement"`
	LastAdvertisementTime time.Time      `json:"LastAdvertisementTime"`
	Publisher             AddrInfo       `json:"Publisher"`
	ExtendedProviders     map[string]any `json:"ExtendedProviders"`
	FrozenAt              string         `json:"FrozenAt"`
	LastError             string         `json:"LastError"`
}

type PartitionDetail added in v1.27.2

type PartitionDetail struct {
	SpID                   int64                 `json:"sp_id"`
	SPAddress              string                `json:"sp_address"`
	Deadline               uint64                `json:"deadline"`
	Partition              uint64                `json:"partition"`
	AllSectorsCount        uint64                `json:"all_sectors_count"`
	FaultySectorsCount     uint64                `json:"faulty_sectors_count"`
	RecoveringSectorsCount uint64                `json:"recovering_sectors_count"`
	LiveSectorsCount       uint64                `json:"live_sectors_count"`
	ActiveSectorsCount     uint64                `json:"active_sectors_count"`
	Sectors                []PartitionSectorInfo `json:"sectors"`
	FaultyStoragePaths     []StoragePathStat     `json:"faulty_storage_paths"`
}

type PartitionSectorInfo added in v1.27.2

type PartitionSectorInfo struct {
	SectorNumber uint64 `json:"sector_number"`
	IsFaulty     bool   `json:"is_faulty"`
	IsRecovering bool   `json:"is_recovering"`
	IsActive     bool   `json:"is_active"`
	IsLive       bool   `json:"is_live"`
}

type PendingBeneficiaryChange added in v1.24.4

type PendingBeneficiaryChange struct {
	NewBeneficiary        string
	NewQuota              string
	NewExpiration         abi.ChainEpoch
	ApprovedByBeneficiary bool
	ApprovedByNominee     bool
}

type PendingMessage added in v1.25.1

type PendingMessage struct {
	Message string    `json:"message"`
	AddedAt time.Time `json:"added_at"`
}

type PendingMessages added in v1.25.1

type PendingMessages struct {
	Messages []PendingMessage `json:"messages"`
	Total    int              `json:"total"`
}

type PieceDeal added in v1.24.3

type PieceDeal struct {
	// Cache line 1 (0-64 bytes): Hot path - identification fields used together
	ID    string `db:"id" json:"id"`       // 16 bytes - used with SpId (line 621-623)
	SpId  int64  `db:"sp_id" json:"sp_id"` // 8 bytes - checked early (line 614), used with ID (line 617)
	Miner string `json:"miner"`            // 16 bytes - set based on SpId (line 615, 625)
	// Cache line 2: Additional 8-byte types grouped together
	ChainDealId int64 `db:"chain_deal_id" json:"chain_deal_id"` // 8 bytes
	Sector      int64 `db:"sector_num" json:"sector"`           // 8 bytes
	Length      int64 `db:"piece_length" json:"length"`         // 8 bytes
	RawSize     int64 `db:"raw_size" json:"raw_size"`           // 8 bytes
	// NullInt64 (16 bytes)
	Offset NullInt64 `db:"piece_offset" json:"offset"` // 16 bytes
	// Cache line 3 (64+ bytes): Bools grouped together at the end to minimize padding
	MK20       bool `db:"-" json:"mk20"`                  // Used with ID check (line 621-623) - hot path
	BoostDeal  bool `db:"boost_deal" json:"boost_deal"`   // Less frequently accessed
	LegacyDeal bool `db:"legacy_deal" json:"legacy_deal"` // Less frequently accessed
}

type PieceDealDetailEntry added in v1.27.2

type PieceDealDetailEntry struct {
	MK12 []PieceInfoMK12Deals `json:"mk12"`
	MK20 []PieceInfoMK20Deals `json:"mk20"`
}

PieceDealDetailEntry combines a deal and its pipeline

type PieceInfo added in v1.24.3

type PieceInfo struct {
	// Cache line 1 (0-64 bytes): Hot path - piece identification used together
	PieceCidv2 string   `json:"piece_cid_v2"` // 16 bytes - used together with PieceCid (line 584)
	PieceCid   string   `json:"piece_cid"`    // 16 bytes - used with PieceCidv2 (line 584)
	Size       int64    `json:"size"`         // 8 bytes - used with PieceCid (line 587, 604)
	IPNIAd     []string `json:"ipni_ads"`     // 24 bytes - used for results
	// Cache line 2 (64+ bytes): Display
	CreatedAt time.Time `json:"created_at"` // 24 bytes - used for display
	IndexedAT time.Time `json:"indexed_at"` // 24 bytes - used for display
	Indexed   bool      `json:"indexed"`    // Used for display
	// Cache line 3
	Deals []PieceDeal `json:"deals"` // 24 bytes - used for results
}

type PieceInfoMK12Deals added in v1.27.2

type PieceInfoMK12Deals struct {
	Deal     *MK12Deal         `json:"deal"`
	Pipeline *MK12DealPipeline `json:"mk12_pipeline,omitempty"`
}

type PieceInfoMK20Deals added in v1.27.2

type PieceInfoMK20Deals struct {
	Deal        *MK20StorageDeal `json:"deal"`
	DDOPipeline *MK20DDOPipeline `json:"mk20_ddo_pipeline,omitempty"`
	PDPPipeline *MK20PDPPipeline `json:"mk20_pdp_pipeline,omitempty"`
}

type PieceParkRefEntry added in v1.24.3

type PieceParkRefEntry struct {
	TableName    string  `json:"table_name"`
	SpID         int64   `json:"sp_id"`
	SectorNumber *int64  `json:"sector_number,omitempty"`
	PieceIndex   *int64  `json:"piece_index,omitempty"`
	PieceCID     string  `json:"piece_cid"`
	DealUUID     *string `json:"deal_uuid,omitempty"`

	Addr string `json:"addr"`
}

type PieceSummary added in v1.24.3

type PieceSummary struct {
	Total       int64     `db:"total" json:"total"`
	Indexed     int64     `db:"indexed" json:"indexed"`
	Announced   int64     `db:"announced" json:"announced"`
	LastUpdated time.Time `db:"last_updated" json:"last_updated"`
}

type PipelineStage added in v1.24.3

type PipelineStage struct {
	Name    string
	Pending int64
	Running int64
}

type PipelineStats added in v1.24.3

type PipelineStats struct {
	// Total pipeline count
	Total int64

	Stages []PipelineStage
}

type PipelineTask added in v1.23.0

type PipelineTask struct {
	// Cache line 1 (bytes 0-64): Hot path - identification
	SpID         int64     `db:"sp_id"`         // 8 bytes (0-8)
	SectorNumber int64     `db:"sector_number"` // 8 bytes (8-16)
	CreateTime   time.Time `db:"create_time"`   // 24 bytes (16-40)
	Failed       bool      `db:"failed"`        // 1 byte (40-41) - checked early
	// Early stage task IDs (checked together)
	TaskSDR    NullInt64 `db:"task_id_sdr"` // 16 bytes (41-57, with padding)
	AfterSDR   bool      `db:"after_sdr"`   // 1 byte
	StartedSDR bool      `db:"started_sdr"` // 1 byte
	// Cache line 2 (bytes 64-128): Tree stages (accessed together)
	TaskTreeD     NullInt64  `db:"task_id_tree_d"`  // 16 bytes
	TreeD         NullString `db:"tree_d_cid"`      // 24 bytes
	TaskTreeC     NullInt64  `db:"task_id_tree_c"`  // 16 bytes
	AfterTreeD    bool       `db:"after_tree_d"`    // 1 byte
	StartedTreeD  bool       `db:"started_tree_d"`  // 1 byte
	AfterTreeC    bool       `db:"after_tree_c"`    // 1 byte
	StartedTreeRC bool       `db:"started_tree_rc"` // 1 byte
	// Cache line 3 (bytes 128-192): TreeR and Synthetic stages
	TaskTreeR        NullInt64  `db:"task_id_tree_r"`    // 16 bytes
	TreeR            NullString `db:"tree_r_cid"`        // 24 bytes
	TaskSynthetic    NullInt64  `db:"task_id_synth"`     // 16 bytes
	AfterTreeR       bool       `db:"after_tree_r"`      // 1 byte
	AfterSynthetic   bool       `db:"after_synth"`       // 1 byte
	StartedSynthetic bool       `db:"started_synthetic"` // 1 byte
	// Cache line 4 (bytes 192-256): PreCommit stage
	PreCommitReadyAt         *time.Time `db:"precommit_ready_at"`          // 32 bytes
	TaskPrecommitMsg         NullInt64  `db:"task_id_precommit_msg"`       // 16 bytes
	AfterPrecommitMsg        bool       `db:"after_precommit_msg"`         // 1 byte
	StartedPrecommitMsg      bool       `db:"started_precommit_msg"`       // 1 byte
	AfterPrecommitMsgSuccess bool       `db:"after_precommit_msg_success"` // 1 byte
	// Cache line 5 (bytes 256-320): PreCommit CID and SeedEpoch
	PreCommitMsgCid NullString `db:"precommit_msg_cid"` // 24 bytes
	SeedEpoch       *int64     `db:"seed_epoch"`        // 16 bytes
	// PoRep stage (accessed together)
	TaskPoRep    NullInt64 `db:"task_id_porep"` // 16 bytes
	AfterPoRep   bool      `db:"after_porep"`   // 1 byte
	StartedPoRep bool      `db:"started_porep"` // 1 byte
	// Cache line 6 (bytes 320-384): Finalize and MoveStorage stages
	TaskFinalize       NullInt64 `db:"task_id_finalize"`     // 16 bytes
	TaskMoveStorage    NullInt64 `db:"task_id_move_storage"` // 16 bytes
	AfterFinalize      bool      `db:"after_finalize"`       // 1 byte
	StartedFinalize    bool      `db:"started_finalize"`     // 1 byte
	AfterMoveStorage   bool      `db:"after_move_storage"`   // 1 byte
	StartedMoveStorage bool      `db:"started_move_storage"` // 1 byte
	// Commit stage (accessed together)
	CommitReadyAt *time.Time `db:"commit_ready_at"` // 32 bytes
	// Cache line 7 (bytes 384-448): Commit message stage
	TaskCommitMsg         NullInt64  `db:"task_id_commit_msg"`       // 16 bytes
	CommitMsgCid          NullString `db:"commit_msg_cid"`           // 24 bytes
	AfterCommitMsg        bool       `db:"after_commit_msg"`         // 1 byte
	StartedCommitMsg      bool       `db:"started_commit_msg"`       // 1 byte
	AfterCommitMsgSuccess bool       `db:"after_commit_msg_success"` // 1 byte
	// Larger fields at end (rarely accessed or only when needed)
	FailedReason string  `db:"failed_reason"` // 16 bytes - only used when Failed=true
	PoRepProof   []byte  `db:"porep_proof"`   // 24 bytes - only used in PoRep stage
	MissingTasks []int64 `db:"missing_tasks"` // 24 bytes - computed field
	AllTasks     []int64 `db:"all_tasks"`     // 24 bytes - computed field
}

type PorepPipelineSummary added in v1.23.0

type PorepPipelineSummary struct {
	Actor string

	CountSDR          int
	CountTrees        int
	CountPrecommitMsg int
	CountWaitSeed     int
	CountPoRep        int
	CountCommitMsg    int
	CountDone         int
	CountFailed       int
}

type PriceFilter added in v1.24.3

type PriceFilter struct {
	Name string `db:"name" json:"name"`

	MinDur int `db:"min_duration_days" json:"min_dur"`
	MaxDur int `db:"max_duration_days" json:"max_dur"`

	MinSize int64 `db:"min_size" json:"min_size"`
	MaxSize int64 `db:"max_size" json:"max_size"`

	Price    int64 `db:"price" json:"price"`
	Verified bool  `db:"verified" json:"verified"`
}

type ProofShareClientRequest added in v1.26.0

type ProofShareClientRequest struct {
	TaskID          int64      `db:"task_id"           json:"task_id"`
	SpID            int64      `db:"sp_id"`
	SectorNum       int64      `db:"sector_num"        json:"sector_num"`
	RequestCID      NullString `db:"request_cid"       json:"request_cid,omitempty"`
	RequestUploaded bool       `db:"request_uploaded"  json:"request_uploaded"`
	PaymentWallet   NullInt64  `db:"payment_wallet"    json:"payment_wallet,omitempty"`
	PaymentNonce    NullInt64  `db:"payment_nonce"     json:"payment_nonce,omitempty"`
	RequestSent     bool       `db:"request_sent"      json:"request_sent"`
	ResponseData    []byte     `db:"response_data"     json:"response_data,omitempty"`
	Done            bool       `db:"done"              json:"done"`
	CreatedAt       time.Time  `db:"created_at"        json:"created_at"`
	DoneAt          NullTime   `db:"done_at"           json:"done_at,omitempty"`

	PaymentAmount *string `db:"-" json:"payment_amount"`
	SpIDStr       string  `db:"-" json:"sp_id"`
}

ProofShareClientRequest model

type ProofShareClientSettings added in v1.26.0

type ProofShareClientSettings struct {
	SpID               int64      `db:"sp_id"                 json:"sp_id"`
	Enabled            bool       `db:"enabled"               json:"enabled"`
	Wallet             NullString `db:"wallet"                json:"wallet"`
	MinimumPendingSecs int64      `db:"minimum_pending_seconds" json:"minimum_pending_seconds"`
	DoPoRep            bool       `db:"do_porep"              json:"do_porep"`
	DoSnap             bool       `db:"do_snap"               json:"do_snap"`
	Price              string     `db:"pprice"`

	Address string `db:"-" json:"address"`
	FilPerP string `db:"-" json:"price"`
}

ProofShareClientSettings model Matches proofshare_client_settings table columns

type ProofShareClientWallet added in v1.26.0

type ProofShareClientWallet struct {
	Wallet int64 `db:"wallet" json:"wallet"`

	// db ignored
	Address address.Address `db:"-" json:"address"`

	ChainBalance string `db:"-" json:"chain_balance"`

	// balance which appears as "available" in the router on-chain
	RouterAvailBalance string `db:"-" json:"router_avail_balance"`

	// balance "to settle" in the router on-chain (service has vouches for those payments, but didn't settle on-chain yet)
	RouterUnsettledBalance string `db:"-" json:"router_unsettled_balance"`

	// balance "unlocked" (withdrawable)
	RouterUnlockedBalance string `db:"-" json:"router_unlocked_balance"`

	// Actually available balance, i.e. RouterAvailBalance - RouterUnsettledBalance
	AvailableBalance string `db:"-" json:"available_balance"`

	WithdrawTimestamp *time.Time `db:"-" json:"withdraw_timestamp"`
}

type ProofShareMeta added in v1.26.0

type ProofShareMeta struct {
	Enabled       bool       `db:"enabled" json:"enabled"`
	Wallet        NullString `db:"wallet" json:"wallet"`
	RequestTaskID NullInt64  `db:"request_task_id" json:"request_task_id"`
	Price         string     `db:"pprice"         json:"price"`
}

ProofShareMeta holds the data from the proofshare_meta table.

type ProofShareQueueItem added in v1.26.0

type ProofShareQueueItem struct {
	ServiceID     string    `db:"service_id"     json:"service_id"`
	ObtainedAt    time.Time `db:"obtained_at"    json:"obtained_at"`
	ComputeTaskID NullInt64 `db:"compute_task_id" json:"compute_task_id"`
	ComputeDone   bool      `db:"compute_done"   json:"compute_done"`
	SubmitTaskID  NullInt64 `db:"submit_task_id" json:"submit_task_id"`
	SubmitDone    bool      `db:"submit_done"    json:"submit_done"`
	WasPoW        bool      `db:"was_pow"        json:"was_pow"`
	PaymentAmount string    `json:"payment_amount"`
}

ProofShareQueueItem represents each row in proofshare_queue.

type ProofShareSettlementItem added in v1.26.0

type ProofShareSettlementItem struct {
	ProviderID                  int64     `db:"provider_id" json:"provider_id"`
	PaymentNonce                int64     `db:"payment_nonce" json:"payment_nonce"`
	SettledAt                   time.Time `db:"settled_at" json:"settled_at"`
	SettleMessageCID            string    `db:"settle_message_cid" json:"settle_message_cid"`
	CurrentCumulativeAmountRaw  string    `db:"current_cumulative_amount" json:"-"`
	PreviousCumulativeAmountRaw *string   `db:"previous_cumulative_amount" json:"-"`

	// Derived
	Address                    string `json:"address"`
	AmountForThisSettlementFIL string `json:"amount_for_this_settlement_fil"`
}

ProofShareSettlementItem holds data for a single settlement event.

type ProviderLastPaymentSummary added in v1.26.0

type ProviderLastPaymentSummary struct {
	// Fields directly from SQL
	WalletID                   int64    `db:"wallet_id" json:"wallet_id"`
	LastPaymentNonce           int64    `db:"last_payment_nonce" json:"last_payment_nonce"`
	LatestPaymentValueRaw      *string  `db:"latest_payment_value" json:"-"`       // Raw from DB, not in final JSON
	LastSettledPaymentValueRaw *string  `db:"last_settled_payment_value" json:"-"` // Raw from DB, not in final JSON
	SQLLastSettledAt           NullTime `db:"last_settled_at" json:"-"`            // Raw from DB, not in final JSON

	// Derived and formatted fields for JSON output
	Address                 string     `json:"address"`
	LastSettledAmountFIL    *string    `json:"last_settled_amount_fil,omitempty"`
	UnsettledAmountFIL      *string    `json:"unsettled_amount_fil,omitempty"`
	TimeSinceLastSettlement *string    `json:"time_since_last_settlement,omitempty"`
	LastSettledAt           *time.Time `json:"last_settled_at,omitempty"`

	ContractSettledFIL *string `json:"contract_settled_fil,omitempty"`
	ContractLastNonce  *uint64 `json:"contract_last_nonce,omitempty"`
}

ProviderLastPaymentSummary holds aggregated payment info for a provider.

type RpcInfo

type RpcInfo struct {
	Address   string
	CLayers   []string
	Reachable bool
	SyncState string
	Version   string
}

type SPSectorStats added in v1.27.2

type SPSectorStats struct {
	SpID       int64  `json:"sp_id"`
	SPAddress  string `json:"sp_address"`
	TotalCount int64  `json:"total_count"`
	CCCount    int64  `json:"cc_count"`
	NonCCCount int64  `json:"non_cc_count"`
}

type SectorBucket added in v1.24.4

type SectorBucket struct {
	BucketEpoch       abi.ChainEpoch // e.g., (Expiration / 10000) * 10000
	Count             int64          // how many sectors
	QAP               abi.DealWeight // Total Deal weight - sum of DealWeights in this bucket
	Days              int64
	VestedLockedFunds abi.TokenAmount // Total locked funds (Vesting) - Vested in 10000 epochs
}

type SectorBuckets added in v1.24.4

type SectorBuckets struct {
	All               []SectorBucket
	CC                []SectorBucket
	BlockDelaySeconds int
}

type SectorCCScheduler added in v1.26.0

type SectorCCScheduler struct {
	SpID         int64
	ToSeal       int64
	Weight       int64
	DurationDays int64
	Enabled      bool

	// computed
	SPAddress     string
	SectorSize    int64
	RequestedSize string
}

type SectorEvent added in v1.24.3

type SectorEvent struct {
	SpID         uint64 `db:"sp_id"`
	SectorNumber uint64 `db:"sector_number"`

	Addr address.Address `db:"-"`
}

type SectorExpBucket added in v1.27.2

type SectorExpBucket struct {
	LessThanDays int `json:"less_than_days" db:"less_than_days"`
}

type SectorExpBucketCount added in v1.27.2

type SectorExpBucketCount struct {
	SpID         int64  `json:"sp_id" db:"sp_id"`
	SPAddress    string `json:"sp_address"`
	LessThanDays int    `json:"less_than_days" db:"less_than_days"`
	TotalCount   int64  `json:"total_count" db:"total_count"`
	CCCount      int64  `json:"cc_count" db:"cc_count"`
	DealCount    int64  `json:"deal_count" db:"deal_count"`
}

type SectorExpManagerPreset added in v1.27.2

type SectorExpManagerPreset struct {
	Name                    string `json:"name" db:"name"`
	ActionType              string `json:"action_type" db:"action_type"`
	InfoBucketAboveDays     int    `json:"info_bucket_above_days" db:"info_bucket_above_days"`
	InfoBucketBelowDays     int    `json:"info_bucket_below_days" db:"info_bucket_below_days"`
	TargetExpirationDays    *int64 `json:"target_expiration_days" db:"target_expiration_days"`
	MaxCandidateDays        *int64 `json:"max_candidate_days" db:"max_candidate_days"`
	TopUpCountLowWaterMark  *int64 `json:"top_up_count_low_water_mark" db:"top_up_count_low_water_mark"`
	TopUpCountHighWaterMark *int64 `json:"top_up_count_high_water_mark" db:"top_up_count_high_water_mark"`
	CC                      *bool  `json:"cc" db:"cc"`
	DropClaims              bool   `json:"drop_claims" db:"drop_claims"`
}

type SectorExpManagerSP added in v1.27.2

type SectorExpManagerSP struct {
	SpID                int64   `json:"sp_id" db:"sp_id"`
	SPAddress           string  `json:"sp_address"`
	PresetName          string  `json:"preset_name" db:"preset_name"`
	Enabled             bool    `json:"enabled" db:"enabled"`
	LastRunAt           *string `json:"last_run_at" db:"last_run_at"`
	LastMessageCID      *string `json:"last_message_cid" db:"last_message_cid"`
	LastMessageLandedAt *string `json:"last_message_landed_at" db:"last_message_landed_at"`
}

type SectorFileTypeStats added in v1.27.2

type SectorFileTypeStats struct {
	FileType string `json:"file_type"`
	Count    int64  `json:"count"`
}

type SectorInfo added in v1.23.0

type SectorInfo struct {
	SectorNumber       int64
	SpID               uint64
	Miner              string
	PreCommitMsg       string
	CommitMsg          string
	ActivationEpoch    abi.ChainEpoch
	ExpirationEpoch    *int64
	DealWeight         string
	Deadline           *int64
	Partition          *int64
	UnsealedCid        string
	SealedCid          string
	UpdatedUnsealedCid string
	UpdatedSealedCid   string
	IsSnap             bool
	UpdateMsg          string
	UnsealedState      *bool
	HasUnsealed        bool

	PipelinePoRep *sectorListEntry
	PipelineSnap  *sectorSnapListEntry

	Pieces      []SectorPieceMeta
	Locations   []LocationTable
	Tasks       []SectorInfoTaskSummary
	TaskHistory []TaskHistory

	Resumable bool
	Restart   bool
}

type SectorInfoTaskSummary added in v1.23.0

type SectorInfoTaskSummary struct {
	Name           string
	SincePosted    string
	Owner, OwnerID *string
	ID             int64
}

type SectorMeta added in v1.24.4

type SectorMeta struct {
	// Cache line 1 (bytes 0-64): Original and updated CIDs (accessed together for sector comparison)
	OrigUnsealedCid    string `db:"orig_unsealed_cid"` // 16 bytes (0-16)
	OrigSealedCid      string `db:"orig_sealed_cid"`   // 16 bytes (16-32)
	UpdatedUnsealedCid string `db:"cur_unsealed_cid"`  // 16 bytes (32-48)
	UpdatedSealedCid   string `db:"cur_sealed_cid"`    // 16 bytes (48-64)
	// Cache line 2 (bytes 64-128): Message CIDs (accessed for on-chain tracking)
	PreCommitCid string     `db:"msg_cid_precommit"` // 16 bytes (64-80)
	CommitCid    string     `db:"msg_cid_commit"`    // 16 bytes (80-96)
	UpdateCid    NullString `db:"msg_cid_update"`    // 24 bytes (96-120) - null for non-snap sectors
	// Cache line 3 (bytes 128-192): On-chain metadata (NullInt64 = 16 bytes each)
	ExpirationEpoch NullInt64 `db:"expiration_epoch"` // 16 bytes
	Deadline        NullInt64 `db:"deadline"`         // 16 bytes
	Partition       NullInt64 `db:"partition"`        // 16 bytes
	// Bools (NullBool = 2 bytes each)
	IsCC          NullBool `db:"is_cc"`               // 2 bytes
	UnsealedState NullBool `db:"target_unseal_state"` // 2 bytes
}

type SectorPieceMeta added in v1.23.0

type SectorPieceMeta struct {
	// Cache line 1 (bytes 0-64): Hot path - piece identification and size
	PieceIndex  int64     `db:"piece_index"`   // 8 bytes (0-8)
	PieceSize   int64     `db:"piece_size"`    // 8 bytes (8-16)
	PieceCid    string    `db:"piece_cid"`     // 16 bytes (16-32)
	PieceCidV2  string    `db:"-"`             // 16 bytes (32-48) - computed field
	DataRawSize NullInt64 `db:"data_raw_size"` // 16 bytes (48-64)
	// Cache line 2 (bytes 64-128): Deal identification
	F05DealID   NullInt64  `db:"f05_deal_id"` // 16 bytes
	DealID      NullString `db:"deal_id"`     // 24 bytes
	IsSnapPiece bool       `db:"is_snap"`     // 1 byte - frequently checked with PieceIndex
	// Cache line 3 (bytes 128-192): Data access and F05 info
	DataUrl       NullString `db:"data_url"`        // 24 bytes
	F05PublishCid NullString `db:"f05_publish_cid"` // 24 bytes
	// Cache line 4 (bytes 192-256): DDO and display fields
	DDOPam         NullString `db:"direct_piece_activation_manifest"` // 24 bytes
	StrPieceSize   string     `db:"-"`                                // 16 bytes - display only
	StrDataRawSize string     `db:"-"`                                // 16 bytes - display only
	// Piece park fields (rarely accessed, only for parked pieces)
	PieceParkDataUrl       string    `db:"-"` // 16 bytes
	PieceParkCreatedAt     time.Time `db:"-"` // 24 bytes
	PieceParkID            int64     `db:"-"` // 8 bytes
	PieceParkTaskID        *int64    `db:"-"` // 8 bytes - still pointer (not from DB)
	PieceParkCleanupTaskID *int64    `db:"-"` // 8 bytes - still pointer (not from DB)
	// Bools: frequently checked first, rare ones at end (NullBool = 2 bytes each)
	MK12Deal           NullBool `db:"boost_deal"`              // 2 bytes - checked often
	LegacyDeal         NullBool `db:"legacy_deal"`             // 2 bytes - checked often
	DeleteOnFinalize   NullBool `db:"data_delete_on_finalize"` // 2 bytes - checked during finalize
	IsParkedPiece      bool     `db:"-"`                       // rare - only for UI display
	IsParkedPieceFound bool     `db:"-"`                       // rare - only for UI display
	PieceParkComplete  bool     `db:"-"`                       // rare - only for parked pieces
}

Pieces

type SectorPipelineStats added in v1.27.2

type SectorPipelineStats struct {
	PipelineType string `json:"pipeline_type"`
	Stage        string `json:"stage"`
	Count        int64  `json:"count"`
}

type SnapMissingTask added in v1.24.3

type SnapMissingTask struct {
	SpID              int64   `db:"sp_id"`
	SectorNumber      int64   `db:"sector_number"`
	AllTaskIDs        []int64 `db:"all_task_ids"`
	MissingTaskIDs    []int64 `db:"missing_task_ids"`
	TotalTasks        int     `db:"total_tasks"`
	MissingTasksCount int     `db:"missing_tasks_count"`
	RestartStatus     string  `db:"restart_status"`
}

type SnapPipelineTask added in v1.24.3

type SnapPipelineTask struct {
	// Cache line 1 (bytes 0-64): Hot path - identification and early checks
	SpID         int64     `db:"sp_id"`         // 8 bytes (0-8)
	SectorNumber int64     `db:"sector_number"` // 8 bytes (8-16)
	StartTime    time.Time `db:"start_time"`    // 24 bytes (16-40)
	UpgradeProof int       `db:"upgrade_proof"` // 8 bytes (40-48)
	Failed       bool      `db:"failed"`        // 1 byte (48-49) - checked early
	DataAssigned bool      `db:"data_assigned"` // 1 byte (49-50) - checked with sector number
	// Cache line 2 (bytes 64-128): Encode and Prove stages (accessed together)
	TaskEncode        NullInt64  `db:"task_id_encode"`      // 16 bytes
	AfterEncode       bool       `db:"after_encode"`        // 1 byte
	UpdateUnsealedCID NullString `db:"update_unsealed_cid"` // 24 bytes
	TaskProve         NullInt64  `db:"task_id_prove"`       // 16 bytes
	AfterProve        bool       `db:"after_prove"`         // 1 byte
	// Cache line 3 (bytes 128-192): Submit and message stages
	UpdateSealedCID      NullString `db:"update_sealed_cid"`       // 24 bytes
	TaskSubmit           NullInt64  `db:"task_id_submit"`          // 16 bytes
	AfterSubmit          bool       `db:"after_submit"`            // 1 byte
	AfterProveMsgSuccess bool       `db:"after_prove_msg_success"` // 1 byte
	UpdateMsgCid         NullString `db:"prove_msg_cid"`           // 24 bytes (crosses into cache line 4)
	// Cache line 4 (bytes 192-256): Storage and timing
	TaskMoveStorage  NullInt64 `db:"task_id_move_storage"` // 16 bytes
	AfterMoveStorage bool      `db:"after_move_storage"`   // 1 byte
	SubmitAfter      NullTime  `db:"submit_after"`         // 32 bytes
	// Failure info (only accessed when Failed=true)
	FailedAt NullTime `db:"failed_at"` // 32 bytes (crosses into cache line 5)
	// Rarely accessed fields at end
	FailedReason    string `db:"failed_reason"`     // 16 bytes - only when Failed=true
	FailedReasonMsg string `db:"failed_reason_msg"` // 16 bytes - only when Failed=true
	ProveMsgTsk     []byte `db:"prove_msg_tsk"`     // 24 bytes - only in specific stages
}

type SpidGetter added in v1.22.1

type SpidGetter interface {
	GetSpid(db *harmonydb.DB, taskID int64) string
}

type StorageAsk added in v1.24.3

type StorageAsk struct {
	SpID          int64 `db:"sp_id"`
	Price         int64 `db:"price"`
	VerifiedPrice int64 `db:"verified_price"`
	MinSize       int64 `db:"min_size"`
	MaxSize       int64 `db:"max_size"`
	CreatedAt     int64 `db:"created_at"`
	Expiry        int64 `db:"expiry"`
	Sequence      int64 `db:"sequence"`
	Miner         string
}

type StorageDealList added in v1.24.3

type StorageDealList struct {
	ID         string     `db:"uuid" json:"id"`
	MinerID    int64      `db:"sp_id" json:"sp_id"`
	CreatedAt  time.Time  `db:"created_at" json:"created_at"`
	PieceCidV1 string     `db:"piece_cid" json:"piece_cid"`
	PieceSize  int64      `db:"piece_size" json:"piece_size"`
	RawSize    NullInt64  `db:"raw_size"`
	PieceCidV2 string     `json:"piece_cid_v2"`
	Processed  bool       `db:"processed" json:"processed"`
	Error      NullString `db:"error" json:"error"`
	Miner      string     `json:"miner"`
}

type StorageDealSummary added in v1.24.3

type StorageDealSummary struct {
	ID                string         `db:"uuid" json:"id"`
	MinerID           int64          `db:"sp_id" json:"sp_id"`
	Sector            NullInt64      `db:"sector_num" json:"sector"`
	CreatedAt         time.Time      `db:"created_at" json:"created_at"`
	SignedProposalCid string         `db:"signed_proposal_cid" json:"signed_proposal_cid"`
	Offline           bool           `db:"offline" json:"offline"`
	Verified          bool           `db:"verified" json:"verified"`
	StartEpoch        int64          `db:"start_epoch" json:"start_epoch"`
	EndEpoch          int64          `db:"end_epoch" json:"end_epoch"`
	ClientPeerId      string         `db:"client_peer_id" json:"client_peer_id"`
	ChainDealId       NullInt64      `db:"chain_deal_id" json:"chain_deal_id"`
	PublishCid        NullString     `db:"publish_cid" json:"publish_cid"`
	PieceCid          string         `db:"piece_cid" json:"piece_cid"`
	PieceSize         int64          `db:"piece_size" json:"piece_size"`
	RawSize           sql.NullInt64  `db:"raw_size"`
	FastRetrieval     bool           `db:"fast_retrieval" json:"fast_retrieval"`
	AnnounceToIpni    bool           `db:"announce_to_ipni" json:"announce_to_ipni"`
	Url               sql.NullString `db:"url"`
	URLS              string         `json:"url"`
	Header            []byte         `db:"url_headers"`
	UrlHeaders        http.Header    `json:"url_headers"`
	DBError           sql.NullString `db:"error"`
	Error             string         `json:"error"`
	Miner             string         `json:"miner"`
	Indexed           sql.NullBool   `db:"indexed" json:"indexed"`
	IsDDO             bool           `db:"is_ddo" json:"is_ddo"`
	PieceCidV2        string         `json:"piece_cid_v2"`
}

type StorageGCMark added in v1.24.4

type StorageGCMark struct {
	Actor     int64  `db:"sp_id"`
	SectorNum int64  `db:"sector_num"`
	FileType  int64  `db:"sector_filetype"`
	StorageID string `db:"storage_id"`

	CreatedAt  time.Time `db:"created_at"`
	Approved   bool      `db:"approved"`
	ApprovedAt NullTime  `db:"approved_at"`

	CanSeal  bool `db:"can_seal"`
	CanStore bool `db:"can_store"`

	Urls string `db:"urls"`

	// db ignored
	TypeName string `db:"-"`
	PathType string `db:"-"`

	Miner string
}

type StorageGCMarks

type StorageGCMarks struct {
	Marks []*StorageGCMark
	Total int
}

type StorageGCStats

type StorageGCStats struct {
	Actor int64 `db:"sp_id"`
	Count int   `db:"count"`
	Miner string
}

type StoragePathStat added in v1.27.2

type StoragePathStat struct {
	StorageID string   `json:"storage_id"`
	PathType  string   `json:"path_type"`
	Urls      []string `json:"urls"`
	Count     int      `json:"count"`
}

type StorageStoreStats added in v1.24.5

type StorageStoreStats struct {
	Type      string `json:"type"`
	Capacity  int64  `json:"capacity"`
	Available int64  `json:"available"`
	Used      int64  `json:"used"`

	CapStr   string `json:"cap_str"`
	UseStr   string `json:"use_str"`
	AvailStr string `json:"avail_str"`
}

StorageStoreStats holds the aggregated store (can_store) stats for a given file type.

type StorageUseStats

type StorageUseStats struct {
	CanSeal   bool `db:"can_seal"`
	CanStore  bool `db:"can_store"`
	Available int  `db:"available"`
	Capacity  int  `db:"capacity"`

	// Ignored
	Type   string `db:"-"`
	UseStr string `db:"-"`
	CapStr string `db:"-"`
}

type TaskHistory added in v1.23.0

type TaskHistory struct {
	// Cache line 1 (bytes 0-64): Identification and key timing
	PipelineTaskID int64    `db:"pipeline_task_id"` // 8 bytes (0-8)
	WorkStart      NullTime `db:"work_start"`       // 32 bytes (8-40)
	WorkEnd        NullTime `db:"work_end"`         // 32 bytes (40-72, crosses to cache line 2)
	// Cache line 2 (bytes 64-128): Task details
	Name        NullString `db:"name"`                       // 24 bytes
	CompletedBy NullString `db:"completed_by_host_and_port"` // 24 bytes
	Result      NullBool   `db:"result"`                     // 2 bytes
	// Cache line 3 (bytes 128+): Error info and display fields (only accessed when needed)
	Err  NullString `db:"err"` // 24 bytes - only accessed when Result is false
	Took string     `db:"-"`   // 16 bytes - display only, computed field
}

type TaskHistorySummary added in v1.23.0

type TaskHistorySummary struct {
	Name   string
	TaskID int64

	Posted, Start, Queued, Took string

	Result bool
	Err    string

	CompletedBy string
}

type TaskStatus added in v1.24.3

type TaskStatus struct {
	TaskID   int64   `json:"task_id"`
	Status   string  `json:"status"` // "pending", "running", "done", "failed"
	OwnerID  *int64  `json:"owner_id,omitempty"`
	Name     string  `json:"name"`
	PostedAt *string `json:"posted_at,omitempty"`
}

type TaskSummary added in v1.22.1

type TaskSummary struct {
	ID             int64
	Name           string
	SpID           string
	SincePosted    time.Time `db:"since_posted"`
	Owner, OwnerID *string

	// db ignored
	SincePostedStr string `db:"-"`

	Miner string
}

type UpgradeSector added in v1.23.0

type UpgradeSector struct {
	StartTime time.Time `db:"start_time"`

	SpID      uint64 `db:"sp_id"`
	SectorNum uint64 `db:"sector_number"`

	TaskIDEncode NullInt64 `db:"task_id_encode"`
	AfterEncode  bool      `db:"after_encode"`

	TaskIDProve NullInt64 `db:"task_id_prove"`
	AfterProve  bool      `db:"after_prove"`

	UpdateReadyAt NullTime `db:"update_ready_at"`

	TaskIDSubmit NullInt64 `db:"task_id_submit"`
	AfterSubmit  bool      `db:"after_submit"`

	AfterProveSuccess bool `db:"after_prove_msg_success"`

	TaskIDMoveStorage NullInt64 `db:"task_id_move_storage"`
	AfterMoveStorage  bool      `db:"after_move_storage"`

	Failed       bool   `db:"failed"`
	FailedReason string `db:"failed_reason"`
	FailedMsg    string `db:"failed_reason_msg"`

	MissingTasks []int64 `db:"-"`
	AllTasks     []int64 `db:"-"`

	Miner string
}

type UploadStatus added in v1.27.2

type UploadStatus struct {
	ID     string            `json:"id"`
	Status mk20.UploadStatus `json:"status"`
}

type WalletBalances added in v1.24.3

type WalletBalances struct {
	Address string `json:"address"`
	Balance string `json:"balance"`
}

type WalletInfo added in v1.24.4

type WalletInfo struct {
	Type    string
	Address string
	Balance string
}

type WalletInfoShort added in v1.26.0

type WalletInfoShort struct {
	IDAddress       string `json:"id_address"`
	KeyAddress      string `json:"key_address"`
	Balance         string `json:"balance"`
	PendingMessages int    `json:"pending_messages"`
}

type WebRPC

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

func (*WebRPC) AbortRestart added in v1.26.0

func (a *WebRPC) AbortRestart(ctx context.Context, id int64) error

func (*WebRPC) ActorCharts added in v1.24.4

func (a *WebRPC) ActorCharts(ctx context.Context, maddr address.Address) (*SectorBuckets, error)

func (*WebRPC) ActorInfo added in v1.24.4

func (a *WebRPC) ActorInfo(ctx context.Context, ActorIDstr string) (*ActorDetail, error)

func (*WebRPC) ActorList added in v1.23.0

func (a *WebRPC) ActorList(ctx context.Context) ([]string, error)

func (*WebRPC) ActorSummary added in v1.23.0

func (a *WebRPC) ActorSummary(ctx context.Context) ([]ActorSummary, error)

func (*WebRPC) AddAllowDenyList added in v1.24.3

func (a *WebRPC) AddAllowDenyList(ctx context.Context, wallet string, status bool) error

func (*WebRPC) AddClientFilters added in v1.24.3

func (a *WebRPC) AddClientFilters(ctx context.Context, name string, active bool, wallets, peers []string, filters []string, maxDealPerHour, maxDealSizePerHour int64, info string) error

func (*WebRPC) AddMarketContract added in v1.27.2

func (a *WebRPC) AddMarketContract(ctx context.Context, contract, abiString string) error

func (*WebRPC) AddPDPService added in v1.25.1

func (a *WebRPC) AddPDPService(ctx context.Context, name string, pubKey string) error

AddPDPService adds a new PDP service to the database

func (*WebRPC) AddPriceFilters added in v1.24.3

func (a *WebRPC) AddPriceFilters(ctx context.Context, name string, minDur, maxDur int, minSize, maxSize int64, price int64, verified bool) error

func (*WebRPC) BalanceMgrRuleAdd added in v1.26.0

func (a *WebRPC) BalanceMgrRuleAdd(ctx context.Context, subject, second, actionType, lowWatermark, highWatermark, subjectType string) error

BalanceMgrRuleAdd creates a new balance-manager rule. Watermarks are provided as FIL strings. Addresses use Fil/ID strings. subjectType can be "wallet" or "proofshare".

func (*WebRPC) BalanceMgrRuleRemove added in v1.26.0

func (a *WebRPC) BalanceMgrRuleRemove(ctx context.Context, id int64) error

BalanceMgrRuleRemove deletes a balance-manager rule.

func (*WebRPC) BalanceMgrRuleUpdate added in v1.26.0

func (a *WebRPC) BalanceMgrRuleUpdate(ctx context.Context, id int64, lowWatermark, highWatermark string) error

BalanceMgrRuleUpdate updates the low / high watermark thresholds for a rule. Values should be provided as strings parsable by types.ParseFIL (e.g. "0.5" or "0.5 FIL").

func (*WebRPC) BalanceMgrRules added in v1.26.0

func (a *WebRPC) BalanceMgrRules(ctx context.Context) ([]BalanceMgrRule, error)

BalanceMgrRules returns all balance-manager rules.

func (*WebRPC) BlockDelaySecs

func (a *WebRPC) BlockDelaySecs(context.Context) (uint64, error)

func (*WebRPC) ChunkUploadStatus added in v1.27.2

func (a *WebRPC) ChunkUploadStatus(ctx context.Context, idStr string) (*UploadStatus, error)

func (*WebRPC) ClusterMachines added in v1.23.0

func (a *WebRPC) ClusterMachines(ctx context.Context) ([]MachineSummary, error)

func (*WebRPC) ClusterNodeInfo added in v1.23.0

func (a *WebRPC) ClusterNodeInfo(ctx context.Context, id int64) (*MachineInfo, error)

func (*WebRPC) ClusterNodeMetrics added in v1.27.1

func (a *WebRPC) ClusterNodeMetrics(ctx context.Context, id int64) (string, error)

func (*WebRPC) ClusterTaskHistory added in v1.23.0

func (a *WebRPC) ClusterTaskHistory(ctx context.Context, limit, offset int) ([]TaskHistorySummary, error)

func (*WebRPC) ClusterTaskSummary added in v1.22.1

func (a *WebRPC) ClusterTaskSummary(ctx context.Context) ([]TaskSummary, error)

func (*WebRPC) Cordon added in v1.26.0

func (a *WebRPC) Cordon(ctx context.Context, id int64) error

func (*WebRPC) DeadlineDetail added in v1.27.2

func (a *WebRPC) DeadlineDetail(ctx context.Context, sp string, deadlineIdx uint64) (*DeadlineDetail, error)

func (*WebRPC) DealPipelineRemove added in v1.27.2

func (a *WebRPC) DealPipelineRemove(ctx context.Context, id string) error

func (*WebRPC) DealsPending added in v1.23.0

func (a *WebRPC) DealsPending(ctx context.Context) ([]OpenDealInfo, error)

func (*WebRPC) DealsSealNow added in v1.23.0

func (a *WebRPC) DealsSealNow(ctx context.Context, spId, sectorNumber uint64) error

func (*WebRPC) DefaultFilterBehaviour added in v1.25.0

func (a *WebRPC) DefaultFilterBehaviour(ctx context.Context) (*DefaultFilterBehaviourResponse, error)

func (*WebRPC) DisableDataSource added in v1.27.2

func (a *WebRPC) DisableDataSource(ctx context.Context, name string) error

func (*WebRPC) DisableProduct added in v1.27.2

func (a *WebRPC) DisableProduct(ctx context.Context, name string) error

func (*WebRPC) EnableDataSource added in v1.27.2

func (a *WebRPC) EnableDataSource(ctx context.Context, name string) error

func (*WebRPC) EnableProduct added in v1.27.2

func (a *WebRPC) EnableProduct(ctx context.Context, name string) error

func (*WebRPC) EpochPretty added in v1.24.3

func (a *WebRPC) EpochPretty(ctx context.Context, e abi.ChainEpoch) (string, error)

func (*WebRPC) FSRegister added in v1.27.2

func (a *WebRPC) FSRegister(ctx context.Context, name, description, location string) error

func (*WebRPC) FSRegistryStatus added in v1.27.2

func (a *WebRPC) FSRegistryStatus(ctx context.Context) (*FSRegistryStatus, error)

func (*WebRPC) FSUpdatePDP added in v1.27.2

func (a *WebRPC) FSUpdatePDP(ctx context.Context, pdpOffering *FSPDPOffering, capabilities map[string]string) error

func (*WebRPC) FSUpdateProvider added in v1.27.2

func (a *WebRPC) FSUpdateProvider(ctx context.Context, name, description string) error

func (*WebRPC) FindContentByCID added in v1.27.2

func (a *WebRPC) FindContentByCID(ctx context.Context, cs string) ([]ContentInfo, error)

FindContentByCID finds content by CID

func (*WebRPC) FindEntriesByDataURL added in v1.24.3

func (a *WebRPC) FindEntriesByDataURL(ctx context.Context, dataURL string) ([]PieceParkRefEntry, error)

func (*WebRPC) GetAd added in v1.24.3

func (a *WebRPC) GetAd(ctx context.Context, ad string) (*IpniAd, error)

func (*WebRPC) GetAllowDenyList added in v1.24.3

func (a *WebRPC) GetAllowDenyList(ctx context.Context) ([]AllowDeny, error)

func (*WebRPC) GetClientFilters added in v1.24.3

func (a *WebRPC) GetClientFilters(ctx context.Context) ([]ClientFilter, error)

func (*WebRPC) GetMK12DealPipelines added in v1.27.2

func (a *WebRPC) GetMK12DealPipelines(ctx context.Context, limit int, offset int) ([]*MK12Pipeline, error)

func (*WebRPC) GetPriceFilters added in v1.24.3

func (a *WebRPC) GetPriceFilters(ctx context.Context) ([]PriceFilter, error)

func (*WebRPC) GetStorageAsk added in v1.24.3

func (a *WebRPC) GetStorageAsk(ctx context.Context, spID int64) (*StorageAsk, error)

func (*WebRPC) GetTaskStatus added in v1.24.3

func (a *WebRPC) GetTaskStatus(ctx context.Context, taskID int64) (*TaskStatus, error)

func (*WebRPC) HarmonyTaskDetails added in v1.24.3

func (a *WebRPC) HarmonyTaskDetails(ctx context.Context, taskID int64) (*HarmonyTask, error)

HarmonyTaskDetails returns the current state of a task by ID.

func (*WebRPC) HarmonyTaskHistory

func (a *WebRPC) HarmonyTaskHistory(ctx context.Context, taskName string, fails bool) ([]*HarmonyTaskHistory, error)

func (*WebRPC) HarmonyTaskHistoryById added in v1.24.3

func (a *WebRPC) HarmonyTaskHistoryById(ctx context.Context, taskID int64) ([]*HarmonyTaskHistory, error)

HarmonyTaskHistoryById returns the history of a task by task ID.

func (*WebRPC) HarmonyTaskMachines

func (a *WebRPC) HarmonyTaskMachines(ctx context.Context, taskName string) ([]HarmonyMachineDesc, error)

func (*WebRPC) HarmonyTaskStats

func (a *WebRPC) HarmonyTaskStats(ctx context.Context) ([]HarmonyTaskStats, error)

func (*WebRPC) IPNIEntry added in v1.24.3

func (a *WebRPC) IPNIEntry(ctx context.Context, block cid.Cid) (*EntryInfo, error)

func (*WebRPC) IPNISetSkip added in v1.24.3

func (a *WebRPC) IPNISetSkip(ctx context.Context, adCid cid.Cid, skip bool) error

func (*WebRPC) IPNISummary added in v1.24.3

func (a *WebRPC) IPNISummary(ctx context.Context) ([]*IPNI, error)

func (*WebRPC) ImportPDPKey added in v1.25.1

func (a *WebRPC) ImportPDPKey(ctx context.Context, hexPrivateKey string) (string, error)

func (*WebRPC) ListDataSources added in v1.27.2

func (a *WebRPC) ListDataSources(ctx context.Context) (map[string]bool, error)

func (*WebRPC) ListMarketContracts added in v1.27.2

func (a *WebRPC) ListMarketContracts(ctx context.Context) (map[string]string, error)

func (*WebRPC) ListPDPKeys added in v1.25.1

func (a *WebRPC) ListPDPKeys(ctx context.Context) ([]string, error)

func (*WebRPC) ListProducts added in v1.27.2

func (a *WebRPC) ListProducts(ctx context.Context) (map[string]bool, error)

func (*WebRPC) MK12BulkRemoveFailedMarketPipelines added in v1.27.2

func (a *WebRPC) MK12BulkRemoveFailedMarketPipelines(ctx context.Context, taskType string) error

func (*WebRPC) MK12BulkRestartFailedMarketTasks added in v1.27.2

func (a *WebRPC) MK12BulkRestartFailedMarketTasks(ctx context.Context, taskType string) error

func (*WebRPC) MK12DDOStorageDealList added in v1.24.5

func (a *WebRPC) MK12DDOStorageDealList(ctx context.Context, limit int, offset int) ([]*StorageDealList, error)

func (*WebRPC) MK12PipelineFailedTasks added in v1.27.2

func (a *WebRPC) MK12PipelineFailedTasks(ctx context.Context) (*MK12PipelineFailedStats, error)

func (*WebRPC) MK12StorageDealList added in v1.24.3

func (a *WebRPC) MK12StorageDealList(ctx context.Context, limit int, offset int) ([]*StorageDealList, error)

func (*WebRPC) MK20BulkRemoveFailedMarketPipelines added in v1.27.2

func (a *WebRPC) MK20BulkRemoveFailedMarketPipelines(ctx context.Context, taskType string) error

func (*WebRPC) MK20BulkRemoveFailedPDPPipelines added in v1.27.2

func (a *WebRPC) MK20BulkRemoveFailedPDPPipelines(ctx context.Context, taskType string) error

func (*WebRPC) MK20BulkRestartFailedMarketTasks added in v1.27.2

func (a *WebRPC) MK20BulkRestartFailedMarketTasks(ctx context.Context, taskType string) error

func (*WebRPC) MK20BulkRestartFailedPDPTasks added in v1.27.2

func (a *WebRPC) MK20BulkRestartFailedPDPTasks(ctx context.Context, taskType string) error

func (*WebRPC) MK20DDOPipelines added in v1.27.2

func (a *WebRPC) MK20DDOPipelines(ctx context.Context, limit int, offset int) ([]*MK20DDOPipeline, error)

func (*WebRPC) MK20DDOStorageDeal added in v1.27.2

func (a *WebRPC) MK20DDOStorageDeal(ctx context.Context, id string) (*MK20StorageDeal, error)

func (*WebRPC) MK20DDOStorageDeals added in v1.27.2

func (a *WebRPC) MK20DDOStorageDeals(ctx context.Context, limit int, offset int) ([]*MK20StorageDealList, error)

func (*WebRPC) MK20PDPPipelineFailedTasks added in v1.27.2

func (a *WebRPC) MK20PDPPipelineFailedTasks(ctx context.Context) (*MK20PDPPipelineFailedStats, error)

func (*WebRPC) MK20PDPPipelineRemove added in v1.27.2

func (a *WebRPC) MK20PDPPipelineRemove(ctx context.Context, id string) error

func (*WebRPC) MK20PDPPipelines added in v1.27.2

func (a *WebRPC) MK20PDPPipelines(ctx context.Context, limit int, offset int) ([]*MK20PDPPipeline, error)

func (*WebRPC) MK20PDPStorageDeals added in v1.27.2

func (a *WebRPC) MK20PDPStorageDeals(ctx context.Context, limit int, offset int) ([]*MK20PDPDealList, error)

func (*WebRPC) MK20PipelineFailedTasks added in v1.27.2

func (a *WebRPC) MK20PipelineFailedTasks(ctx context.Context) (*MK20PipelineFailedStats, error)

func (*WebRPC) MarketBalance added in v1.24.3

func (a *WebRPC) MarketBalance(ctx context.Context) ([]MarketBalanceStatus, error)

func (*WebRPC) MessageByCid added in v1.24.3

func (a *WebRPC) MessageByCid(ctx context.Context, cid string) (*MessageDetail, error)

func (*WebRPC) MoveBalanceToEscrow added in v1.24.3

func (a *WebRPC) MoveBalanceToEscrow(ctx context.Context, miner string, amount string, wallet string) (string, error)

func (*WebRPC) PDPServices added in v1.25.1

func (a *WebRPC) PDPServices(ctx context.Context) ([]PDPService, error)

PDPServices retrieves the list of PDP services from the database

func (*WebRPC) PSAskWithdraw added in v1.26.0

func (a *WebRPC) PSAskWithdraw(ctx context.Context, askID int64) error

func (*WebRPC) PSClientAddWallet added in v1.26.0

func (a *WebRPC) PSClientAddWallet(ctx context.Context, wallet string) error

func (*WebRPC) PSClientGet added in v1.26.0

func (a *WebRPC) PSClientGet(ctx context.Context) ([]ProofShareClientSettings, error)

PSClientGet fetches all proofshare_client_settings rows.

func (*WebRPC) PSClientListMessages added in v1.26.0

func (a *WebRPC) PSClientListMessages(ctx context.Context) ([]ClientMessage, error)

PSClientListMessages queries and returns the 10 most recently started client messages.

func (*WebRPC) PSClientRemove added in v1.26.0

func (a *WebRPC) PSClientRemove(ctx context.Context, spId int64) error

PSClientRemove removes a row from proofshare_client_settings if sp_id != 0.

func (*WebRPC) PSClientRequests added in v1.26.0

func (a *WebRPC) PSClientRequests(ctx context.Context, spId int64) ([]*ProofShareClientRequest, error)

PSClientRequests returns the list of proofshare_client_requests for a given sp_id

func (*WebRPC) PSClientRouterAddBalance added in v1.26.0

func (a *WebRPC) PSClientRouterAddBalance(ctx context.Context, wallet string, amountStr string) (cid.Cid, error)

func (*WebRPC) PSClientRouterCancelWithdrawal added in v1.26.0

func (a *WebRPC) PSClientRouterCancelWithdrawal(ctx context.Context, wallet string) (cid.Cid, error)

func (*WebRPC) PSClientRouterCompleteWithdrawal added in v1.26.0

func (a *WebRPC) PSClientRouterCompleteWithdrawal(ctx context.Context, wallet string) (cid.Cid, error)

func (*WebRPC) PSClientRouterRequestWithdrawal added in v1.26.0

func (a *WebRPC) PSClientRouterRequestWithdrawal(ctx context.Context, wallet string, amountStr string) (cid.Cid, error)

func (*WebRPC) PSClientSet added in v1.26.0

func (a *WebRPC) PSClientSet(ctx context.Context, s ProofShareClientSettings) error

PSClientSet updates or inserts a row in proofshare_client_settings. If a row for sp_id doesn't exist, do an INSERT; otherwise do an UPDATE.

func (*WebRPC) PSClientWallets added in v1.26.0

func (a *WebRPC) PSClientWallets(ctx context.Context) ([]*ProofShareClientWallet, error)

func (*WebRPC) PSGetMeta added in v1.26.0

func (a *WebRPC) PSGetMeta(ctx context.Context) (ProofShareMeta, error)

PSGetMeta returns the current meta row from proofshare_meta (always a single row).

func (*WebRPC) PSGetTos added in v1.26.0

func (a *WebRPC) PSGetTos(ctx context.Context) (proofsvc.Tos, error)

func (*WebRPC) PSListAsks added in v1.26.0

func (a *WebRPC) PSListAsks(ctx context.Context) ([]common.WorkAsk, error)

func (*WebRPC) PSListQueue added in v1.26.0

func (a *WebRPC) PSListQueue(ctx context.Context) ([]*ProofShareQueueItem, error)

PSListQueue returns all records from the proofshare_queue table, ordered by the newest first.

func (*WebRPC) PSListSettlements added in v1.26.0

func (a *WebRPC) PSListSettlements(ctx context.Context) ([]ProofShareSettlementItem, error)

PSListSettlements returns the 8 most recent settlement records, including the amount for that specific transaction.

func (*WebRPC) PSProviderLastPaymentsSummary added in v1.26.0

func (a *WebRPC) PSProviderLastPaymentsSummary(ctx context.Context) ([]ProviderLastPaymentSummary, error)

PSProviderLastPaymentsSummary returns a summary of the last payment and settlement status for each provider.

func (*WebRPC) PSProviderSettle added in v1.26.0

func (a *WebRPC) PSProviderSettle(ctx context.Context, providerID int64) (cid.Cid, error)

func (*WebRPC) PSSetMeta added in v1.26.0

func (a *WebRPC) PSSetMeta(ctx context.Context, enabled bool, wallet string, price string) error

PSSetMeta updates proofshare_meta with new "enabled" flag and "wallet" address. If you want to allow a NULL wallet, you could accept a pointer or do conditional logic.

func (*WebRPC) PartitionDetail added in v1.27.2

func (a *WebRPC) PartitionDetail(ctx context.Context, sp string, deadlineIdx uint64, partitionIdx uint64) (*PartitionDetail, error)

func (*WebRPC) PendingMessages added in v1.25.1

func (a *WebRPC) PendingMessages(ctx context.Context) (PendingMessages, error)

func (*WebRPC) PieceDealDetail added in v1.27.2

func (a *WebRPC) PieceDealDetail(ctx context.Context, pieceCid string) (*PieceDealDetailEntry, error)

func (*WebRPC) PieceInfo added in v1.24.3

func (a *WebRPC) PieceInfo(ctx context.Context, pieceCid string) (*PieceInfo, error)

func (*WebRPC) PieceParkStates added in v1.24.3

func (a *WebRPC) PieceParkStates(ctx context.Context, pieceCID string) (*ParkedPieceState, error)

PieceParkStates retrieves the park states for a given piece CID

func (*WebRPC) PieceSummary added in v1.24.3

func (a *WebRPC) PieceSummary(ctx context.Context) (*PieceSummary, error)

func (*WebRPC) PipelinePorepRestartAll added in v1.23.1

func (a *WebRPC) PipelinePorepRestartAll(ctx context.Context) error

func (*WebRPC) PipelinePorepSectors added in v1.23.0

func (a *WebRPC) PipelinePorepSectors(ctx context.Context) ([]sectorListEntry, error)

func (*WebRPC) PipelineSnapRestartAll added in v1.24.0

func (a *WebRPC) PipelineSnapRestartAll(ctx context.Context) error

func (*WebRPC) PipelineStatsMarket added in v1.24.3

func (a *WebRPC) PipelineStatsMarket(ctx context.Context) (*PipelineStats, error)

func (*WebRPC) PipelineStatsSDR added in v1.24.3

func (a *WebRPC) PipelineStatsSDR(ctx context.Context) (*PipelineStats, error)

func (*WebRPC) PipelineStatsSnap added in v1.24.3

func (a *WebRPC) PipelineStatsSnap(ctx context.Context) (*PipelineStats, error)

func (*WebRPC) PorepPipelineSummary added in v1.23.0

func (a *WebRPC) PorepPipelineSummary(ctx context.Context) ([]PorepPipelineSummary, error)

func (*WebRPC) RemoveAllowFilter added in v1.24.3

func (a *WebRPC) RemoveAllowFilter(ctx context.Context, wallet string) error

func (*WebRPC) RemoveClientFilter added in v1.24.3

func (a *WebRPC) RemoveClientFilter(ctx context.Context, name string) error

func (*WebRPC) RemoveMarketContract added in v1.27.2

func (a *WebRPC) RemoveMarketContract(ctx context.Context, contract string) error

func (*WebRPC) RemovePDPKey added in v1.25.1

func (a *WebRPC) RemovePDPKey(ctx context.Context, ownerAddress string) error

func (*WebRPC) RemovePDPService added in v1.25.1

func (a *WebRPC) RemovePDPService(ctx context.Context, id int64) error

RemovePDPService removes a PDP service from the database

func (*WebRPC) RemovePricingFilter added in v1.24.3

func (a *WebRPC) RemovePricingFilter(ctx context.Context, name string) error

func (*WebRPC) Restart added in v1.26.0

func (a *WebRPC) Restart(ctx context.Context, id int64) error

func (*WebRPC) RestartFailedTask added in v1.24.3

func (a *WebRPC) RestartFailedTask(ctx context.Context, taskID int64) error

func (*WebRPC) SectorCCScheduler added in v1.26.0

func (a *WebRPC) SectorCCScheduler(ctx context.Context) ([]SectorCCScheduler, error)

func (*WebRPC) SectorCCSchedulerDelete added in v1.26.0

func (a *WebRPC) SectorCCSchedulerDelete(ctx context.Context, sp string) error

func (*WebRPC) SectorCCSchedulerEdit added in v1.26.0

func (a *WebRPC) SectorCCSchedulerEdit(ctx context.Context, sp string, toSeal int64, weight int64, durationDays int64, enabled bool) error

func (*WebRPC) SectorDeadlineStats added in v1.27.2

func (a *WebRPC) SectorDeadlineStats(ctx context.Context) ([]DeadlineStats, error)

func (*WebRPC) SectorExpBucketAdd added in v1.27.2

func (a *WebRPC) SectorExpBucketAdd(ctx context.Context, lessThanDays int) error

func (*WebRPC) SectorExpBucketCounts added in v1.27.2

func (a *WebRPC) SectorExpBucketCounts(ctx context.Context) ([]SectorExpBucketCount, error)

func (*WebRPC) SectorExpBucketDelete added in v1.27.2

func (a *WebRPC) SectorExpBucketDelete(ctx context.Context, lessThanDays int) error

func (*WebRPC) SectorExpBuckets added in v1.27.2

func (a *WebRPC) SectorExpBuckets(ctx context.Context) ([]SectorExpBucket, error)

func (*WebRPC) SectorExpManagerPresetAdd added in v1.27.2

func (a *WebRPC) SectorExpManagerPresetAdd(ctx context.Context, preset SectorExpManagerPreset) error

func (*WebRPC) SectorExpManagerPresetDelete added in v1.27.2

func (a *WebRPC) SectorExpManagerPresetDelete(ctx context.Context, name string) error

func (*WebRPC) SectorExpManagerPresetUpdate added in v1.27.2

func (a *WebRPC) SectorExpManagerPresetUpdate(ctx context.Context, preset SectorExpManagerPreset) error

func (*WebRPC) SectorExpManagerPresets added in v1.27.2

func (a *WebRPC) SectorExpManagerPresets(ctx context.Context) ([]SectorExpManagerPreset, error)

func (*WebRPC) SectorExpManagerSPAdd added in v1.27.2

func (a *WebRPC) SectorExpManagerSPAdd(ctx context.Context, spAddress string, presetName string) error

func (*WebRPC) SectorExpManagerSPDelete added in v1.27.2

func (a *WebRPC) SectorExpManagerSPDelete(ctx context.Context, spAddress string, presetName string) error

func (*WebRPC) SectorExpManagerSPEvalCondition added in v1.27.2

func (a *WebRPC) SectorExpManagerSPEvalCondition(ctx context.Context, spAddress string, presetName string) (bool, error)

func (*WebRPC) SectorExpManagerSPToggle added in v1.27.2

func (a *WebRPC) SectorExpManagerSPToggle(ctx context.Context, spAddress string, presetName string, enabled bool) error

func (*WebRPC) SectorExpManagerSPs added in v1.27.2

func (a *WebRPC) SectorExpManagerSPs(ctx context.Context) ([]SectorExpManagerSP, error)

func (*WebRPC) SectorFileTypeStats added in v1.27.2

func (a *WebRPC) SectorFileTypeStats(ctx context.Context) ([]SectorFileTypeStats, error)

func (*WebRPC) SectorInfo added in v1.23.0

func (a *WebRPC) SectorInfo(ctx context.Context, sp string, intid int64) (*SectorInfo, error)

func (*WebRPC) SectorPipelineStats added in v1.27.2

func (a *WebRPC) SectorPipelineStats(ctx context.Context) ([]SectorPipelineStats, error)

func (*WebRPC) SectorRemove added in v1.23.0

func (a *WebRPC) SectorRemove(ctx context.Context, spid, id int64) error

func (*WebRPC) SectorRestart added in v1.24.0

func (a *WebRPC) SectorRestart(ctx context.Context, spid, id int64) error

func (*WebRPC) SectorResume added in v1.23.0

func (a *WebRPC) SectorResume(ctx context.Context, spid, id int64) error

func (*WebRPC) SectorSPStats added in v1.27.2

func (a *WebRPC) SectorSPStats(ctx context.Context) ([]SPSectorStats, error)

func (*WebRPC) SetAllowDenyList added in v1.24.3

func (a *WebRPC) SetAllowDenyList(ctx context.Context, wallet string, status bool) error

func (*WebRPC) SetClientFilters added in v1.24.3

func (a *WebRPC) SetClientFilters(ctx context.Context, name string, active bool, wallets, peers []string, filters []string, maxDealPerHour, maxDealSizePerHour int64, info string) error

func (*WebRPC) SetPriceFilters added in v1.24.3

func (a *WebRPC) SetPriceFilters(ctx context.Context, name string, minDur, maxDur int, minSize, maxSize int64, price int64, verified bool) error

func (*WebRPC) SetStorageAsk added in v1.24.3

func (a *WebRPC) SetStorageAsk(ctx context.Context, ask *StorageAsk) error

func (*WebRPC) StorageDealInfo added in v1.24.3

func (a *WebRPC) StorageDealInfo(ctx context.Context, deal string) (*StorageDealSummary, error)

func (*WebRPC) StorageGCApprove

func (a *WebRPC) StorageGCApprove(ctx context.Context, actor int64, sectorNum int64, fileType int64, storageID string) error

func (*WebRPC) StorageGCApproveAll

func (a *WebRPC) StorageGCApproveAll(ctx context.Context) error

func (*WebRPC) StorageGCMarks

func (a *WebRPC) StorageGCMarks(ctx context.Context, miner *string, sectorNum *int64, limit int, offset int) (*StorageGCMarks, error)

func (*WebRPC) StorageGCStats

func (a *WebRPC) StorageGCStats(ctx context.Context) ([]*StorageGCStats, error)

func (*WebRPC) StorageGCUnapproveAll

func (a *WebRPC) StorageGCUnapproveAll(ctx context.Context) error

func (*WebRPC) StorageStoreTypeStats added in v1.24.5

func (a *WebRPC) StorageStoreTypeStats(ctx context.Context) ([]StorageStoreStats, error)

StorageStoreTypeStats returns aggregated capacity and available space for store-type paths, grouped by each file type. A given storage path’s capacity is counted for a file type if its allow/deny lists (if set) permit that file type. In addition, if the resulting list contains more than a chosen threshold of entries, the lower-volume ones are merged into a single "Other" entry.

func (*WebRPC) StorageUseStats

func (a *WebRPC) StorageUseStats(ctx context.Context) ([]StorageUseStats, error)

func (*WebRPC) SyncerState

func (a *WebRPC) SyncerState(ctx context.Context) ([]RpcInfo, error)

func (*WebRPC) Uncordon added in v1.26.0

func (a *WebRPC) Uncordon(ctx context.Context, id int64) error

func (*WebRPC) UpdateMarketContract added in v1.27.2

func (a *WebRPC) UpdateMarketContract(ctx context.Context, contract, abiString string) error

func (*WebRPC) UpgradeDelete added in v1.23.1

func (a *WebRPC) UpgradeDelete(ctx context.Context, spid, sectorNum uint64) error

func (*WebRPC) UpgradeResetTaskIDs added in v1.23.0

func (a *WebRPC) UpgradeResetTaskIDs(ctx context.Context, spid, sectorNum int64) error

func (*WebRPC) UpgradeSectors added in v1.23.0

func (a *WebRPC) UpgradeSectors(ctx context.Context) ([]*UpgradeSector, error)

func (*WebRPC) Version

func (a *WebRPC) Version(context.Context) (string, error)

func (*WebRPC) WalletAdd added in v1.25.0

func (a *WebRPC) WalletAdd(ctx context.Context, wallet, name string) error

func (*WebRPC) WalletInfoShort added in v1.26.0

func (a *WebRPC) WalletInfoShort(ctx context.Context, walletID string) (WalletInfoShort, error)

func (*WebRPC) WalletName added in v1.25.0

func (a *WebRPC) WalletName(ctx context.Context, id string) (string, error)

func (*WebRPC) WalletNameChange added in v1.25.0

func (a *WebRPC) WalletNameChange(ctx context.Context, wallet, newName string) error

func (*WebRPC) WalletNames added in v1.25.0

func (a *WebRPC) WalletNames(ctx context.Context) (map[string]string, error)

func (*WebRPC) WalletRemove added in v1.25.0

func (a *WebRPC) WalletRemove(ctx context.Context, wallet string) error

func (*WebRPC) WinStats

func (a *WebRPC) WinStats(ctx context.Context) ([]WinStats, error)

type WinStats

type WinStats struct {
	Actor       int64    `db:"sp_id"`
	Epoch       int64    `db:"epoch"`
	Block       string   `db:"mined_cid"`
	TaskID      int64    `db:"task_id"`
	SubmittedAt NullTime `db:"submitted_at"`
	Included    NullBool `db:"included"`

	BaseComputeTime NullTime `db:"base_compute_time"`
	MinedAt         NullTime `db:"mined_at"`

	SubmittedAtStr string `db:"-"`
	TaskSuccess    string `db:"-"`
	IncludedStr    string `db:"-"`
	ComputeTime    string `db:"-"`

	Miner string
}

Jump to

Keyboard shortcuts

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