Back to godoc.org

Package modules

v0.4.2
Latest Go to latest
Published: Jul 23, 2020 | Licenses: Apache-2.0 , MIT | Module: github.com/filecoin-project/lotus

Index

Package Files

Constants

const JWTSecretName = "auth-jwt-private" //nolint:gosec

Variables

var StorageCounterDSPrefix = "/storage/nextid"

func APISecret

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

func BuiltinBootstrap

func BuiltinBootstrap() (dtypes.BootstrapPeers, error)

func BuiltinDrandConfig

func BuiltinDrandConfig() dtypes.DrandConfig

func ClientMultiDatastore

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

func ConfigBootstrap

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

func Datastore

func Datastore(r repo.LockedRepo) (dtypes.MetadataDS, error)

func DoSetGenesis

func DoSetGenesis(_ dtypes.AfterGenesisSet)

func GetParams

func GetParams(sbc *ffiwrapper.Config) error

func Graphsync

func Graphsync(mctx helpers.MetricsCtx, lc fx.Lifecycle, clientBs dtypes.ClientBlockstore, chainBs dtypes.ChainBlockstore, h host.Host) (dtypes.Graphsync, error)

Graphsync creates a graphsync instance from the given loader and storer

func HandleIncomingBlocks

func HandleIncomingBlocks(mctx helpers.MetricsCtx, lc fx.Lifecycle, ps *pubsub.PubSub, s *chain.Syncer, chain *store.ChainStore, stmgr *stmgr.StateManager, h host.Host, nn dtypes.NetworkName)

func HandleIncomingMessages

func HandleIncomingMessages(mctx helpers.MetricsCtx, lc fx.Lifecycle, ps *pubsub.PubSub, mpool *messagepool.MessagePool, nn dtypes.NetworkName)

func HandleRetrieval

func HandleRetrieval(host host.Host, lc fx.Lifecycle, m retrievalmarket.RetrievalProvider)

func IpfsClientBlockstore

func IpfsClientBlockstore(ipfsMaddr string, useForRetrieval 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 MinerAddress

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

func MinerID

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

func NewClientDatastore

func NewClientDatastore(ds dtypes.MetadataDS) dtypes.ClientDatastore

NewClientDatastore creates a datastore for the client to store its deals

func NewClientDealStore

func NewClientDealStore(ds dtypes.ClientDatastore) dtypes.ClientDealStore

NewClientDealStore creates a statestore for the client to store its deals

func NewClientGraphsyncDataTransfer

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

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

func NewLocalDiscovery

func NewLocalDiscovery(ds dtypes.MetadataDS) *discovery.Local

func NewProviderDAGServiceDataTransfer

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

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

func NewProviderDealStore

func NewProviderDealStore(ds dtypes.MetadataDS) dtypes.ProviderDealStore

NewProviderDealStore creates a statestore for the client to store its deals

func NewProviderPieceStore

func NewProviderPieceStore(ds dtypes.MetadataDS) dtypes.ProviderPieceStore

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

func NewSyncer

func NewSyncer(lc fx.Lifecycle, sm *stmgr.StateManager, bsync *blocksync.BlockSync, h host.Host, beacon beacon.RandomBeacon, verifier ffiwrapper.Verifier) (*chain.Syncer, error)

func ProofsConfig

func ProofsConfig(maddr dtypes.MinerAddress, fnapi lapi.FullNode) (*ffiwrapper.Config, 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 RegisterProviderValidator

func RegisterProviderValidator(mrv dtypes.ProviderRequestValidator, dtm dtypes.ProviderDataTransfer)

RegisterProviderValidator is an initialization hook that registers the provider request validator with the data transfer module as the validator for StorageDataTransferVoucher types

func RetrievalClient

func RetrievalClient(h host.Host, bs dtypes.ClientBlockstore, dt dtypes.ClientDataTransfer, pmgr *paychmgr.Manager, payapi payapi.PaychAPI, resolver retrievalmarket.PeerResolver, ds dtypes.MetadataDS, chainapi full.ChainAPI) (retrievalmarket.RetrievalClient, error)

RetrievalClient creates a new retrieval client attached to the client blockstore

func RetrievalProvider

func RetrievalProvider(h host.Host, miner *storage.Miner, sealer sectorstorage.SectorManager, full lapi.FullNode, ds dtypes.MetadataDS, pieceStore dtypes.ProviderPieceStore, ibs dtypes.StagingBlockstore, dt dtypes.ProviderDataTransfer, onlineOk dtypes.ConsiderOnlineRetrievalDealsConfigFunc, offlineOk dtypes.ConsiderOfflineRetrievalDealsConfigFunc) (retrievalmarket.RetrievalProvider, error)

RetrievalProvider creates a new retrieval provider attached to the provider blockstore

func RunBlockSync

func RunBlockSync(h host.Host, svc *blocksync.BlockSyncService)

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 SetGenesis

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

func SetupBlockProducer

func SetupBlockProducer(lc fx.Lifecycle, ds dtypes.MetadataDS, api lapi.FullNode, epp gen.WinningPoStProver) (*miner.Miner, error)

func SetupJournal

func SetupJournal(lr repo.LockedRepo) error

func StagingBlockstore

func StagingBlockstore(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

func StagingDAG(mctx helpers.MetricsCtx, lc fx.Lifecycle, ibs dtypes.StagingBlockstore, rt routing.Routing, h host.Host) (dtypes.StagingDAG, error)

StagingDAG is a DAGService for the StagingBlockstore

func StagingGraphsync

func StagingGraphsync(mctx helpers.MetricsCtx, lc fx.Lifecycle, ibs dtypes.StagingBlockstore, h host.Host) dtypes.StagingGraphsync

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

func StorageNetworkName

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

type Genesis

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

func ErrorGenesis

func ErrorGenesis() Genesis

type RandomBeaconParams

type RandomBeaconParams struct {
	fx.In

	PubSub      *pubsub.PubSub `optional:"true"`
	Cs          *store.ChainStore
	DrandConfig dtypes.DrandConfig
}
Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier