modules

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2021 License: Apache-2.0, MIT Imports: 112 Imported by: 29

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 ManagerWorkPrefix = datastore.NewKey("/stmgr/calls")
View Source
var StorageCounterDSPrefix = "/storage/nextid"
View Source
var WorkerCallsPrefix = datastore.NewKey("/worker/calls")

Functions

func APISecret

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

func AddressSelector added in v1.2.3

func AddressSelector(addrConf *config.MinerAddressConfig) func() (*storage.AddressSelector, error)

func BadgerHotBlockstore added in v1.5.1

func BadgerHotBlockstore(lc fx.Lifecycle, r repo.LockedRepo) (dtypes.HotBlockstore, error)

func BuiltinBootstrap

func BuiltinBootstrap() (dtypes.BootstrapPeers, error)

func BuiltinDrandConfig added in v0.4.1

func BuiltinDrandConfig() dtypes.DrandSchedule

func ChainBitswap added in v0.6.2

ChainBitswap uses a blockstore that bypasses all caches.

func ChainBlockService added in v0.6.2

func ChainFlatBlockstore added in v1.5.1

func ChainSplitBlockstore added in v1.5.1

func ClientBlockstoreRetrievalStoreManager added in v0.5.0

func ClientBlockstoreRetrievalStoreManager(bs dtypes.ClientBlockstore) dtypes.ClientRetrievalStoreManager

ClientBlockstoreRetrievalStoreManager is the default version of the RetrievalStoreManager that runs on multistore

func ClientImportMgr added in v0.5.0

func ClientMultiDatastore added in v0.5.0

func ClientMultiDatastore(lc fx.Lifecycle, mctx helpers.MetricsCtx, r repo.LockedRepo) (dtypes.ClientMultiDstore, error)

func ClientRetrievalStoreManager added in v0.5.0

func ClientRetrievalStoreManager(imgr dtypes.ClientImportMgr) dtypes.ClientRetrievalStoreManager

ClientRetrievalStoreManager is the default version of the RetrievalStoreManager that runs on multistore

func ConfigBootstrap

func ConfigBootstrap(peers []string) func() (dtypes.BootstrapPeers, error)

func Datastore

func Datastore(disableLog bool) func(lc fx.Lifecycle, mctx helpers.MetricsCtx, r repo.LockedRepo) (dtypes.MetadataDS, error)

func DoSetGenesis added in v0.3.0

func DoSetGenesis(_ dtypes.AfterGenesisSet)

func DrandBootstrap added in v0.4.0

func DrandBootstrap(ds dtypes.DrandSchedule) (dtypes.DrandBootstrap, error)

func FallbackChainBlockstore added in v1.1.3

func FallbackChainBlockstore(cbs dtypes.BasicChainBlockstore) dtypes.ChainBlockstore

func FallbackStateBlockstore added in v1.5.1

func FallbackStateBlockstore(sbs dtypes.BasicStateBlockstore) dtypes.StateBlockstore

func GetParams

func GetParams(spt abi.RegisteredSealProof) error

func Graphsync added in v0.3.0

