diff --git a/.circleci/config.yml b/.circleci/config.yml index bfa65b951..d3c160cd5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -393,11 +393,9 @@ jobs: - run: go install golang.org/x/tools/cmd/goimports - run: go install github.com/hannahhoward/cbor-gen-for - run: make gen - - run: git --no-pager diff - - run: git --no-pager diff --quiet + - run: git --no-pager diff && git --no-pager diff --quiet - run: make docsgen-cli - - run: git --no-pager diff - - run: git --no-pager diff --quiet + - run: git --no-pager diff && git --no-pager diff --quiet docs-check: executor: golang @@ -412,11 +410,7 @@ jobs: - run: zcat build/openrpc/full.json.gz | jq > ../post-openrpc-full - run: zcat build/openrpc/miner.json.gz | jq > ../post-openrpc-miner - run: zcat build/openrpc/worker.json.gz | jq > ../post-openrpc-worker - - run: git --no-pager diff - - run: diff ../pre-openrpc-full ../post-openrpc-full - - run: diff ../pre-openrpc-miner ../post-openrpc-miner - - run: diff ../pre-openrpc-worker ../post-openrpc-worker - - run: git --no-pager diff --quiet + - run: diff ../pre-openrpc-full ../post-openrpc-full && diff ../pre-openrpc-miner ../post-openrpc-miner && diff ../pre-openrpc-worker ../post-openrpc-worker && git --no-pager diff && git --no-pager diff --quiet lint: &lint description: | diff --git a/.circleci/template.yml b/.circleci/template.yml index 58a91114b..6906f13f4 100644 --- a/.circleci/template.yml +++ b/.circleci/template.yml @@ -393,11 +393,9 @@ jobs: - run: go install golang.org/x/tools/cmd/goimports - run: go install github.com/hannahhoward/cbor-gen-for - run: make gen - - run: git --no-pager diff - - run: git --no-pager diff --quiet + - run: git --no-pager diff && git --no-pager diff --quiet - run: make docsgen-cli - - run: git --no-pager diff - - run: git --no-pager diff --quiet + - run: git --no-pager diff && git --no-pager diff --quiet docs-check: executor: golang @@ -412,11 +410,7 @@ jobs: - run: zcat build/openrpc/full.json.gz | jq > ../post-openrpc-full - run: zcat build/openrpc/miner.json.gz | jq > ../post-openrpc-miner - run: zcat build/openrpc/worker.json.gz | jq > ../post-openrpc-worker - - run: git --no-pager diff - - run: diff ../pre-openrpc-full ../post-openrpc-full - - run: diff ../pre-openrpc-miner ../post-openrpc-miner - - run: diff ../pre-openrpc-worker ../post-openrpc-worker - - run: git --no-pager diff --quiet + - run: diff ../pre-openrpc-full ../post-openrpc-full && diff ../pre-openrpc-miner ../post-openrpc-miner && diff ../pre-openrpc-worker ../post-openrpc-worker && git --no-pager diff && git --no-pager diff --quiet lint: &lint description: | diff --git a/chain/exchange/client.go b/chain/exchange/client.go index 7c3ea4f7e..db39628be 100644 --- a/chain/exchange/client.go +++ b/chain/exchange/client.go @@ -430,6 +430,9 @@ func (c *client) sendRequestToPeer(ctx context.Context, peer peer.ID, req *Reque } _ = stream.SetWriteDeadline(time.Time{}) // clear deadline // FIXME: Needs // its own API (https://github.com/libp2p/go-libp2p/core/issues/162). + if err := stream.CloseWrite(); err != nil { + log.Warnw("CloseWrite err", "error", err) + } // Read response. var res Response diff --git a/chain/stmgr/call.go b/chain/stmgr/call.go index 8f8aebf63..61be26e56 100644 --- a/chain/stmgr/call.go +++ b/chain/stmgr/call.go @@ -226,16 +226,6 @@ func (sm *StateManager) callInternal(ctx context.Context, msg *types.Message, pr Data: make([]byte, 65), }, } - default: - // XXX: Hack to make sending from f099 (and others) "just work". - // REMOVE ME. - msgApply = &types.SignedMessage{ - Message: *msg, - Signature: crypto.Signature{ - Type: crypto.SigTypeSecp256k1, - Data: make([]byte, 65), - }, - } } ret, err = vmi.ApplyMessage(ctx, msgApply) diff --git a/chain/vm/fvm.go b/chain/vm/fvm.go index 2ac70e6ef..a81bc10d6 100644 --- a/chain/vm/fvm.go +++ b/chain/vm/fvm.go @@ -206,14 +206,14 @@ func (x *FvmExtern) VerifyConsensusFault(ctx context.Context, a, b, extra []byte // check blocks are properly signed by their respective miner // note we do not need to check extra's: it is a parent to block b // which itself is signed, so it was willingly included by the miner - gasA, sigErr := x.VerifyBlockSig(ctx, &blockA) + gasA, sigErr := x.verifyBlockSig(ctx, &blockA) totalGas += gasA if sigErr != nil { log.Info("invalid consensus fault: cannot verify first block sig: %w", sigErr) return ret, totalGas } - gas2, sigErr := x.VerifyBlockSig(ctx, &blockB) + gas2, sigErr := x.verifyBlockSig(ctx, &blockB) totalGas += gas2 if sigErr != nil { log.Info("invalid consensus fault: cannot verify second block sig: %w", sigErr) @@ -226,7 +226,7 @@ func (x *FvmExtern) VerifyConsensusFault(ctx context.Context, a, b, extra []byte return ret, totalGas } -func (x *FvmExtern) VerifyBlockSig(ctx context.Context, blk *types.BlockHeader) (int64, error) { +func (x *FvmExtern) verifyBlockSig(ctx context.Context, blk *types.BlockHeader) (int64, error) { waddr, gasUsed, err := x.workerKeyAtLookback(ctx, blk.Miner, blk.Height) if err != nil { return gasUsed, err diff --git a/cmd/lotus-bench/main.go b/cmd/lotus-bench/main.go index d7b9b0409..279f2d5fd 100644 --- a/cmd/lotus-bench/main.go +++ b/cmd/lotus-bench/main.go @@ -468,7 +468,7 @@ var sealBenchCmd = &cli.Command{ } bo.EnvVar = make(map[string]string) - for _, envKey := range []string{"BELLMAN_NO_GPU", "FIL_PROOFS_MAXIMIZE_CACHING", "FIL_PROOFS_USE_GPU_COLUMN_BUILDER", + for _, envKey := range []string{"BELLMAN_NO_GPU", "FIL_PROOFS_USE_GPU_COLUMN_BUILDER", "FIL_PROOFS_USE_GPU_TREE_BUILDER", "FIL_PROOFS_USE_MULTICORE_SDR", "BELLMAN_CUSTOM_GPU"} { envValue, found := os.LookupEnv(envKey) if found { diff --git a/cmd/lotus-miner/sectors.go b/cmd/lotus-miner/sectors.go index 3bb904d7a..fc5fdcef6 100644 --- a/cmd/lotus-miner/sectors.go +++ b/cmd/lotus-miner/sectors.go @@ -813,6 +813,10 @@ var sectorsRenewCmd = &cli.Command{ Usage: "use up to this amount of FIL for one message. pass this flag to avoid message congestion.", Value: "0", }, + &cli.Int64Flag{ + Name: "max-sectors", + Usage: "the maximum number of sectors contained in each message message", + }, &cli.BoolFlag{ Name: "really-do-it", Usage: "pass this flag to really renew sectors, otherwise will only print out json representation of parameters", @@ -1020,10 +1024,20 @@ var sectorsRenewCmd = &cli.Command{ for l, exts := range extensions { for newExp, numbers := range exts { scount += len(numbers) - addrSectors, err := policy.GetAddressedSectorsMax(nv) + var addrSectors int + sectorsMax, err := policy.GetAddressedSectorsMax(nv) if err != nil { return err } + if cctx.Int("max-sectors") == 0 { + addrSectors = sectorsMax + } else { + addrSectors = cctx.Int("max-sectors") + if addrSectors > sectorsMax { + return xerrors.Errorf("the specified max-sectors exceeds the maximum limit") + } + } + declMax, err := policy.GetDeclarationsMax(nv) if err != nil { return err diff --git a/cmd/lotus-shed/main.go b/cmd/lotus-shed/main.go index 623afb55e..6f84739fa 100644 --- a/cmd/lotus-shed/main.go +++ b/cmd/lotus-shed/main.go @@ -51,7 +51,6 @@ func main() { exportChainCmd, exportCarCmd, consensusCmd, - storageStatsCmd, syncCmd, stateTreePruneCmd, datastoreCmd, diff --git a/cmd/lotus-shed/storage-stats.go b/cmd/lotus-shed/storage-stats.go deleted file mode 100644 index 68495545b..000000000 --- a/cmd/lotus-shed/storage-stats.go +++ /dev/null @@ -1,199 +0,0 @@ -package main - -import ( - "encoding/json" - corebig "math/big" - "os" - "strconv" - - "github.com/ipfs/go-cid" - "github.com/urfave/cli/v2" - - "github.com/filecoin-project/go-address" - "github.com/filecoin-project/go-state-types/abi" - filbig "github.com/filecoin-project/go-state-types/big" - - "github.com/filecoin-project/lotus/chain/types" - lcli "github.com/filecoin-project/lotus/cli" -) - -// How many epochs back to look at for dealstats -var defaultEpochLookback = abi.ChainEpoch(10) - -type networkTotalsOutput struct { - Epoch int64 `json:"epoch"` - Endpoint string `json:"endpoint"` - Payload networkTotals `json:"payload"` -} - -type providerMeta struct { - nonidentifiable bool -} - -// force formatting as decimal to aid human readers -type humanFloat float64 - -func (f humanFloat) MarshalJSON() ([]byte, error) { - // 'f' uses decimal digits without exponents. - // The bit size of 32 ensures we don't use too many decimal places. - return []byte(strconv.FormatFloat(float64(f), 'f', -1, 32)), nil -} - -type Totals struct { - TotalDeals int `json:"total_num_deals"` - TotalBytes int64 `json:"total_stored_data_size"` - PrivateTotalDeals int `json:"private_total_num_deals"` - PrivateTotalBytes int64 `json:"private_total_stored_data_size"` - CapacityCarryingData humanFloat `json:"capacity_fraction_carrying_data"` -} - -type networkTotals struct { - QaNetworkPower filbig.Int `json:"total_qa_power"` - RawNetworkPower filbig.Int `json:"total_raw_capacity"` - UniqueCids int `json:"total_unique_cids"` - UniqueBytes int64 `json:"total_unique_data_size"` - UniqueClients int `json:"total_unique_clients"` - UniqueProviders int `json:"total_unique_providers"` - UniquePrivateProviders int `json:"total_unique_private_providers"` - Totals - FilPlus Totals `json:"filecoin_plus_subset"` - - pieces map[cid.Cid]struct{} - clients map[address.Address]struct{} - providers map[address.Address]providerMeta -} - -var storageStatsCmd = &cli.Command{ - Name: "storage-stats", - Usage: "Translates current lotus state into a json summary suitable for driving https://storage.filecoin.io/", - Flags: []cli.Flag{ - &cli.StringFlag{ - Name: "tipset", - Usage: "Comma separated array of cids, or @height", - }, - }, - Action: func(cctx *cli.Context) error { - ctx := lcli.ReqContext(cctx) - - api, apiCloser, err := lcli.GetFullNodeAPI(cctx) - if err != nil { - return err - } - defer apiCloser() - - var ts *types.TipSet - if cctx.String("tipset") == "" { - ts, err = api.ChainHead(ctx) - if err != nil { - return err - } - ts, err = api.ChainGetTipSetByHeight(ctx, ts.Height()-defaultEpochLookback, ts.Key()) - if err != nil { - return err - } - } else { - ts, err = lcli.ParseTipSetRef(ctx, api, cctx.String("tipset")) - if err != nil { - return err - } - } - - power, err := api.StateMinerPower(ctx, address.Address{}, ts.Key()) - if err != nil { - return err - } - - netTotals := networkTotals{ - QaNetworkPower: power.TotalPower.QualityAdjPower, - RawNetworkPower: power.TotalPower.RawBytePower, - pieces: make(map[cid.Cid]struct{}), - clients: make(map[address.Address]struct{}), - providers: make(map[address.Address]providerMeta), - } - - deals, err := api.StateMarketDeals(ctx, ts.Key()) - if err != nil { - return err - } - - for _, dealInfo := range deals { - - // Only count deals that have properly started, not past/future ones - // https://github.com/filecoin-project/specs-actors/blob/v0.9.9/actors/builtin/market/deal.go#L81-L85 - // Bail on 0 as well in case SectorStartEpoch is uninitialized due to some bug - // - // Additionally if the SlashEpoch is set this means the underlying sector is - // terminated for whatever reason ( not just slashed ), and the deal record - // will soon be removed from the state entirely - if dealInfo.State.SectorStartEpoch <= 0 || - dealInfo.State.SectorStartEpoch > ts.Height() || - dealInfo.State.SlashEpoch > -1 { - continue - } - - netTotals.clients[dealInfo.Proposal.Client] = struct{}{} - - if _, seen := netTotals.providers[dealInfo.Proposal.Provider]; !seen { - pm := providerMeta{} - - mi, err := api.StateMinerInfo(ctx, dealInfo.Proposal.Provider, ts.Key()) - if err != nil { - return err - } - - if mi.PeerId == nil || *mi.PeerId == "" { - log.Infof("private provider %s", dealInfo.Proposal.Provider) - pm.nonidentifiable = true - netTotals.UniquePrivateProviders++ - } - - netTotals.providers[dealInfo.Proposal.Provider] = pm - netTotals.UniqueProviders++ - } - - if _, seen := netTotals.pieces[dealInfo.Proposal.PieceCID]; !seen { - netTotals.pieces[dealInfo.Proposal.PieceCID] = struct{}{} - netTotals.UniqueBytes += int64(dealInfo.Proposal.PieceSize) - netTotals.UniqueCids++ - } - - netTotals.TotalBytes += int64(dealInfo.Proposal.PieceSize) - netTotals.TotalDeals++ - if netTotals.providers[dealInfo.Proposal.Provider].nonidentifiable { - netTotals.PrivateTotalBytes += int64(dealInfo.Proposal.PieceSize) - netTotals.PrivateTotalDeals++ - } - - if dealInfo.Proposal.VerifiedDeal { - netTotals.FilPlus.TotalBytes += int64(dealInfo.Proposal.PieceSize) - netTotals.FilPlus.TotalDeals++ - if netTotals.providers[dealInfo.Proposal.Provider].nonidentifiable { - netTotals.FilPlus.PrivateTotalBytes += int64(dealInfo.Proposal.PieceSize) - netTotals.FilPlus.PrivateTotalDeals++ - } - } - } - - netTotals.UniqueClients = len(netTotals.clients) - - ccd, _ := new(corebig.Rat).SetFrac( - corebig.NewInt(netTotals.TotalBytes), - netTotals.RawNetworkPower.Int, - ).Float64() - netTotals.CapacityCarryingData = humanFloat(ccd) - - ccdfp, _ := new(corebig.Rat).SetFrac( - corebig.NewInt(netTotals.FilPlus.TotalBytes), - netTotals.RawNetworkPower.Int, - ).Float64() - netTotals.FilPlus.CapacityCarryingData = humanFloat(ccdfp) - - return json.NewEncoder(os.Stdout).Encode( - networkTotalsOutput{ - Epoch: int64(ts.Height()), - Endpoint: "NETWORK_WIDE_TOTALS", - Payload: netTotals, - }, - ) - }, -} diff --git a/documentation/en/cli-lotus-miner.md b/documentation/en/cli-lotus-miner.md index b666d8ca7..4b705adad 100644 --- a/documentation/en/cli-lotus-miner.md +++ b/documentation/en/cli-lotus-miner.md @@ -1897,6 +1897,7 @@ OPTIONS: --extension value try to extend selected sectors by this number of epochs, defaults to 540 days (default: 1555200) --from value only consider sectors whose current expiration epoch is in the range of [from, to], defaults to: now + 120 (1 hour) (default: 0) --max-fee value use up to this amount of FIL for one message. pass this flag to avoid message congestion. (default: "0") + --max-sectors value the maximum number of sectors contained in each message message (default: 0) --new-expiration value try to extend selected sectors to this epoch, ignoring extension (default: 0) --only-cc only extend CC sectors (useful for making sector ready for snap upgrade) (default: false) --really-do-it pass this flag to really renew sectors, otherwise will only print out json representation of parameters (default: false) diff --git a/node/builder_chain.go b/node/builder_chain.go index 39439c67f..541b451b7 100644 --- a/node/builder_chain.go +++ b/node/builder_chain.go @@ -259,7 +259,6 @@ func ConfigFullNode(c interface{}) Option { // Actor event filtering support Override(new(events.EventAPI), From(new(modules.EventAPI))), - // in lite-mode Eth event api is provided by gateway ApplyIf(isFullNode, Override(new(full.EthEventAPI), modules.EthEventAPI(cfg.ActorEvent))), ) diff --git a/node/hello/hello.go b/node/hello/hello.go index 651716da9..e05b8a482 100644 --- a/node/hello/hello.go +++ b/node/hello/hello.go @@ -158,6 +158,9 @@ func (hs *Service) SayHello(ctx context.Context, pid peer.ID) error { if err := cborutil.WriteCborRPC(s, hmsg); err != nil { return xerrors.Errorf("writing rpc to peer: %w", err) } + if err := s.CloseWrite(); err != nil { + log.Warnw("CloseWrite err", "error", err) + } go func() { defer s.Close() //nolint:errcheck diff --git a/node/impl/full/dummy.go b/node/impl/full/dummy.go new file mode 100644 index 000000000..865e14c9a --- /dev/null +++ b/node/impl/full/dummy.go @@ -0,0 +1,109 @@ +package full + +import ( + "context" + "errors" + + "github.com/filecoin-project/lotus/api" + "github.com/filecoin-project/lotus/chain/types/ethtypes" +) + +var ErrImplementMe = errors.New("Not implemented yet") + +type EthModuleDummy struct{} + +func (e *EthModuleDummy) EthBlockNumber(ctx context.Context) (ethtypes.EthUint64, error) { + return 0, ErrImplementMe +} + +func (e *EthModuleDummy) EthAccounts(ctx context.Context) ([]ethtypes.EthAddress, error) { + return nil, ErrImplementMe +} + +func (e *EthModuleDummy) EthGetBlockTransactionCountByNumber(ctx context.Context, blkNum ethtypes.EthUint64) (ethtypes.EthUint64, error) { + return 0, ErrImplementMe +} + +func (e *EthModuleDummy) EthGetBlockTransactionCountByHash(ctx context.Context, blkHash ethtypes.EthHash) (ethtypes.EthUint64, error) { + return 0, ErrImplementMe +} + +func (e *EthModuleDummy) EthGetBlockByHash(ctx context.Context, blkHash ethtypes.EthHash, fullTxInfo bool) (ethtypes.EthBlock, error) { + return ethtypes.EthBlock{}, ErrImplementMe +} + +func (e *EthModuleDummy) EthGetBlockByNumber(ctx context.Context, blkNum string, fullTxInfo bool) (ethtypes.EthBlock, error) { + return ethtypes.EthBlock{}, ErrImplementMe +} + +func (e *EthModuleDummy) EthGetTransactionByHash(ctx context.Context, txHash *ethtypes.EthHash) (*ethtypes.EthTx, error) { + return nil, ErrImplementMe +} + +func (e *EthModuleDummy) EthGetTransactionCount(ctx context.Context, sender ethtypes.EthAddress, blkOpt string) (ethtypes.EthUint64, error) { + return 0, ErrImplementMe +} + +func (e *EthModuleDummy) EthGetTransactionReceipt(ctx context.Context, txHash ethtypes.EthHash) (*api.EthTxReceipt, error) { + return nil, ErrImplementMe +} + +func (e *EthModuleDummy) EthGetTransactionByBlockHashAndIndex(ctx context.Context, blkHash ethtypes.EthHash, txIndex ethtypes.EthUint64) (ethtypes.EthTx, error) { + return ethtypes.EthTx{}, ErrImplementMe +} + +func (e *EthModuleDummy) EthGetTransactionByBlockNumberAndIndex(ctx context.Context, blkNum ethtypes.EthUint64, txIndex ethtypes.EthUint64) (ethtypes.EthTx, error) { + return ethtypes.EthTx{}, ErrImplementMe +} + +func (e *EthModuleDummy) EthGetCode(ctx context.Context, address ethtypes.EthAddress, blkOpt string) (ethtypes.EthBytes, error) { + return nil, ErrImplementMe +} + +func (e *EthModuleDummy) EthGetStorageAt(ctx context.Context, address ethtypes.EthAddress, position ethtypes.EthBytes, blkParam string) (ethtypes.EthBytes, error) { + return nil, ErrImplementMe +} + +func (e *EthModuleDummy) EthGetBalance(ctx context.Context, address ethtypes.EthAddress, blkParam string) (ethtypes.EthBigInt, error) { + return ethtypes.EthBigIntZero, ErrImplementMe +} + +func (e *EthModuleDummy) EthFeeHistory(ctx context.Context, blkCount ethtypes.EthUint64, newestBlk string, rewardPercentiles []float64) (ethtypes.EthFeeHistory, error) { + return ethtypes.EthFeeHistory{}, ErrImplementMe +} + +func (e *EthModuleDummy) EthChainId(ctx context.Context) (ethtypes.EthUint64, error) { + return 0, ErrImplementMe +} + +func (e *EthModuleDummy) NetVersion(ctx context.Context) (string, error) { + return "", ErrImplementMe +} + +func (e *EthModuleDummy) NetListening(ctx context.Context) (bool, error) { + return false, ErrImplementMe +} + +func (e *EthModuleDummy) EthProtocolVersion(ctx context.Context) (ethtypes.EthUint64, error) { + return 0, ErrImplementMe +} + +func (e *EthModuleDummy) EthGasPrice(ctx context.Context) (ethtypes.EthBigInt, error) { + return ethtypes.EthBigIntZero, ErrImplementMe +} + +func (e *EthModuleDummy) EthEstimateGas(ctx context.Context, tx ethtypes.EthCall) (ethtypes.EthUint64, error) { + return 0, ErrImplementMe +} + +func (e *EthModuleDummy) EthCall(ctx context.Context, tx ethtypes.EthCall, blkParam string) (ethtypes.EthBytes, error) { + return nil, ErrImplementMe +} + +func (e *EthModuleDummy) EthMaxPriorityFeePerGas(ctx context.Context) (ethtypes.EthBigInt, error) { + return ethtypes.EthBigIntZero, ErrImplementMe +} + +func (e *EthModuleDummy) EthSendRawTransaction(ctx context.Context, rawTx ethtypes.EthBytes) (ethtypes.EthHash, error) { + return ethtypes.EthHash{}, ErrImplementMe +} diff --git a/node/rpc.go b/node/rpc.go index 2c1798614..a96e6e3ac 100644 --- a/node/rpc.go +++ b/node/rpc.go @@ -107,7 +107,6 @@ func FullNodeHandler(a v1api.FullNode, permissioned bool, opts ...jsonrpc.Server Next: handleImportFunc, } m.Handle("/rest/v0/import", importAH) - exportAH := &auth.Handler{ Verify: a.AuthVerify, Next: handleExportFunc, diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 2b9862808..8c7323a2b 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -36,7 +36,7 @@ parts: - libhwloc15 - ocl-icd-libopencl1 override-build: | - LDFLAGS="-z noexecstack" make lotus lotus-miner lotus-worker + LDFLAGS="" make lotus lotus-miner lotus-worker cp lotus lotus-miner lotus-worker $SNAPCRAFT_PART_INSTALL cp scripts/snap-lotus-entrypoint.sh $SNAPCRAFT_PART_INSTALL diff --git a/storage/sealer/README.md b/storage/sealer/README.md index a4661f9d8..83fa3ea5f 100644 --- a/storage/sealer/README.md +++ b/storage/sealer/README.md @@ -21,16 +21,15 @@ Please report your issues with regards to sector-storage at the [lotus issue tra Manages is the top-level piece of the storage system gluing all the other pieces together. It also implements scheduling logic. -### `package stores` +### `package paths` This package implements the sector storage subsystem. Fundamentally the storage is divided into `path`s, each path has it's UUID, and stores a set of sector -'files'. There are currently 3 types of sector files - `unsealed`, `sealed`, -and `cache`. +'files'. There are currently 5 types of sector files - `unsealed`, `sealed`, `cache`, `update` and `update-cache`. Paths can be shared between nodes by sharing the underlying filesystem. -### `stores.Local` +### `paths.Local` The Local store implements SectorProvider for paths mounted in the local filesystem. Paths can be shared between nodes, and support shared filesystems @@ -38,12 +37,12 @@ such as NFS. stores.Local implements all native filesystem-related operations -### `stores.Remote` +### `paths.Remote` The Remote store extends Local store, handles fetching sector files into a local store if needed, and handles removing sectors from non-local stores. -### `stores.Index` +### `paths.Index` The Index is a singleton holding metadata about storage paths, and a mapping of sector files to paths diff --git a/storage/sealer/docs/sector-storage.svg b/storage/sealer/docs/sector-storage.svg index 3978ef2f8..0e2ed27a7 100644 --- a/storage/sealer/docs/sector-storage.svg +++ b/storage/sealer/docs/sector-storage.svg @@ -1,3 +1,4 @@ + -
LocalWorker
LocalWorker
stores.Local
stores.Local
stores.Store
stores.Store
stores.SectorIndex
stores.SectorInd...
ffiwrapper.Sealer
ffiwrapper.Seal...
SectorProvider
SectorProvider
localProvider
localProvider
Worker
Worker
stores.Remote
stores.Remote
stores.Local
stores.Local
stores.SectorIndex
stores.SectorInd...
localPaths []string
localPaths []str...
urls []string
urls []stri...
stores.SectorIndex
stores.SectorInd...
specs-storage.Prover
specs-storage.Prover
ronlyProvider
ronlyProvider
stores.Index
stores.Index
FetchHandler
FetchHandler
ffiwrapper.Sealer
ffiwrapper.Seal...
SectorProvider
SectorProvider
specs-storage.[Sealer,Storage]
specs-storage.[Sealer,Storage]
specs-storage.Prover
specs-storage.Prover
Manager API
Manager API
Scheduler
Scheduler
[]workerHandle
[]workerHandle
Worker
Worker
WorkerInfo
Worker...
resourceInfo
resourceInfo
schedQueue
schedQueue
stores.SectorIndex
stores.SectorInd...
sector-storage.Manager
sector-storage.Manager
worker management APIs
worker management APIs
Filecoin 'Miner' Node
Filecoin 'Miner' Node
HTTP API
HTTP API
/remote
/remote
JsonRPC
JsonRPC
/rpc/v0
/rpc/v0
LocalWorker
LocalWorker
stores.Local
stores.Local
stores.Store
stores.Store
stores.SectorIndex
stores.SectorInd...
ffiwrapper.Sealer
ffiwrapper.Seal...
SectorProvider
SectorProvider
localProvider
localProvider
Worker
Worker
stores.Remote
stores.Remote
stores.Local
stores.Local
stores.SectorIndex
stores.SectorInd...
localPaths []string
localPaths []str...
urls []string
urls []stri...
stores.SectorIndex
stores.SectorInd...
Miner JsonRPC client
Miner JsonRPC client
miner.Register(remoteWorker)
miner.Register(remoteWorker)
HTTP API
HTTP API
FetchHandler
FetchHandler
/remote
/remote
RemoteWorker
RemoteWorker
/rpc/v0
/rpc/v0
JsonRPC
JsonRPC
Seal Worker Node
Seal Worker Node
Viewer does not support full SVG 1.1
\ No newline at end of file +
LocalWorker
LocalWorker
paths.Local
paths.Local
paths.Store
paths.Store
paths.SectorIndex
paths.SectorIndex
ffiwrapper.Sealer
ffiwrapper.Seal...
SectorProvider
SectorProvider
localProvider
localProvider
Worker
Worker
paths.Remote
paths.Remote
paths.Local
paths.Local
paths.SectorIndex
paths.SectorIndex
localPaths []string
localPaths []str...
urls []string
urls []stri...
paths.SectorIndex
paths.SectorIndex
storiface.Prover
storiface.Prover
ronlyProvider
ronlyProvider
paths.Index
paths.Index
FetchHandler
FetchHandler
ffiwrapper.Sealer
ffiwrapper.Seal...
SectorProvider
SectorProvider
storiface.[Sealer,Storage]
storiface.[Sealer,Storage]
storiface.Prover
storiface.Prover
Manager API
Manager API
Scheduler
Scheduler
[]workerHandle
[]workerHandle
Worker
Worker
WorkerInfo
Worker...
resourceInfo
resourceInfo
schedQueue
schedQueue
paths.SectorIndex
paths.SectorIndex
sealer.Manager
sealer.Manager
worker management APIs
worker management APIs
'Lotus-Miner' Node
'Lotus-Miner' Node
HTTP API
HTTP API
/remote
/remote
JsonRPC
JsonRPC
/rpc/v0
/rpc/v0
LocalWorker
LocalWorker
paths.Local
paths.Local
paths.Store
paths.Store
paths.SectorIndex
paths.SectorIndex
ffiwrapper.Sealer
ffiwrapper.Seal...
SectorProvider
SectorProvider
localProvider
localProvider
Worker
Worker
paths.Remote
paths.Remote
paths.Local
paths.Local
paths.SectorIndex
paths.SectorIndex
localPaths []string
localPaths []str...
urls []string
urls []stri...
paths.SectorIndex
paths.SectorIndex
Miner JsonRPC client
Miner JsonRPC client
miner.Register(remoteWorker)
miner.Register(remoteWorker)
HTTP API
HTTP API
FetchHandler
FetchHandler
/remote
/remote
RemoteWorker
RemoteWorker
/rpc/v0
/rpc/v0
JsonRPC
JsonRPC
'Lotus-Worker' node
'Lotus-Worker' node
Text is not SVG - cannot display
\ No newline at end of file