modules

package
v1.6.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2023 License: Apache-2.0, MIT Imports: 112 Imported by: 1

Documentation

Index

Constants

View Source
const (
	JWTSecretName   = "auth-jwt-private" //nolint:gosec
	KTJwtHmacSecret = "jwt-hmac-secret"  //nolint:gosec
)
View Source
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

View Source
var (
	StorageCounterDSPrefix = "/storage/nextid"
)

Functions

func APISecret

func APISecret(keystore types.KeyStore, lr lotus_repo.LockedRepo) (*dtypes.APIAlg, error)

func ClientBlockstore

func ClientBlockstore() dtypes.ClientBlockstore

TODO this should be removed.

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 CreateRetrievalTables added in v1.5.1

func CreateRetrievalTables(lc fx.Lifecycle, db *RetrievalSqlDB)

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 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 HandleProtocolProxy added in v1.5.0

func HandleProtocolProxy(lc fx.Lifecycle, pp *protocolproxy.ProtocolProxy)

func HandleRetrievalGraphsyncUpdates added in v1.5.1

func HandleRetrievalGraphsyncUpdates(duration time.Duration) func(lc fx.Lifecycle, db *rtvllog.RetrievalLogDB, m lotus_retrievalmarket.RetrievalProvider, dt lotus_dtypes.ProviderDataTransfer)

Write graphsync retrieval updates to the database

func HandleRetrievalTransports added in v1.4.0

func HandleRetrievalTransports(lc fx.Lifecycle, l *lp2pimpl.TransportsListener)

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 NewClientDatastore

func NewClientDatastore(ds lotus_dtypes.MetadataDS) dtypes.ClientDatastore

NewClientDatastore creates a datastore for the client to store its deals

func NewDealsDB

func NewDealsDB(sqldb *sql.DB) *db.DealsDB

func NewFundsDB

func NewFundsDB(sqldb *sql.DB) *db.FundsDB

func NewLegacyStorageProvider added in v1.5.0

NewLegacyStorageProvider wraps lotus's storage provider function but additionally sets up the metadata announcement for legacy deals based off of Boost's configured protocols

func NewLogsDB

func NewLogsDB(logsSqlDB *LogSqlDB) *db.LogsDB

func NewProposalLogsDB

func NewProposalLogsDB(sqldb *sql.DB) *db.ProposalLogsDB

func NewProtocolProxy added in v1.5.0

func NewProtocolProxy(cfg *config.Boost) func(h host.Host) (*protocolproxy.ProtocolProxy, error)

func NewProviderDataTransfer

NewProviderDataTransfer returns a data transfer manager

func NewRetrievalLogDB added in v1.5.1

func NewRetrievalLogDB(db *RetrievalSqlDB) *rtvllog.RetrievalLogDB

func NewTracing added in v1.4.0

func NewTracing(cfg *config.Boost) func(lc fx.Lifecycle) (*tracing.Tracing, error)

func NewTransportsListener added in v1.4.0

func NewTransportsListener(cfg *config.Boost) func(h host.Host) (*lp2pimpl.TransportsListener, error)

func RecordValidator

func RecordValidator(ps peerstore.Peerstore) record.Validator

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

RetrievalClient creates a new retrieval client attached to the client blockstore

func StorageBlockstoreAccessor

func StorageBlockstoreAccessor(importmgr dtypes.ClientImportMgr) storagemarket.BlockstoreAccessor

StorageBlockstoreAccessor returns the default storage blockstore accessor from the import manager.

func StorageNetworkName

func StorageNetworkName(ctx helpers.MetricsCtx, a v1api.FullNode) (dtypes.NetworkName, error)

Types

type Genesis

type Genesis func() (*types.BlockHeader, error)

type IdxProv added in v1.5.1

type IdxProv struct {
	fx.In

	fx.Lifecycle
	Datastore lotus_dtypes.MetadataDS
}

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

type RetrievalSqlDB added in v1.5.1

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

func NewRetrievalSqlDB added in v1.5.1

func NewRetrievalSqlDB(r repo.LockedRepo) (*RetrievalSqlDB, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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