func Graphsync(parallelTransfers 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 HandleIncomingMessages

func HandleIncomingMessages(mctx helpers.MetricsCtx, lc fx.Lifecycle, ps *pubsub.PubSub, stmgr *stmgr.StateManager, mpool *messagepool.MessagePool, h host.Host, nn dtypes.NetworkName, bootstrapper dtypes.Bootstrapper)

func HandleMigrateClientFunds added in v1.1.3

func HandleMigrateClientFunds(lc fx.Lifecycle, ds dtypes.MetadataDS, wallet full.WalletAPI, fundMgr *market.FundManager)

func HandleMigrateProviderFunds added in v1.1.3

func HandleMigrateProviderFunds(lc fx.Lifecycle, ds dtypes.MetadataDS, node api.FullNode, minerAddress dtypes.MinerAddress)

func HandlePaychManager added in v1.9.0

func HandlePaychManager(lc fx.Lifecycle, pm *paychmgr.Manager)

HandlePaychManager is called by dependency injection to set up hooks

func InitFallbackBlockstores added in v1.5.1

func InitFallbackBlockstores(cbs dtypes.ChainBlockstore, sbs dtypes.StateBlockstore, rem dtypes.ChainBitswap) error

func IpfsClientBlockstore added in v0.3.0

func IpfsClientBlockstore(ipfsMaddr string, onlineMode bool) func(helpers.MetricsCtx, fx.Lifecycle, dtypes.ClientImportMgr) (dtypes.ClientBlockstore, error)

IpfsClientBlockstore returns a ClientBlockstore implementation backed by an IPFS node. If ipfsMaddr is empty, a local IPFS node is assumed considering IPFS_PATH configuration. If ipfsMaddr is not empty, it will connect to the remote IPFS node with the provided multiaddress. The flag useForRetrieval indicates if the IPFS node will also be used for storing retrieving deals.

func KeyStore

func KeyStore(lr repo.LockedRepo) (types.KeyStore, error)

func LoadGenesis

func LoadGenesis(genBytes []byte) func(dtypes.ChainBlockstore) Genesis

func LockedRepo

func LockedRepo(lr repo.LockedRepo) func(lc fx.Lifecycle) repo.LockedRepo

func MemoryConstraints added in v1.2.3

func MemoryConstraints() system.MemoryConstraints

MemoryConstraints returns the memory constraints configured for this system.

func MemoryWatchdog added in v1.2.3

func MemoryWatchdog(lr repo.LockedRepo, lc fx.Lifecycle, constraints system.MemoryConstraints)

MemoryWatchdog starts the memory watchdog, applying the computed resource constraints.

func MinerAddress added in v0.3.0

func MinerAddress(ds dtypes.MetadataDS) (dtypes.MinerAddress, error)

func MinerID added in v0.3.0

func MinerID(ma dtypes.MinerAddress) (dtypes.MinerID, error)

func NewClientDatastore added in v0.3.0

func NewClientDatastore(ds dtypes.MetadataDS) dtypes.ClientDatastore

NewClientDatastore creates a datastore for the client to store its deals

func NewClientGraphsyncDataTransfer added in v0.3.0

func NewClientGraphsyncDataTransfer(lc fx.Lifecycle, h host.Host, gs dtypes.Graphsync, ds dtypes.MetadataDS, r repo.LockedRepo) (dtypes.ClientDataTransfer, error)

NewClientGraphsyncDataTransfer returns a data transfer manager that just uses the clients's Client DAG service for transfers

func NewConsiderOfflineRetrievalDealsConfigFunc added in v0.4.1

func NewConsiderOfflineRetrievalDealsConfigFunc(r repo.LockedRepo) (dtypes.ConsiderOfflineRetrievalDealsConfigFunc, error)

func NewConsiderOfflineStorageDealsConfigFunc added in v0.4.1

func NewConsiderOfflineStorageDealsConfigFunc(r repo.LockedRepo) (dtypes.ConsiderOfflineStorageDealsConfigFunc, error)

func NewConsiderOnlineRetrievalDealsConfigFunc added in v0.4.1

func NewConsiderOnlineRetrievalDealsConfigFunc(r repo.LockedRepo) (dtypes.ConsiderOnlineRetrievalDealsConfigFunc, error)

func NewConsiderOnlineStorageDealsConfigFunc added in v0.4.1

func NewConsiderOnlineStorageDealsConfigFunc(r repo.LockedRepo) (dtypes.ConsiderOnlineStorageDealsConfigFunc, error)

func NewConsiderUnverifiedStorageDealsConfigFunc added in v1.2.3

func NewConsiderUnverifiedStorageDealsConfigFunc(r repo.LockedRepo) (dtypes.ConsiderUnverifiedStorageDealsConfigFunc, error)

func NewConsiderVerifiedStorageDealsConfigFunc added in v1.2.3

func NewConsiderVerifiedStorageDealsConfigFunc(r repo.LockedRepo) (dtypes.ConsiderVerifiedStorageDealsConfigFunc, error)

func NewDefaultMaxFeeFunc added in v1.1.3

func NewDefaultMaxFeeFunc(r repo.LockedRepo) dtypes.DefaultMaxFeeFunc

func NewGetExpectedSealDurationFunc added in v0.5.0

func NewGetExpectedSealDurationFunc(r repo.LockedRepo) (dtypes.GetExpectedSealDurationFunc, error)

func NewGetMaxDealStartDelayFunc added in v1.10.0

func NewGetMaxDealStartDelayFunc(r repo.LockedRepo) (dtypes.GetMaxDealStartDelayFunc, error)

func NewGetSealConfigFunc added in v0.5.0

func NewGetSealConfigFunc(r repo.LockedRepo) (dtypes.GetSealingConfigFunc, error)

func NewLocalDiscovery added in v0.2.1

func NewLocalDiscovery(lc fx.Lifecycle, ds dtypes.MetadataDS) (*discoveryimpl.Local, error)

func NewManager added in v1.9.0

func NewPaychStore added in v1.9.0

func NewPaychStore(ds dtypes.MetadataDS) *paychmgr.Store

func NewProviderDAGServiceDataTransfer

func NewProviderDAGServiceDataTransfer(lc fx.Lifecycle, h host.Host, gs dtypes.StagingGraphsync, ds dtypes.MetadataDS, r repo.LockedRepo) (dtypes.ProviderDataTransfer, error)

NewProviderDAGServiceDataTransfer returns a data transfer manager that just uses the provider's Staging DAG service for transfers

func NewProviderPieceStore added in v0.3.0

func NewProviderPieceStore(lc fx.Lifecycle, ds dtypes.MetadataDS) (dtypes.ProviderPieceStore, error)

NewProviderPieceStore creates a statestore for storing metadata about pieces shared by the storage and retrieval providers

func NewSetConsiderOfflineRetrievalDealsConfigFunc added in v0.4.1

func NewSetConsiderOfflineRetrievalDealsConfigFunc(r repo.LockedRepo) (dtypes.SetConsiderOfflineRetrievalDealsConfigFunc, error)

func NewSetConsiderOnlineRetrievalDealsConfigFunc added in v0.4.1

func NewSetConsiderOnlineRetrievalDealsConfigFunc(r repo.LockedRepo) (dtypes.SetConsiderOnlineRetrievalDealsConfigFunc, error)

func NewSetConsideringOfflineStorageDealsFunc added in v0.4.1

func NewSetConsideringOfflineStorageDealsFunc(r repo.LockedRepo) (dtypes.SetConsiderOfflineStorageDealsConfigFunc, error)

func NewSetConsideringOnlineStorageDealsFunc added in v0.4.1

func NewSetConsideringOnlineStorageDealsFunc(r repo.LockedRepo) (dtypes.SetConsiderOnlineStorageDealsConfigFunc, error)

func NewSetConsideringUnverifiedStorageDealsFunc added in v1.2.3

func NewSetConsideringUnverifiedStorageDealsFunc(r repo.LockedRepo) (dtypes.SetConsiderUnverifiedStorageDealsConfigFunc, error)

func NewSetConsideringVerifiedStorageDealsFunc added in v1.2.3

func NewSetConsideringVerifiedStorageDealsFunc(r repo.LockedRepo) (dtypes.SetConsiderVerifiedStorageDealsConfigFunc, error)

func NewSetExpectedSealDurationFunc added in v0.5.0

func NewSetExpectedSealDurationFunc(r repo.LockedRepo) (dtypes.SetExpectedSealDurationFunc, error)

func NewSetMaxDealStartDelayFunc added in v1.10.0

func NewSetMaxDealStartDelayFunc(r repo.LockedRepo) (dtypes.SetMaxDealStartDelayFunc, error)

func NewSetSealConfigFunc added in v0.5.0

func NewSetSealConfigFunc(r repo.LockedRepo) (dtypes.SetSealingConfigFunc, error)

func NewSetStorageDealPieceCidBlocklistConfigFunc added in v0.4.1

func NewSetStorageDealPieceCidBlocklistConfigFunc(r repo.LockedRepo) (dtypes.SetStorageDealPieceCidBlocklistConfigFunc, error)

func NewSlashFilter added in v0.5.0

func NewSlashFilter(ds dtypes.MetadataDS) *slashfilter.SlashFilter

func NewStorageAsk added in v0.3.1

func NewStorageDealPieceCidBlocklistConfigFunc added in v0.4.1

func NewStorageDealPieceCidBlocklistConfigFunc(r repo.LockedRepo) (dtypes.StorageDealPieceCidBlocklistConfigFunc, error)

func NewSyncer

func NewSyncer(params SyncerParams) (*chain.Syncer, error)

func OpenFilesystemJournal added in v0.7.1

func OpenFilesystemJournal(lr repo.LockedRepo, lc fx.Lifecycle, disabled journal.DisabledEvents) (journal.Journal, error)

func RandomSchedule added in v0.7.0

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 RetrievalClient added in v0.2.1

RetrievalClient creates a new retrieval client attached to the client blockstore

func RetrievalProvider added in v0.2.1

RetrievalProvider creates a new retrieval provider attached to the provider blockstore

func RetrievalResolver

func RetrievalResolver(l *discoveryimpl.Local) discovery.PeerResolver

func RunChainExchange added in v0.6.2

func RunChainExchange(h host.Host, svc exchange.Server)

func RunHello

func RunHello(mctx helpers.MetricsCtx, lc fx.Lifecycle, h host.Host, svc *hello.Service) error

func RunPeerMgr

func RunPeerMgr(mctx helpers.MetricsCtx, lc fx.Lifecycle, pmgr *peermgr.PeerMgr)

func SealProofType added in v1.2.0

func SealProofType(maddr dtypes.MinerAddress, fnapi v1api.FullNode) (abi.RegisteredSealProof, error)

func SectorIDCounter added in v0.3.0

func SectorIDCounter(ds dtypes.MetadataDS) sealing.SectorIDCounter

func SetGenesis

func SetGenesis(cs *store.ChainStore, g Genesis) (dtypes.AfterGenesisSet, error)

func SplitBlockstore added in v1.5.1

func StagingBlockstore added in v0.2.1

func StagingBlockstore(lc fx.Lifecycle, mctx helpers.MetricsCtx, r repo.LockedRepo) (dtypes.StagingBlockstore, error)

StagingBlockstore creates a blockstore for staging blocks for a miner in a storage deal, prior to sealing

func StagingDAG

StagingDAG is a DAGService for the StagingBlockstore

func StagingGraphsync added in v0.2.1

StagingGraphsync creates a graphsync instance which reads and writes blocks to the StagingBlockstore

func StagingMultiDatastore added in v0.5.0

func StagingMultiDatastore(lc fx.Lifecycle, mctx helpers.MetricsCtx, r repo.LockedRepo) (dtypes.StagingMultiDstore, error)

func StateFlatBlockstore added in v1.5.1

func StateManager added in v1.4.2

func StateSplitBlockstore added in v1.5.1

func StorageAuth added in v0.3.0

func StorageMiner

func StorageMiner(fc config.MinerFeeConfig) func(params StorageMinerParams) (*storage.Miner, error)

func StorageNetworkName added in v0.3.0

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

func UniversalBlockstore added in v1.5.1

func UniversalBlockstore(lc fx.Lifecycle, mctx helpers.MetricsCtx, r repo.LockedRepo) (dtypes.UniversalBlockstore, error)

UniversalBlockstore returns a single universal blockstore that stores both chain data and state data. It can be backed by a blockstore directly (e.g. Badger), or by a Splitstore.

Types

type Genesis

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

func ErrorGenesis

func ErrorGenesis() Genesis

type JwtPayload added in v0.5.0

type JwtPayload struct {
	Allow []auth.Permission
}

type MpoolNonceAPI added in v0.9.1

type MpoolNonceAPI struct {
	fx.In

	ChainModule full.ChainModuleAPI
	StateModule full.StateModuleAPI
}

MpoolNonceAPI substitutes the mpool nonce with an implementation that doesn't rely on the mpool - it just gets the nonce from actor state

func (*MpoolNonceAPI) GetNonce added in v0.9.1

func (a *MpoolNonceAPI) GetNonce(ctx context.Context, addr address.Address, tsk types.TipSetKey) (uint64, error)

GetNonce gets the nonce from current chain head.

type PaychAPI added in v1.9.0

type PaychAPI struct {
	fx.In

	full.MpoolAPI
	full.StateAPI
}

type RandomBeaconParams added in v0.3.1

type RandomBeaconParams struct {
	fx.In

	PubSub      *pubsub.PubSub `optional:"true"`
	Cs          *store.ChainStore
	DrandConfig dtypes.DrandSchedule
}

type StorageMinerParams added in v0.7.1

type StorageMinerParams struct {
	fx.In

	Lifecycle          fx.Lifecycle
	MetricsCtx         helpers.MetricsCtx
	API                v1api.FullNode
	Host               host.Host
	MetadataDS         dtypes.MetadataDS
	Sealer             sectorstorage.SectorManager
	SectorIDCounter    sealing.SectorIDCounter
	Verifier           ffiwrapper.Verifier
	Prover             ffiwrapper.Prover
	GetSealingConfigFn dtypes.GetSealingConfigFunc
	Journal            journal.Journal
	AddrSel            *storage.AddressSelector
}

type SyncerParams added in v0.7.1

type SyncerParams struct {
	fx.In

	Lifecycle    fx.Lifecycle
	MetadataDS   dtypes.MetadataDS
	StateManager *stmgr.StateManager
	ChainXchg    exchange.Client
	SyncMgrCtor  chain.SyncManagerCtor
	Host         host.Host
	Beacon       beacon.Schedule
	Verifier     ffiwrapper.Verifier
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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