webrpc

package
v1.26.0 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2025 License: Apache-2.0, MIT Imports: 66 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 DeadlineCount added in v1.24.4

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

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    *string `db:"first_cid"`
	StartOffset *int64  `db:"start_offset"`
	NumBlocks   int64   `db:"num_blocks"`

	PrevCID *string `db:"prev_cid"`

	Err  *string
	Size int64
}

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    *int64    `db:"owner_id"`
	OwnerAddr  *string   `db:"owner_addr"`
	OwnerName  *string   `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   *int64  `db:"completed_by_machine"`
	CompletedByName *string `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      sql.NullString `db:"previous"`
	Previous        string         `json:"previous"`
	SpID            int64          `db:"sp_id" json:"sp_id"`
	Addresses       sql.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"`
}

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 MK12DealDetailEntry added in v1.24.3

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

MK12DealDetailEntry combines a deal and its pipeline

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 {
	UUID           string     `db:"uuid" json:"uuid"`
	SpID           int64      `db:"sp_id" json:"sp_id"`
	Started        bool       `db:"started" json:"started"`
	PieceCid       string     `db:"piece_cid" json:"piece_cid"`
	PieceSize      int64      `db:"piece_size" json:"piece_size"`
	RawSize        *int64     `db:"raw_size" json:"raw_size"`
	Offline        bool       `db:"offline" json:"offline"`
	URL            *string    `db:"url" json:"url"`
	Headers        []byte     `db:"headers" json:"headers"`
	CommTaskID     *int64     `db:"commp_task_id" json:"commp_task_id"`
	AfterCommp     bool       `db:"after_commp" json:"after_commp"`
	PSDTaskID      *int64     `db:"psd_task_id" json:"psd_task_id"`
	AfterPSD       bool       `db:"after_psd" json:"after_psd"`
	PSDWaitTime    *time.Time `db:"psd_wait_time" json:"psd_wait_time"`
	FindDealTaskID *int64     `db:"find_deal_task_id" json:"find_deal_task_id"`
	AfterFindDeal  bool       `db:"after_find_deal" json:"after_find_deal"`
	Sector         *int64     `db:"sector" json:"sector"`
	Offset         *int64     `db:"sector_offset" json:"sector_offset"`
	CreatedAt      time.Time  `db:"created_at" json:"created_at"`
	Indexed        bool       `db:"indexed" json:"indexed"`
	Announce       bool       `db:"announce" json:"announce"`
	Complete       bool       `db:"complete" json:"complete"`
	Miner          string     `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           int64
		Layers        string
		Unschedulable bool
		RunningTasks  int
	}

	// Storage
	Storage []struct {
		ID            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
	}

	// Tasks
	RunningTasks []struct {
		ID     int64
		Task   string
		Posted string

		PoRepSector, PoRepSectorSP *int64
		PoRepSectorMiner           string
	}

	FinishedTasks []struct {
		ID      int64
		Task    string
		Posted  string
		Start   string
		Queued  string
		Took    string
		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                   *int64          `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                *time.Time      `db:"send_time" json:"send_time"`
	SendSuccess             *bool           `db:"send_success" json:"send_success"`
	SendError               *string         `db:"send_error" json:"send_error"`
	WaiterMachineID         *int64          `db:"waiter_machine_id" json:"waiter_machine_id"`
	ExecutedTSKCID          *string         `db:"executed_tsk_cid" json:"executed_tsk_cid"`
	ExecutedTSKEpoch        *int64          `db:"executed_tsk_epoch" json:"executed_tsk_epoch"`
	ExecutedMsgCID          *string         `db:"executed_msg_cid" json:"executed_msg_cid"`
	ExecutedMsgData         json.RawMessage `db:"executed_msg_data" json:"executed_msg_data"`
	ExecutedReceiptExitCode *int64          `db:"executed_rcpt_exitcode" json:"executed_rcpt_exitcode"`
	ExecutedReceiptReturn   []byte          `db:"executed_rcpt_return" json:"executed_rcpt_return"`
	ExecutedReceiptGasUsed  *int64          `db:"executed_rcpt_gas_used" json:"executed_rcpt_gas_used"`

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

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"`
	CreatedAt    time.Time `db:"created_at"`
	SnapDeals    bool      `db:"is_snap"`

	PieceSizeStr string `db:"-"`
	CreatedAtStr 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 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 {
	ID          string `db:"id" json:"id"`
	BoostDeal   bool   `db:"boost_deal" json:"boost_deal"`
	LegacyDeal  bool   `db:"legacy_deal" json:"legacy_deal"`
	SpId        int64  `db:"sp_id" json:"sp_id"`
	ChainDealId int64  `db:"chain_deal_id" json:"chain_deal_id"`
	Sector      int64  `db:"sector_num" json:"sector"`
	Offset      int64  `db:"piece_offset" json:"offset"`
	Length      int64  `db:"piece_length" json:"length"`
	RawSize     int64  `db:"raw_size" json:"raw_size"`
	Miner       string `json:"miner"`
}

type PieceInfo added in v1.24.3

type PieceInfo struct {
	PieceCid  string       `json:"piece_cid"`
	Size      int64        `json:"size"`
	CreatedAt time.Time    `json:"created_at"`
	Indexed   bool         `json:"indexed"`
	IndexedAT time.Time    `json:"indexed_at"`
	IPNIAd    string       `json:"ipni_ad"`
	Deals     []*PieceDeal `json:"deals"`
}

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 PipelineFailedStats added in v1.24.3

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

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 {
	SpID         int64 `db:"sp_id"`
	SectorNumber int64 `db:"sector_number"`

	CreateTime time.Time `db:"create_time"`

	TaskSDR    *int64 `db:"task_id_sdr"`
	AfterSDR   bool   `db:"after_sdr"`
	StartedSDR bool   `db:"started_sdr"`

	TaskTreeD    *int64  `db:"task_id_tree_d"`
	AfterTreeD   bool    `db:"after_tree_d"`
	StartedTreeD bool    `db:"started_tree_d"`
	TreeD        *string `db:"tree_d_cid"`

	TaskTreeC     *int64 `db:"task_id_tree_c"`
	AfterTreeC    bool   `db:"after_tree_c"`
	StartedTreeRC bool   `db:"started_tree_rc"`

	TaskTreeR  *int64  `db:"task_id_tree_r"`
	AfterTreeR bool    `db:"after_tree_r"`
	TreeR      *string `db:"tree_r_cid"`

	TaskSynthetic    *int64 `db:"task_id_synth"`
	AfterSynthetic   bool   `db:"after_synth"`
	StartedSynthetic bool   `db:"started_synthetic"`

	PreCommitReadyAt *time.Time `db:"precommit_ready_at"`

	TaskPrecommitMsg    *int64 `db:"task_id_precommit_msg"`
	AfterPrecommitMsg   bool   `db:"after_precommit_msg"`
	StartedPrecommitMsg bool   `db:"started_precommit_msg"`

	AfterPrecommitMsgSuccess bool    `db:"after_precommit_msg_success"`
	PreCommitMsgCid          *string `db:"precommit_msg_cid"`
	SeedEpoch                *int64  `db:"seed_epoch"`

	TaskPoRep    *int64 `db:"task_id_porep"`
	PoRepProof   []byte `db:"porep_proof"`
	AfterPoRep   bool   `db:"after_porep"`
	StartedPoRep bool   `db:"started_porep"`

	TaskFinalize    *int64 `db:"task_id_finalize"`
	AfterFinalize   bool   `db:"after_finalize"`
	StartedFinalize bool   `db:"started_finalize"`

	TaskMoveStorage    *int64 `db:"task_id_move_storage"`
	AfterMoveStorage   bool   `db:"after_move_storage"`
	StartedMoveStorage bool   `db:"started_move_storage"`

	CommitReadyAt *time.Time `db:"commit_ready_at"`

	TaskCommitMsg    *int64 `db:"task_id_commit_msg"`
	AfterCommitMsg   bool   `db:"after_commit_msg"`
	StartedCommitMsg bool   `db:"started_commit_msg"`

	AfterCommitMsgSuccess bool    `db:"after_commit_msg_success"`
	CommitMsgCid          *string `db:"commit_msg_cid"`

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

	MissingTasks []int64 `db:"missing_tasks"`
	AllTasks     []int64 `db:"all_tasks"`
}

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      *string      `db:"request_cid"       json:"request_cid,omitempty"`
	RequestUploaded bool         `db:"request_uploaded"  json:"request_uploaded"`
	PaymentWallet   *int64       `db:"payment_wallet"    json:"payment_wallet,omitempty"`
	PaymentNonce    *int64       `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          sql.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             *string `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        *string `db:"wallet" json:"wallet"`
	RequestTaskID *int64  `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 *int64    `db:"compute_task_id" json:"compute_task_id"`
	ComputeDone   bool      `db:"compute_done"   json:"compute_done"`
	SubmitTaskID  *int64    `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           sql.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 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
}

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 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 {
	OrigUnsealedCid string `db:"orig_unsealed_cid"`
	OrigSealedCid   string `db:"orig_sealed_cid"`

	UpdatedUnsealedCid string `db:"cur_unsealed_cid"`
	UpdatedSealedCid   string `db:"cur_sealed_cid"`

	PreCommitCid string  `db:"msg_cid_precommit"`
	CommitCid    string  `db:"msg_cid_commit"`
	UpdateCid    *string `db:"msg_cid_update"`

	IsCC            *bool  `db:"is_cc"`
	ExpirationEpoch *int64 `db:"expiration_epoch"`

	Deadline  *int64 `db:"deadline"`
	Partition *int64 `db:"partition"`

	UnsealedState *bool `db:"target_unseal_state"`
}

