Documentation ¶
Index ¶
- Constants
- Variables
- func APISecret(keystore types.KeyStore, lr lotus_repo.LockedRepo) (*dtypes.APIAlg, error)
- func BasicDealFilter(cfg config.DealmakingConfig, userCmd dtypes.StorageDealFilter) ...
- func ClientBlockstore() dtypes.ClientBlockstore
- func ClientImportMgr(ds lotus_dtypes.MetadataDS, r repo.LockedRepo) (lotus_dtypes.ClientImportMgr, error)
- func ConfigBootstrap(peers []string) func() (dtypes.BootstrapPeers, error)
- func ConnectSealingService(apiInfo string) func(mctx helpers.MetricsCtx, lc fx.Lifecycle) (MinerSealingService, error)
- func ConnectStorageService(apiInfo string) func(mctx helpers.MetricsCtx, lc fx.Lifecycle) (MinerStorageService, error)
- func Datastore(disableLog bool) ...
- func Graphsync(parallelTransfersForStorage uint64, parallelTransfersForRetrieval uint64) ...
- func HandleBoostDeals(lc fx.Lifecycle, h host.Host, prov *storagemarket.Provider, a v1api.FullNode, ...)
- func HandleLegacyDeals(mctx helpers.MetricsCtx, lc fx.Lifecycle, host host.Host, ...) error
- func HandleMigrateClientFunds(lc fx.Lifecycle, ds lotus_dtypes.MetadataDS, wallet full.WalletAPI, ...)
- func HandleProposalLogCleaner(duration time.Duration) func(lc fx.Lifecycle, plDB *db.ProposalLogsDB)
- func IndexProvider(cfg config.IndexProviderConfig) ...
- func KeyStore(lr lotus_repo.LockedRepo) (types.KeyStore, error)
- func LockedRepo(lr lotus_repo.LockedRepo) func(lc fx.Lifecycle) lotus_repo.LockedRepo
- func MemoryConstraints() system.MemoryConstraints
- func MemoryWatchdog(lr lotus_repo.LockedRepo, lc fx.Lifecycle, ...)
- func NewBoostDB(r lotus_repo.LockedRepo) (*sql.DB, error)
- func NewChainDealManager(a v1api.FullNode) *storagemarket.ChainDealManager
- func NewClientDatastore(ds lotus_dtypes.MetadataDS) dtypes.ClientDatastore
- func NewConsiderOfflineRetrievalDealsConfigFunc(r lotus_repo.LockedRepo) (dtypes.ConsiderOfflineRetrievalDealsConfigFunc, error)
- func NewConsiderOfflineStorageDealsConfigFunc(r lotus_repo.LockedRepo) (dtypes.ConsiderOfflineStorageDealsConfigFunc, error)
- func NewConsiderOnlineRetrievalDealsConfigFunc(r lotus_repo.LockedRepo) (dtypes.ConsiderOnlineRetrievalDealsConfigFunc, error)
- func NewConsiderOnlineStorageDealsConfigFunc(r lotus_repo.LockedRepo) (dtypes.ConsiderOnlineStorageDealsConfigFunc, error)
- func NewConsiderUnverifiedStorageDealsConfigFunc(r lotus_repo.LockedRepo) (dtypes.ConsiderUnverifiedStorageDealsConfigFunc, error)
- func NewConsiderVerifiedStorageDealsConfigFunc(r lotus_repo.LockedRepo) (dtypes.ConsiderVerifiedStorageDealsConfigFunc, error)
- func NewDealsDB(sqldb *sql.DB) *db.DealsDB
- func NewFundsDB(sqldb *sql.DB) *db.FundsDB
- func NewGetExpectedSealDurationFunc(r lotus_repo.LockedRepo) (dtypes.GetExpectedSealDurationFunc, error)
- func NewGetMaxDealStartDelayFunc(r lotus_repo.LockedRepo) (dtypes.GetMaxDealStartDelayFunc, error)
- func NewGraphqlServer(cfg *config.Boost) ...
- func NewLogsDB(logsSqlDB *LogSqlDB) *db.LogsDB
- func NewProposalLogsDB(sqldb *sql.DB) *db.ProposalLogsDB
- func NewProviderDataTransfer(lc fx.Lifecycle, net dtypes.ProviderTransferNetwork, ...) (dtypes.ProviderDataTransfer, error)
- func NewSetConsiderOfflineRetrievalDealsConfigFunc(r lotus_repo.LockedRepo) (dtypes.SetConsiderOfflineRetrievalDealsConfigFunc, error)
- func NewSetConsiderOnlineRetrievalDealsConfigFunc(r lotus_repo.LockedRepo) (dtypes.SetConsiderOnlineRetrievalDealsConfigFunc, error)
- func NewSetConsideringOfflineStorageDealsFunc(r lotus_repo.LockedRepo) (dtypes.SetConsiderOfflineStorageDealsConfigFunc, error)
- func NewSetConsideringOnlineStorageDealsFunc(r lotus_repo.LockedRepo) (dtypes.SetConsiderOnlineStorageDealsConfigFunc, error)
- func NewSetConsideringUnverifiedStorageDealsFunc(r lotus_repo.LockedRepo) (dtypes.SetConsiderUnverifiedStorageDealsConfigFunc, error)
- func NewSetConsideringVerifiedStorageDealsFunc(r lotus_repo.LockedRepo) (dtypes.SetConsiderVerifiedStorageDealsConfigFunc, error)
- func NewSetExpectedSealDurationFunc(r lotus_repo.LockedRepo) (dtypes.SetExpectedSealDurationFunc, error)
- func NewSetMaxDealStartDelayFunc(r lotus_repo.LockedRepo) (dtypes.SetMaxDealStartDelayFunc, error)
- func NewSetStorageDealPieceCidBlocklistConfigFunc(r lotus_repo.LockedRepo) (dtypes.SetStorageDealPieceCidBlocklistConfigFunc, error)
- func NewStorageDealPieceCidBlocklistConfigFunc(r lotus_repo.LockedRepo) (dtypes.StorageDealPieceCidBlocklistConfigFunc, error)
- func NewStorageMarketProvider(provAddr address.Address, cfg *config.Boost) ...
- func RecordValidator(ps peerstore.Peerstore) record.Validator
- func RegisterClientValidator(crv dtypes.ClientRequestValidator, dtm dtypes.ClientDataTransfer)
- func ResourceManager(connMgrHi uint) func(lc fx.Lifecycle, repo repo.LockedRepo) (network.ResourceManager, error)
- func RetrievalBlockstoreAccessor(r repo.LockedRepo) (retrievalmarket.BlockstoreAccessor, error)
- func RetrievalClient(lc fx.Lifecycle, h host.Host, r repo.LockedRepo, dt dtypes.ClientDataTransfer, ...) (retrievalmarket.RetrievalClient, error)
- func RetrievalDealFilter(userFilter dtypes.RetrievalDealFilter) ...
- func StorageBlockstoreAccessor(importmgr dtypes.ClientImportMgr) storagemarket.BlockstoreAccessor
- func StorageClient(lc fx.Lifecycle, h host.Host, dataTransfer dtypes.ClientDataTransfer, ...) (storagemarket.StorageClient, error)
- func StorageNetworkName(ctx helpers.MetricsCtx, a v1api.FullNode) (dtypes.NetworkName, error)
- type Genesis
- type JwtPayload
- type LogSqlDB
- type MinerSealingService
- type MinerStorageService
Constants ¶
const ( JWTSecretName = "auth-jwt-private" //nolint:gosec KTJwtHmacSecret = "jwt-hmac-secret" //nolint:gosec )
const ( // EnvWatchdogDisabled is an escape hatch to disable the watchdog explicitly // in case an OS/kernel appears to report incorrect information. The // watchdog will be disabled if the value of this env variable is 1. EnvWatchdogDisabled = "LOTUS_DISABLE_WATCHDOG" )
Variables ¶
var (
StorageCounterDSPrefix = "/storage/nextid"
)
Functions ¶
func APISecret ¶
func APISecret(keystore types.KeyStore, lr lotus_repo.LockedRepo) (*dtypes.APIAlg, error)
func BasicDealFilter ¶
func BasicDealFilter(cfg config.DealmakingConfig, userCmd dtypes.StorageDealFilter) func(onlineOk dtypes.ConsiderOnlineStorageDealsConfigFunc, offlineOk dtypes.ConsiderOfflineStorageDealsConfigFunc, verifiedOk dtypes.ConsiderVerifiedStorageDealsConfigFunc, unverifiedOk dtypes.ConsiderUnverifiedStorageDealsConfigFunc, blocklistFunc dtypes.StorageDealPieceCidBlocklistConfigFunc, expectedSealTimeFunc dtypes.GetExpectedSealDurationFunc, startDelay dtypes.GetMaxDealStartDelayFunc, r lotus_repo.LockedRepo, ) dtypes.StorageDealFilter
func ClientBlockstore ¶
func ClientBlockstore() dtypes.ClientBlockstore
TODO this should be removed.
func ClientImportMgr ¶
func ClientImportMgr(ds lotus_dtypes.MetadataDS, r repo.LockedRepo) (lotus_dtypes.ClientImportMgr, error)
func ConfigBootstrap ¶
func ConfigBootstrap(peers []string) func() (dtypes.BootstrapPeers, error)
func ConnectSealingService ¶
func ConnectSealingService(apiInfo string) func(mctx helpers.MetricsCtx, lc fx.Lifecycle) (MinerSealingService, error)
func ConnectStorageService ¶
func ConnectStorageService(apiInfo string) func(mctx helpers.MetricsCtx, lc fx.Lifecycle) (MinerStorageService, error)
func Datastore ¶
func Datastore(disableLog bool) func(lc fx.Lifecycle, mctx helpers.MetricsCtx, r lotus_repo.LockedRepo) (lotus_dtypes.MetadataDS, error)
func Graphsync ¶
func Graphsync(parallelTransfersForStorage uint64, parallelTransfersForRetrieval uint64) func(mctx helpers.MetricsCtx, lc fx.Lifecycle, r repo.LockedRepo, clientBs dtypes.ClientBlockstore, chainBs dtypes.ExposedBlockstore, h host.Host) (dtypes.Graphsync, error)
Graphsync creates a graphsync instance from the given loader and storer
func HandleBoostDeals ¶
func HandleBoostDeals(lc fx.Lifecycle, h host.Host, prov *storagemarket.Provider, a v1api.FullNode, legacySP lotus_storagemarket.StorageProvider, idxProv *indexprovider.Wrapper, plDB *db.ProposalLogsDB)
func HandleLegacyDeals ¶
func HandleLegacyDeals(mctx helpers.MetricsCtx, lc fx.Lifecycle, host host.Host, lsp lotus_storagemarket.StorageProvider, j journal.Journal) error
func HandleMigrateClientFunds ¶
func HandleMigrateClientFunds(lc fx.Lifecycle, ds lotus_dtypes.MetadataDS, wallet full.WalletAPI, fundMgr *market.FundManager)
func HandleProposalLogCleaner ¶
func HandleProposalLogCleaner(duration time.Duration) func(lc fx.Lifecycle, plDB *db.ProposalLogsDB)
Boost inserts a row into the DB for each deal proposal accepted or rejected. This method periodically cleans up the rows.
func IndexProvider ¶
func IndexProvider(cfg config.IndexProviderConfig) func(params lotus_modules.IdxProv, marketHost host.Host, dt dtypes.ProviderDataTransfer, maddr dtypes.MinerAddress, ps *pubsub.PubSub, nn dtypes.NetworkName) (provider.Interface, error)
func KeyStore ¶
func KeyStore(lr lotus_repo.LockedRepo) (types.KeyStore, error)
func LockedRepo ¶
func LockedRepo(lr lotus_repo.LockedRepo) func(lc fx.Lifecycle) lotus_repo.LockedRepo
func MemoryConstraints ¶
func MemoryConstraints() system.MemoryConstraints
MemoryConstraints returns the memory constraints configured for this system.
func MemoryWatchdog ¶
func MemoryWatchdog(lr lotus_repo.LockedRepo, lc fx.Lifecycle, constraints system.MemoryConstraints)
MemoryWatchdog starts the memory watchdog, applying the computed resource constraints.
func NewBoostDB ¶
func NewBoostDB(r lotus_repo.LockedRepo) (*sql.DB, error)
func NewChainDealManager ¶
func NewChainDealManager(a v1api.FullNode) *storagemarket.ChainDealManager
func NewClientDatastore ¶
func NewClientDatastore(ds lotus_dtypes.MetadataDS) dtypes.ClientDatastore
NewClientDatastore creates a datastore for the client to store its deals
func NewConsiderOfflineRetrievalDealsConfigFunc ¶
func NewConsiderOfflineRetrievalDealsConfigFunc(r lotus_repo.LockedRepo) (dtypes.ConsiderOfflineRetrievalDealsConfigFunc, error)
func NewConsiderOfflineStorageDealsConfigFunc ¶
func NewConsiderOfflineStorageDealsConfigFunc(r lotus_repo.LockedRepo) (dtypes.ConsiderOfflineStorageDealsConfigFunc, error)
func NewConsiderOnlineRetrievalDealsConfigFunc ¶
func NewConsiderOnlineRetrievalDealsConfigFunc(r lotus_repo.LockedRepo) (dtypes.ConsiderOnlineRetrievalDealsConfigFunc, error)
func NewConsiderOnlineStorageDealsConfigFunc ¶
func NewConsiderOnlineStorageDealsConfigFunc(r lotus_repo.LockedRepo) (dtypes.ConsiderOnlineStorageDealsConfigFunc, error)
func NewConsiderUnverifiedStorageDealsConfigFunc ¶
func NewConsiderUnverifiedStorageDealsConfigFunc(r lotus_repo.LockedRepo) (dtypes.ConsiderUnverifiedStorageDealsConfigFunc, error)
func NewConsiderVerifiedStorageDealsConfigFunc ¶
func NewConsiderVerifiedStorageDealsConfigFunc(r lotus_repo.LockedRepo) (dtypes.ConsiderVerifiedStorageDealsConfigFunc, error)
func NewGetExpectedSealDurationFunc ¶
func NewGetExpectedSealDurationFunc(r lotus_repo.LockedRepo) (dtypes.GetExpectedSealDurationFunc, error)
func NewGetMaxDealStartDelayFunc ¶
func NewGetMaxDealStartDelayFunc(r lotus_repo.LockedRepo) (dtypes.GetMaxDealStartDelayFunc, error)
func NewGraphqlServer ¶
func NewGraphqlServer(cfg *config.Boost) func(lc fx.Lifecycle, r repo.LockedRepo, h host.Host, prov *storagemarket.Provider, dealsDB *db.DealsDB, logsDB *db.LogsDB, plDB *db.ProposalLogsDB, fundsDB *db.FundsDB, fundMgr *fundmanager.FundManager, storageMgr *storagemanager.StorageManager, publisher *storageadapter.DealPublisher, spApi sealingpipeline.API, legacyProv lotus_storagemarket.StorageProvider, legacyDT lotus_dtypes.ProviderDataTransfer, ps lotus_dtypes.ProviderPieceStore, sa retrievalmarket.SectorAccessor, dagst dagstore.Interface, fullNode v1api.FullNode) *gql.Server
func NewProposalLogsDB ¶
func NewProposalLogsDB(sqldb *sql.DB) *db.ProposalLogsDB
func NewProviderDataTransfer ¶
func NewProviderDataTransfer(lc fx.Lifecycle, net dtypes.ProviderTransferNetwork, transport dtypes.ProviderTransport, ds dtypes.MetadataDS, r repo.LockedRepo) (dtypes.ProviderDataTransfer, error)
NewProviderDataTransfer returns a data transfer manager
func NewSetConsiderOfflineRetrievalDealsConfigFunc ¶
func NewSetConsiderOfflineRetrievalDealsConfigFunc(r lotus_repo.LockedRepo) (dtypes.SetConsiderOfflineRetrievalDealsConfigFunc, error)
func NewSetConsiderOnlineRetrievalDealsConfigFunc ¶
func NewSetConsiderOnlineRetrievalDealsConfigFunc(r lotus_repo.LockedRepo) (dtypes.SetConsiderOnlineRetrievalDealsConfigFunc, error)
func NewSetConsideringOfflineStorageDealsFunc ¶
func NewSetConsideringOfflineStorageDealsFunc(r lotus_repo.LockedRepo) (dtypes.SetConsiderOfflineStorageDealsConfigFunc, error)
func NewSetConsideringOnlineStorageDealsFunc ¶
func NewSetConsideringOnlineStorageDealsFunc(r lotus_repo.LockedRepo) (dtypes.SetConsiderOnlineStorageDealsConfigFunc, error)
func NewSetConsideringUnverifiedStorageDealsFunc ¶
func NewSetConsideringUnverifiedStorageDealsFunc(r lotus_repo.LockedRepo) (dtypes.SetConsiderUnverifiedStorageDealsConfigFunc, error)
func NewSetConsideringVerifiedStorageDealsFunc ¶
func NewSetConsideringVerifiedStorageDealsFunc(r lotus_repo.LockedRepo) (dtypes.SetConsiderVerifiedStorageDealsConfigFunc, error)
func NewSetExpectedSealDurationFunc ¶
func NewSetExpectedSealDurationFunc(r lotus_repo.LockedRepo) (dtypes.SetExpectedSealDurationFunc, error)
func NewSetMaxDealStartDelayFunc ¶
func NewSetMaxDealStartDelayFunc(r lotus_repo.LockedRepo) (dtypes.SetMaxDealStartDelayFunc, error)
func NewSetStorageDealPieceCidBlocklistConfigFunc ¶
func NewSetStorageDealPieceCidBlocklistConfigFunc(r lotus_repo.LockedRepo) (dtypes.SetStorageDealPieceCidBlocklistConfigFunc, error)
func NewStorageDealPieceCidBlocklistConfigFunc ¶
func NewStorageDealPieceCidBlocklistConfigFunc(r lotus_repo.LockedRepo) (dtypes.StorageDealPieceCidBlocklistConfigFunc, error)
func NewStorageMarketProvider ¶
func NewStorageMarketProvider(provAddr address.Address, cfg *config.Boost) func(lc fx.Lifecycle, h host.Host, a v1api.FullNode, sqldb *sql.DB, dealsDB *db.DealsDB, fundMgr *fundmanager.FundManager, storageMgr *storagemanager.StorageManager, dp *storageadapter.DealPublisher, secb *sectorblocks.SectorBlocks, sps sealingpipeline.API, df dtypes.StorageDealFilter, logsSqlDB *LogSqlDB, logsDB *db.LogsDB, dagst *mktsdagstore.Wrapper, ps lotus_dtypes.ProviderPieceStore, ip *indexprovider.Wrapper, lp lotus_storagemarket.StorageProvider, cdm *storagemarket.ChainDealManager) (*storagemarket.Provider, error)
func RecordValidator ¶
RecordValidator provides namesys compatible routing record validator
func RegisterClientValidator ¶
func RegisterClientValidator(crv dtypes.ClientRequestValidator, dtm dtypes.ClientDataTransfer)
RegisterClientValidator is an initialization hook that registers the client request validator with the data transfer module as the validator for StorageDataTransferVoucher types
func ResourceManager ¶ added in v1.2.0
func ResourceManager(connMgrHi uint) func(lc fx.Lifecycle, repo repo.LockedRepo) (network.ResourceManager, error)
The code in this file is a direct copy from lotus. Unfortunately the lotus modules ResourceManager checks repo.RepoType().Type() == "FullNode", but the Boost node reports "Boost" as its type rather then "FullNode" so we need to change this one line
func RetrievalBlockstoreAccessor ¶
func RetrievalBlockstoreAccessor(r repo.LockedRepo) (retrievalmarket.BlockstoreAccessor, error)
RetrievalBlockstoreAccessor returns the default retrieval blockstore accessor using the subdirectory `retrievals` under the repo.
func RetrievalClient ¶
func RetrievalClient(lc fx.Lifecycle, h host.Host, r repo.LockedRepo, dt dtypes.ClientDataTransfer, payAPI payapi.PaychAPI, resolver discovery.PeerResolver, ds lotus_dtypes.MetadataDS, chainAPI full.ChainAPI, stateAPI full.StateAPI, accessor retrievalmarket.BlockstoreAccessor, j journal.Journal) (retrievalmarket.RetrievalClient, error)
RetrievalClient creates a new retrieval client attached to the client blockstore
func RetrievalDealFilter ¶
func RetrievalDealFilter(userFilter dtypes.RetrievalDealFilter) func(onlineOk dtypes.ConsiderOnlineRetrievalDealsConfigFunc, offlineOk dtypes.ConsiderOfflineRetrievalDealsConfigFunc) dtypes.RetrievalDealFilter
func StorageBlockstoreAccessor ¶
func StorageBlockstoreAccessor(importmgr dtypes.ClientImportMgr) storagemarket.BlockstoreAccessor
StorageBlockstoreAccessor returns the default storage blockstore accessor from the import manager.
func StorageClient ¶
func StorageClient(lc fx.Lifecycle, h host.Host, dataTransfer dtypes.ClientDataTransfer, discovery *discoveryimpl.Local, deals dtypes.ClientDatastore, scn storagemarket.StorageClientNode, accessor storagemarket.BlockstoreAccessor, j journal.Journal) (storagemarket.StorageClient, error)
func StorageNetworkName ¶
func StorageNetworkName(ctx helpers.MetricsCtx, a v1api.FullNode) (dtypes.NetworkName, error)
Types ¶
type Genesis ¶
type Genesis func() (*types.BlockHeader, error)
type JwtPayload ¶
type JwtPayload struct {
Allow []auth.Permission
}
type LogSqlDB ¶
type LogSqlDB struct {
// contains filtered or unexported fields
}
func NewLogsSqlDB ¶
func NewLogsSqlDB(r repo.LockedRepo) (*LogSqlDB, error)
type MinerSealingService ¶
type MinerSealingService lapi.StorageMiner
type MinerStorageService ¶
type MinerStorageService lapi.StorageMiner