type SectorPieceMeta added in v1.23.0

type SectorPieceMeta struct {
	PieceIndex int64  `db:"piece_index"`
	PieceCid   string `db:"piece_cid"`
	PieceSize  int64  `db:"piece_size"`

	DealID           *string `db:"deal_id"`
	DataUrl          *string `db:"data_url"`
	DataRawSize      *int64  `db:"data_raw_size"`
	DeleteOnFinalize *bool   `db:"data_delete_on_finalize"`

	F05PublishCid *string `db:"f05_publish_cid"`
	F05DealID     *int64  `db:"f05_deal_id"`

	DDOPam *string `db:"direct_piece_activation_manifest"`

	// display
	StrPieceSize   string `db:"-"`
	StrDataRawSize string `db:"-"`

	// piece park
	IsParkedPiece          bool      `db:"-"`
	IsParkedPieceFound     bool      `db:"-"`
	PieceParkID            int64     `db:"-"`
	PieceParkDataUrl       string    `db:"-"`
	PieceParkCreatedAt     time.Time `db:"-"`
	PieceParkComplete      bool      `db:"-"`
	PieceParkTaskID        *int64    `db:"-"`
	PieceParkCleanupTaskID *int64    `db:"-"`

	IsSnapPiece bool `db:"is_snap"`

	MK12Deal   *bool `db:"boost_deal"`
	LegacyDeal *bool `db:"legacy_deal"`
}

Pieces

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 {
	SpID         int64     `db:"sp_id"`
	SectorNumber int64     `db:"sector_number"`
	StartTime    time.Time `db:"start_time"`

	UpgradeProof int  `db:"upgrade_proof"`
	DataAssigned bool `db:"data_assigned"`

	UpdateUnsealedCID *string `db:"update_unsealed_cid"`
	UpdateSealedCID   *string `db:"update_sealed_cid"`

	TaskEncode           *int64  `db:"task_id_encode"`
	AfterEncode          bool    `db:"after_encode"`
	TaskProve            *int64  `db:"task_id_prove"`
	AfterProve           bool    `db:"after_prove"`
	TaskSubmit           *int64  `db:"task_id_submit"`
	AfterSubmit          bool    `db:"after_submit"`
	AfterProveMsgSuccess bool    `db:"after_prove_msg_success"`
	ProveMsgTsk          []byte  `db:"prove_msg_tsk"`
	UpdateMsgCid         *string `db:"prove_msg_cid"`

	TaskMoveStorage  *int64 `db:"task_id_move_storage"`
	AfterMoveStorage bool   `db:"after_move_storage"`

	Failed          bool       `db:"failed"`
	FailedAt        *time.Time `db:"failed_at"`
	FailedReason    string     `db:"failed_reason"`
	FailedReasonMsg string     `db:"failed_reason_msg"`

	SubmitAfter *time.Time `db:"submit_after"`
}

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"`
	PieceCid  string         `db:"piece_cid" json:"piece_cid"`
	PieceSize int64          `db:"piece_size" json:"piece_size"`
	Processed bool           `db:"processed" json:"processed"`
	Error     sql.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            *int64         `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       *int64         `db:"chain_deal_id" json:"chain_deal_id"`
	PublishCid        *string        `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"`
	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"`
	IsLegacy          bool           `json:"is_legacy"`
	Indexed           *bool          `db:"indexed" json:"indexed"`
	IsDDO             bool           `db:"is_ddo" json:"is_ddo"`
}

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 *time.Time `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 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 {
	PipelineTaskID int64      `db:"pipeline_task_id"`
	Name           *string    `db:"name"`
	CompletedBy    *string    `db:"completed_by_host_and_port"`
	Result         *bool      `db:"result"`
	Err            *string    `db:"err"`
	WorkStart      *time.Time `db:"work_start"`
	WorkEnd        *time.Time `db:"work_end"`

	// display
	Took string `db:"-"`
}

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 *uint64 `db:"task_id_encode"`
	AfterEncode  bool    `db:"after_encode"`

	TaskIDProve *uint64 `db:"task_id_prove"`
	AfterProve  bool    `db:"after_prove"`

	UpdateReadyAt *time.Time `db:"update_ready_at"`

	TaskIDSubmit *uint64 `db:"task_id_submit"`
	AfterSubmit  bool    `db:"after_submit"`

	AfterProveSuccess bool `db:"after_prove_msg_success"`

	TaskIDMoveStorage *uint64 `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 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) 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) BulkRemoveFailedMarketPipelines added in v1.24.3

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

func (*WebRPC) BulkRestartFailedMarketTasks added in v1.24.3

func (a *WebRPC) BulkRestartFailedMarketTasks(ctx context.Context, taskType string) 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) ClusterTaskHistory added in v1.23.0

func (a *WebRPC) ClusterTaskHistory(ctx context.Context) ([]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) 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) EpochPretty added in v1.24.3

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

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) GetDealPipelines added in v1.24.3

func (a *WebRPC) GetDealPipelines(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) LegacyStorageDealList added in v1.24.3

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

func (*WebRPC) ListPDPKeys added in v1.25.1

func (a *WebRPC) ListPDPKeys(ctx context.Context) ([]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) MK12DealDetail added in v1.24.3

func (a *WebRPC) MK12DealDetail(ctx context.Context, pieceCid string) ([]MK12DealDetailEntry, error)

func (*WebRPC) MK12DealPipelineRemove added in v1.24.3

func (a *WebRPC) MK12DealPipelineRemove(ctx context.Context, uuid string) error

func (*WebRPC) MK12StorageDealList added in v1.24.3

func (a *WebRPC) MK12StorageDealList(ctx context.Context, limit int, offset int) ([]*StorageDealList, 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) PendingMessages added in v1.25.1

func (a *WebRPC) PendingMessages(ctx context.Context) (PendingMessages, 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) PipelineFailedTasksMarket added in v1.24.3

func (a *WebRPC) PipelineFailedTasksMarket(ctx context.Context) (*PipelineFailedStats, 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) 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) SectorInfo added in v1.23.0

func (a *WebRPC) SectorInfo(ctx context.Context, sp string, intid int64) (*SectorInfo, 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) 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) 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 *time.Time `db:"submitted_at"`
	Included    *bool      `db:"included"`

	BaseComputeTime *time.Time `db:"base_compute_time"`
	MinedAt         *time.Time `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