Compare commits

...
3846 Commits
Author SHA1 Message Date
Jiaying Wang e68b8e96c7 Merge pull request #9745 from filecoin-project/release/v1.18.1
build:release: v1.18.1
2022-11-29 00:10:14 -05:00
c32b8af65f build:release: v1.18.1 prep (#9744)
* fix: cli: check found before dereferencing SectorInfo

* v1.18.1 prep

* Docsgen-cli

Co-authored-by: Aayush <arajasek94@gmail.com>
Co-authored-by: Geoff Stuart <geoff.vball@gmail.com>
2022-11-28 23:28:32 -05:00
+3 bd10bdf99a build: release: v1.18.0 (#9652)
* build: Bump version to v1.17.3-dev

* build: set version to v1.18.0-dev

* chore: actors: Allow builtin-actors to return a map of methods (#9342)

* Allow builtin-actors to return a map of methods

* go mod

* Fix tests

* Fix tests, check carefully please

* Delete lotus-pond (#9352)

* feat: add StateNetworkVersion to mpool API

* chore: refactor: rename NewestNetworkVersion

* feat: actors: Integrate datacap actor into lotus (#9348)

* Integrate datacap actor

* Implement datacap actor in chain/builtin

* feat: support typed errors over RPC

* chore: deps: update to go-jsonrpc 0.1.8

* remove duplicate import

* fix: itest: check for closed connection

* chore: refactor: move retry test to API

* address magik supernit

* Add ability to only have single partition per msg for partitions with recovery sectors

* doc gen

* Address comments

* Return beneficiary info from miner state Info()

* Update builtin-actors to dev/20220922-v9 which includes FIP-0045 changes in progress

* Integrate verifreg changes to lotus

* Setup datacap actor

* Update builtin-actors to dev/20220922-v9-1

* Update datacap actor to query datacap instead of verifreg

* update gst

* update markets

* update actors with hamt fix

* update gst

* Update datacap to parse tokens

* Update bundles

* datacap and verifreg actors use ID addresses without protocol byte

* update builtin-actors to rc1

* update go-fil-markets

* Update bundles to rc2

* Integrate the v9 migration

* Add api for getting allocation

* Add upgrade epoch for butterfly

* Tweak PreSeal struct to be infra-friendly

* docsgen

* More tweaking of PreSeal for genesis

* review fixes

* Use fake cid for test

* add butterfly artifacts for oct 5 upgrade

* check datacaps for v8 verifreg match v9 datacap actor

* Remove print statements

* Update to go-state-types master

* Update to go-state-types v0.9.0-rc1

* review fixes

* use go-fil-markets v1.24.0-v17

* Add accessors for allocations and claims maps

* fix: missing permissions tag

* butterfly

* update butterfly artifacts

* sealing pipeline: Prepare deal assigning logic for FIP-45

* sealing pipeline: Get allocationId with StateApi

* use NoAllocationID instead of nil AllocationId

* address review

* Add datacap actor to registry.go

* Add cli for listing allocations and removing expired allocations

* Update to go-state-types master

* deps: upgrade go-merkledag to 0.8.0

* shark params

* Update cli/filplus.go

Co-authored-by: Aayush Rajasekaran <arajasek94@gmail.com>

* revert change to verifreg util

* docsgen-cli

* miss the stuff

* Update FFI

* Update go-state-types to v0.9.0

* Update builtin-actors to v9.0.0

* add calib upgrade epcoh

* update  the upgrade envvar

* kill shark

* Remove fvm splash banner from nv17 upgrade

* check invariance for pending deals and allocations

* check pending verified deal proposal migrated to allocation

* Add check for unsealed CID in precommit sectors

* Fix counting of allocations in nv17 migration test

* make gen

* pass state trees as pointers

* Add assertion that migrations with & without cache are the same

* compare allocation to verified deal proposal

* Fix miner state precommit info

* fix migration test tool

* add changelog

* Update to go-state-types v0.9.1

* Integrate builtin-actors v9.0.1

* chore: ver: bump version for rc3 (#9512)

* Bump version to 1.18.0-rc3

* Update CHANGELOG.md

* Update CHANGELOG.md

Co-authored-by: Aayush Rajasekaran <arajasek94@gmail.com>

* Update CHANGELOG.md

Co-authored-by: Aayush Rajasekaran <arajasek94@gmail.com>

Co-authored-by: Jiaying Wang <42981373+jennijuju@users.noreply.github.com>
Co-authored-by: Aayush Rajasekaran <arajasek94@gmail.com>

* Migration: Use autobatch bs

* Fix autobatch

Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>

* Invoker: Use MethodMeta from go-state-types

* Add a second premigration for nv17

* Add more shed tools for migration checking

* address review

* Lotus release v1.18.0-rc4

* fix: ci: fix app-image build on ci (#9527)

* Remove old go version first

* Add GO_VERSION file

* Use GO_VERSION to set / verify go version

* mv GO_VERSION GO_VERSION_MIN

* Use GO_VERSION_MIN in Makefile check

Co-authored-by: Ian Davis <jungziege@gmail.com>

* Update to latest go-state-types for migration fixes

* go mod tidy

* fix: use api.ErrActorNotFound instead of types.ErrActorNotFound

* fix: add fields to ForkUpgradeParams

* docs: update actors_version_checklist.md

* chore: fix lint

* update to go state type v0.9.6 with market migration fix (#9545)

* update go-state-types to v-0.9.7

* Add invariant checks to migration

* fix invariant check: number of entries in datacap actor should include verifreg

* Invariant checks: Only include not-activated deals

* test: nv17 migration

* Address review

* add lotus-shed invariance method

* Migration cli takes a stateroot cid and a height

* make gen

* Update to builtin-actors v9.0.2

* Failing test that shows that notaries can remove datacap from the verifreg actor

* Test that should pass when the problem is solved

* make gen

* Review fixes

* statemanager call function will return call information even if call errors

* update go-state-types

* update builtin-actors

* bubble up errors properly from ApplyImplicitMessage

* bump to rc5

* set new upgrade heights for calibnet

* set new upgrade height for butterfly

* tweak calibnet upgrade schedule

* clarify changelog note about calibnet

* butterfly

* update calibnet artifacts

* Allow setting local bundles for Debug FVM for av 9+

* fix: autobatch: remove potential deadlock when a block is missing

Check the _underlying_ blockstore instead of recursing. Also, drop the
lock before we do that.

* fix imports

* build: set shark mainnet epoch (#9640)

* chore: build: Lotus release v1.18.0 (#9641)

* Lotus release v1.18.0

* add changelog

* address review

* changelog improvement

Co-authored-by: Jennifer Wang <jiayingw703@gmail.com>
Co-authored-by: Jiaying Wang <42981373+jennijuju@users.noreply.github.com>

Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
Co-authored-by: Łukasz Magiera <magik6k@gmail.com>
Co-authored-by: Łukasz Magiera <magik6k@users.noreply.github.com>
Co-authored-by: Aayush <arajasek94@gmail.com>
Co-authored-by: Geoff Stuart <geoff.vball@gmail.com>
Co-authored-by: Shrenuj Bansal <shrenuj.bansal@protocol.ai>
Co-authored-by: simlecode <69969590+simlecode@users.noreply.github.com>
Co-authored-by: Rod Vagg <rod@vagg.org>
Co-authored-by: Jakub Sztandera <kubuxu@protocol.ai>
Co-authored-by: Ian Davis <jungziege@gmail.com>
Co-authored-by: zenground0 <ZenGround0@users.noreply.github.com>
Co-authored-by: Steven Allen <steven@stebalien.com>
2022-11-15 20:57:23 -05:00
Łukasz Magiera fb0fb7144b Merge pull request #9432 from filecoin-project/release/v1.17.2
release: v1.17.2
2022-10-05 18:32:08 +00:00
Jiaying Wang c4901e998a Merge pull request #9431 from filecoin-project/chore/v1.17.2-prep
Release v1.17.2
2022-10-05 13:45:08 -04:00
Łukasz Magiera d468c36216 release v1.17.2 2022-10-05 16:58:49 +00:00
Łukasz Magiera 4d7eddc52c Merge pull request #9428 from filecoin-project/backport/9402
fix: renew --only-cc with sectorfile
2022-10-05 16:17:06 +00:00
Phi 396f5d610e fix: renew --only-cc with sectorfile
Add the ability to extend/renew only CC-sectors with the `--only-cc` when using a sector-file.
2022-10-05 15:43:13 +00:00
Łukasz Magiera 3d23a54fe4 Merge pull request #9393 from filecoin-project/chore/v1.17.2-rc2-prep
v1.17.2-rc2
2022-09-29 15:22:49 +00:00
Łukasz Magiera 258001c6aa changelog: Add v1.17.2-rc2 entry 2022-09-29 15:16:57 +00:00
Łukasz Magiera 310f20e81b v1.17.2-rc2 2022-09-29 15:08:09 +00:00
Łukasz Magiera c42f88e4d3 Merge pull request #9389 from filecoin-project/backport/9386
[v1.17.2 backport] Use golang 1.18.1 to build appimage
2022-09-28 14:28:32 +00:00
Ian Davis bb8c3bad86 Use golang 1.18.1 to build appimage 2022-09-28 10:15:13 +00:00
Łukasz Magiera 311c8b25fe Merge pull request #9383 from filecoin-project/backports/17.2rc2
v1.17.2 backports
2022-09-27 16:23:18 +00:00
Ian Davis f228bf484e Don't publish new homebrew releases for RC builds 2022-09-27 14:50:44 +00:00
Aayush b4ec045bc0 fix: build: set PropagationDelaySecs correctly 2022-09-27 14:50:44 +00:00
Aayush 27030aa1e8 fix: miner: init miner's with 32GiB sectors by default 2022-09-27 14:50:44 +00:00
Aayush d8441b134a fix: miner: init: only get sector-size once 2022-09-27 14:50:44 +00:00
Łukasz Magiera 39604faa09 Merge pull request #9339 from filecoin-project/chore/v1.17.2-rc1-prep
v1.17.2-rc1
2022-09-20 18:37:19 +02:00
Łukasz Magiera 3ffedead7a v1.17.2-rc1 2022-09-20 18:31:06 +02:00
Aayush Rajasekaran ee3a9d2e09 Merge pull request #9335 from filecoin-project/deps/update-cborgen
deps: Use latest cbor-gen
2022-09-20 12:16:13 -04:00
Aayush 1f80471479 Update to go-state-types v0.1.12-beta 2022-09-20 11:59:26 -04:00
Łukasz Magiera 2d82527ee9 cli: Fix compute-state --html 2022-09-20 17:40:24 +02:00
Łukasz Magiera 9be712de99 deps: Use latest cbor-gen 2022-09-20 17:30:07 +02:00
Aayush Rajasekaran b6d36436c3 Merge pull request #9290 from filecoin-project/jen/propgation
feat: env: propagation delay
2022-09-19 22:00:28 -04:00
Łukasz Magiera 39af6e0365 Merge pull request #9328 from filecoin-project/fix/ffiwrap-close-ap
fix: ffiwrapper: Close readers in AddPiece
2022-09-19 17:47:15 +02:00
Łukasz Magiera dacbdee85b Merge pull request #9331 from filecoin-project/fix/no-upd-activating-panik
sealing: Avoid panicking in handleUpdateActivating on startup
2022-09-19 17:42:21 +02:00
Geoff Stuart 862e885125 Merge pull request #9330 from filecoin-project/asr/ffi-update
chore: deps: update FFI
2022-09-19 11:39:15 -04:00
Łukasz Magiera 66ad2b8102 sealing: Avoid panicking in handleUpdateActivating on startup 2022-09-19 17:32:02 +02:00
Aayush 291a889595 chore: deps: update FFI 2022-09-19 10:42:41 -04:00
Łukasz Magiera 4cdeb6cdb1 Merge pull request #9210 from filecoin-project/feat/recievesector
feat: sealing: Partially sealed sector import
2022-09-19 13:04:39 +02:00
Łukasz Magiera 015139d451 sealing pipeline: Clarify maybeNotifyRemoteDone 2022-09-19 12:16:11 +02:00
Łukasz Magiera 859c2606f0 sealing: Address review 2022-09-19 12:13:06 +02:00
Łukasz Magiera a05593da5b systar: Create file after header checks 2022-09-19 12:13:06 +02:00
Łukasz Magiera fec9c0f981 sector import: Fix lint 2022-09-19 12:13:06 +02:00
Łukasz Magiera 061a990eb8 sector import: RemoteSealingDoneEndpoint 2022-09-19 12:13:06 +02:00
Łukasz Magiera ef834b988c sector import: Fix test build 2022-09-19 12:13:06 +02:00
Łukasz Magiera 474c60203b tarutil: Strict header checks 2022-09-19 12:13:06 +02:00
Łukasz Magiera c17ab761c5 sector import: Remote Commit2 2022-09-19 12:13:06 +02:00
Łukasz Magiera 142894895d sector import: Implement seed/ticket/commr/commd checks 2022-09-19 12:13:06 +02:00
Łukasz Magiera b2dfaae68c sector import: Test remote commit1 retry 2022-09-19 12:13:06 +02:00
Łukasz Magiera 9f03569cd0 sector import: Remote Commit1 2022-09-19 12:13:06 +02:00
Łukasz Magiera 830c2ffdf5 sector import: FinalizeInto, send finalized cacde in itest 2022-09-19 12:13:06 +02:00
Łukasz Magiera 3086e8aa01 sector import: Seal with the correct proof type in saas itest 2022-09-19 12:13:06 +02:00
Łukasz Magiera 9c6d531ae7 sector import: Plumb sector download task canfig 2022-09-19 12:13:06 +02:00
Łukasz Magiera 12a8ab5ac7 sector import: Add missing initial fsm state transition 2022-09-19 12:13:06 +02:00
Łukasz Magiera fef7232c6b sector import: Initial SectorReceive itest 2022-09-19 12:13:06 +02:00
Łukasz Magiera 3caa010779 sector import: Update type-gen 2022-09-19 12:13:06 +02:00
Łukasz Magiera cdadf5e5a9 sector import: Implement handleReceiveSector 2022-09-19 12:13:05 +02:00
Łukasz Magiera cde23be559 sector import: Fix tests 2022-09-19 12:13:05 +02:00
Łukasz Magiera ea99bd9763 sector import: Sector data download 2022-09-19 12:13:05 +02:00
Łukasz Magiera fbb487ae2b sector import: Plumbing for DownloadSectorData in the sealing system 2022-09-19 12:13:05 +02:00
Łukasz Magiera 39e4845f42 sector import: Put the imported sector into the sealing pipeline 2022-09-19 12:13:05 +02:00
Łukasz Magiera 2b644525f8 sector import: More check progress 2022-09-19 12:13:05 +02:00
Łukasz Magiera 2318419291 sector import: Fix missing perm tag on SectorReceive 2022-09-19 12:13:05 +02:00
Łukasz Magiera ca790b4c69 sealing: Validate piece alignment in checkPieces 2022-09-19 12:13:05 +02:00
Łukasz Magiera 332d83bd18 sector import: Check pieces in Sealing.Receive 2022-09-19 12:13:05 +02:00
Łukasz Magiera 5c485c3375 sealing: Drop redundant Piece type 2022-09-19 12:13:05 +02:00
Łukasz Magiera 29135aa77c sector import: Initial api scaffolding 2022-09-19 12:13:03 +02:00
Łukasz Magiera d68bb937d8 fix: ffiwrapper: Close readers in AddPiece 2022-09-19 09:52:57 +02:00
Jiaying Wang 4abc38dacc Merge pull request #9310 from filecoin-project/fix/empty-snap
fix: sealing: Abort upgrades in sectors with no deals
2022-09-16 21:21:39 -04:00
Aayush Rajasekaran 10087ffaeb Merge pull request #9326 from filecoin-project/asr/deal-info-logs
feat: add descriptive errors to markets event handler
2022-09-16 15:54:14 -04:00
Aayush 4382bbcc96 feat: add logs to markets event handler 2022-09-16 15:36:08 -04:00
Aayush Rajasekaran 7663ec2bde Merge pull request #9325 from filecoin-project/fix/missing-pci
fix: sealing: Drop unused PreCommitInfo from pipeline.SectorInfo
2022-09-16 12:10:45 -04:00
Łukasz Magiera f1e4ecaaa3 fix: Drop unused PreCommitInfo from pipeline.SectorInfo 2022-09-16 17:51:09 +02:00
Łukasz Magiera 501d21aa28 fix expiration config handling in calcTargetExpiration 2022-09-16 15:37:50 +02:00
Łukasz Magiera e3d59288fe Merge pull request #9241 from filecoin-project/fix/control-list-panic
fix: cli: fix panic in `lotus-miner actor control list`
2022-09-16 14:11:18 +02:00
Łukasz Magiera 7cfba5e1b2 Merge pull request #9323 from LexLuthr/feat/update-storage-output
feat: miner: display updated & update-cache for storage list
2022-09-16 12:43:51 +02:00
LexLuthr 32ce8f0d9b display updated & update-cache for storage 2022-09-16 11:37:12 +05:30
Aayush Rajasekaran 7d3b7fe728 Merge pull request #9321 from filecoin-project/gstuart/actors-cids-cli-network-version
fix: cli: actor-cids cli command now defaults to current network
2022-09-15 12:38:51 -04:00
Geoff Stuart 609dad02a2 actor-cids cli command now defaults to current network version instead of newest 2022-09-15 10:42:44 -04:00
Łukasz Magiera 7dd12f88e1 Merge pull request #9027 from filecoin-project/jen/butterfly
build: artifacts: butterfly
2022-09-15 16:30:02 +02:00
Łukasz Magiera 7a2a069a5a Merge pull request #9282 from Juneezee/refactor/os.ReadDir
refactor: use `os.ReadDir` for lightweight directory reading
2022-09-15 16:25:51 +02:00
Łukasz Magiera bf3daea124 sealing: Minimum upgrade sector expiration/target config 2022-09-15 16:19:57 +02:00
Łukasz Magiera 305cfa1f69 sealing: Pick safer minTarget in calcTargetExpiration 2022-09-15 16:09:13 +02:00
Łukasz Magiera d2c726cd28 fix: sealing: Abort upgrades in sectors with no deals 2022-09-15 16:09:13 +02:00
Aayush Rajasekaran 4e830a8c31 Merge pull request #9308 from filecoin-project/gstuart/beneficiary-info-cli
feat: cli: print beneficiary info in state miner-info
2022-09-14 18:12:55 -04:00
Geoff Stuart 9d63e1412e print beneficiary info in state miner-info and lotus-miner info 2022-09-14 17:54:20 -04:00
Aayush Rajasekaran 305589e347 Merge pull request #9307 from filecoin-project/gstuart/change-beneficiary
feat: api/cli: change beneficiary propose and confirm for actors and multisigs.
2022-09-14 17:47:20 -04:00
Geoff Stuart 3c19328764 Review fixes 2022-09-14 17:38:01 -04:00
Geoff Stuart 84fd51ff50 add cli commands for changing beneficiary 2022-09-14 16:52:00 -04:00
Aayush Rajasekaran 4f46ad3665 Merge pull request #9317 from filecoin-project/gstuart/cli-cleanup
chore: cli: cleanup and standardize cli
2022-09-14 16:35:49 -04:00
Geoff Stuart 4f75e2041c Add helper function to print usage when wrong number of arguments are supplied 2022-09-14 15:38:15 -04:00
Geoff Stuart 3ca9b1e331 wait.Receipt.ExitCode != 0 to wait.Receipt.ExitCode.IsError() 2022-09-14 14:53:11 -04:00
Geoff Stuart fb0633453a api, nodeApi to minerApi 2022-09-14 14:51:18 -04:00
Geoff Stuart 308cef950b cctx.Args().Len() to cctx.NArg() 2022-09-14 14:33:29 -04:00
Geoff Stuart f567db64b6 Merge pull request #9296 from filecoin-project/gstuart/beneficiary-withdraw-api
feat: api/cli: beneficiary withdraw api and cli
2022-09-14 13:36:51 -04:00
Geoff Stuart d94cdaaade Fixes node startup 2022-09-14 13:15:17 -04:00
Łukasz Magiera 3e8eaa8112 Merge pull request #9315 from filecoin-project/asr/fix-config
fix: docsgen: revert rename of API Name to Num
2022-09-14 19:13:16 +02:00
Aayush e3e6ff67db fix: docsgen: revert rename of API Name to Num 2022-09-14 12:41:47 -04:00
Geoff Stuart 21906b5a63 add api and cli calls for beneficiary withdrawl 2022-09-14 12:26:35 -04:00
Łukasz Magiera bdb62e6a40 Merge pull request #9303 from filecoin-project/9299-messages-with-empty-uuids-to-mpoolpushmessage-will-be-rejected
fix: api: Ignore uuid check for messages with uuid not set
2022-09-14 08:59:11 +02:00
Aayush Rajasekaran 7b23814fc1 Merge pull request #9291 from filecoin-project/gstuart/terminate-from-worker-addr
feat: cli: Add option to terminate sectors from worker address
2022-09-13 20:51:11 -04:00
Geoff Stuart 36fec765e7 Merge pull request #9304 from filecoin-project/tippy/update-links-2
chore: Fix dead links to docs.filecoin.io
2022-09-13 19:37:42 -04:00
TippyFlitsUK ea53f12a98 chore: Fix dead links to docs.filecoin.io 2022-09-14 00:10:22 +01:00
Shrenuj Bansal a50a21b076 cleanup 2022-09-13 16:52:47 -04:00
Shrenuj Bansal 4c4b10c617 Ignore uuid check for messages with uuid not set 2022-09-13 16:33:55 -04:00
Aayush Rajasekaran d249117182 Merge pull request #9279 from filecoin-project/chore/update-bitswap
chore: update bitswap and some libp2p packages
2022-09-13 12:14:38 -04:00
Steven Allen b13cf82541 chore: update bitswap and some libp2p packages
This removes some deprecated packages from the build tree.
2022-09-13 07:56:12 -07:00
Geoff Stuart a0ec3a7bbe Add option to terminate sectors from any address 2022-09-13 10:14:28 -04:00
Aayush Rajasekaran c791fe34b9 Merge pull request #9283 from filecoin-project/gstuart/merge-releases-1.17.1
chore: merge releases into master after v1.17.1 release
2022-09-13 10:06:13 -04:00
Aayush Rajasekaran 04a8239df4 Merge pull request #9267 from filecoin-project/jen/nv17
feat: network: add nv17 and integrate the corresponding go state type
2022-09-12 18:19:28 -04:00
Aayush 108d41fd78 Update FFI and go-state-types 2022-09-12 15:59:55 -04:00
Jennifer Wang 001c5500bd increase the default propagation delay to 10 sec 2022-09-12 10:48:55 -04:00
Jennifer Wang 8d99d27932 add envvar for PROPAGATION_DELAY_SECS 2022-09-12 10:45:34 -04:00
Aayush 19c3232d2f more fixes 2022-09-10 12:37:03 -04:00
Aayush 76090193ea Tweak StateMinerPreCommitDepositForPower based on network version 2022-09-09 21:40:15 -04:00
Aayush c0bbaebaf4 more fixes 2022-09-09 21:40:15 -04:00
Aayush 92cc24fca2 support fvm gas tracing 2022-09-09 21:40:15 -04:00
Aayush 30f66578e1 fixup genesis creation 2022-09-09 21:40:15 -04:00
Aayush e9a3235291 more fixes 2022-09-09 21:40:15 -04:00
Geoff Stuart 642555d0fb Fix discrepancies, run fiximports 2022-09-09 21:40:15 -04:00
Aayush 0efca4d266 introduce v9 actors and nv17 2022-09-09 21:40:15 -04:00
Geoff Stuart bc2bf7d6d0 Merge branch 'releases' 2022-09-09 14:05:15 -04:00
Geoff Stuart 29fff4fb06 Merge pull request #9281 from filecoin-project/fix/call-syncBasefeeCheck
fix: miner: Call SyncBasefeeCheck from `lotus info`
2022-09-09 12:34:18 -04:00
Eng Zer Jun abef90423d refactor: use os.ReadDir for lightweight directory reading
`os.ReadDir` was added in Go 1.16 as part of the deprecation of `ioutil`
package. It is a more efficient implementation than `ioutil.ReadDir`.

Reference: https://pkg.go.dev/io/ioutil#ReadDir
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-09-09 19:53:40 +08:00
Phi ca965d1c6c Call SyncBasefeeCheck from lotus info
Call SyncBasefeeCheck from `lotus info` to not duplicate logic. Also switches to V1 api.
2022-09-09 13:42:34 +02:00
Jiaying Wang 8db6a939c1 Merge pull request #9273 from filecoin-project/release/v1.17.1
build: release: v1.17.1
2022-09-08 13:57:16 -04:00
Łukasz Magiera 0594e33ed7 Merge pull request #9277 from filecoin-project/fix/ffi-version
ffi: Revert accidental filecoin-ffi downgrade from #9144
2022-09-08 12:04:41 +02:00
Łukasz Magiera f9e19500be ffi: Revert accidental update from #9144 2022-09-08 11:53:52 +02:00
Jiaying Wang e3894de618 Merge pull request #9270 from filecoin-project/gstuart/v1.17.1
build: release: Ready v1.17.1 for release
2022-09-07 20:51:32 -04:00
Geoff StuartandJiaying Wang e153db31b1 Update CHANGELOG.md
Co-authored-by: Jiaying Wang <42981373+jennijuju@users.noreply.github.com>
2022-09-07 17:18:01 -04:00
Geoff StuartandJiaying Wang dc732bafd5 Update CHANGELOG.md
Co-authored-by: Jiaying Wang <42981373+jennijuju@users.noreply.github.com>
2022-09-07 17:17:51 -04:00
Geoff StuartandJiaying Wang c4e1e0941c Update CHANGELOG.md
Co-authored-by: Jiaying Wang <42981373+jennijuju@users.noreply.github.com>
2022-09-07 17:17:39 -04:00
Geoff Stuart f8946b15d2 Ready v1.17.1 for release 2022-09-06 15:30:21 -04:00
LexLuthr 67d4f905e6 feat: proving: Introduce manual sector fault recovery (#9144)
* rebase

* fix lint error

* fix errors

* add itest

* make gen after rebase

* apply suggestion from review

* make gen after latest rebase

* gen after rebase

* fix waitgroup

* change as per review

* refactor Recovery Batches

* fix CLI

* gen after rebase

* close the channel
2022-09-06 21:17:30 +05:30
Phi 9c48922a75 Fix lotus-shed actor cmd
Check the length of multisig address in lotus-shed actor cmd as well.
2022-09-05 09:58:34 +02:00
Łukasz Magiera 783fc6a20d Merge pull request #9233 from filecoin-project/feat/lotus-info-cmd
feat: cli: lotus info cmd
2022-09-05 09:47:42 +02:00
Phi ab0699875a make gen happy
make gen happy not sad
2022-09-02 15:20:36 +02:00
Phi-rjanandŁukasz Magiera a31b8a1b58 Update cli/info.go
Co-authored-by: Łukasz Magiera <magik6k@users.noreply.github.com>
2022-09-02 15:12:32 +02:00
Phi 3e74819519 Check length of msig address
Check the length of multisig address, and print based on that.
2022-09-02 10:33:32 +02:00
Aayush Rajasekaran 98ff8c477e Merge pull request #9237 from filecoin-project/fix/actor-set-addrs-sender
fix: cli: Option to specify --from msg sender
2022-09-01 11:31:21 -04:00
Aayush Rajasekaran c147e315db Merge pull request #9242 from filecoin-project/fix/ledger-reject-error
fix: ux: better ledger rejection error
2022-09-01 11:29:46 -04:00
Phi a5ea5ba9c1 Fix lint
Fix lint
2022-09-01 17:01:03 +02:00
Phi 405bfeddac Better ledger rejection error
Print a more understandable error message when a transaction is being rejected on ledger.
2022-09-01 16:30:36 +02:00
Phi 7c00c1e5d5 Tune down slice
Tuning down slice to only 6 characters to avoid panics if the multisig-actor is of really low character length.
2022-09-01 11:54:10 +02:00
Phi 15ea3953f0 Option to specify --from msg sender
Adds the option to specify the account to send the message from in the `lotus-miner actor set-addrs`
2022-08-31 18:42:24 +02:00
Phi 818153a1e7 Put SyncBasefeeCheck in function
Put SyncBasefeeCheck in function
2022-08-31 13:15:28 +02:00
Phi 870c2f9554 Move newline
Move newline
2022-08-31 10:44:59 +02:00
Phi 8a45e8c8af Handle "Default address not set" better
Only print address and get balance if err == nil, else print that the Default address is not set
2022-08-31 10:40:50 +02:00
Phi 683900b5a2 make docsgen-cli
make docsgen-cli
2022-08-30 13:29:22 +02:00
Phi ab61f4bb2c lotus info cmd
Adds lotus info command that prints a lot of node information.
2022-08-30 12:54:59 +02:00
Łukasz Magiera 088bf56f2a Merge pull request #9231 from filecoin-project/fix/datacid-res-envvars
sealing: fix: Make DataCid resource env vars make more sense
2022-08-30 02:36:02 +02:00
Łukasz Magiera 2532300156 Merge pull request #9232 from filecoin-project/fix/gatewaytest-panic
cli: Don't panic with no providers in client retrieve
2022-08-29 17:27:36 +02:00
Łukasz Magiera 36ae2086ab cli: Don't panic with no providers in client retrieve 2022-08-29 16:55:58 +02:00
Łukasz Magiera 08b22edd89 fix make gen 2022-08-29 16:25:30 +02:00
Łukasz Magiera 78cde92999 Merge pull request #9230 from filecoin-project/fix/data-cid-close
fix: api: DataCid - ensure reader is closed
2022-08-29 16:15:03 +02:00
Łukasz Magiera 9d916029d9 Merge pull request #9229 from filecoin-project/deps/pubsub-v0.8.0
deps: go-libp2p-pubsub v0.8.0
2022-08-29 16:12:43 +02:00
Łukasz Magiera d00e1e78bb resources: Use 32G AP resources for DC 2022-08-29 16:12:02 +02:00
Łukasz Magiera c51283223d mod tidy 2022-08-29 16:03:03 +02:00
Łukasz Magiera e4ed3f8cf8 sealing: fix: Make DataCid resource env vars make more sense 2022-08-29 15:57:58 +02:00
Dirk McCormick 964bbca792 fix: DataCid - ensure reader is closed 2022-08-29 10:31:11 +02:00
Łukasz Magiera efc8c75e7d deps: go-libp2p-pubsub v0.8.0 2022-08-29 10:05:14 +02:00
Łukasz Magiera 28722de72d Merge pull request #9177 from filecoin-project/9171-add-retries-to-mpool-push-message
feat: message: Add retries to mpool push message from lotus miner
2022-08-29 09:24:35 +02:00
Łukasz Magiera 99c2ad4ad5 make: fix go version check 2022-08-29 09:06:19 +02:00
Jiaying Wang 1b5a1f692a Merge pull request #9206 from filecoin-project/asr/verifreg-tuple
fix: verifreg: serialize RmDcProposalID as int, not tuple
2022-08-26 16:38:34 -04:00
Jennifer Wang 343d092044 mod tidy 2022-08-26 15:33:26 -04:00
Jennifer Wang d8578190ff update go state type to v0.1.11 2022-08-26 14:43:53 -04:00
Shrenuj Bansal 6291799cfa Change go version to 1.18.1 in more readmes 2022-08-26 14:19:17 -04:00
Shrenuj Bansal b3175f0b5c Merge branch 'master' into 9171-add-retries-to-mpool-push-message 2022-08-26 12:31:35 -04:00
Shrenuj Bansal 0ebe1a6631 go mod tidy 2022-08-26 12:02:00 -04:00
Shrenuj Bansal 217cc846c3 Address more comments 2022-08-26 11:55:20 -04:00
Łukasz Magiera 45d1bd61ce Merge pull request #9183 from filecoin-project/feat/sectornum-mgmt
feat: sealing: Use bitfields to manage sector numbers
2022-08-26 10:59:24 -04:00
Łukasz Magiera 0770bced09 Merge pull request #9216 from filecoin-project/deps/libp2p-v0.22
deps: libp2p v0.22
2022-08-25 20:03:26 -04:00
Łukasz Magiera 5d9315938f Make mod tidy happy 2022-08-25 14:28:06 -04:00
Łukasz Magiera dd144eaab9 Update other deprecated libp2p imports 2022-08-25 14:23:25 -04:00
Łukasz Magiera 2086b219d2 Don't use go-libp2p-core 2022-08-25 14:20:41 -04:00
Łukasz Magiera ebd8c0c50a gomod: Update libp2p to v0.22.0 2022-08-25 14:06:21 -04:00
Łukasz Magiera 153cdf24a5 Merge pull request #9167 from ianconsolata/snap-daemon-autorun-disable
_ci_ / _build_ : Snap daemon autorun disable
2022-08-25 13:42:13 -04:00
Geoff Stuart aa27fb496f Merge pull request #9212 from filecoin-project/feat/shed-vlog-maxsz
feat: shed: add a --max-size flag to vlog2car
2022-08-25 10:25:37 -04:00
Łukasz Magiera 70f0edd041 strle, sealing: address review 2022-08-25 10:19:39 -04:00
Łukasz Magiera 2f7062d642 vlog2car: add max-size flag usage, fix lint 2022-08-25 10:08:12 -04:00
Łukasz Magiera ebeb16eda5 feat: shed: add a --max-size flag to vlog2car 2022-08-25 01:05:56 +02:00
Łukasz Magiera b8a8648f4a numassigner: fix lint 2022-08-24 11:38:29 -04:00
Łukasz Magiera 335f5df3ec numassigner: SectorNumReserveCount 2022-08-24 11:25:37 -04:00
Łukasz Magiera f1f31d1067 Merge pull request #9207 from filecoin-project/asr/deflake
fix: mock sealer: grab lock in ReadPiece
2022-08-23 21:55:18 -04:00
Aayush 5e80276631 fix: mock sealer: grab lock in ReadPiece 2022-08-23 17:24:28 -04:00
Aayush 9812792d46 fix: verifreg: serialize RmDcProposalID as int, not tuple 2022-08-23 16:58:10 -04:00
Łukasz Magiera 4a6ea4c492 Merge pull request #9202 from nujz/master
fix: cgroupV1: memory.memsw.usage_in_bytes: no such file or directory
2022-08-23 14:38:55 -04:00
Łukasz Magiera b290dac3cb Merge remote-tracking branch 'origin/master' into feat/sectornum-mgmt 2022-08-23 11:44:43 -04:00
nujz 76f6eb3edf cgroupV1: memory.memsw.usage_in_bytes: no such file or directory 2022-08-23 17:37:47 +08:00
Aayush Rajasekaran b33e3eac60 Merge pull request #9201 from filecoin-project/gstuart/state-actor-manifest-cid
feat: api: Reintroduce StateActorManifestCID
2022-08-22 18:20:24 -04:00
Łukasz Magiera c18874c122 numassigner: Don't error on fresh non-genesis miners 2022-08-22 17:49:58 -04:00
Łukasz Magiera 64290b69c9 numassigner: Fix missing api perms 2022-08-22 17:41:41 -04:00
Shrenuj Bansal b972e079b8 Address comments 2022-08-22 17:32:43 -04:00
Geoff Stuart 7d07ddd837 Reintroduce StateActorManifestCID 2022-08-22 17:17:01 -04:00
Łukasz Magiera 129eba2b5d sealing: numassign: itests/bug fixes 2022-08-22 16:58:36 -04:00
Łukasz Magiera 00bef607ca sealing: numassign: take on-chain allocated numbers into account 2022-08-22 16:55:44 -04:00
Łukasz Magiera ef2080a800 cli for managing sector reservations 2022-08-22 16:55:41 -04:00
Łukasz Magiera ca72590e49 sealing: Use bitfields to manage sector numbers 2022-08-22 16:55:08 -04:00
Łukasz Magiera 5274ddce83 Merge pull request #9198 from filecoin-project/jen/annoyed
chore:  seed: add cmd for adding signers to rkh to genesis
2022-08-22 13:05:09 -04:00
Jennifer Wang f86ce88d3d add cmd for adding signers to vkh to genesis 2022-08-21 22:33:24 -04:00
Łukasz Magiera ea504dc93b Merge pull request #9189 from filecoin-project/phi/commp-bytes
fix: ux: Output bytes in `lotus client commP` cmd
2022-08-19 19:15:19 -04:00
Shrenuj Bansal 8a19cd19d8 Merge branch 'master' into 9171-add-retries-to-mpool-push-message 2022-08-19 12:08:07 -04:00
Łukasz Magiera c9d65606f5 Merge branch 'deps/go-libp2p-v0.21' 2022-08-19 11:57:01 -04:00
Shrenuj Bansal 5a12e58c0c Return error for non retryable errors 2022-08-19 11:33:37 -04:00
Łukasz Magiera 9112470785 deps: use tagged kad-dht 2022-08-19 11:31:51 -04:00
Łukasz Magiera 87edaa3f06 deps: use tagged markets 2022-08-19 11:28:05 -04:00
Łukasz Magiera ba67431731 Merge branch 'update-go-libp2p-v0.21' of github.com:MarcoPolo/lotus into deps/go-libp2p-v0.21 2022-08-19 11:22:04 -04:00
Phi 656f4d5101 Output bytes in lotus client commP cmd
Adds an additional line that outputs bytes in the `lotus client commP` cmd. Resolves #9188
2022-08-19 12:27:09 +02:00
Shrenuj Bansal afb4b1b68f mod tidy and fiximports 2022-08-18 18:23:42 -04:00
Shrenuj Bansal 12abc74640 update jsonrpc deps 2022-08-18 18:10:57 -04:00
Shrenuj Bansal 7c404d8b5e fix error type comparison 2022-08-18 17:55:56 -04:00
Shrenuj Bansal 00975237b1 Add retries for specific types of errors 2022-08-18 15:57:59 -04:00
Jiaying Wang e165731b82 Merge pull request #9182 from filecoin-project/jen/9169
fix: ux: exclude negative available balance from spendable amount
2022-08-18 14:44:56 -04:00
Łukasz Magiera 9fb1a0d4b3 Merge pull request #9184 from filecoin-project/feat/secrenew-only-cc
feat: sectors renew --only-cc
2022-08-18 14:08:36 -04:00
Łukasz Magiera 87b82b95c8 feat: sectors renew --only-cc 2022-08-18 11:04:20 -04:00
Jennifer Wang 52bae8d37d when availabel balance is negative, exclude from spendable amount 2022-08-18 09:31:14 -04:00
Shrenuj Bansal 736b492fb0 Change go version in dockerfile 2022-08-17 16:09:30 -04:00
Shrenuj Bansal 66891b6c53 mod tidy 2022-08-17 15:28:38 -04:00
Shrenuj Bansal 942c3a879c Change go version for circleci 2022-08-17 15:21:03 -04:00
Jiaying Wang 079dab0d75 Merge pull request #9175 from filecoin-project/gstuart/v1.17.1-rc3
chore: Bump version for rc3
2022-08-17 15:13:10 -04:00
Łukasz Magiera b5ac141936 Merge pull request #9174 from filecoin-project/9171-add-uuid-to-message-sent-to-chain-node
feat: message: Add uuid to mpool message sent to chain node from miner
2022-08-17 15:07:48 -04:00
Geoff Stuart 6270f10c93 Bump version for RC 2022-08-17 14:49:44 -04:00
Shrenuj Bansal f5ba7b958e Add stateWaitMsg before checking last balance 2022-08-17 14:48:44 -04:00
Shrenuj Bansal a59f977db1 Add retries to mpool push message from lotus miner 2022-08-17 14:22:31 -04:00
Shrenuj Bansal cd5dd2727c fix lint 2022-08-17 14:14:07 -04:00
Shrenuj Bansal 087a838db5 make gen for tests 2022-08-17 14:02:53 -04:00
Shrenuj Bansal 99040a89c6 Add test for dedup mpool messages 2022-08-17 12:38:23 -04:00
Shrenuj Bansal 60751f809b Change func name and nil pointer check based on comments 2022-08-17 10:47:05 -04:00
Shrenuj Bansal 32a2ae12cb fix lint rename 2022-08-16 16:44:14 -04:00
Shrenuj Bansal 72230d3249 fix lint 2022-08-16 16:25:42 -04:00
Shrenuj Bansal b7227d3a6b run make gen 2022-08-16 15:56:32 -04:00
Shrenuj Bansal fa4a479b97 Add uuid to mpool message sent to chain node from miner 2022-08-16 15:39:06 -04:00
Łukasz Magiera f27ef344bc Merge pull request #9170 from filecoin-project/gstuart/xcode-version-ci-master
Update xcode version for macos builds
2022-08-15 15:51:10 -04:00
Geoff Stuart 84a2ebcbfd Update xcode version for macos builds 2022-08-15 12:23:20 -04:00
Łukasz Magiera bafa664d03 Merge pull request #9164 from filecoin-project/gstuart/xcode-version-ci
chore: ci: Update xcode version for macos builds
2022-08-15 10:41:26 -04:00
Łukasz Magiera 2e29b460d2 Merge pull request #9142 from filecoin-project/chore/untangle-fsm
sealing pipeline: Remove useless storage adapter code
2022-08-14 15:50:31 -04:00
Łukasz Magiera 77208728ad sealing: fix lint/tests 2022-08-14 12:50:18 -04:00
Ian Davis e0428ca8c2 Snap starts disabled now, so no need to disable 2022-08-12 14:44:31 -07:00
Jiaying Wang 8ecf6f3ad3 Merge pull request #9165 from filecoin-project/release1.17.1/detach-storage-on-worker-shutdown
backport: 9153: detach storage on worker shutdown
2022-08-12 14:48:45 -04:00
Marco Munizaga 1af9e3c313 Check err for view.Register 2022-08-12 09:55:03 -07:00
Marco Munizaga 1f65d51a69 Update go-libp2p-resource-manager to v0.5.3 2022-08-12 09:49:38 -07:00
Shrenuj Bansal a7e99bc095 make gen 2022-08-12 12:21:24 -04:00
Shrenuj Bansal 5acff25bca fiximports 2022-08-12 12:05:43 -04:00
Shrenuj Bansal 594d030a56 log errors when closing all paths instead of stopping execution 2022-08-12 12:05:26 -04:00
Shrenuj Bansal 500f71c344 Add return value assignments 2022-08-12 12:03:51 -04:00
Shrenuj Bansal dfb691b14a Close all storage paths on worker shutdown 2022-08-12 11:59:55 -04:00
Geoff Stuart b648cec9cd Update xcode version for macos builds 2022-08-12 10:56:43 -04:00
Łukasz Magiera a81cbb5a7b Merge pull request #9161 from Fatman13/fatman13
chore: fix typo in comment
2022-08-12 12:17:35 +02:00
Yu 0ad96858ff chore: do make docsgen 2022-08-12 15:12:22 +08:00
Yu bb05aeb860 chore: fix typo in comment 2022-08-12 11:53:06 +08:00
Marco Munizaga 5a133ff2d4 Hook up resource manager metrics 2022-08-11 15:56:48 -07:00
Ian Davis 8bc79a65c7 Don't automatically start the lotus daemon on snap install 2022-08-11 15:45:02 -07:00
Marco Munizaga 3c2c827bc3 Revert "Rerun ci"
This reverts commit 05f5e02c03.
2022-08-11 13:42:33 -07:00
Marco Munizaga 05f5e02c03 Rerun ci 2022-08-11 13:22:58 -07:00
Geoff Stuart c326eadd8b Merge pull request #9151 from RobQuistNL/patch-8
fix: sealing: Add information on what worker a job was assigned to in logs
2022-08-11 16:01:53 -04:00
Marco Munizaga df777b3166 Update deps 2022-08-11 12:53:10 -07:00
Marco Munizaga 6d4b962391 Use v0.8.0 go-bitswap 2022-08-11 12:38:50 -07:00
Geoff Stuart 525ee3b77d Merge pull request #9153 from filecoin-project/sbansal/detach-storage-on-worker-shutdown
fix: worker: Close all storage paths on worker shutdown
2022-08-11 15:01:33 -04:00
Marco Munizaga 61abd91eb9 Use kad-dht fork 2022-08-11 11:39:06 -07:00
Marco Munizaga 6ae75aa1a2 Mod tidy 2022-08-11 11:23:34 -07:00
Marco Munizaga d03992f878 Update rcmgr 2022-08-11 11:23:19 -07:00
Marco Munizaga 15e00a125d Update rcmgr 2022-08-11 11:23:01 -07:00
Marco Munizaga 57772135ad Update dep 2022-08-11 11:22:21 -07:00
Marco Munizaga abd418af41 Fix lint 2022-08-11 11:20:12 -07:00
Marco Munizaga 6a17cad206 Update testplans go.mod 2022-08-11 11:20:10 -07:00
Marco Munizaga 766d809f0c Update to go-libp2p v0.21-RC 2022-08-11 11:15:20 -07:00
Shrenuj Bansal 1c98e37db8 fiximports 2022-08-11 11:53:58 -04:00
Shrenuj Bansal 4d10487463 log errors when closing all paths instead of stopping execution 2022-08-11 10:44:26 -04:00
Geoff Stuart 0b5e27d3de Merge pull request #9152 from ianconsolata/update-packer-snap-name
Use lotus snap (and fix typo) for packer builds
2022-08-11 09:14:11 -04:00
Geoff Stuart 5119769de0 Merge pull request #9155 from filecoin-project/phi/print-withdraw-receipt
fix: ux: msg receipt for actor withdrawal
2022-08-11 09:05:02 -04:00
Phi 509c44d446 fix: ux: msg receipt for actor withdrawal
Prints the message receipt when withdrawing from the miner-actor. Also highlights that the command is waiting for the message to be included in  a block.
2022-08-11 09:34:18 +02:00
Shrenuj Bansal 10dba44638 Add return value assignments 2022-08-10 17:43:54 -04:00
Shrenuj Bansal f390c186e6 Close all storage paths on worker shutdown 2022-08-10 17:06:01 -04:00
Rob Quist f5086c98e8 fix: Add information on what worker a job was assigned to in logs
More detailed logs
2022-08-10 21:33:19 +02:00
Ian Davis 670c53e863 Use lotus snap (and fix typo) for packer builds 2022-08-10 11:44:52 -07:00
Jiaying Wang 98e1282a3f Merge pull request #9148 from filecoin-project/gstuart/bump-version-rc
chore: versioning: Bump version for RC and add changelog
2022-08-09 15:22:50 -04:00
Jiaying Wang 3244969b93 Merge pull request #9147 from filecoin-project/gstuart/bump-versions
chore: versioning: Bump version to v1.17.2-dev
2022-08-09 13:57:25 -04:00
Geoff Stuart 495023460c Bump version for RC and add changelog 2022-08-09 13:53:21 -04:00
Geoff Stuart f536257d3c Bump version 2022-08-09 13:38:28 -04:00
Jiaying Wang b0109094cc Merge pull request #9146 from filecoin-project/jen/17tomaster
chore: merge: releases (v1.17.0) to master
2022-08-09 13:32:53 -04:00
Jennifer Wang 50edfbd182 fix merge 2022-08-09 13:30:21 -04:00
Jennifer Wang ded80070c5 fix version 2022-08-09 13:27:50 -04:00
Jennifer Wang e7628229fc Merge branch 'releases' into jen/17tomaster 2022-08-09 13:23:02 -04:00
Geoff Stuart 533f1a6fdb Merge pull request #9141 from filecoin-project/fix/getcommitcutoff-panic
fix: storage: don't panic in getCommitCutoff when precommit is not found
2022-08-09 13:03:22 -04:00
Łukasz Magiera 71dacb5af8 sealing pipeline: Remove useless storage adapter code 2022-08-09 13:40:06 +02:00
Łukasz Magiera fe2a589890 sealing pipeline: Cleanup AddresSelector plumbing 2022-08-09 12:57:36 +02:00
Łukasz Magiera 4b6a9e0387 sealing pipeline: Cleanup journal plumbing 2022-08-09 12:42:35 +02:00
Łukasz Magiera ca1ff19541 fix: storage: don't panic in getCommitCutoff when precommit is not found 2022-08-09 11:44:40 +02:00
Jiaying Wang ada6a143ad Merge pull request #9139 from filecoin-project/chore/update-ffi
Update FFI
2022-08-08 22:06:48 -04:00
Geoff Stuart e24198ab22 Merge pull request #9133 from filecoin-project/ianconsolata/parallel-snap-publish
_ci_: Run snap builds for lotus and lotus-filecoin in parallel
2022-08-08 19:48:03 -04:00
Steven Allen fa04496c81 chore: deps: update FFI
- Updates rust-fil-proofs to v12.
- Updates the FVM to 1.2 (no change, just updated proofs).
- Remove actors v6 bundle from the FFI (previously used for FVM testing)
2022-08-08 14:40:13 -07:00
ZenGround0andzenground0 8b7be6d47e feat:chain:splitstore auto prune (#9123)
Auto Prune

Co-authored-by: zenground0 <ZenGround0@users.noreply.github.com>
2022-08-08 16:06:32 -04:00
Ian Davis 837fa4eae9 Run snap builds for lotus and lotus-filecoin in parallel 2022-08-05 15:13:29 -07:00
ZenGround0andzenground0 0c91b0dc10 feat:chain:splitstore chain prune (#9056)
* Splitstore chain prune
* Protect on reification for simpler logic and sound cold compact protect
* Recovery from checkpoint during chain prune
* Splitstore (discard and universal mode) running in itests
* Add pause and restart functions to itest block miner
* Add config options to itest full nodes
* Add FsRepo support for itest full ndoes

Co-authored-by: zenground0 <ZenGround0@users.noreply.github.com>
2022-08-05 16:34:16 -04:00
Łukasz Magiera 881e16ec75 Merge pull request #9032 from filecoin-project/feat/storage-redeclare
feat: sealing: storage redeclare/detach
2022-08-05 21:49:47 +02:00
Łukasz Magiera cb2b4fa4aa Merge remote-tracking branch 'origin/master' into feat/storage-redeclare 2022-08-05 21:26:15 +02:00
Łukasz Magiera 9b4cca9fd0 Merge branch 'LexLuthr-feat/SchedRemoveRequest' 2022-08-05 10:50:02 +02:00
Łukasz Magiera 11e4914531 Merge branch 'feat/SchedRemoveRequest' of github.com:LexLuthr/lotus into LexLuthr-feat/SchedRemoveRequest 2022-08-05 10:40:45 +02:00
Łukasz Magiera adae785075 Merge branch 'feat/f8-worker-env' 2022-08-05 09:52:52 +02:00
Łukasz Magiera 24c16bf387 Merge pull request #9038 from Jorropo/base256emoji
base256emoji
2022-08-05 09:51:25 +02:00
Łukasz Magiera ee08c15b8c Merge branch 'f8-env-patch' of github.com:Factor8Solutions/lotus into feat/f8-worker-env 2022-08-05 09:46:06 +02:00
Łukasz Magiera ec3468fea6 Merge branch 'docs/ysrotciv-desc' 2022-08-05 09:40:39 +02:00
Łukasz Magiera 8a39b79ee8 Merge branch 'desc' of github.com:ysrotciv/lotus into docs/ysrotciv-desc 2022-08-05 09:33:26 +02:00
Łukasz Magiera e51904555b Merge pull request #9072 from zl03jsj/fix/zl/cli/list-miner-control-addresses-fail-if-have-robust-address
fix: cli: `./lotus-miner actor control list`, if the `owner` is not account
2022-08-05 09:29:23 +02:00
Łukasz Magiera 82451e425b Merge pull request #8984 from filecoin-project/chore/clean-readme
chore:docs:remove readme reference to deprecated specs-actors
2022-08-05 09:22:00 +02:00
Łukasz Magiera e196742ece cli: Update docsgen, don't require args in storage redeclare 2022-08-05 09:05:46 +02:00
Łukasz Magiera 819314de46 Merge remote-tracking branch 'origin/master' into feat/storage-redeclare 2022-08-05 09:01:30 +02:00
Łukasz Magiera 5a186d4fa8 Merge pull request #9127 from Aloxaf/Aloxaf-patch-1
fix: build: use GOCC when building lotus-fountain
2022-08-05 08:59:46 +02:00
Aloxaf 298fbd8d88 fix: build: use GOCC when building lotus-fountain 2022-08-05 10:47:06 +08:00
Ian Davis b46b23e4ff Merge pull request #9122 from filecoin-project/ianconsolata/custom-shell-for-snapcraft
_ci_ : Change default shell options for snapcraft publish
2022-08-04 09:30:08 -07:00
zl 1fdd324efc just show actor id, if actor is not an account 2022-08-04 16:14:56 +08:00
Ian Davis 5a8bc204b7 Change default shell options for snapcraft publish
The builds were erroring only in CircleCI, when run manually the same
command worked fine. I reached out to CircleCI support, and got the
following message:

>>>
The reason you are seeing this error when running in CircleCI and not while debugging with SSH is due to the -e set in #!/bin/bash -eo pipefail at the beginning of the shell while the debugging shell would just be #!/bin/bash. The -e sets to exit to the shell when any non zero [0] exit code status.

Since you say the command works when debugging with SSH you can set the shell to use /bin/bash -o pipefail using a default shell options. Here is an example:

      - run:
          name: <<command name>>
          shell: /bin/bash -o pipefail
          command: |
            << some commands>>

Notice that I still added -o pipefail as that prevents errors in a pipeline from being masked.
2022-08-03 21:29:35 -07:00
Geoff Stuart 2498d58ba1 Merge pull request #9120 from filecoin-project/ianconsolata/goreleaser-tweak
_ci_: Switches goreleaser notes back to default (keep-existing)
2022-08-03 23:13:57 -04:00
LexLuthr ffc10d80ec fix lint error after merge 2022-08-04 02:35:22 +05:30
LexLuthr a59d73d64a Merge branch 'master' into feat/SchedRemoveRequest 2022-08-04 02:24:14 +05:30
Ian Davis 3717795652 Switches goreleaser notes back to default (keep-existing) 2022-08-03 13:45:29 -07:00
Łukasz Magiera ab0592231c Merge pull request #9116 from filecoin-project/feat/worker-name-set
feat: sealing: Allow overriding worker hostname
2022-08-03 22:44:29 +02:00
LexLuthr 25bec140fb make gen after rebase 2022-08-04 02:07:22 +05:30
LexLuthr 23bb80ab2c fix lint errors 2022-08-04 02:00:24 +05:30
LexLuthr c962fe9011 fix the itest parsing errors 2022-08-04 02:00:24 +05:30
LexLuthr 4e2536e0ef switch pledging func 2022-08-04 02:00:24 +05:30
LexLuthr b15f1e5b93 fix itest 2022-08-04 02:00:24 +05:30
LexLuthr 0fce643a10 fix sectorstatus in itest 2022-08-04 02:00:24 +05:30
LexLuthr fad79f3218 respond to caller. Add itest 2022-08-04 02:00:24 +05:30
LexLuthr cdc08e566f fix everything pointed as per review 2022-08-04 02:00:24 +05:30
LexLuthr c736dedfa6 move requestremove inside runSched 2022-08-04 02:00:24 +05:30
LexLuthr cf78fa99ee Rebase on master 2022-08-04 01:59:48 +05:30
Ian Davis e9fd960021 Merge pull request #9119 from filecoin-project/ianconsolata/use-lotus-for-snap
_ci_: Publish to both `lotus` and `lotus-filecoin` for snap
2022-08-03 12:54:35 -07:00
Ian Davis 9a9428789d Build / Publish snap twice (lotus-filecoin + lotus) 2022-08-03 12:15:53 -07:00
Łukasz Magiera 453b454b7b Merge pull request #9109 from filecoin-project/feat/dlinfo-enchantments
feat: miner cli: proving deadline command enchantments
2022-08-03 20:54:08 +02:00
shrenujbansal f023f04b40 Merge pull request #9113 from filecoin-project/9083-shed-command-for-getting-raw-bytes-stored-in-active-deals
feat: market: Add lotus-shed cmd to get total active deal storage
2022-08-03 11:28:07 -04:00
Jiaying Wang 2830429add Merge pull request #9117 from filecoin-project/release/v1.17.0
build: release: v1.17.0
2022-08-03 10:44:08 -04:00
Jiaying Wang c633b2535f Merge pull request #9112 from filecoin-project/phi/v1170prep
build: release: v1.17.0 prep
2022-08-03 10:31:55 -04:00
Shrenuj Bansal 654a3c976e remove tipset retrieval to use default 2022-08-03 10:08:59 -04:00
Phi c1c3e3e551 Add 9111 to the changelog
Add 9111 to the changelog
2022-08-03 13:09:32 +02:00
Łukasz Magiera ecddd08048 itests: Test custom worker names 2022-08-03 13:05:30 +02:00
Łukasz Magiera da33d82e1b feat: sealer: Custom worker name config 2022-08-03 12:58:49 +02:00
Łukasz Magiera 4d10adae3c Merge branch 'hostname_variable' of github.com:clinta/lotus into feat/worker-name-set 2022-08-03 12:40:18 +02:00
Łukasz Magiera b647998f15 Merge pull request #8969 from filecoin-project/push-lotus-gateway-container
push lotus-gateway to docker hub
2022-08-03 11:40:11 +02:00
Łukasz Magiera 384b6433c0 circle: Fix template 2022-08-03 11:14:53 +02:00
Łukasz Magiera a38a9ea144 Merge remote-tracking branch 'origin/master' into push-lotus-gateway-container 2022-08-03 11:12:26 +02:00
Łukasz Magiera 4818d78432 cli: Put bitfield stats in 'proving deadline' behind a flag 2022-08-03 11:06:05 +02:00
Łukasz Magiera a9474a5a22 Merge pull request #9101 from filecoin-project/sbansal/lotus-worker-stop-cmd
feat: worker: Add stop cmd for lotus worker
2022-08-03 11:01:40 +02:00
Łukasz Magiera 4b47881950 Merge branch 'master' into sbansal/lotus-worker-stop-cmd 2022-08-03 10:42:19 +02:00
Łukasz Magiera dc0c4abe4c Merge branch 'LexLuthr-feat/minerWithdrawBalanceAPI' 2022-08-03 10:39:53 +02:00
Łukasz Magiera 01a6cdaf03 Merge branch 'feat/minerWithdrawBalanceAPI' of github.com:LexLuthr/lotus into LexLuthr-feat/minerWithdrawBalanceAPI 2022-08-03 10:33:09 +02:00
Aayush Rajasekaran 479bbffebf Merge pull request #9115 from filecoin-project/asr/backport
chore: backport 9111
2022-08-02 23:16:32 -04:00
Łukasz Magiera 92d27aa6d2 Merge remote-tracking branch 'origin/master' into feat/storage-redeclare 2022-08-03 00:56:23 +02:00
Shrenuj Bansal 2f65a20d16 Add IsDealActive func to template
wq
2022-08-02 18:54:42 -04:00
Aayush Rajasekaran aff1077b00 Merge pull request #9114 from filecoin-project/asr/makefile-fiximports
feat: build: run fiximports on make actors-gen
2022-08-02 18:11:37 -04:00
Aayush 5e98b8a0d6 add a test for Post max sectors recovery 2022-08-02 18:09:18 -04:00
Aayush f210aeafdd fix: post: restrict recoveries per deadline 2022-08-02 18:09:12 -04:00
Aayush 468a4ff2ac feat: build: run fiximports on make actors-gen 2022-08-02 18:05:57 -04:00
Jiaying Wang 36d311aa4f Update CHANGELOG.md 2022-08-02 16:49:14 -04:00
Shrenuj Bansal 31a09b73cc Add lotus-shed cmd to get total active deal storage 2022-08-02 16:40:39 -04:00
Phi 61b0fa9d9e Properly fix Lotus link
Properly fix Lotus link
2022-08-02 22:07:48 +02:00
Phi 0568f6c875 Fix Lotus mission scope link
Fix Lotus mission scope link
2022-08-02 22:05:10 +02:00
Phi a7e5255848 Add callout for Boost
Add callout for Boost
2022-08-02 22:03:25 +02:00
Aayush 1b45f42d70 fix makegen 2022-08-02 15:55:04 -04:00
Aayush Rajasekaran c0d2f249bc Merge pull request #9111 from filecoin-project/asr/fix-rec-setcor-limit
fix: post: restrict recoveries per deadline
2022-08-02 15:44:33 -04:00
Phi 0ac4dec694 Add PR 9106 to the changelog
Add PR 9106 to the changelog
2022-08-02 21:42:08 +02:00
Phi 795924b872 v1.17.0 prep
v1.17.0 prep
2022-08-02 21:30:18 +02:00
Aayush 784926b2b4 add a test for Post max sectors recovery 2022-08-02 15:28:43 -04:00
Aayush 50c22aef7a fix: post: restrict recoveries per deadline 2022-08-02 12:32:44 -04:00
Łukasz Magiera 8294e03d4e itests: More fixes after fixing sector metadata import 2022-08-02 17:35:26 +02:00
Shrenuj Bansal 5f0ac7defb Wait 20s for worker shutdown so the miner can unregister the worker 2022-08-02 10:59:32 -04:00
Łukasz Magiera 6d2990314f storage: Fix detaching shared paths 2022-08-02 15:46:35 +02:00
Łukasz Magiera d1173265b3 itests: Helper returning non-genesis sector list 2022-08-02 15:29:38 +02:00
Łukasz Magiera eb366c6aa0 fix typo in storage detach cmd 2022-08-02 15:18:24 +02:00
Łukasz Magiera 9a5ca5017b gen 2022-08-02 10:45:20 +02:00
Łukasz Magiera 4548cea000 cli: More verbose deadline command 2022-08-02 10:40:34 +02:00
Łukasz Magiera 8c1d1bfd4a cli: show live sectors in the deadlines command by default 2022-08-02 10:15:12 +02:00
Łukasz Magiera 65ba7bd37d cli: clueanup deadlines command 2022-08-02 10:12:24 +02:00
Łukasz Magiera b3cce636cc Merge branch 'Feat/add_provingDeadline_option' of github.com:beck-8/lotus into feat/dlinfo-enchantments 2022-08-02 10:06:48 +02:00
LexLuthr f5a7a650e7 rename to ActorWithdrawBalance 2022-08-02 13:04:54 +05:30
Aayush Rajasekaran 68f5e8d27e Merge pull request #9106 from filecoin-project/feat/rec-sector-const
feat: wdpost: Envvar for limiting recovering sectors
2022-08-01 21:54:13 -04:00
Aayush Rajasekaran 201a4ea57c Merge pull request #9107 from filecoin-project/jen/9104
chore: backport: #9106
2022-08-01 21:26:18 -04:00
Aayush c42d43bf44 fix: sector counter for recovery 2022-08-01 21:26:01 -04:00
Aayush Rajasekaran e94c0de8c6 Merge pull request #9108 from filecoin-project/asr/fix-rec-setcor-limit
fix: sector counter for recovery
2022-08-01 14:57:46 -04:00
Ian Davis b0b660b52d Merge pull request #9096 from filecoin-project/goreleaser
_ci_: Use goreleaser to build macos universal binaries (including M1 macs)
2022-08-01 11:36:49 -07:00
Aayush 650130f9c4 fix: sector counter for recovery 2022-08-01 14:30:20 -04:00
Shrenuj Bansal 9d65b56d2e Add cli docs for lotus worker stop cmd 2022-08-01 14:20:01 -04:00
LexLuthr e0e0b0b62f don't wait for msg to land on chain 2022-08-01 23:41:24 +05:30
Shrenuj Bansal e7bace9341 Update API docs 2022-08-01 11:36:34 -04:00
Łukasz Magiera 0b5d2abc3d feat: mpool: Include gaslimit in error msg in ValidForBlockInclusion 2022-08-01 11:19:18 -04:00
Łukasz Magiera 3feb9167cb feat: wdpost: Envvar for limiting recovering sectors 2022-08-01 11:19:11 -04:00
Łukasz Magiera f8cf3b1510 feat: mpool: Include gaslimit in error msg in ValidForBlockInclusion 2022-08-01 17:15:26 +02:00
Łukasz Magiera c215a03edd feat: wdpost: Envvar for limiting recovering sectors 2022-08-01 16:58:05 +02:00
Łukasz Magiera 1ee82dd604 fix lint 2022-08-01 15:58:06 +02:00
Łukasz Magiera 3cd8d9eb06 itests: Worker tests for storage detach/redeclare 2022-08-01 15:58:06 +02:00
Łukasz Magiera 3309e10b0d itests: Test storage detach/redeclare 2022-08-01 15:58:06 +02:00
Łukasz Magiera 0ccaa00969 itests ensemble: import presealed sector metadata 2022-08-01 15:58:06 +02:00
Łukasz Magiera d690b49d17 storage: Fix linter warnings 2022-08-01 15:58:06 +02:00
Łukasz Magiera 8cff52aef6 Storage detach/attach in lotus-miner, cli commands 2022-08-01 15:58:06 +02:00
Łukasz Magiera 943d2a72c6 storage: StorageRedeclareLocal on lotus-worker 2022-08-01 15:58:06 +02:00
Łukasz Magiera e252e666bd storage: Storage detach on lotus-worker 2022-08-01 15:58:06 +02:00
Łukasz Magiera f947e65f15 wip storage redeclare/detach 2022-08-01 15:58:06 +02:00
LexLuthr e9705c4e26 remove comment pointed out in review 2022-07-30 17:16:50 +05:30
Shrenuj Bansal dfea74cca8 Add stop cmd for lotus worker 2022-07-29 18:33:30 -04:00
LexLuthr 9e9a3825aa rerun make gen 2022-07-29 20:32:05 +05:30
LexLuthr 498334e860 fix spelling mistakes 2022-07-29 20:18:10 +05:30
LexLuthr 4f03486011 miner withdrawbalance API 2022-07-29 20:09:49 +05:30
Ian Davis 52aef0b926 make circleci 2022-07-28 21:17:46 -07:00
Ian Davis c759211032 Switch to filecoin-project from personal fork 2022-07-28 21:03:12 -07:00
Ian Davis 83199661ce Add separate names to build-and-push-image jobs 2022-07-28 20:37:42 -07:00
Ian Davis 7f1b4dc438 Use goreleaser to build universal darwin binaries
This is a small refactor of our workflow to test out goreleaser, a yaml
based tool for building, packaging, and releasing go binaries on
multiple platforms. It supports building binaries for to most of the platforms we
care about, including linux and  macos, and also supports publishing
those binaries automatically as releases in Github, homebrew, snap, and
even apt / deb.

If this trial goes well, I think we should eventually replace the entire
release workflow with goreleaser. For now, this test is more tightly
scoped to only automated the MacOS release process, since that is the
one we have the most issues with. This PRi / commit:
- Builds darwin-amd64 and darwin-arm64 binaries of lotus, lotus-miner,
  and lotus-worker
- Packages them into a universal darwin binary
- Publishes those to a release in Github based on the current tag
- Uses the binaries in the release to auto-publish and updated homebrew
  configuration to filecoin-project/homebrew-lotus
- Does a `dry-run` build to produce a snapshot on release branches with
  no tag
- Manually generate and upload checksums after goreleaser
2022-07-28 20:37:42 -07:00
Geoff Stuart a843c52e38 Merge pull request #9090 from filecoin-project/id/fix-snap-again
_ci_: More tweaks to snapcraft release process
2022-07-28 15:36:57 -04:00
Jiaying Wang 27bb5f1e82 Merge pull request #9093 from filecoin-project/jen/caterpillar
chore: interop: update interop assets
2022-07-28 11:22:57 -04:00
Jennifer Wang 9d08c4bc8f update interop assets 2022-07-28 10:44:57 -04:00
Ian Davis 564aaa7bb1 Snapcraft push was renamed to snapcraft upload 2022-07-27 13:40:16 -07:00
Ian Davis c2887b3e59 Make snap build more verbose to debug issues. 2022-07-27 13:16:58 -07:00
Ian Davis 7e47ab2a1e Don't publish a stable release on RC tags 2022-07-27 13:16:58 -07:00
Aayush Rajasekaran 5046b3165d Merge pull request #9088 from filecoin-project/id/build-arch-bundle.sh
fix: ci: Forgot a .sh on the end of a the new publish script
2022-07-27 12:04:58 -04:00
Ian Davis 9762da5af5 Forgot a .sh on the end of the script 2022-07-27 08:39:11 -07:00
Geoff Stuart b69eb08dd3 Merge pull request #9084 from filecoin-project/asr/deflake-test
fix: test: deflake TestQuotePriceForUnsealedRetrieval
2022-07-27 08:22:31 -07:00
Jiaying Wang fd1207c5c7 Merge pull request #9077 from filecoin-project/phi/v1704
build: release: v1.17.0-rc4
2022-07-26 11:50:55 -04:00
Ian Davis 1d55066029 Removed unused array 2022-07-26 08:56:05 +02:00
Ian Davis 04fce8a5fa Fix snap publishing flow, publish assets independently 2022-07-26 08:55:48 +02:00
Frank Y 70e72efcca fix desc error 2022-07-26 10:26:53 +08:00
Ian Davis aa0aaccc24 Merge pull request #8994 from filecoin-project/run-builds-on-release-branches
_ci_: update snapcraft and release flow logic
2022-07-25 10:28:03 -07:00
Aayush Rajasekaran 3c191d209d fix: test: deflake TestQuotePriceForUnsealedRetrieval 2022-07-25 11:17:07 -04:00
Ian Davis 04f7067034 Removed unused array 2022-07-24 22:20:35 -07:00
Ian Davis 8a41a6bb5b Fix snap publishing flow, publish assets independently 2022-07-24 22:16:16 -07:00
Phi 1a388cc559 Update CHANGELOG.md
Updates CHANGELOG.md with the two new PRs 9044 and 9055
2022-07-22 13:28:40 +02:00
Phi 05bb68f07d bump version to v1.17.0-rc4
bump version to v1.17.0-rc4
2022-07-22 13:09:21 +02:00
Aayush Rajasekaran ead1e6be68 Merge pull request #9055 from filecoin-project/gstuart/hacky-sealing-fix-backport
Fix: sealing: hacky sealing fix backport
2022-07-21 11:48:49 -04:00
zl 179efaf447 fix: command: ./lotus-miner actor control list, if the owner is multisig. 2022-07-21 14:14:52 +08:00
zenground0 156fb17dad Review Response 2022-07-20 12:58:49 -04:00
zenground0 316d35f015 lotus shed addr decode 2022-07-20 12:58:49 -04:00
beck 6583a44a92 reduce redundant code 2022-07-20 10:21:52 +08:00
Jiaying Wang 40bc05a38e Merge pull request #9062 from filecoin-project/chore/delete-codecov
ci:testing:remove codecov
2022-07-19 15:56:50 -04:00
zenground0 9d407f100f another try 2022-07-19 11:41:55 -07:00
zenground0 cf4b39db8c Remove codecov from CI 2022-07-19 11:37:35 -07:00
Aayush Rajasekaran d3e565483b Merge pull request #9052 from filecoin-project/asr/fvm-metrics
fix: FVM: record message applied metrics
2022-07-18 20:33:37 -04:00
Geoff Stuart a72f3dc29e Workaround for sealing bug 2022-07-18 13:55:01 -07:00
Geoff Stuart 4b79cc68cb Merge pull request #9043 from filecoin-project/gstuart/hacky-sealing-fix
fix: sealing: Workaround for sealing bug
2022-07-18 13:54:03 -07:00
Aayush 279b1f4317 FVM: record message applied metrics 2022-07-18 10:50:58 -04:00
Jiaying Wang 23d51e6134 Merge pull request #9044 from filecoin-project/asr/backport
fix: deps: update FFI to fix a slow memory leak
2022-07-17 19:18:51 +00:00
Aayush Rajasekaran e950421e87 Merge pull request #9037 from filecoin-project/asr/implicit-limit
FVM: Use MaxInt64 for Implicit Message gas limits
2022-07-15 15:28:31 -04:00
Aayush Rajasekaran 7972bd8446 Merge pull request #9036 from filecoin-project/asr/tracing
feat: FVM: always enable tracing for user-triggered executions
2022-07-15 15:09:58 -04:00
Aayush 7cd0ce4010 FVM: Use MaxInt64 for Implicit Message gas limits 2022-07-15 15:09:12 -04:00
Aayush 4515405f04 fix: deps: update FFI to fix a slow memory leak 2022-07-15 15:07:53 -04:00
Aayush Rajasekaran 3c3fba87da Merge pull request #9040 from filecoin-project/asr/typo
chore: sealer: Fixup typos
2022-07-15 15:07:21 -04:00
Geoff Stuart b22e24a95a Workaround for sealing bug 2022-07-15 11:56:08 -07:00
Steven Allen d4cdd82f72 fix: deps: update FFI to fix a slow memory leak (#9042)
There was a memory leak in creating proofs, fixed in
https://github.com/filecoin-project/filecoin-ffi/pull/308
2022-07-15 16:34:32 +00:00
Aayush Rajasekaran 3353cbe23a Fixup typos 2022-07-15 08:20:37 -04:00
Łukasz Magiera 9eb8f4ee9d Merge pull request #9013 from filecoin-project/feat/path-type-filters
feat: storage: Path type filters
2022-07-15 13:08:43 +02:00
Łukasz Magiera db9105e166 storage: Add one more test case to TestFileTypeAnyAllow 2022-07-15 12:47:46 +02:00
Łukasz MagieraandAayush Rajasekaran e1b02dd13d storage: paths: Review suggestions
Co-authored-by: Aayush Rajasekaran <arajasek94@gmail.com>
2022-07-15 12:46:20 +02:00
Jorropo 93afbdeaae base256emoji 2022-07-15 00:52:28 +02:00
Aayush 474a50252b FVM: always enable tracing for user-triggered executions 2022-07-14 15:41:26 -04:00
Aayush af525a4cf2 VM: Remove v15 FVM support 2022-07-14 14:55:48 -04:00
Aayush Rajasekaran ca713c57e7 Merge pull request #8084 from filecoin-project/itest_net_tests
test: net: net and conngater tests
2022-07-13 15:59:17 -04:00
Aayush Rajasekaran 57e5aa667f Merge pull request #8991 from filecoin-project/fix/estimate-with-zero-base-fee
fix: gas: estimate gas with a zero base-fee
2022-07-13 11:57:22 -04:00
Jiaying Wang 9794652e0b Merge pull request #9029 from filecoin-project/jen/173
build: release: v1.17.0-rc3
2022-07-13 11:51:14 -04:00
Jennifer Wang d751ef7900 v1.17.0-rc3 2022-07-13 10:49:42 -04:00
Jennifer Wang d85d4f6094 butterfly artifacts 2022-07-13 08:54:19 -04:00
Łukasz Magiera ac2ea039b5 path index: Raise alerts on bad filter config 2022-07-12 21:45:12 +02:00
Łukasz Magiera 91e474e72e sealer: Pass correct args to SubAllowed in selectors 2022-07-12 21:45:12 +02:00
Łukasz Magiera 43db2fb8a4 miner cli: Print allow/deny types in storage list 2022-07-12 21:45:12 +02:00
Łukasz Magiera 59d069dc4d itests: Tests for storage path filters 2022-07-12 21:45:12 +02:00
Łukasz Magiera 0ca1cc2bcd itests: Test lotus-miner with no store/seal paths 2022-07-12 21:45:12 +02:00
Łukasz Magiera cd682e200b sealer: Fix no-remote move selector 2022-07-12 21:45:12 +02:00
Łukasz Magiera 6ac5c16d2b storage: Path type filters 2022-07-12 21:45:12 +02:00
Łukasz Magiera e7c8082956 Merge pull request #9017 from filecoin-project/jen/v17merge
build: merge: release v1.17.0 to master
2022-07-12 19:07:30 +02:00
Patrick Deuse 66a7e32e58 added gpu proving lotus-worker env vars 2022-07-12 21:36:32 +08:00
Patrick Deuse 8a0b25cfc1 fix c+p typo 2022-07-12 21:35:11 +08:00
Patrick Deuse 67ef0b3af4 added lotus-worker run env vars 2022-07-12 21:33:32 +08:00
Jiaying Wang 2b4d4f3f02 Merge pull request #9008 from 1475-IPFS/change-bootstrap-peer
change 1475 bootstrap peer
2022-07-12 09:06:45 -04:00
Łukasz Magiera c90826e670 Merge pull request #9010 from LexLuthr/feat/dagstore-destroyshard
feat: dagstore: Add DestroyShard() in dagstore wrapper
2022-07-12 14:41:52 +02:00
Jiaying Wang 32f99e8a01 Merge pull request #9014 from filecoin-project/jen/backport
build: merge: v1.16.1 to master
2022-07-11 19:24:30 -04:00
Jiaying Wang e61ae91e6f Merge pull request #9014 from filecoin-project/jen/backport
build: merge: v1.16.1 to master
2022-07-11 14:58:32 -04:00
Jennifer Wang 8486ae0d51 Merge branch 'releases' into jen/backport 2022-07-11 14:27:26 -04:00
Steven Allen 9b75390b24 address cr 2022-07-11 15:57:27 +00:00
Łukasz Magiera e8230b5523 Merge pull request #8985 from filecoin-project/masih/dep-up-carv2-2-4-1
chore: market: Upgrade to `go-car` `2.4.1`
2022-07-11 16:47:33 +02:00
LexLuthr 0e2118e12e fix lint errors 2022-07-11 17:24:53 +05:30
LexLuthr 89b3119220 mock test for DestroyShard 2022-07-11 17:11:35 +05:30
Łukasz Magiera d9311b200c Merge pull request #8978 from filecoin-project/fix/marketnode-storageauth
fix: Delegate storage auth on market nodes
2022-07-11 12:23:47 +02:00
Łukasz Magiera 7059215294 Merge pull request #8999 from LesnyRumcajs/patch-1
Docs: readme: use proper hwloc dependency for Fedora
2022-07-11 12:19:50 +02:00
LexLuthr 2b63a9d0bd add destroyshard to wrapper 2022-07-11 15:00:12 +05:30
lifei 12f07998b9 change 1475 bootstrap peer 2022-07-11 11:27:50 +08:00
Aayush 9662c1463d Fixup itest net tests 2022-07-10 11:09:54 -04:00
TheMenko 49f074144d change variable to better descriptive name and check addr count 2022-07-10 10:17:40 -04:00
TheMenko 23728626e2 add stm annotations 2022-07-10 10:17:40 -04:00
TheMenko 0d437f732d add tests for netstat and netlimit, fix error checking 2022-07-10 10:17:40 -04:00
TheMenko 1a0dd76ed1 testing network functions from node net and conngater 2022-07-10 10:17:40 -04:00
Steven Allen d192b821a9 fix: gas: estimate gas with a zero base-fee
Otherwise, an account will need funds to estimate the max possible gas a
message could take (which is usually the block gas limit).

This does mean gas estimation no longer checks if the sending account
has enough funds to cover the message cost, but MpoolPush will now do
this.
2022-07-08 09:47:45 -07:00
Marten Seemann a825682bf9 chore: stop using the deprecated github.com/libp2p/go-libp2p-yamux (#8998) 2022-07-08 09:44:24 -07:00
Hubert b156df5e32 ReadMe: use proper hwloc dependency for Fedora 2022-07-08 13:13:43 +02:00
Jiaying Wang 852b5c5ce6 Merge pull request #8996 from filecoin-project/fix/update-libp2p
chore: update and fix libp2p
2022-07-08 02:35:12 -04:00
Steven Allen 6bed08fe54 chore: update libp2p
1. This pulls in a multistream fix that should fix that fixes a few
tests (and probably a few actual bugs).
2. This deduplicates dependencies that have been merged into the
monorepo.

fixes #8953
2022-07-07 21:38:13 -07:00
Aayush Rajasekaran d8398ed037 Merge pull request #8993 from filecoin-project/fix-peer-idfromstring
fix incorrect usage of peer.IDFromString (should be peer.Decode)
2022-07-07 18:05:00 -04:00
Marten Seemann d52f01a19f fix incorrect usage of peer.IDFromString (should be peer.Decode) 2022-07-07 21:47:33 +00:00
Jiaying Wang a2fa07d355 Merge pull request #8992 from filecoin-project/release/v1.16.1
build: release v1.16.1
2022-07-07 16:32:41 -04:00
Jiaying Wang 0f5b2880fd Merge pull request #8990 from filecoin-project/jen/v1161
build: release: v1.16.1 prep
2022-07-07 16:17:44 -04:00
Jennifer Wang a596b9c2ac v1.16.1 prep 2022-07-07 16:03:32 -04:00
Jiaying Wang fcf9a80d0b Merge pull request #8988 from filecoin-project/asr/v1.16.1
Backports: 8986, 8982
2022-07-07 15:42:27 -04:00
Aayush c4ad7c81e2 remove mock file 2022-07-07 14:51:21 -04:00
Aayush d68a60e8d9 feat: recovery: Config for maximum partition count per message 2022-07-07 14:48:37 -04:00
Łukasz Magiera 673f9238be feat: wdpost: Config for maximum partition count per message 2022-07-07 14:10:31 -04:00
Aayush Rajasekaran fb0fe6bc51 Merge pull request #8986 from filecoin-project/asr/feat/dfr-maxpart-config
feat: recovery: Config for maximum partition count per message
2022-07-07 13:37:01 -04:00
Aayush 770c32c3cb feat: recovery: Config for maximum partition count per message 2022-07-07 12:46:33 -04:00
Masih H. Derkani 74cd93e5bd Upgrade to go-car 2.4.1
Upgrade to the latest `go-car` to roll out a fix to the minimum index
width, where it could cause a validation error when CAR data payload
contains identity CIDs with empty data.
2022-07-07 16:13:44 +01:00
Łukasz Magiera b499ef0c3a Merge pull request #8982 from filecoin-project/feat/post-maxpart-config
feat: wdpost: Config for maximum partition count per message
2022-07-07 16:48:38 +02:00
zenground0 3cfff416c0 replace specs-actors with builtin actors 2022-07-07 09:21:47 -05:00
Jiaying Wang eeca22e407 Merge pull request #8976 from filecoin-project/jen/gocar
deps: update go-fil-markets to v1.23.0
2022-07-07 10:03:56 -04:00
Łukasz Magiera 1de56d5e47 Merge pull request #8833 from kaola526/master
feat: msig cli: Check for existing signers in add-propose
2022-07-07 13:56:44 +02:00
Łukasz Magiera 9288526867 Merge pull request #8942 from filecoin-project/asr/migrate-nv16-shed
feat: shed: migrate-nv16
2022-07-07 13:45:02 +02:00
Łukasz Magiera e278380f22 cli: msig: Cleanup duplicate signer message 2022-07-07 13:41:47 +02:00
Łukasz Magiera 7741175b7d feat: wdpost: Config for maximum partition count per message 2022-07-07 12:38:21 +02:00
Łukasz Magiera 7e7343c3d2 Merge pull request #8977 from filecoin-project/fix/lotus-stats-actor-string
fix: lotus-stats: actor code string
2022-07-06 23:41:13 +02:00
Travis Person b27afb4348 fix: lotus-stats: actor code string 2022-07-06 23:23:55 +02:00
Łukasz Magiera 413183e4fa fix: Delegate storage auth on market nodes 2022-07-06 22:22:41 +02:00
Dirk McCormick 2d2b06464c feat: update go-fil-markets to v1.23.0 2022-07-06 11:43:06 -04:00
Cory Schwartz 91e678bdcb fix circleci template 2022-07-05 11:42:24 -07:00
Cory Schwartz c079a12c9c push lotus-gateway to docker hub 2022-07-05 11:18:51 -07:00
Aayush Rajasekaran 75d78de336 Merge pull request #8959 from filecoin-project/feat/post-check-config
sealer: Config for disabling builtin PoSt / PoSt pre-checks
2022-07-04 11:49:08 -04:00
Aayush Rajasekaran b35a325816 Fixup typos 2022-07-04 11:27:56 -04:00
Łukasz Magiera 9a97d83889 wdpost: itests for new config fields 2022-07-04 16:15:23 +02:00
Łukasz Magiera 2e7a2b184d Merge pull request #8952 from filecoin-project/feat/prov-dl-info-nums
feat: cli: Hide sector nums in 'proving deadline' by default
2022-07-04 15:03:53 +02:00
Łukasz Magiera 9ad7276dc9 feat: cli: Hide sector nums in 'proving deadline' by default 2022-07-04 14:46:48 +02:00
Łukasz Magiera d5206aa2fc Merge pull request #8954 from filecoin-project/feat/prov-info-time
ux: print absolute time for proving period start in proving cli
2022-07-04 14:35:05 +02:00
Łukasz Magiera 7e7dc9179e Merge pull request #8963 from filecoin-project/ux/proving-description
ux: cli: add compute description
2022-07-04 14:34:35 +02:00
Phi a1675a8230 ux: cli: add compute description
Add description to the `lotus-miner proving compute` command.
2022-07-03 11:51:50 +02:00
Łukasz Magiera 2daefe57bf Merge pull request #8955 from filecoin-project/feat/disconnect-cmd
chore:networking:disconnect cmd
2022-07-01 22:38:24 +02:00
Łukasz Magiera d5100f883d cfgdoc-gen: Handle empty lines in comments 2022-07-01 22:32:10 +02:00
zenground0 1d2cbd3148 go mod tidy 2022-07-01 16:23:34 -04:00
zenground0 1607f92017 Update deps 2022-07-01 16:23:34 -04:00
Łukasz Magiera 59f3161fd6 wdpost: Config for disabling sector prechecks 2022-07-01 22:20:05 +02:00
Łukasz Magiera 84881f64ad sealer: Config for disabling builtin PoSt 2022-07-01 21:24:54 +02:00
Łukasz Magiera 0277ff4239 wdpost: move fault/recover code to a separate file 2022-07-01 21:24:22 +02:00
zenground0 0ace22961c Actually proper pid decode 2022-07-01 13:14:56 -05:00
zenground0 27604ac5de Proper pid parsing 2022-07-01 12:54:40 -05:00
zenground0 db72f241b9 go mod tidy 2022-07-01 12:36:27 -05:00
zenground0 a686809bf0 disconnect just takes pid 2022-07-01 12:35:04 -05:00
zenground0 ef5bbde160 net disconnect 2022-07-01 12:35:04 -05:00
zenground0 d1e325a3bb Update deps 2022-07-01 12:34:37 -05:00
Łukasz Magiera 9bfb370892 ux: print absolute time for proving period start in proving cli 2022-07-01 18:45:29 +02:00
Jiaying Wang f46cfb44b9 Merge pull request #8947 from filecoin-project/arajasek-patch-2
chore: state: clarify state tree versioning in comment
2022-06-29 20:02:51 -04:00
Aayush Rajasekaran 8f087c7e25 chore: state: clarify state tree versioning in comment 2022-06-29 17:37:35 -04:00
Geoff Stuart 3bb7e9d113 Merge pull request #8941 from filecoin-project/gstuart/actors-cids-older-versions
Feat: api: Api call to get actor cids works for versions < 16
2022-06-29 15:31:50 -04:00
Geoff Stuart 4bebce0201 Remove StateActorManifestCID 2022-06-29 15:16:13 -04:00
Aayush Rajasekaran 68fc567ef1 Merge pull request #8945 from filecoin-project/asr/upgrade-idxprov
chore: market: upgrade index-provider and related dependencies
2022-06-29 15:10:33 -04:00
Geoff Stuart 56c7e7a8d6 Remove old functions for getting actors cids 2022-06-29 14:58:58 -04:00
Geoff Stuart 4268b426f9 review fixes 2022-06-29 14:58:58 -04:00
Geoff Stuart ed65b4c3bf Api call to get actor cids works for versions < 16 2022-06-29 14:58:56 -04:00
Aayush 0c34699f23 unbreak itests 2022-06-29 14:55:35 -04:00
Masih H. Derkani e8c44babcf Remove dependency to archived quic and regenerate CLI docs
The quic transport implementation is now moved to `go-libp2p` mono repo.
Replace the dependency to the archived repo with the new one.

Regenerate CLI docs.
2022-06-29 14:55:35 -04:00
Masih H. Derkani 39a710e1d6 Address lint issues as a result of libp2p deprecations and tidy go mod
Address staticcheck issues caused by deprecated APIs and `go mod tidy`.
2022-06-29 14:55:35 -04:00
Masih H. Derkani 57ed804304 Update ffi submodule to the backport of go-blockstore dep. update
See:
- https://github.com/filecoin-project/filecoin-ffi/commit/d40be3364a6c31f28a8f1dc27ca13d84b6e5a25b
2022-06-29 14:55:34 -04:00
Masih H. Derkani 535129a07a Upgrade to go-fil-markets v1.22.2
Upgrade to the latest go-fil-markets with dependency to go-blockstore
upgraded.
2022-06-29 14:55:22 -04:00
Masih H. Derkani 6f686cae11 Upgrade to go-blockstore 1.2.0 and go-cid 0.2.0
Upgrade required dependencies and fix breaking changes.
2022-06-29 14:55:22 -04:00
Masih H. Derkani 35dd30cfa9 Upgrade index-provider and all related dependencies 2022-06-29 14:55:22 -04:00
Aayush Rajasekaran 709fe5c65e Merge pull request #8841 from filecoin-project/feat/debug-execution
PoC: FVM Debug Dual Execution
2022-06-29 14:35:43 -04:00
Aayush 906463bc17 more review 2022-06-29 14:23:35 -04:00
Aayush f9cf25f966 address review 2022-06-29 11:57:46 -04:00
Aayush a52d584d0c an attempt at cleanup 2022-06-28 19:24:47 -04:00
vyzo 3ad2fc5c4a feat: FVM Debug Dual Execution 2022-06-28 18:00:04 -04:00
Cory Schwartz cafb110f42 Merge pull request #8931 from filecoin-project/appimage-broken-build
fix appimage build
2022-06-28 11:22:55 -07:00
Aayush 324cad3b76 feat: shed: migrate-nv16 2022-06-28 12:44:43 -04:00
Cory Schwartz 29b509fb2f restore original circleci config 2022-06-28 00:00:46 -07:00
Cory Schwartz 4e28dfa34e remove sign lines 2022-06-27 23:46:05 -07:00
Cory Schwartz 7365ae890a no update information 2022-06-27 23:39:04 -07:00
Cory Schwartz 83d0709859 install patchelf 2022-06-27 16:08:20 -07:00
Cory Schwartz 3817571c5e increase timeout 2022-06-27 15:58:56 -07:00
Cory Schwartz d4665d869c indent 2022-06-27 15:50:41 -07:00
Cory Schwartz de81eaffa7 temporary remove filter 2022-06-27 15:49:27 -07:00
Cory Schwartz f052caf8a3 test appimage build 2022-06-27 15:45:02 -07:00
Jiaying Wang 1583fe09a6 Merge pull request #8929 from filecoin-project/jen/masterbp
build: chore: releases back to master
2022-06-27 16:07:40 -04:00
Jennifer Wang b7c91559cc resolve conflict 2022-06-27 15:24:13 -04:00
Jennifer Wang c3f3eb0812 Merge branch 'releases' into jen/masterbp 2022-06-27 15:13:12 -04:00
Łukasz Magiera cd1b43918d Merge pull request #8460 from blademasterzhang/master
fix: readme: Update install instructions link
2022-06-27 12:00:43 +02:00
Łukasz MagieraandJiaying Wang f0c12a0c2c readme: link to installation instructions directly
Co-authored-by: Jiaying Wang <42981373+jennijuju@users.noreply.github.com>
2022-06-27 11:59:32 +02:00
Łukasz Magiera 3e55995d24 Merge pull request #8887 from lidel/patch-1
docs: update ./documentation/en/README.md
2022-06-27 11:54:34 +02:00
Jiaying Wang eba821945b Merge pull request #8905 from filecoin-project/feat/go-fil-marketsv1.22.0
deps: upgrade go-fil-markets to v1.22.0
2022-06-26 22:19:31 -04:00
Jiaying Wang 01254ab320 Merge pull request #8915 from filecoin-project/v16
build: release: v1.16.0
2022-06-24 16:49:19 -04:00
Jiaying Wang ed735a3427 Merge pull request #8914 from filecoin-project/jen/v16
build: release: v1.16.0 prep
2022-06-24 15:42:27 -04:00
Jennifer Wang 3b9783db68 add changelog 2022-06-24 15:41:11 -04:00
Jennifer Wang 83d796f34d bump the version to v1.16.0 2022-06-23 17:20:39 -04:00
Geoff Stuart 8b96396ef9 Merge pull request #8912 from filecoin-project/gstuart/retrieval-no-hang
Fix: cli: Break out of retrieval if provider cancels
2022-06-23 17:15:17 -04:00
Geoff Stuart c10c89883c Break out of retrieval if provider cancels 2022-06-23 16:59:44 -04:00
Aayush Rajasekaran 2f2760290a Merge pull request #8911 from filecoin-project/asr/manifest-cid-check
feat: shed: print out actor code CIDs in manifest cid checker
2022-06-23 16:57:48 -04:00
Aayush fd5981b7ee feat: shed: print out actor code CIDs in manifest cid checker 2022-06-23 16:47:43 -04:00
Aayush Rajasekaran b3890d59f0 Merge pull request #8907 from filecoin-project/gstuart/api-actors-cids
feat: api: api call to get actors cids
2022-06-23 16:34:20 -04:00
Jiaying Wang 23bd1b2cdf Merge pull request #8909 from filecoin-project/asr/update-actors
Update actors to v8.0.0
2022-06-23 16:31:40 -04:00
Aayush Rajasekaran a0027031cd Merge pull request #8908 from filecoin-project/asr/bump-fvm
chore: deps: update FFI to use FVM 1.0.0
2022-06-23 15:50:29 -04:00
Aayush 42a16546c1 Update actors to v8.0.0 2022-06-23 15:45:20 -04:00
Geoff Stuart 83d7db88cf review fixes 2022-06-23 14:32:14 -04:00
Aayush 73ea687e9e chore: deps: update FFI to use FVM 1.0.0 2022-06-23 14:14:27 -04:00
Geoff Stuart e684248f48 Added api call to get actors cids 2022-06-23 14:07:23 -04:00
Dirk McCormick f010aa9046 feat: upgrade go-fil-markets to v1.22.0 2022-06-23 16:08:12 +02:00
Łukasz Magiera b368d08596 Merge pull request #8896 from filecoin-project/gstuart/make-deal-devnet
Make cli deal command get Block Delay specific to build
2022-06-23 14:40:48 +02:00
Jiaying Wang 824da5ea51 Merge pull request #8901 from filecoin-project/fixchangelog
chore: changelog: fix the the upgrade epoch in changelog
2022-06-22 22:42:37 -04:00
Jennifer Wang 69b7594aec fix the the upgrade epoch in changelog 2022-06-22 22:20:21 -04:00
Geoff Stuart dc4ba81b9c Make cli deal command get Block Delay specific to build 2022-06-22 19:35:03 -04:00
Jiaying Wang 6638ed4c30 Merge pull request #8884 from filecoin-project/jen/1602
build: release: v1.16.0-rc2
2022-06-22 19:29:51 -04:00
Jennifer Wang 6a6d6714ad update changelog 2022-06-22 19:27:34 -04:00
Aayush Rajasekaran 5d55e3d537 Merge pull request #8898 from filecoin-project/jen/ffi2
deps: ffi: update
2022-06-22 16:28:51 -04:00
Jiaying Wang eabb2d1916 Merge pull request #8897 from filecoin-project/jen/art
misc: fvm liftoff
2022-06-22 15:54:57 -04:00
Jennifer Wang 5d0a01abfc update ffi 2022-06-22 15:42:21 -04:00
Steven Allen cd6c0c2ad3 feat: move banner, embed, and run at v8 upgrade only
1. Embed the banner in the upgrades subsystem instead of reading it at
runtime.
2. Print it all at once instead of line-by-line.
3. Run it in the v8 upgrade itself.
2022-06-22 12:41:14 -07:00
Jennifer Wang 17cd28028f fvm liftoff 2022-06-22 15:21:50 -04:00
Aayush 4815c73bb4 tidy lotus-soup go.mod 2022-06-22 14:30:06 -04:00
Aayush Rajasekaran 7f864d0f10 Update go-fil-markets v1.20.1-v16-2 2022-06-22 14:27:15 -04:00
Jennifer Wang 781f92402a add mainnet upgrade epoch 2022-06-22 14:27:15 -04:00
Jennifer Wang ea823558de bump version to v1.16.0-rc2 2022-06-22 14:27:15 -04:00
Jennifer Wang 820013a31e add mainnet upgrade epoch for nv16 2022-06-22 14:27:15 -04:00
Aayush Rajasekaran 550d3888ca Merge pull request #8895 from filecoin-project/asr/update-actors
chore: deps: update to actors v8.0.0-rc.2, except for calibnet
2022-06-22 14:24:37 -04:00
Aayush e122d113c7 chore: deps: update to actors v8.0.0-rc.2, except for calibnet 2022-06-22 14:17:40 -04:00
Aayush Rajasekaran a43231b95a Merge pull request #8893 from filecoin-project/asr/exec-trace-v16
fix: fvm: make exectraces match legacyVM some more
2022-06-22 14:14:45 -04:00
Aayush Rajasekaran eb9c3420e4 Merge pull request #8892 from filecoin-project/feat/bundle-pack-multi-release
feat: support overriding actor versions per-network
2022-06-22 14:14:24 -04:00
Aayush Rajasekaran a0aa9ad845 Merge pull request #8894 from filecoin-project/asr/update-ffi
chore: deps: Update FFI
2022-06-22 14:09:12 -04:00
Aayush a7a30732f1 Update FFI 2022-06-22 13:48:24 -04:00
Steven Allen 1ced322310 feat: support overriding actor versions per-network 2022-06-22 10:47:04 -07:00
Aayush e860a052e7 fix: fvm: make exectraces match legacyVM some more 2022-06-22 13:46:12 -04:00
Aayush Rajasekaran a80da7f1f9 Merge pull request #8889 from filecoin-project/asr/exec-trace
fix: fvm: make exectraces match legacyVM some more
2022-06-22 13:45:39 -04:00
Aayush 866693f3d5 fix: fvm: make exectraces match legacyVM some more 2022-06-22 11:29:14 -04:00
Marcin Rataj b2956ad199 docs: update ./documentation/en/README.md 2022-06-22 00:03:02 +02:00
kaola526 e3003dce31 fix ci/circleci error 2022-06-21 17:49:10 +08:00
kaola526 ace17753f0 Merge branch 'filecoin-project:master' into master 2022-06-21 17:20:56 +08:00
Aayush Rajasekaran d6e00bcd4e Merge pull request #8816 from filecoin-project/asr/reentrant-test
Add a reentrant multisig test
2022-06-20 18:14:20 -04:00
Aayush 7554991085 Add a reentrant multisig test 2022-06-20 17:22:45 -04:00
Aayush Rajasekaran 0e186ce16f Merge pull request #8883 from filecoin-project/asr/label-json-master
chore: deps: Update to go-state-types v0.1.10
2022-06-20 14:48:15 -04:00
Aayush Rajasekaran f44ad2682a Merge pull request #8882 from filecoin-project/asr/label-json
chore: deps: Update to go-state-types v0.1.10
2022-06-20 14:48:11 -04:00
Aayush b7ee05e60a Update to go-state-types v0.1.10 2022-06-20 14:20:30 -04:00
Aayush b1fddec1ce Update to go-state-types v0.1.10 2022-06-20 14:17:03 -04:00
Phi-rjan 17b5fc80ff Merge pull request #8881 from filecoin-project/phi/fix-butterfly
fix: deps: Update butterfly artifacts
2022-06-20 16:51:11 +02:00
Jennifer Wang 1ccd9051a3 update butterfly artifects 2022-06-20 10:38:08 +02:00
Łukasz Magiera 2c3dbb239a Merge pull request #8871 from filecoin-project/chore/drop-pipeline-adapters
chore: sealing pipeline: Remove adapter code (storage refactors part 2)
2022-06-17 20:00:58 +02:00
Łukasz Magiera ae17b765c0 storage: Address review, no tok 2022-06-17 18:25:59 +02:00
Geoff Stuart 3fe16ccd41 Merge pull request #8814 from nicobao/feat/uninstall/8812
build: deps: add uninstall make target
2022-06-17 12:01:09 -04:00
Geoff Stuart 5c884b5fd1 Merge pull request #8830 from filecoin-project/fix/error-client-deal
fix: ux: Check for client deal addrs on-chain
2022-06-17 11:42:04 -04:00
Geoff Stuart 12f9b2cefe Merge pull request #8879 from filecoin-project/chore/drop-specsstorage
storage: Don't depend on specs-storage, move to storiface
2022-06-17 11:24:46 -04:00
Łukasz Magiera db676acdf8 storage: Cleanup interfaces a bit 2022-06-17 13:52:19 +02:00
Łukasz Magiera 58416d0881 storage: Don't depend on specs-storage, move to storiface 2022-06-17 13:36:33 +02:00
Łukasz Magiera 7de400b5ac Merge remote-tracking branch 'origin/master' into chore/drop-pipeline-adapters 2022-06-17 11:31:05 +02:00
Łukasz Magiera 4a4d64f528 sealing pipeline: Rename 'tok' to 'tsk' 2022-06-17 11:20:33 +02:00
Jiaying Wang 7330ac5d7e Merge pull request #7715 from filecoin-project/jen/simplythings
update release template
2022-06-17 05:10:26 -04:00
Jiaying Wang 9e1794f290 Merge pull request #8857 from filecoin-project/jen/butterflyreset
chore: build: update butterfly artifacts
2022-06-16 16:59:14 -04:00
Jennifer Wang 4df19f9686 address feedbacks + nit 2022-06-16 16:53:47 -04:00
Jiaying Wang 8815fc1c1f Merge pull request #8875 from filecoin-project/phi/update-version
build: bump master version to v1.17.1-dev
2022-06-16 16:34:44 -04:00
Jennifer Wang 8375cc9f3e make gen 2022-06-16 16:19:56 -04:00
Geoff Stuart 1ad1c12294 Merge pull request #8872 from filecoin-project/jen/master16
chore: backport: v1.16.0 bundle to master
2022-06-16 16:11:00 -04:00
Phi 34b04ccbe3 bump version 2022-06-16 22:05:45 +02:00
Jennifer Wang ae37db71a8 update bundles for v16# Please enter the commit message for your changes. Lines starting 2022-06-16 14:27:17 -04:00
Jennifer Wang 51b6b07110 Merge branch 'release/v1.16.0' into jen/master16 2022-06-16 14:24:44 -04:00
Jiaying Wang 3465f3aba3 Merge pull request #8837 from filecoin-project/jen/refactor
chore: refactor:  rename var name for syncing mainnet v15 using FVM
2022-06-16 14:16:52 -04:00
Jiaying Wang a11fd00ca3 Merge pull request #8856 from filecoin-project/feat/markets-v1.21.0
feat: update go-fil-markets to v1.21.0
2022-06-16 14:04:43 -04:00
Łukasz Magiera d56241603a sealing pipeline: Remove adapter code! 2022-06-16 17:22:50 +02:00
Łukasz Magiera 59a4fe1e56 sealing pipeline: Don't adapt MpoolPushMessage 2022-06-16 15:54:15 +02:00
Łukasz Magiera 9c4d10ec73 api: handle no-precommit in StateSectorPreCommitInfo gracefully 2022-06-16 15:20:58 +02:00
Łukasz Magiera 06b3e555c5 sealing pipeline: Drop ChainBaseFee, don't wrap StateSectorPartition 2022-06-16 14:00:37 +02:00
Łukasz Magiera db842224b8 sealing pipeline: Drop StateMarketStorageDealProposal 2022-06-16 13:33:59 +02:00
Łukasz Magiera 2dc1df878d api: Move StateComputeDataCID to full-node 2022-06-16 13:29:35 +02:00
Łukasz Magiera a084445e6c sealing pipeline: Use non-special ChainHead 2022-06-16 13:15:49 +02:00
Łukasz Magiera 048bfe6d5b sealing pipeline: Use non-special msg wait APIs 2022-06-16 12:47:19 +02:00
Łukasz Magiera cd4514bddf sealing pipeline: Drop StateMinerActiveSectors 2022-06-16 12:34:29 +02:00
Łukasz Magiera 9fad80ce9a sealing pipeline: Drop unused miner-info related methods 2022-06-16 12:18:24 +02:00
Łukasz Magiera 9aa5659d24 sealing pipeline: Drop TipSetToken, use TipSetKey directly 2022-06-16 12:05:58 +02:00
kaola526 4ae3d61b76 Merge branch 'filecoin-project:master' into master 2022-06-16 09:17:02 +08:00
Geoff Stuart b706efc33b Merge pull request #8858 from filecoin-project/chore/storage-refactors
chore: storage refactors part 1
2022-06-15 11:53:49 -04:00
Łukasz Magiera 6d770f6e10 make gen 2022-06-15 16:51:30 +02:00
Łukasz Magiera 427efb57f9 Merge pull request #8864 from filecoin-project/fix/shed-user-version
feat: shed: report the "user version"
2022-06-15 14:15:24 +02:00
Łukasz Magiera 25d848f718 fix paychget test 2022-06-15 12:09:11 +02:00
Łukasz Magiera 05cdeb80c3 chore: remove redundant import prefixes 2022-06-15 12:06:22 +02:00
kaola526 2e3b8402cc Update multisig.go 2022-06-15 06:59:17 +08:00
Steven Allen 5677dc915b feat: shed: report the "user version"
This version includes the network name and commit, for easier debugging.
2022-06-14 15:58:36 -07:00
kaola526 de550c8bbb Merge branch 'filecoin-project:master' into master 2022-06-15 06:53:40 +08:00
Łukasz Magiera 39cede946c chore: Fix more imports with '2' suffix 2022-06-14 21:37:54 +02:00
Łukasz Magiera 7864e1470e fix docsgen-cli 2022-06-14 21:05:48 +02:00
Łukasz Magiera a581d73548 chore: Fix imports with '2' suffix 2022-06-14 20:36:33 +02:00
Łukasz Magiera 28099a3905 storage: Move storage/sealer/stores to storage/paths 2022-06-14 20:25:52 +02:00
Łukasz Magiera 82857e6d5d chore: rerun gen with moved packages 2022-06-14 20:13:31 +02:00
Łukasz Magiera a9600b8a6f storage: Move extern/sector-storage to storage/sealer 2022-06-14 20:03:38 +02:00
Łukasz Magiera 98a48a47f8 storage: Move extern/storage-sealing to storage/pipeline 2022-06-14 19:41:59 +02:00
Łukasz Magiera cf835fcc0c fix wdpost unit tests 2022-06-14 19:33:57 +02:00
Łukasz Magiera 717bda63b1 storage: Move control address logic to storage/ctladdr 2022-06-14 19:32:29 +02:00
Łukasz Magiera dff1bf2868 storage: Move window-post logic into a separate package 2022-06-14 19:27:09 +02:00
Łukasz Magiera 12c91bb41d storage: Move mock PreCommit helper to the mock package 2022-06-14 19:23:14 +02:00
Łukasz Magiera 6afb43afbb wallet: Move key.go into separate pkg to avoid import loops 2022-06-14 19:21:40 +02:00
Łukasz Magiera d48b629b46 Merge pull request #8863 from filecoin-project/chore/run-fiximports
chore: fix imports conflict
2022-06-14 19:11:09 +02:00
Łukasz Magiera 6c3361b5a4 chore: fix imports conflict 2022-06-14 18:58:19 +02:00
Łukasz Magiera 422f66776f Merge pull request #8859 from filecoin-project/chore/import-fix
chore: Fix imports
2022-06-14 18:54:03 +02:00
Łukasz Magiera a7b695eac3 fiximports: Don't leave backup files on osx 2022-06-14 18:31:33 +02:00
Aayush Rajasekaran 435c1f4278 Merge pull request #8855 from filecoin-project/jen/backport
chore: backport: release v1.16.0 back to master
2022-06-14 11:11:13 -04:00
Łukasz Magiera 3f0f5834b3 make: run fiximports in docsgen 2022-06-14 17:03:12 +02:00
Łukasz Magiera e65fae28de chore: fix imports 2022-06-14 17:00:51 +02:00
Łukasz Magiera d929d7104f fiximports script 2022-06-14 17:00:18 +02:00
Aayush 6d21b72d6c Testplans: go mod tidy 2022-06-14 09:13:33 -04:00
Łukasz Magiera 016749b60b Merge pull request #8854 from swift-mx/mx_log
fix: format error log
2022-06-14 11:18:23 +02:00
Jennifer Wang ed091b6d49 update butterfly artifects 2022-06-14 03:23:58 -04:00
Dirk McCormick 43bf95b8b8 feat: update go-fil-markets to v1.21.0 2022-06-14 09:15:19 +02:00
Jennifer Wang e3fbe53f76 Merge branch 'release/v1.16.0' into jen/backport 2022-06-14 02:35:01 -04:00
swift-mx 19a4395cd7 fix: format error log 2022-06-14 14:13:44 +08:00
Jennifer Wang 5a67bb0f69 v1.16.0-rc1 changelog 2022-06-14 01:57:42 -04:00
Jiaying Wang 5624c71084 Merge pull request #8851 from filecoin-project/jen/v1160
build: release: v1.16.0-rc1
2022-06-13 23:59:28 -04:00
Jennifer Wang 82ead268bd go mod tidy 2022-06-13 23:31:35 -04:00
Jennifer Wang b0c8dd5454 remove wrongly added whiteblock cid 2022-06-13 23:31:12 -04:00
Jennifer Wang 9254085bd4 correct the upgrade time comment 2022-06-13 23:27:31 -04:00
Jennifer Wang ca3282cb43 Merge branch 'releases' into jen/v1160 2022-06-13 23:25:10 -04:00
kaola526 ea59d5870d Merge branch 'filecoin-project:master' into master 2022-06-14 11:22:48 +08:00
kaola526 51ad079bc7 fix bug 2022-06-14 11:17:04 +08:00
Jennifer Wang b3adf6f09c docsgen 2022-06-13 23:12:19 -04:00
Steven Allen e9157e9dcc fix: build: really make macos compatible (#8853) 2022-06-14 03:02:43 +00:00
Jennifer Wang 35791682aa upgrade to 8.0.0-rc.1 bundle & manifest 2022-06-13 23:02:02 -04:00
Jennifer Wang 14e37adc95 fix: build: add calibrationnet to the actors bundle 2022-06-13 23:01:37 -04:00
Steven Allen 4b7f141230 fix: build: make the build/actors/pack.sh script work on macos 2022-06-13 22:51:58 -04:00
kaola526 bc25a3fd37 fix bug 2022-06-14 10:40:45 +08:00
Aayush Rajasekaran a4dbeeb51f Merge pull request #8852 from filecoin-project/chore/fix-pack
fix: build: fix pack script and add calibrationnet to bundle
2022-06-13 22:40:37 -04:00
Steven Allen b16d3c07c1 fix: build: add calibrationnet to the actors bundle 2022-06-13 19:35:08 -07:00
Steven Allen d8d8ed1f1c fix: build: make the build/actors/pack.sh script work on macos 2022-06-13 19:34:29 -07:00
Aayush Rajasekaran 55dd92fb53 Merge pull request #8849 from filecoin-project/asr/proof-bump-v16
Add new proofs version type
2022-06-13 22:10:27 -04:00
Aayush Rajasekaran 89a486c6ca Merge pull request #8848 from filecoin-project/asr/proof-bump
Add new proofs version type
2022-06-13 22:09:42 -04:00
Aayush 69fae9dc52 Add new proofs version type 2022-06-13 21:49:42 -04:00
Aayush 717d592a3b Add new proofs version type 2022-06-13 21:41:25 -04:00
Jennifer Wang cda21546c4 chore: update butterfly for reset of v16 2022-06-13 21:02:08 -04:00
Jennifer Wang 2b8aaf7261 update calib v16 skyr upgrade 2022-06-13 20:32:33 -04:00
Aayush Rajasekaran 1d821eda57 Merge pull request #8847 from filecoin-project/jen/v16prep
chore: backport: 8838 & 8769
2022-06-13 19:06:21 -04:00
Steven Allen ddc9425c07 feat: refactor: actor bundling system (#8838)
1. Include the builtin-actors in the lotus source tree.
2. Embed the bundle on build instead of downloading at runtime.
3. Avoid reading the bundle whenever possible by including bundle
   metadata (the bundle CID, the actor CIDs, etc.).
4. Remove everything related to dependency injection.
    1. We're no longer downloading the bundle, so doing anything ahead
       of time doesn't really help.
    2. We register the manifests on init because, unfortunately, they're
       global.
    3. We explicitly load the current actors bundle in the genesis
       state-tree method.
    4. For testing, we just change the in-use bundle with a bit of a
       hack. It's not great, but using dependency injection doesn't make
       any sense either because, again, the manifest information is
       global.
    5. Remove the bundle.toml file. Bundles may be overridden by
       specifying an override path in the parameters file, or an
       environment variable.

fixes #8701
2022-06-13 10:51:49 -07:00
Steven Allen 30981d0fdd feat: refactor: actor bundling system (#8838)
1. Include the builtin-actors in the lotus source tree.
2. Embed the bundle on build instead of downloading at runtime.
3. Avoid reading the bundle whenever possible by including bundle
   metadata (the bundle CID, the actor CIDs, etc.).
4. Remove everything related to dependency injection.
    1. We're no longer downloading the bundle, so doing anything ahead
       of time doesn't really help.
    2. We register the manifests on init because, unfortunately, they're
       global.
    3. We explicitly load the current actors bundle in the genesis
       state-tree method.
    4. For testing, we just change the in-use bundle with a bit of a
       hack. It's not great, but using dependency injection doesn't make
       any sense either because, again, the manifest information is
       global.
    5. Remove the bundle.toml file. Bundles may be overridden by
       specifying an override path in the parameters file, or an
       environment variable.

fixes #8701
2022-06-13 10:15:00 -07:00
Łukasz Magiera 1cd94f598d Merge pull request #8820 from filecoin-project/asr/deprecate-blocksync
refactor: remove old BlockSyncProtocolID
2022-06-13 18:36:21 +02:00
vyzo d4d5ce3021 only enable rcmgr by default in full nodes
opt-in with envvar for other nodes, as there are still some issues
with markets related protocols
2022-06-13 12:16:20 -04:00
Aayush Rajasekaran 2d07131f29 Merge pull request #8845 from filecoin-project/asr/cherry-picks
chore: cherry-pick fixes to release branch
2022-06-10 19:17:11 -04:00
Aayush Rajasekaran 05ca8875e0 Merge pull request #8826 from filecoin-project/asr/address-bump
chore: deps: Update to go-address v1.0.0
2022-06-10 17:48:53 -04:00
Aayush dda9ac31c6 invoker: gen the registry 2022-06-10 17:40:07 -04:00
Aayush d32ed4440d Drop actor meta shimming for testing 2022-06-10 17:30:07 -04:00
Aayush 7dcb11b8c0 Update to tagged actors versions 2022-06-10 17:29:57 -04:00
Aayush RajasekaranandŁukasz Magiera 131831ca61 Update cmd/lotus-shed/cid.go
Co-authored-by: Łukasz Magiera <magik6k@users.noreply.github.com>
2022-06-10 17:29:13 -04:00
Aayush 37e524adac Update to go-address v1.0.0 2022-06-10 17:24:37 -04:00
Aayush Rajasekaran f81194ddfd Merge pull request #8842 from filecoin-project/revert-8770-chore/update-pubsub
Revert "deps: update go-libp2p-pubsub to v0.7.0"
2022-06-10 17:13:24 -04:00
Aayush Rajasekaran 6422bf4a60 Merge pull request #8843 from filecoin-project/gstuart/lite-migration-master
Feat: migration: Implement function to migrate actors with only code changes
2022-06-10 16:12:16 -04:00
Geoff Stuart b7010c9e60 Implement function to migrate actors with only code changes 2022-06-10 15:52:32 -04:00
Aayush Rajasekaran b6a7e0553e Merge pull request #8815 from filecoin-project/gstuart/lite-migration
feat: migrations: function for migrating builtin actors with only code changes
2022-06-10 15:36:05 -04:00
Jiaying Wang f09fc45469 Revert "deps: update go-libp2p-pubsub to v0.7.0" 2022-06-10 14:29:56 -05:00
Geoff Stuart 3f712c376a Example V9 migration function 2022-06-10 15:07:42 -04:00
Aayush Rajasekaran 64ed93b728 Merge pull request #8840 from filecoin-project/arajasek-patch-2
fix: build: params_2k should not have the v16 upgrade set
2022-06-10 14:46:46 -04:00
Geoff Stuart bec1dc47ce update specs-actors version 2022-06-10 14:22:54 -04:00
Geoff Stuart 801c670edd Remove ChainPutMany 2022-06-10 14:09:05 -04:00
Geoff Stuart 64d62f1f7e Review fixes v2 2022-06-10 12:32:31 -04:00
Geoff Stuart 3c4792d3e9 review fixes 2022-06-10 11:35:01 -04:00
Aayush Rajasekaran d2fe574af3 fix: build: params_2k should not have the v16 upgrade set 2022-06-10 10:05:20 -04:00
Łukasz Magiera e899f73800 Merge pull request #8517 from filecoin-project/rate-limit-gateway
feat: Add rate limiting to the lotus gateway
2022-06-10 13:18:10 +02:00
Łukasz Magiera ae42ed0bb1 Merge remote-tracking branch 'origin/master' into rate-limit-gateway 2022-06-10 13:01:20 +02:00
Aayush e79c2eaa4a gofmt 2022-06-09 18:32:20 -04:00
jennijuju 41e325e822 chore: refactor: rename var name for syncing mainnet v15 using FVM 2022-06-09 16:53:16 -05:00
Jiaying Wang 87d1e8ddfd Merge pull request #8831 from filecoin-project/arajasek-patch-2
refactor: rename LOTUS_USE_FVM_EXPERIMENTAL
2022-06-09 17:42:16 -04:00
Aayush Rajasekaran 5bb50289bd Merge pull request #8835 from filecoin-project/fix/merge-conflict
fix: build: fix 2k build params
2022-06-09 17:25:30 -04:00
Steven Allen 36a4c1791c fix: build: fix 2k build params 2022-06-09 14:23:26 -07:00
Aayush Rajasekaran c661d247e5 Merge pull request #8810 from filecoin-project/asr/feat-into-master
Merge nv16 changes into master
2022-06-09 16:09:35 -04:00
Aayush b211c51643 invoker: gen the registry 2022-06-09 16:09:23 -04:00
Geoff Stuart 339692cde5 create function for migrating builtin actors with only code changes 2022-06-09 15:13:42 -04:00
Geoff Stuart 5c0f2c8ae6 Add putObj and putMany to apiBlockstore 2022-06-09 15:13:42 -04:00
kaola526 9e27c49168 Merge branch 'filecoin-project:master' into master 2022-06-10 00:37:37 +08:00
kaola526 c244a0bbdc fix bug #8825 2022-06-10 00:36:46 +08:00
Aayush Rajasekaran fbefd617a2 refactor: rename LOTUS_USE_FVM_EXPERIMENTAL 2022-06-09 11:21:22 -04:00
Phi faa3b185bf fix: ux: client deal addrs is on-chain check
Checks if the address used in `lotus client deal` is "initialized" on-chain before running the `uiLoop`. Resolves #8817
2022-06-09 16:20:51 +02:00
Łukasz Magiera 16d6e0eeb5 Merge pull request #8818 from 2color/improve-retrieval-error
chore: improve error message when maxPrice is too low
2022-06-09 15:47:09 +02:00
Łukasz Magiera 1190050e86 Merge pull request #8829 from zl03jsj/fix/TestPaychGetRestartAfterAddFundsMsg_may_stuck_in_forever_waiting
Fix: PaychGetRestartAfterAddFundsMsg may stuck in forever waiting
2022-06-09 15:30:22 +02:00
zl e732e1b00b fix TestPaychGetRestartAfterAddFundsMsg may stuck in forever waiting 2022-06-09 16:36:50 +08:00
Aayush 82e439172e Drop actor meta shimming for testing 2022-06-08 13:41:30 -04:00
Aayush 789f212f6c refactor: remove old BlockSyncProtocolID 2022-06-08 13:38:56 -04:00
Aayush 74a00ebdda Update to tagged actors versions 2022-06-08 13:31:50 -04:00
Aayush RajasekaranandŁukasz Magiera 474d11b805 Update cmd/lotus-shed/cid.go
Co-authored-by: Łukasz Magiera <magik6k@users.noreply.github.com>
2022-06-08 13:18:50 -04:00
Aayush Rajasekaran e3f1eb29a1 Merge pull request #8823 from filecoin-project/fix/ux-paych-addfunds
fix: paych: Print "waiting for confirmation.."
2022-06-08 11:25:15 -04:00
Phi 0444563e65 fix: paych: Print "waiting for confirmation.."
Prints an "waiting for confirmation.." when running `lotus paych [fromAddress toAddress amount]` to indicate that the command is waiting for the msg to be confirmed and not just hanging.
2022-06-08 10:43:49 +02:00
Cory Schwartz 84cc1e30fd lint 2022-06-07 10:36:57 -07:00
Daniel N c1a7f6292e Improve error message when maxPrice is too low
This also happens when maxPrice is not set and it deafults to 0
2022-06-07 11:10:20 -05:00
Nicolas Gimenez 3cdd92c4c0 build: deps: add uninstall make target
Run `sudo make uninstall` to remove binaries added
during installation. The command does NOT delete the potentially critical
`.lotus` and `.lotusminer` folders.
2022-06-07 09:38:46 -05:00
Aayush Rajasekaran 0e5e5f49df Merge pull request #8804 from filecoin-project/gstuart/exec-trace-consistency
Fix: state:  Set exec trace subcalls to nil when appropriate
2022-06-07 09:40:00 -04:00
Aayush Rajasekaran 27eaebad7e Merge pull request #8302 from filecoin-project/raulk/tvx-fixes
feat: conformance & tvx: support ReportConsensusFault messages
2022-06-06 23:34:16 -04:00
Aayush Rajasekaran 05c19b37a4 Merge pull request #8756 from filecoin-project/jen/devnetfixport
fix: build: genesis miner network version
2022-06-06 23:33:01 -04:00
Geoff Stuart 81cacd76a7 Implement function to access state of system actor 2022-06-06 23:23:32 -04:00
Cory Schwartz ea51732163 use key type 2022-06-06 16:37:11 -07:00
Geoff Stuart 0c789b06dc Call with no subcalls is nil instead of empty array for backwards compatibility 2022-06-03 15:21:47 -04:00
Aayush b28c11a57d Merge branch 'feat/nv16' 2022-06-03 14:01:49 -04:00
Aayush Rajasekaran 8212b2c5d9 Merge pull request #8755 from filecoin-project/jen/devnetver
fix: build: use the genesis network version when creating a network
2022-06-03 13:43:29 -04:00
Aayush Rajasekaran 7ff86efba2 Merge pull request #8776 from filecoin-project/jen/mergev1153to16
chore: build: merge v1.15.3 into v1.16.0
2022-06-03 13:38:32 -04:00
Aayush 91e69644c2 Merge branch 'feat/nv16' into jen/mergev1153to16 2022-06-03 13:18:27 -04:00
Aayush 89531e33a1 fixup merge 2022-06-03 13:16:44 -04:00
Aayush Rajasekaran e857498914 Merge pull request #8801 from filecoin-project/asr/libp2p-v16
chore: deps: update to go-libp2p v0.19.4
2022-06-03 12:02:29 -04:00
Aayush 37fdcbf197 chore: deps: update to go-libp2p v0.19.4 2022-06-03 11:48:40 -04:00
Łukasz Magiera 5d7f3c252d Merge pull request #8799 from filecoin-project/chore/update-libp2p
deps: update go-libp2p@v0.19.4
2022-06-03 02:22:23 +02:00
vyzo 927aea9937 update go-libp2p@v0.19.4 2022-06-02 22:29:21 +03:00
Łukasz Magiera 73ee5957e7 Merge pull request #8787 from swift-mx/mx_get_hello_message
feat: lotus-shed get remote peer hello message
2022-06-02 19:45:13 +02:00
Łukasz Magiera db13ada6a3 Merge pull request #8797 from filecoin-project/feat/nicer-netstat
feat: cli: Nicer net stat
2022-06-02 19:25:57 +02:00
Łukasz Magiera c43b4f304b cli docsgen 2022-06-02 17:51:26 +02:00
Łukasz Magiera 3de6856058 feat: cli: Nicer net stat 2022-06-02 16:54:56 +02:00
swift-mx 1fd2be1329 fix: setStreamHandler before connect 2022-06-02 19:59:52 +08:00
swift-mx 9c33816c90 fix: remove say hello 2022-06-02 17:22:43 +08:00
swift-mxandŁukasz Magiera 5a961c90f5 Update cmd/lotus-shed/hello.go
Co-authored-by: Łukasz Magiera <magik6k@users.noreply.github.com>
2022-06-02 17:09:35 +08:00
swift-mx 63a2d9f1fe fix: timeout 5 2022-06-02 16:54:58 +08:00
swift-mx d04594a375 style: hello.go 2022-06-02 16:49:59 +08:00
swift-mxandŁukasz Magiera 0fd74eda69 style: libp2p new
Co-authored-by: Łukasz Magiera <magik6k@users.noreply.github.com>
2022-06-02 16:36:18 +08:00
Łukasz Magiera 93f3b49235 Merge pull request #8785 from filecoin-project/gstuart/fix/manifest-cid-bundle-cli
Fix: cli: clean up manifest-cid-from-car
2022-06-02 10:32:50 +02:00
Łukasz Magiera eb84bf2ebd Merge pull request #8784 from filecoin-project/arajasek-patch-2
chore: vm: Rename tracing envvar to LOTUS_VM_ENABLE_TRACING
2022-06-02 10:31:51 +02:00
Łukasz Magiera 1b4849b05e Merge pull request #8786 from filecoin-project/gstuart/fix/cleanup-load-bundle
Cleanup LoadBundle
2022-06-02 10:30:29 +02:00
swift-mx e691efb9cd fix: CI 2022-06-02 12:02:41 +08:00
swift-mx 45104a856b feat: lotus-shed get remote peer hello message 2022-06-02 11:51:11 +08:00
Jiaying Wang 2f6a383023 Merge pull request #8781 from filecoin-project/release/v1.15.3
build: release: v1.15.3
2022-06-01 22:46:43 -04:00
Geoff Stuart 782011b572 Cleanup LoadBundle 2022-06-01 22:22:52 -04:00
Geoff Stuart bf6f9799e6 Fixup manifest-cid-from-car 2022-06-01 22:12:50 -04:00
Aayush Rajasekaran 6f25476709 chore: vm: Rename tracing envvar to LOTUS_VM_ENABLE_TRACING 2022-06-01 18:18:49 -04:00
Jiaying Wang a7e8f5aa17 Merge pull request #8761 from filecoin-project/jen/1153prep
build: release: prep lotus v1.15.3
2022-06-01 15:35:25 -04:00
Jiaying WangandAayush Rajasekaran c095d101a1 Update CHANGELOG.md
Co-authored-by: Aayush Rajasekaran <arajasek94@gmail.com>
2022-06-01 14:09:13 -04:00
Steven Allen 0c4863c58e Merge pull request #8779 from filecoin-project/chore/update-ffi
chore: deps: update filecoin-ffi
2022-06-01 11:02:19 -07:00
Steven Allen 352c23748e chore: deps: update filecoin-ffi
- Uses the global MAX_LEN exported by fvm_shared.
- Formats errors with debug, for additional information.
2022-06-01 10:44:48 -07:00
Łukasz Magiera 6b68071d2f Merge pull request #8777 from filecoin-project/fix/bench-typos
fix: bench: consistency in description
2022-06-01 10:59:22 +02:00
Cory Schwartz 4c51e4ccda default 5 sec 2022-06-01 00:59:13 -07:00
Cory Schwartz e645e8aa7c Merge branch 'master' into rate-limit-gateway 2022-06-01 00:58:23 -07:00
Phi a7a9e2a60e fix: bench: consistency in description
Changing /tmp/sl and /tmp/cac to /tmp/sealed and /tmp/cache for consistency with the rest of the description
2022-06-01 08:50:13 +02:00
Jennifer Wang cec9425c83 prep lotus v1.15.3 2022-05-31 16:39:23 -04:00
Jiaying Wang 130ef04ca5 Merge pull request #8764 from filecoin-project/asr/storage
chore: deps: Use tagged version of specs-storage
2022-05-31 16:38:22 -04:00
Jennifer Wang 2e59d0129d Merge branch 'release/v1.15.3' into jen/mergev1153to16 2022-05-31 16:33:18 -04:00
Aayush Rajasekaran d1a241e5b7 Merge pull request #8770 from filecoin-project/chore/update-pubsub
deps: update go-libp2p-pubsub to v0.7.0
2022-05-31 11:30:53 -04:00
vyzo 91c634b965 update go-libp2p-pubsub to v0.7.0 2022-05-31 14:00:43 +03:00
Łukasz Magiera 9de9c584ec Merge pull request #8769 from filecoin-project/feat/rcmgr-for-daemon
feat: only enable rcmgr by default in full nodes
2022-05-31 12:30:42 +02:00
vyzoandPeter Rabbitson 207ff66b3b update comment.
Co-authored-by: Peter Rabbitson <ribasushi@protocol.ai>
2022-05-31 12:33:08 +03:00
vyzoandPeter Rabbitson bc180c8d78 update comment.
Co-authored-by: Peter Rabbitson <ribasushi@protocol.ai>
2022-05-31 12:32:56 +03:00
vyzo a1e6410178 remove outdated comment 2022-05-31 12:09:04 +03:00
vyzo a313dcba74 only enable rcmgr by default in full nodes
opt-in with envvar for other nodes, as there are still some issues
with markets related protocols
2022-05-31 12:03:03 +03:00
Aayush Rajasekaran 000b932cac Merge pull request #8762 from filecoin-project/jen/removecar
chore: bundle: remove wrongly committed bundle cars
2022-05-30 21:08:20 -04:00
Aayush Rajasekaran ff02a666bd Merge pull request #8763 from filecoin-project/jen/rmbundle
chore: bundle: remove wrongly committed bundle cars
2022-05-30 21:08:16 -04:00
Aayush 869f6abcd6 Use tagged version of specs-storage 2022-05-30 18:08:28 -04:00
Jennifer Wang 64709dd587 remove wrongly committed bundle cars 2022-05-30 17:24:46 -04:00
Jennifer Wang 157d519dd4 remove wrongly committed bundle cars 2022-05-30 17:21:44 -04:00
Aayush 8cbbee3a87 Revert "VM: Refactor pricelist to be based on network versions"
This reverts commit 25b2e144b8.
2022-05-30 16:17:41 -04:00
Aayush Rajasekaran 81d3cda69b Merge pull request #8758 from filecoin-project/asr/revert-pricelist
Revert "VM: Refactor pricelist to be based on network versions"
2022-05-30 16:11:17 -04:00
Jiaying Wang 04894350b7 Merge pull request #8759 from filecoin-project/asr/revert-pricelist-v16
Revert "VM: Refactor pricelist to be based on network versions"
2022-05-30 16:11:14 -04:00
Jiaying Wang 5b3a6e89ff Merge pull request #8670 from filecoin-project/jen/actorcid
chore: state: add cli to get the manifest & actor cid for network v16 & up
2022-05-30 15:31:22 -04:00
Aayush c95ad7229f Revert "VM: Refactor pricelist to be based on network versions"
This reverts commit 25b2e144b8.
2022-05-30 15:25:33 -04:00
Jennifer Wang 4d1ee38930 docs gen 2022-05-30 15:22:03 -04:00
Aayush 3c8dcda094 Revert "VM: Refactor pricelist to be based on network versions"
This reverts commit 25b2e144b8.
2022-05-30 15:19:51 -04:00
Jennifer Wang 970aa299a2 move actor key to a const array 2022-05-30 14:59:46 -04:00
Jennifer Wang 2c1cf42aa0 add cli to get the actor cid forthe current network version 2022-05-30 14:20:14 -04:00
Jennifer Wang f7b0bbf0d8 fix genesis miner netwokr version 2022-05-30 13:33:10 -04:00
Jennifer Wang a476816f40 fix genesis miner netwokr version 2022-05-30 13:32:04 -04:00
Aayush Rajasekaran e59edfdd0c Merge pull request #8754 from filecoin-project/jen/backport
fix: deps: restore butterfly network genesis from v1.14.4
2022-05-30 13:22:59 -04:00
Travis Person 860298d65b fix: deps: restore butterfly network genesis from v1.14.4 2022-05-30 12:58:21 -04:00
Aayush Rajasekaran 2a5e36c542 Merge pull request #8742 from filecoin-project/jen/butterldly
chore: bundle: butterfly manifest cid & epoch
2022-05-30 12:11:45 -04:00
Jiaying Wang dbeec2900b Update params_butterfly for upgrade v16 epoch and cid 2022-05-30 11:55:30 -04:00
Łukasz Magiera 041af452ac Merge pull request #8751 from sunday527/feat/nv16
fix: lotus-bench make command
2022-05-30 16:46:24 +02:00
Łukasz Magiera 285c9b9d4a Merge pull request #8373 from filecoin-project/feat/simple-op-bench
feat: bench: simple sealing operations commands
2022-05-30 16:43:02 +02:00
Aayush Rajasekaran 160281bc53 Merge pull request #8745 from filecoin-project/gstuart/publish-storage-deals-test
test:  deals: Test deal label with invalid utf8
2022-05-30 10:42:41 -04:00
Geoff Stuart 4a40eb5af9 make gen 2022-05-30 10:29:05 -04:00
Łukasz Magiera 790a331ca5 bench: Support multiple piece infos in ParsePieceInfos 2022-05-30 16:19:57 +02:00
Łukasz Magiera e148663155 bench: add simple bench descriptions 2022-05-30 15:44:05 +02:00
Łukasz Magiera d7e99b801e bench: Simple snapdeals 2022-05-30 15:44:05 +02:00
Łukasz Magiera 6ae0cb8ac4 bench: Simple commit1/2 2022-05-30 15:44:05 +02:00
Łukasz Magiera 580bafb98e bench: Accept sector nums in simple post 2022-05-30 15:44:05 +02:00
Łukasz Magiera 1960a7726b bench: Simple distributed post, print perf 2022-05-30 15:44:05 +02:00
Łukasz Magiera 56bde5adf9 Merge pull request #8692 from filecoin-project/feat/health-endpoints
feat: networking: add healthz and livez endpoints
2022-05-30 15:42:06 +02:00
tian zhou ce1658f347 fix: lotus-bench make command 2022-05-30 19:29:37 +08:00
Geoff Stuart 4469d0c819 Reset interopnet 2022-05-27 16:46:29 -04:00
Geoff Stuart 775a94a239 Test deal label with invalid utf8 2022-05-27 16:43:06 -04:00
Geoff Stuart e11f03a1fc Replace caterpillar manifest cid 2022-05-27 14:37:01 -04:00
Łukasz Magiera 2b5114eb12 Merge pull request #8744 from filecoin-project/fix/storagestat-log-spam
fix: worker: don't log normal storage stat calls
2022-05-27 20:03:49 +02:00
Łukasz Magiera ed0c30542a Merge pull request #8741 from filecoin-project/fix/worker-nodefault-param-checks
fix: worker: don't check params with --no-default when not needed
2022-05-27 19:53:27 +02:00
Łukasz Magiera d38cd87d35 Merge pull request #8657 from gnasnik/master
feat: add create ledger wallet address by account index command
2022-05-27 19:52:48 +02:00
Łukasz Magiera a448b229a8 fix: worker: don't log noraml storage stat calls 2022-05-27 19:43:06 +02:00
Geoff Stuart 8d0558bd75 Merge pull request #8743 from filecoin-project/jen/interop
chore: bundle: update caterpillar cid
2022-05-27 13:27:52 -04:00
Jiaying Wang 7de6d93e26 Update params_interop.go 2022-05-27 13:10:11 -04:00
Jiaying Wang 92ef099f5a Update params_interop.go 2022-05-27 13:09:11 -04:00
Aayush Rajasekaran 1b3d7c9054 Merge pull request #8740 from filecoin-project/asr/update-actors
Update actors
2022-05-27 12:39:35 -04:00
Aayush Rajasekaran 73e86679d0 Merge pull request #8739 from filecoin-project/asr/update-ffi
Update FFI
2022-05-27 12:39:29 -04:00
Łukasz Magiera 1058e3bc41 fix: worker: don't check params with --no-default when not needed 2022-05-27 18:25:48 +02:00
Aayush de65d8c3b4 Update actors 2022-05-27 12:07:45 -04:00
Aayush Rajasekaran 40d75d17d4 Merge pull request #8734 from filecoin-project/asr/implicit-fail
fvm: fail if implicit message fails
2022-05-27 11:43:34 -04:00
Aayush 7ea661bf87 fvm: fail if implicit message fails 2022-05-27 11:43:20 -04:00
Aayush 3cfd1fed31 Update FFI 2022-05-27 11:39:25 -04:00
Aayush Rajasekaran c5b5a99603 Merge pull request #8733 from filecoin-project/asr/disable-skyr
Add disable flag for Skyr upgrade
2022-05-27 11:21:03 -04:00
Aayush Rajasekaran 44d415a1e2 Merge pull request #8738 from filecoin-project/fix/openrpc-aliases
fix: rpc: readd rpc.discover aliases; lotus-gateway openrpc
2022-05-27 11:18:36 -04:00
Łukasz Magiera 032e598962 feat: gateway: OpenRPC support 2022-05-27 17:03:56 +02:00
Łukasz Magiera 48aa0131bf fix: rpc: readd rpc.discover aliases 2022-05-27 17:03:03 +02:00
Aayush Rajasekaran bcdbb7296d Merge pull request #8737 from filecoin-project/feat/compute-wdpost-no-fault
feat: wdpost: Ignore faults in lotus-miner proving compute window-post
2022-05-27 11:03:01 -04:00
Aayush Rajasekaran 69d3542ee2 Merge pull request #8736 from filecoin-project/fix/postworker-check-params
fix: post workers: check proving params on startup
2022-05-27 11:00:17 -04:00
Łukasz Magiera 5624b7eaad Merge pull request #8725 from filecoin-project/feat/worker-task-count-limits
feat: sched: Per worker concurrent task count limits
2022-05-27 16:57:38 +02:00
Łukasz Magiera 7117a8d80d fix lint 2022-05-27 16:15:52 +02:00
Łukasz Magiera 26a0b43116 Merge remote-tracking branch 'origin/master' into feat/worker-task-count-limits 2022-05-27 16:01:32 +02:00
Łukasz Magiera af510e2cd7 feat: wdpost: Ignore faults in lotus-miner proving compute window-post 2022-05-27 13:14:47 +02:00
Łukasz Magiera 7d7ecb5ec8 fix: post workers: check proving params on startup 2022-05-27 13:04:19 +02:00
Aayush 4fa04abb8c Add disable flag for Skyr upgrade 2022-05-26 18:20:49 -04:00
Aayush Rajasekaran a081f8d92d Merge pull request #8732 from filecoin-project/gstuart/check-actor-cid
feat: build: Check for manifest CID while loading bundle
2022-05-26 18:12:00 -04:00
Geoff Stuart 30e7f89662 Check for manifest CID while loading bundle 2022-05-26 17:30:32 -04:00
Łukasz Magiera 7836e20801 Merge pull request #8710 from filecoin-project/feat/stor-fin-move-selector
feat: sched: Finalize* move selectors
2022-05-26 21:20:48 +02:00
Łukasz Magiera cfff877ec7 Merge pull request #8700 from filecoin-project/feat/multi-sched
feat: sched: Add scheduler interfaces, configurable assigner
2022-05-26 21:20:30 +02:00
Geoff Stuart c159290868 Reset interopnet 2022-05-26 00:03:24 -04:00
Geoff Stuart 966f6816eb Merge pull request #8719 from filecoin-project/gstuart/cli-bad-post
feat: cli: New commands for testing.
2022-05-25 17:10:18 -04:00
Geoff Stuart 7bf9ce2f2f review fixes 2022-05-25 16:42:50 -04:00
Aayush Rajasekaran 06279b5f1a Merge pull request #8606 from filecoin-project/asr/fix-drand-round
Fix: drand: calculation of round from Filecoin epochs
2022-05-25 15:36:53 -04:00
Geoff Stuart cd8a6b5a7a Merge pull request #8727 from filecoin-project/asr/actors-update
Update actors to dev/20220525
2022-05-25 14:23:18 -04:00
Aayush Rajasekaran 8127473bab Update actors to dev/20220525 2022-05-25 14:21:08 -04:00
Aayush Rajasekaran 3e2df74e8b Merge pull request #8722 from filecoin-project/fix/nv16-testing-bundle
[nv16] don't clobber test bundles during migration
2022-05-25 12:50:11 -04:00
Aayush Rajasekaran 6924a3d5f2 Fix calculation of Drand round from Filecoin epochs 2022-05-25 12:43:52 -04:00
Łukasz Magiera 2bdc729fe7 Merge remote-tracking branch 'origin/master' into feat/worker-task-count-limits 2022-05-25 18:25:15 +02:00
vyzo bb0e3a6cb0 don't clobber test bundles during migration 2022-05-25 19:16:11 +03:00
Łukasz Magiera b90b9e97a6 fix tests 2022-05-25 17:33:44 +02:00
Łukasz Magiera 666dc00e63 docsgen 2022-05-25 16:37:40 +02:00
Łukasz Magiera c47e1bd483 sched: use correct resource table in assignReadyWork 2022-05-25 16:32:00 +02:00
Łukasz Magiera 083c7421ce feat: sched: Worker task count limits for all task types 2022-05-25 16:31:26 +02:00
beck 43ec14fa9c Feat/add provingDeadlineInfoCmd live option 2022-05-25 11:12:32 +08:00
beck 2375df2b62 Feat/add provingDeadlinesCmd live option 2022-05-25 11:11:23 +08:00
frank c33f87d5b4 remove conditions that won't happen 2022-05-25 11:03:04 +08:00
frank efca50c146 fix CodeQL warning 2022-05-25 10:18:48 +08:00
Geoff Stuart 8323ff77b6 Reset interopnet 2022-05-24 17:22:58 -04:00
Geoff Stuart ef4a44cd06 appease linter 2022-05-24 15:24:54 -04:00
Geoff Stuart 8d0f33f2e1 make gen 2022-05-24 14:41:13 -04:00
Geoff Stuart 8d1ebf7abb Fixed wording in some cli commands 2022-05-24 14:41:13 -04:00
Geoff Stuart 354719327b Add generate-and-send-consensus-fault command to cli 2022-05-24 14:41:13 -04:00
Aayush Rajasekaran e87bb5db6a Merge pull request #8680 from filecoin-project/feat/nv16-migration-bundle
[nv16] Ensure v8 bundle is loaded during migration
2022-05-24 14:33:22 -04:00
Jiaying Wang ddbcf1fc61 Merge pull request #8718 from filecoin-project/jen/1153prep
build: release: v1.15.3-rc2
2022-05-24 14:30:04 -04:00
Aayush Rajasekaran c2f0bd3c62 Merge pull request #8668 from filecoin-project/asr/fix-post-test
fix wdpost_dispute tests
2022-05-24 14:22:01 -04:00
Jiaying Wang 2c3df5f187 Merge pull request #8716 from filecoin-project/fix/makefile-flags
build: set NetworkBundle in params file
2022-05-24 14:04:32 -04:00
Jennifer Wang 24474042f8 update the changelog 2022-05-24 14:01:54 -04:00
Jennifer Wang 4c6598e861 bump the version to v1.15.3-rc2 2022-05-24 14:01:01 -04:00
Aayush 2b847a98ae fix wdpost_dispute tests 2022-05-24 13:58:30 -04:00
Cory Schwartz d2299dfbf8 backoff/reconnect loop 2022-05-24 10:24:37 -07:00
Aayush Rajasekaran c07c87c131 Merge pull request #8706 from filecoin-project/fix/8636
fix: vm: always set the root message in execution traces in the FVM
2022-05-24 12:55:37 -04:00
Aayush Rajasekaran eab4d4b464 Merge pull request #8683 from filecoin-project/fix/drop-fvm-nv14
feat: fvm: drop nv14 support from the FVM
2022-05-24 12:48:32 -04:00
Steven Allen 496799f867 build: set NetworkBundle in params file
Otherwise, we end up overriding the ldflags.

fixes #8684
2022-05-24 09:42:22 -07:00
Jiaying Wang 5e7f5029d8 Merge pull request #8677 from filecoin-project/jennijuju-patch-3
Update bundle.go
2022-05-24 12:40:59 -04:00
Łukasz Magiera 6f2c8d6f5f Merge pull request #8715 from filecoin-project/feat/miner-commp-cmd
feat: miner cli: sealing data-cid command
2022-05-24 18:09:26 +02:00
Łukasz Magiera b53db68bda fix lint 2022-05-24 16:22:52 +02:00
Łukasz Magiera df7709c2e2 cli docsgen 2022-05-24 16:01:54 +02:00
Łukasz Magiera 7054475c00 ffiwrapper: Handle null padding in DataCid automatically 2022-05-24 15:59:11 +02:00
Łukasz Magiera 3fa2ada987 support http in lotus-miner sealing data-cid 2022-05-24 15:47:49 +02:00
Łukasz Magiera 6095aba4dd lib: support http readers passing over jsonrpc 2022-05-24 15:47:23 +02:00
Łukasz Magiera bacaccc378 feat: miner cli: sealing data-cid command 2022-05-24 15:07:53 +02:00
Łukasz Magiera 4b1bfa9964 Merge pull request #8478 from filecoin-project/gstuart/replica-update-unseal
Snap Deals full unseal
2022-05-24 14:48:10 +02:00
Lim Kin Sang 3f0e5b3ff4 Merge branch 'filecoin-project:master' into master 2022-05-24 17:41:32 +08:00
Łukasz Magiera 70f3b98574 Fix config doc 2022-05-24 01:33:56 +02:00
Łukasz Magiera 8c081e271a itests: test TestWorkerPledgeLocalFin 2022-05-24 01:13:30 +02:00
Cory Schwartz 2b0d0ce224 fix itests 2022-05-23 14:59:57 -07:00
Łukasz Magiera 7612860d15 config: Storage.DisallowRemoteFinalize 2022-05-23 23:53:25 +02:00
Łukasz Magiera 8c6cba7a03 feat: sched: Finalize* move selectors 2022-05-23 23:36:26 +02:00
Łukasz Magiera b576008e87 sched: Strong preferrence in WorkerSelector 2022-05-23 23:28:55 +02:00
Łukasz Magiera 3de34ea3c0 Fix TestWorkerPledgeSpread in CI 2022-05-23 23:28:31 +02:00
Łukasz Magiera 58574554c1 itests: Test spread sched assigner 2022-05-23 22:31:06 +02:00
Łukasz Magiera f2c2993164 sched: Correct allocated resource accounting in spread assigner 2022-05-23 22:22:27 +02:00
Łukasz Magiera fd8b91a5d4 sched: Fix resource checks 2022-05-23 22:18:41 +02:00
Łukasz Magiera 16f434c790 config: Plumb Assigner config correctly 2022-05-23 22:02:39 +02:00
Łukasz Magiera 443488b096 lint, docsgen 2022-05-23 22:02:39 +02:00
Łukasz Magiera 5ba8bd3b99 sched: Configurable assigners 2022-05-23 22:02:39 +02:00
Łukasz Magiera 588b8ecbca sched: Separate WindowSelector func 2022-05-23 22:02:39 +02:00
Łukasz Magiera 9ac19cb14b feat: sealing: Put scheduler assign logic behind an interface 2022-05-23 22:02:39 +02:00
Łukasz Magiera b32e5e916b Merge pull request #8709 from filecoin-project/jen/butterfly
fix: deps: restore butterfly network genesis from v1.14.4
2022-05-23 21:49:31 +02:00
Łukasz Magiera 199f48d16a Merge pull request #8705 from filecoin-project/jen/libp2pbackpot
deps: libp2p: update to the latest golibp2p tag
2022-05-23 21:48:07 +02:00
Łukasz Magiera df98a2a089 Merge pull request #8704 from filecoin-project/jen/libp2p
deps: libp2p: update to the latest golibp2p tag
2022-05-23 21:46:34 +02:00
Travis Person cd5b6e30fa fix: deps: restore butterfly network genesis from v1.14.4 2022-05-23 15:20:07 -04:00
Jiaying Wang 8ee361c6c8 Merge pull request #8708 from filecoin-project/fix/butterflynet-genesis
fix: deps: restore butterfly network genesis from v1.14.4
2022-05-23 15:19:27 -04:00
Jennifer Wang 5cfedacf9f make jen 2022-05-23 15:11:46 -04:00
Cory Schwartz 7d55ab0734 make atomic 2022-05-23 12:04:13 -07:00
Travis Person f2d09b65cc fix: deps: restore butterfly network genesis from v1.14.4 2022-05-23 18:57:52 +00:00
Steven Allen 23239c0393 fix: vm: always set the root message in execution traces in the FVM
Even when disabled. This mimics the behavior or the lotus VM.
2022-05-23 11:23:17 -07:00
Cory Schwartz 0a7fbd0fce Merge remote-tracking branch 'origin/feat/health-endpoints' into feat/health-endpoints 2022-05-23 11:14:34 -07:00
Cory SchwartzandŁukasz Magiera b4852038a1 Update node/health.go
Co-authored-by: Łukasz Magiera <magik6k@users.noreply.github.com>
2022-05-23 11:11:45 -07:00
Jennifer Wang d0c97e07f9 update to the latest golibp2p tag 2022-05-23 14:06:18 -04:00
Jennifer Wang 38bce53e18 update to the latest golibp2p tag 2022-05-23 14:02:50 -04:00
Łukasz Magiera 8998f6e0f1 Merge pull request #8646 from filecoin-project/jen/bumpmaster
build: version: bump the version to v1.15.4-rc1
2022-05-23 19:13:19 +02:00
Łukasz Magiera af1de800c8 Merge pull request #8490 from galargh/patch-1
ci: deps: Use testground-github-action from testground org
2022-05-23 19:12:12 +02:00
Łukasz Magiera dde36723da Merge pull request #8672 from filecoin-project/feat/worker-nodefault
feat: worker: lotus-worker run --no-default
2022-05-23 19:09:03 +02:00
Łukasz Magiera 2cea84dcce Merge pull request #8689 from filecoin-project/docs/commit-config
docs:sealing:fix default miner config comments
2022-05-23 19:04:37 +02:00
jennijuju dbe146b0c9 bump the version to v1.15.4-rc1 2022-05-23 19:02:26 +02:00
Łukasz Magiera abf8316eda worker: Less confusing usage on --no-default 2022-05-23 18:53:48 +02:00
Steven Allen f7c610ee23 feat: vm: drop nv14 support from the FVM
The next FVM version will only support nv15+.

This change also disables the FVM before nv15, even if enabled through
the environment variable. This allows "catching up" from before nv15.
2022-05-23 09:50:54 -07:00
Łukasz Magiera 389df95b00 config: Update batching comment in all the places 2022-05-23 18:49:01 +02:00
Aayush Rajasekaran e717d51069 Merge pull request #8702 from filecoin-project/chore/backport-raw-export-fix
fix: vm: support raw blocks in chain export
2022-05-23 12:48:49 -04:00
Steven Allen 89bca05a8d fix: vm: support raw blocks in chain export
We need this for NV16 to include code in chain snapshots.

NOTE: I've also checked the splitstore, and we appear to be doing the
right thing there already.
2022-05-23 09:45:56 -07:00
Łukasz Magiera 12599550c1 Merge pull request #8690 from filecoin-project/arajasek-patch-2
fix: verifreg: update deprecation log
2022-05-23 18:45:02 +02:00
Łukasz Magiera 8526118e3a Merge pull request #8691 from filecoin-project/fix/support-raw-export
fix: vm: support raw blocks in chain export
2022-05-23 18:43:48 +02:00
Łukasz Magiera 58055987a3 Merge pull request #8696 from swift-mx/mx_precommits_info
feat: precommits info
2022-05-23 18:41:43 +02:00
Łukasz Magiera c748b2bf9d Merge pull request #8637 from filecoin-project/gstuart/cli-compact-partitions
Implement cli command for compactPartitions
2022-05-23 18:36:41 +02:00
Cory Schwartz 45d15cb8ee handle error during liveness check 2022-05-23 09:29:11 -07:00
Łukasz Magiera d7bc0e8413 make docsgen-cli 2022-05-23 18:25:51 +02:00
Geoff Stuart 6216fae0f8 Implement cli command for compactPartitions 2022-05-23 18:23:02 +02:00
swift-mx 23f9ac4c3c Update cli-lotus-miner.md 2022-05-24 00:17:38 +08:00
swift-mxandŁukasz Magiera ae8f3d8fe2 Update cmd/lotus-miner/precommits-info.go
Co-authored-by: Łukasz Magiera <magik6k@users.noreply.github.com>
2022-05-24 00:12:09 +08:00
swift-mxandŁukasz Magiera 0b3ee32ce4 Update cmd/lotus-miner/precommits-info.go
Co-authored-by: Łukasz Magiera <magik6k@users.noreply.github.com>
2022-05-24 00:11:59 +08:00
swift-mx 3ea55333a8 fix: docsgen-cli 2022-05-23 14:28:47 +08:00
swift-mx ea282ea055 feat: precommits info 2022-05-23 12:54:00 +08:00
Cory Schwartz 444d0b1b8a add healthz and livez endpoints 2022-05-20 18:38:17 -07:00
Steven Allen f491e39f22 fix: vm: support raw blocks in chain export
We need this for NV16 to include code in chain snapshots.

NOTE: I've also checked the splitstore, and we appear to be doing the
right thing there already.
2022-05-20 18:56:30 -04:00
Aayush Rajasekaran a9b40c448b verifreg: fix deprecation log 2022-05-20 13:38:23 -04:00
Aayush Rajasekaran c3d91ddf80 Merge pull request #8687 from filecoin-project/raulk/integrate-fvm-m1-freeze
upgrade filecoin-ffi to integrate fvm 1.0.0-rc.1 and builtin-actors v7.5.0.
2022-05-20 12:14:08 -04:00
Aayush 6fecccdf26 Update builtin-actors to dev/20220520 2022-05-20 11:51:13 -04:00
zengroundumbass 7c37451f48 Fix inaccurate config comment 2022-05-20 11:09:55 -04:00
Cory Schwartz 44264dccba fix integration test 2022-05-20 03:48:10 -07:00
Cory Schwartz b30548376b connection rate limiting 2022-05-20 03:40:52 -07:00
Łukasz Magiera 8552cdb54c Merge pull request #8645 from LexLuthr/feat/dag-reg-shard
feat: dagstore: add dagstore register-shard command
2022-05-20 11:56:05 +02:00
unknown c4cfb7a296 scheduling optimization 2022-05-20 17:04:51 +08:00
Raúl Kripalani 40aafbaea6 upgrade filecoin-ffi to integrate fvm 1.0.0-rc.1 and builtin-actors v7.5.0. 2022-05-20 00:45:44 +01:00
Cory Schwartz c9d3652357 Merge branch 'master' into rate-limit-gateway 2022-05-19 14:25:36 -07:00
Geoff Stuart ca21235a4f Can now specify a range of partitions to make a bad proof for 2022-05-18 21:31:54 -04:00
Geoff Stuart e49a9b790b Implemented sendInvalidWindowPoStCmd for cli 2022-05-18 21:31:54 -04:00
Geoff Stuart 3c61b3d841 compact 2022-05-18 21:31:54 -04:00
Geoff Stuart 9be120a04e Reset interopnet take 5 2022-05-18 21:23:39 -04:00
Geoff Stuart c0a00f48ce Reset interopnet 2022-05-18 21:23:39 -04:00
Aayush d39b9a8d83 Makefile: also build lotus-fountain and lotus-stats on devnets 2022-05-18 17:31:13 -04:00
vyzo 811bb58c5a always load the bundle into the blockstore during the migration 2022-05-18 20:20:17 +03:00
vyzo a694bb898d remove stale TODO comment 2022-05-18 20:19:44 +03:00
vyzo 45392a2696 Merge pull request #8678 from filecoin-project/fix/nv16-bundle-key
[nv16] add the network name to the bundle key in the datastore
2022-05-18 19:58:53 +03:00
vyzo 91daae2e36 add the network name to the bundle key in the datastore 2022-05-18 19:14:11 +03:00
Jiaying Wang 23eee4b3df Update bundle.go 2022-05-18 11:54:23 -04:00
vyzo cd2a998980 Merge pull request #8675 from filecoin-project/jen/devnet
chore: bundle: make devnet get the right bundle
2022-05-18 18:38:38 +03:00
Jennifer Wang 125272a526 make devnet get the right bundle 2022-05-18 11:04:10 -04:00
Geoff Stuart e7b4242b1c reset interopnet 2022-05-18 10:17:48 -04:00
Łukasz Magiera effee8ce1f Merge pull request #8589 from filecoin-project/fix/sched-hang
stores: Deduplicate parallel stat requests
2022-05-18 14:35:16 +02:00
Łukasz Magiera 6b3bc8c9d2 feat: worker: lotus-worker run --no-default 2022-05-18 12:27:46 +02:00
Geoff Stuart 243d18d812 Merge pull request #8669 from filecoin-project/jen/inter
chore: network: update interop info
2022-05-17 23:49:00 -04:00
Jennifer Wang 67a7ed0ac5 upgrade to v16 sooner! 2022-05-17 23:48:06 -04:00
Jennifer Wang a7fb84ef3b update interop info 2022-05-17 23:35:49 -04:00
Aayush 3c2fcce2c3 fix: genesis: only sign preseal deals after v16 2022-05-17 18:42:43 -04:00
Aayush Rajasekaran f6805f2794 Merge pull request #8534 from filecoin-project/asr/refactor
Use new go-state-types state accessors
2022-05-17 16:04:32 -04:00
Aayush 3b23ba0520 Address review 2022-05-17 15:52:59 -04:00
Aayush b2b20e469f Fix tests 2022-05-17 15:21:27 -04:00
Aayush 8cca9b1970 Use new go-state-types accessors 2022-05-17 15:21:27 -04:00
vyzo ee11018780 Merge pull request #8658 from filecoin-project/feat/nv16-dev-bundle
[nv16] niceties for development bundle loading
2022-05-17 22:14:02 +03:00
vyzo 93417fca7d Merge pull request #8660 from filecoin-project/fix/issue-8659
[nv16] use network bundle names consistent with the network name
2022-05-17 22:13:02 +03:00
vyzo 86e1144b65 Merge pull request #8666 from filecoin-project/feat/nv16-flexibundle
[nv16] flexible bundle loading
2022-05-17 22:12:48 +03:00
vyzo dbbbab4f8a use dev bundle release 2022-05-17 22:01:38 +03:00
vyzo 31c8460116 fix typo 2022-05-17 21:47:01 +03:00
vyzo ccb2e44e36 make path/url be a map of network name to car uri 2022-05-17 21:45:17 +03:00
vyzo d949b6c8ef fix envvar handling 2022-05-17 21:14:49 +03:00
vyzo daf452a180 flexible bundle loading 2022-05-17 20:38:32 +03:00
vyzo e9ece8eb3f improve comment 2022-05-17 20:06:17 +03:00
vyzoandAayush Rajasekaran 5981495740 Update build/README-bundle.md
Co-authored-by: Aayush Rajasekaran <arajasek94@gmail.com>
2022-05-16 22:42:21 +03:00
vyzo 314b417446 use network bundle names consistent with the network name 2022-05-16 22:02:37 +03:00
vyzo 5c0c4d64e2 more storage blah 2022-05-16 21:52:34 +03:00
vyzo 31301e2b9d storage blah 2022-05-16 21:50:50 +03:00
vyzo 6360107d53 godocs for bundle struct 2022-05-16 21:48:12 +03:00
vyzo eee73eed59 use switch for release/path logic 2022-05-16 21:45:12 +03:00
vyzoandraulk 60bf397569 fix typo
Co-authored-by: raulk <raul@protocol.ai>
2022-05-16 21:39:22 +03:00
vyzoandraulk 06f6b2885a fix typo
Co-authored-by: raulk <raul@protocol.ai>
2022-05-16 21:39:08 +03:00
vyzoandraulk 5eccdaaab7 fix typo
Co-authored-by: raulk <raul@protocol.ai>
2022-05-16 21:38:43 +03:00
vyzoandraulk 221e7952ab fix typo
Co-authored-by: raulk <raul@protocol.ai>
2022-05-16 21:38:09 +03:00
vyzo 30283e60f5 add basic readme for bundle specifications 2022-05-16 21:13:58 +03:00
vyzo 46a85fc11e niceties for development bundle loading 2022-05-16 21:09:09 +03:00
vyzo b4be759b2c don't store dev bundle release keys in the datastore
This is a nicety for development, so that we always load a development bundle to avoid having
to give them distinct names etc. Just call you release "dev" or "dev.xxx..." and put the bundle
in `.lotus/builtin-actors/v8/dev/builting-actors-${network}.{car,sha256sum}` and it will be
unconditionally loaded.
2022-05-16 15:11:10 +03:00
Geoff Stuart 56d30d3e0c Update interopnet genesis car 2022-05-15 17:58:11 -04:00
Geoff Stuart 05c7d86d55 Reset caterpillar 2022-05-14 16:59:42 -04:00
Jiaying Wang e1dfccb542 Merge pull request #8649 from filecoin-project/jen/v153
build: version: release v1.15.3-rc1
2022-05-13 02:13:29 -04:00
Lim Kin Sang 409748595c Merge branch 'filecoin-project:master' into master 2022-05-13 14:06:19 +08:00
jennijuju 5d65d9f7c8 release v1.15.3-rc1 2022-05-13 02:03:38 -04:00
LexLuthr 8f71927cb7 add new command to docs 2022-05-13 01:18:03 +05:30
vyzo 8a8fb56bf4 Merge pull request #8642 from filecoin-project/feat/nv16-bundles
[nv16] dynamic loading of builtin actor bundles
2022-05-12 22:18:55 +03:00
vyzo 68b280b695 add comments in the DI bundle loader 2022-05-12 22:03:18 +03:00
LexLuthr 6115bd02f1 run make gen 2022-05-13 00:27:26 +05:30
LexLuthr 4326fc370b add the new subcommand 2022-05-13 00:02:17 +05:30
vyzo 30d339842e rename bundle.toml to bundles.toml 2022-05-12 21:14:03 +03:00
vyzo 515a2dba8f use embeded toml spec for actor bundles 2022-05-12 20:53:12 +03:00
vyzo 37b807278a fix lotus-seed 2022-05-12 17:25:23 +03:00
LexLuthr 7e492f23b1 add dagstore register-shard command 2022-05-12 19:46:53 +05:30
vyzo a803021eef add TODO about the bundle load cost 2022-05-12 16:48:31 +03:00
vyzo 14f597d391 pass NetworkBundle through ldflags 2022-05-12 16:44:42 +03:00
vyzo 7be42d9935 refactor to pass the network bundle name through ldflags from build 2022-05-12 16:42:59 +03:00
vyzo 70bf990294 LOTUS_PATH is the canonical way to get the repo path 2022-05-12 16:21:29 +03:00
vyzo 7b6f109401 add retry logic for bundle fetcher 2022-05-12 10:00:20 +03:00
vyzo 26d07fd987 move bundle fetcher to node/bundle instead of chain/actors 2022-05-12 09:51:08 +03:00
vyzo da8bda3248 fix typo 2022-05-12 09:47:27 +03:00
vyzo de9ee7b334 fix lint 2022-05-11 22:48:01 +03:00
vyzo 37d94a3c91 move cli bundle loading back to init 2022-05-11 22:45:25 +03:00
vyzo 98730b90a3 fix lint 2022-05-11 22:41:56 +03:00
vyzo 73f6402ade bundle fetcher script does not exist any more 2022-05-11 22:34:43 +03:00
vyzo 74f300290e dynamic loading of builtin actor bundles 2022-05-11 22:30:07 +03:00
Łukasz Magiera 33a05d33a9 Merge pull request #8622 from RobQuistNL/patch-7
fix: Make deal making logs much less noisy
2022-05-10 20:21:29 -04:00
Łukasz Magiera f0867a9615 Merge pull request #8629 from filecoin-project/arajasek-patch-2
fix: upgrades: correct error message for v16 migration
2022-05-10 20:19:28 -04:00
Łukasz Magiera 03f412404a Merge pull request #8638 from filecoin-project/asr/merge-releases
chore: merge releases back into master
2022-05-10 20:07:37 -04:00
Aayush Rajasekaran c69b579201 Merge branch 'releases' into asr/merge-releases 2022-05-10 20:02:01 -04:00
Łukasz Magiera 086908e535 stores: Cache disk usage results for a few seconds 2022-05-10 19:18:49 -04:00
Aayush Rajasekaran d6178993c2 Merge pull request #8635 from filecoin-project/asr/pubsub
fix: mpool: avoid deadlock on unsubscribe
2022-05-10 17:21:27 -04:00
Steven Allen 9da58c5f6a fix: mpool: avoid deadlock on unsubscribe
When unsubscribing _all_ topics, pubsub will drain the subscription
channel to avoid deadlocks. See
https://github.com/whyrusleeping/pubsub/pull/1.

fixes #7803
2022-05-10 16:52:17 -04:00
Aayush Rajasekaran ddc46fc059 Update to filecoin pubsub 2022-05-10 16:51:36 -04:00
Aayush Rajasekaran fbcd4c7a6f fix: upgrades: correct error message for v16 migration 2022-05-10 11:36:12 -04:00
raulk 1814187578 Merge pull request #8593 from filecoin-project/fix/nv16-gas-outputs 2022-05-10 14:15:55 +00:00
Raúl Kripalani 10d77f1f0c run gen. 2022-05-10 15:00:58 +01:00
Raúl Kripalani b4dae335e1 reinstantiate sealer test. 2022-05-10 14:46:12 +01:00
Raúl Kripalani 7ba14f706c Merge branch 'feat/nv16' into fix/nv16-gas-outputs 2022-05-10 14:40:32 +01:00
raulk 0a06445e82 Merge pull request #8628 from filecoin-project/feat/nv16-merge-v1.15.2 2022-05-10 13:39:08 +00:00
Raúl Kripalani 8218109045 set build version to 1.16.0-dev. 2022-05-10 14:38:44 +01:00
Raúl Kripalani e0a52da4f7 run gen. 2022-05-10 14:32:52 +01:00
Raúl Kripalani 830a9482e7 fix ffi version. 2022-05-10 14:23:45 +01:00
Raúl Kripalani c6c7d87a56 remove bad entries from .gitignore. 2022-05-10 14:17:50 +01:00
Raúl Kripalani 6050d04c7c Merge tag 'v1.15.2' into feat/nv16-merge-v1.15.2 2022-05-10 14:17:29 +01:00
frank add6d5d2d5 add new ledger address with index cmd 2022-05-10 17:02:06 +08:00
Raúl Kripalani 24e68feb59 update filecoin-ffi to 57accc2a83db1c84. 2022-05-09 23:48:47 +01:00
Rob Quist c057ce10d1 Make deal making logs much less noisy
For each upgrade-marked sector, for each deal, this "info" log comes along but its not really "info" imho
2022-05-09 22:13:09 +02:00
Jakub Sztandera e1a3ef4266 Merge pull request #8620 from filecoin-project/feat/upgrade-gas-est
Gas estimation: Overestimate based on (actor, method) tuples
2022-05-09 21:09:40 +02:00
Aayush Rajasekaran f22a0f9ec0 Merge pull request #8546 from simlecode/feat/state_network_params_api
feat: api: add StateGetNetworkParams api
2022-05-09 12:44:47 -04:00
Jakub Sztandera 5fb69281d8 Estimate gas across the upgrade with per message multipliers
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2022-05-09 17:08:13 +02:00
Łukasz Magiera b9750087ce Merge pull request #8545 from swift-mx/mx_dev
fix: update StatApplied when fvm apply message
2022-05-06 14:23:30 -04:00
Aayush Rajasekaran 8282484f65 Gas estimation: Overestimate by 2 around the M1 upgrade 2022-05-06 11:50:43 -04:00
Aayush Rajasekaran 26a780a198 Gas estimation: Refactor the special PayCh collect case 2022-05-06 11:42:26 -04:00
Jiaying Wang 518dc962ee Merge pull request #8612 from filecoin-project/release/v1.15.2
build: release: v1.15.2
2022-05-06 02:23:35 -04:00
Jiaying Wang abdaae7ece Merge pull request #8611 from filecoin-project/jen/1512
build: release: v1.15.2 prep
2022-05-06 02:04:49 -04:00
zenground0 f4931c6098 attempt to fix codecov 2022-05-06 02:00:03 -04:00
Travis Person 5efa364d50 fix: ci: build macos and linux assets on tagged releases 2022-05-06 01:59:57 -04:00
Jiaying Wang c1f1d3d093 Merge pull request #8597 from filecoin-project/fix/assert-build-on-tag
fix: ci: build macos and linux assets on tagged releases
2022-05-06 01:59:30 -04:00
Jennifer Wang 304fa02d59 v1.15.2 prep 2022-05-06 01:57:03 -04:00
Łukasz Magiera e75e864070 Merge pull request #8564 from RobQuistNL/patch-5
fix: Clean up vanilla proof fetching errors for proper display
2022-05-05 16:29:54 -04:00
Łukasz Magiera 3c9a8a42d9 more logs 2022-05-05 13:12:09 -04:00
Łukasz Magiera 3184eb9f4d Merge pull request #8604 from RobQuistNL/patch-6
fix: Make markets logger less noisy when doing retrievals
2022-05-05 11:31:24 -04:00
Rob Quist 767a53f8c3 Make markets logger less noise when doing retrievals
Logging each block causes a lot of useless information in the logs
2022-05-05 11:56:09 +02:00
simlecode 962e37e893 add StateGetNetworkParams api 2022-05-05 14:16:30 +08:00
Łukasz Magiera d8f1380ec9 Merge pull request #8601 from filecoin-project/gstuart/flaky-gateway-test
fix: test: Fix flaky TestGatewayWalletMsig
2022-05-04 17:12:45 -04:00
Łukasz Magiera 4fcc9a1b09 Merge pull request #8600 from filecoin-project/chore/codecov
chore:ci:make codecov quiet
2022-05-04 16:41:12 -04:00
zenground0 0b5e40f455 try another one 2022-05-04 16:09:10 -04:00
Aayush Rajasekaran 0de1b84f9a Merge pull request #8563 from filecoin-project/fix/lotus-wallet-version
fix: lotus-wallet: correct network in version
2022-05-04 15:54:45 -04:00
Geoff Stuart 23378f8710 Fix flaky test 2022-05-04 15:48:44 -04:00
zenground0 1740dcb90a try that 2022-05-04 15:45:55 -04:00
zenground0 b83824b28b attempt to fix codecov 2022-05-04 15:22:54 -04:00
zenground0 8ab23cbd5c try this 2022-05-04 15:14:49 -04:00
Geoff Stuart 27e99ff84f Merge pull request #8587 from filecoin-project/gstuart/cli-uniformity
chore: cli: Alias cli commands for uniformity
2022-05-04 13:21:17 -04:00
vyzo b5d3487ce6 update filecoin-ffi@fix/issue-523 2022-05-04 20:20:19 +03:00
vyzo de1df6b2fe update test-vectors 2022-05-04 20:19:07 +03:00
vyzo ca9ad49ba8 go mod tidy 2022-05-04 20:19:07 +03:00
vyzo a8f97b5849 kill test depending on ffi generated stuffs that no longer exist 2022-05-04 20:19:07 +03:00
vyzo 89418a5c34 propagate gas outputs in fvm ApplyRet 2022-05-04 20:19:07 +03:00
vyzo f9a5c17c5a update builtin-actors 2022-05-04 20:19:07 +03:00
vyzo b7ca80265c use filecoin-ffi@fix/issue-523 2022-05-04 20:19:07 +03:00
Steven Allen 78899be05d feat: vm: add actor error backtraces to FVM 2022-05-04 20:18:25 +03:00
Travis Person 85be0aad1b fix: ci: build macos and linux assets on tagged releases 2022-05-04 16:24:54 +00:00
vyzo 0b49f34e01 go mod 2022-05-04 15:46:25 +03:00
vyzo 65df0b81d9 dear linter, using xerrors is what we want to do. 2022-05-04 15:43:47 +03:00
Steven Allen c7fdfb00bb ci: fix linting 2022-05-04 15:38:15 +03:00
Steven Allen baef8c0c27 chore: update golang and go-ipfs
1. go 1.16.4 is not supported.
2. go-ipfs 0.4.22 is NOT SUPPORTED!
3. switch go cimg/go
4. Remove unnecessary CI dependencies.
2022-05-04 15:38:15 +03:00
Jiaying Wang cfe201450c Merge pull request #8588 from filecoin-project/jen/v11523
build: release: v1.15.2-rc3
2022-05-03 16:35:43 -04:00
Jiaying Wang 2478814e5a Merge pull request #8590 from filecoin-project/jen/gitignore
chore: .gitignore: ignore built in actor bundles
2022-05-03 16:31:18 -04:00
jennijuju 69db877335 update changelog 2022-05-03 15:56:08 -04:00
jennijuju 7184c9a529 add actor bundles to gitignore 2022-05-03 15:56:01 -04:00
Geoff Stuart 0869bea026 make gen 2022-05-03 15:55:34 -04:00
jennijuju abf4957e18 ignore built in actor bundles 2022-05-03 15:54:47 -04:00
Łukasz Magiera 1249809283 stores: Deduplicate parallel stat requests 2022-05-03 15:53:11 -04:00
Geoff Stuart 514c756570 Alias cli commands 2022-05-03 15:46:46 -04:00
jennijuju 7020892631 v1.15.3-rc3 prep 2022-05-03 15:46:43 -04:00
Aayush Rajasekaran 662f7526c9 Update to FFI with logger bump 2022-05-03 15:12:48 -04:00
Łukasz Magiera 8863bdbfc0 sealing: Finalize snap sectors before submitting proofs 2022-05-03 15:12:30 -04:00
Travis Person 704833cd29 ci: build-all and build-macos on all ci runs 2022-05-03 15:12:12 -04:00
Travis Person 19ec0ef25d ci: deps: remove install-deps for macos builds 2022-05-03 15:12:01 -04:00
Aayush Rajasekaran 7036636fcf Merge pull request #8555 from filecoin-project/fix/worker-proofs-snapdeals
fix: worker: Download proofs if PRU2 is enabled
2022-05-03 15:08:19 -04:00
Aayush Rajasekaran 57198a2fba Merge pull request #8581 from filecoin-project/fix/macos-build-deps
ci: deps: macos build deps
2022-05-03 15:06:07 -04:00
Łukasz Magiera 002bdbf03a Merge pull request #8586 from filecoin-project/chore/remove-todo
chore:chore:chore
2022-05-03 16:55:29 +01:00
zenground0 33f190c9ce Unneeded todo 2022-05-03 11:48:22 -04:00
Jiaying Wang 4cfc73e17e Merge pull request #8583 from filecoin-project/asr/1552bump
Update to FFI with logger bump
2022-05-03 10:02:34 -04:00
Jiaying Wang e793d7e128 Merge pull request #8582 from filecoin-project/fix/snap-fin-first
fix: sealing: Finalize snap sectors before submitting proofs
2022-05-03 10:01:19 -04:00
Aayush Rajasekaran 3702d4be27 Update to FFI with logger bump 2022-05-02 16:51:15 -04:00
Travis Person 415b506a85 ci: build-all and build-macos on all ci runs 2022-05-02 20:37:49 +00:00
Travis Person d6618c75a0 ci: deps: remove install-deps for macos builds 2022-05-02 20:37:49 +00:00
Łukasz Magiera 3ab625fa4c sealing: Finalize snap sectors before submitting proofs 2022-05-02 16:18:31 -04:00
Geoff Stuart b50f4a57f0 replica unseal with work with worker fetch over rpc 2022-05-02 15:34:45 -04:00
Aayush Rajasekaran 17e1fcb615 Merge pull request #8569 from filecoin-project/chore/reset-interopnet
Reset interopnet
2022-05-02 12:10:51 -04:00
jennijuju 94d9dee0dd update changelog 2022-05-02 11:33:46 -04:00
Cory Schwartz e679083714 spelling error 2022-05-02 08:30:56 -07:00
Cory Schwartz 35e114a3ea Merge branch 'master' into rate-limit-gateway 2022-05-02 08:29:38 -07:00
Jiaying Wang 8d0b28bda4 Merge pull request #8577 from filecoin-project/jen/logfix
deps: ffi: update ffi that includes the log fix
2022-05-02 11:24:56 -04:00
jennijuju 4d5e850aa9 update ffi that includes the log fix 2022-05-02 10:59:21 -04:00
Jiaying Wang ece51c5372 Merge pull request #8533 from filecoin-project/jen/v1522
chore: release: v1.15.2-rc2
2022-05-02 10:54:58 -04:00
Geoff Stuart 94ceb0355d local worker now returns typed error instead of string 2022-05-02 09:59:41 -04:00
Geoff Stuart 00015a21d4 Fix imports 2022-05-02 09:59:41 -04:00
Geoff Stuart f6b08af337 reorg import 2022-05-02 09:59:41 -04:00
Geoff StuartandŁukasz Magiera ebf5eb6e28 Update lib/rpcenc/reader.go
Co-authored-by: Łukasz Magiera <magik6k@users.noreply.github.com>
2022-05-02 09:59:41 -04:00
Geoff Stuart 5030fd2589 Optimize sector key regeneration 2022-05-02 09:59:41 -04:00
Geoff Stuart 2134f165c0 Review fixes 2022-05-02 09:59:41 -04:00
Geoff Stuart 98637b357b Replica unseal working 2022-05-02 09:59:41 -04:00
Geoff Stuart b2a6d308ba Consolidate nullreader files 2022-05-02 09:59:41 -04:00
Travis Person f0673daaad Reset interopnet 2022-04-29 21:46:23 +00:00
Steven Allen 88f8c7d166 Merge pull request #8524 from filecoin-project/steb/error-backtrace
feat: vm: add actor error backtraces to FVM
2022-04-29 16:44:57 +02:00
Steven Allen 6c0c111847 feat: vm: add actor error backtraces to FVM 2022-04-28 19:58:19 +02:00
Łukasz Magiera f9a4a400da Merge pull request #8557 from filecoin-project/feat/worker-commp
sealing: DataCid on workers
2022-04-28 17:45:32 +02:00
Rob Quist 562d4e0f85 Clean up vanilla fetching errors for proper display
Results;
```
2  0  2374  good
2  0  2409  good
2  0  2282  bad (generating vanilla proof: non-200 code from http://10.224.3.83:1123/remote/vanilla/single: 'fsstat: path not found
')
2  0  2579  good
2  0  2338  good
```

This PR should change that to;
```
2  0  2374  good
2  0  2409  good
2  0  2282  bad (generating vanilla proof: non-200 code from http://10.224.3.83:1123/remote/vanilla/single: 'fsstat: path not found')
2  0  2579  good
2  0  2338  good
```
2022-04-28 14:49:46 +02:00
Łukasz Magiera 43436f7bc8 rpcenc: Fix double read at eof 2022-04-28 11:50:51 +02:00
Rjan 04bb539502 fix: lotus-wallet: correct network in version
Adding $(GOFLAGS) so that when compiling on calibnet, the correct network is shown, instead of showing just `mainnet`. Should address 2. in #8459
2022-04-28 10:10:29 +02:00
Cory Schwartz 5ec084a653 add test for the limit func 2022-04-28 00:45:34 -07:00
Łukasz Magiera 779e923854 sealing: ComputeDataCid review 2022-04-27 20:44:02 +02:00
vyzo 0295d22742 Merge pull request #8537 from filecoin-project/fix/nv16-testing-bundles
[nv16] testing bundles with fake proofs
2022-04-27 18:25:26 +03:00
vyzo f80d10f3be make docsgen 2022-04-27 17:57:05 +03:00
vyzo b29a182da7 fix docgen 2022-04-27 17:57:04 +03:00
vyzo 53ca3b64e1 normalize itest PrecommitChallengeDelay to 10, matching the test bundles 2022-04-27 17:57:04 +03:00
vyzo 31d193702b don't parse error messages, just check exit codes 2022-04-27 17:57:04 +03:00
vyzo 7c9ce49362 update bundles 2022-04-27 17:57:00 +03:00
Łukasz Magiera a2d90625d2 sealing: Fix tests 2022-04-26 21:43:24 +02:00
Łukasz Magiera d7c52f8adf sealing: ComputeDataCid miner API 2022-04-26 21:37:48 +02:00
jennijuju 48c54605ae release v1.15.2-rc2 2022-04-26 21:19:03 +02:00
Łukasz Magiera 1aed631fe5 sealing: DataCid on workers 2022-04-26 20:36:23 +02:00
vyzo 30ed272aa9 fetch testing-fwp bundle
use testing-fwp bundle when InsecurePostValidation is true

testing-fwp is testing-fake-proofs
2022-04-26 18:38:52 +03:00
Rjan a50a20b5a7 fix: worker: Download proofs if PRU2 is enabled
The lotus-worker does not check or download the params if Prove Replica Update tasks are enabled.
2022-04-26 09:10:38 +02:00
Phi-rjan 1162b02e60 Merge pull request #8528 from rjan90/ux/description-lotus-wallet
fix: ux: update `lotus-wallet run` description
2022-04-25 15:57:50 +02:00
Steven Allen 5b1800556b ci: fix linting 2022-04-25 14:13:16 +02:00
Phi-rjanandAayush Rajasekaran 825cdb8db9 Update cmd/lotus-wallet/main.go
Co-authored-by: Aayush Rajasekaran <arajasek94@gmail.com>
2022-04-25 08:56:34 +02:00
swift-mx 6c40d363f5 fix: update StatApplied when fvm apply message 2022-04-24 11:50:54 +08:00
jennijuju bd9e8c7663 update go version thats needed by the new libp2p 2022-04-23 22:20:07 +02:00
Aayush Rajasekaran 52d5d57460 Merge pull request #8540 from filecoin-project/fix/market-deal-api-pointer
fix: api: Make MarketListDeals and DealsList return pointers for MarketDeal
2022-04-23 11:55:22 -04:00
Travis Person ea4f599233 Make MarketListDeals and DealsList return points for MarketDeal 2022-04-22 23:26:29 +00:00
Aayush 3eb007776a Update actors 2022-04-22 11:40:59 -04:00
Jiaying Wang 2be9452ced Merge pull request #8526 from masih/idxprov-topic-by-netname
fix: market: Infer index provider topic from network name by default
2022-04-22 15:32:58 +02:00
vyzo efad692353 go mod tidy 2022-04-22 02:54:30 +02:00
vyzo 357da15e5c update go-libp2p@v0.19 2022-04-22 02:53:05 +02:00
vyzo cc328689e1 dear linter, using xerrors is what we want to do. 2022-04-22 02:51:15 +02:00
Masih H. Derkani d044e30e12 Infer index provider topic from network name by default
Index provider integration uses a gossipsub topic to announce changes to
the advertised content. The topic name was fixed to the default topic
which is `/indexer/ingest/mainnet`.

In the case of lotus, the gossipsub validators enforce a list of topics
the instance is permitted to join by setting subscription filter option
when `PubSub` instance is constructed via DI.

Having the fixed topic name meant that any SP starting up a node on a
network other than `mainnet` would have to override the default config
to avoid the node crashing when index provider is enabled.

Instead of a fixed default, the changes here infer the allowed indexer
topic name from network name automatically if the topic configuration is
left empty.

Fixes #8510
2022-04-22 02:46:05 +02:00
Jiaying Wang ff987e0b9d Merge pull request #8511 from filecoin-project/deps/update-libp2p
deps: update go-libp2p@v0.19
2022-04-22 02:44:45 +02:00
vyzo cc294496ab go mod tidy 2022-04-22 02:20:45 +02:00
vyzo ed0b4b0bfa update go-libp2p@v0.19 2022-04-22 02:20:45 +02:00
Aayush eb9aa039bb Set interop (caterpillarnet) params 2022-04-21 17:00:44 -04:00
Jiaying Wang bab500bec5 Merge pull request #8531 from filecoin-project/fix/lint
chore: fix lint issue
2022-04-21 13:24:13 -04:00
vyzo 1c8880ed2c dear linter, using xerrors is what we want to do. 2022-04-21 20:10:34 +03:00
vyzo bc32eec051 Merge pull request #8530 from filecoin-project/fix/nv16-itests-paych
NV16: fix paych
2022-04-21 20:05:03 +03:00
vyzo f017d43aae make gen 2022-04-21 19:19:20 +03:00
vyzo 0def6cb9e1 fix paymentch actor code ID for construction 2022-04-21 19:19:13 +03:00
Aayush Rajasekaran a7dc3f519b Merge pull request #8521 from filecoin-project/fix/itests-nv16
[nv16] improve itest situation and preload manifests in cli
2022-04-21 10:12:16 -04:00
Masih H. Derkani f273a440f0 Infer index provider topic from network name by default
Index provider integration uses a gossipsub topic to announce changes to
the advertised content. The topic name was fixed to the default topic
which is `/indexer/ingest/mainnet`.

In the case of lotus, the gossipsub validators enforce a list of topics
the instance is permitted to join by setting subscription filter option
when `PubSub` instance is constructed via DI.

Having the fixed topic name meant that any SP starting up a node on a
network other than `mainnet` would have to override the default config
to avoid the node crashing when index provider is enabled.

Instead of a fixed default, the changes here infer the allowed indexer
topic name from network name automatically if the topic configuration is
left empty.

Fixes #8510
2022-04-21 14:00:53 +01:00
Rjan 295bf03e4d fix: ux: update lotus-wallet run description
Update the `lotus-wallet run` to include that a `FULLNODE_API_INFO` env variable needs to be set before running
2022-04-21 14:21:09 +02:00
vyzo 270f962489 Merge pull request #8527 from filecoin-project/fix/itests-nv16-msig
fix multisig for nv16
2022-04-21 15:13:55 +03:00
vyzo 2d93697fe3 make gen 2022-04-21 15:09:58 +03:00
vyzo 688e8f3c09 fix multisig creation to not use the synthetic CIDs after v8 2022-04-21 15:09:49 +03:00
vyzo 090c655422 remove log spam 2022-04-21 14:18:21 +03:00
vyzo 75f00e92f5 improve concurrency story of manifest state 2022-04-21 13:53:30 +03:00
vyzo 1366901ded preload manifest in cli 2022-04-21 13:26:22 +03:00
vyzo 8ea00a3fc0 update builtin-actors bundle 2022-04-21 13:21:24 +03:00
Cory Schwartz 9fd3f3f73a fix itests 2022-04-20 20:51:15 -07:00
Cory Schwartz 30559a0d78 lint 2022-04-20 20:46:32 -07:00
Cory Schwartz c2b7ffbae5 fix test 2022-04-20 20:33:37 -07:00
Cory Schwartz 9bf9843ff6 add metrics 2022-04-20 19:48:41 -07:00
Jakub Sztandera 48ffb15901 Merge pull request #8512 from filecoin-project/ci/update-go
chore: ci: update golang and go-ipfs
2022-04-20 13:18:13 +02:00
Steven Allen e0d2b9526e ci: fix linting 2022-04-20 12:06:28 +02:00
Steven Allen 5f5bd31f58 chore: update golang and go-ipfs
1. go 1.16.4 is not supported.
2. go-ipfs 0.4.22 is NOT SUPPORTED!
3. switch go cimg/go
4. Remove unnecessary CI dependencies.
2022-04-20 12:06:25 +02:00
vyzo 5ceaeafa6e fix TODO for proof type, now that we have the testing bundle 2022-04-20 12:47:06 +03:00
Cory Schwartz 9558e9f0ee respond early 2022-04-19 19:21:27 -07:00
Cory Schwartz fc42d03ea4 Add rate limiting to the lotus gateway 2022-04-19 18:35:19 -07:00
Aayush b60d795a5d FVM: Support exectraces 2022-04-19 18:05:49 -04:00
Aayush Rajasekaran 2410cf3d84 Merge pull request #8514 from filecoin-project/asr/exec-trace
feat: FVM: Support exectraces
2022-04-19 18:03:25 -04:00
Aayush 36a8d9716e FVM: Support exectraces 2022-04-19 15:24:40 -04:00
raulk 3e5037d196 Merge pull request #8509 from filecoin-project/feat/actor-bundles 2022-04-19 16:18:54 +00:00
vyzo 34dfc78f57 only check hash if we have the file 2022-04-19 19:12:25 +03:00
vyzo 042601129d fix lotus-seed 2022-04-19 18:39:55 +03:00
Geoff Stuart a3a3fefb1c Merge pull request #8486 from filecoin-project/gstuart/robust-address-endpoint
Feat: API: Implement StateLookupRobustAddress
2022-04-19 11:37:23 -04:00
vyzo 942f05ad6a set LOTUS_SRC_DIR for tests in CI 2022-04-19 18:30:04 +03:00
vyzo adaa02fd26 load testing bundles for tests 2022-04-19 17:33:20 +03:00
vyzo eb7fc47290 update CI workflow for bundle fetching 2022-04-19 15:38:14 +03:00
vyzo 7e1c55cdf9 use build tags to embed appropriate bundles 2022-04-19 15:20:40 +03:00
vyzo 995caaaace update filecoin-ffi 2022-04-19 15:02:14 +03:00
vyzo 959b62a2df new bundle fetcher 2022-04-19 14:42:53 +03:00
Łukasz Magiera eb894b0dd2 Merge pull request #8475 from filecoin-project/fix/deal-idx-oob
fix:sealing:check index out of bounds against correct param length not return length
2022-04-18 18:56:23 +02:00
Łukasz Magiera 1922e76349 Merge pull request #8495 from 1475-IPFS/new-bootstrapper
add 1475 bootstrapper
2022-04-18 13:23:46 +02:00
Łukasz Magiera d1fd3f56a7 Merge pull request #8429 from filecoin-project/vyzo/fip-0031
FIP0031 refinements
2022-04-15 20:08:17 +02:00
vyzo e2e2cd87ff rename patchStateTree to patchManifestCodeCids 2022-04-15 20:18:41 +03:00
vyzo beb3369c76 add LoadManifestFromBundle, use it in miner init 2022-04-15 20:15:28 +03:00
Łukasz Magiera 4bd039902c Merge pull request #8494 from filecoin-project/gstuart/bump-xtools
Bump version for xtools
2022-04-15 17:23:06 +02:00
lifei 77615e9583 add 1475 bootstrapper 2022-04-15 12:38:07 +08:00
Geoff Stuart 49d6c07280 Implemented StateLoockupRobustAddress 2022-04-14 17:41:18 -04:00
Geoff Stuart 0db46dfeaa Bump version for xtools 2022-04-14 17:26:08 -04:00
vyzo 534e43e1d3 fix lotus-shed 2022-04-14 20:10:51 +03:00
vyzo c5e3ca3855 fix more rebase issues 2022-04-14 19:52:58 +03:00
vyzo cede67bfdd make gen 2022-04-14 19:49:23 +03:00
vyzo 2690b69831 fix rebase issues 2022-04-14 19:49:08 +03:00
vyzo 1866eebe06 go mod tidy 2022-04-14 19:35:09 +03:00
vyzo 65de3e7f6c add retries to curl when fetching bundles 2022-04-14 19:34:40 +03:00
vyzo 1c1d8e0626 update specs-actors/v8@master 2022-04-14 19:34:40 +03:00
Raúl Kripalani 30ed847531 make fetch-bundles.sh portable. 2022-04-14 19:34:26 +03:00
vyzo 6bd2d89e30 use memory blockstore for miner manifest loading 2022-04-14 19:34:26 +03:00
vyzo 507b835a9c need a blockstore for the manifest loader 2022-04-14 19:34:26 +03:00
vyzo 395c772222 make the miner load the manifest so that it can correctly map actors 2022-04-14 19:34:26 +03:00
vyzo 07e4024e3b fix lint 2022-04-14 19:33:24 +03:00
vyzo f28bd054ef fix rand_test 2022-04-14 19:33:24 +03:00
vyzo 5f62227f53 fix sync_test 2022-04-14 19:33:24 +03:00
vyzo dec2b312af fix lint 2022-04-14 19:33:24 +03:00
vyzo 3b1964c507 remove manifest from upgrade schedule, get it inside the migration instead 2022-04-14 19:33:24 +03:00
vyzo 0ac8708396 simplify fetch-bundles script 2022-04-14 19:33:24 +03:00
vyzo 93f1fac76b simplify DI -- no need for the special key for builtin actor loading 2022-04-14 19:33:24 +03:00
vyzo 1f7c89d5d8 make gen 2022-04-14 19:33:24 +03:00
vyzo 1643ec4fe9 less wonky market/state.go.template 2022-04-14 19:33:24 +03:00
vyzo 508c06092d remove unnecessary isv8 state boolean from agen 2022-04-14 19:33:24 +03:00
vyzo 54f312139f removed dead code from builtin actor template init funcs 2022-04-14 19:33:24 +03:00
vyzo 19593eda3b fix forks_test 2022-04-14 19:33:24 +03:00
vyzo cd5829ae42 update specs-actors 2022-04-14 19:33:23 +03:00
zenground0 8562798940 Use go-fil-markets tag 2022-04-14 19:32:56 +03:00
zenground0 0f6da17cd1 Lint 2022-04-14 19:32:56 +03:00
zenground0 60d09579be More fixes 2022-04-14 19:32:56 +03:00
zenground0 7163fe61a0 Post rebase fix 2022-04-14 19:32:56 +03:00
zenground0 124fe26492 WIP annoying errors 2022-04-14 19:32:56 +03:00
Aayush 339b7db2b7 Integrate FIP 0027 2022-04-14 19:32:56 +03:00
vyzo 77613b57a9 fix lint 2022-04-14 19:31:34 +03:00
vyzo c35e7691bd fix conformance driver 2022-04-14 19:31:34 +03:00
vyzo 12554baed4 fix forks_test 2022-04-14 19:31:34 +03:00
vyzo 73e7c42b7e mark TODO for fixing policy stuffs in test 2022-04-14 19:31:34 +03:00
vyzo 2c9ea8c46b fix test 2022-04-14 19:31:34 +03:00
vyzo fcf69e7b82 register mapping for methods using the real code cid 2022-04-14 19:31:14 +03:00
vyzo 5d6e9ec65b patch genesis state tree to get the right code IDs 2022-04-14 19:31:14 +03:00
vyzo 752ce9e590 make tests work 2022-04-14 19:31:14 +03:00
vyzo e8b902b42f initialize system actor for nv16 at genesis 2022-04-14 19:31:14 +03:00
vyzo 9ee57937b4 make gen 2022-04-14 19:31:14 +03:00
vyzo 8f121ab0ec patch agen to deal with v8 deal proposals 2022-04-14 19:31:14 +03:00
vyzo 45a65c5d9e update specs-actors 2022-04-14 19:31:14 +03:00
vyzo 36cb76a322 genesis depends on actor bundle 2022-04-14 19:30:47 +03:00
vyzo 3e72a088df fix rand_test 2022-04-14 19:30:47 +03:00
vyzo aba27d930b make gen 2022-04-14 19:30:47 +03:00
vyzo 44e42bfec8 fix sync_test 2022-04-14 19:30:47 +03:00
vyzo 1dbfb3bea9 fetch builtin actor bundles as part of prepare workflow 2022-04-14 19:30:47 +03:00
vyzo c9ac0020d7 make gateway a variable 2022-04-14 19:30:47 +03:00
vyzo 71913521f9 fix itest migrations 2022-04-14 19:30:47 +03:00
vyzo a375d532f6 add make rules to fetch actor bundles 2022-04-14 19:30:47 +03:00
vyzo 34022f3844 add script to fetch bundles 2022-04-14 19:30:47 +03:00
vyzo ad00d5987d gitignore actor bundles 2022-04-14 19:30:47 +03:00
vyzo a8547ed840 make manifest cid access thread-safe 2022-04-14 19:30:47 +03:00
vyzo ddede202a8 update fvm construction 2022-04-14 19:29:59 +03:00
vyzo 10b07ecd20 update filecoin-ffi 2022-04-14 19:29:34 +03:00
vyzo 17d72f02a1 use a sync.Once for manifest loading to avoid interference from parallel test runs 2022-04-14 19:29:22 +03:00
vyzo 5e3112fa95 introduce a marker type for builtin actor loading to make DI work 2022-04-14 19:29:22 +03:00
vyzo f26d19ed7d load actor bundle at startup and initialize the manifest CID from the loaded file 2022-04-14 19:29:22 +03:00
vyzo c3fb3301ab embed actors v8 bundle 2022-04-14 19:29:22 +03:00
vyzo 7712fc044e rerun agen to gofmt 2022-04-14 19:29:22 +03:00
vyzo efa57bbd1f make agen gofmt 2022-04-14 19:29:22 +03:00
vyzo cdd5420e0c agen 2022-04-14 19:29:22 +03:00
vyzo 770608aef1 update templates for actor shims 2022-04-14 19:29:22 +03:00
vyzo 08a5950863 actor manifests and metadata 2022-04-14 19:29:22 +03:00
vyzo a9ae38a1ce wire in nv16 migration signature and manifests 2022-04-14 19:29:22 +03:00
vyzo 13a4602806 gomod: update specs-actors@v8 2022-04-14 19:29:06 +03:00
Aayush 3370847f3e Implement FIP-0031 2022-04-14 19:28:16 +03:00
Łukasz Magiera 06f8637485 Merge pull request #8481 from filecoin-project/fix/snap-fsoverhead
fix: storiface: Make FSOverhead numbers more accurate
2022-04-14 15:36:19 +02:00
Piotr Galar 9277c2d68d Use testground-github-action from testground org 2022-04-14 13:45:55 +02:00
zenground0 5bdcc7d7e0 make gen 2022-04-13 22:16:05 -04:00
zenground0 db5082552d Fix sorting bug to deflake test 2022-04-13 22:06:38 -04:00
Jiaying Wang dcf6f64143 Merge pull request #8482 from filecoin-project/jen/11521
build: release: v1.15.2-rc1
2022-04-13 19:29:24 +02:00
jennijuju 372dd2ced9 v1.15.2-rc1 2022-04-13 19:11:02 +02:00
Łukasz Magiera 0c8828514e Merge pull request #8480 from Icarus9913/fix/indexProvider-comments
fix: node: fix comment for IndexProvider
2022-04-13 12:01:33 +02:00
Łukasz Magiera 0a4b49d3b3 fix: storiface: Make FSOverhead numbers more accurate 2022-04-13 11:59:48 +02:00
Łukasz Magiera 84470e9c64 Merge pull request #8442 from rjan90/ux/soft-delete-wallet
ux: wallet: update delete usage
2022-04-13 11:51:09 +02:00
Łukasz Magiera 88142d246c Merge pull request #8479 from filecoin-project/asr/expired-cutoff
Fail to add expired precommits to a batch
2022-04-13 11:44:31 +02:00
Icarus9913 98c861e3c9 fix the IndexProviderConfig comment 2022-04-13 17:44:06 +08:00
Aayush Rajasekaran 42a79d52a2 Fail to add expired precommits to a batch 2022-04-12 23:41:52 -04:00
zenground0 563dc8e59a Fix up tests 2022-04-12 18:31:31 -04:00
Jiaying Wang 02a6176bd0 Merge pull request #8477 from filecoin-project/fix/disable-kvlog
chore: config: default-disable kvlog
2022-04-13 00:03:11 +02:00
Łukasz Magiera cc7055774d chore: config: default-disable kvlog 2022-04-12 23:17:13 +02:00
zenground0 d540f7af72 Fix typo 2022-04-12 15:41:56 -04:00
zenground0 239274cb1d Properly handle output index 2022-04-12 15:34:45 -04:00
zenground0 fe6c25353c Fix assumptions about return value 2022-04-12 14:46:01 -04:00
Jiaying Wang aca9496437 Merge pull request #8473 from filecoin-project/jen/bumpmaster
chore: version: bump the version to v1.15.3-dev
2022-04-12 17:36:07 +02:00
Jiaying Wang ce3c6472fb Merge pull request #8470 from filecoin-project/feat/enable-rcmgr-by-default
enable rcmgr by default
2022-04-12 16:12:03 +02:00
jennijuju 787bcef130 bump the version to v1.15.3 2022-04-12 15:53:45 +02:00
Łukasz Magiera cf92776c64 Merge pull request #8468 from filecoin-project/jen/mergeback
chore: merge releases back to master
2022-04-12 15:41:36 +02:00
Jiaying WangandŁukasz Magiera 1fc94e33b2 Co-authored-by: Łukasz Magiera <magik6k@users.noreply.github.com>
fix merge error
Co-authored-by: Łukasz Magiera <magik6k@users.noreply.github.com>
2022-04-12 15:29:54 +02:00
jennijuju 137f494619 tidy and gen 2022-04-12 13:53:03 +02:00
Łukasz Magiera df7e2a884b Merge pull request #8469 from filecoin-project/update-libp2p-rcmgr-optout
Update libp2p to v0.18.1
2022-04-12 12:02:24 +02:00
Łukasz Magiera ac57797904 Merge pull request #8464 from filecoin-project/feat/getask-protos
feat: cli: lotus client list-asks --protocols
2022-04-12 10:47:52 +02:00
vyzo 3c8aa18f70 enabled rcmgr by default; disable with LOTUS_RCMGR=0 2022-04-12 11:32:37 +03:00
vyzo 0f4019cbb7 update go-libp2p@v0.18.1 2022-04-12 11:30:24 +03:00
Rjan c3f2f12cb2 Revert soft-delete cmd
Revert `soft-delete` cmd back to `delete`. Keeps the updated usage
2022-04-12 08:31:54 +02:00
Aayush Rajasekaran 656a33863f Fixup merge 2022-04-11 20:45:13 -04:00
jennijuju 0dcad9cc18 Merge branch 'releases' into jen/mergeback 2022-04-12 01:25:02 +02:00
Łukasz Magiera 6bef1aeb82 feat: cli: lotus client list-asks --protocols 2022-04-11 19:49:52 +02:00
Łukasz Magiera 3cd563622e Merge pull request #8439 from filecoin-project/revert-appimage-removal
Revert appimage removal
2022-04-11 19:24:36 +02:00
Łukasz Magiera 66f88773c0 Merge pull request #8461 from filecoin-project/fix/release-unseal-nosnap-panic
sealing: Don't panic in ReleaseUnsealed with no ranges
2022-04-09 21:40:35 +02:00
Łukasz Magiera 3ecb1fd5d9 sealing: Don't panic in ReleaseUnsealed with no ranges 2022-04-09 20:58:47 +02:00
Łukasz Magiera 7900479e9c Merge pull request #8447 from filecoin-project/feat/sched-better
feat: sched: Improve worker assigning logic
2022-04-09 20:50:31 +02:00
BMZ 73203f6ebe Update README.md
find the link is fault, modify https://docs.filecoin.io/get-started/lotus to https://lotus.filecoin.io
2022-04-08 17:36:32 +08:00
Jiaying Wang 731da455d4 Merge pull request #8457 from filecoin-project/release/v1.15.1
build: release: v1.15.1
2022-04-07 18:14:15 -04:00
Aayush Rajasekaran b5791d4442 Merge pull request #8456 from filecoin-project/jen/v1.15.1
chore: release: v1.15.1 prep
2022-04-07 18:04:15 -04:00
Jennifer Wang af7e301867 bump the version to v1.15.1 2022-04-07 17:40:58 -04:00
Jennifer Wang 681c255bc5 update changelog 2022-04-07 17:40:47 -04:00
Jiaying Wang 8a30448fa7 Merge pull request #8455 from filecoin-project/jen/v1516prep
build: release: v1.15.1-rc6
2022-04-07 14:52:20 -04:00
Jennifer Wang fa6389a7e7 add missing item to changelog 2022-04-07 14:43:38 -04:00
Jennifer Wang 0c099dfbd0 bump the version to v1.15.1-rc6 2022-04-07 14:10:01 -04:00
Jennifer Wang fd40280300 update changelog 2022-04-07 14:08:36 -04:00
Jiaying Wang 5a48c3a921 Merge pull request #8451 from filecoin-project/jen/v1516
chore: backport: #8443 #8444 #8446
2022-04-07 13:27:17 -04:00
Aayush Rajasekaran 68b6190c12 Merge pull request #8453 from filecoin-project/asr/backport
fix: FVM: add finality check for consensus faults
2022-04-07 13:16:47 -04:00
Łukasz Magiera e2f4c70b70 Merge pull request #8452 from filecoin-project/asr/fvm-consensus-fault
fix: FVM: add finality check for consensus faults
2022-04-07 13:07:40 -04:00
Aayush 7518854625 fix: FVM: add finality check for consensus faults 2022-04-07 12:27:33 -04:00
Aayush d1c0b8b0c9 fix: FVM: add finality check for consensus faults 2022-04-07 12:22:07 -04:00
Masih H. Derkani 0a2429b467 Fix DI of PubSub in markets by binding dependencies it needs
Bind drand and bootstrap peers config so that `PubSub` instantiated by
`ConfigCommon` has all the dependencies it needs when `PubSub` instance
is needed in markets. In ths case, the instance is needed by the index
provider engine to announce new indexing advertisements.
2022-04-07 11:06:29 -04:00
Masih H. Derkani e37c54f38e Reuse the market process PubSub instance in index provider engine
The markets process instantiates its own `PubSub` instance with all
validators, peer scoring, etc. set up. Use that instane to join the
indexing topic, otherwise the default topic instantiated by
index-provider internally (via go-legs) has no validators.
2022-04-07 11:06:23 -04:00
Masih H. Derkani 4043923e56 Set index provider options based on lotus config
Always set index provider options based on the lotus configuration.
Otherwise, they will have no effect.
2022-04-07 11:05:09 -04:00
Cory Schwartz 76c10807d6 disable publish-packer 2022-04-07 11:04:45 -04:00
Łukasz Magiera 20698a7843 Merge pull request #8446 from filecoin-project/disable-publish-packer
chore: ci: disable publish-packer
2022-04-07 10:44:13 -04:00
Cory Schwartz a4c24985e8 disable publish-packer 2022-04-07 10:32:15 -04:00
Łukasz Magiera b26ac2bd0e Merge pull request #8450 from filecoin-project/fix/testkit-rpc-shutdown
testkit: give up on waiting for the RPC server to shutdown after 1s
2022-04-07 08:06:46 -04:00
dirkmcandAnton Evangelatov c34ade9ffb Update itests/kit/rpc.go
Co-authored-by: Anton Evangelatov <anton.evangelatov@gmail.com>
2022-04-07 13:32:00 +02:00
Dirk McCormick 5f0489ace0 fix: testkit: give up on waiting for the RPC server to shutdown after 1 second 2022-04-07 12:22:36 +02:00
Rjan 96ee416b96 Fix TestWalletDelete-test
Change from `delete` to `soft-delete` in the TestWalleteDelete test.
2022-04-07 10:25:49 +02:00
Łukasz Magiera 80133aaa79 feat: sched: Improve worker assigning logic 2022-04-06 18:24:14 -04:00
Łukasz Magiera 6de4e3d4cd feat: sched: Cache worker tasks 2022-04-06 18:24:14 -04:00
Łukasz Magiera f652dd3436 Merge pull request #8441 from filecoin-project/frrist/observer-deregister
chore: events: implement event observer deregister method
2022-04-06 18:22:41 -04:00
Łukasz Magiera 9f98d0ae4a Merge pull request #8443 from filecoin-project/masih/idxprov-reuse-pubsub
fix: market: Reuse the market `PubSub` in index provider
2022-04-06 17:51:46 -04:00
Masih H. Derkani f369d99138 Fix DI of PubSub in markets by binding dependencies it needs
Bind drand and bootstrap peers config so that `PubSub` instantiated by
`ConfigCommon` has all the dependencies it needs when `PubSub` instance
is needed in markets. In ths case, the instance is needed by the index
provider engine to announce new indexing advertisements.
2022-04-06 20:04:39 +01:00
Masih H. Derkani 7e7e88e330 Reuse the market process PubSub instance in index provider engine
The markets process instantiates its own `PubSub` instance with all
validators, peer scoring, etc. set up. Use that instane to join the
indexing topic, otherwise the default topic instantiated by
index-provider internally (via go-legs) has no validators.
2022-04-06 19:39:12 +01:00
frrist 20bf46f309 chore: events: implement event observer deregister method 2022-04-06 11:01:18 -07:00
Łukasz Magiera f378c6d3ee Merge pull request #8444 from filecoin-project/masih/fix-idxprov-config
fix: market: set all index provider options based on lotus config
2022-04-06 11:59:37 -04:00
Masih H. Derkani b88307f875 Set index provider options based on lotus config
Always set index provider options based on the lotus configuration.
Otherwise, they will have no effect.
2022-04-06 16:08:10 +01:00
Rjan 255ff1a4b7 ux: wallet: soft-delete wallet
Renaming the function to soft-delete to better reflect what it does - and specify that a hard deletion is needed for permanent removal.
2022-04-06 10:23:03 +02:00
Łukasz Magiera 696659d6bc Merge pull request #8437 from filecoin-project/fix/fvm-aarch64-build
chore: ffi: update the FFI to fix the aarch64 build
2022-04-05 21:56:08 -04:00
Łukasz Magiera 8a16e1ca7d Merge pull request #8440 from filecoin-project/chore/update-fvm
chore: ffi: update the FFI to update the FVM
2022-04-05 21:36:42 -04:00
Steven Allen 39dee1410b chore: ffi: update the FFI to update the FVM
This fixes the build on aarch64.
2022-04-05 21:25:00 -04:00
Cory Schwartz c715254d54 Revert "stop publishing appimagine since its disabled by #7707"
This reverts commit 6b0868089b.
2022-04-05 17:26:44 -07:00
Cory Schwartz d1f3ab5dec Revert "remove from the bundlde"
This reverts commit 7d65a2664d.
2022-04-05 17:26:39 -07:00
Łukasz Magiera 0fa74a7712 Merge pull request #8438 from filecoin-project/fix/release-unseal-snap-abort
fix: sealing: Release unsealed sector files after snapdeals abort
2022-04-05 18:26:20 -04:00
Steven Allen e69cc545b3 chore: ffi: update to fix build on aarch64 2022-04-05 17:59:30 -04:00
Łukasz Magiera 68f3e4483f fix: sealing: Release unsealed sector files after snapdeals abort 2022-04-05 16:45:07 -04:00
Łukasz Magiera e1ef1b759e Merge pull request #8206 from firesWu/fix/optimize-worker-tracker-lock
release worker tracker lock when call cb func
2022-04-05 12:53:09 -04:00
Łukasz Magiera 1bd0f55945 Merge pull request #8425 from filecoin-project/fix/market-node-startup
fix: node: Fix market node startup
2022-04-03 14:55:19 -04:00
Łukasz Magiera a40381a700 Merge pull request #8426 from filecoin-project/feat/multi-vlog2car
feat: shed: Multi-file vlog2car
2022-04-02 18:00:21 -04:00
Łukasz Magiera 9a34f5803c feat: shed: Multi-file vlog2car 2022-04-02 13:25:14 -04:00
Jiaying Wang 913478b21e Merge pull request #8421 from filecoin-project/jen/v1515
build: release: v1.15.1-rc5
2022-04-01 17:57:21 -04:00
Łukasz Magiera 2b3fad1261 fix: node: Fix market node startup 2022-04-01 17:32:55 -04:00
Jennifer Wang bba2ee92bd update dockerfile 2022-04-01 17:08:27 -04:00
Jennifer Wang c4aece4ab4 pull ffi that includes the latest fvm 2022-04-01 17:02:32 -04:00
Jiaying Wang e74e56947b Merge pull request #8424 from filecoin-project/jen/ffibump
deps: ffi: pull ffi that includes the latest fvm
2022-04-01 17:01:49 -04:00
Jennifer Wang ce0b8149e9 pull ffi that includes the latest fvm 2022-04-01 15:58:15 -04:00
Jennifer Wang 5915d4ac6a fix ci 2022-04-01 15:31:10 -04:00
Aayush Rajasekaran 940505569c Merge pull request #8422 from filecoin-project/asr/log
Update to go-log 2.5.1
2022-04-01 09:41:26 -04:00
Aayush Rajasekaran 8c46d00ee7 Update to go-log 2.5.1 2022-04-01 01:13:55 -04:00
Cory Schwartz cc57f732d2 fix template 2022-04-01 00:07:48 -04:00
Cory Schwartz f410da2a0a restore filters 2022-04-01 00:07:28 -04:00
Cory Schwartz cb39ce66bc add packer executor 2022-04-01 00:07:10 -04:00
Cory Schwartz eb0d52a249 copy packer_build source 2022-04-01 00:05:27 -04:00
Cory Schwartz 2804c2ca99 tmp: remove filters 2022-04-01 00:05:23 -04:00
Cory Schwartz 71614bd639 add debug 2022-04-01 00:05:19 -04:00
Cory Schwartz 78187ab8d1 fix template 2022-04-01 00:05:10 -04:00
Cory Schwartz 6b4cc44060 fix template 2022-04-01 00:05:06 -04:00
Cory Schwartz 61742f5d5a restore filters 2022-04-01 00:05:02 -04:00
Cory Schwartz c330641866 use 1.8 2022-04-01 00:04:58 -04:00
Cory Schwartz 33019ee496 add packer executor 2022-04-01 00:04:53 -04:00
Cory Schwartz b40b7cc40e copy packer_build source 2022-04-01 00:04:38 -04:00
Cory Schwartz 17bcf91910 tmp: remove filters 2022-04-01 00:04:29 -04:00
Cory Schwartz f04b5f2963 add debug 2022-04-01 00:04:23 -04:00
Jennifer Wang 6ff99568cf pull the latest ffi 2022-03-31 23:52:08 -04:00
Jennifer Wang 0a220a3efb update the changelog 2022-03-31 23:51:57 -04:00
Jennifer Wang 0bc3e26090 bump the version to v1.15.1-rc5 2022-03-31 23:13:35 -04:00
Łukasz Magiera 257bc70c2e fix lotus-sim build 2022-03-31 23:08:05 -04:00
koalacxr 6c1651cb3d modify quantile imports error 2022-03-31 23:08:00 -04:00
zl 01efb3b1a7 fix: dead loop on removing a sector 2022-03-31 23:06:54 -04:00
Łukasz Magiera 2ad3a117f1 fix: sealing: Fix PR1 worker selection 2022-03-31 23:06:17 -04:00
Łukasz Magiera e19c5bfcd7 Merge pull request #8413 from filecoin-project/packer-publish-copy-orb
Packer publish copy orb
2022-03-31 18:45:40 -04:00
Łukasz Magiera f9ae5c0cb3 Merge pull request #8420 from filecoin-project/fix/8226
fix: sealing: Fix PR1 worker selection
2022-03-31 17:52:45 -04:00
Łukasz Magiera ac82366b9e fix: sealing: Fix PR1 worker selection 2022-03-31 17:01:33 -04:00
Cory Schwartz b493855195 fix template 2022-03-30 23:10:17 -07:00
Cory Schwartz 4bb8865e2f fix template 2022-03-30 22:57:02 -07:00
Cory Schwartz 9c25aea327 restore filters 2022-03-30 22:53:57 -07:00
Cory Schwartz cc5e96b23f use 1.8 2022-03-30 22:35:20 -07:00
Cory Schwartz 0095d93686 add packer executor 2022-03-30 22:30:17 -07:00
Cory Schwartz 1da3e2c711 copy packer_build source 2022-03-30 22:27:18 -07:00
Cory Schwartz 73468e706e tmp: remove filters 2022-03-30 22:03:41 -07:00
Cory Schwartz 4894e0b18d add debug 2022-03-30 22:02:43 -07:00
Łukasz Magiera f155b3003b Merge pull request #8411 from filecoin-project/deps/update-data-transfer-fix-master
chore(deps): update go-data-transfer with fixes (master edition)
2022-03-30 15:11:26 -04:00
hannahhoward 4974b6874e chore(deps): update go-data-transfer with fixes 2022-03-30 14:59:31 -04:00
Łukasz Magiera 1fac7981a4 Merge pull request #8410 from filecoin-project/feat/go-1.18
fix: go: make Go 1.18 builds work
2022-03-30 14:56:19 -04:00
Łukasz Magiera b244277ff2 Merge pull request #8403 from filecoin-project/deps/update-data-transfer-fix
Update go-data-transfer with fixes
2022-03-30 14:54:45 -04:00
Łukasz Magiera 0c6f3ee19c fix lotus-sim build 2022-03-30 14:34:20 -04:00
Łukasz Magiera 12752c6970 Merge github.com:koalacxr/lotus into feat/go-1.18 2022-03-30 14:31:32 -04:00
Łukasz Magiera 39c38c44a3 Merge pull request #8404 from simlecode/fix/not_check_error
fix: sealing: Added error checking
2022-03-29 22:57:35 -04:00
simlecode f0944030b7 Added error checking 2022-03-30 10:28:56 +08:00
Aayush Rajasekaran 7eb7edb950 Merge pull request #8402 from filecoin-project/jen/ffiupdate
deps: update ffi with actor v7.1.0 and fvm that uses the bundle that includes the new manifest
2022-03-29 21:17:33 -04:00
Jiaying Wang 6a88a94a8b Merge pull request #8401 from filecoin-project/jen/v1514
chore: release: v1.15.1-rc4
2022-03-29 21:15:34 -04:00
hannahhoward 7e86f7196e chore(deps): update go-data-transfer with fixes 2022-03-29 18:12:42 -07:00
Jiaying WangandAayush Rajasekaran eeeb33c9ac Update CHANGELOG.md
Co-authored-by: Aayush Rajasekaran <arajasek94@gmail.com>
2022-03-29 20:59:16 -04:00
Jennifer Wang b8e412884b deps: update ffi with actor v7.1.0 and fvm that uses the bundle that includes the new manifest 2022-03-29 20:49:40 -04:00
Jennifer Wang 4d2691a2e1 build: release: v1.15.1-rc4 2022-03-29 20:36:39 -04:00
Łukasz Magiera 3ce467a25f Merge pull request #8391 from filecoin-project/feat/parallel-fault-check
feat: storage: Parallel proving checks
2022-03-29 16:36:12 -04:00
Łukasz Magiera 0710342317 fix waiting in sector proving checks 2022-03-29 15:28:37 -04:00
Łukasz Magiera d95f24b9d2 config: Sane default parallel sector read defaults 2022-03-29 14:52:37 -04:00
Łukasz Magiera c456836ad5 Merge pull request #8400 from filecoin-project/asr/update
Update to specs-storage v0.2.2
2022-03-29 14:23:07 -04:00
Aayush be418e77f9 Update to specs-storage v0.2.2 2022-03-29 14:08:55 -04:00
Jennifer Wang 21a1f3a34d deps: update ffi 2022-03-29 12:02:41 -04:00
Łukasz Magiera ebd34f1884 feat: storage: Parallel proving checks 2022-03-29 11:45:08 -04:00
Łukasz Magiera ba2596e318 Merge pull request #8397 from filecoin-project/feat/thread-safe-piecereader
Thread safe piecereader
2022-03-29 11:22:19 -04:00
Aarsh Shah d0af0eff9f thread safe piecereader 2022-03-29 19:41:06 +05:30
Łukasz Magiera d502eeba2b Merge pull request #8389 from filecoin-project/feat/manual-wdpost
feat: miner: API/CLI to compute window-post
2022-03-28 21:20:06 -04:00
Łukasz Magiera 064c3d473c Merge pull request #8390 from filecoin-project/feat/worker-ulimitn-check
feat: worker: check fd limit on startup
2022-03-28 18:33:26 -04:00
Łukasz Magiera 5a42083abd feat: worker: check fd limit on startup 2022-03-28 18:07:54 -04:00
Łukasz Magiera 54cb55a7ae feat: miner: API/CLI to compute window-post 2022-03-28 17:06:51 -04:00
Łukasz Magiera a709a0a682 Merge pull request #8384 from rjan90/fix/change-worker-msg
fix: ux: Change Propose-worker msg
2022-03-28 12:57:01 -04:00
Łukasz Magiera 029610fb40 Merge pull request #8386 from zl03jsj/fix/dead_loop_on_remove_sector
fix: miner: dead loop on removing sector
2022-03-28 12:51:53 -04:00
zl 1646edf513 fix: dead loop on removing a sector 2022-03-28 20:51:57 +08:00
Rjan e2781ea0f2 Change test to reflect renaming
Change what string the TestWorkerKeyChange-test is looking for, to reflect the new Propose-worker msg-changes
2022-03-28 10:04:47 +02:00
Rjan 555ff81cbf Add punctuation. 2022-03-28 09:46:08 +02:00
Jiaying Wang 003df89edf Merge pull request #8383 from filecoin-project/jen/v1512
chore: build: v1.15.1-rc3
2022-03-28 02:54:15 -04:00
Rjan bfc2cc3aa3 fix: ux: Change Propose-worker msg
Changes the message so it´s clear that it´s only Storage Providers without active deadlines that needs to call 'confirm-change-worker'.
2022-03-28 08:18:30 +02:00
jennijuju eeab118a05 chore: build: v1.15.1-rc3 2022-03-27 19:36:10 -04:00
Jiaying Wang 04458ea12b Merge pull request #8382 from filecoin-project/jen/v1513
chore: backport: #8381 #8378
2022-03-27 19:17:28 -04:00
Łukasz Magiera c951e348b4 feat: config: Move MakeNewSectorForDeals config into the Sealing sectoin 2022-03-26 23:45:48 -04:00
Jennifer Wang 2a988d453c chore: ffi: the latest fvm release 2022-03-26 23:25:02 -04:00
Jiaying Wang b8b33c4f06 Merge pull request #8381 from filecoin-project/jen/ffi
chore: ffi: the latest fvm release
2022-03-26 22:57:02 -04:00
Jennifer Wang f2fa2f5067 chore: ffi: the latest fvm release 2022-03-26 22:45:47 -04:00
Łukasz Magiera 001de1a915 Merge pull request #8379 from filecoin-project/feat/proving-workers-cli
feat: miner cli: Separate proving workers command
2022-03-26 16:36:00 -04:00
Łukasz Magiera f0f0fe38a3 Merge pull request #8380 from filecoin-project/feat/worker-type-logic
fix: worker: Fix default value handling
2022-03-26 16:35:38 -04:00
Łukasz Magiera 2498da742d fix: worker: Fix default value handling 2022-03-26 16:26:19 -04:00
Łukasz Magiera ad684ed0ea feat: miner cli: Separate proving workers command 2022-03-26 16:16:25 -04:00
Łukasz Magiera 0d7d02da35 Merge pull request #8378 from filecoin-project/feat/move-makedealsector-cfg
feat: config: Move MakeNewSectorForDeals config into the Sealing sectoin
2022-03-26 16:08:21 -04:00
Łukasz Magiera b78892934b feat: config: Move MakeNewSectorForDeals config into the Sealing sectoin 2022-03-26 15:50:21 -04:00
Aayush Rajasekaran c50b63c5f6 Merge pull request #8374 from filecoin-project/revert-8119-travis/fvm-interopnet
Revert "Update params for interopnet for fvm"
2022-03-25 22:26:35 -04:00
Aayush Rajasekaran b0ff3dfb90 Revert "Update params for interopnet for fvm" 2022-03-25 22:21:36 -04:00
Łukasz Magiera 7401fa234e Merge pull request #7971 from filecoin-project/feat/post-worker
feat: PoSt workers
2022-03-25 20:31:49 -04:00
Łukasz Magiera 7a009abcdd sealing: Fix TaskType.WorkerType 2022-03-25 18:54:59 -04:00
Aayush Rajasekaran b305244405 Merge pull request #8119 from filecoin-project/travis/fvm-interopnet
Update params for interopnet for fvm
2022-03-25 17:28:41 -04:00
Aayush 02a0770436 Caterpillarnet 2022-03-25 17:05:45 -04:00
Florian Ruen 196030bee2 fix: cli: Reset miner/ask lists in interactive deal 'miner' step (#8155)
* Update client.go

Bug fixed : if hitting return instead of filling with a valid value, the CLI crashed (line 796)
Change return err by continue to ask a valid value again

* Fix #8100

Bug fixed : if hitting return instead of filling with a valid value, the CLI crashed (line 796)
Change return err by continue to ask a valid value again

* lint reported errors on CircleCI

Commit to fix lint reported errors during tests on CircleCI
(remove blank lines x2)

* lint reported errors on CircleCI

Commit to fix lint reported errors during tests on CircleCI
(remove trailling whitespace)

* Fix #8095
Clear the list of miner addresses and successfull get-asked before asking for new ones
Previous behavior : if get-ask failed for miner(s), the faulty miner will be retried each time,
so you have to stop the command and start again to change this faulty miner (instead of removing from the list on the new attempt)

* Clear the list of miner addresses and successfull get-asked before asking for new ones
Previous behavior : if get-ask failed for miner(s), the faulty miner will be retried each time,
so you have to stop the command and start again to change this faulty miner (instead of removing from the list on the new attempt)
2022-03-25 17:05:19 -04:00
Łukasz Magiera d49297f898 Merge pull request #8371 from filecoin-project/raulk/shed-compute-state-range
feat: lotus-shed: add command to compute state over a range of tipsets.
2022-03-25 17:00:35 -04:00
Łukasz Magiera b5ce847579 Merge pull request #8372 from filecoin-project/chore/gomock-temp-cleanup
chore: Remove temp gomock reflect file
2022-03-25 16:57:13 -04:00
Łukasz Magiera 7dc19bb26e Merge pull request #8369 from filecoin-project/asr/pricelist
VM: Refactor pricelist to be based on network versions
2022-03-25 16:50:52 -04:00
Łukasz Magiera 82343a06e7 Merge remote-tracking branch 'origin/master' into feat/post-worker 2022-03-25 16:49:46 -04:00
Łukasz Magiera 5f9753933a chore: Remove temp gomock reflect file 2022-03-25 16:46:50 -04:00
Łukasz Magiera fcaad20ecc cli: Update docs 2022-03-25 16:28:08 -04:00
Łukasz Magiera f1ddb55252 worker: Fix challengeThrottle 2022-03-25 16:07:47 -04:00
Łukasz Magiera 69e8516d1f stores: log 404 in remote.GenerateSingleVanillaProof 2022-03-25 15:37:35 -04:00
Łukasz Magiera d437f19aae Merge pull request #8349 from filecoin-project/feat/faulty-cli-utils
feat: miner cli: proving check --faulty, faults in storage list sectors
2022-03-25 15:29:27 -04:00
Raúl Kripalani 977e302e0c lotus-shed: add command to compute state over a range of tipsets. 2022-03-25 19:12:16 +00:00
Aayush 0bfbcfb5e9 stmgr: GetNtwkVersion: return genesis network version before the first upgrade 2022-03-25 15:09:14 -04:00
Łukasz Magiera 7c4d3a457c Merge pull request #8343 from filecoin-project/feat/more-snap-config
feat: sealing: More SnapDeals config knobs
2022-03-25 15:07:00 -04:00
Aayush 25b2e144b8 VM: Refactor pricelist to be based on network versions 2022-03-25 15:06:10 -04:00
Łukasz Magiera 11db419735 Merge pull request #8357 from filecoin-project/feat/net-ping
feat: cli/net: implement 'net ping' command
2022-03-25 14:57:21 -04:00
Łukasz Magiera 4e2d7fe1db Merge pull request #8370 from rjan90/ux/sectors-snap-up
fix:snapup: Rename error message
2022-03-25 14:33:20 -04:00
Rjan 910d3caacf fix:snapup: Rename error message
Renaming the the error-message you get if you try to snap-up the same sector twice, to better reflect that you are snapping a sector, and not marki-for-upgrade, which now has been deprecated.
2022-03-25 16:39:53 +01:00
Jiaying Wang a449937682 Merge pull request #8368 from rjan90/fix/ux-msig-create
fix: multisig: Print "waiting for confirmation.."
2022-03-25 11:15:15 -04:00
Łukasz Magiera 0b3144f566 workers: PoSt challenge throttle/timeout config 2022-03-24 19:42:44 -04:00
Łukasz Magiera 13701c7ce2 wdpost: Lock update files in snapped sectors 2022-03-24 18:43:08 -04:00
Łukasz Magiera 3f152ae2bf workers: cmd/lotus-seal-worker->cmd/lotus-worker 2022-03-24 18:37:01 -04:00
Łukasz Magiera a53dc5a7c7 workers: WorkerType mehdod on SealTask 2022-03-24 18:28:45 -04:00
Rjan da64f241eb Print "waiting for confirmation.." in msigCreateCmd
Prints an addition "waiting for confirmation.." when running `lotus msig create [address1 address2]` to indicate that command is waiting for the msg to be mined into block, and not just hanging.

Should fix #4053
2022-03-24 16:11:24 +01:00
Jiaying Wang b2dbe8dfef Merge pull request #8365 from filecoin-project/jen/v1512prep
chore: build: v1.15.1-rc2
2022-03-23 16:32:49 -04:00
Jennifer Wang 9436b15528 chore: release: v1.15.1-rc2 2022-03-23 16:22:51 -04:00
Jiaying Wang d6e6bfbb5a Merge pull request #8364 from filecoin-project/jen/v1512
chore: backport:  #8355 #8353 #8363
2022-03-23 16:20:07 -04:00
Aayush 3fbf765605 FVM: log when fvm is used 2022-03-23 14:05:43 -04:00
Łukasz Magiera 8e75a8d12d fix: sealing: always do cooldown in handleSubmitReplicaUpdateFailed 2022-03-23 14:05:43 -04:00
vyzo 450d4b256a update go-libp2p to v0.18 2022-03-23 14:05:43 -04:00
Aayush 595e29186e stmgr: call: use a buffered concurrent-access blockstore 2022-03-23 14:05:43 -04:00
Jiaying Wang caeeb6a7d9 Merge pull request #8363 from filecoin-project/asr/fvm-log
chore: FVM: log when fvm is used
2022-03-23 13:43:35 -04:00
Jiaying Wang c070f253ac Merge pull request #8359 from filecoin-project/asr/vm-memstore
stmgr: call: use a buffered concurrent-access blockstore
2022-03-23 13:22:56 -04:00
Aayush 694c45cd65 FVM: log when fvm is used 2022-03-23 13:19:28 -04:00
Aayush 46447ef55c stmgr: call: use a buffered concurrent-access blockstore 2022-03-23 12:30:27 -04:00
Łukasz Magiera dbc6b32a4c Merge pull request #8361 from filecoin-project/gstuart/set-ask-optional-params
--max-piece-size in set-ask is no longer required
2022-03-23 16:08:35 +01:00
Geoff Stuart 5ba4a78657 --max-piece-size in set-ask is no longer required 2022-03-22 22:05:06 -04:00
Jiaying Wang 6861705354 Merge pull request #8360 from filecoin-project/asr/v7-actors-bump
FFI: Bump v7 actors to v7.0.6
2022-03-22 21:14:22 -04:00
Aayush 7d0f5dd4f9 FFI: Bump v7 actors to v7.0.6 2022-03-22 20:44:51 -04:00
Steven Allen 1609317ac8 Merge pull request #8358 from filecoin-project/asr/vm-memstore
feat: stmgr: call: use a buffered concurrent-access blockstore
2022-03-21 21:08:12 -04:00
Aayush 3a121f99c7 stmgr: call: use a buffered concurrent-access blockstore 2022-03-21 19:32:18 -04:00
Łukasz Magiera 56b97e1386 lotus-worker: default non-exclusive flags to false when exclusive flag is set 2022-03-21 19:53:43 +01:00
Aayush Rajasekaran 3a62c8b4a2 Merge pull request #8356 from filecoin-project/fix/wallet-init-type
fix: lotus-wallet: pass correct repo type to repo.Init
2022-03-21 11:59:39 -04:00
Łukasz Magiera 1a0fc75325 Merge pull request #8353 from filecoin-project/fix/ru-retry-loop
fix: sealing: always do cooldown in handleSubmitReplicaUpdateFailed
2022-03-21 16:38:44 +01:00
Łukasz Magiera 945b93590d ping: Match go-ipfs in cmd output 2022-03-21 15:11:19 +01:00
Łukasz Magiera 701d0a111e Merge branch 'feat/net-ping' of github.com:ychiaoli18/lotus into feat/net-ping 2022-03-21 13:06:11 +01:00
Łukasz Magiera 3c1edca902 Merge pull request #8351 from filecoin-project/asr/vm-memstore
fix: avoid racy memstores when estimating gas
2022-03-21 12:12:28 +01:00
Łukasz Magiera 92e4caa151 Merge remote-tracking branch 'origin/master' into feat/post-worker 2022-03-21 12:09:47 +01:00
Łukasz Magiera e767981aaf itests: Fix ccupgrade post test 2022-03-21 12:07:00 +01:00
Łukasz Magiera 0536eb898d itests: Share WaitForSectorActive correctly 2022-03-21 12:07:00 +01:00
Łukasz Magiera 433e9c351d config: Fix doc on PreferNewSectorsForDeals; gofmt 2022-03-21 12:07:00 +01:00
Łukasz Magiera 49a6d7ebcc itests: Breakup ccupgrade_test.go 2022-03-21 12:07:00 +01:00
Łukasz Magiera 4c25358a08 itests: Test Sealing.MakeCCSectorsAvailable 2022-03-21 12:07:00 +01:00
Łukasz Magiera ecd1ab4b42 itests: Test Sealing.PreferNewSectorsForDeals 2022-03-21 12:07:00 +01:00
Łukasz Magiera 97a73f1c29 sealing: More SnapDeals config knobs 2022-03-21 12:04:23 +01:00
Łukasz Magiera d118ef9202 Merge pull request #8355 from filecoin-project/deps/update-libp2p
deps: update go-libp2p to v0.18 release
2022-03-21 12:00:49 +01:00
Łukasz Magiera 3cd17f0ee4 fix: lotus-wallet: pass correct repo type to repo.Init 2022-03-21 12:00:37 +01:00
Łukasz Magiera fc34d9ba1c Merge pull request #8086 from filecoin-project/nonsense/refactor-nodetype
refactor: convert RepoType from int to interface
2022-03-21 11:57:39 +01:00
Łukasz Magiera 1eb101d70e Merge pull request #8354 from filecoin-project/nonsense/extract-unixfs-filestore
lib: extract unixfs filestore into lib
2022-03-21 11:47:14 +01:00
vyzo 7fea2e4d6c update go-libp2p to v0.18 2022-03-21 12:33:07 +02:00
Łukasz Magiera cca69a6c16 gen 2022-03-21 10:49:30 +01:00
Anton Evangelatov 0ed8647b6f extract unixfs filestore into lib 2022-03-21 10:48:52 +01:00
Łukasz Magiera 58843857e5 fix: sealing: always do cooldown in handleSubmitReplicaUpdateFailed 2022-03-21 10:32:03 +01:00
Łukasz Magiera efdcd00da4 Merge pull request #7956 from filecoin-project/nonsense/add-lotus-test-image-building
feat: infra/ci: add `lotus-test` image as CI build step
2022-03-21 10:26:37 +01:00
Anton Evangelatov fee69a889b modify .circleci/template.yml 2022-03-21 08:41:30 +01:00
Aayush 4af8b8ecf3 fix: avoid racy memstores when estimating gas 2022-03-20 16:25:38 -04:00
Łukasz Magiera 9a31b65cd0 feat: miner cli: proving check --faulty, faults in storage list sectors 2022-03-19 12:55:52 +01:00
Łukasz Magiera 5365ccfdb1 cli: Show separate worker types in miner info 2022-03-18 21:31:15 +01:00
Łukasz Magiera 36f1dd7bb3 itests: Fix flaky TestWindowPostWorkerSkipBadSector 2022-03-18 20:51:47 +01:00
Łukasz Magiera 7b81369c8c wdpost: Don't attempt to snark with skipped sectors 2022-03-18 19:45:25 +01:00
Łukasz Magiera 7a1beacd00 ffiwrapper: Test some assumptions about GeneratePoStFallbackSectorChallenges 2022-03-18 13:11:14 +01:00
Łukasz Magiera 32818c528f wdpost: Test repro broken challenge skipping 2022-03-18 12:32:16 +01:00
Anton Evangelatov 0d6493ec3f resolve merge conflicts with master 2022-03-18 12:28:22 +01:00
Łukasz Magiera 8715745feb wdpost: Dedupe skipped sectors in generateWindowPoSt 2022-03-18 12:10:42 +01:00
Łukasz Magiera aa124cf414 fix lint issues 2022-03-18 11:38:27 +01:00
Łukasz Magiera a94e47c6be Merge pull request #8345 from filecoin-project/fix/itest-minepost-hang
fix: itests: Don't hang on exit in MineBlocksMustPost
2022-03-18 11:27:51 +01:00
Łukasz Magiera 6ddbe41376 Merge remote-tracking branch 'origin/master' into feat/post-worker 2022-03-18 10:54:44 +01:00
Łukasz Magiera 42b2adddee fix: itests: Don't hang on exit in MineBlocksMustPost 2022-03-18 10:42:21 +01:00
Jiaying Wang cd499e3ab8 Merge pull request #8342 from filecoin-project/jen/v151rc1prep
chore: release: v1.15.1-rc1
2022-03-17 17:46:30 -04:00
Jiaying Wang 7244ff9e14 Update CHANGELOG.md 2022-03-17 17:42:45 -04:00
Jennifer Wang 3c252e1d87 bump the version to v1.15.1-rc1 2022-03-17 17:42:45 -04:00
Jennifer Wang 84896f4790 update the change log for v1.15.1 2022-03-17 17:42:45 -04:00
Łukasz Magiera d4cbb0803b Merge pull request #8339 from filecoin-project/backport/v1.15.1/smallfixes
backport: #8338, #8337
2022-03-17 19:50:21 +01:00
Łukasz Magiera 18987f92ee Merge pull request #8340 from filecoin-project/arajasek-patch-1
Shed: fix error message
2022-03-17 17:48:02 +01:00
Łukasz Magiera b26405226e Merge pull request #8336 from filecoin-project/fix/snap-list-estimate
fix: miner cli: Estimate deal weight in sector list when upgrading
2022-03-17 17:30:41 +01:00
Aayush Rajasekaran e1c7f30e60 Shed: fix error message 2022-03-17 12:24:32 -04:00
Aayush Rajasekaran ff244fba6c Merge pull request #8332 from filecoin-project/feat/fvm
FVM integration
2022-03-17 12:20:05 -04:00
Łukasz Magiera 49a4c06a88 fix: sealing: FinalizeSector doesn't need sealed replica access 2022-03-17 17:08:25 +01:00
Łukasz Magiera 361dc55dfd fix: storagefsm: Fix error loop on bad event 2022-03-17 17:08:25 +01:00
Łukasz Magiera b366e2c91f Merge pull request #8337 from filecoin-project/fix/fin-sealed-acc
fix: sealing: FinalizeSector doesn't need sealed replica access
2022-03-17 16:58:51 +01:00
Łukasz Magiera eb4bda2302 Merge pull request #8338 from filecoin-project/fix/fsm-badevt-loop
fix: storagefsm: Fix error loop on bad event
2022-03-17 16:58:17 +01:00
Aayush Rajasekaran 2ed2ee1da7 Merge branch 'release/v1.15.1' into feat/fvm 2022-03-17 11:31:56 -04:00
Aayush Rajasekaran 58876aefa3 Update FFI 2022-03-17 11:31:47 -04:00
Aayush 77b123b02f CircSupply: Remove unused method 2022-03-17 11:31:39 -04:00
Łukasz Magiera d9a1ecd387 fix: storagefsm: Fix error loop on bad event 2022-03-17 15:40:11 +01:00
Łukasz Magiera 9debd14b6c fix: sealing: FinalizeSector doesn't need sealed replica access 2022-03-17 15:15:54 +01:00
Łukasz Magiera ff14cd3f9d fix: Estimate deal weight in sector list when upgrading 2022-03-17 14:52:54 +01:00
Łukasz Magiera e0481bbeca Merge pull request #8281 from spark8899/change-worker
feat:  multisig: lotus-sheed miner-multisig change-worker command.
2022-03-17 13:55:30 +01:00
Łukasz Magiera 73ab064137 Merge pull request #8295 from Juneezee/test/t.TempDir
test: use `T.TempDir` to create temporary test directory
2022-03-17 12:30:41 +01:00
Łukasz Magiera 2cf0e4cb32 #8281: Apply suggestions from code review 2022-03-17 12:30:02 +01:00
Łukasz Magiera 7123b29f06 Merge pull request #8241 from rjan90/master
fix: cli: add ArgsUsage field to clientGetDealCmd
2022-03-17 12:19:49 +01:00
Łukasz Magiera 037e80c70c gofmt 2022-03-17 12:10:24 +01:00
Łukasz Magiera 1c055fe83b Merge branch 'master' into test/t.TempDir 2022-03-17 12:06:52 +01:00
Łukasz Magiera 858538284f Merge pull request #8305 from filecoin-project/asr/shed-label
Shed: Add a tool to check UTF-8 validity of labels
2022-03-17 12:05:52 +01:00
Łukasz Magiera 114cb4e0d5 Merge pull request #8333 from filecoin-project/backport/v1.15.1/feat/snap-queue
backport: v1.15.1: feat: sealing: Sector upgrade queue
2022-03-16 22:50:33 +01:00
Łukasz Magiera 4a1b211876 miner cli: Treat Activating sectors like Proving in sectors list 2022-03-16 22:30:59 +01:00
Łukasz Magiera d78f1e4eee sealing: Rename Sealing.creating to a less confusing name 2022-03-16 22:30:58 +01:00
Łukasz Magiera 5e14892ef8 sealing: fix lint issues 2022-03-16 22:30:57 +01:00
Aayush Rajasekaran 97c95a4e82 Update FFI 2022-03-16 17:30:47 -04:00
Łukasz Magiera 9e4c8881b6 sealing: regenerate mocks 2022-03-16 22:30:09 +01:00
Łukasz Magiera b8ba5274e2 sealing: Enforce minimum expiration in tryGetUpgradeSector 2022-03-16 22:30:09 +01:00
Łukasz Magiera aa4adb0dfd sealing: Fix build 2022-03-16 22:30:09 +01:00
Łukasz Magiera 62a393bf12 sealing: Address snap queue review 2022-03-16 22:30:09 +01:00
Łukasz Magiera a440339548 sealing: Run more checks when considering Available sectors 2022-03-16 22:30:07 +01:00
Łukasz Magiera 3c15314ed5 sealing: Use bitfields in sectorActive 2022-03-16 22:29:40 +01:00
Łukasz Magiera d3cec2f0d1 sealing: Add MakeCCSectorsAvailable config 2022-03-16 22:29:40 +01:00
Łukasz Magiera 1158a928ec itests: Test reverting Available sectors to Proving 2022-03-16 22:29:40 +01:00
Łukasz Magiera 1bd2cbbef6 sealing: Support abort uprade for Available sectors 2022-03-16 22:29:40 +01:00
Łukasz Magiera a9d757f3a0 itests: TestTooManyMarkedForUpgrade is not applicable anymore 2022-03-16 22:29:40 +01:00
Łukasz Magiera 9a854e9ab7 feat: sealing: Linter did have a good point 2022-03-16 22:29:40 +01:00
Łukasz Magiera 2cef55a4f6 feat: sealing: Sector upgrade queue 2022-03-16 22:29:37 +01:00
Łukasz Magiera a3bdd29615 Merge pull request #8330 from filecoin-project/feat/snap-queue
feat: sealing: Sector upgrade queue
2022-03-16 22:24:45 +01:00
Łukasz Magiera a431fdbdde miner cli: Treat Activating sectors like Proving in sectors list 2022-03-16 22:16:39 +01:00
Łukasz Magiera 60ba133fc8 sealing: Rename Sealing.creating to a less confusing name 2022-03-16 21:29:57 +01:00
Aayush Rajasekaran 90d78f924f Merge pull request #8293 from filecoin-project/feat/fvm
Filecoin Virtual Machine integration
2022-03-16 15:51:56 -04:00
Łukasz Magiera 3b2a1ea41d sealing: fix lint issues 2022-03-16 20:28:15 +01:00
Łukasz Magiera 2961f3b864 sealing: regenerate mocks 2022-03-16 20:20:07 +01:00
Łukasz Magiera 3f23cf0c1e sealing: Enforce minimum expiration in tryGetUpgradeSector 2022-03-16 20:17:20 +01:00
Łukasz Magiera aac1f5abef sealing: Fix build 2022-03-16 20:09:18 +01:00
Łukasz Magiera 724d80cf02 sealing: Address snap queue review 2022-03-16 20:04:48 +01:00
Łukasz Magiera e7ee5b5932 sealing: Run more checks when considering Available sectors 2022-03-16 19:57:37 +01:00
Łukasz Magiera 4d4739497d sealing: Use bitfields in sectorActive 2022-03-16 19:53:00 +01:00
Łukasz Magiera 4ded059a1c sealing: Add MakeCCSectorsAvailable config 2022-03-16 19:29:47 +01:00
Jiaying Wang 5ea1502b02 Merge pull request #8331 from filecoin-project/backport/v1.15.1/fix/snap-worker-cleanup
backport: v1.15.1: feat: sealing: Sector upgrade queue
2022-03-16 14:20:53 -04:00
Łukasz Magiera 99c6ef564e worker: RemoveCopies expects one type at a time 2022-03-16 19:07:42 +01:00
Łukasz Magiera 39e3ddb0ed storagemgr: MoveStorage in separate steps 2022-03-16 19:07:42 +01:00
Łukasz Magiera defdea7b49 worker: Call RemoveCopies in MoveStorage 2022-03-16 19:07:42 +01:00
Łukasz Magiera d249eb3f93 stores: Support RemoveCopies on remote store 2022-03-16 19:07:42 +01:00
Łukasz Magiera 668c33fdcd stores: http: Support multiple storage IDs in ?keep 2022-03-16 19:07:42 +01:00
Łukasz Magiera 799d3ebe5e itests: Test reverting Available sectors to Proving 2022-03-16 19:05:53 +01:00
Łukasz Magiera 628102ab6c sealing: Support abort uprade for Available sectors 2022-03-16 18:53:54 +01:00
Łukasz Magiera f2c0ba1df5 Merge pull request #8329 from filecoin-project/fix/snap-worker-cleanup
fix: sealing: Remove sector copies from workers after snapdeals
2022-03-16 18:48:21 +01:00
79453663b3 feat: Add additional test annotations (#8272)
* Annotate api,proxy_util,blockstore_badger, policy tests

* Annotate splitstore: bsbadger / markset

* Annotate splitstore feature

* Annotate union/timed blockstore tests

* Annotate openrpc, diff_adt tests

* Annotate error,drand,events tests

* Annotate predicates_test

* Fix annotations

* Annotate tscache, gen tests

* Annotate fundmanager test

* Annotate repub and selection tests

* Annotate statetree_test

* Annotate forks_test

* Annotate searchwait_test.go

* Fix duplicated @@ symbols

* Annotate chain stmgr/store tests

* Annotate more (types) tests

* More tests annotated

* Annotate conformance chaos actor tests

* Annotate more integration tests

* Annotate journal system tests

* Annotate more tests.

* Annotate gas,head buffer behaviors

* Fix markset annotations

* doc: test annotations for the markets dagstore wrapper

* Annotate miner_api test in dagstore

* Annotate more test files

* Remove bad annotations from fsrepo

* Annotate wdpost system

* Remove bad annotations

* Renamce "conformance" to "chaos_actor" tests

* doc: stm annotations for blockheader & election proof tests

* Annotate remaining "A" tests

* annotate: stm for error_test

* memrepo_test.go

* Annotate "b" file tests

* message_test.go

* doc: stm annotate for fsrepo_test

* Annotate "c" file tests

* Annotate "D" test files

* message_test.go

* doc: stm annotate for chain, node/config & client

* docs: stm annotate node_test

* Annotate u,v,wl tests

* doc: stm annotations for various test files

* Annotate "T" test files

* doc: stm annotate for proxy_util_test & policy_test

* doc: stm annotate for various tests

* doc: final few stm annotations

* Add mempool unit tests

* Add two more memPool Add tests

* Update submodules

* Add check function tests

* Add stm annotations, refactor test helper

* Annotate api,proxy_util,blockstore_badger, policy tests

* Annotate splitstore: bsbadger / markset

solving merge conflicts

* Annotate splitstore feature

* Annotate union/timed blockstore tests

* Annotate openrpc, diff_adt tests

* Annotate error,drand,events tests

* Annotate predicates_test

* Fix annotations

* Annotate tscache, gen tests

* Annotate fundmanager test

* Annotate statetree_test

* Annotate forks_test

* Annotate searchwait_test.go

* Fix duplicated @@ symbols

* Annotate chain stmgr/store tests

* Annotate more (types) tests

* More tests annotated

* Annotate conformance chaos actor tests

* Annotate more integration tests

* Annotate journal system tests

* Annotate more tests.

* Annotate gas,head buffer behaviors

solve merge conflict

* Fix markset annotations

* Annotate miner_api test in dagstore

* Annotate more test files

* doc: test annotations for the markets dagstore wrapper

* Annotate wdpost system

* Renamce "conformance" to "chaos_actor" tests

* Annotate remaining "A" tests

* doc: stm annotations for blockheader & election proof tests

* annotate: stm for error_test

* Annotate "b" file tests

* memrepo_test.go

* Annotate "c" file tests

* message_test.go

* Annotate "D" test files

* doc: stm annotate for fsrepo_test

* Annotate u,v,wl tests

* message_test.go

* doc: stm annotate for chain, node/config & client

* docs: stm annotate node_test

* Annotate "T" test files

* doc: stm annotations for various test files

* Add mempool unit tests

solve merge conflict

* doc: stm annotate for proxy_util_test & policy_test

* doc: stm annotate for various tests

* doc: final few stm annotations

* Add two more memPool Add tests

* Update submodules

* Add check function tests

solve conflict

* Add stm annotations, refactor test helper

solve merge conflict

* Change CLI test kinds to "unit"

* Fix double merged test

* Fix ccupgrade_test merge

* Fix lint issues

* Add stm annotation to types_Test

* Test vectors submodule

* Add file annotation to burn_test

Co-authored-by: Nikola Divic <divicnikola@gmail.com>
Co-authored-by: TheMenko <themenkoprojects@gmail.com>
2022-03-16 18:37:34 +01:00
Łukasz Magiera 8600ae2ac4 itests: TestTooManyMarkedForUpgrade is not applicable anymore 2022-03-16 17:48:02 +01:00
Łukasz Magiera 193c84811a feat: sealing: Linter did have a good point 2022-03-16 17:45:22 +01:00
Łukasz Magiera aef2ec513f feat: sealing: Sector upgrade queue 2022-03-16 17:33:05 +01:00
Aayush 37539ccb84 CircSupply: Remove unused method 2022-03-16 11:58:23 -04:00
Aayush 16128a0212 Merge branch 'master' into feat/fvm 2022-03-16 11:57:46 -04:00
KAYUII 159da73fcd Update Dockerfile.lotus
fix docker can't find gpus
2022-03-16 09:19:47 -06:00
Łukasz Magiera 9f6f94bd02 Merge pull request #8215 from filecoin-project/feat/remove-mark-for-upgrade
chore:sealing:remove endpoint from cli
2022-03-16 15:33:21 +01:00
Łukasz Magiera c4259cb594 worker: RemoveCopies expects one type at a time 2022-03-16 12:28:56 +01:00
Łukasz Magiera 5ed5744cb6 storagemgr: MoveStorage in separate steps 2022-03-16 12:28:56 +01:00
Łukasz Magiera a88edeb79d worker: Call RemoveCopies in MoveStorage 2022-03-16 12:28:56 +01:00
Łukasz Magiera 4d65e0101d stores: Support RemoveCopies on remote store 2022-03-16 12:28:56 +01:00
Łukasz Magiera 45b07674e5 stores: http: Support multiple storage IDs in ?keep 2022-03-16 12:28:56 +01:00
Łukasz Magiera 4906962da0 Merge pull request #8322 from filecoin-project/jen/versionbump
chore: build: bump the master version to v1.15.2-dev
2022-03-16 11:34:02 +01:00
Rjan 3ad1ea386c Merge branch 'filecoin-project:master' into master 2022-03-16 09:09:20 +01:00
koalacxr 7f26ce614b modify quantile imports error 2022-03-16 13:10:03 +08:00
Aayush 9ea623e125 Rename the Lotus VM to LegacyVM 2022-03-15 19:40:17 -04:00
Aayush e6117c49ef Address review 2022-03-15 19:34:59 -04:00
Aayush 673f558ba5 Rename vm.VMI to vm.Interface 2022-03-15 19:34:39 -04:00
Jiaying Wang ada499ef14 Merge pull request #8314 from filecoin-project/jen/indexsetting
feat: config: enable indexer providing by default
2022-03-15 19:33:49 -04:00
Jennifer Wang 56b80c41b6 bump the master version to v1.15.2-dev 2022-03-15 19:32:28 -04:00
Jiaying Wang c98ef0aaf8 Merge pull request #8317 from filecoin-project/jen/backport
chore: backport: release to master
2022-03-15 19:12:20 -04:00
Aayush 2170b4deb5 Fixup merge 2022-03-15 18:58:32 -04:00
Łukasz Magiera 913cab2785 Merge pull request #8320 from filecoin-project/fix/listsectors-primary
fix: storage cli: Output primary sector status correctly
2022-03-15 17:41:41 +01:00
Aayush 6c51adc334 Update FFI: fix cargo.lock 2022-03-15 11:07:25 -04:00
Łukasz Magiera c6bda0e5d4 fix: storage cli: Output primary sector status correctly 2022-03-15 14:29:21 +01:00
Łukasz Magiera c3cadcba0e Merge pull request #8318 from filecoin-project/feat/rcmgr-limits-envvar
improve resource manager integration
2022-03-15 12:07:43 +01:00
vyzo 9fcafff847 adjust conns to 2x maxconns for duplicate connections 2022-03-15 10:02:27 +02:00
vyzo 53c525f0ed improve resource manager integration
- add opt-in env var to control instantation, until we are comfortable with testing to enble by default.
- adjust default limits if the connection manager high mark is higher than the default inbound conn limit.
2022-03-15 09:43:18 +02:00
Jennifer Wang 8a2a2d065d Merge branch 'releases' into jen/backport 2022-03-15 02:07:35 -04:00
Jennifer Wang 6240729ee4 enable indexer providing by default 2022-03-14 23:24:52 -04:00
Eng Zer Jun c229842f57 test: use T.TempDir to create temporary test directory
The directory created by `T.TempDir` is automatically removed when the
test and all its subtests complete.

Reference: https://pkg.go.dev/testing#T.TempDir
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-03-15 00:21:31 +08:00
Aayush 9a1a89d98c Shed: Add a tool to check UTF-8 validity of labels 2022-03-12 18:11:10 -05:00
Aayush 1bf40ad9df Fix broken go.sum 2022-03-12 14:31:04 -05:00
Aayush 67889b473c Merge branch 'master' into feat/fvm 2022-03-12 11:12:23 -05:00
Aayush 05fa9c81de Rename FVM envvar to LOTUS_USE_FVM_EXPERIMENTAL 2022-03-12 11:03:43 -05:00
Aayush Rajasekaran 6d4fb8866e Merge pull request #8197 from filecoin-project/asr/fvm/nv15
FVM: support nv15
2022-03-11 17:35:20 -05:00
Aayush d2054e8653 FVM: support nv15 2022-03-11 17:03:34 -05:00
Raúl Kripalani eef436b030 go fmt. 2022-03-11 19:05:07 +00:00
Raúl Kripalani 9eb8103866 tvx and conformance: use precondition state tree as the lookback tree. 2022-03-11 18:56:19 +00:00
Raúl Kripalani 5434cfdaa9 tvx: use addresses when scanning precursors. 2022-03-11 18:49:07 +00:00
Raúl Kripalani 92c9716595 tvx: widen 'sender' precursor strategy to match against both participants.
And also use inclusion tipset to run the message, which is more correct
than the execution tipset.
2022-03-11 18:47:44 +00:00
Łukasz Magiera 6401363ef1 docsgen 2022-03-11 18:17:29 +01:00
Łukasz Magiera ce99aad438 Fix provingCheckProvableCmd 2022-03-11 18:13:51 +01:00
Łukasz Magiera 135aef78d7 Merge remote-tracking branch 'origin/master' into feat/post-worker 2022-03-11 17:04:58 +01:00
Aayush Rajasekaran 362c73bfbd Merge pull request #8291 from filecoin-project/fix/fsm-input-locking
fix: sealing fsm: Handle inputLk correctly
2022-03-11 10:02:26 -05:00
Łukasz Magiera ad66ad4f7d fix: sealing fsm: Handle inputLk correctly 2022-03-11 13:34:14 +01:00
Łukasz Magiera 9fc6242e5b Merge pull request #8289 from filecoin-project/deps/update-libp2p-things
deps: update go-libp2p and go-libp2p-resource-manager
2022-03-11 10:36:50 +01:00
Jiaying Wang 0ac1bbc7ae Merge pull request #8279 from filecoin-project/release/v1.15.0
build: release: v1.15.0
2022-03-11 00:33:18 -05:00
Jiaying Wang 61a1a172fa Merge pull request #8277 from filecoin-project/jen/v15prep
chore: release: v1.15.0 prep
2022-03-11 00:19:42 -05:00
spark8899 3c96dcaec7 add minerMultisigs ProposeControlSet 2022-03-11 09:37:38 +08:00
Jennifer Wang 98642ec4b5 fix the change log 2022-03-10 17:28:40 -05:00
Łukasz Magiera 81f0cfdd1e Merge pull request #8276 from filecoin-project/feat/faster-clientcalccommp
feat: api: Make ClientCalcCommP multithreaded
2022-03-10 23:22:48 +01:00
Łukasz Magiera b248097b42 Merge pull request #8283 from filecoin-project/feat/loglvl-config
feat: config: Persistent subsystem log level config
2022-03-10 23:22:26 +01:00
Łukasz Magiera 9ce6a15edc Merge pull request #8265 from filecoin-project/feat/shed-car-tools
feat: shed: blockstore/vlog to car export cmds
2022-03-10 23:21:47 +01:00
Łukasz Magiera 55189fbe53 Merge pull request #8287 from filecoin-project/fix/dont-log-binary-cids
fix: piece provider: Don't log CIDs as binary
2022-03-10 22:44:59 +01:00
Łukasz Magiera 0d9e34d651 client impl: Fix typo in ClientCalcCommP CopyBuffer error 2022-03-10 22:41:45 +01:00
Raúl Kripalani ba408cc2be tvx: print out epoch numbers that weren't found. 2022-03-10 21:33:49 +00:00
Łukasz Magiera e1ac3f641b Merge pull request #8290 from filecoin-project/feat/itestd
feat: shed: ItestD
2022-03-10 20:00:37 +01:00
Łukasz Magiera 231893a794 feat: shed: ItestD 2022-03-10 19:39:10 +01:00
vyzo 65e599fb8e update go-libp2p and go-libp2p-resource-manager
- go-libp2p at v0.18.0-rc6, which includes fixes for some severe bugs in mplex
- go-libp2p-resource-manager at v0.1.5, which improves debug logging
2022-03-10 18:20:11 +02:00
Łukasz Magiera 4421bf2fa1 feat: config: Persistent subsystem log level config 2022-03-10 14:44:56 +01:00
Łukasz Magiera 91ccb7fbda fix: piece provider: Don't log CIDs as binary 2022-03-10 14:28:18 +01:00
Łukasz Magiera 9c4f8254ee post workers: Fix build post-merge 2022-03-10 14:20:07 +01:00
Łukasz Magiera 326a9b673e Merge pull request #8273 from filecoin-project/feat/graphsync-20-protocol-update
feat(deps): update to graphsync v0.13.0 with 2.0 protocol
2022-03-10 11:11:20 +01:00
spark8899 b6278d2a6c add miner-multisig change-worker command. 2022-03-10 14:11:30 +08:00
Jennifer Wang 1daaba9224 bump the version to v1.15.0 2022-03-09 18:32:02 -05:00
Jennifer Wang 3ecc58d036 update v1.15.0 changelog 2022-03-09 18:28:30 -05:00
Łukasz Magiera a715fb3063 feat: Make ClientCalcCommP multithreaded 2022-03-09 23:25:29 +01:00
hannahhoward 49742f8fdc feat(deps): update to graphsync v0.13.0 with 2.0 protocol 2022-03-09 18:06:35 +00:00
Łukasz Magiera 046a9f8af0 Merge remote-tracking branch 'origin/master' into feat/post-worker 2022-03-09 16:27:03 +01:00
Łukasz Magiera ffabb015ef shed: fix lint 2022-03-09 10:26:02 +01:00
Łukasz Magiera 84dbb229b6 shed: blockstore/vlog to car export cmds 2022-03-09 10:21:36 +01:00
zenground0 c192637741 Fix warmup 2022-03-08 21:01:57 -07:00
zenground0 61f453fcd3 Print sector key in state sector command 2022-03-08 21:01:57 -07:00
Anton Evangelatov 7cdf6dc680 remove .Type() now that we have singletons for repos 2022-03-07 13:00:26 +01:00
Anton Evangelatov b9fe61f9da Merge branch 'master' into nonsense/refactor-nodetype 2022-03-07 11:51:28 +01:00
Jiaying Wang 4525395cc5 Merge pull request #8245 from filecoin-project/jen/v15backport
chore: backport: release
2022-03-04 15:44:08 -05:00
Jennifer Wang 9b838f515b Merge branch 'releases' into jen/v15backport 2022-03-04 13:58:56 -05:00
Jiaying Wang 5b33555fda Merge pull request #8243 from filecoin-project/release/v1.14.4
chore: build: v1.14.4
2022-03-03 21:28:31 -05:00
Jiaying Wang 8d737a1428 Merge pull request #8242 from filecoin-project/jen/v144prep
build: release: v1.14.4
2022-03-03 21:03:36 -05:00
Jennifer Wang e51b10e6a5 release v1.14.4 2022-03-03 20:52:03 -05:00
zenground0 93e22da539 Log instead of error normal shutdown of state machine 2022-03-03 18:17:09 -05:00
zenground0 8ec7da0dee Handle finalize failures in fsm 2022-03-03 18:17:01 -05:00
Łukasz Magiera 5416ce5443 Merge pull request #7313 from filecoin-project/feat/cid-to-piece-idx
feat: markets: Integrate index ingest protocol and retrieve by any CID
2022-03-03 16:50:35 +00:00
Masih H. Derkani 4c8015c0a1 Update deps in lotus-soup mod and remove replace directive
Update dependency to go-fil-markets in `lotus-soup` module and remove
the redundant replace directive.
2022-03-03 16:05:50 +00:00
Anton Evangelatov 5734a39e8e move DealmakingConfiger and SealingConfiger away from config/types.go 2022-03-03 16:51:47 +01:00
Anton Evangelatov 62e352ef88 move APIInfoEnvVars, RepoFlags, APIFlags under RepoType 2022-03-03 16:45:11 +01:00
Anton Evangelatov e1c2cf446e add lotus-test image as CI build step 2022-03-03 15:50:23 +01:00
Rjan c5dc898ed0 fix: cli: add ArgsUsage field to clientGetDealCmd
Adds [proposalCID] as ArgsUsage field in the 'lotus client get-deal' command. Fixes #8133
2022-03-03 15:40:16 +01:00
Anton Evangelatov acbfc879aa config: extract DealmakingConfig and Sealing config from Lotus for Boost (#8172)
* refactor sealingCfg and dealmakingCfg to be able to abstract Config

* fix error messages
2022-03-03 15:37:23 +01:00
Anton Evangelatov 066d0edf51 add SupportsStagingDeals trait 2022-03-03 15:37:23 +01:00
Anton Evangelatov 949ec65118 drop defConfForType 2022-03-03 15:37:23 +01:00
Anton Evangelatov f1f878a000 unexport repo types; use a global var for every repo type 2022-03-03 15:37:23 +01:00
Anton Evangelatov e3edab66e3 refactor RepoType 2022-03-03 15:37:23 +01:00
Łukasz Magiera 28d751b2e0 mod tidy 2022-03-03 14:21:28 +00:00
Łukasz Magiera 7dcfeee0ea use old go-path 2022-03-03 14:17:25 +00:00
Masih H. Derkani 1bb65189af Upgrade to go-path v0.2.1 and remove replace directive
The dependency was used in the chain API. Integrated the new fetcher
factory.
2022-03-03 13:29:32 +00:00
Łukasz Magiera 6b06c1b5d3 Merge pull request #8232 from filecoin-project/fix/not-so-normal-shutdown-of-state-machine
fix:sealing:Log instead of error normal shutdown of state machine
2022-03-03 13:28:57 +00:00
Masih H. Derkani 8cf6f24f4d Upgrade go-fil-markets to include index provider metadata changes
Upgrade to the latest `go-fil-markets` that integrates concrete
multicodec for the indexing metadata.
2022-03-03 12:57:09 +00:00
Aayush Rajasekaran b7e1548041 Merge pull request #8236 from filecoin-project/asr/backport
Lotus release v1.15.0-rc3
2022-03-02 17:06:56 -05:00
Aayush 2e1bb7e8cc Lotus release v1.15.0-rc3 2022-03-02 16:55:33 -05:00
Aayush Rajasekaran 1c21690dfe Merge pull request #8235 from filecoin-project/asr/backport
Handle finalize failures in fsm
2022-03-02 16:50:03 -05:00
zenground0 7073f31f84 Handle finalize failures in fsm 2022-03-02 16:48:24 -05:00
Aayush Rajasekaran 5ac1c59527 Merge pull request #8234 from filecoin-project/asr/backport
pay for the collateral difference needed if the miner available balance is insufficient
2022-03-02 16:47:48 -05:00
Jiaying Wang c9799e1369 pay for the collateral difference needed if the miner available balance is insufficient 2022-03-02 16:44:27 -05:00
Aayush Rajasekaran 91d773451b Merge pull request #8233 from filecoin-project/asr/libp2p-downgrade
Downgrade libp2p to 0.17.0
2022-03-02 16:42:17 -05:00
Aayush ebe1ca7c77 make gen 2022-03-02 15:48:07 -05:00
Aayush 1bc1cd3366 Upgrade to go-fil-markets 1.19.2 2022-03-02 15:41:53 -05:00
Aayush 898f523162 Upgrade to go-data-transfer 1.14.1 2022-03-02 15:41:41 -05:00
Aayush 08bbfed825 Revert "go mod: go-libp2p@v0.18.0-rc1"
This reverts commit 2fb5837a55.
2022-03-02 15:39:24 -05:00
Aayush 04f2d3543b Revert "go mod: go-libp2p-resource-manager"
This reverts commit c394fbdfc3.
2022-03-02 15:39:23 -05:00
Aayush 85886287b4 Revert "use the libp2p connmgr"
This reverts commit 826cdb2186.
2022-03-02 15:39:23 -05:00
Aayush b5912d1543 Revert "instantiate resource manager in DI"
This reverts commit 8d3f98fe38.
2022-03-02 15:39:22 -05:00
Aayush e9e28f75e2 Revert "add resource manager NetStat api"
This reverts commit d05d5bcb70.
2022-03-02 15:39:22 -05:00
Aayush b8747e3afc Revert "add resource manager Net(Set)Limit api"
This reverts commit 554848fe6b.
2022-03-02 15:39:21 -05:00
Aayush bac17061d4 Revert "add examples to docgen"
This reverts commit 39bf59d372.
2022-03-02 15:39:21 -05:00
Aayush 99e1b9e2aa Revert "add net stat and limit cli"
This reverts commit 0de1566eaf.
2022-03-02 15:39:20 -05:00
Aayush 11fc068cfe Revert "go mod: go-libp2p-resource-manager@v0.1.1"
This reverts commit 62c0f35b5a.
2022-03-02 15:39:19 -05:00
Aayush f9f6f35b93 Revert "go mod: update go-libp2p-pubsub"
This reverts commit aa599bfaf9.
2022-03-02 15:39:19 -05:00
Aayush f281027a1c Revert "fix mocknet.New invocation"
This reverts commit c3fb68545a.
2022-03-02 15:39:19 -05:00
Aayush e49d499bb5 Revert "fix mocknet.New invocation"
This reverts commit 0870f48b5c.
2022-03-02 15:39:18 -05:00
Aayush 581cb34b11 Revert "go mod: update go-yamux@v3.0.2"
This reverts commit 83427c478f.
2022-03-02 15:39:18 -05:00
Aayush 4968babb32 Revert "go mod: update go-libp2p-resource-manager@v0.1.2"
This reverts commit 6260271b78.
2022-03-02 15:39:17 -05:00
Aayush ce040b7d33 Revert "add description for net stat and limit commands"
This reverts commit 19c8ea3288.
2022-03-02 15:39:17 -05:00
Aayush a7e02f7207 Revert "update go-fil-markets@v0.19.0-rc1"
This reverts commit 2e5474e864.
2022-03-02 15:39:16 -05:00
Aayush bf0470ad09 Revert "fix issues with fil-markets/data-transfer updates"
This reverts commit ca4ee1e8cf.
2022-03-02 15:39:15 -05:00
Aayush 7dbf0ced82 Revert "make gen and friends"
This reverts commit b360c9403f.
2022-03-02 15:39:14 -05:00
Aayush 48e28898a6 Revert "fix lint"
This reverts commit 325a4c0e5b.
2022-03-02 15:29:27 -05:00
Aayush 17ac583508 Revert "close the rcmgr on shutdown"
This reverts commit 73ec10a49e.
2022-03-02 15:29:26 -05:00
Aayush 6dc696b745 Revert "feat: update to go-fil-markets v1.19.0"
This reverts commit 8a47a71772.
2022-03-02 15:29:25 -05:00
Aayush 2aab4d4f05 Revert "update go-libp2p to v0.18.0-rc2"
This reverts commit 6e5f521463.
2022-03-02 15:22:06 -05:00
Aayush 94678bacea Revert "update go-libp2p to v0.18.0-rc3"
This reverts commit e78c4ab9b3.
2022-03-02 15:21:31 -05:00
Aayush 7207740af4 Revert "update libp2p to v0.18.0-rc4"
This reverts commit 80e9f76261.
2022-03-02 15:21:10 -05:00
Aayush 5329f18938 Revert "update go-libp2p to v0.18.0-rc5"
This reverts commit a575947294.
2022-03-02 15:20:18 -05:00
zenground0 b81d189ec1 Log instead of error normal shutdown of state machine 2022-03-02 13:03:03 -07:00
Łukasz Magiera a52b4b72e9 gomod: Use latest cbor-gen 2022-03-02 20:23:47 +01:00
ZenGround0 14b76743c6 Merge pull request #8229 from filecoin-project/fix/handle-finalize-ru-failure
fix:sealing:Handle finalize replica update failures in fsm
2022-03-02 10:40:18 -07:00
zenground0 874124c4e7 Handle finalize failures in fsm 2022-03-02 09:33:33 -07:00
Aayush 0a67b6e222 Merge branch 'master' into feat/fvm 2022-03-02 11:24:48 -05:00
Łukasz Magiera 6d464c478e Merge pull request #8160 from filecoin-project/fix/addpiece-idempotent
feat: Make add piece idempotent
2022-03-02 15:10:16 +00:00
Masih H. Derkani eb83001bbc Fix wrong ffi commit 2022-03-02 15:07:05 +00:00
Masih H. Derkani aacc246ba3 Merge branch 'master' into feat/cid-to-piece-idx 2022-03-02 14:06:30 +00:00
Masih H. Derkani 444a2bf355 Integrate the latest index-provider with config to disable announcements
Integrate the latest `index-provider` and reflect the changes to engine
configuration. Note that this commit disables announcements of indices
on the network by default as requested for initial merge to master.

Introduce dedicated index provider configuration parameters with
documentation and defaults that match the defaults in index-provider.

Re-generate code as needed.
2022-03-02 13:45:09 +00:00
Łukasz Magiera b8473aeedd Merge pull request #7883 from filecoin-project/feat/paych-avail-reuse
feat: paychmgr: Support paych funding (a.k.a. fast paid retrieval)
2022-03-02 13:28:12 +00:00
Łukasz Magiera 91ae72d47a Merge pull request #7819 from filecoin-project/digitalocean-use-snap
feat: ci: packer snap
2022-03-02 13:17:48 +00:00
Łukasz Magiera 74e6260fbd Merge pull request #7560 from EmadMF/emad22552-patch-1
add check manual-stateless-deal with interactive deal making
2022-03-02 13:16:14 +00:00
Łukasz Magiera a6892f956e Merge pull request #7844 from llifezou/add_workerName_in_sealing_err
feat: #6147: Include worker name in sealing errors
2022-03-02 13:13:34 +00:00
Łukasz Magiera c018dac13a Merge pull request #8079 from filecoin-project/cli_wallet_tests
test: cli: adding wallet tests
2022-03-02 12:59:09 +00:00
Łukasz Magiera e9a6f5f287 Merge remote-tracking branch 'origin/master' into feat/paych-avail-reuse 2022-03-02 12:56:56 +00:00
Łukasz Magiera a74c466b50 Merge pull request #7943 from filecoin-project/fix/restore-appimage
ci: appimage: re-install appimage CI
2022-03-02 12:54:14 +00:00
Łukasz Magiera 97cda51fcf Merge pull request #8219 from filecoin-project/jennijuju-patch-2
fix: sealing: PRU insufficient collateral
2022-03-02 12:24:34 +00:00
Masih H. Derkani 963caf2e9d Fix gen-check 2022-03-02 11:40:02 +00:00
Masih H. Derkani 769b0f30ef Address review comments
- Add comment to clarify the reason for loop in testkit
- Trim common prefix in state printed in CLI commands for better
  readability
- Upgrade to a tagged release of `go-fil-markets` that includes indexing
  work; see: https://github.com/filecoin-project/go-fil-markets/pull/673
- Fix typo in CLI usage.
- Add comments to note that it is safe to use fx `OnStart` context when
  starting the provider engine.
- Fix string concatenation in error message formatting.
2022-03-02 11:04:50 +00:00
Jiaying Wang e0922a7dd2 pay for the collateral difference needed if the miner available balance is insufficient 2022-03-01 21:56:12 -05:00
Aayush Rajasekaran 9c22065459 Merge pull request #8072 from filecoin-project/bloxico/syncer-tests
test: chain: unit tests for the syncer & sync manager
2022-03-01 19:32:42 -05:00
ZenGround0 8091e7086e Merge pull request #8202 from filecoin-project/arajasek-patch-1
fix: shed: diff command
2022-03-01 11:54:26 -07:00
ZenGround0 00e52296ce Merge pull request #8207 from rjan90/patch-4
Make `--lite` option visible in the lotus daemon help text
2022-03-01 11:51:38 -07:00
zenground0 59ef2fe1b8 Remove unused fields from sealing 2022-03-01 11:46:36 -07:00
Łukasz Magiera 714ce54135 Merge pull request #8213 from filecoin-project/fix/overlog-manager-ru
fix:sealing:Less verbose sector manager logging
2022-03-01 18:34:10 +00:00
zenground0 a463c90057 remove endpoint from cli 2022-03-01 11:27:03 -07:00
zenground0 f138ae8882 Less verbose sector manager logging 2022-03-01 10:52:09 -07:00
Aayush Rajasekaran bc5be0c30e Merge pull request #8211 from filecoin-project/asr/rc2
Lotus release v1.15.0-rc2
2022-03-01 09:49:34 -05:00
Aayush 30ae1dd8e8 Lotus release v1.15.0-rc2 2022-03-01 09:48:19 -05:00
Aayush dd91857bf6 Merge branch 'master' into feat/fvm 2022-02-28 22:17:20 -05:00
TheMenko 4a5b0b87ea add assert to output for wallet sign 2022-03-01 02:34:52 +01:00
TheMenko 0708268c75 add assert to output for wallet list 2022-03-01 02:21:22 +01:00
zenground0 77a954c7c3 Merge branch 'master' into feat/cid-to-piece-idx 2022-02-28 12:57:11 -07:00
zenground0 992a01617a Merge branch 'releases' into release/v1.15.0 2022-02-28 12:18:55 -07:00
Rjan c9e2c1b1d7 Make --lite 2022-02-28 17:14:05 +01:00
Rjan 686ada0582 Make --lite option visibile in the cli 2022-02-28 15:19:53 +01:00
Łukasz Magiera 6291c0c581 Merge pull request #8205 from s1mple1122/master
avoid panic
2022-02-28 13:31:33 +00:00
Łukasz Magiera f9900ba426 Merge pull request #8204 from bhaskarvilles/patch-2
A package is vulnerable to Exposure of Sensitive Information
2022-02-28 13:31:25 +00:00
Jerry 8f95cd4149 release worker tracker lock when call cb func 2022-02-28 16:55:04 +08:00
duzy555666 296ae4305f avoid panic 2022-02-28 16:51:15 +08:00
Bhaskara Ram 8a9ea66bdf node-fetch is vulnerable to Exposure of Sensitive Information to an Unauthorized Actor
upgrade to node-fetch npm package
2022-02-28 12:40:43 +05:30
Aayush Rajasekaran 92c07f877b fix: shed: diff command 2022-02-27 20:03:45 -05:00
Aayush Rajasekaran 6d0066eafa Merge pull request #8194 from filecoin-project/jen/actor
dep: actor: get v7
2022-02-27 19:25:35 -05:00
Łukasz Magiera a49ec594ca Merge pull request #8080 from filecoin-project/bloxico/cli-sync-tests
test: cli: unit tests for sync related commands
2022-02-27 11:54:03 +00:00
Łukasz Magiera 40ed266617 Merge pull request #8192 from filecoin-project/jen/releasesbacktomaster
chore: build: backport releases
2022-02-26 19:37:59 +00:00
Jiaying Wang b8eb4ddb0b Merge pull request #8193 from filecoin-project/jen/v15
chore: build: backport releases
2022-02-25 21:13:42 -05:00
Jiaying Wang d495c3cc16 Merge pull request #8190 from filecoin-project/jen/flagfix
fix: sealing: add flag usage
2022-02-25 21:13:18 -05:00
Jiaying Wang a92981c967 Merge pull request #8171 from filecoin-project/asr/libp2p-update
update go-libp2p to v0.18.0-rc5
2022-02-25 21:13:01 -05:00
jennijuju 254f821564 get actor v7 (same commit as v7-rc1) 2022-02-25 21:03:46 -05:00
jennijuju c6361b391c Merge branch 'releases' into jen/v15 2022-02-25 21:01:31 -05:00
Jiaying Wang 6347daf847 Merge pull request #8189 from filecoin-project/jen/reallydoitflag
fix: sealing: add flag usage
2022-02-25 20:55:11 -05:00
jennijuju f21ddf0c50 Merge branch 'releases' into jen/releasesbacktomaster 2022-02-25 20:54:11 -05:00
jennijuju 865c7e587c make gen 2022-02-25 17:34:14 -05:00
Łukasz Magiera 949a046432 Merge pull request #7928 from filecoin-project/bloxico/basic_wallet_tests
misc: wallet: wallet tests with annotations for system test matrix
2022-02-25 19:29:50 +00:00
Łukasz Magiera 69470db596 Merge pull request #8162 from filecoin-project/cli-mempool-tests
test: Cli: add mempool tests
2022-02-25 16:09:32 +00:00
jennijuju 52756128da add flag usage 2022-02-25 10:49:18 -05:00
jennijuju 433f9f8a13 make gen 2022-02-25 10:48:08 -05:00
jennijuju 79562a7175 add flag usage 2022-02-25 10:28:47 -05:00
llifezouandŁukasz Magiera dac5518005 Update extern/sector-storage/worker_local.go
Co-authored-by: Łukasz Magiera <magik6k@users.noreply.github.com>
2022-02-25 11:12:18 +08:00
Aayush Rajasekaran a65386b491 Merge pull request #8183 from filecoin-project/jen/v142prep
build: version: v1.14.2
2022-02-24 19:17:42 -05:00
Aayush Rajasekaran 37b857a0b2 Update CHANGELOG.md 2022-02-24 19:17:33 -05:00
Jennifer Wang 5cfe8f315f add changelog 2022-02-24 18:33:52 -05:00
Jennifer Wang a567a745b2 bump the version to v1.14.2 2022-02-24 18:30:31 -05:00
Jennifer Wang 51fc965beb ayyush sucks at math with time 2022-02-24 18:12:36 -05:00
Jiaying Wang ec6b786fbf Merge pull request #8182 from filecoin-project/jen/backports
chore: backports: snappy related improvements/bug fixes
2022-02-24 18:07:41 -05:00
Aayush Rajasekaran 64b13afee5 Merge pull request #8163 from filecoin-project/steb/fix-inclusion-price-at-upgrade
Fix the epoch used for gas in the message pool & validation
2022-02-24 18:06:08 -05:00
Peter Rabbitson 3c366160bb Retract force-pushed v1.14.0 to work around stale gomod caches 2022-02-24 17:59:38 -05:00
eben.xie be3462eb76 [Describe]: when excute cmd "lotus-bench sealing" without "benchmark-existing-sectorbuilder", panic will occur
[BugFix]:

[FeatureAdd]:

[CodeReview]:

[ModifyDesc]:

[Author]:

[BugID]:
2022-02-24 17:54:38 -05:00
zenground0 6862015929 add rdi flag for abort upgrade 2022-02-24 17:54:10 -05:00
zenground0 e5de237990 Fix fault tracker to handle snap deals 2022-02-24 17:53:21 -05:00
Jiaying Wang d054340f13 Merge pull request #8181 from filecoin-project/fix/really-do-it-for-abort
fix:sealing:really-do-it flag for abort upgrade
2022-02-24 17:50:12 -05:00
zenground0 77bf46d018 Tiny clean up 2022-02-24 15:46:15 -07:00
Jiaying Wang 3621d8675f Merge pull request #8180 from filecoin-project/jennijuju-patch-2
fix: sealing: missing file type
2022-02-24 17:41:48 -05:00
zenground0 367146f032 add rdi flag for abort upgrade 2022-02-24 15:20:21 -07:00
Jiaying Wang f9641d70af fix: sealing: missing file type 2022-02-24 16:27:24 -05:00
Aayush Rajasekaran 755ce8cb91 Merge pull request #8174 from filecoin-project/asr/consistent-vm
Use either Lotus VM or FVM consistently
2022-02-24 16:19:29 -05:00
Aayush Rajasekaran b8cd154516 Merge pull request #8175 from filecoin-project/gstuart/remove-verified-data-cap-cli
Feat: cli: Remove verified data cap
2022-02-24 13:33:47 -05:00
ZenGround0 d711775cdf Merge pull request #8177 from filecoin-project/fix/fault-tracker-snap-deals
fix:proving:post check sector handles snap deals replica faults
2022-02-24 11:30:10 -07:00
Geoff StuartandAayush Rajasekaran e0382c546d Update cmd/lotus-shed/verifreg.go
Co-authored-by: Aayush Rajasekaran <arajasek94@gmail.com>
2022-02-24 13:07:10 -05:00
Geoff Stuart 4293023731 Updated cli docs 2022-02-24 12:43:02 -05:00
Geoff Stuart 83bf0c5a11 Review fixes 2022-02-24 12:40:13 -05:00
Aayush 2ba34add2a stmgr: call needs to flush VM before fetching nonce 2022-02-24 12:19:59 -05:00
Aayush d58babe32c fix: set FilVested when constructing VmOpts 2022-02-24 12:04:05 -05:00
Aayush b6682f4bbe feat: use either lotus vm or fvm consistently 2022-02-24 12:04:05 -05:00
Aayush 9bb936b75c chore: refactor: rename NewVM to NewLotusVM 2022-02-24 12:04:05 -05:00
Aayush Rajasekaran c940727cb4 Merge pull request #8179 from filecoin-project/asr/comm-p-fix
fix: client: calculate commps for pieces bigger than 32GB
2022-02-24 11:56:12 -05:00
Aayush fd8cb44e67 fix: client: calculate commps for pieces bigger than 32GB 2022-02-24 10:27:37 -05:00
Łukasz Magiera 7c2f653323 Merge pull request #8168 from filecoin-project/feat/ufs-selectors
feat: market utils: Support unixfsnode in TraverseDag
2022-02-23 22:35:24 +01:00
Steven Allen 420c5fb568 fvm: time message execution 2022-02-23 19:23:20 +00:00
Steven Allen aad376296e fvm: set gas costs to nil for implicit messages
This is what the lotus VM does.
2022-02-23 19:22:47 +00:00
Geoff StuartandAayush Rajasekaran ef68fdb261 Update cmd/lotus-shed/verifreg.go
Co-authored-by: Aayush Rajasekaran <arajasek94@gmail.com>
2022-02-23 12:16:42 -05:00
Geoff StuartandAayush Rajasekaran 25912e72a1 Update cli/filplus.go
Co-authored-by: Aayush Rajasekaran <arajasek94@gmail.com>
2022-02-23 12:14:26 -05:00
Geoff Stuart 22760f0922 Handle pre-v7 case more gracefully 2022-02-23 12:02:26 -05:00
zenground0 abe04c33c1 Fix fault tracker to handle snap deals 2022-02-23 09:56:47 -07:00
ZenGround0 ba65d1e1e3 Merge pull request #8173 from xgswust/lotus-bench-fix
[Describe]: when excute cmd "lotus-bench sealing" without "benchmark-…
2022-02-23 09:07:57 -07:00
TheMenko 5ece3d4c10 Merge branch 'master' into bloxico/basic_wallet_tests
merge master to update the branch
2022-02-23 15:48:53 +01:00
Masih H. Derkani b802ddb848 Upgrade dependency to markets 2022-02-23 14:41:55 +00:00
Masih H. Derkani c3b406c5c2 Update indexing and markets dependencies
Update indexing dependencies to latest along with go-fil-markets
dependency, to the head of:
- https://github.com/filecoin-project/go-fil-markets/pull/673
2022-02-23 14:10:38 +00:00
Geoff Stuart e9715cae3b Small fixes 2022-02-22 22:58:51 -05:00
Geoff Stuart 5a5d1bf9aa Updated cli docs 2022-02-22 22:07:20 -05:00
Geoff Stuart 23147378a3 Added cli command for vrk to send RemoveVerifiedClientDataCap message 2022-02-22 22:07:20 -05:00
Geoff Stuart 375d9fdfc9 Added cli command for verifier to sing RemoveDataCapProposal 2022-02-22 22:07:20 -05:00
eben.xie e2cbad6ff4 [Describe]: when excute cmd "lotus-bench sealing" without "benchmark-existing-sectorbuilder", panic will occur
[BugFix]:

[FeatureAdd]:

[CodeReview]:

[ModifyDesc]:

[Author]:

[BugID]:
2022-02-23 10:49:53 +08:00
Darko Brdareski a54d2fd19d Update cli docs 2022-02-22 17:08:04 +01:00
vyzo a575947294 update go-libp2p to v0.18.0-rc5 2022-02-22 11:04:21 -05:00
Darko Brdareski 79ba74ce71 Merge branch 'master' into cli-mempool-tests 2022-02-22 16:27:38 +01:00
Darko Brdareski 0a03ec569a Merge branch 'master' into bloxico/syncer-tests 2022-02-22 16:17:04 +01:00
TheMenko cd64eba76c add stm annotations 2022-02-22 16:00:01 +01:00
TheMenko de68f1e5fe Merge branch 'master' into cli_wallet_tests
update branch from master
2022-02-22 15:37:09 +01:00
TheMenko fce9ff237a add fmt output checks 2022-02-22 15:35:46 +01:00
Darko Brdareski 10c939bc36 Remove leftover logging from sync_manager_test 2022-02-22 14:54:56 +01:00
Darko Brdareski e753e7a66e Merge branch 'master' into bloxico/cli-sync-tests 2022-02-22 14:03:44 +01:00
Łukasz Magiera 5d416de32e Merge pull request #8169 from filecoin-project/deps/update-libp2p
deps: update go-libp2p to v0.18.0-rc5
2022-02-22 11:47:42 +01:00
Aarsh Shah f0f2b3e1f4 changes as per review 2022-02-22 14:22:51 +04:00
vyzo 012cf96d60 update go-libp2p to v0.18.0-rc5 2022-02-22 12:19:26 +02:00
Łukasz Magiera a0cb6094c6 Merge remote-tracking branch 'origin/master' into feat/paych-avail-reuse 2022-02-22 10:55:03 +01:00
Łukasz Magiera a05a462c8c market utils: Support unixfsnode in TraverseDag 2022-02-22 10:51:57 +01:00
Aarsh Shah 8e62fec1d3 address review 2022-02-22 13:48:39 +04:00
ZenGround0 6123aa2ed4 Merge pull request #8048 from filecoin-project/cli-chain-tests
test: cli: chain category unit tests
2022-02-21 19:12:18 -07:00
Steven Allen 1234fcfd4f fix: mempool: check messages against the next block's height
Previously, we checked message gas/validity with the previous block's
height. This doesn't affect consensus, but will help us avoid adding
messages to the message pool that shouldn't be there.
2022-02-21 18:13:07 +00:00
Steven Allen 04bc4405c7 fix: chain: check against the inclusion price at the correct height
We need to use the height at which the messages will be executed, not
the height of the previous tipset. This brings the gas checking for
validation with the gas we actually _charge_ during message execution.

This only matters for the Calico upgrade (the only upgrade where we
changed the gas prices).

This change could potentially cause a block at that height to be
rejected if it includes a message with insufficient gas for inclusion.
However, that _should_ have shown up as a miner penalty when we executed
the blocks in the following tipset. Given that there were no miner
penalties at 265199-265201, this change should be "safe".
2022-02-21 18:12:51 +00:00
Darko Brdareski 7b203eae1b More lint issues fixed 2022-02-21 18:35:31 +01:00
Darko Brdareski 76157c5e03 Merge branch 'master' into cli-mempool-tests 2022-02-21 18:08:15 +01:00
Darko Brdareski ad4acf3baa Fix lint issues 2022-02-21 17:58:00 +01:00
Darko Brdareski 580fa86ea3 Change annotation to #cli 2022-02-21 17:57:01 +01:00
Darko Brdareski 675012fe1c Fix matching for TestInspectUsage 2022-02-21 16:49:07 +01:00
Aarsh Shah 56926b349a changes as per review 2022-02-21 18:27:51 +04:00
Darko Brdareski 87c63e2cb7 Add stm file annotation 2022-02-21 12:33:07 +01:00
Darko Brdareski c8cd8bb591 Add stm annotations 2022-02-21 12:32:53 +01:00
Darko Brdareski c3817652dc Add cli tests for mempool 2022-02-21 11:28:45 +01:00
Aarsh Shah 3fd83e9345 dagstore size bloating fix 2022-02-21 13:57:29 +04:00
Aarsh Shah c2522e8ca9 idempotent add piece 2022-02-21 13:51:43 +04:00
Aarsh Shah 1245871004 guard with ctx 2022-02-21 11:56:49 +04:00
Aarsh Shah 26707a5e03 make add piece idempotent 2022-02-21 11:51:25 +04:00
Łukasz Magiera 214c32d2ef Merge pull request #8131 from FlorianRuen/master
fix:cli:Continue instead of return error if no valid value is filled
2022-02-21 00:43:25 +01:00
Łukasz Magiera 051ff5d205 Merge pull request #8149 from filecoin-project/fix/reify-limit
fix: limit reification sizes
2022-02-21 00:09:06 +01:00
Łukasz Magiera 31ad8e647a Merge pull request #8104 from ychiaoli18/feat/gateway-msig-get-vesting-schedule
feat: gateway: add MsigGetVestingSchedule to gateway api
2022-02-21 00:06:18 +01:00
Łukasz Magiera 7351939053 Merge pull request #8157 from elijaharita/feat/ensemble-mocknet-getter
feat: itests: add itests ensemble mocknet getter
2022-02-21 00:04:20 +01:00
Peter Rabbitson 2d1ebee139 Merge pull request #8159 from filecoin-project/chore/retract_1_14_0
Retract force-pushed v1.14.0 to work around stale gomod caches
2022-02-19 23:59:59 +01:00
Peter Rabbitson 9bb9bb5682 Retract force-pushed v1.14.0 to work around stale gomod caches 2022-02-19 16:25:18 +01:00
Cory Schwartz cdd2d5cc6a update template 2022-02-18 15:37:53 -08:00
Cory Schwartz 6ec82b7446 Merge branch 'master' into digitalocean-use-snap 2022-02-18 15:26:13 -08:00
Elijah Seed-Arita e2a93a3feb add itests ensemble mocknet getter 2022-02-18 11:09:56 -10:00
Aayush Rajasekaran 942922960e Merge pull request #8156 from filecoin-project/asr/releases-master
chore: Merge releases into master
2022-02-18 13:57:47 -05:00
Aayush 9ba7bcea23 Merge branch 'releases' into release/v1.15.0 2022-02-18 13:57:07 -05:00
Aayush d35216434f Merge branch 'releases' into asr/releases-master 2022-02-18 13:45:08 -05:00
Aayush Rajasekaran d2dca7b217 Merge pull request #8154 from filecoin-project/release/v1.14.1
chore: release: merge release/v1.14.1 to releases branch
2022-02-18 13:36:57 -05:00
Jiaying Wang 0ce666aaa0 Merge branch 'releases' into release/v1.14.1 2022-02-18 13:36:37 -05:00
Aayush Rajasekaran f3db3da153 Merge pull request #8153 from filecoin-project/jen/rv141prep
chore: build: fix the typo in upgrade epoch date and version bump to v1.14.1
2022-02-18 13:35:21 -05:00
Aayush 6e1d5c5733 Merge branch 'master' into feat/fvm 2022-02-18 13:33:06 -05:00
Aayush Rajasekaran 562c59b6c1 Merge pull request #8101 from filecoin-project/asr/fault
Fvm: impl VerifyConsensusFault
2022-02-18 13:27:25 -05:00
Aayush 5be125ad1a address review feedback 2022-02-18 13:21:17 -05:00
Aayush 393479ea69 Fvm: impl VerifyConsensusFault 2022-02-18 13:21:01 -05:00
florian@eyesr.fr 623272aa96 Merge branch 'master' of https://github.com/FlorianRuen/lotus 2022-02-18 15:51:19 +00:00
florian@eyesr.fr 1c39730531 Fix #8095
Clear the list of miner addresses and successfull get-asked before asking for new ones
Previous behavior : if get-ask failed for miner(s), the faulty miner will be retried each time,
so you have to stop the command and start again to change this faulty miner (instead of removing from the list on the new attempt)
2022-02-18 15:46:40 +00:00
jennijuju 94bfd5cf66 version v1.14.1 2022-02-18 09:12:43 -05:00
Jiaying Wang c5bd019a7c Fix mainnet upgrade date, epoch is correct 2022-02-18 09:11:49 -05:00
Aayush Rajasekaran c8edd5bd52 CHANGELOG: add a note about premigrations 2022-02-18 09:10:24 -05:00
vyzo a7b1d86533 make cidset (in memory) visitors smarter; no need to ever visit unitary objects 2022-02-18 12:35:42 +02:00
vyzo 2795995989 add reification limit test 2022-02-18 12:19:19 +02:00
vyzo cbd23c2b1b add reification limit 2022-02-18 12:19:09 +02:00
Aarsh Shah e3f5b7c59f update dagstore top level index db 2022-02-18 14:00:01 +04:00
Aayush Rajasekaran 3bb6efe0db Merge pull request #8144 from filecoin-project/asr/release
CHANGELOG: add a note about premigrations
2022-02-17 21:03:47 -05:00
Aayush Rajasekaran e05b9ce039 CHANGELOG: add a note about premigrations 2022-02-17 20:55:32 -05:00
Aayush Rajasekaran 94e3088f56 Merge pull request #8143 from filecoin-project/asr/release
Lotus version 1.14.0: set OhSnap upgrade epoch
2022-02-17 20:29:22 -05:00
Aayush Rajasekaran b311c26e21 Lotus version 1.14.0: set OhSnap upgrade epoch 2022-02-17 20:28:38 -05:00
Aayush Rajasekaran 0521d793db tidy go.sum 2022-02-17 19:11:41 -05:00
Aayush Rajasekaran cf7a0415c1 Merge pull request #8130 from filecoin-project/feat/lm-snap-clis
feat: Snapdeals support in `storage find` CLI
2022-02-17 14:49:08 -05:00
Aayush Rajasekaran ab2cea6b46 Merge pull request #8137 from filecoin-project/asr/backport
sealer: fix error message
2022-02-17 14:44:16 -05:00
Aayush b708fbcd20 sealer: fix error message 2022-02-17 14:31:59 -05:00
Aayush Rajasekaran bf36363109 Merge pull request #8136 from filecoin-project/asr/backport
sealer: fix error message
2022-02-17 14:31:43 -05:00
Aayush 3399f72113 sealer: fix error message 2022-02-17 14:24:32 -05:00
Aayush Rajasekaran 8c0b4a5132 Merge pull request #8135 from filecoin-project/asr/backport
typo in  variable name
2022-02-17 14:22:04 -05:00
Jennifer Wang f6e545bce5 typo in variable name 2022-02-17 14:09:10 -05:00
Aayush Rajasekaran c6c5cdd1dc Merge pull request #8134 from filecoin-project/asr/backport
typo in  variable name
2022-02-17 14:08:31 -05:00
Jennifer Wang ae7e5f4b2c typo in variable name 2022-02-17 14:07:45 -05:00
Aayush Rajasekaran 33134e617f Merge pull request #8123 from filecoin-project/jen/fixcli
fix: sealing: replica-update variable name is inconsistent
2022-02-17 14:06:48 -05:00
Łukasz Magiera 81d2fd615d Merge pull request #8132 from filecoin-project/fix/disable-reify
temporarily disable reification
2022-02-17 19:30:17 +01:00
vyzo 899a65ae87 fix test 2022-02-17 20:13:46 +02:00
Florian Ruen 6ce9321094 lint reported errors on CircleCI
Commit to fix lint reported errors during tests on CircleCI
(remove trailling whitespace)
2022-02-17 19:01:52 +01:00
vyzo a20c6cb04b temporarily disable reification
big reifications can use a lot of memory during sync apparently.
2022-02-17 19:56:50 +02:00
Florian Ruen ddd369e731 lint reported errors on CircleCI
Commit to fix lint reported errors during tests on CircleCI
(remove blank lines x2)
2022-02-17 18:53:21 +01:00
Florian Ruen 78817bd001 Fix #8100
Bug fixed : if hitting return instead of filling with a valid value, the CLI crashed (line 796)
Change return err by continue to ask a valid value again
2022-02-17 17:57:42 +01:00
Florian Ruen 6d32a2f299 Update client.go
Bug fixed : if hitting return instead of filling with a valid value, the CLI crashed (line 796)
Change return err by continue to ask a valid value again
2022-02-17 17:35:33 +01:00
Aayush Rajasekaran 72021b3221 Merge pull request #8111 from filecoin-project/travis/set-current-network-version
feat: cli: set current network version from params
2022-02-17 11:25:07 -05:00
Aayush Rajasekaran 5e4e7c6d34 Merge pull request #8122 from filecoin-project/asr/make-jen
makefile: add make jen
2022-02-17 10:56:39 -05:00
Łukasz Magiera c974872494 lotus-miner: More sector-related data in info all 2022-02-17 16:35:09 +01:00
Łukasz Magiera 7823363bba lotus-miner: Support update files in storage find 2022-02-17 16:29:27 +01:00
Darko Brdareski 6feae1993d Fix PR comments.
Refactor random addr generation to use a rand seed.
Remove unused lines in tests.
2022-02-17 14:24:42 +01:00
Łukasz Magiera 93bc3af7c6 Merge pull request #8128 from filecoin-project/fix/splitstore-reify-incomplete
don't fail reification on missing references
2022-02-17 13:16:34 +01:00
vyzo 74556edcff don't fail reification on missing references 2022-02-17 12:52:52 +02:00
Łukasz Magiera 36224838dd Merge pull request #8121 from filecoin-project/asr/nil-update
sealer: fix error message
2022-02-17 11:30:53 +01:00
Kevin Li bc88a02fe2 fix docsgen-cli 2022-02-17 17:29:09 +08:00
Kevin Li ba72eff3e6 feat: cli/net: implement 'net ping' command 2022-02-17 17:22:52 +08:00
Steven Allen d835cade15 chore: update FFI
Updates the FVM
2022-02-16 17:47:25 -08:00
Aayush 355b73843c makefile: add make jen 2022-02-16 19:34:45 -05:00
Jennifer Wang 43c0344fb2 typo in variable name 2022-02-16 19:31:45 -05:00
Aayush Rajasekaran 4767f3d87e Merge pull request #8120 from filecoin-project/travis/set-current-network-version
feat: cli: set current network version from params
2022-02-16 19:28:59 -05:00
Aayush 36aa243c56 sealer: fix error message 2022-02-16 19:26:00 -05:00
Aayush Rajasekaran 9df5ce1fb7 Merge pull request #8116 from filecoin-project/asr/migration-tweak
feat: tweak v15 migration params
2022-02-16 17:54:46 -05:00
Aayush 71f0f4c335 feat: tweak v15 migration params 2022-02-16 17:53:59 -05:00
Aayush Rajasekaran 7a0f88cc7c Merge pull request #8115 from filecoin-project/asr/migration-tweak
feat: tweak v15 migration params
2022-02-16 17:53:46 -05:00
Aayush 3b3b0725ed feat: tweak v15 migration params 2022-02-16 17:52:57 -05:00
Aayush Rajasekaran f17bbc9eac Merge pull request #8108 from filecoin-project/asr/migration-tweak
feat: tweak v15 migration params
2022-02-16 17:50:10 -05:00
Travis Person ca9bcc90a5 lotus-seed: set current network version from params
allows automation to correctly set the network version for the currently
built network with no variable inputs.
2022-02-16 21:02:51 +00:00
Łukasz Magiera 384999556c paychmgr: AvailableAmt -> NonReservedAmt 2022-02-16 20:39:43 +01:00
Aayush afc29ed445 feat: tweak v15 migration params 2022-02-16 13:04:48 -05:00
Masih H. Derkani a09f386537 Remove redundant IndexProvider config now that host is shared
Now that host is shared having separate config for listen and announce
addresses along with graphsync limit makes no sense since all of that is
shared with the markets host and datatransfer manager.
2022-02-16 13:46:44 +00:00
Masih H. Derkani 2ebc111b70 Use the same host and datatransfer as markets for index provider
Remove the bespoke instantiation of libp2p host and datatransfer manager
for index provider and reuse the existing instances used by markets.

The rationale for reuse is the following:
 1. Separation of host introduces a discovery problem, where without
    gossipsub the index provider endpoint will not be discoverable.
    Using the same host as markets would mean the chain can be used to
    discover addresses, putting less empassis on criticality of
    gossipsub considering its set-up cost and lack of message delivery
    guarantees.

 2. Only a single instance of graphsync/datatransfer can be instantiated
    per libp2p host; therefore, if the host is shared, so should
    datatransfer manager.

 3. it is not clear if the assumptions under which separation was
    decided still hold.
2022-02-16 13:46:44 +00:00
Łukasz Magiera e961766e4b fix lotus-soup build 2022-02-16 10:08:44 +01:00
Łukasz Magiera 681b90768a Merge remote-tracking branch 'origin/master' into feat/paych-avail-reuse 2022-02-16 10:06:36 +01:00
Łukasz Magiera cdca1a46b1 Merge pull request #8102 from filecoin-project/feat/paych-avail-reuse-updated-markets
feat(markets): update markets to simplify client adapter
2022-02-16 10:01:10 +01:00
Kevin Li f677995603 feat: add MsigGetVestingSchedule to gateway api
expose MsigGetVestingSchedule method to gateway api
2022-02-16 16:11:46 +08:00
hannahhoward e1a36058b4 feat(markets): update markets to simplify client adapter 2022-02-15 21:52:06 -08:00
Aayush Rajasekaran 439b424261 Merge pull request #8093 from filecoin-project/asr/enabler15
fix: sealer: allow enable/disabling ReplicaUpdate tasks
2022-02-15 14:57:20 -05:00
Aayush Rajasekaran c217ccf540 Merge pull request #8092 from filecoin-project/asr/enabler14
fix: sealer: allow enable/disabling ReplicaUpdate tasks
2022-02-15 14:56:11 -05:00
Łukasz Magiera 6f21a10a56 Merge pull request #8098 from filecoin-project/feat/sectorlist-pledge
feat: lotus-miner sectors list --initial-pledge
2022-02-15 16:44:49 +01:00
Łukasz Magiera fd66c0dcf6 Merge pull request #8099 from filecoin-project/feat/rcmgr-metrics-redux
don't track peer ids in rcmgr metrics
2022-02-15 15:52:26 +01:00
vyzo 9c00af1b86 don't track peer ids in rcmgr metrics 2022-02-15 16:12:17 +02:00
Łukasz Magiera a3e785cb4a Merge pull request #8057 from mtelka/info-noadmin
fix: state: Allow lotus-miner info to complete without admin permission
2022-02-15 15:00:29 +01:00
Łukasz Magiera 6926d63655 Merge pull request #8088 from filecoin-project/fix/flakey-paychapi-test
fix:paychan:deflake integration test
2022-02-15 14:45:14 +01:00
Łukasz Magiera 48dea93c7e Merge pull request #8089 from filecoin-project/feat/rcmgr-metrics
Resource Manager Metrics
2022-02-15 14:40:44 +01:00
Łukasz Magiera 0b7addc031 lotus-miner sectors list --initial-pledge 2022-02-15 14:21:30 +01:00
Masih H. Derkani 031bfaf120 Update to the head of go-fil-markets#673
Update to the head of the PR that introduces indexing integration in
`go-fil-markets` so that failure to connect to full node is logged only
instead of crashing markets process.

Relates to:
 - https://github.com/filecoin-project/go-fil-markets/pull/673
 - https://github.com/filecoin-project/index-provider/issues/177
2022-02-15 12:37:13 +00:00
Masih H. Derkani f15a1edbf2 Protect index provider peer ID before connecting to full node
Add the peer ID of index provider host to the list of protected peers
before connecting to full node. Otherwise, it is possible for the
connection to be reset by full node before we reach the line that adds
the ID to list of protected peers via JsonRPC API.

Relates to:
 - https://github.com/filecoin-project/index-provider/issues/177
2022-02-15 11:49:29 +00:00
Aayush 75b8e4c981 fix: sealer: allow enable/disabling ReplicaUpdate tasks 2022-02-14 15:25:52 -05:00
Aayush 56df886b55 fix: sealer: allow enable/disabling ReplicaUpdate tasks 2022-02-14 15:24:13 -05:00
Aayush Rajasekaran bcaeb83fef Merge pull request #8090 from filecoin-project/asr/snap-tasks
fix: worker: allow enable/disabling ReplicaUpdate tasks
2022-02-14 15:23:42 -05:00
Łukasz Magiera 60b9acc09d gen 2022-02-14 21:16:41 +01:00
Łukasz Magiera deb9882520 Merge branch 'feat/paych-avail-reuse' of github.com:filecoin-project/lotus into feat/paych-avail-reuse 2022-02-14 21:11:48 +01:00
Łukasz Magiera da5ae1efe1 paychmgr: erlier checks in completeAmount 2022-02-14 21:11:31 +01:00
Aayush eebe784191 fix: sealer: allow enable/disabling ReplicaUpdate tasks 2022-02-14 15:08:28 -05:00
Łukasz Magieraanddirkmc f9485eb9c2 Update paychmgr/store.go
Co-authored-by: dirkmc <dirkmdev@gmail.com>
2022-02-14 20:42:45 +01:00
Łukasz Magiera 36a1934845 paychmgr: Fix tests after api changes 2022-02-14 20:16:30 +01:00
df5bd147fa paychmgr: Review comments
Co-authored-by: Hannah Howard <hannah@hannahhoward.net>
Co-authored-by: dirkmc <dirkmdev@gmail.com>
2022-02-14 20:07:13 +01:00
zenground0 977351f419 Fix from Magik to remove hanging behavior 2022-02-14 14:00:41 -05:00
Łukasz Magiera f61eb23f8f api: separate method for paych funding 2022-02-14 19:56:02 +01:00
Łukasz Magiera 10af768c60 Merge commit 'origin/release/v1.15.0~2' into feat/paych-avail-reuse 2022-02-14 19:27:12 +01:00
Łukasz Magiera 7efed6617c Merge pull request #8029 from filecoin-project/feat/splistore-cold-object-reification-redux
splistore cold object reification redux
2022-02-14 19:04:02 +01:00
vyzo a9ec408844 collect resource manager metrics 2022-02-14 19:46:05 +02:00
vyzo b260c849f7 deps: update go-libp2p-resource-manager to v0.1.4 2022-02-14 19:43:07 +02:00
zenground0 2c06eb76d6 Improve MineBlocksMustPost use it in PaychAPI itest 2022-02-14 09:47:18 -05:00
vyzo 6bcade5e6d add comment about bigness of reification batch 2022-02-14 16:13:54 +02:00
vyzo 4524fbe936 wait for reify workers to finish when closing 2022-02-14 16:10:54 +02:00
vyzo 6c7ababd3f add comment about trackTxnRefs being noops if txnActive is false 2022-02-14 16:06:12 +02:00
vyzo a428f44793 don't reify objects while still warming up 2022-02-14 16:04:39 +02:00
vyzo b576785aac rename GetHotView to IsHotView 2022-02-14 16:03:17 +02:00
ZenGround0 3b5b55de19 Merge pull request #8017 from filecoin-project/bloxico/mempool_tests
test: mempool: Add unit and integration tests
2022-02-14 08:46:45 -05:00
Aayush ee6989970f Merge branch 'master' into feat/fvm 2022-02-13 14:25:39 -05:00
Aayush Rajasekaran bac708fa34 Merge pull request #8081 from filecoin-project/feat/shed-state-diff
add a state-tree diff command to lotus shed
2022-02-13 14:03:22 -05:00
Nikola Divic 93d9bfb682 doc: stm test annotations for cli/sync category 2022-02-13 18:39:37 +01:00
Nikola Divic e6c8c9a6ab doc: add stm annotation to cli chain tests 2022-02-13 17:14:27 +01:00
Nikola Divic 34387326d1 test: fix flaky message pool integration tests
Using the same pattern described in my previous commit.
I also added the CircuitBreaker to the itests kit as it may be useful
for other integration tests when debugging flakyness caused by timeouts.
2022-02-12 19:52:51 +01:00
Nikola Divic aca2a0fd1b test: fix flake in TestMemPoolBatchPushUntrusted integration test
The flake was caused by improper waiting for certain chain operations
to finish:

- We didn't wait for messages to be registered as pushed
- We improperly waited for a fixed time (10 seconds) for messages to be
mined, which in the best case would wait longer than necessary and in the
worst case would cause the test to break.

What I did:
- fixed by waiting in a loop for "just enough time". This fixed the flake
and made the test run faster, on average, because we don't have unnecessary
waiting.
- I added a "circuit-breaker" where the wait loop will timeout after 10 seconds.
2022-02-12 17:48:45 +01:00
Nikola Divic 0e8a709f92 Merge branch 'master' of https://github.com/filecoin-project/lotus into bloxico/mempool_tests 2022-02-12 17:11:24 +01:00
Nikola Divic d50a26f4ae Revert "test: (kinda) fix flaky test"
This reverts commit baee4a1576.
2022-02-12 17:10:00 +01:00
Nikola Divic baee4a1576 test: (kinda) fix flaky test
deals_retry_deal_no_funds_test.go:TestDealsRetryLackOfFunds seems to be
flaky, sometimes it passes and sometimes it doesn't.
The first suspect for me was time.Sleep(), which I replaced with waiting
until a deal state where you can restart is reached.
2022-02-11 21:56:28 +01:00
Masih H. Derkani 1bf7e6a408 Fix gen-check 2022-02-11 20:02:56 +00:00
Masih H. Derkani 59351c8cb8 Add lotus net CLI command to add/remove/list protected peers
Add CLI commands under `lotus net` to add/ remove/list protected peers.
2022-02-11 19:54:59 +00:00
Masih H. Derkani 230b8554f6 Override testnetnet to mainnet in indexer ingest topic
Override `testnetnet` to `mainnet` when constructing indexer ingestion
topic.
2022-02-11 19:52:19 +00:00
Masih H. Derkani b47cde70fa Decode gossip extra data as []bytes
The type of extra data in go-legs gossip is bytes. But when it is parsed
as miner ID, it is cast to string then parsed. Instead, it should be
decoded from bytes.
2022-02-11 18:59:00 +00:00
Steven Allen e89f7d9023 feat: shed: add a state-tree diff command to lotus shed
This makes it easier to debug state mismatches by providing a nice way
to figure out which actors differ between two state-trees and
how (balance, nonce, state, etc.).

It doesn't provide a way to actually _diff_ those state-trees, but one
can use `lotus chain get` to figure that out (although it would be
_nice_ to provide something a bit smarter).
2022-02-11 10:35:56 -08:00
Nikola Divic 94374aa93d test: sync checkpoint cli command 2022-02-11 18:30:07 +01:00
Nikola Divic 05c8635749 test: sync check-bad cli command 2022-02-11 18:08:36 +01:00
Nikola Divic 0f79a0024c test: sync unmark-bad cli command 2022-02-11 18:00:01 +01:00
Nikola Divic 7fc2f9dc29 test: sync mark-bad cli command 2022-02-11 17:54:53 +01:00
Nikola Divic ec0607900d test: sync state cli command 2022-02-11 17:45:19 +01:00
TheMenko 8a2d27309d adding cli wallet tests 2022-02-11 16:30:28 +01:00
TheMenko d77e59309d Merge remote-tracking branch 'origin/cli-chain-tests' into cli_wallet_tests
merging cli-chain-tests for mock full api function dependency
2022-02-11 16:17:30 +01:00
Nikola Divic 2a1f18b6ab Merge branch 'cli-chain-tests' into bloxico/cli-sync-tests 2022-02-11 15:56:49 +01:00
Nikola Divic 34bfd13548 doc: add stm annotations to the syncer tests
Add annotations for the test crawler for the lotus.systemtestmatrix.com
dashboard.
2022-02-11 15:06:06 +01:00
Masih H. Derkani 7e7844f169 Fix log message formatting when instantiating index provider 2022-02-11 12:15:21 +00:00
Łukasz Magiera 2e22781f8f Merge pull request #8073 from filecoin-project/jen/v151
feat: build: bump the version to v1.15.1-dev
2022-02-11 09:51:21 +00:00
Jennifer Wang 99d5ad097c Merge remote-tracking branch 'origin/master' into jen/v151 2022-02-11 00:16:52 -05:00
Jennifer Wang 1b2bbd3888 bump master version to v1.15.1-dev 2022-02-11 00:13:18 -05:00
Jennifer Wang 095d5d2e31 add changelog 2022-02-10 23:56:42 -05:00
Jennifer Wang 7fd4c9617d typo in change log 2022-02-10 23:46:49 -05:00
Jennifer Wang 1916561e60 bump the version to v1.15.0-rc1 2022-02-10 23:38:41 -05:00
Jiaying Wang ad0f44f0c5 Merge pull request #8070 from filecoin-project/jen/rc7
chore: build: v1.14.0-rc7
2022-02-10 19:19:04 -05:00
Nikola Divic ae66f57fa0 test: chain syncer & sync manager
Added a few tests for some uncovered methods of the syncer and sync
manager. Deleted some dead code (sync.go:getLatestBeaconEntry).
2022-02-11 00:46:59 +01:00
Nikola Divic 107eb76b20 cleanup: small cleanup before final push 2022-02-11 00:09:07 +01:00
Jennifer Wang cb2518716c v1.14.0-rc7 2022-02-10 17:43:57 -05:00
Łukasz Magiera a1098f6dc2 Cleanup go.mod 2022-02-10 17:37:09 -05:00
zenground0 407c6cf120 Stop recovery attempts after fault 2022-02-10 17:33:57 -05:00
Łukasz Magiera 9e76a788e2 sealing: Use ChainAt in handleUpdateActivating 2022-02-10 17:32:31 -05:00
Łukasz Magiera 02c0fb7b65 ffiwrapper: Use ClearCache for update cache cleanup 2022-02-10 17:32:13 -05:00
Łukasz Magiera a5bddbcdc6 proofs master 2022-02-10 17:32:04 -05:00
Łukasz Magiera 9f54c4d002 Fix CheckProvable with updated sectors 2022-02-10 17:30:23 -05:00
Łukasz Magiera 4289ce10e4 fsm: Call ReleaseSectorKey after WinningPoSt lookback period 2022-02-10 17:30:18 -05:00
Łukasz Magiera 263de5b0c1 Use tagged specs-storage 2022-02-10 17:29:57 -05:00
Łukasz Magiera ecc1f4b8f1 Make FinalizeReplicaUpdate actually do cleanup 2022-02-10 17:29:52 -05:00
Łukasz Magiera ea32b415f0 Fix missing FinalizeReplicaUpdate in tests 2022-02-10 17:29:47 -05:00
Łukasz Magiera 229cfafa8d make gen 2022-02-10 17:29:39 -05:00
Łukasz Magiera 53e1f75c2c Add FinalizeReplicaUpdate into some more places 2022-02-10 17:27:49 -05:00
Łukasz Magiera 9a01964f5f itests: Print API info env vars in ThroughRPC tests 2022-02-10 17:27:43 -05:00
Łukasz Magiera f2a6c9458c mod tidy 2022-02-10 17:27:38 -05:00
Łukasz Magiera 9a117fa39a try ClearCache for update cache 2022-02-10 17:27:24 -05:00
Łukasz Magiera 212f5ddb4f wip FinalizeReplicaUpdate 2022-02-10 17:24:26 -05:00
Will 296eab3045 Merge pull request #8045 from gammazero/feat/cid-to-piece-idx
Add indexer pubsub message authentication and rate limiting
2022-02-10 13:49:58 -08:00
Nikola Divic e5ac8662c8 test: chain gas-price cli command
Contains some funny mocking logic, because estimate gas price is called
multiple times (for various nblocks) and I wanted to make it as flexible
as possible.
2022-02-10 21:55:09 +01:00
gammazero c1b2080f4e spelling in comment 2022-02-10 11:25:30 -08:00
gammazero eedcf910eb change scoring based on review 2022-02-10 10:53:07 -08:00
gammazero b72cd90c19 Add indexer message scoring 2022-02-10 09:21:21 -08:00
Nikola Divic c0f89e5b2d test: chain export cli command
Modified ChainExportCmd to use io.WriterCloser instead of os.File so
it the file can be mocked in unit tests, without side effects to the FS.
2022-02-10 18:18:31 +01:00
gammazero 1e37185d74 Ignore, not regect, indexer messages from self. 2022-02-10 08:44:40 -08:00
gammazero 3f3d61b043 Service creation takes interface, not implementation 2022-02-10 08:41:18 -08:00
Steven Allen 7ef1513f9b ffi: update fvm 2022-02-10 07:56:27 -08:00
Nikola Divic b536dfa552 test: chain bisect cli command 2022-02-10 15:46:06 +01:00
Masih H. Derkani f0accce286 Upgrade index-provider and go-fil-markets to latest
See: https://github.com/filecoin-project/go-fil-markets/pull/680
2022-02-10 14:04:11 +00:00
Nikola Divic 6bc2ee2735 test: chain get cli command
Cover the essential function execution paths, no time for every -as-type
combination.
2022-02-10 14:49:38 +01:00
Marcel Telka 3c82ee49c0 Allow lotus-miner info to complete without admin permission 2022-02-10 12:45:57 +01:00
Łukasz Magiera e435b42426 Merge pull request #8053 from filecoin-project/jen/v15
chore: build: v1.14.0 -> master
2022-02-10 11:06:01 +00:00
gammazero 9481fa0a4b Use new indexer pubsub message encoding 2022-02-09 16:40:27 -08:00
Jennifer Wang 1d67b7ffb6 undo ffi 2022-02-09 19:31:50 -05:00
Jennifer Wang de1f4792cd Merge remote-tracking branch 'origin/master' into jen/v15 2022-02-09 19:27:34 -05:00
gammazero 681ce94a34 Correctly handle seqno check 2022-02-09 16:21:05 -08:00
Jiaying WangandŁukasz Magiera cd3772bf4f Update go.mod
Co-authored-by: Łukasz Magiera <magik6k@users.noreply.github.com>
2022-02-09 19:08:00 -05:00
Nikola Divic b3f7db7a15 test: chain list (love) cli command
Some "funky" string matching in this one, but I think that's ok.

Chain is love. ❤️
2022-02-10 00:36:38 +01:00
Nikola Divic 4e37131602 test: chain inspect-usage cli command 2022-02-09 23:47:40 +01:00
Steven Allen 0d6eb7fefc ffi: update for fixed FVM lifetime management 2022-02-09 14:13:58 -08:00
Jennifer Wang 7b7733077a update the proofs in test plans` 2022-02-09 15:11:29 -05:00
Jiaying Wang 3b5f367822 Merge pull request #8042 from filecoin-project/jen/testplanproof
feat: build: update the snap proofs in testplans
2022-02-09 15:04:11 -05:00
Nikola Divic ae49729afb test: chain sethead cli command
Also moved the mock definition to a separate file (mocks_test.go)
because it's gonna be used in other test files, and it didn't make sense
for it to stay inside chain_test.go.
2022-02-09 20:46:51 +01:00
gammazero 3ff209d95d Add replay rejection 2022-02-09 11:06:56 -08:00
Nikola Divic 7d2810abbc test: don't parse err messages in messagepool_test
Per @vyzo's feedback, we shouldn't parse err messages but figure out
a way to do this smarter. I updated the code just check for error
existence and @brdji should figure out what to do next.
2022-02-09 19:54:45 +01:00
Jennifer Wang 8b68d37e84 remove change log 2022-02-09 13:33:47 -05:00
gammazero a62e027002 review changes 2022-02-09 10:29:49 -08:00
Łukasz Magiera e7038d286d Merge pull request #8018 from filecoin-project/feat/fru
FinalizeReplicaUpdate
2022-02-09 17:40:47 +00:00
Łukasz Magiera 44fd0e3349 Merge pull request #8008 from filecoin-project/feat/splitstore-sortless-compaction
splitstore sortless compaction
2022-02-09 17:17:57 +00:00
Łukasz Magiera 84d70caa87 sealing: Use ChainAt in handleUpdateActivating 2022-02-09 17:50:56 +01:00
vyzo e129ae3706 refactor nextBatch in badger markset 2022-02-09 18:34:50 +02:00
Nikola Divic e797ec138d test: chain getmessage cli command
I also added some helper functions for mocking in the types/mock pkg
2022-02-09 17:29:29 +01:00
Nikola Divic a923d7c884 test: chain stat-obj cli command
Test expected output with respect to the --base flag
2022-02-09 16:22:52 +01:00
Łukasz Magiera cce77196cd proofs v11.0.2 2022-02-09 16:22:35 +01:00
Nikola Divic c0f47e5eed test: chain delete-obj cli command
Contains two subtests, that check if the --really-do-it flag (force)
is respected, since removing wrong objects may lead to sync issues.
2022-02-09 15:56:13 +01:00
Nikola Divic 1cd590ace9 test: chain read-obj
Simple test that checks if this CLI method prints the IPLD node referenced
by the given CID encoded in hexadecimal.
2022-02-09 15:29:10 +01:00
Łukasz Magiera f33cf74d0f ffiwrapper: Use ClearCache for update cache cleanup 2022-02-09 14:54:36 +01:00
Łukasz Magiera 6cb411e5bb proofs master 2022-02-09 14:46:29 +01:00
Łukasz Magiera b1a74d71f1 Fix CheckProvable with updated sectors 2022-02-09 14:41:36 +01:00
Rob Quist 026c51033c perf: chain: Make drand logs in daemon less noisy (#7955)
Makes logs less noisy
2022-02-09 13:34:55 +01:00
Łukasz Magiera eff73c9728 Merge pull request #7941 from filecoin-project/chore/more_detailed_network-wide_shed_stats
chore: shed: storage stats 2.0
2022-02-09 12:03:49 +00:00
Łukasz Magiera 947000c94f fsm: Call ReleaseSectorKey after WinningPoSt lookback period 2022-02-09 12:41:39 +01:00
Łukasz Magiera 67e3f182f5 Use tagged specs-storage 2022-02-09 11:28:48 +01:00
Jennifer Wang 6ed97f0d04 Merge branch 'release/v1.14.0' into jen/v15 2022-02-09 03:17:38 -05:00
Steven Allen 743862857e ffi: update FFI for fvm changes 2022-02-08 20:57:20 -08:00
Steven Allen e8bdf8171b chore: cleanup fil vested calculation
1. Move lock, loading, etc into GetFilVested.
2. Call it directly when creating the FVM.
3. Detach GetFilLocked from state manager.

Really, this just makes it a bit easier to reason about this code.
2022-02-08 20:54:53 -08:00
Jiaying Wang eecb0831a8 Merge pull request #8049 from filecoin-project/asr/dep
deps: update go-paramfetch to v0.0.4
2022-02-08 21:06:32 -05:00
Jiaying Wang 7319420c8f Merge pull request #7905 from filecoin-project/feat/snap-deals-add-ons
StartEpochSealingBuffer triggers packing on timer
2022-02-08 21:06:11 -05:00
Steven Allen e8d771fcac pass only fil-vested into FVM 2022-02-08 15:26:20 -08:00
Steven Allen 32b3618c74 fvm: feed in correct "base" circulating supply 2022-02-08 13:20:03 -08:00
Łukasz Magiera 22e72e19b3 Merge pull request #8050 from filecoin-project/asr/dep-master
deps: update go-paramfetch to v0.0.4
2022-02-08 19:04:34 +00:00
zenground0 485568d460 make docsgen-cli 2022-02-08 13:52:24 -05:00
Aayush Rajasekaran 8d5be1c012 Merge pull request #8051 from filecoin-project/fix/8011-1.14.0
Stop recovery attempts after fault
2022-02-08 13:23:09 -05:00
zenground0 e32704e7f6 Update node doc gen 2022-02-08 12:56:32 -05:00
zenground0 03bc45a26a Update ci config to match auto gen 2022-02-08 12:47:23 -05:00
zenground0 1e524b7210 Review Response 2022-02-08 12:39:35 -05:00
zenground0 5a09b6496d Actually read config value 2022-02-08 12:39:35 -05:00
zenground0 2aa5911fb9 config gen 2022-02-08 12:39:35 -05:00
zenground0 a19c0a8255 Remove extra file 2022-02-08 12:39:35 -05:00
zenground0 4d8b912acc New config for turning off auto deal creation 2022-02-08 12:39:35 -05:00
zenground0 1af8987c79 StartEpochSealingBuffer triggers packing on timer 2022-02-08 12:39:35 -05:00
zenground0 6fdf76b5d2 Stop recovery attempts after fault
Check sector is active before PRU

Fix log

nit: edit a comment
2022-02-08 12:25:24 -05:00
Nikola Divic 78649d45b9 test: cli chain getblock command
Unit test for the cli `chain getblock` command.
Tests if output is JSON  in the expected format.
2022-02-08 18:24:45 +01:00
Aayush Rajasekaran 899ae8aa8e Merge pull request #8014 from filecoin-project/fix/8011
fix: sealing: Stop recovery attempts after fault
2022-02-08 12:06:55 -05:00
Aayush Rajasekaran b6c141c059 nit: edit a comment 2022-02-08 12:06:33 -05:00
Aayush Rajasekaran 316836f43b deps: update go-paramfetch to v0.0.4 2022-02-08 12:00:55 -05:00
Aayush Rajasekaran 9df19ae436 deps: update go-paramfetch to v0.0.4 2022-02-08 12:00:19 -05:00
Łukasz Magiera 6123339baf Make FinalizeReplicaUpdate actually do cleanup 2022-02-08 17:45:26 +01:00
Nikola Divic 35918cbd7e Merge branch 'master' of https://github.com/filecoin-project/lotus into cli-chain-tests 2022-02-08 17:25:45 +01:00
Łukasz Magiera c8e0341248 Fix missing FinalizeReplicaUpdate in tests 2022-02-08 17:22:41 +01:00
Łukasz Magiera 4ad97f6a36 make gen 2022-02-08 17:22:41 +01:00
Łukasz Magiera 09cfad9d71 Add FinalizeReplicaUpdate into some more places 2022-02-08 17:22:41 +01:00
Łukasz Magiera 7fa84518c8 itests: Print API info env vars in ThroughRPC tests 2022-02-08 17:22:41 +01:00
Łukasz Magiera 6675aec686 mod tidy 2022-02-08 17:22:41 +01:00
Łukasz Magiera e271bae5ec try ClearCache for update cache 2022-02-08 17:22:41 +01:00
Łukasz Magiera 142ba6660a wip FinalizeReplicaUpdate 2022-02-08 17:22:41 +01:00
Łukasz Magiera b27196b770 Merge pull request #8047 from filecoin-project/asr/params
chore: update build and deps
2022-02-08 16:22:12 +00:00
Nikola Divic 811bc62d65 test: cli test setup & test chain head
CLI actions lack unit tests. I decided to use the approach similar to
what I found in `send_test.go` using gomock, but I don't rely on custom
"service" implementations but mock the whole FullNode API.
This first commit validates the test setup by testing the simplest method
of the chain category, e.g. `chain head`.

This requires a minor refactor of the CLI action code:
- The constructor (`GetFullNodeAPI`) checks if there's an injected mock
API in the app Metadata and uses that in unit tests.
- Actions shouldn't use raw `fmt.*` but instead write to the `app.Writer`
so the CLI output is testable
2022-02-08 17:15:45 +01:00
Aayush Rajasekaran f476aa937e update to latest FFI 2022-02-08 10:45:58 -05:00
Jennifer Wang 932110fb93 update the param version 2022-02-08 10:44:36 -05:00
Jennifer Wang 1865e8f088 reset butterfly net 2022-02-08 10:43:51 -05:00
Jennifer Wang fdae1face5 Set Calib OhSnap upgrade epoch 2022-02-08 10:43:43 -05:00
Aayush Rajasekaran ad39d8707d build: add empty sector update params 2022-02-08 10:41:18 -05:00
Masih H. Derkani cc61650f86 Upgrade to latest index-provider and set miner ID as extra gossip data
Upgrade to the latest `index-provider` which upgrades the go-legs
protocol to allow the inclusion of extra gossip data that may be used
for gossip validation purposes. In the case of lotus gossip message
validators the miner ID is used to verify the sender's peer ID on chain.

Relates to:
- https://github.com/filecoin-project/lotus/pull/8045
2022-02-08 14:32:03 +00:00
gammazero b2805823ce Pass to validator the interfaces needed to get miner info 2022-02-08 04:55:59 -08:00
gammazero 1dc6a2fea6 Add indexer pubsub message authentication and rate limiting 2022-02-08 02:53:25 -08:00
Łukasz Magiera b38adaa736 Merge pull request #8044 from filecoin-project/deps/update-libp2p
update libp2p to v0.18.0-rc4
2022-02-08 10:52:56 +00:00
vyzo 80e9f76261 update libp2p to v0.18.0-rc4 2022-02-08 11:51:14 +02:00
Aarsh Shah 399a1afd94 Merge remote-tracking branch 'origin/master' into feat/cid-to-piece-idx 2022-02-08 12:37:57 +04:00
vyzo 8ddf4766ea update README
Adds note about 3k IOPs requirement with badger markset, updates the memory requirement for
map to 48G based on observed behaviour of test nodes.
2022-02-08 10:10:51 +02:00
Jiaying Wang 171a0461b2 Merge pull request #8041 from filecoin-project/jen/v14rc6
build: release: v1.14.0-rc6
2022-02-08 02:24:14 -05:00
Jennifer Wang 73208b8081 update the proofs in test plans` 2022-02-08 02:10:09 -05:00
Jennifer Wang d6d2c2fc39 update changelog 2022-02-08 02:08:30 -05:00
Jennifer Wang b8f3d936c4 bump the version to v1.14.0-rc6 2022-02-08 01:53:15 -05:00
Jiaying Wang da31b61ba1 Merge pull request #8038 from filecoin-project/asr/soup-fix
Fix: soup: Downgrade datastore to 0.4.6
2022-02-08 00:45:11 -05:00
Jiaying Wang a3c9f5ed79 Merge pull request #8039 from filecoin-project/jen/rmpram
fix: params: remove experimental params that's not used for production mainnet
2022-02-08 00:31:02 -05:00
Jennifer Wang 8d4876d1ee remove unrelated parmas 2022-02-07 17:45:05 -05:00
Aayush 8bd848c8d7 Fix: lotus soup 2022-02-07 17:11:48 -05:00
Łukasz Magiera 966071d437 Merge pull request #8034 from filecoin-project/feat/splitstore-default-markset-badger
splitstore: set badger as the default default markset type
2022-02-07 19:27:13 +00:00
Steven Allen 279cdd0760 fvm: fix implicit messages and message inclusion gas charging 2022-02-07 10:33:57 -08:00
zenground0 1ab2744c84 Fix log 2022-02-07 09:15:23 -05:00
zenground0 47ffceef0d Check sector is active before PRU 2022-02-07 07:41:48 -05:00
vyzo 0ad1f0e233 moar make gen 2022-02-06 12:48:49 +02:00
vyzo 1221c0ba3f make gen 2022-02-06 12:28:21 +02:00
vyzo d45e2074a6 update README for map as the default 2022-02-06 11:25:27 +02:00
vyzo 03352ea863 make badger the default splitstore markset type 2022-02-06 11:21:16 +02:00
vyzo 713edd565c fix lint 2022-02-05 21:30:53 +02:00
vyzo a32b7a32f3 directly mark objects in cold object reification 2022-02-05 20:00:15 +02:00
Jiaying Wang f51d8323c0 Merge pull request #8032 from filecoin-project/jen/v14rc5
[WIP] v1.14.0-rc6
2022-02-04 16:36:48 -05:00
Travis Person 9b68174231 reset of the butterfly network 2022-02-04 21:31:09 +00:00
Steven Allen 04092f3e6b update ffi 2022-02-04 12:46:15 -08:00
Steven Allen fc74a6c8ca update fvm/ffi bindings 2022-02-04 12:46:15 -08:00
Aayush Rajasekaran 2a669b95fb :Hook up the FVM 2022-02-04 12:46:15 -08:00
Jennifer Wang 9117b89b83 update the calib upgrade epoch 2022-02-04 15:37:07 -05:00
vyzo 9d92b6eb92 correctly wrap hotview in the context for compute_state 2022-02-04 16:57:08 +02:00
vyzo 73c741f20c reify cold objects on block validation/application 2022-02-04 16:19:28 +02:00
vyzo 929a05e898 add reification test 2022-02-04 16:16:34 +02:00
vyzo 268366e446 cold object reification context option 2022-02-04 16:07:58 +02:00
vyzo 4cddfd1074 background cold object reification 2022-02-04 14:29:50 +02:00
Aarsh Shah eb8296120b changes to mesh creation code 2022-02-04 13:58:47 +04:00
Aarsh Shah daac7f2988 fix lint 2022-02-04 13:55:26 +04:00
Aarsh Shah ca46a79144 protect full node connection 2022-02-04 13:04:07 +04:00
Aarsh Shah e155eb9fa3 Merge pull request #8016 from filecoin-project/nonsense/add-fullnode-api
add indexProvider host to markets
2022-02-04 12:56:36 +04:00
Aarsh Shah 4691b2b809 changes to the indexer message relay PR 2022-02-04 12:15:01 +04:00
Aarsh Shah 3ecf478ff0 Merge pull request #8026 from gammazero/feat/cid-to-piece-idx
Lotus chain nodes relay indexer pubsub messages
2022-02-04 12:05:46 +04:00
gammazero c084130d3e Lotus chain nodes relay indexer pubsub messages
Content providers announce the availability of indexer data using gossip pubsub.  The content providers are not connected directly to indexers, so the pubsub messages are relayed to indexers via chain nodes. This PR makes chain nodes relay gossip pubsub messages, on the /indexer/ingest/<netname> topic.
2022-02-03 14:56:21 -08:00
Jiaying Wang f4af6b670c Merge pull request #8021 from filecoin-project/willscott/net-protect-api
add net protect api methods
2022-02-03 17:54:33 -05:00
Jiaying Wang d2d8c06f52 Merge pull request #8025 from filecoin-project/jen/butterfly
chore: butterfly: reset SnapNet
2022-02-03 14:55:03 -05:00
Jennifer Wang c65142782f reset butterfly net 2022-02-03 14:54:25 -05:00
Jiaying Wang 266b3750c9 Merge pull request #8024 from filecoin-project/fix/ctxci
fix: test: remove unneeded ctx
2022-02-03 14:47:40 -05:00
Jennifer Wang 3233755282 remove ctx 2022-02-03 14:40:37 -05:00
Jiaying Wang b1d9fd3b70 Merge pull request #8023 from filecoin-project/jen/calibupgrade
Set Calib OhSnap upgrade epoch
2022-02-03 14:37:53 -05:00
Jennifer Wang e23768fa58 Set Calib OhSnap upgrade epoch 2022-02-03 14:26:59 -05:00
Jiaying Wang 533e76ff2e Merge pull request #8020 from filecoin-project/jen/finalproof
dep: proof: rust proof v11.0.1
2022-02-03 14:21:43 -05:00
Jennifer Wang a30493446e update the param version 2022-02-03 13:49:22 -05:00
Łukasz Magiera d9c763437e Merge pull request #8022 from filecoin-project/deps/update-libp2p
update go-libp2p to v0.18.0-rc3
2022-02-03 18:42:04 +00:00
vyzo e78c4ab9b3 update go-libp2p to v0.18.0-rc3 2022-02-03 19:32:30 +02:00
Will Scott 7247f8e41f add net protect api methods
fix #8015
2022-02-03 17:24:49 +01:00
Jennifer Wang 33b53c4a0d update to ffi v11.0.1 2022-02-03 11:15:47 -05:00
Jennifer Wang ac5cbe5a82 update to the final proof for snap
source: https://github.com/filecoin-project/rust-fil-proofs/blob/master/parameters.json
2022-02-03 11:15:40 -05:00
Anton Evangelatov b6b5046cce upgrade go-fil-markets 2022-02-03 16:26:04 +01:00
Anton Evangelatov dde2ab59ae fixup 2022-02-03 15:53:46 +01:00
Anton Evangelatov bb6235733d go mod tidy 2022-02-03 15:48:05 +01:00
Anton Evangelatov 595ad44ee7 refactor indexprovider libp2p host connection to fullnode with meshcreator 2022-02-03 15:44:18 +01:00
Anton Evangelatov 20fc5ffa38 fixing tests 2022-02-03 14:43:20 +01:00
Masih H. Derkani 6ef0c382c3 Fix typos in default miner config 2022-02-03 13:24:46 +00:00
Masih H. Derkani 575e6add43 Rename IndexerProvider to IndexProvider and add more docs
Rename the config section corresponding to indexing to `IndexProvider`
for better readability.

Update existing docs for better clarity and add docs for config
parameters embedded from `index-provider` `Ingest` config library.
2022-02-03 13:10:47 +00:00
Masih H. Derkani 235377585d Clarify the purpose of MaxSimultaneousTransfers config
Clarify the documentation of `MaxSimultaneousTransfers` to state that
the "transfer" refers to multihash syncing only and not the data itself.
2022-02-03 11:51:01 +00:00
Łukasz Magiera b74e085272 don't sort 2022-02-02 19:08:21 +00:00
Darko Brdareski 008fbbd652 Add unit and integration tests for mempool 2022-02-02 17:08:50 +01:00
Anton Evangelatov c3d41d4e17 upgrade go-fil-markets 2022-02-02 16:14:44 +01:00
Anton Evangelatov faa3a79a5f use NetAddrListener iface 2022-02-02 16:01:19 +01:00
Anton Evangelatov 03dd33dbbe upgrade go-fil-markets 2022-02-02 14:07:41 +01:00
vyzo 049b48928f add note about compaction algorithm changes in README 2022-02-02 14:39:21 +02:00
vyzo 75ad0c3c2d badger markset option tweaks 2022-02-02 14:34:30 +02:00
Anton Evangelatov 79403f169e fix autogenerated docs 2022-02-02 13:18:53 +01:00
Anton Evangelatov 2790cf35af change fullnodeApi to listen addrs 2022-02-02 13:06:53 +01:00
Anton Evangelatov f9b63c5f8c add idxProvHost to StorageProvider 2022-02-02 13:03:41 +01:00
Anton Evangelatov db5e4da268 add fullnodeApi to StorageProvider 2022-02-02 13:03:41 +01:00
vyzo c1d8368fdc share a concurrent visitor between workers in markLiveRefs 2022-02-01 21:40:09 +02:00
vyzo 4b4104e400 fix comment 2022-02-01 12:10:30 +02:00
Masih H. Derkani ad348c8e2f Upgrade to the latest index provider
Upgrade to the latest index provider which rolls out a more compact ad
signature mechanism along with dependency updates.
2022-02-01 09:53:57 +00:00
vyzo b13aa8f172 unblock waitForSync on close 2022-02-01 11:30:21 +02:00
vyzo 9c92d77b64 improve robustness of waitForSync 2022-02-01 11:25:07 +02:00
vyzo cd95892bf0 fix test 2022-02-01 11:13:01 +02:00
vyzo 7b4ab2077b wait for sync in a non racey way 2022-02-01 11:10:51 +02:00
vyzo 578b5691bc check for closing after the sync wait 2022-02-01 10:59:08 +02:00
vyzo 6353fa72d8 decouple SyncGapTime from wait time 2022-02-01 10:55:15 +02:00
vyzo fd07ca87ce wait for the sync gap time befor starting the purge 2022-02-01 10:46:42 +02:00
vyzo 11ae85645b optimize single object marking in markLiveRefs 2022-02-01 09:13:21 +02:00
vyzo 3aabb0314a synchronously mark live refs on put/putmany 2022-02-01 09:07:14 +02:00
zenground0 13ccb8cbfe Stop recovery attempts after fault 2022-02-01 11:39:42 +05:30
Łukasz Magiera efdb854a7c fix some races 2022-01-31 20:53:25 +00:00
Łukasz Magiera 98f4d37f1a Merge remote-tracking branch 'origin/master' into feat/post-worker 2022-01-31 19:50:52 +00:00
vyzo 37673c6de6 downgrade marking log to debug 2022-01-31 21:44:10 +02:00
vyzo 7896af731f use walkObjectIncomplete for marking live refs 2022-01-31 21:41:42 +02:00
vyzo 877dfbe992 hold the lock in the second protect call 2022-01-31 19:21:03 +02:00
vyzo 5b9ea1b4e0 avoid races in beginCriticalSection 2022-01-31 18:48:53 +02:00
vyzo 710fda49f0 fix putmany marking 2022-01-31 17:35:30 +02:00
vyzo 2b14bda6b8 recursively mark puts during the critical section 2022-01-31 17:26:08 +02:00
vyzo 1abfc5b1cf fix comment 2022-01-31 15:00:03 +02:00
vyzo c9bd5ec452 mark tipset references to protect them during critical section 2022-01-31 14:54:23 +02:00
Łukasz Magiera 51643caf60 Merge pull request #7835 from filecoin-project/bloxico/system-test-matrix
misc: api: Annotate lotus tests according to listed behaviors
2022-01-31 12:23:09 +01:00
vyzo ee63be26a1 fix race in protectView 2022-01-31 12:40:26 +02:00
vyzo 1900c907fd account for missing refs in the markset in Has 2022-01-31 09:44:51 +02:00
vyzo a9d4495d83 use both hot and cold when doing fetches for markset positive objects 2022-01-30 22:47:20 +02:00
vyzo 7b8447a95a reinstante waitForMissingRefs 2022-01-30 19:00:52 +02:00
vyzo 7931f1f8f9 fix lint 2022-01-30 15:43:52 +02:00
vyzo 20b75022aa fix mockStore for splitstore tests 2022-01-30 15:33:30 +02:00
vyzo dbc8903bac sortless compaction 2022-01-30 15:33:15 +02:00
vyzo a4f720d866 coldset test 2022-01-30 15:11:25 +02:00
vyzo 4b8369c071 fix buffered reads 2022-01-30 15:11:18 +02:00
vyzo 72333147d3 prettier checkpoint close 2022-01-30 15:00:03 +02:00
vyzo 64cda4aeda on disk coldsets 2022-01-30 14:19:05 +02:00
vyzo 6ede77b254 checkpoint test 2022-01-30 14:10:11 +02:00
vyzo c94eee5fc3 on disk checkpoints 2022-01-30 12:47:30 +02:00
vyzo 322b85898f make markSets synchronous in critical section 2022-01-30 12:10:08 +02:00
vyzo cf09dd044a moar markset tests 2022-01-30 11:45:12 +02:00
vyzo a4c1a34163 check for existence of badger db in recover 2022-01-30 11:44:27 +02:00
vyzo d140909562 add MarkMany to MarkSet interface 2022-01-30 11:43:45 +02:00
vyzo f9fd47e7d0 use temporary dir for splitstore test path 2022-01-29 13:11:58 +02:00
vyzo 67fbf9eb00 improve peristence test 2022-01-28 15:55:34 +02:00
vyzo 730aceac6d immediately flush pending writes when entering critical section 2022-01-28 15:55:10 +02:00
vyzo 1bf396f9af add test for markset persistence 2022-01-28 15:49:41 +02:00
vyzo 45c2f34295 refactor marksets for critical section on-disk persistence 2022-01-28 15:41:33 +02:00
vyzo ff10e0eaf1 Merge pull request #7999 from filecoin-project/feat/splistore-refactors
some basic splitstore refactors
2022-01-28 13:55:16 +02:00
Aayush 40485eb88a Lotus release v1.14.0-rc5 2022-01-27 15:36:25 -05:00
Aayush 37a345b39d Update FFI 2022-01-27 15:30:01 -05:00
Darko Brdareski 6b8f526df3 Fix merge 2022-01-27 11:06:04 +01:00
Darko Brdareski e51ce5c508 Merge remote-tracking branch 'upstream/master' into bloxico/system-test-matrix 2022-01-27 10:57:56 +01:00
Darko Brdareski 8c41e17c93 Fix typo in client_test annotations 2022-01-27 10:56:33 +01:00
Masih H. Derkani 5d72ebe0cc Upgrade index-provider and update topic name
Update the topic name to be consistent with default
configured in storetheindex.

Upgrade to the latest `index-provider`.
2022-01-27 09:48:10 +00:00
vyzo f07ce297f6 optimize slice allocations in walk 2022-01-26 21:55:24 +02:00
vyzo a87239e802 avoid extraneous assignment 2022-01-26 21:48:03 +02:00
Łukasz Magiera 3e6c482229 Merge pull request #8005 from filecoin-project/feat/mpool-cache-statenonces
feat: mpool: Cache state nonces
2022-01-26 16:22:12 +01:00
Łukasz Magiera 176ecd4c3b mpool: Cache state nonces 2022-01-26 15:39:58 +01:00
Aarsh Shah 211ad166af update markets deps 2022-01-26 15:53:27 +04:00
vyzo fe47d6a1a4 fix check and warmup for parallel walk 2022-01-26 09:01:51 +02:00
Aarsh Shah 4dd93e5bbb update deps 2022-01-26 10:58:44 +04:00
vyzo 10f2445a99 use minimum of 2 workers 2022-01-25 21:37:48 +02:00
Aayush 6cc9eecc85 Lotus release v1.14.0-rc4 2022-01-25 13:28:03 -05:00
Aayush 817c155287 chore: deps: update to latest proofs 2022-01-25 13:23:00 -05:00
Aayush Rajasekaran 6e44de1e10 Update params_2k.go 2022-01-25 13:04:22 -05:00
Aayush Rajasekaran a6460be37b remove a log 2022-01-25 13:02:45 -05:00
Aayush 6b7b488e00 Lotus release v1.14.0-rc3 2022-01-25 13:02:08 -05:00
Aayush e7123d1a8e fix: sealer: correctly pipe through errors for SectorAbortUpgrade 2022-01-25 13:02:00 -05:00
Aayush 50aba9a8e6 fix: sealer: don't replica update sectors unless they have deals in them 2022-01-25 13:01:56 -05:00
Aayush 1b18236f91 feat: sealer: allow users to abort in-flight snap upgrades 2022-01-25 13:01:51 -05:00
Aayush e17ae2eaf4 fix: sealer: manager should lock Unsealed for ReplicaUpdate 2022-01-25 13:01:37 -05:00
Aayush 6d567b36e3 Fix: sealer: ReplicaUpdate should fetch the correct files 2022-01-25 13:01:27 -05:00
Aayush Rajasekaran 7b7ab016db create replica update paths in acquireSectors 2022-01-25 13:01:18 -05:00
Aayush Rajasekaran 0c9c94bad1 fix: checkReplica incorrectly returns ErrBadPR 2022-01-25 13:01:12 -05:00
Aayush Rajasekaran a3c5fadcc0 feat: sealing: Add ReplicaUpdate work to Resource table 2022-01-25 13:01:05 -05:00
Aayush Rajasekaran f1b24598f5 Merge pull request #7998 from filecoin-project/arajasek-patch-3
chore: sealer: quieten a log
2022-01-25 12:56:30 -05:00
Aayush Rajasekaran 2d0929e305 remove a log 2022-01-25 12:55:56 -05:00
vyzo 8e01e73de4 dynamically compute number of workers for parallel chain walk 2022-01-25 19:47:58 +02:00
vyzo 7c8edf5632 parallelize walkChain 2022-01-25 17:29:02 +02:00
vyzo 25284b5325 refactor: eliminate distinction between markset and markset visitors 2022-01-25 16:31:45 +02:00
Łukasz Magiera 06d2ac65b5 Merge pull request #7995 from filecoin-project/arajasek-patch-2
chore: build: make the OhSnap epoch configurable by an envvar for devnets
2022-01-25 10:51:26 +01:00
Łukasz Magiera e3888b38bb Merge pull request #7993 from filecoin-project/arajasek-patch-1
chore: chain: fix log
2022-01-25 10:50:47 +01:00
Masih H. Derkani 5da2995bcd Upgrade to index-provider v0.2.3
Upgrade index provider to latest so that on engine restart the head
advertisement is published.
2022-01-25 09:37:44 +00:00
Aayush Rajasekaran 92e6f29cc8 chore: sealer: quieten a log 2022-01-24 18:28:52 -05:00
raulk a2468656e4 Merge pull request #7996 from filecoin-project/raulk/tvx-network-version
tvx: supply network version when extracting messages.
2022-01-24 20:50:51 +00:00
Aayush Rajasekaran 0358ad83cb Update params_2k.go 2022-01-24 15:44:20 -05:00
Raúl Kripalani 3aab77af8d tvx: add missing network upgrade names. 2022-01-24 20:13:04 +00:00
Raúl Kripalani 85447abe7f tvx: supply network version when extracting messages. 2022-01-24 20:06:07 +00:00
Aayush Rajasekaran 71c6d05902 chore: chain: fix log 2022-01-24 11:18:01 -05:00
Aarsh Shah 8d062bc880 update index provider 2022-01-24 14:26:17 +04:00
Aarsh Shah 9e2d46b33f Merge remote-tracking branch 'origin/master' into feat/cid-to-piece-idx 2022-01-23 10:32:54 +04:00
Łukasz Magiera 6080431383 Merge pull request #7986 from filecoin-project/asr/more-fixes-master
fix: sealer: manager should lock Unsealed for ReplicaUpdate
2022-01-21 17:38:23 +01:00
Aayush 5cafdc2f29 fix: sealer: manager should lock Unsealed for ReplicaUpdate 2022-01-21 11:12:12 -05:00
Aayush Rajasekaran ff845aa793 Merge pull request #7977 from filecoin-project/chore/sealtasks-comment
chore: remove inaccurate comment in sealtasks
2022-01-21 10:53:04 -05:00
Łukasz Magiera 55c9271695 post workers: Test skips 2022-01-21 13:33:47 +01:00
Łukasz Magiera f148397e1b post workers: Fix race in setting vproofs 2022-01-21 12:31:24 +01:00
Łukasz Magiera 82c9e72aab post workers: Fix skipped handling 2022-01-21 10:39:14 +01:00
Łukasz Magiera cdeac2bca0 Merge pull request #7984 from filecoin-project/deps/update-libp2p
update go-libp2p to v0.18.0-rc2
2022-01-21 10:11:27 +01:00
Łukasz Magiera 4682e72cf4 Address review 2022-01-21 10:11:04 +01:00
Łukasz MagieraandAayush Rajasekaran 1e5e69ec9d Typos
Co-authored-by: Aayush Rajasekaran <arajasek94@gmail.com>
2022-01-21 10:02:00 +01:00
vyzo 6e5f521463 update go-libp2p to v0.18.0-rc2 2022-01-21 10:45:45 +02:00
Aayush Rajasekaran abdad1f6d3 Merge pull request #7983 from filecoin-project/asr/snap-paths-master
Fix: sealer: ReplicaUpdate should fetch the correct files
2022-01-20 15:21:18 -05:00
Aayush 752f4a3d67 Fix: sealer: ReplicaUpdate should fetch the correct files 2022-01-20 15:06:53 -05:00
Łukasz Magiera 550e2743d7 paych: Don't return settling/collected chennals from OutboundActiveByFromTo 2022-01-20 18:24:01 +01:00
Łukasz Magiera 8f9e730ad6 paych: Better off-chain errors 2022-01-20 18:19:27 +01:00
Łukasz Magiera 4235a97cf4 retrieval: OffChainRetrieval config 2022-01-20 18:19:27 +01:00
Łukasz Magiera 8b19b84140 paych: option to force off-chain get 2022-01-20 18:19:26 +01:00
Łukasz Magiera 5b585c0285 paych: reset fundsReqQueue correctly 2022-01-20 18:17:19 +01:00
Łukasz Magiera b0e7bc15c2 paych: Cleanup available fund logic 2022-01-20 18:17:19 +01:00
Łukasz Magiera 533349cc0d paych: Fix cli tests 2022-01-20 18:17:18 +01:00
Łukasz Magiera eab8fecd26 gen stuff 2022-01-20 18:17:17 +01:00
Łukasz Magiera 1f2621b574 Make retrieval work with reused channels 2022-01-20 18:16:00 +01:00
Łukasz Magiera ff8b95df93 paych: Reserve flag for add-funds cli 2022-01-20 18:16:00 +01:00
Łukasz Magiera 8f6f21c94c paych: Print available amounts in paych status 2022-01-20 18:16:00 +01:00
Łukasz Magiera 7a938b2dea paych: Output FIL in cli 2022-01-20 18:16:00 +01:00
Łukasz Magiera 2e76375e8a Fix paych itests 2022-01-20 18:16:00 +01:00
Łukasz Magiera 9715113898 paych: Test pre-funding 2022-01-20 18:15:59 +01:00
Łukasz Magiera 8e46b9ea5d paych: API to pre-fund channels 2022-01-20 18:15:46 +01:00
Łukasz Magiera 33dfcf2663 stores: Fix single post proof reading with updated sectors 2022-01-20 15:27:42 +01:00
Aarsh Shah 7508d96327 fix lint 2022-01-20 16:47:15 +04:00
Aarsh Shah b8bf2af3e3 upgrade on master 2022-01-20 16:34:13 +04:00
Aarsh Shah 9ee940098d Merge remote-tracking branch 'origin/master' into feat/cid-to-piece-idx 2022-01-20 16:21:48 +04:00
Łukasz Magiera e476cf7968 Merge remote-tracking branch 'origin/master' into feat/post-worker 2022-01-20 13:15:48 +01:00
Łukasz Magiera c315111bc7 Merge pull request #7969 from filecoin-project/feat/libp2p18
libp2p v0.18.0-rc1 and initial resource manager integration
2022-01-20 12:59:39 +01:00
Dirk McCormick 8a47a71772 feat: update to go-fil-markets v1.19.0 2022-01-20 11:46:17 +01:00
Łukasz Magiera b115e2879a don't defer in a loop 2022-01-20 11:19:57 +01:00
vyzo 73ec10a49e close the rcmgr on shutdown 2022-01-20 11:47:39 +02:00
vyzo 325a4c0e5b fix lint 2022-01-20 11:46:39 +02:00
vyzo b360c9403f make gen and friends 2022-01-20 11:44:01 +02:00
vyzo ca4ee1e8cf fix issues with fil-markets/data-transfer updates 2022-01-20 11:38:37 +02:00
vyzo 2e5474e864 update go-fil-markets@v0.19.0-rc1 2022-01-20 11:37:08 +02:00
vyzo 19c8ea3288 add description for net stat and limit commands 2022-01-20 11:36:11 +02:00
vyzo 6260271b78 go mod: update go-libp2p-resource-manager@v0.1.2 2022-01-20 11:36:11 +02:00
vyzo 83427c478f go mod: update go-yamux@v3.0.2 2022-01-20 11:36:11 +02:00
vyzo 0870f48b5c fix mocknet.New invocation 2022-01-20 11:36:11 +02:00
vyzo c3fb68545a fix mocknet.New invocation 2022-01-20 11:36:11 +02:00
vyzo aa599bfaf9 go mod: update go-libp2p-pubsub 2022-01-20 11:36:11 +02:00
vyzo 62c0f35b5a go mod: go-libp2p-resource-manager@v0.1.1 2022-01-20 11:36:11 +02:00
vyzo 0de1566eaf add net stat and limit cli 2022-01-20 11:36:11 +02:00
vyzo 39bf59d372 add examples to docgen 2022-01-20 11:36:11 +02:00
vyzo 554848fe6b add resource manager Net(Set)Limit api 2022-01-20 11:36:11 +02:00
vyzo d05d5bcb70 add resource manager NetStat api 2022-01-20 11:36:11 +02:00
vyzo 8d3f98fe38 instantiate resource manager in DI 2022-01-20 11:36:11 +02:00
vyzo 826cdb2186 use the libp2p connmgr 2022-01-20 11:36:11 +02:00
vyzo c394fbdfc3 go mod: go-libp2p-resource-manager 2022-01-20 11:36:11 +02:00
vyzo 2fb5837a55 go mod: go-libp2p@v0.18.0-rc1 2022-01-20 11:36:11 +02:00
Cory Schwartz 8cbf1a3e1b undo tmp edits 2022-01-19 12:30:36 -08:00
Łukasz Magiera 04ce49130a Merge pull request #7979 from filecoin-project/asr/cherry-picks
chore: merge release/v1.14.0 PRs into master
2022-01-19 18:17:21 +01:00
Aayush Rajasekaran 3ff23ecbfa :fix: checkReplica incorrectly returns ErrBadPR 2022-01-19 12:00:27 -05:00
Aayush Rajasekaran ab8bf393c2 create replica update paths in acquireSectors 2022-01-19 11:41:38 -05:00
Aayush Rajasekaran d0390181ec feat: sealing: Add ReplicaUpdate work to Resource table 2022-01-19 11:41:32 -05:00
Łukasz Magiera 2f5c036faa Merge pull request #7918 from filecoin-project/jennijuju-patch-1
chore: update PR template
2022-01-19 10:48:24 +01:00
Łukasz Magiera c41ccb6c37 chore: remove inaccurate comment in sealtasks 2022-01-19 10:46:37 +01:00
Aarsh Shah 9e40e246ec deps update 2022-01-19 11:36:07 +04:00
Cory Schwartz afac38e492 spelling 2022-01-18 17:36:44 -08:00
Cory Schwartz 1cd93e63fd edge 2022-01-18 17:35:34 -08:00
Cory Schwartz a3458213f4 Merge branch 'master' into digitalocean-use-snap 2022-01-18 17:02:41 -08:00
Aayush Rajasekaran c0f29ea9c6 Merge pull request #7966 from filecoin-project/asr/compute-state-vm
Fix: chain: create a new VM for each epoch
2022-01-18 14:11:02 -05:00
Łukasz Magiera fa09b9afb1 post workers: Share resource accounting code 2022-01-18 16:02:37 +01:00
Łukasz Magiera 7dba12fc81 Merge pull request #7967 from filecoin-project/chore/mod-comments
chore: Cleanup go.mod
2022-01-18 15:18:19 +01:00
Łukasz Magiera 95442094df Merge pull request #7959 from filecoin-project/feat/update-data-transfer-graphsync
feat(deps): update markets stack
2022-01-18 15:08:59 +01:00
Dirk McCormick 1ce1dbbc50 feat: update go-fil-markets to tagged release 2022-01-18 14:29:59 +01:00
Łukasz Magiera 8ac20305df Fix double unlock in WorkerStats 2022-01-18 12:40:04 +01:00
Łukasz Magiera 98fed009d7 docsgen 2022-01-18 12:21:30 +01:00
Łukasz Magiera c79f2b9d38 post workers: Fix lint 2022-01-18 12:11:59 +01:00
Łukasz Magiera b38141601c Untangle ffi from api 2022-01-18 11:57:04 +01:00
Łukasz Magiera 03fa955e9e Cleanup imports 2022-01-18 11:37:24 +01:00
Łukasz Magiera f41dd4feb6 gen 2022-01-18 11:28:55 +01:00
Łukasz Magiera f2496d87c9 post workers: Snapdeals updates 2022-01-18 11:25:04 +01:00
Łukasz Magiera 0c062f9c08 Merge remote-tracking branch 'origin/master' into feat/post-worker 2022-01-18 10:49:42 +01:00
Łukasz Magiera d677826312 Cleanup go.mod 2022-01-18 10:24:43 +01:00
Aayush 9ec1abf880 :Fix: create a new VM for each epoch 2022-01-17 16:28:22 -05:00
hannahhoward 92d56d82f4 feat(deps): update markets stack
update go-fil-markets, go-data-transfer 1.13.0, go-graphsync 0.12.0
2022-01-14 17:21:04 -08:00
Jennifer Wang ca444bb71d revert #7646 from v1.14.0 - this is not concensus breaking change and needs more testing before landing 2022-01-14 19:00:33 -05:00
Jennifer Wang 5f1ae545e3 add 7939 to change log 2022-01-14 18:57:57 -05:00
Aayush Rajasekaran 99d0d5019b Add missing locks to Get() 2022-01-14 18:57:57 -05:00
Aayush Rajasekaran be09474615 Apply suggestions from code review 2022-01-14 18:57:57 -05:00
Jennifer Wang a67f97e8a2 address reviews 2022-01-14 18:57:57 -05:00
Jennifer Wang 9453734434 fix the statsboard link 2022-01-14 18:57:57 -05:00
Jennifer Wang 2fde9e63cd update change log 2022-01-14 18:57:57 -05:00
Aayush Rajasekaran f628e121df Merge pull request #7957 from filecoin-project/asr/conn-mgr-revert
Use go-libp2p-connmgr v0.3.1
2022-01-14 17:57:51 -05:00
Aayush 2b29ceab83 Use go-libp2p-connmgr v0.3.1 2022-01-14 17:38:56 -05:00
Aayush Rajasekaran 51b4458d32 Resolve conflict 2022-01-14 17:18:47 -05:00
Steven Allen 9872ca7f12 correctness fixes for the autobatch blockstore
1. Simplify shutdown and make it idempotent by using a context.
2. Make sure `Flush` actually _fully_ flushes if the previous flush failed.
3. Don't clear the flush batch if flushing fails.
2022-01-14 17:17:51 -05:00
Aayush Rajasekaran 2871ed74d0 go mod tidy 2022-01-14 17:17:51 -05:00
Jiaying Wang 07e68aa064 update snap net upgrade epoch 2022-01-14 17:17:51 -05:00
Jennifer Wang 1b264d5a53 update network version for test ground 2022-01-14 17:17:51 -05:00
Jennifer Wang 03cb555d1d Update the ntwk v15 name to OhSnap 2022-01-14 17:17:51 -05:00
Jennifer Wang e097578e85 add butterfly ohsnap epoch 2022-01-14 17:17:51 -05:00
Aayush Rajasekaran b3ab3ce170 Update butterflynet params 2022-01-14 17:17:49 -05:00
Aayush Rajasekaran 84e6ba5dff Update butterflynet params 2022-01-14 17:17:36 -05:00
Jennifer Wang b7ba08476c remove power change 2022-01-14 17:15:44 -05:00
Aayush Rajasekaran aad8aa0893 Appease the linter 2022-01-14 17:15:44 -05:00
Jennifer Wang 30013c1f06 fix lint 2022-01-14 17:15:44 -05:00
Jennifer Wang 6901e998e6 Check piece before PRU2 instead of PRU1 as PRU2 is the heavy computation part 2022-01-14 17:15:44 -05:00
Jennifer Wang 8939d5982f just use checkPiece 2022-01-14 17:15:44 -05:00
Jennifer Wang a20916f9af Add more deal expiration handling for snap deals 2022-01-14 17:15:44 -05:00
Aayush Rajasekaran 107f80274c Don't lock in Get 2022-01-14 17:15:44 -05:00
Aayush Rajasekaran 4ec8fbf1ff Address review part 2 2022-01-14 17:15:44 -05:00
Aayush Rajasekaran 5b38419c5f Address review 2022-01-14 17:15:44 -05:00
Aayush Rajasekaran dafd1f77fa Support faster Get, retry flushes on error 2022-01-14 17:15:44 -05:00
Aayush Rajasekaran ce6e328d52 Use channels to trigger flushes in a dedicated goroutine 2022-01-14 17:15:44 -05:00
Aayush Rajasekaran 2bc4b35f51 implement stubs 2022-01-14 17:15:44 -05:00
Aayush Rajasekaran 031b06be77 cache added cids 2022-01-14 17:15:43 -05:00
Aayush Rajasekaran b9474cf0a2 Implement an autobatcher 2022-01-14 17:15:20 -05:00
Aayush Rajasekaran 074a4cc3e4 Update to actors v7.0.0-rc1 2022-01-14 17:15:20 -05:00
Aayush Rajasekaran 790ba155b8 Fast migration for v15 2022-01-14 17:15:15 -05:00
vyzo 0ca95a5ea0 satisfy the spellchecker that masquarades as a linter 2022-01-14 17:14:33 -05:00
vyzo 7e43bfc109 hook the upgrade schedule to splitstore start 2022-01-14 17:14:32 -05:00
vyzo 6cfee12f31 add unit test for compaction supression 2022-01-14 17:14:32 -05:00
vyzo 6ac3d529ef add logic for supressing compaction near upgrade boundaries 2022-01-14 17:14:32 -05:00
Aayush Rajasekaran e4cb68e05d format 2022-01-14 17:14:32 -05:00
Jiaying Wang 0626330d44 Update default-lotus-miner-config.toml 2022-01-14 17:14:32 -05:00
Jennifer Wang 60cf2a71cf fix lint 2022-01-14 17:14:32 -05:00
Jennifer Wang 87babdf3e7 Disable mark-for-upgrade two days before the network v15 OhSnap upgrade to avoid unexpected edge cases that may cause deal/sector failure 2022-01-14 17:14:32 -05:00
Jennifer Wang ac3bea489b Integrate proof v11.0.0 2022-01-14 17:14:32 -05:00
Aayush Rajasekaran ca57546ef5 Remove unnecessary params from VerifyWinningPost 2022-01-14 17:14:32 -05:00
Łukasz Magiera 7bd9af7856 address review 2022-01-14 17:14:32 -05:00
zenground0 5b0a0baa9a Fix hande deal recover return value bug 2022-01-14 17:14:32 -05:00
zenground0 a9a523d8c0 Fix TooManyMarkedForUpgrade 2022-01-14 17:14:32 -05:00
zenground0 c6277922ac Deflake more practically 2022-01-14 17:14:32 -05:00
zenground0 a82ac00d9a Deflake snap deals integration test 2022-01-14 17:14:32 -05:00
zenground0 d6aa17e21f Snap Deals Integration
- FSM handles the actual cc upgrade process including error states
- PoSting (winning and window) works over upgraded and upgrading sectors
- Integration test and changes to itest framework to reduce flakes
- Update CLI to handle new upgrade
- Update dependencies
2022-01-14 17:14:32 -05:00
Jennifer Wang ba816a1c13 bump the version to v1.14.0-rc1 2022-01-14 17:14:32 -05:00
Aayush Rajasekaran ceb11bfe77 Update go-paramfetch 2022-01-14 17:14:32 -05:00
Jiaying Wang c99f8a17ac Update pull_request_template.md 2022-01-14 17:14:32 -05:00
Jiaying Wang 1e03fac105 Remove ticket number from the title
issue number in PR title is not that useful because reader cannot click it and need to mention the issue in the body for auto close either way.
2022-01-14 17:14:32 -05:00
Jakub Sztandera 0b105dad97 Add gas charge for VerifyReplicaUpdate
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2022-01-14 17:14:32 -05:00
Aayush Rajasekaran 832e204ec4 Fix circsuypply calc around null blocks 2022-01-14 17:14:32 -05:00
Aayush Rajasekaran bfbd01ab15 VM: Circ supply should be constant per epoch 2022-01-14 17:14:32 -05:00
Aayush Rajasekaran 58f63ca8a2 Add a log for when message selection fails 2022-01-14 17:14:32 -05:00
Aayush Rajasekaran 012efed117 Mempool: add selection tests 2022-01-14 17:14:32 -05:00
Aayush Rajasekaran 1f1e341c36 Mempool: Selection should respect CBOR limits 2022-01-14 17:14:32 -05:00
Aayush Rajasekaran 80c9c26560 Consensus: Safety check against unknown sig types 2022-01-14 17:14:32 -05:00
Aayush Rajasekaran 011ea43496 Mempool: Selection logic should respect block message limits 2022-01-14 17:14:32 -05:00
Aayush Rajasekaran 3a8ac6dffa Update FFI 2022-01-14 17:14:32 -05:00
zenground0 d1480c36c0 RemoveData and Decode
- Unsealing replica update with sector key works and tested
- Sector key generation added and tested
2022-01-14 17:14:32 -05:00
Jiaying Wang 5c9a10617b Create pull_request_template.md
This is the very first iteration of the lotus PR template. The goal of adding PR template is to standardize PR requests and encourage contributors to:
- come up with good PR descriptions to give code reviewers a clear overview of what's in the PR 
- have a clear PR title as lotus generates a change log based on it
- check that tests and documentation for the codes that changed are icnluded 

The PR type follows the https://www.conventionalcommits.org/en/v1.0.0-beta.2/.  The [contribution guideline](https://github.com/filecoin-project/lotus#contribute) should be updated with how to create a pr after the template is accepted.
2022-01-14 17:14:32 -05:00
Jennifer Wang a93d7499d9 docs gen 2022-01-14 17:14:32 -05:00
Jennifer Wang e24b454a1f Bump the master version to v1.13.3-dev 2022-01-14 17:14:32 -05:00
zenground0 4936b4ea44 Review Response 2022-01-14 17:14:32 -05:00
zenground0 c4069824f7 WIP 2022-01-14 17:14:32 -05:00
c r 7efaa708a6 reorder transfer checks so as to ensure sending more money than you have to yourself fails with an error (fixing issue 7596)
PR #7637, also adds tests to make sure behavior is correct across versions.
2022-01-14 17:14:32 -05:00
zenground0 93656e65f8 WIP sector storage and integration test 2022-01-14 17:14:32 -05:00
Aayush Rajasekaran 3a7c364562 Address review 2022-01-14 17:14:32 -05:00
Aayush Rajasekaran c0bb554d8d Update actors 2022-01-14 17:14:32 -05:00
Aayush Rajasekaran 073b7b4ff5 Update FFI 2022-01-14 17:14:32 -05:00
Aayush Rajasekaran 393d8541e2 Update deps 2022-01-14 17:14:32 -05:00
Aayush Rajasekaran 1ef780d96f Plug in the FFI call 2022-01-14 17:14:32 -05:00
Aayush Rajasekaran a8cb027c08 Integrate v7 actors 2022-01-14 17:14:32 -05:00
Łukasz Magiera 4a874eff70 post workers: Cleanup, tests 2022-01-14 14:17:52 +01:00
Peter Rabbitson e3c250f240 Force float in output to remain decimal 2022-01-14 13:17:45 +01:00
Cory Schwartz 899db1f7c3 fix template 2022-01-14 03:07:20 -08:00
Cory Schwartz d9562e2aee restore appiamge 2022-01-14 03:01:12 -08:00
Peter Rabbitson d568d6fabc As per Why&Aayush: slashing deals is not really a thing 2022-01-13 20:03:33 +01:00
c r da6752eccb feat: #7747 sealing: Adding conf variable for capping number of concurrent unsealing jobs (#7884)
* adding the new variables- now time for logic

* putting parameters into right placeS

* adding unsealing throttle

* fixing linter issues

* removing one last thing...
2022-01-13 12:26:13 -06:00
Peter Rabbitson 9a5b13b7c8 Storage stats 2.0 2022-01-13 17:21:13 +01:00
Aarsh Shah 8459d75597 update index provider config 2022-01-13 16:15:43 +04:00
Aarsh Shah b780a64ed9 send markets multiaddrs to the engine 2022-01-13 15:31:15 +04:00
Jiaying Wang 60fae3a59d Merge pull request #7922 from filecoin-project/build/15dev
build: release: bump master version to v1.15.0-dev
2022-01-12 20:11:02 -05:00
Jennifer Wang c1d04a9d13 bump master version to v1.15.0-dev 2022-01-12 19:28:08 -05:00
Aayush Rajasekaran 424c27bada Merge pull request #7932 from filecoin-project/ntwk-butterfly-snapnet
feat: build: butterfly SNAPNET
2022-01-12 19:24:31 -05:00
Aayush Rajasekaran 3c57b980e5 Merge pull request #7940 from filecoin-project/steb/buffered-blockstore-correctness
correctness fixes for the autobatch blockstore
2022-01-12 19:17:03 -05:00
Aayush Rajasekaran 52411b12e3 Resolve conflict 2022-01-12 19:15:56 -05:00
Aayush Rajasekaran 6f8d00310b Merge branch 'master' into ntwk-butterfly-snapnet 2022-01-12 19:12:02 -05:00
Aayush Rajasekaran f955084572 Merge pull request #7871 from filecoin-project/jen/7869
fix: #7869 sealing: Add more deal expiration checks during PRU pipeline
2022-01-12 18:50:50 -05:00
Aayush Rajasekaran d923620d5a go mod tidy 2022-01-12 18:49:24 -05:00
Steven Allen 2a862d497f correctness fixes for the autobatch blockstore
1. Simplify shutdown and make it idempotent by using a context.
2. Make sure `Flush` actually _fully_ flushes if the previous flush failed.
3. Don't clear the flush batch if flushing fails.
2022-01-12 15:19:44 -08:00
Aayush Rajasekaran bda4e5be95 Appease the linter 2022-01-12 18:10:07 -05:00
Aayush Rajasekaran ae12c70afe Merge pull request #7939 from filecoin-project/asr/migration-autobatch
fix: blockstore: Add missing locks to autobatch::Get()
2022-01-12 17:55:31 -05:00
Aayush Rajasekaran efe9ec4906 Add missing locks to Get() 2022-01-12 17:22:54 -05:00
Aayush Rajasekaran b161f56bd2 Merge pull request #7933 from filecoin-project/asr/migration-autobatch
feat: state: Fast migration for v15
2022-01-12 17:17:49 -05:00
Aayush Rajasekaran 3464dc2fdf Don't lock in Get 2022-01-12 16:04:47 -05:00
Aayush Rajasekaran 893998cb70 Address review part 2 2022-01-12 15:03:34 -05:00
Aayush Rajasekaran 083c5b003c Address review 2022-01-12 12:57:34 -05:00
Clint Armstrong 5120d8481a allow overriding worker hostname with environment variable
Signed-off-by: Clint Armstrong <clint@clintarmstrong.net>
2022-01-12 12:20:52 -05:00
Aarsh Shah 8c8652e7bb add a new cli 2022-01-12 18:06:48 +04:00
Aarsh Shah 051d993d62 update markets 2022-01-12 17:48:12 +04:00
Aarsh Shah 07c842d6e0 lotus soup green 2022-01-12 17:43:56 +04:00
Aarsh Shah b9d3585f4c get tests working 2022-01-12 16:55:45 +04:00
Aarsh Shah 05afaf6094 make gen 2022-01-12 16:03:39 +04:00
Aarsh Shah 3a52f05692 green ci 2022-01-12 15:53:15 +04:00
Aarsh Shah 64bf3fccd2 update index provider dep 2022-01-12 15:05:27 +04:00
Aarsh Shah dec79c70a1 fix compilation 2022-01-12 15:03:46 +04:00
Aarsh Shah 21a8f71859 compiles 2022-01-12 14:59:09 +04:00
Aarsh Shah edfc2c215c Merge remote-tracking branch 'origin/main' into feat/cid-to-piece-idx 2022-01-12 12:48:54 +04:00
Jiaying Wang 16d491a134 update snap net upgrade epoch 2022-01-11 21:41:58 -05:00
Aayush Rajasekaran 7559e4311e Support faster Get, retry flushes on error 2022-01-11 20:30:34 -05:00
Aayush Rajasekaran a41b4acec3 Use channels to trigger flushes in a dedicated goroutine 2022-01-11 19:44:56 -05:00
Jennifer Wang fd50cd128a fix lint 2022-01-11 18:34:26 -05:00
Jennifer Wang e99b98873c Check piece before PRU2 instead of PRU1 as PRU2 is the heavy computation part 2022-01-11 18:34:20 -05:00
Jennifer Wang 6b953a03d0 just use checkPiece 2022-01-11 18:34:15 -05:00
Jennifer Wang 37a3e610b7 Add more deal expiration handling for snap deals 2022-01-11 18:34:10 -05:00
Aayush Rajasekaran f87d8d0b7f Merge pull request #7900 from filecoin-project/7891
enhancement: #7891 sectors: disable existing existing cc upgrade path 2 days before the upgrade epoch
2022-01-11 18:12:16 -05:00
Jiaying Wang a95b77a940 Merge pull request #7931 from filecoin-project/jen/proof
feat: param: add temp snap params
2022-01-11 18:08:50 -05:00
Aayush Rajasekaran 5ff6148444 implement stubs 2022-01-11 18:03:37 -05:00
Jiaying Wang 0130b28879 Merge pull request #7923 from filecoin-project/jen/proofv11
chore: deps: Integrate proof v11.0.0
2022-01-11 17:49:43 -05:00
Jennifer Wang 4cdd830003 update network version for test ground 2022-01-11 17:46:49 -05:00
Jennifer Wang f1425dcb26 go mod tidy 2022-01-11 17:43:03 -05:00
Jennifer Wang cd8d3a0c88 Update the ntwk v15 name to OhSnap 2022-01-11 17:41:20 -05:00
Jennifer Wang 8729ee4fa2 add butterfly ohsnap epoch 2022-01-11 17:37:06 -05:00
Aayush Rajasekaran 544cfa63ab cache added cids 2022-01-11 17:22:36 -05:00
Jiaying Wang 0b9a2cc11c Merge branch 'master' into ntwk-butterfly-snapnet 2022-01-11 17:22:16 -05:00
Aayush Rajasekaran 25768a291e Implement an autobatcher 2022-01-11 17:20:10 -05:00
Aayush Rajasekaran 19bd9cf945 Update to actors v7.0.0-rc1 2022-01-11 17:20:08 -05:00
Aayush Rajasekaran 8aabe1b488 Fast migration for v15 2022-01-11 17:19:38 -05:00
Jiaying Wang 3a0f80da74 Merge pull request #7899 from filecoin-project/asr/butterfly
build: butterflynet: update genesis and bootstrappers
2022-01-11 17:06:14 -05:00
Jennifer Wang edd3486d2c add temp snap params 2022-01-11 17:01:15 -05:00
TheMenko 5911780735 remove test files since they have been split to other PR 2022-01-11 19:55:54 +01:00
Aayush Rajasekaran 1e24ef4d0d format 2022-01-11 12:50:34 -05:00
Aayush Rajasekaran 207d33eaba Merge pull request #7810 from filecoin-project/feat/snap-deals
Snap Deals Lotus Integration: FSM Posting and integration test
2022-01-11 12:46:55 -05:00
Aayush Rajasekaran d645c5fbab Remove unnecessary params from VerifyWinningPost 2022-01-11 12:06:39 -05:00
Łukasz Magiera 960759d22b address review 2022-01-11 17:31:27 +01:00
Jennifer Wang 5b7da270c9 Integrate proof v11.0.0 2022-01-10 23:45:04 -05:00
Jiaying Wang 58edb1b15d remove log change 2022-01-10 22:24:25 -05:00
Jiaying Wang 655051ef98 Update default-lotus-miner-config.toml 2022-01-10 22:23:55 -05:00
Jiaying Wang 93653d9a58 Merge branch 'feat/snap-deals' into 7891 2022-01-10 22:22:46 -05:00
TheMenko 492fb9d054 wallet basic tests with annotations for system test matrix 2022-01-11 02:16:53 +01:00
Aayush Rajasekaran 4e16d600b0 Merge pull request #7917 from filecoin-project/asr/params
chore: deps: Update go-paramfetch
2022-01-10 19:30:53 -05:00
Jiaying Wang fa8372a83b Update pull_request_template.md
- remove misc, can use chore instead
- add deps for area
2022-01-10 19:07:54 -05:00
Aayush Rajasekaran 9614f6db8d Update go-paramfetch 2022-01-10 19:03:26 -05:00
Łukasz Magiera e216aefd23 fix make gen 2022-01-10 18:24:00 +01:00
Łukasz Magiera cf7dd36829 Merge branch 'feat/decoupling-post-worker' of github.com:wusirdcenter/lotus into feat/decoupling-post-worker 2022-01-10 15:06:04 +01:00
Łukasz Magiera 3fb71cdfea Merge pull request #7897 from filecoin-project/feat/snap-gas
feat: #7880 gas: add gas charge for VerifyReplicaUpdate
2022-01-10 13:27:59 +01:00
Łukasz Magiera a01f5d4495 Merge pull request #7910 from filecoin-project/jen/releasetomaster
misc: build: v1.13.2 back to master
2022-01-10 13:26:25 +01:00
zenground0 d16c5d0e93 Fix hande deal recover return value bug 2022-01-10 15:47:20 +05:30
zenground0 825e2c9527 doscgen cli 2022-01-10 15:39:38 +05:30
zenground0 c309686679 Fix TooManyMarkedForUpgrade 2022-01-10 15:39:38 +05:30
zenground0 3dc3f55ecb Deflake more practically 2022-01-10 15:39:38 +05:30
zenground0 f59bfd65da Deflake snap deals integration test 2022-01-10 15:39:38 +05:30
zenground0 33f2d24f54 Snap Deals Integration
- FSM handles the actual cc upgrade process including error states
- PoSting (winning and window) works over upgraded and upgrading sectors
- Integration test and changes to itest framework to reduce flakes
- Update CLI to handle new upgrade
- Update dependencies
2022-01-10 15:39:38 +05:30
Jennifer Wang 03a4316dcd Merge branch 'releases' into jen/releasetomaster 2022-01-09 23:26:27 -05:00
Jiaying Wang f9db71ee12 Merge pull request #7908 from filecoin-project/release/v1.13.2
build: release: v1.13.2
2022-01-09 23:12:14 -05:00
Jiaying Wang 62a85e60a7 Merge pull request #7907 from filecoin-project/build/v1.13.2prep
build: release: v1.13.2 prep
2022-01-09 23:00:59 -05:00
Jiaying Wang 4cb5622d18 Merge pull request #7903 from filecoin-project/fix/conformance-bleeding-edge
FIX: #7904 CI: generated vectors from v7 for bleeding edge
2022-01-09 23:00:06 -05:00
Jiaying Wang 4abcdd80bf Merge pull request #7902 from filecoin-project/jennijuju-patch-1
misc: docs: remove issue number from the pr title
2022-01-09 22:49:58 -05:00
Jennifer Wang 6ce9f232dc update changelog 2022-01-09 22:47:41 -05:00
Jennifer Wang 20d1a5db70 bump the version to v1.13.2 2022-01-09 22:39:09 -05:00
Jennifer Wang d46ee7c89b add changelog 2022-01-09 22:32:59 -05:00
zenground0 d2abc409f9 Fix template 2022-01-09 21:20:05 -05:00
zenground0 5f9e7c4ff4 generated vectors from v7 for bleeding edge 2022-01-09 21:20:00 -05:00
zenground0 4963fe7809 Fix template 2022-01-09 09:41:53 +05:30
zenground0 a64cf77e84 generated vectors from v7 for bleeding edge 2022-01-09 09:33:07 +05:30
Jiaying Wang 57fa377730 Update pull_request_template.md 2022-01-07 19:02:51 -05:00
Jiaying Wang d4f46122f7 Remove ticket number from the title
issue number in PR title is not that useful because reader cannot click it and need to mention the issue in the body for auto close either way.
2022-01-07 19:01:32 -05:00
Jennifer Wang bf23e59900 fix lint 2022-01-07 18:24:57 -05:00
Jennifer Wang c578efaabd Disable mark-for-upgrade two days before the network v15 OhSnap upgrade to avoid unexpected edge cases that may cause deal/sector failure 2022-01-07 18:05:36 -05:00
Aayush Rajasekaran a98ca86a45 Update butterflynet params 2022-01-07 16:54:15 -05:00
zenground0 b26d952d09 Deflake more practically 2022-01-07 22:20:49 +05:30
Jakub Sztandera 736fb5c5b0 Add gas charge for VerifyReplicaUpdate
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2022-01-07 15:18:08 +01:00
Jennifer Wang a777cf7166 remove power change 2022-01-07 00:37:14 -05:00
Aayush Rajasekaran 6ff889c8d6 Merge pull request #7890 from filecoin-project/asr/circsupply-fix
Fix: state: circsuypply calc around null blocks
2022-01-06 15:48:09 -05:00
Jiaying Wang 3f9849a63b Merge pull request #7892 from filecoin-project/jen/rmapp100
build: release: v1.13.2-rc7 fix: remove app image from the bundle script
2022-01-05 19:42:50 -05:00
Jennifer Wang 09cd258780 lotus v1.13.2-rc7 2022-01-05 19:27:00 -05:00
Jennifer Wang 7d65a2664d remove from the bundlde 2022-01-05 19:27:00 -05:00
Jiaying Wang d29e3afc28 Merge pull request #7882 from filecoin-project/jen/rmapp
build: release: v1.13.2-rc6 fix: publish ci job
2022-01-05 18:35:20 -05:00
Aayush Rajasekaran 5ec5ebac31 Fix circsuypply calc around null blocks 2022-01-05 14:17:40 -05:00
mz-sirius 793b5c7cc3 fix ci err 2022-01-05 21:41:21 +08:00
zenground0 237d0bb1b0 Deflake snap deals integration test 2022-01-05 08:24:46 -05:00
zenground0 61e173215b Snap Deals Integration
- FSM handles the actual cc upgrade process including error states
- PoSting (winning and window) works over upgraded and upgrading sectors
- Integration test and changes to itest framework to reduce flakes
- Update CLI to handle new upgrade
- Update dependencies
2022-01-05 03:10:31 -05:00
Jennifer Wang ff949d84ad v1.13.2-rc6 prep 2022-01-04 17:58:18 -05:00
Jennifer Wang 6b0868089b stop publishing appimagine since its disabled by #7707 2022-01-04 17:57:57 -05:00
Łukasz Magiera 6f316cddbb Merge pull request #7881 from filecoin-project/raulk/fix/test-vector-runner
test vector runner fixes for v6 vectors
2022-01-04 22:46:10 +01:00
Jiaying Wang 2474c0b633 Merge pull request #7817 from filecoin-project/jen/things
build: release: v1.13.2-rc5
2022-01-04 16:33:13 -05:00
Raúl Kripalani 75d8c52004 tvx runner: exec: add support for multiple-level dirs. 2022-01-04 18:13:24 +00:00
mz-sirius 6867f017ec update ffi 2022-01-05 01:50:53 +08:00
mz-sirius 3fd55fa56b decoupling winningpost and windowpost from lotus-miner 2022-01-05 01:50:49 +08:00
Raúl Kripalani 572114b8ba Merge branch 'master' into raulk/fix/test-vector-runner 2022-01-04 17:34:16 +00:00
Raúl Kripalani 1215f26a84 tvx runner: improve error reporting. 2022-01-04 17:32:57 +00:00
Raúl Kripalani d4fa5a0f1d tvx runner: adjust gas pricing to cope with synthetic epochs. 2022-01-04 17:32:57 +00:00
Raúl Kripalani 2c3d0d826d tvx runner: use network version from variant. 2022-01-04 17:23:17 +00:00
Łukasz Magiera 100e198eb3 Merge pull request #7667 from filecoin-project/asr/shed-balances
Shed: Add a util to send a batch of messages
2022-01-04 17:15:13 +01:00
Łukasz Magiera 63d7ca328f Merge branch 'master' into asr/shed-balances 2022-01-04 16:52:37 +01:00
Łukasz Magiera b72b12a960 Merge pull request #7802 from filecoin-project/snapcraft-grade-no-develgrade
Snapcraft grade no develgrade
2022-01-04 11:14:28 +01:00
Łukasz Magiera 0523c946f9 Merge pull request #7851 from zl03jsj/fix/goc-gen-slice
fix: doc generation struct slice example value
2022-01-04 10:34:23 +01:00
zl 4172a3c8b7 ExampleValue for a silce is nil 2022-01-04 14:27:10 +08:00
Łukasz Magiera 9b11c4b319 Merge pull request #7852 from pefish/patch-1
fix: returned error not be accept correctly
2022-01-03 19:57:43 +01:00
emad22552 135186e33d go fmt ./client.go 2022-01-02 19:08:22 +03:30
pefish f82a262ffe Update wdpost_run.go 2021-12-29 17:37:37 +08:00
llifezou 4b685c5e26 Include worker name in sealing errors 2021-12-23 17:44:43 +08:00
Jiaying Wang 921fda94c7 Merge pull request #7759 from filecoin-project/feat/transfer-diagnostics
Add api for transfer diagnostics
2021-12-22 17:07:54 -05:00
hannahhoward 1078dff3a9 feat(storageminer): also list data transfers with no id 2021-12-22 13:41:56 -08:00
hannahhoward 8a923fb420 fix(storageminer): fix conditional 2021-12-22 13:41:56 -08:00
hannahhoward ced22687eb fix(cmd): fix cli peer decoding 2021-12-22 13:41:56 -08:00
hannahhoward 177282d9f9 fix(storageminer): lint/mod-tidy/extra checks 2021-12-22 13:41:55 -08:00
hannahhoward cddf63efe9 feat(storageminer): add api for transfer diagnostics
Add API + CLI for inspecting in depth diagnostics on graphsync transfers with a given peer
2021-12-22 13:41:29 -08:00
Aayush Rajasekaran 1bc987772c Merge pull request #7818 from filecoin-project/asr/vm-nvfactor
Refactor: VM: Remove the NetworkVersionGetter
2021-12-21 12:19:53 -05:00
Łukasz Magiera c755ceeffa Merge pull request #7812 from filecoin-project/feat/retry-ap-seek-start
fix: #7577 markets: When retrying Add Piece, first seek to start of reader
2021-12-21 18:06:47 +01:00
Dirk McCormick 6db8a862bb feat: update to go-fil-markets v1.14.1 2021-12-21 16:36:47 +01:00
Dirk McCormick 6311e53a76 feat: update to go-fil-markets v1.14.0 2021-12-21 11:23:38 +01:00
Łukasz Magiera ef65ddf351 Merge pull request #7814 from filecoin-project/feat/retrieval-ask-cli
feat: #6017 market: retrieval ask CLI command
2021-12-20 18:04:21 +01:00
Darko Brdareski a54ac2ef79 Remove FS, MEM, GAS leftover test anotations. 2021-12-20 17:00:01 +01:00
Darko Brdareski 86cf17c1f4 Remove bad annotation from gas_test.go 2021-12-20 16:51:09 +01:00
Łukasz Magiera daa2d89ef5 Merge pull request #7831 from shotcollin/master
misc: n/a sealing: Fix grammatical error in a log warning message
2021-12-20 16:03:58 +01:00
Dirk McCormick 0e53275d40 feat: retrieval-ask - if size param is zero use QueryOffer.Size 2021-12-20 16:03:03 +01:00
Darko Brdareski dda1a42a2a Merge branch 'bloxico/system-test-matrix' of https://github.com/filecoin-project/lotus into merge_lotus 2021-12-20 15:48:16 +01:00
shotcollin a259c7bd75 Merge pull request #1 from shotcollin/typo-fixes
fix typo in log warning
2021-12-19 17:10:39 -07:00
shotcollin d10d0a20b1 fix typo in log warning
very minor but this warning comes up a lot so it'd be nicer if it wasn't a grammatical error too
2021-12-19 17:07:11 -07:00
Cory Schwartz 70b8557b63 tmp, don't stop 2021-12-17 18:12:23 -08:00
Cory Schwartz 0e7e252951 set +e before cleanup 2021-12-17 18:07:54 -08:00
Cory Schwartz d53a9e877a cleanup script 2021-12-17 17:49:32 -08:00
Cory Schwartz a03e9e34ab reinstall snapd 2021-12-17 17:30:23 -08:00
Cory Schwartz d874c633d7 set -e after switch user 2021-12-17 17:14:53 -08:00
Cory Schwartz dedf46ed1f use correct snap name 2021-12-17 17:12:10 -08:00
Cory Schwartz d42f7e4a1c packer snap 2021-12-17 17:06:32 -08:00
Aayush Rajasekaran dd20829dbe Merge pull request #7762 from filecoin-project/feat/sectors-update-state-guard
sectors update-state checks if sector exists before changing its state
2021-12-17 19:21:26 -05:00
Aayush Rajasekaran 670bd993f3 Refactor: VM: Remove the NetworkVersionGetter 2021-12-17 19:14:21 -05:00
Aayush Rajasekaran 6f6f5d79fb Refactor: State: Let Rand get network versions 2021-12-17 18:54:17 -05:00
Aayush Rajasekaran 3f4eaa99d5 Refactor: State: Rename stmgr::GetNtwkVersion to GetNetworkVersion 2021-12-17 18:43:39 -05:00
Aayush Rajasekaran 94e1a833d6 Merge pull request #7816 from filecoin-project/asr/rand-refactor
refactor: state: Move randomness versioning out of the VM
2021-12-17 15:57:10 -05:00
Jennifer Wang eabb9639a3 v1.13.2-rc5 prep 2021-12-17 15:02:42 -05:00
gstuart 27e48d73dd Check if sector exists before changing its state 2021-12-17 14:32:18 -05:00
Aayush Rajasekaran aa1b770974 Rand: Refactor so that versioning lives in StateRand 2021-12-17 13:58:53 -05:00
Dirk McCormick bb56e97177 fix: rename query-retrieval-ask to retrieval-ask 2021-12-17 18:01:12 +01:00
dirkmcandŁukasz Magiera 0f22d51309 Update cli/client.go
Co-authored-by: Łukasz Magiera <magik6k@users.noreply.github.com>
2021-12-17 17:54:32 +01:00
Dirk McCormick b1734f84b3 feat: retrieval ask CLI command 2021-12-17 15:55:12 +01:00
Dirk McCormick 839fc8df7d fix: when retrying Add Piece, first seek to start of reader 2021-12-17 14:44:51 +01:00
Łukasz Magiera a4728d3c72 Merge pull request #7578 from filecoin-project/rvagg/SimultaneousTransfersForStoragePerClient
feat(graphsync): allow setting of per-peer incoming requests for miners
2021-12-17 14:27:15 +01:00
Łukasz Magiera 6806bff57b Merge pull request #7646 from filecoin-project/deps/update-ctx-dsbs
updating to new datastore/blockstore code with contexts
2021-12-17 13:50:46 +01:00
Łukasz Magiera 66f8f8aff2 fix shed 2021-12-17 13:05:44 +01:00
Łukasz Magiera bc384c01e3 Merge remote-tracking branch 'origin/master' into deps/update-ctx-dsbs 2021-12-17 13:01:22 +01:00
vyzo 976a3a5e7b fix blockstore test contexts 2021-12-17 13:44:05 +02:00
Łukasz Magiera 122b319520 don't update ffi 2021-12-17 11:45:40 +01:00
Łukasz Magiera 29d5976c01 Merge pull request #7774 from filecoin-project/asr/shed-pieces
Shed: Add a util to list terminated deals
2021-12-17 11:26:01 +01:00
vyzo cd266a05d2 fix tests 2021-12-17 12:04:04 +02:00
vyzo 6ba2533e2b fix lotus-shed 2021-12-17 11:47:28 +02:00
vyzo dd327f0b22 plumb more contexts 2021-12-17 11:42:09 +02:00
Aayush Rajasekaran 927448601c Merge pull request #7811 from filecoin-project/asr/vm-circ
VM: Circ supply should be constant per epoch
2021-12-17 01:03:26 -05:00
Aayush Rajasekaran 1f04cc1f23 VM: Circ supply should be constant per epoch 2021-12-17 00:29:55 -05:00
Cory Schwartz cfb6aca9a4 restore .circleci 2021-12-17 00:09:12 -05:00
Cory Schwartz c37271422b try stable 2021-12-17 00:09:07 -05:00
Cory Schwartz 975090256d tmp: publish to snapcraft edge 2021-12-17 00:09:00 -05:00
Cory Schwartz cbf308a01d remove devel grade 2021-12-17 00:08:53 -05:00
Jiaying Wang ec6580d840 Merge pull request #7726 from filecoin-project/jen/pull-request-template
chore: create pull_request_template.md
2021-12-17 00:07:01 -05:00
Rod Vagg 9e7d9affbe feat(graphsync): allow setting of per-peer incoming requests for miners 2021-12-17 15:04:16 +11:00
Jiaying Wang 52fbee6749 Update .github/pull_request_template.md 2021-12-16 23:01:03 -05:00
Jiaying Wang 0f0a70e251 Update .github/pull_request_template.md 2021-12-16 23:00:58 -05:00
Jennifer Wang fac769ff17 i forced pushed and brought a bug that was fixed back so im fixing it back 2021-12-16 22:25:00 -05:00
Aayush Rajasekaran 690be5bf7f Merge pull request #7321 from filecoin-project/asr/msg-limit
Mempool msg selection should respect block message limits
2021-12-16 22:13:07 -05:00
Aayush Rajasekaran 1d8de2791a Merge pull request #7784 from filecoin-project/next
Merge v15 work into master
2021-12-16 22:12:14 -05:00
Darko Brdareski 3e32aa896c Annotate client storage deals feature 2021-12-16 14:36:02 +01:00
Cory Schwartz 65ecca2904 restore .circleci 2021-12-15 15:54:40 -08:00
Aayush Rajasekaran 62de84d5b6 Deps: Update drand to 1.3.0 2021-12-15 18:34:21 -05:00
Cory Schwartz 2f30322a4e try stable 2021-12-15 15:01:42 -08:00
Cory Schwartz 145c862ee0 tmp: publish to snapcraft edge 2021-12-15 14:49:56 -08:00
Cory Schwartz bd1bec5c93 remove devel grade 2021-12-15 14:48:19 -08:00
Darko Brdareski 2f1f35cc71 Annotate storage miner features 2021-12-15 15:30:42 +01:00
Darko Brdareski be1123b5df Merge branch 'wallet_tests_stm' 2021-12-15 12:28:06 +01:00
TheMenko 5ccb4586b5 add header annotations 2021-12-15 12:27:19 +01:00
TheMenko d8d708704d Merge branch 'msgpool_tests_stm'
message pool tests
2021-12-15 12:20:57 +01:00
TheMenko 063eefe896 Merge branch 'wallet_tests_stm'
wallet tests
2021-12-15 12:20:22 +01:00
TheMenko 65819140dd annotated tests for messagepool 2021-12-15 00:56:05 +01:00
Aayush Rajasekaran 0e2278cc76 Merge branch 'master' into deps/update-ctx-dsbs 2021-12-14 18:08:29 -05:00
Aayush Rajasekaran bdd56d2516 Deps: Update go-car to v0.3.3 2021-12-14 18:06:28 -05:00
Aayush Rajasekaran 7fb590208c Deps: Update lotus-soup to point to tagged releases 2021-12-14 18:05:52 -05:00
Aayush Rajasekaran 02b00c025a Deps: Update go-fil-markets to v1.13.5 2021-12-14 17:55:55 -05:00
Aayush Rajasekaran 8935c4386c Deps: Update go-ipld-cbor to v0.0.6 2021-12-14 17:53:11 -05:00
Aayush Rajasekaran bcd2c71031 Deps: Update go-storedcounter to v0.1.0 2021-12-14 17:51:49 -05:00
Aayush Rajasekaran 69495f5b59 Deps: Update dagstore to v0.4.4 2021-12-14 17:50:18 -05:00
Aayush Rajasekaran 3f703ff8a4 Deps: Update go-car/v2 to v2.1.1 2021-12-14 16:54:22 -05:00
Aayush Rajasekaran 46d8ae47dc Deps: Update go-ipld-prime to v0.14.3 2021-12-14 16:41:34 -05:00
Aayush Rajasekaran 5bc4ee257f Deps: Update go-ds-badger2 to v0.1.2 2021-12-14 16:33:38 -05:00
Aayush Rajasekaran aac6d88f72 Deps: Update actors v2 to v2.3.6 2021-12-14 12:49:18 -05:00
vyzo f00698aafd fix more paychmgr tests 2021-12-14 19:01:51 +02:00
vyzo e1634128c1 fix paychmgr test 2021-12-14 18:48:17 +02:00
Aayush Rajasekaran a3ea3ad911 Deps: Update actors v2 2021-12-14 11:39:06 -05:00
vyzo 0eec00055f fix lotus-soup build 2021-12-14 18:23:43 +02:00
vyzo e8df325796 update lotus-soup deps 2021-12-14 18:23:33 +02:00
Darko Brdareski ec8baf23d8 Annotate message signer subsystem 2021-12-14 17:21:01 +01:00
vyzo 63487e1d69 fix checkpoint test 2021-12-14 18:05:23 +02:00
vyzo a0353c8627 fix messagepool selection test 2021-12-14 18:01:34 +02:00
vyzo 6ecbcebd44 fix messagepool repub test 2021-12-14 17:57:37 +02:00
Darko Brdareski 0f83a0a634 Annotate paych tests 2021-12-14 16:56:16 +01:00
vyzo e6a8c278f5 fix messagepool test mock provider 2021-12-14 17:53:31 +02:00
vyzo 780dfa0c7c fix ReorgOps incantation in events test 2021-12-14 17:49:34 +02:00
vyzo 5e692f9071 fix more tests 2021-12-14 17:45:38 +02:00
vyzo 40c61a310f fix splitstore test 2021-12-14 17:17:30 +02:00
vyzo 22ce395130 fix some unit tests 2021-12-14 17:05:10 +02:00
vyzo 716b4a3b09 hook a great context in the sky to satisfy DI; sigh... 2021-12-14 16:57:09 +02:00
vyzo eb48dc9b68 fix issues with new peerstore constructor signature in DI 2021-12-14 16:21:55 +02:00
vyzo fc7d4a13b0 fix itests 2021-12-14 16:06:59 +02:00
vyzo 73ca65a6ff update drand 2021-12-14 15:55:00 +02:00
vyzo f157ac9b68 update for new ConnManager constructor 2021-12-14 15:30:29 +02:00
vyzo 773f896bcd update go-libp2p-connmgr to v0.3 2021-12-14 15:27:34 +02:00
vyzo 0001a6bad0 update go-libp2p to v0.17 2021-12-14 15:26:15 +02:00
Darko Brdareski a64f2421d2 Annotate 'incoming' subsystem 2021-12-14 11:33:33 +01:00
Aayush Rajasekaran 8a42462271 Merge pull request #7781 from filecoin-project/asr/update-ffi
Update FFI
2021-12-13 18:38:17 -05:00
Aayush Rajasekaran b08bf32040 Add a log for when message selection fails 2021-12-13 18:31:31 -05:00
Aayush Rajasekaran a45803d8a0 Mempool: add selection tests 2021-12-13 18:28:05 -05:00
Aayush Rajasekaran ec00e73c9d Mempool: Selection should respect CBOR limits 2021-12-13 18:28:05 -05:00
Aayush Rajasekaran dd20cb7301 Consensus: Safety check against unknown sig types 2021-12-13 18:28:05 -05:00
Aayush Rajasekaran ac3cdf75fa Mempool: Selection logic should respect block message limits 2021-12-13 18:28:05 -05:00
Aayush Rajasekaran 3e288f1066 Update FFI 2021-12-13 15:47:17 -05:00
Aayush Rajasekaran 80d5e52923 Merge branch 'master' into next 2021-12-13 13:24:28 -05:00
Dirk McCormick a51b08e386 feat: add IndexerProvider AnnounceAddress config 2021-12-13 18:24:05 +01:00
Masih H. Derkani 6b7b9793ab Set default index provider ingest config values
Set default values for index-provider ingest config.

Leave a TODO to use provider config APIs once defaults exposed.

Run `go mod tidy`
2021-12-13 14:44:56 +00:00
vyzo e4233e45be plumb contexts in lotus-sim 2021-12-13 15:15:38 +02:00
vyzo 47bac4a0c9 plumb context in tvx 2021-12-13 15:03:54 +02:00
vyzo b31480232b plumb contexts in conformance 2021-12-13 14:59:52 +02:00
vyzo 73c7e9edf1 go mod tidy 2021-12-13 14:47:01 +02:00
vyzo 5eb5fcd0f4 fix lotus-bench 2021-12-13 14:46:49 +02:00
Darko Brdareski fbcb05388e Remove last bad annotations 2021-12-13 13:44:15 +01:00
Darko Brdareski 0addca1070 Fix bad annotations 2021-12-13 13:41:04 +01:00
vyzo a8fcaeb141 plumb contexts in lotus-shed 2021-12-13 14:35:24 +02:00
vyzo 2e057b8f52 plumb contexts in lotus-miner 2021-12-13 14:28:29 +02:00
vyzo 84710cf27e plumb more contexts in lotus 2021-12-13 14:26:59 +02:00
vyzo 7ed40c1ec7 go get drand@release/v1.3 2021-12-13 14:17:05 +02:00
vyzo 97a91f23f1 update go-ds-measure and go-filestore 2021-12-13 14:12:14 +02:00
Darko Brdareski 5065626984 Merge remote-tracking branch 'origin/wallet_tests_stm' into syncer_tests 2021-12-13 11:17:03 +01:00
TheMenko 15263bc0d7 basic tests for local and multi wallets 2021-12-13 11:16:06 +01:00
Jennifer Wang 8c4c2eeffc add client address 2021-12-13 04:02:53 -05:00
Aayush Rajasekaran d7528557df Shed: Add a util to list terminated deals 2021-12-12 22:37:05 -05:00
Łukasz Magiera dc26f3bd74 Merge pull request #7750 from filecoin-project/gstuart/lotus-vm-gas-tracing-env-var
Expose EnableGasTracing as an env_var
2021-12-12 12:16:24 +01:00
Łukasz Magiera 8652f80ab3 Merge pull request #7760 from filecoin-project/feat/open-telemetry-fix
Minor improvement for OpenTelemetry
2021-12-12 12:14:55 +01:00
Aayush Rajasekaran e5895af4a2 Update go-ipld-cbor 2021-12-11 18:15:35 -05:00
Aayush Rajasekaran dfb65ed89f Plumb contexts through 2021-12-11 17:04:00 -05:00
Aayush Rajasekaran 6c31cecc7d Update markets 2021-12-11 14:37:37 -05:00
Jiaying Wang e05fdf8923 Merge pull request #7761 from filecoin-project/jen/rcgain
build: release: v1.13.2-rc4
2021-12-10 22:06:43 -05:00
Jiaying WangandAayush Rajasekaran 2343778559 Update CHANGELOG.md
Co-authored-by: Aayush Rajasekaran <arajasek94@gmail.com>
2021-12-10 19:43:25 -05:00
Aayush Rajasekaran 095361bead Update carv2 2021-12-10 19:15:53 -05:00
gstuart 9108828aeb Make Lotus vm gas tracing an env var 2021-12-10 17:27:44 -05:00
Jennifer Wang 1ffc3ed3a6 v1.13.2-rc4 2021-12-10 16:58:58 -05:00
hannahhoward 8e376c84cf feat(tracing): setup logging 2021-12-10 13:50:12 -08:00
Łukasz Magiera ba3c96f8c6 stores: Reduce log spam during retrievals 2021-12-10 16:47:32 -05:00
Łukasz Magiera b7912cbe0b fix lint 2021-12-10 16:47:22 -05:00
Łukasz Magiera dafdb7689c Fix mock ReadPiece 2021-12-10 16:47:12 -05:00
Łukasz Magiera 46ba2b6b4f fr32: Reduce MTTresh from 32M to 512k per core
This results in 64x less bytes allocated when spawning new readers
for larger pieces.

Results in about 30% speedup in 1G unpad benchmark on AMD TR 2950x
2021-12-10 16:47:07 -05:00
Łukasz Magiera b4c1e340ea piecereader: Avoid allocating 1024MB slices per read 2021-12-10 16:47:01 -05:00
Łukasz Magiera a438e6fa73 piecereader: Avoid redundant roundtrips when seeking 2021-12-10 16:46:57 -05:00
Łukasz Magiera b21d3ded2f piecereader: Move closer to storage 2021-12-10 16:46:52 -05:00
Darko Brdareski 0169d0dafd Annotate state feature tests 2021-12-10 16:08:25 +01:00
Łukasz Magiera a0d76bda99 Merge pull request #7749 from filecoin-project/gstuart/sort-lotus-miner-retrieval-deals
Sort lotus-miner retrieval-deals by dealId
2021-12-10 12:16:00 +01:00
Łukasz Magiera 36f1a8f3ca Merge pull request #7746 from filecoin-project/feat/faster-retrieval
Make retrieval even faster
2021-12-10 12:01:01 +01:00
Darko Brdareski f04bae3f0b Annotate rand_test 2021-12-10 11:41:24 +01:00
Darko Brdareski 95f86f9de0 Annotate feature syncer 2021-12-10 11:33:29 +01:00
Łukasz Magiera e8ef39e734 stores: Reduce log spam during retrievals 2021-12-10 11:28:04 +01:00
Aayush Rajasekaran 702a7815b9 Update go-car 2021-12-09 22:46:30 -05:00
Aayush Rajasekaran 276eabd4e5 Update go-storedcounter and go-ds-versioning 2021-12-09 22:31:46 -05:00
Jiaying Wang 09a5c2e025 Merge pull request #7752 from filecoin-project/jen/13.2rc3
build: release: v1.13.2-rc3
2021-12-09 22:26:16 -05:00
Jiaying Wang 509aea5d04 Merge pull request #7751 from filecoin-project/fix/getnode
dep/fix 7701 Dependency: update to ipld-legacy to v0.1.1
2021-12-09 21:16:53 -05:00
Jennifer Wang 3f9f9eb667 v1.13.2-rc3 2021-12-09 21:15:49 -05:00
Jennifer Wang 29cdee761b update to ipld-legacy to v0.1.1 2021-12-09 21:06:56 -05:00
Jennifer Wang f7a49e7be7 update to ipld-legacy to v0.1.1 2021-12-09 21:02:24 -05:00
gstuart 21e6c963ab Sort lotus-miner retrieval-deals by dealId 2021-12-09 19:53:13 -05:00
Łukasz Magiera 74d3ba6b5e fix lint 2021-12-09 18:10:34 +01:00
Masih H. Derkani 43cde484f4 Upgrade go-legs to a version with debugging features
In order to debug the gossipsub issue, upgrade go-legs to a branch that
implments an admin HTTP API to allow checking peerstate connecting to a
host and explicitly publishing CIDs.

This is to reduce the roundtrip time we have to wait for a deal to be
made and advertisement published to debug issues.

Admin server runs on localhost only and will not be present in the final
version of go-legs or will be disabled.

See:
- https://github.com/filecoin-project/go-legs/pull/47
2021-12-09 16:23:12 +00:00
Łukasz Magiera c31f4de7d5 Fix mock ReadPiece 2021-12-09 16:26:59 +01:00
Łukasz Magiera 6fd1609410 fr32: Reduce MTTresh from 32M to 512k per core
This results in 64x less bytes allocated when spawning new readers
for larger pieces.

Results in about 30% speedup in 1G unpad benchmark on AMD TR 2950x
2021-12-09 16:14:47 +01:00
Łukasz Magiera 9c75a3aaa8 piecereader: Avoid allocating 1024MB slices per read 2021-12-09 15:49:43 +01:00
Łukasz Magiera a3d8494a04 piecereader: Avoid redundant roundtrips when seeking 2021-12-09 14:52:33 +01:00
vyzo a9e22df765 update deps 2021-12-09 15:14:48 +02:00
Aayush Rajasekaran b9b4a2659d Update go-data-transfer 2021-12-09 14:12:25 +02:00
whyrusleeping 072297e661 WIP: updating to new datastore/blockstore code with contexts 2021-12-09 14:12:25 +02:00
Łukasz Magiera 13b260e7f7 piecereader: Move closer to storage 2021-12-08 23:20:20 +01:00
ZenGround0 ac31651a42 Merge pull request #7730 from filecoin-project/feat/sector-storage-unseal
Feat/sector storage unseal
2021-12-08 10:10:21 -05:00
Jiaying Wang 67bedc4ace Merge pull request #7745 from filecoin-project/jen/v1.13.2rc2
build: release: v1.13.2-rc2
2021-12-08 02:38:06 -05:00
Jennifer Wang 55ae9e8414 update changelog 2021-12-08 02:26:11 -05:00
Jennifer Wang 4768c425d1 bump version to v1.13.2-rc2 2021-12-08 02:04:39 -05:00
Łukasz Magiera b4bdb89f65 CARv2 v2.1.0 2021-12-08 01:52:00 -05:00
Łukasz Magiera ea9130256c dagstore pieceReader: Fix wrong ErrUnexpectedEOF return in ReadAt 2021-12-08 01:51:56 -05:00
Łukasz Magiera cde687bbe1 dagstore pieceReader: Always read full in ReadAt 2021-12-08 01:51:47 -05:00
Łukasz Magiera 9725d72a80 Add metrics to dagstore piecereader 2021-12-08 01:51:43 -05:00
Travis Person fbd3c90b80 disable building of appimage on release
appimage testing is currently broken due to a requirement to have access
to /dev/snd, which is not present on the image we are using in circleci.
2021-12-08 01:02:17 -05:00
Łukasz Magiera 49c619d65d Merge pull request #7735 from filecoin-project/feat/storlocks-cmd
Command to list active sector locks
2021-12-08 00:11:17 +01:00
Aayush Rajasekaran b0a9a27288 Shed: Allow send-csv to specify params and method 2021-12-07 17:14:29 -05:00
Aayush Rajasekaran c9a557e0d9 Address review 2021-12-07 17:09:07 -05:00
Aayush Rajasekaran fcb7cd0eb0 Shed: Add a util to send a batch of messages 2021-12-07 17:09:07 -05:00
Łukasz Magiera 9ccd4ee240 Merge pull request #7737 from filecoin-project/feat/opt-ds-pr
dagstore pieceReader: Always read full in ReadAt
2021-12-06 23:14:21 +01:00
Łukasz Magiera 84c48de5d9 CARv2 v2.1.0 2021-12-06 15:39:03 +01:00
Łukasz Magiera 9f6265e0b4 dagstore pieceReader: Fix wrong ErrUnexpectedEOF return in ReadAt 2021-12-03 23:36:36 +01:00
zenground0 a5be80828a RemoveData and Decode
- Unsealing replica update with sector key works and tested
- Sector key generation added and tested
2021-12-03 15:21:06 -05:00
Łukasz Magiera 3969d6b767 dagstore pieceReader: Always read full in ReadAt 2021-12-03 20:14:35 +01:00
Łukasz Magiera dad9190142 Add metrics to dagstore piecereader 2021-12-03 17:07:14 +01:00
Łukasz Magiera 9d143426ee Merge pull request #7734 from filecoin-project/feat/splitstore-upgrade-protection
SplitStore: supress compaction near upgrades
2021-12-03 15:18:07 +01:00
Łukasz Magiera 727765b248 Command to list active sector locks 2021-12-03 12:33:23 +01:00
Masih H. Derkani 780c40329e Upgrade to the latest indexer dependencies
Do not upgrade to the latest storetheindex, because it uses go-ipfs for
bootstrapping mechanism and that comes with dependencies that we don not
wish to upgrade in lotus just now; namely:
- go-bitswap
- go-path
- interface-go-ipfs-core
- go-libp2p-kad-dht
- go-libp2p-quic-transport
2021-12-03 10:29:17 +00:00
vyzo 489782e21b satisfy the spellchecker that masquarades as a linter 2021-12-03 12:15:28 +02:00
vyzo 5d6398f20e hook the upgrade schedule to splitstore start 2021-12-03 12:11:54 +02:00
vyzo 6ce5879071 add unit test for compaction supression 2021-12-03 12:05:15 +02:00
vyzo 05c1325885 add logic for supressing compaction near upgrade boundaries 2021-12-03 11:50:35 +02:00
Łukasz Magiera 9331714089 Merge pull request #7707 from filecoin-project/fix/app-image-build
Disable appimage
2021-12-02 14:39:48 +01:00
Łukasz Magiera d5e1cc095c Merge pull request #7725 from filecoin-project/feat/open-telemetry
Initial switch to OpenTelemetry
2021-12-02 14:39:20 +01:00
Jiaying Wang c2437b7bf2 Create pull_request_template.md
This is the very first iteration of the lotus PR template. The goal of adding PR template is to standardize PR requests and encourage contributors to:
- come up with good PR descriptions to give code reviewers a clear overview of what's in the PR 
- have a clear PR title as lotus generates a change log based on it
- check that tests and documentation for the codes that changed are icnluded 

The PR type follows the https://www.conventionalcommits.org/en/v1.0.0-beta.2/.  The [contribution guideline](https://github.com/filecoin-project/lotus#contribute) should be updated with how to create a pr after the template is accepted.
2021-12-01 22:37:22 -05:00
hannahhoward bfd1099ef3 fix(main): fix bug in startup when tracing is not present 2021-12-01 18:53:00 -08:00
hannahhoward f3b691d618 feat(tracing): switch to OpenTelemetry
Switch the underlying tracing library to OpenTelemetry, with a bridge to OpenCensus for
compatibility
2021-12-01 16:19:47 -08:00
Travis Person 66c8c66f40 disable building of appimage on release
appimage testing is currently broken due to a requirement to have access
to /dev/snd, which is not present on the image we are using in circleci.
2021-12-01 19:15:35 +00:00
Jiaying Wang 52c7fa2427 Merge pull request #7718 from filecoin-project/jen/new-prep
v1.13.2-rc1
2021-11-30 19:23:09 -05:00
Jiaying Wang 0cfc344f82 Merge pull request #7717 from filecoin-project/jen/bumpmaster
Bump the master version to v1.13.3-dev
2021-11-30 19:06:46 -05:00
Jennifer Wang 02fa0df81c update change log 2021-11-30 19:06:11 -05:00
Jennifer Wang 027017d0d2 update the version to v1.13.2-rc1 2021-11-30 19:03:24 -05:00
Jennifer Wang c3ecf8355d docs gen 2021-11-30 18:29:13 -05:00
Jennifer Wang a09aa0aa72 Bump the master version to v1.13.3-dev 2021-11-30 18:24:34 -05:00
Jennifer Wang c8b41a571c simplify the release testing flow as minerx is now our default testing group 2021-11-30 18:18:36 -05:00
Łukasz Magiera 26c9120d22 Merge pull request #7714 from filecoin-project/feat/sched-review
Address Scheduler enhancements (#7703) review
2021-11-30 23:03:03 +01:00
Łukasz Magiera 71329f6c41 Address Scheduler enhancements (#7703) review 2021-11-30 20:50:40 +01:00
ZenGround0 91f6d4b013 Merge pull request #7615 from filecoin-project/feat/snap-deals-storage
Feat/snap deals storage
2021-11-30 14:18:24 -05:00
zenground0 40d16a8f88 Review Response 2021-11-30 13:53:37 -05:00
Łukasz Magiera 73f16f08e3 Merge pull request #7703 from filecoin-project/feat/scheduler-enhancements
Scheduler enhancements
2021-11-30 19:14:25 +01:00
zenground0 f88fcdbcfc WIP 2021-11-30 12:40:14 -05:00
Łukasz MagieraandAayush Rajasekaran 330cfc33ee worker: Typo in resources cmd usage
Co-authored-by: Aayush Rajasekaran <arajasek94@gmail.com>
2021-11-30 02:06:58 +01:00
Łukasz Magiera cf20b0b2b8 worker: Command to print resource-table env vars 2021-11-30 02:06:58 +01:00
Łukasz Magiera 001ecbb561 fix lint 2021-11-30 02:06:58 +01:00
Łukasz Magiera a597b072b8 fix sched tests 2021-11-30 02:06:58 +01:00
Łukasz Magiera f25efecb74 worker: Test resource table overrides 2021-11-30 02:06:58 +01:00
Łukasz Magiera 6d52d8552b Fix docsgen 2021-11-30 02:06:58 +01:00
Łukasz Magiera c9a2ff4007 cleanup worker resource overrides 2021-11-30 02:06:58 +01:00
Łukasz Magiera b961e1aab5 sched resources: Separate Parallelism defaults depending on GPU presence 2021-11-30 02:06:58 +01:00
Łukasz Magiera 36868a8749 sched: C2 is not all-core load 2021-11-30 02:06:58 +01:00
Clint Armstrong 4ef8543128 Permit workers to override resource table
In an environment with heterogenious worker nodes, a universal resource
table for all workers does not allow effective scheduling of tasks. Some
workers may have different proof cache settings, changing the required
memory for different tasks. Some workers may have a different count of
CPUs per core-complex, changing the max parallelism of PC1.

This change allows workers to customize these parameters with
environment variables. A worker could set the environment variable
PC1_MIN_MEMORY for example to customize the minimum memory requirement
for PC1 tasks. If no environment variables are specified, the resource
table on the miner is used, except for PC1 parallelism.

If PC1_MAX_PARALLELISM is not specified, and
FIL_PROOFS_USE_MULTICORE_SDR is set, PC1_MAX_PARALLELSIM will
automatically be set to FIL_PROOFS_MULTICORE_SDR_PRODUCERS + 1.
2021-11-30 02:06:58 +01:00
Clint Armstrong 93e4656a27 Use a float to represent GPU utilization
Before this change workers can only be allocated one GPU task,
regardless of how much of the GPU resources that task uses, or how many
GPUs are in the system.

This makes GPUUtilization a float which can represent that a task needs
a portion, or multiple GPUs. GPUs are accounted for like RAM and CPUs so
that workers with more GPUs can be allocated more tasks.

A known issue is that PC2 cannot use multiple GPUs. And even if the
worker has multiple GPUs and is allocated multiple PC2 tasks, those
tasks will only run on the first GPU.

This could result in unexpected behavior when a worker with multiple
GPUs is assigned multiple PC2 tasks. But this should not suprise any
existing users who upgrade, as any existing users who run workers with
multiple GPUs should already know this and be running a worker per GPU
for PC2. But now those users have the freedom to customize the GPU
utilization of PC2 to be less than one and effectively run multiple PC2
processes in a single worker.

C2 is capable of utilizing multiple GPUs, and now workers can be
customized for C2 accordingly.
2021-11-30 02:06:58 +01:00
Clint Armstrong c4f46171ae Report memory used and swap used in worker res
Attempting to report "memory used by other processes" in the MemReserved
field fails to take into account the fact that the system's memory used
includes memory used by ongoing tasks.

To properly account for this, worker should report the memory and swap
used, then the scheduler that is aware of the memory requirements for a
task can determine if there is sufficient memory available for a task.
2021-11-30 02:06:58 +01:00
Clint Armstrong e2a1ca7caa Use cgroup limits in worker memory calculations
Worker processes may have memory limitations imposed by Systemd. But
/proc/meminfo shows the entire system memory regardless of these limits.
This results in the scheduler believing the worker has the entire system
memory avaliable and the worker being allocated too many tasks.

This change attempts to read cgroup memory limits for the worker
process. It supports cgroups v1 and v2, and compares cgroup limits
against the system memory and returns the most conservative values to
prevent the worker from being allocated too many tasks and potentially
triggering an OOM event.
2021-11-30 02:06:58 +01:00
Łukasz Magiera 19e808fffb Merge pull request #7710 from filecoin-project/feat/pc2-validation
ffiwrapper: Validate PC2 by calling C1 with random seeds
2021-11-30 02:05:32 +01:00
Łukasz Magiera d21c44e266 ffiwrapper: Validate PC2 by calling C1 with random seeds 2021-11-30 01:33:05 +01:00
Jiaying Wang 01215b7d2c Merge pull request #7709 from filecoin-project/logic-error-miner-entrypoint
fix logic error
2021-11-29 18:16:58 -05:00
Łukasz Magiera da9b0c6735 Merge pull request #7708 from filecoin-project/feat/update-graphsync-v0.10.6
Update go-graphsync v0.10.6
2021-11-29 23:51:32 +01:00
Jiaying Wang 4d2f3375e8 Merge pull request #7699 from filecoin-project/feat/listcids-verbose
Add verbose mode to lotus-miner pieces list-cids
2021-11-29 17:43:09 -05:00
c r e16e9ad343 reorder transfer checks so as to ensure sending more money than you have to yourself fails with an error (fixing issue 7596)
PR #7637, also adds tests to make sure behavior is correct across versions.
2021-11-29 17:26:47 -05:00
Cory Schwartz 27efbc3485 fix logic error 2021-11-29 13:52:06 -08:00
hannahhoward d4074e45cf feat(deps): update go-graphsync v0.10.6 2021-11-29 13:29:12 -08:00
Łukasz Magiera f39942283b Merge pull request #7706 from filecoin-project/feat/ret-matchding-cars
retrieval: Only output matching nodes, MatchPath dagspec
2021-11-29 22:14:25 +01:00
Łukasz Magiera 468b90a4a4 cli docsgen 2021-11-29 21:50:23 +01:00
Łukasz Magiera 092e12d1be cli: boolean logic is hard 2021-11-29 21:41:38 +01:00
Łukasz Magiera 320b36495d gofmt 2021-11-29 21:39:27 +01:00
Łukasz Magiera e4f47de6ef retrieval: Check required flags for --car-export-merkle-proof 2021-11-29 21:39:18 +01:00
Łukasz Magiera 410ecb4bbc retrieval: --car-export-merkle-proof flag for client retrieve 2021-11-29 21:37:28 +01:00
Łukasz MagieraandPeter Rabbitson d019853687 review: Cleanup some comments
Co-authored-by: Peter Rabbitson <ribasushi@protocol.ai>
2021-11-29 21:29:00 +01:00
Łukasz Magiera 4d51980cb5 deps: Use tagged go-ipld-selector-text-lite 2021-11-29 21:22:30 +01:00
Łukasz Magiera 5b5e6b9e44 retrieval: DagSpec.MatchPath -> ExportMerkleProof 2021-11-29 21:14:00 +01:00
Łukasz Magiera 58a084049d retrieval: Fix traversal in ls 2021-11-29 21:08:53 +01:00
Łukasz Magiera 9538fc9723 mod tidy, docsgen 2021-11-29 20:56:40 +01:00
Łukasz Magiera 227188e908 retrieval: Test non-matching path traversal 2021-11-29 20:52:55 +01:00
Łukasz Magiera 61791b90ea retrieval: Only output matching nodes, MatchPath dagspec 2021-11-29 20:40:55 +01:00
Steven Allen 797147097c Merge pull request #7689 from filecoin-project/disable-mplex
disable mplex stream muxer
2021-11-29 09:46:24 -08:00
Łukasz Magiera f8b132890c Add verbose mode to lotus-miner pieces list-cids 2021-11-29 17:19:47 +01:00
Łukasz Magiera 134aee4582 mod tidy 2021-11-29 16:44:58 +01:00
Łukasz Magiera 77d75b7739 Merge pull request #7688 from filecoin-project/chore/partret_cleanup_comment_and_flow
Cleanup partial retrieval codepaths ( zero functional changes )
2021-11-29 16:39:55 +01:00
zenground0 7d2b3f05db WIP sector storage and integration test 2021-11-29 10:24:00 -05:00
Łukasz Magiera 26c3752f48 Merge pull request #7693 from filecoin-project/feat/randacc-dagstore-mount
Make small retrieval 200x faster
2021-11-29 16:10:18 +01:00
Łukasz Magiera 4bcde2f0ff dagstore pieceReader: Cleanup reader nil check 2021-11-29 15:32:27 +01:00
Jiaying Wang 160bb0b050 Merge pull request #7698 from filecoin-project/jen/releasetomaster
Releases back to master
2021-11-26 18:44:18 -05:00
Łukasz Magiera 05aa860459 Request correct read size with startOffset in pieceProvider 2021-11-27 00:05:45 +01:00
Jiaying Wang a4c2a20851 Merge pull request #7691 from filecoin-project/misc/rle-dump
Add RLE dump code
2021-11-26 17:15:52 -05:00
Jennifer Wang 4df9179d34 Merge branch 'releases' into jen/releasetomaster 2021-11-26 17:09:22 -05:00
Jiaying Wang 8943de27e4 Merge pull request #7695 from filecoin-project/release/v1.13.1
Release/v1.13.1
2021-11-26 16:59:54 -05:00
Jiaying Wang fc728d9e11 Merge pull request #7694 from filecoin-project/jen/v1.13.1-prep
v1.13.1 prep
2021-11-26 16:44:46 -05:00
Jennifer Wang f6131ce3b5 v1.13.1 prep 2021-11-26 16:33:39 -05:00
Łukasz Magiera 9110e6f632 dagstore pieceReader: add debug log on stream restart 2021-11-26 20:24:51 +01:00
Łukasz Magiera 331702cd95 Tweak MaxPieceReaderBurnBytes 2021-11-26 18:49:41 +01:00
Łukasz Magiera 743ce5a40f Add startOffset support to mock SectorMgr.ReadPiece 2021-11-26 18:48:52 +01:00
Łukasz Magiera abec7dd3bc Fix imports 2021-11-26 18:40:27 +01:00
Łukasz Magiera f6de16e95a Fix sector-storage tests 2021-11-26 18:16:53 +01:00
Łukasz Magiera a9ee263682 Fix dagstore pieceReader burn logic 2021-11-26 18:01:09 +01:00
Łukasz Magiera 8d955d5f30 dagstore mount: Add random access support 2021-11-26 17:40:53 +01:00
Jakub Sztandera 4d8be81a8f Add usage
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2021-11-26 15:01:05 +01:00
Jakub SztanderaandAayush Rajasekaran e3c7b8d006 Fix typo
Co-authored-by: Aayush Rajasekaran <arajasek94@gmail.com>
2021-11-26 14:42:18 +01:00
Łukasz Magiera 3b1d86b750 Merge pull request #7690 from filecoin-project/misc/updage-archive-script
Update archive script
2021-11-26 13:47:40 +01:00
Marten Seemann cf0faf58dc remove muxer config via LIBP2P_MUX_PREFS env 2021-11-26 11:01:54 +04:00
Jakub Sztandera af113f867d Add dump code
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2021-11-25 20:53:49 +01:00
Jakub Sztandera ca230bba09 Add releases to protected
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2021-11-25 20:19:20 +01:00
Jakub Sztandera a26a2160ae Fix the script
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2021-11-25 20:14:19 +01:00
Jakub Sztandera aafdf3d093 Update archive script
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2021-11-25 19:52:04 +01:00
Marten Seemann 12dc3baff9 disable mplex stream muxer 2021-11-25 09:38:57 -08:00
Peter Rabbitson d5b4d93575 Cleanup partial retrieval codepaths ( zero functional changes )
- Adjust the ExportRef comment to reflect change from #7673
- Simplify control flow in parseDagSpec() ( read diff under -w )
2021-11-25 10:35:05 +01:00
Łukasz Magiera ab55a6fbbe Merge pull request #7681 from filecoin-project/feat/storage-tar-buf
storage: Use 1M buffers for Tar transfers
2021-11-24 20:52:02 +01:00
Łukasz Magiera 0c884734a3 Merge pull request #7673 from filecoin-project/chore/DM-level-tests_plus_merkle-proof-cars
Chore/dm level tests plus merkle proof cars
2021-11-24 20:43:39 +01:00
Łukasz Magiera 58dd814765 Merge pull request #7610 from filecoin-project/feat/partret-ux
Partial retrieval ux improvements
2021-11-24 20:25:05 +01:00
Łukasz Magiera bd4927b494 retrieval: Cleanup some comments 2021-11-24 20:13:49 +01:00
Łukasz Magiera 8454abcf45 storage: Use 1M buffers for Tar transfers 2021-11-24 20:08:37 +01:00
Peter Rabbitson 407bf4961c Modify preexisting test to reflect the simple-path car export behavior
I am open to having a flag or something, as long as the behavior reflected in
deals_partial_retrieval_dm-level_test.go can be preserved for v0, and opt-in for v1
2021-11-24 15:31:19 +01:00
Peter Rabbitson 46937a1b9f Add tests cementing the DM-level behavior on simple paths 2021-11-24 15:31:15 +01:00
Łukasz Magiera 210485d800 Add some description to the retrieve command 2021-11-23 22:44:57 +01:00
Łukasz Magiera 135796d4fa Merge remote-tracking branch 'origin/master' into feat/partret-ux 2021-11-23 19:08:56 +01:00
Łukasz Magiera 78949d6c05 retrieval: Fix deadlock in ClientGetRetrievalUpdates 2021-11-23 18:32:56 +01:00
Łukasz Magiera 83f65a673b retrieval: Docsgen 2021-11-23 17:45:56 +01:00
Łukasz Magiera 407c2ed114 retrieval: Drop the RootSelector hack 2021-11-23 17:42:43 +01:00
Łukasz Magiera 37141779ac Merge pull request #7453 from filecoin-project/feat/storage-groups
Sector storage groups
2021-11-23 16:36:12 +01:00
Łukasz Magiera b522901845 update storage attach allowTo usage 2021-11-23 16:23:06 +01:00
Łukasz Magiera e362d47903 Add optional group flags to storage attach commands 2021-11-23 16:11:04 +01:00
Łukasz Magiera b1781c33ce Show group info in storage list 2021-11-23 16:11:04 +01:00
Łukasz Magiera 2a1505b364 storage: Test StorageFindSector with groups 2021-11-23 16:11:04 +01:00
Łukasz Magiera 8b548ac02f storage: Check allowlists in StorageFindSector 2021-11-23 16:11:04 +01:00
Łukasz Magiera 5c77c25747 storage: Add Group tags to StorageInfo 2021-11-23 16:11:04 +01:00
Łukasz Magiera 6c0374cd3c Merge pull request #7659 from filecoin-project/fix/docgen-cli-nodesc
docsgen-cli: Handle commands with no description correctly
2021-11-22 20:34:30 +01:00
Łukasz Magiera 51753a1e25 Merge pull request #7414 from filecoin-project/feat/shed-wallet-balancer
shed: simple wallet balancer util
2021-11-22 18:11:42 +01:00
Łukasz Magiera dc744a8dd9 Merge pull request #7664 from filecoin-project/chore/spammy-log
remote store: Remove debug printf
2021-11-22 18:08:02 +01:00
Łukasz Magiera d1a63e4173 remote store: Remove debug printf 2021-11-22 17:50:12 +01:00
Łukasz Magiera 90d57f0243 Merge pull request #7660 from filecoin-project/dependabot/npm_and_yarn/lotuspond/front/ws-5.2.3
Bump ws from 5.2.2 to 5.2.3 in /lotuspond/front
2021-11-22 14:54:09 +01:00
Łukasz Magiera 3a81411d28 Merge pull request #7658 from filecoin-project/dependabot/npm_and_yarn/lotuspond/front/color-string-1.6.0
Bump color-string from 1.5.3 to 1.6.0 in /lotuspond/front
2021-11-22 14:53:50 +01:00
dependabot[bot] b12bb32ece Bump ws from 5.2.2 to 5.2.3 in /lotuspond/front
Bumps [ws](https://github.com/websockets/ws) from 5.2.2 to 5.2.3.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/5.2.2...5.2.3)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-22 13:53:40 +00:00
Łukasz Magiera 0992e56fee Merge pull request #7657 from filecoin-project/dependabot/npm_and_yarn/lotuspond/front/postcss-7.0.39
Bump postcss from 7.0.17 to 7.0.39 in /lotuspond/front
2021-11-22 14:53:38 +01:00
Łukasz Magiera 5fe1726484 Merge pull request #7656 from filecoin-project/dependabot/npm_and_yarn/lotuspond/front/path-parse-1.0.7
Bump path-parse from 1.0.6 to 1.0.7 in /lotuspond/front
2021-11-22 14:53:23 +01:00
Łukasz Magiera 189b27f36e Merge pull request #7655 from filecoin-project/dependabot/npm_and_yarn/lotuspond/front/tmpl-1.0.5
Bump tmpl from 1.0.4 to 1.0.5 in /lotuspond/front
2021-11-22 14:53:12 +01:00
Łukasz Magiera a0d6daa180 Merge pull request #7654 from filecoin-project/dependabot/npm_and_yarn/lotuspond/front/url-parse-1.5.3
Bump url-parse from 1.4.7 to 1.5.3 in /lotuspond/front
2021-11-22 14:52:52 +01:00
Łukasz Magiera 699d2c7b24 docsgen-cli: Handle commands with no description correctly 2021-11-22 14:49:24 +01:00
Łukasz Magiera 0262f1cd6e shed: simple wallet balancer util 2021-11-22 14:29:23 +01:00
Łukasz Magiera bdac11ade7 retrieval: Update some API comments 2021-11-22 14:19:03 +01:00
Łukasz Magiera 25e89d3a7a retrieval: require unixfs exports to be aligned on block boundary 2021-11-22 13:29:09 +01:00
Łukasz Magiera c6ac582c99 retrieval: update cli docs 2021-11-22 13:18:56 +01:00
Łukasz Magiera 9ea229ed5a retrieval: fix defult ask 2021-11-22 13:04:12 +01:00
Łukasz Magiera f88c514be9 make lint happy 2021-11-22 12:52:11 +01:00
Łukasz Magiera 3e70b8420e retrieval: Make the cat command work 2021-11-22 12:46:29 +01:00
Łukasz Magiera 2c583b03ff retrieval: Support DM-paths in ls 2021-11-22 12:46:29 +01:00
Łukasz Magiera dd78e75dd6 retrieval: add depth parameter to ls 2021-11-22 12:46:29 +01:00
Łukasz Magiera c6101aa02f retrieval: Support listing ipld links in ls 2021-11-22 12:46:29 +01:00
Łukasz Magiera 46ee3a0c46 retrieval: Don't default to non-zero cost retrieval 2021-11-22 12:46:29 +01:00
Łukasz Magiera 763659b8a3 retrieval: Update lotus-soup 2021-11-22 12:46:29 +01:00
Łukasz Magiera 74f645a098 retrieval: Fix parseDagSpec root check 2021-11-22 12:46:29 +01:00
Łukasz Magiera 53a48df77e retrieval: Don't use subcommands 2021-11-22 12:46:29 +01:00
Łukasz Magiera 597b72e286 retrieval: Fix lint, cli docsgen 2021-11-22 12:46:29 +01:00
Łukasz Magiera ec2bfb99bb make gen 2021-11-22 12:46:25 +01:00
Łukasz Magiera 8ea5162ad9 retrieval: Cleanup retrieve command output 2021-11-22 12:46:17 +01:00
Łukasz Magiera 9c119bfdad retrieval: Make the ls command work 2021-11-22 12:46:17 +01:00
Łukasz Magiera a1d5b2a293 retrieval: wip improved retrieval commands 2021-11-22 12:46:17 +01:00
Łukasz Magiera 450d0687da retrieval: REST export endpoint 2021-11-22 12:46:17 +01:00
Łukasz Magiera b83a9b902a gofmt 2021-11-22 12:46:17 +01:00
Łukasz Magiera b26906963b retrieval: Support multi-root export 2021-11-22 12:46:17 +01:00
Łukasz Magiera b0c043cc2f make gen 2021-11-22 12:46:15 +01:00
Łukasz Magiera d0503d409f fix TestPartialRetrieval 2021-11-22 12:46:04 +01:00
Łukasz Magiera b9bd061bdd fix unixfs selector root node selection 2021-11-22 12:46:04 +01:00
Łukasz Magiera b868769ec8 more retrieval api work 2021-11-22 12:46:02 +01:00
Łukasz Magiera 89138bab4d Simplify retrieval APIs 2021-11-22 12:45:42 +01:00
Łukasz Magiera 60ea33b1c7 client: cleanup clientRetrieve 2021-11-22 12:45:42 +01:00
Łukasz Magiera 08e297a217 client: Support json selectors in retrieval 2021-11-22 12:45:42 +01:00
dependabot[bot] 19732d3bd7 Bump color-string from 1.5.3 to 1.6.0 in /lotuspond/front
Bumps [color-string](https://github.com/Qix-/color-string) from 1.5.3 to 1.6.0.
- [Release notes](https://github.com/Qix-/color-string/releases)
- [Changelog](https://github.com/Qix-/color-string/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Qix-/color-string/commits/1.6.0)

---
updated-dependencies:
- dependency-name: color-string
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-22 11:44:58 +00:00
dependabot[bot] e3c9430e7e Bump postcss from 7.0.17 to 7.0.39 in /lotuspond/front
Bumps [postcss](https://github.com/postcss/postcss) from 7.0.17 to 7.0.39.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/7.0.39/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/7.0.17...7.0.39)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-22 11:44:57 +00:00
dependabot[bot] a189906b9b Bump path-parse from 1.0.6 to 1.0.7 in /lotuspond/front
Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/jbgutierrez/path-parse/releases)
- [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7)

---
updated-dependencies:
- dependency-name: path-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-22 11:44:55 +00:00
dependabot[bot] 205f54d80d Bump tmpl from 1.0.4 to 1.0.5 in /lotuspond/front
Bumps [tmpl](https://github.com/daaku/nodejs-tmpl) from 1.0.4 to 1.0.5.
- [Release notes](https://github.com/daaku/nodejs-tmpl/releases)
- [Commits](https://github.com/daaku/nodejs-tmpl/commits/v1.0.5)

---
updated-dependencies:
- dependency-name: tmpl
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-22 11:44:53 +00:00
dependabot[bot] d9d54a918f Bump url-parse from 1.4.7 to 1.5.3 in /lotuspond/front
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.4.7 to 1.5.3.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](https://github.com/unshiftio/url-parse/compare/1.4.7...1.5.3)

---
updated-dependencies:
- dependency-name: url-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-22 11:44:53 +00:00
Łukasz Magiera 81a2f2f06d Merge pull request #7329 from filecoin-project/feat/lotus-stats-update
Add caches to lotus-stats and splitcode
2021-11-22 12:44:00 +01:00
Łukasz Magiera 3e41844e6c Merge pull request #7644 from filecoin-project/feat/gateway-new-methods
add additional methods to lotus gateway
2021-11-22 12:34:06 +01:00
Łukasz Magiera 2620eab45e Merge pull request #7555 from diancun/dc/check-commit
checkCommit should return SectorCommitFailed
2021-11-22 12:28:16 +01:00
Łukasz Magiera 5b7bf6ca9f Merge pull request #7572 from filecoin-project/asr/post
Wdpost worker: Reduce challenge confidence to 1 epoch
2021-11-22 12:21:41 +01:00
Łukasz Magiera 77dd022243 Merge pull request #7624 from filecoin-project/feat/docker-file-generic
remove api and jaeger env from docker file
2021-11-22 12:21:09 +01:00
Travis Person 17cb5117f4 add additional methods to lotus gateway 2021-11-22 12:19:27 +01:00
Łukasz Magiera 7a9824f00e Merge pull request #7645 from filecoin-project/asr/msig-cancel
CLI: Add a lotus multisig cancel command
2021-11-22 12:14:47 +01:00
Aayush Rajasekaran 9d4489360b Merge pull request #7617 from filecoin-project/asr/v7-actors
Integrate v7 actors
2021-11-19 15:25:45 -05:00
Aayush Rajasekaran 5f1783c9a5 Address review 2021-11-19 15:11:13 -05:00
Aayush Rajasekaran 32fc03886d CLI: Add a lotus multisig cancel command 2021-11-18 19:21:17 -05:00
Travis Person 73182cff3a remove api and jaeger env from docker file 2021-11-18 22:12:31 +00:00
Łukasz Magiera ef0771ee48 Merge pull request #7631 from filecoin-project/remove-jaeger-envvars
remove jaeger envvars
2021-11-18 10:49:52 +01:00
Łukasz Magiera 943c40a233 Merge pull request #7639 from filecoin-project/feat/shed-msg-submsg
lotus-shed msg: Decode submessages/msig proposals
2021-11-18 10:48:16 +01:00
Aarsh Shah 7655e660f3 integrate store-the-hash 2021-11-18 12:07:12 +04:00
Aayush Rajasekaran a5847fd06f Update actors 2021-11-17 20:33:18 -05:00
Aayush Rajasekaran 91fb111462 Update FFI 2021-11-17 17:50:36 -05:00
Łukasz Magiera 9adaa9b967 lotus-shed msg: Decode submessages/msig proposals 2021-11-17 23:10:14 +01:00
Aayush Rajasekaran 8665e32221 Update deps 2021-11-17 15:55:14 -05:00
Aayush Rajasekaran 07f1be0ff6 Plug in the FFI call 2021-11-17 15:55:14 -05:00
Aayush Rajasekaran 1449644c34 Integrate v7 actors 2021-11-17 15:55:14 -05:00
Anton Evangelatov 5454aebf13 CLI tools for the DAGStore inverted index (#7361)
* cli commands for dagstore

* address comments from Dirk

* rename inverted index to piece index
2021-11-17 15:39:45 +02:00
dirkmc a4fd3de0b0 Merge pull request #7634 from filecoin-project/feat/cli-announce-index
CLI command to announce deal to indexers
2021-11-17 13:55:15 +01:00
Dirk McCormick 599a6bfb24 fix: err message 2021-11-17 12:37:15 +01:00
Aarsh Shah 60fe55cdc0 fix lint and gen 2021-11-17 15:25:25 +04:00
Dirk McCormick 501308239f feat: CLI command to announce deal to indexers 2021-11-17 12:16:22 +01:00
Aarsh Shah 21e27b8034 Merge pull request #7622 from filecoin-project/feat/indexer-provider
Integrate indexer provider
2021-11-17 15:11:51 +04:00
Aarsh Shah 8d3017febb make gen should work 2021-11-17 15:02:11 +04:00
Aarsh Shah d196c236b8 fix lint 2021-11-17 14:55:09 +04:00
Aarsh Shah f8c675bc5e green tests 2021-11-17 14:48:28 +04:00
Aarsh Shah caf3cfa7d8 Merge branch 'feat/cid-to-piece-idx' into feat/indexer-provider 2021-11-17 11:43:49 +04:00
Aarsh Shah bfee6699d2 update go mod and inject store the hash index in dagstore 2021-11-17 11:42:14 +04:00
Dirk McCormick 627d4fbf74 wip: storage miner index provider 2021-11-16 17:45:42 +01:00
Cory Schwartz 2894567165 remove jaeger envvars 2021-11-16 06:36:30 -08:00
Anton Evangelatov a633f93707 upgrade go modules 2021-11-12 12:28:43 +01:00
Dirk McCormick 588d6ec828 fix: docs-gen 2021-11-12 09:43:42 +01:00
Dirk McCormick 025d8ebc59 feat: include TestDealRetrieveByAnyCid in CI 2021-11-12 09:43:42 +01:00
Aarsh Shah 189f5f8aae fix deals test 2021-11-12 09:43:42 +01:00
Dirk McCormick 3c37078a85 fix: dagstore wrapper test 2021-11-12 09:43:42 +01:00
Dirk McCormick e309293a47 fix: lint fixes 2021-11-12 09:43:42 +01:00
Aarsh Shah 4d87f16e95 better comparision in test 2021-11-12 09:43:42 +01:00
Aarsh Shah 053317e334 test for retrieval by any cid 2021-11-12 09:43:42 +01:00
Dirk McCormick 662c51605f feat: retrieve from any cid (not just root cid) 2021-11-12 09:43:42 +01:00
Łukasz Magiera e196a81e99 Merge pull request #7613 from hunjixin/feat/add_log_windows_restart
add log for restart windows post scheduler
2021-11-11 15:27:30 +00:00
hunjixin eaac4b6de4 add log for restart windows post scheduler 2021-11-10 14:47:42 +08:00
Aayush Rajasekaran a3c806a7a8 Merge pull request #7605 from filecoin-project/asr/miner-faults
Shed: Add a util to list miner faults
2021-11-07 23:46:39 +00:00
Aayush Rajasekaran 495f08473d Shed: Add a util to list miner faults 2021-11-07 23:33:37 +00:00
Łukasz Magiera 40d5c6f0dc Merge pull request #7592 from filecoin-project/feat/wait-api-flags
add timeout flag to wait-api command
2021-11-04 16:04:24 +01:00
Aayush Rajasekaran 6056858bf8 Merge pull request #7595 from filecoin-project/asr/miner-create
Shed: Add a util to create miners more easily
2021-11-04 12:29:54 +00:00
Menko f01015bac5 Merge pull request #1 from Bloxico/repo_test
Tests
2021-11-03 21:44:04 +01:00
TheMenko ad16bafa66 annotated paych_test 2021-11-03 21:31:33 +01:00
Aayush Rajasekaran 3be0c068b9 Shed: Add a util to create miners more easily 2021-11-03 00:20:48 +00:00
Jiaying Wang cd95b40d61 Merge pull request #7594 from filecoin-project/jen/fix
fix the changelog
2021-11-02 18:02:10 +00:00
Travis Person 60b3ae2ac2 add timeout flag to wait-api command 2021-11-02 17:28:11 +00:00
Jiaying Wang e94e26f529 Merge pull request #7593 from filecoin-project/jen/v1.13.1-rc2
v1.13.1-rc2 prep
2021-11-02 17:26:00 +00:00
Jiaying Wang 6958b6fc2b Merge pull request #7593 from filecoin-project/jen/v1.13.1-rc2
v1.13.1-rc2 prep
2021-11-02 17:25:07 +00:00
jennijuju 34df787be6 update the changelog 2021-11-02 16:27:17 +00:00
Aayush Rajasekaran b3eb9edc34 Merge pull request #7591 from filecoin-project/asr/state-types
Update go-state-types
2021-11-02 16:07:36 +00:00
jennijuju 2767cdba9c v1.13.1-rc2 prep 2021-11-02 15:57:19 +00:00
Aayush Rajasekaran 8cb9c6e21f Update go-state-types 2021-11-02 15:39:46 +00:00
TheMenko b45924a234 annotated repo_test 2021-11-01 10:49:30 +01:00
Travis Person 2d4f5958e2 Add caches to lotus-stats and splitcode 2021-11-01 09:05:14 +00:00
TheMenko fb911a4542 annotated repo_test 2021-11-01 01:24:26 +01:00
TheMenko 9297e1b90d annotated repo_test 2021-10-31 12:24:07 +01:00
vyzo 735f6fec1a update go-libp2p-pubsub to v0.5.6 2021-10-30 19:59:20 -04:00
Łukasz Magiera e0a9cae386 Merge pull request #7559 from diancun/dc/miss-tag
add missing NodeType tag
2021-10-30 09:24:00 +01:00
Jakub Sztandera e7a7d4c75a Merge pull request #7581 from filecoin-project/deps/update-pubsub
update go-libp2p-pubsub to v0.5.6
2021-10-29 20:04:21 +02:00
vyzo 758b54f36d update go-libp2p-pubsub to v0.5.6 2021-10-29 13:53:55 +03:00
Aayush Rajasekaran 6455b0edcc Wdpost worker: Reduce challenge confidence to 1 epoch 2021-10-27 11:32:37 -04:00
Jiaying Wang 6fbaba1323 Merge pull request #7569 from filecoin-project/jen/v1.13.1-rc1
lotus v1.13.1-rc1
2021-10-26 22:41:13 -04:00
Jiaying Wang d9fd1d9a46 Merge pull request #7568 from filecoin-project/jen/v13.2
bump the master version to v1.13.2-dev
2021-10-26 22:36:59 -04:00
Jennifer Wang 5a5a6f9cd2 lotus v1.13.1-rc1 2021-10-26 22:31:32 -04:00
Jennifer Wang 14c26567b2 bump the master version to v1.13.2-dev 2021-10-26 21:58:02 -04:00
Jiaying Wang 8efc8051d1 Merge pull request #7563 from filecoin-project/jen/7561
fix  the withdrawn amount unit
2021-10-26 21:13:22 -04:00
Jiaying Wang bcfe7a76e8 Merge pull request #7562 from filecoin-project/raulk/rename-makeActor
rename vm#make{=>Account}Actor().
2021-10-26 20:55:09 -04:00
Jiaying Wang 7d17ee5960 Merge pull request #7566 from filecoin-project/jen/actor
update to actor v6.0.1 to make the logs less noisy
2021-10-26 20:53:35 -04:00
Jennifer Wang dc6bd2b015 use existing util 2021-10-26 20:53:16 -04:00
Jennifer Wang 724dfc6a4d tidy 2021-10-26 20:10:18 -04:00
Jennifer Wang 47b82bdaea update to actor v6.0.1 to make the logs less noisy 2021-10-26 19:53:53 -04:00
Jennifer Wang 0fc1239445 make jen 2021-10-26 19:50:17 -04:00
Jennifer Wang 18834de7d0 parse attofil to fil 2021-10-26 19:37:29 -04:00
Jiaying Wang 6607019788 Merge pull request #7564 from filecoin-project/jen/proof
update to proof v10.1.0
2021-10-26 14:45:30 -04:00
Jennifer Wang 1f339f623e update to proof v10.1.0 2021-10-26 14:36:19 -04:00
Raúl Kripalani 95d294db63 rename vm#make{=>Account}Actor(). 2021-10-26 19:11:00 +01:00
emad22552 4eaf89666f fix manual-stateless-deal with interactive
fix checking manual-stateless-deal with interactive deal making as --manual-stateless-deal can not be combined with interactive deal mode.
2021-10-26 14:00:41 +03:30
Jiaying Wang a94a48f70b Merge pull request #7546 from filecoin-project/jen/deep-da-boss-order
To make Deep happy
2021-10-26 01:49:02 -04:00
yaohcn 3bfaf5af16 add missing NodeType tag 2021-10-22 10:19:23 +08:00
yaohcn 3123400759 checkCommit should return SectorCommitFailed 2021-10-22 10:09:44 +08:00
Aayush Rajasekaran e1deed3b1a Merge pull request #7544 from filecoin-project/asr/shed
Shed: Add a util to find miner based on peerid
2021-10-20 17:55:16 -07:00
jennijuju 9369c54f54 rename a fil plus cmd upon request 2021-10-20 17:53:16 -07:00
Jiaying Wang 67c732a100 Merge pull request #7537 from filecoin-project/jen/13tomaster
misc: back-port v1.13.0 back to master
2021-10-20 17:30:47 -07:00
jennijuju 3f7b15b598 Resolve Conflicts 2021-10-20 17:23:09 -07:00
Łukasz Magiera f7884c4f45 Merge pull request #7527 from filecoin-project/feat/show-prepared-waitres
Show prepared tasks in sealing jobs
2021-10-20 15:22:35 +01:00
Łukasz Magiera a60ccbf106 Merge pull request #7541 from filecoin-project/feat/sector-state-prom
Expose per-state sector counts on the prometheus endpoint
2021-10-20 15:22:22 +01:00
Łukasz Magiera 97e4921a4a Merge pull request #7542 from filecoin-project/feat/gs-metrics
Collect and expose graphsync metrics
2021-10-20 15:22:03 +01:00
Łukasz Magiera 8182ffcf9f Merge pull request #7532 from filecoin-project/chore/unpin-yamux
unpin the yamux dependency
2021-10-20 14:58:11 +01:00
Aayush Rajasekaran 9ba7f372cd Shed: Add a util to find miner based on peerid 2021-10-19 18:46:09 -07:00
Łukasz Magiera b7fe165b8f metrics: More correct units in graphsync metrics 2021-10-19 19:57:47 +02:00
Łukasz Magiera d2e9d21031 Gather graphsync metrics on provider side as well 2021-10-19 19:45:25 +02:00
Łukasz Magiera 32a855b984 Fix lint 2021-10-19 19:22:32 +02:00
Łukasz Magiera 9a993d25d0 Collect and expose graphsync metrics 2021-10-19 19:20:00 +02:00
Łukasz Magiera b1c06ece85 mod tidy 2021-10-19 19:03:53 +02:00
Łukasz Magiera 32ce12acfc Update go-graphsync to v0.10.4 2021-10-19 19:03:38 +02:00
Łukasz Magiera 726d9b86ea fix lint 2021-10-19 18:56:30 +02:00
Łukasz Magiera 852ac4c178 Expose per-state sector counts on the prometheus endpoint 2021-10-19 18:53:07 +02:00
Łukasz Magiera d9100981ad Merge pull request #7495 from filecoin-project/feat/inline-codegen
Inline codegen
2021-10-19 10:25:32 +01:00
Łukasz Magiera e508055dc1 make gen 2021-10-19 11:13:23 +02:00
Łukasz Magiera ba171954b4 Merge pull request #7479 from filecoin-project/feat/prov-check-by-storage
Add storage-id flag to proving check
2021-10-19 10:06:30 +01:00
Łukasz Magiera 1d8a9c75d4 Use .latestActorsVersion in actors/version.go 2021-10-19 11:05:14 +02:00
Łukasz Magiera c2d4dcae19 Merge pull request #7538 from filecoin-project/feat/markets-v1.13.3
Update to go-fil-markets v1.13.3
2021-10-19 10:02:33 +01:00
Dirk McCormick 116ed01197 feat: update to go-fil-markets v1.13.3 2021-10-19 10:03:07 +02:00
jennijuju 7b8d1cc54c Merge branch 'releases' into jen/13tomaster 2021-10-18 20:58:28 -07:00
Jiaying Wang 7a55e8e892 Merge pull request #7534 from filecoin-project/release/v1.13.0
Release/v1.13.0
2021-10-18 18:43:32 -07:00
Jiaying Wang 3ab8ec57f1 Merge pull request #7533 from filecoin-project/jen/v13
v1.13.0 prep
2021-10-18 18:31:33 -07:00
Jiaying WangandAayush Rajasekaran 0e17b6c066 Update CHANGELOG.md
Co-authored-by: Aayush Rajasekaran <arajasek94@gmail.com>
2021-10-18 18:20:13 -07:00
Jiaying WangandAayush Rajasekaran 44e092c07c Update CHANGELOG.md
Co-authored-by: Aayush Rajasekaran <arajasek94@gmail.com>
2021-10-18 18:20:07 -07:00
jennijuju c8a187e779 update the changelog 2021-10-18 18:13:14 -07:00
jennijuju 76d009e409 bump the version to v1.13.0
export SEND_GRID_USER_VERIFICATION_ID=d-cee69cd8d2e34c09b8454cb58cb18b69
2021-10-18 13:55:06 -07:00
Łukasz Magiera 080aa3356a Fix locks in worker-tracked 2021-10-18 20:19:21 +02:00
Steven Allen 3b2e8c439a unpin the yamux dependency
This has been pinned for a while under suspicion that it was causing
graphsync stalls. However, the libp2p team has been unable to reliably
reproduce the issue and believes that it's likely a graphsync issue.

Libp2p issue: https://github.com/libp2p/go-yamux/issues/61
2021-10-18 10:44:32 -07:00
Łukasz Magiera 70589e4406 Block work in tracked worker before it is started 2021-10-18 18:44:56 +02:00
Łukasz Magiera 261238e157 Show prepared tasks in sealing jobs 2021-10-18 18:44:56 +02:00
Łukasz Magiera 11d738eee0 Track prepared work 2021-10-18 18:44:56 +02:00
Łukasz Magiera 3943c3ae6f inline-gen: Fix lint 2021-10-18 17:54:12 +02:00
Łukasz Magiera 463f55ba13 Use more inline-gen 2021-10-18 17:46:50 +02:00
Łukasz Magiera e493d9e2e3 make: Run inline-gen 2021-10-18 17:33:28 +02:00
Łukasz Magiera 19f52b4541 inline-gen: Slightly nicer comment format 2021-10-18 17:21:53 +02:00
Łukasz Magiera 9606dce425 Add inline-gen to itests 2021-10-18 17:17:54 +02:00
Łukasz Magiera 98ff1c4d20 Merge pull request #7531 from marten-seemann/statfs-build-constraint
add missing build constraint to statfs_unix.go
2021-10-18 16:02:48 +01:00
Łukasz Magiera e5d73f2923 Merge pull request #7530 from filecoin-project/fix/ap-fail-used-acc
Fix used sector space accounting after AddPieceFailed
2021-10-18 15:55:37 +01:00
Marten Seemann 03806f7063 add missing build constraint to statfs_unix.go 2021-10-18 16:29:01 +02:00
Łukasz Magiera 63c8b8edd1 Fix used sectors space accounting after AddPieceFailed 2021-10-18 09:55:28 +02:00
Łukasz Magiera a0795165af Merge pull request #7494 from filecoin-project/fix/move-shared-data-loss
Don't remove sector data when moving data into a shared path
2021-10-15 08:16:10 +01:00
Jiaying Wang c23cff45f6 Merge pull request #7492 from filecoin-project/jen/v1.13.0-rc3-prep
v1.13.0 rc3
2021-10-13 23:00:26 -04:00
Jennifer Wang 02cef1353e update changelog 2021-10-13 22:49:52 -04:00
Łukasz Magiera 008120747e sealing: Recover sectors after failed AddPiece 2021-10-13 21:29:54 -04:00
frrist 9964f80bb7 fix: support node instantiation in external packages
- implement ChainGetPath on ChainModuleAPI
2021-10-13 21:29:26 -04:00
Jiaying Wang afe54ab5f3 Merge pull request #7511 from filecoin-project/frrist/fix-lily
fix: support node instantiation in external packages
2021-10-13 20:33:17 -04:00
frrist 6cd6732225 fix: support node instantiation in external packages
- implement ChainGetPath on ChainModuleAPI
2021-10-13 15:24:28 -07:00
Jiaying WangandAayush Rajasekaran 429b9a1bc5 Update CHANGELOG.md
Co-authored-by: Aayush Rajasekaran <arajasek94@gmail.com>
2021-10-13 11:37:58 -04:00
Aayush Rajasekaran d063a32def Merge pull request #7507 from filecoin-project/jen/12tomaster
releases -> master
2021-10-13 11:16:57 -04:00
jennijuju 1ebd908fe3 update CHANGELOG 2021-10-12 20:15:50 -04:00
jennijuju e1a08b1c89 Merge branch 'releases' into jen/v1.13.0-rc3-prep 2021-10-12 20:15:18 -04:00
jennijuju dd998037cf Merge branch 'releases' into jen/12tomaster 2021-10-12 20:06:55 -04:00
Jiaying Wang 6d8a6c480f Merge pull request #7505 from filecoin-project/release/v1.12.0
Release/v1.12.0
2021-10-12 19:51:06 -04:00
Jiaying Wang b1b558ed07 Update CHANGELOG.md 2021-10-12 19:40:53 -04:00
Jiaying Wang 593c7e78b1 Update CHANGELOG.md 2021-10-12 19:37:54 -04:00
Jiaying Wang 9a3c8a2134 Update CHANGELOG.md 2021-10-12 19:33:06 -04:00
Jiaying WangandAayush Rajasekaran c54ecd2802 Update CHANGELOG.md
Co-authored-by: Aayush Rajasekaran <arajasek94@gmail.com>
2021-10-12 19:28:25 -04:00
Jiaying Wang d5e22e0fee Merge pull request #7506 from filecoin-project/jen/v1.12.0
v1.12.0
2021-10-12 19:25:07 -04:00
jennijuju 1a3a4d23c0 update the changelog 2021-10-12 19:24:05 -04:00
Jiaying Wang 0eb2152012 Merge pull request #7480 from filecoin-project/jen/v1.12.0-rc2-prep
v1.12.0-rc2
2021-10-12 19:15:26 -04:00
jennijuju 57f1cd71ad bump the version to v1.12.0 2021-10-12 15:21:06 -04:00
jennijuju fa64cacfa7 integrate actor v6 2021-10-12 15:11:06 -04:00
Łukasz Magiera 9dbeb3028d Merge pull request #7499 from filecoin-project/arajasek-patch-1
FilecoinEC: Improve a log message
2021-10-12 16:13:00 +01:00
Aayush Rajasekaran 8e168cb657 FilecoinEC: Improve a log message 2021-10-12 10:34:47 -04:00
Łukasz Magiera 5616dfb1bc Some more inline codegen 2021-10-11 22:57:24 +02:00
Łukasz Magiera ddef708178 Basic inline codegen 2021-10-11 22:25:41 +02:00
Łukasz Magiera 67bdc266af Merge pull request #7493 from filecoin-project/jen/12-master
Make chocolate back to master
2021-10-11 20:45:20 +01:00
Łukasz Magiera f352c18290 Don't remove sector data when moving data into a shared path 2021-10-11 21:11:38 +02:00
Jennifer Wang d1e15e61d0 Merge branch 'release/v1.12.0' into jen/12-master 2021-10-11 14:37:32 -04:00
Jennifer Wang 9fcc27edd5 Merge branch 'release/v1.12.0' into jen/v1.13.0-rc3-prep 2021-10-11 14:11:01 -04:00
Rod Vagg e47cbae885 chore(deps): use tagged github.com/ipld/go-ipld-selector-text-lite
Ref: https://github.com/filecoin-project/lotus/pull/6393#discussion_r722866111
2021-10-11 13:24:50 -04:00
Jakub Sztandera 1a6c9b9c0e gofmt
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2021-10-11 13:18:54 -04:00
Jakub Sztandera f1b4d2b1b3 Fix missnamed variable
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2021-10-11 13:18:49 -04:00
Jakub SztanderaandJiaying Wang 1bd7f5b7ec Fix withdrawn amount equiality check
Co-authored-by: Jiaying Wang <42981373+jennijuju@users.noreply.github.com>
2021-10-11 13:18:39 -04:00
Jakub SztanderaandJiaying Wang 8319323329 Fix withdrawn amount equiality check
Co-authored-by: Jiaying Wang <42981373+jennijuju@users.noreply.github.com>
2021-10-11 13:18:34 -04:00
Jakub SztanderaandJiaying Wang 20544b6b7b Fix withdrawn amount equiality check
Co-authored-by: Jiaying Wang <42981373+jennijuju@users.noreply.github.com>
2021-10-11 13:18:17 -04:00
Aayush RajasekaranandJiaying Wang 1242e4a292 Update cmd/lotus-miner/actor.go
Co-authored-by: Jiaying Wang <42981373+jennijuju@users.noreply.github.com>
2021-10-11 13:18:12 -04:00
Aayush Rajasekaran 42a233c083 Bugfix: Use current startup network versions 2021-10-11 13:15:57 -04:00
Aayush Rajasekaran 047f7e5015 Bugfix: actor withdraw CLI should depend on network version 2021-10-11 13:13:33 -04:00
Jiaying Wang d1e1f8bdce Merge pull request #7482 from filecoin-project/chore/backport_cleanup-withdrawn-dependency
Chore/backport cleanup withdrawn dependency
2021-10-11 13:09:32 -04:00
Jiaying Wang 6e61431759 Merge pull request #7480 from filecoin-project/jen/v1.12.0-rc2-prep
v1.12.0-rc2
2021-10-11 12:57:58 -04:00
Jennifer Wang 16743a25c2 print confidence in decimal 2021-10-11 12:34:51 -04:00
Jiaying Wang 3a3edbbb16 Merge pull request #7489 from filecoin-project/feat/go-fil-marketsv1.13.2
update to go-fil-markets v1.13.2
2021-10-11 10:42:15 -04:00
Dirk McCormick 8957213c56 feat: update to go-fil-markets v1.13.2 2021-10-11 15:29:59 +02:00
dirkmc f9433811c7 Merge pull request #7454 from filecoin-project/nonsense/retry-in-publish-deal
itests: retry deal when control addr is out of funds
2021-10-11 15:14:27 +02:00
Jennifer Wang a5ee1c69fe update the changelog 2021-10-11 08:48:58 -04:00
Jakub Sztandera 61e1297cc7 gofmt
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2021-10-11 08:24:55 -04:00
Jakub Sztandera bb74308ac9 Fix missnamed variable
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2021-10-11 08:24:50 -04:00
Jakub SztanderaandJiaying Wang 8eeecb431b Fix withdrawn amount equiality check
Co-authored-by: Jiaying Wang <42981373+jennijuju@users.noreply.github.com>
2021-10-11 08:24:45 -04:00
Łukasz Magiera df2a852e6c Merge pull request #7477 from filecoin-project/chore/fix-docsgen-cli-envvar-polution
Stop adding Jennifer's $HOME to lotus docs
2021-10-11 13:24:35 +01:00
Jakub SztanderaandJiaying Wang e40c7b7a86 Fix withdrawn amount equiality check
Co-authored-by: Jiaying Wang <42981373+jennijuju@users.noreply.github.com>
2021-10-11 08:24:33 -04:00
Jakub SztanderaandJiaying Wang 177033d0f2 Fix withdrawn amount equiality check
Co-authored-by: Jiaying Wang <42981373+jennijuju@users.noreply.github.com>
2021-10-11 08:24:24 -04:00
Aayush RajasekaranandJiaying Wang cab724841a Update cmd/lotus-miner/actor.go
Co-authored-by: Jiaying Wang <42981373+jennijuju@users.noreply.github.com>
2021-10-11 08:24:00 -04:00
Aayush Rajasekaran 2241f02621 Bugfix: actor withdraw CLI should depend on network version 2021-10-11 08:23:53 -04:00
Łukasz Magiera c6b28b4d8b Merge pull request #7481 from filecoin-project/chore/cleanup-withdrawn-dependency
peerstore@v0.2.9 was withdrawn, let's not depend on it directly
2021-10-11 13:23:43 +01:00
Jiaying Wang c92d73384b Merge pull request #7483 from filecoin-project/asr/withdraw-fix
Bugfix: withdraw CLIs should depend on network version
2021-10-11 08:23:23 -04:00
Jakub Sztandera 5abba9ca9f gofmt
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2021-10-11 14:10:06 +02:00
Jakub Sztandera 35291983a1 Fix missnamed variable
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2021-10-11 14:06:21 +02:00
Anton Evangelatov a19dbb8c91 remove log 2021-10-11 14:03:56 +02:00
Anton Evangelatov 6a3bb184b7 more tests for deals when provider has no funds in control addr 2021-10-11 14:03:56 +02:00
Anton Evangelatov 1acb6b4328 update CLI command to take arg; reduce time for itest 2021-10-11 14:03:56 +02:00
Anton Evangelatov 6e5ccc87cf cli: add retry for deals stuck in Publish with no funds 2021-10-11 14:03:55 +02:00
Jakub SztanderaandJiaying Wang 4853762763 Fix withdrawn amount equiality check
Co-authored-by: Jiaying Wang <42981373+jennijuju@users.noreply.github.com>
2021-10-11 14:03:37 +02:00
Jakub SztanderaandJiaying Wang 8533ae0032 Fix withdrawn amount equiality check
Co-authored-by: Jiaying Wang <42981373+jennijuju@users.noreply.github.com>
2021-10-11 14:03:28 +02:00
Jakub SztanderaandJiaying Wang 90ff1d3ccf Fix withdrawn amount equiality check
Co-authored-by: Jiaying Wang <42981373+jennijuju@users.noreply.github.com>
2021-10-11 14:03:21 +02:00
Aayush Rajasekaran 23c6597836 Bugfix: Use current startup network versions 2021-10-11 08:02:58 -04:00
Jiaying Wang b4302df892 Merge pull request #7486 from filecoin-project/asr/builds
Bugfix: Use correct startup network versions
2021-10-11 07:37:19 -04:00
Aayush Rajasekaran 1723793c35 Bugfix: Use current startup network versions 2021-10-10 14:26:10 -04:00
Aayush RajasekaranandJiaying Wang be774f55ce Update cmd/lotus-miner/actor.go
Co-authored-by: Jiaying Wang <42981373+jennijuju@users.noreply.github.com>
2021-10-10 10:40:22 -04:00
Aayush Rajasekaran e158b1d1e4 Bugfix: actor withdraw CLI should depend on network version 2021-10-09 20:17:03 -04:00
Peter Rabbitson 28e94bf9db peerstore@v0.2.9 was withdrawn, let's not depend on it directly 2021-10-08 22:55:15 +02:00
Peter Rabbitson 6184e8a943 peerstore@v0.2.9 was withdrawn, let's not depend on it directly 2021-10-08 22:47:51 +02:00
Jennifer Wang fb4ef413f4 bump the version to v1.12.0-rc2 2021-10-08 15:15:29 -04:00
Cory Schwartz b0687ecb09 restore filters for the build-macos job 2021-10-08 15:15:25 -04:00
Jennifer Wang 46688e501b set network v14 chocolate upgrade epoch 2021-10-08 15:10:10 -04:00
Jennifer Wang e62aaa3d3d update to actor v6-rc2 2021-10-08 15:09:57 -04:00
Steven Allen c776811ea9 Merge pull request #7478 from filecoin-project/chore/depupgrade-2021-10-08
Dep upgrade pass
2021-10-08 10:05:28 -07:00
Łukasz Magiera c8042540d5 Merge pull request #7474 from filecoin-project/backport/prometheus-common-bump
Stop indirectly depending on deprecated github.com/prometheus/common
2021-10-08 14:15:52 +01:00
Łukasz Magiera bfcfb199a0 Add storage-id flag to proving check 2021-10-08 14:56:08 +02:00
Peter Rabbitson 8b01725129 Dep upgrade pass
Touching just the seemingly non-controversial ones
2021-10-08 12:37:40 +02:00
Peter Rabbitson cb39dd8ed0 Stop adding Jennifer's $HOME to lotus docs 2021-10-08 10:15:20 +02:00
Łukasz Magiera 734a03cf82 Merge pull request #7467 from filecoin-project/chore/normalize-recursive-sel-references
Normlize selector use within lotus
2021-10-07 19:05:07 +01:00
Łukasz Magiera aed6e8d0be Merge pull request #7335 from filecoin-project/feat/sched-ready-work
sealing: Improve scheduling of ready work
2021-10-07 18:49:02 +01:00
Peter Rabbitson ec0f7795d3 Stop indirectly depending on deprecated github.com/prometheus/common
Backport of #7473
2021-10-07 19:45:43 +02:00
Łukasz Magiera c95940acac Merge pull request #7466 from filecoin-project/chore/remove-dead-example
Remove dead example code + dep
2021-10-07 17:42:21 +01:00
Łukasz Magiera 3215eba0eb Merge pull request #7464 from filecoin-project/rvagg/tag-go-ipld-selector-text-lite
chore(deps): use tagged github.com/ipld/go-ipld-selector-text-lite
2021-10-07 17:41:41 +01:00
Łukasz Magiera 4e98f0abdc Merge pull request #7473 from filecoin-project/chore/bump-prometheus-export-get-out-of-deprecated-deploop
Stop indirectly depending on deprecated github.com/prometheus/common
2021-10-07 17:37:29 +01:00
Łukasz Magiera 0ba88ac53a Merge pull request #7469 from filecoin-project/chore/remove-obsolete-gs-testplan
Remove obsolete GS testplan - it now lives in go-graphsync
2021-10-07 17:35:25 +01:00
Peter Rabbitson 2c10dc6c57 Stop indirectly depending on deprecated github.com/prometheus/common parts 2021-10-07 18:23:13 +02:00
Peter Rabbitson 778483166f Remove obsolete GS testplan - it now lives in go-graphsync 2021-10-07 12:23:43 +02:00
Peter Rabbitson a40aa9f90b Normlize selector use within lotus 2021-10-07 11:01:29 +02:00
Peter Rabbitson c4a7de9d37 Remove dead example code + dep 2021-10-07 09:44:50 +02:00
Rod Vagg 9e76aba3d1 chore(deps): use tagged github.com/ipld/go-ipld-selector-text-lite
Ref: https://github.com/filecoin-project/lotus/pull/6393#discussion_r722866111
2021-10-07 17:34:28 +11:00
Łukasz Magiera 1993efe201 Merge pull request #7444 from filecoin-project/feat/ap-fail-retry
sealing: Recover sectors after failed AddPiece
2021-10-07 03:18:15 +01:00
Łukasz Magiera e74f70346e Merge pull request #7456 from filecoin-project/asr/shed-util
Shed: Add a util to find the most recent null tipset
2021-10-07 03:18:02 +01:00
Jiaying Wang 530011fd09 Merge pull request #7458 from filecoin-project/jen/13rc2prep
v1.13.0-rc2
2021-10-06 22:16:36 -04:00
Łukasz Magiera 1cdb414bf8 Merge pull request #7457 from filecoin-project/feat/update-graphsync-v0.10.1
Update go-graphsync v0.10.1
2021-10-07 03:08:04 +01:00
Jennifer Wang a572787013 v1.13.0-rc1 2021-10-06 21:20:19 -04:00
Cory Schwartz 3f92940a19 restore filters for the build-macos job 2021-10-06 21:18:51 -04:00
Jiaying Wang 177aa3cffd Merge pull request #7455 from filecoin-project/restore-macos-filters
restore filters for the build-macos job
2021-10-06 21:18:24 -04:00
hannahhoward 6e44755b55 feat(deps): update go-graphsync v0.10.1 2021-10-06 21:08:36 -04:00
hannahhoward 7e6c3a330a feat(deps): update go-graphsync v0.10.1 2021-10-06 17:21:38 -07:00
Aayush Rajasekaran 89db4235ce Shed: Add a util to find the most recent null tipset 2021-10-06 19:37:35 -04:00
Cory Schwartz 001fc7dd53 restore filters for the build-macos job 2021-10-06 13:40:44 -07:00
Jiaying Wang 46ae2556c7 Merge pull request #7452 from filecoin-project/jen/13prep
v1.13.0-rc1
2021-10-06 02:12:44 -04:00
Jennifer Wang 9b69b10fea update changelog 2021-10-06 02:02:11 -04:00
Jiaying Wang a460ab84fa Merge pull request #7451 from filecoin-project/jen/masterbump
bump master to v1.13.1-dev
2021-10-06 01:34:56 -04:00
Jennifer Wang bac783774d v1.13.0-rc1 2021-10-06 00:36:23 -04:00
Jennifer Wang 4221461ede bump master to v1.13.1-dev 2021-10-06 00:31:41 -04:00
Aayush Rajasekaran a324b3fce0 Merge pull request #7450 from filecoin-project/arajasek-patch-1
StateSearchMsg: Correct usage of the allowReplaced flag
2021-10-06 00:25:02 -04:00
Aayush Rajasekaran bd2176c398 Test StateSearchMsg's use of the allowReplaced flag 2021-10-05 23:58:31 -04:00
Aayush Rajasekaran 441bcdc4af StateSearchMsg: Correct usage of the allowReplaced flag 2021-10-05 23:58:16 -04:00
Jiaying Wang 26ae8bb3a7 Merge pull request #6393 from filecoin-project/feat/datamodel-selector-retrieval
Feat/datamodel selector retrieval
2021-10-05 12:27:41 -04:00
Peter Rabbitson f8ac98bf46 Adjust error wording 2021-10-05 18:16:14 +02:00
Peter Rabbitson 5e6aceeb0e Merge remote-tracking branch 'origin/master' into feat/datamodel-selector-retrieval 2021-10-05 18:15:51 +02:00
Jiaying Wang cbb147de23 Merge pull request #7405 from filecoin-project/feat/update-graphsync-0.10.0
Update to graphsync to v0.10.0, enable seperate storage and retrieval transfer limits
2021-10-05 11:50:59 -04:00
Jiaying Wang f60692c7ef Merge pull request #7427 from filecoin-project/rvagg/traversal-budget
Limit maximum number of DAG links to traverse
2021-10-05 11:21:14 -04:00
Rod Vagg 97c2cdb8d6 traversals: limit link load count for SelectiveCar use as well 2021-10-05 10:47:49 +02:00
Rod Vagg 43f7fd5e10 traversals: limit maximum number of DAG links to traverse
Impacts CommP and graphsync transfers
2021-10-05 10:47:49 +02:00
Dirk McCormick a4e2fce9ca feat: update to go-fil-markets v1.13.1 2021-10-05 10:40:01 +02:00
Rod Vagg bff3af81d5 chore(docs): docsgen 2021-10-05 14:25:14 +11:00
Jiaying Wang 1d2f84322d Merge pull request #7440 from filecoin-project/jen/12tomaster
Chocolate to master
2021-10-04 23:20:19 -04:00
hannahhoward 368d72ebfe feat(graphsync): update to v0.10.0-rc1
also add config changes
2021-10-05 14:13:58 +11:00
Jiaying Wang 8d9f3719ce Update CHANGELOG.md 2021-10-04 22:51:01 -04:00
Peter Rabbitson af0d9b650d Error on corner cases with corresponding negative tests 2021-10-04 23:21:24 +02:00
Peter Rabbitson 2a1094fc17 Merge banch feat/go-fil-markets-v1.13.0 into feat/datamodel-selector-retrieval 2021-10-04 21:56:11 +02:00
Łukasz Magiera cadbd00ac4 sealing: Recover sectors after failed AddPiece 2021-10-04 20:00:07 +02:00
Dirk McCormick f70ec02a6c feat: go-fil-markets-v1.13.0 2021-10-04 17:35:32 +02:00
Dirk McCormick 16973bc2e8 feat: use go-fil-markets@v1.13.0 2021-10-04 15:41:40 +02:00
Jennifer Wang 38e01cba83 Merge branch 'release/v1.12.0' into jen/12tomaster 2021-10-04 02:38:00 -04:00
Łukasz Magiera 9af82f2d68 sched: Fix taskDone chan deadlock 2021-10-03 17:09:43 +02:00
Łukasz Magiera b87142ec8e wip improve scheduling of ready work 2021-10-03 10:38:08 +02:00
Aayush Rajasekaran 41be8fc9e5 Set the calibnet chocolate epoch 2021-10-02 17:28:46 -04:00
Aayush Rajasekaran ec14259b5a Prep the butterfly network for v14 2021-10-02 17:27:39 -04:00
Aayush Rajasekaran 172bbed962 Merge pull request #7426 from filecoin-project/jen/12rc1prep
v1.12.0-rc1 prep
2021-10-02 12:04:09 -04:00
Jennifer Wang faece90316 update butterfly 2021-10-01 20:37:13 -04:00
Jennifer Wang 2e1d463933 make lint happy 2021-10-01 20:36:13 -04:00
Jennifer Wang 5f8c44125b Merge branch 'releases' into jen/12rc1prep 2021-10-01 20:31:29 -04:00
Jennifer Wang 5b9104f68e add changelog 2021-10-01 19:55:12 -04:00
Jennifer Wang 2931be5fc5 bump the version to v1.12.0-rc1 2021-10-01 19:45:49 -04:00
Aayush Rajasekaran 50ce475701 Upgrade to actors v6-rc1 2021-10-01 17:57:32 -04:00
Aayush Rajasekaran 77de45f684 Set Chocolate upgrade epoch for butterfly 2021-10-01 17:50:46 -04:00
Travis Person 9b80ea4cf1 reset of the butterfly network 2021-10-01 17:33:58 -04:00
Travis Person c104cb446b reset butterfly network 2021-10-01 17:25:59 -04:00
Aayush Rajasekaran 207746f8c4 Merge pull request #7410 from filecoin-project/feat/nv14-pc-balancer
Precommit batch balancer support/config
2021-10-01 17:23:47 -04:00
Łukasz Magiera fc10281d96 Merge pull request #7420 from filecoin-project/deps/proofs-v10.0.0
Update proofs to v10.0.0
2021-10-01 22:20:09 +01:00
Aayush Rajasekaran a335cb3767 Update to latest actors 2021-10-01 17:11:05 -04:00
Aayush Rajasekaran 367112fd4b Merge pull request #7421 from filecoin-project/asr/fault-max
Extend FaultMaxAge to 6 weeks for actors v6 on test networks only
2021-10-01 16:35:08 -04:00
Aayush Rajasekaran 54695c6f8c Extend FaultMaxAge to 6 weeks for actors v6 on test networks only 2021-10-01 15:47:23 -04:00
Aayush Rajasekaran f004d036dc Set BatchPreCommitAboveBaseFee correctly 2021-10-01 14:23:41 -04:00
Aayush Rajasekaran f8a89cafd8 Fix logs 2021-10-01 14:23:41 -04:00
Aayush Rajasekaran d6dd86b419 Fix lint 2021-10-01 14:23:41 -04:00
Łukasz Magiera 6fd9d5f28b Precommit batch balancer support/config 2021-10-01 14:23:41 -04:00
Łukasz Magiera 28e720fef2 Merge pull request #7407 from filecoin-project/nonsense/check-deal-start-epoch-on-SectorAddPieceToAny
check for deal start epoch on SectorAddPieceToAny
2021-10-01 18:03:10 +01:00
Łukasz Magiera d7fbd8b67d Update proofs to v10.0.0 2021-10-01 18:38:27 +02:00
Anton Evangelatov 809289f5ef add Dealmaking.StartEpochSealingBuffer config 2021-10-01 17:44:15 +02:00
Anton Evangelatov c2fa54ca9c check for deal start epoch on SectorAddPieceToAny 2021-10-01 17:42:09 +02:00
Łukasz Magiera edcb28737c Merge pull request #7418 from filecoin-project/feat/storage-stats
Expose storage stats on the metrics endpoint
2021-10-01 15:40:14 +01:00
Łukasz Magiera a8a9818043 Expose storage states on the metrics endpoint 2021-10-01 14:45:01 +02:00
Łukasz Magiera 95e8b59367 Merge pull request #7341 from filecoin-project/mg/feat/panic-reporter
feat: Catch panic to generate report and reraise
2021-10-01 10:50:19 +01:00
Aayush Rajasekaran 1b1879342c Merge pull request #7412 from filecoin-project/feat/config-env-docs
Add envconfig docs to the config
2021-09-30 12:49:46 -04:00
Łukasz Magiera b3432b512e Generate default configs into docs 2021-09-30 18:23:53 +02:00
Łukasz Magiera 7c84e22c3e Add envconfig docs to the config 2021-09-30 18:23:05 +02:00
Aayush Rajasekaran 89d61ca238 Merge pull request #7404 from filecoin-project/asr/specs-update
Update to actors master
2021-09-30 11:19:03 -04:00
Mike GreenbergandŁukasz Magiera 2f8a2fc907 fix: Update lotusminer default paths
Co-authored-by: Łukasz Magiera <magik6k@users.noreply.github.com>
2021-09-30 09:06:55 -04:00
Łukasz Magiera 4192e40a9a Merge pull request #7403 from filecoin-project/jen/backport
releases -> master
2021-09-30 11:44:53 +01:00
Aayush Rajasekaran 0fd5dbee11 Merge pull request #7376 from filecoin-project/asr/fix-drand
Fix Drand fetching around null tipsets
2021-09-29 21:28:22 -04:00
Aayush Rajasekaran 8756df2447 Fix tests after specs update 2021-09-29 21:27:49 -04:00
Aayush Rajasekaran 84b6734063 Incorporate the new PublishStorageDealsReturn 2021-09-29 19:13:13 -04:00
Aayush Rajasekaran 2bafdf7271 Modify tooling to support new WithdrawBalance return 2021-09-29 13:01:04 -04:00
Aayush Rajasekaran dc8de20b9a Update to latest actors 2021-09-29 12:16:01 -04:00
Aayush Rajasekaran c3c46e9097 Fix Drand fetching around null tipsets 2021-09-29 11:57:59 -04:00
Jennifer Wang d7690aa719 Merge branch 'releases' into jen/backport 2021-09-29 03:21:19 -04:00
Jiaying Wang a0ddb10deb Merge pull request #7401 from filecoin-project/release/v1.11.3
Release/v1.11.3
2021-09-29 03:04:27 -04:00
Jiaying Wang bb244f2e0b Merge pull request #7400 from filecoin-project/jen/release-prep
v1.11.3 release prep
2021-09-29 02:52:20 -04:00
Jennifer Wang 7c015840a6 v1.11.3 release prep 2021-09-29 02:42:38 -04:00
Mike Greenberg 89d7a72a4b fix: undo hasty changes 2021-09-28 11:30:35 -04:00
Jakub Sztandera 98c99b4fea Merge pull request #5609 from filecoin-project/fix/vouchers
Verify Voucher locks in VoucherValidUnlocked
2021-09-28 14:29:04 +02:00
Łukasz Magiera cd66afb05c Merge pull request #7355 from filecoin-project/feat/shed-fr32
lotus shed: fr32 utils
2021-09-27 23:33:19 +01:00
Mike Greenberg c3faadf749 fix: Remove debug syscall; Tighten perms; Strip spaces in label 2021-09-27 17:54:43 -04:00
Aayush Rajasekaran d9e711eac5 Merge pull request #7378 from filecoin-project/asr/weight
ChainStore: Add a tiebreaker rule for tipsets of equal weight
2021-09-27 12:34:16 -04:00
Łukasz Magiera 83c8e981b4 lotus shed: fr32 utils 2021-09-27 18:31:36 +02:00
Aayush Rajasekaran 44405bd1a0 ChainStore: Add a tiebreaker rule for tipsets of equal weight 2021-09-27 10:23:30 -04:00
Łukasz Magiera dbcb662f9c Merge pull request #7384 from filecoin-project/feat/more-allinfo
Add more info to miner allinfo command
2021-09-27 11:54:19 +01:00
Łukasz Magiera 53a9dd5da4 Add more info to miner allinfo command 2021-09-24 12:02:06 +02:00
Łukasz Magiera 0e7e665e6d Merge pull request #7312 from filecoin-project/nonsense/crossref-datatransfer-storagedeal
add `lotus-miner storage-deals list --format=json` with transfers
2021-09-24 10:57:59 +01:00
Łukasz Magiera 8e0314b3a3 Merge pull request #7362 from filecoin-project/chore/update-libp2p
Update go-libp2p to v0.15.0
2021-09-23 14:24:12 +01:00
Łukasz Magiera 7759f13a13 Merge pull request #7373 from filecoin-project/jen/nerpa
remove nerpanet related code
2021-09-23 14:22:47 +01:00
Łukasz Magiera fa7a5789aa Merge pull request #7383 from lanzafame/patch-1
Fix formatting
2021-09-23 14:20:35 +01:00
Aarsh Shah 7694f895c2 update lotus soup dep 2021-09-23 09:15:47 +04:00
Adrian Lanzafame 92190c7e0b Fix formatting 2021-09-23 12:39:39 +10:00
Jennifer Wang f57d4b4126 say bye to more nerpa 2021-09-22 21:17:05 -04:00
Jiaying Wang 21148c90db Merge pull request #7377 from filecoin-project/mg/fix/binary-ci-check-grep
fix: escape periods to match actual periods in version
2021-09-22 21:15:27 -04:00
Łukasz Magiera 381638abea Merge pull request #7379 from filecoin-project/asr/msg-header
Sync: Sanity check msg siggy type
2021-09-22 23:32:25 +01:00
Aayush Rajasekaran 31666b9617 Sync: Sanity check msg siggy type 2021-09-22 16:59:11 -04:00
Jakub Sztandera 7e933f7045 Merge pull request #7366 from filecoin-project/feat/sync-master-main
sync branch main with master on updates
2021-09-22 21:03:55 +02:00
Mike Greenberg 67864334a3 fix: escape periods to match actual periods in version 2021-09-22 15:00:59 -04:00
Mike Greenberg 574b5c03dc chore: Expose build.BuildTypeString() 2021-09-22 09:58:07 -04:00
Łukasz Magiera e68c8cb1ee Merge pull request #7357 from filecoin-project/asr/v6actors
Add v6 actors
2021-09-22 11:08:10 +01:00
Mike Greenberg b3816bc2dc chore: inline build version within PanicReporter 2021-09-22 04:55:39 -04:00
Aarsh Shah 9a07c2fd38 revert go car update 2021-09-22 12:55:22 +04:00
Aarsh Shah 44ed3dc46b update go mod 2021-09-22 10:44:42 +04:00
Jennifer Wang 6064d2f2f1 remove nerpanet related code base as it was deprecated on aug 16 https://docs.filecoin.io/about-filecoin/networks/#deprecated-networks 2021-09-22 00:59:38 -04:00
Jiaying Wang 2c8357beb0 Merge pull request #7371 from filecoin-project/jen/rc2
v1.11.3-rc2
2021-09-21 23:10:44 -04:00
Jennifer Wang 08cec487cf make gen 2021-09-21 23:01:43 -04:00
Jennifer Wang 6b9aeca71d update the changelog 2021-09-21 22:51:01 -04:00
Jennifer Wang 153470c3d2 bump lotus version to v1.11.3-rc2 2021-09-21 22:48:56 -04:00
hannahhoward f77dc42ef0 fix(deps): use go-graphsync v0.9.3 with hotfix 2021-09-21 22:14:20 -04:00
hannahhoward 490f70f071 feat(deps): update go-graphsync v0.9.2 2021-09-21 22:14:04 -04:00
Anton Evangelatov 0c1e29390a unit test where StateMarketStorageDeal return nil, err 2021-09-21 22:13:51 -04:00
Anton Evangelatov bf9d0bca40 GetCurrentDealInfo err: handle correctly err case 2021-09-21 22:13:46 -04:00
Jiaying Wang 8e45d27a06 Merge pull request #7369 from filecoin-project/jen/proof
update to ffi to update-bellperson-proofs-v9-0-2
2021-09-21 22:08:39 -04:00
Jennifer Wang e996c27619 update to ffi to update-bellperson-proofs-v9-0-2 2021-09-21 17:43:27 -04:00
Travis Person ac2194b0eb sync branch main with master on updates 2021-09-21 20:07:41 +00:00
Aayush Rajasekaran 7b4c657e90 Add v6 actors 2021-09-21 14:23:14 -04:00
Aayush Rajasekaran b9bfcc4b69 Randomness: Move getters from ChainAPI to StateAPI 2021-09-21 14:20:15 -04:00
Łukasz Magiera fe56995244 Merge pull request #7363 from filecoin-project/nonsense/fix-filepath-join
fix staging area path buildup
2021-09-21 16:06:36 +01:00
Łukasz Magiera 714d7a146e Merge pull request #7359 from filecoin-project/feat/update-graphsync-v0.9.2
Update go-graphsync v0.9.2
2021-09-21 15:55:50 +01:00
Anton Evangelatov c7e4217693 fix staging area path buildup 2021-09-21 16:45:00 +02:00
Aarsh Shah 7863a269ad fix lotus-soup 2021-09-21 15:31:16 +04:00
hannahhoward e70cefaa28 fix(deps): use go-graphsync v0.9.3 with hotfix 2021-09-21 04:26:02 -07:00
Aarsh Shah a80bc34d59 fix build 2021-09-21 15:23:01 +04:00
Aarsh Shah 89ac8b09b5 update libp2p 2021-09-21 15:10:04 +04:00
Łukasz Magiera 2437a4182d Merge pull request #7322 from filecoin-project/asr/drand-state
Randomness: Move getters from ChainAPI to StateAPI
2021-09-21 09:20:12 +01:00
hannahhoward ee7b6f2470 feat(deps): update go-graphsync v0.9.2 2021-09-20 16:12:58 -07:00
Mike Greenberg 926858aeec fix: persist defaults to repo path; incl version dump 2021-09-20 15:40:48 -04:00
Łukasz Magiera 3c65595406 Merge pull request #7337 from ldoublewood/fix/wrong-life-time
fix bug for CommittedCapacitySectorLifetime
2021-09-19 14:51:52 +02:00
Jiaying Wang 38f7cbc6c7 Merge pull request #7346 from filecoin-project/nonsense/add-missing-continue-to-err-GetCurrentDealInfo
GetCurrentDealInfo err: handle correctly err case
2021-09-18 08:50:54 -04:00
Mike Greenberg b4a129068a fix: lint errors 2021-09-17 18:11:56 -04:00
Mike Greenberg ccf24b9952 chore: Configurable LOTUS_PANIC_JOURNAL_LOOKBACK 2021-09-17 18:09:47 -04:00
Mike Greenberg 3508a5b664 chore: Use After hooks and proper args 2021-09-17 18:01:54 -04:00
Mike Greenberg f79d34be5c chore: Separate repo and persistance paths 2021-09-17 18:01:26 -04:00
Jiaying Wang 79e141e71d Merge pull request #7331 from filecoin-project/mg/release/binary-version-check
feat(ci): include version/cli checks in tagged releases
2021-09-17 11:26:57 -04:00
Anton Evangelatov 605953565b unit test where StateMarketStorageDeal return nil, err 2021-09-17 15:14:53 +02:00
Anton Evangelatov 34e3dc2b37 GetCurrentDealInfo err: handle correctly err case 2021-09-17 14:55:56 +02:00
Mike Greenberg 595b51ecdd feat: Catch panic to generate report and reraise 2021-09-16 22:51:10 -04:00
ldoublewood eb2bbfebe3 format code by make gen 2021-09-17 00:20:24 +08:00
Łukasz Magiera 6df17bceb1 Merge pull request #7334 from filecoin-project/chore/sched-worklk
storagemgr: Cleanup workerLk around worker resources
2021-09-16 12:08:12 +02:00
Łukasz Magiera 45dc9697bf Merge pull request #7336 from filecoin-project/fix/dealcheck-panic
fix a panic in HandleRecoverDealIDs
2021-09-16 12:06:58 +02:00
ldoublewood 3a1fc8e7da fix bug for CommittedCapacitySectorLifetime 2021-09-16 09:25:02 +08:00
Łukasz Magiera 438d5ce78e fix a panic in HandleRecoverDealIDs 2021-09-15 18:13:01 +02:00
Mike Greenberg 90827afa47 feat(ci): include version/cli checks in tagged releases 2021-09-15 12:12:05 -04:00
Łukasz Magiera ef03314c6d storagemgr: Cleanup workerLk around worker resources 2021-09-15 16:35:19 +02:00
Łukasz Magiera 4fc78bf720 Merge pull request #7327 from filecoin-project/mg/feat/check-params-on-start
fix: Enforce verification key integrity check regardless of TRUST_PARAMS=1
2021-09-15 11:42:37 +02:00
Aayush Rajasekaran 1d6db306ec Randomness: Move getters from ChainAPI to StateAPI 2021-09-15 00:03:13 +02:00
Mike Greenberg b681078b06 feat(lotus): Ensure vk and srs keys are checked despite TRUST_PARAMS 2021-09-14 12:09:33 -04:00
Łukasz Magiera aab42dd96f Merge pull request #7328 from filecoin-project/asr/change-actor
Miner CLI: Allow trying to change owners of any miner actor
2021-09-14 12:17:05 +02:00
Aayush Rajasekaran 888b2040de Miner CLI: Allow trying to change owners of any miner actor 2021-09-14 11:50:30 +02:00
Łukasz Magiera e786a0507e Merge pull request #7307 from filecoin-project/jen/ci
build macOS CI
2021-09-11 00:18:37 -07:00
Jennifer Wang cd08788792 Bump the xcode version for ci and run build macos jobs more 2021-09-10 13:35:25 -04:00
ognots 143b6d7a37 remove job to install jq
jq is already installed now in either a newer version of CircleCI's MacOS VMs or in a previous CI step.
I ran a failing macos job with ssh enabled, and inspected '/usr/local/bin' and found found the following output

lrwxr-xr-x    1 distiller  admin    23 Jun 22 14:50 jq -> ../Cellar/jq/1.6/bin/jq

the existing symlink causes the 'Install jq' job to fail.
removing this job should resolve the issue
2021-09-10 13:32:17 -04:00
Łukasz Magiera aae9bf3f46 Merge pull request #7309 from filecoin-project/ci/mac-os-jq-fix
remove job to install jq
2021-09-10 09:21:19 -07:00
ognots 4d9b852875 remove job to install jq
jq is already installed now in either a newer version of CircleCI's MacOS VMs or in a previous CI step.
I ran a failing macos job with ssh enabled, and inspected '/usr/local/bin' and found found the following output

lrwxr-xr-x    1 distiller  admin    23 Jun 22 14:50 jq -> ../Cellar/jq/1.6/bin/jq

the existing symlink causes the 'Install jq' job to fail.
removing this job should resolve the issue
2021-09-10 10:21:40 -04:00
Anton Evangelatov 3e10f2e250 make gen 2021-09-10 15:18:32 +02:00
Anton Evangelatov 67dc7523d5 fixup 2021-09-10 15:09:37 +02:00
Anton Evangelatov caaff9b7af remove flag 2021-09-10 15:06:51 +02:00
Anton Evangelatov fe602ab3bb refactor 2021-09-10 15:05:51 +02:00
Łukasz Magiera 20a7193b06 Merge pull request #7311 from filecoin-project/feat/minerinfo-more-dealstates
Show more deal states in miner info
2021-09-10 04:18:00 -07:00
Łukasz Magiera 65befc281e Merge pull request #7310 from swift-mx/master
fix: check padSector Cid
2021-09-10 03:39:48 -07:00
Łukasz Magiera b4a3eb55e1 Show more deal states in miner info 2021-09-10 12:21:33 +02:00
Anton Evangelatov 027c1b5ab8 add lotus-miner storage-deals lwt 2021-09-10 12:21:02 +02:00
swift-mx b0b016b58c fix: check padSector Cid 2021-09-10 18:13:07 +08:00
Peter Rabbitson 0444435589 Expose basic text-based datamodel selector on retrieval
Syntaxt of selection is located at
https://pkg.go.dev/github.com/ipld/go-ipld-selector-text-lite#SelectorSpecFromPath

Example use, assuming that:
  - The root of the deal is a plain dag-pb unixfs directory
  - The directory is not sharded
  - The user wants to retrieve the first entry in that directory

  lotus client retrieve --miner f0XXXXX --datamodel-path-selector 'Links/0/Hash' bafyROOTCID ~/output

For a much more elaborate example see the top of ./itests/deals_partial_retrieval_test.go
2021-09-10 09:44:11 +02:00
Łukasz Magiera 0a04302fb2 Merge pull request #7308 from filecoin-project/feat/sectors-list-unproven
Add --unproven flag to the sectors list command
2021-09-09 17:08:58 -07:00
Łukasz Magiera 8612d1e824 Add --unproven flag to the sectors list command 2021-09-09 23:29:52 +02:00
Jiaying Wang 1ce7c250d7 Merge pull request #7306 from filecoin-project/chore/prep-retrieval-for-selectors_no-func-changes
Prep retrieval for selectors: no functional changes
2021-09-09 10:45:42 -07:00
Peter Rabbitson 2c5f4386ba Prepare the retrieval codepath for selectors
Slight import-name shuffle, no functional changes
2021-09-09 12:42:58 +02:00
Łukasz Magiera 92c12f9bde Merge pull request #7304 from filecoin-project/asr/seed
Seed: improve helptext
2021-09-09 02:45:49 -07:00
Łukasz Magiera 3b25934649 Merge pull request #7305 from filecoin-project/asr/mempool-hash
Mempool: reduce size of sigValCache
2021-09-09 02:43:53 -07:00
Aayush Rajasekaran aef741ae19 Mempool: reduce size of sigValCache 2021-09-08 16:08:41 -04:00
Aayush Rajasekaran 16c60914eb Seed: improve helptext 2021-09-08 15:26:37 -04:00
Jiaying Wang 5db02ca059 Merge pull request #7299 from filecoin-project/jen/v1.11.3-rc1-prep
v1.11.3-rc1
2021-09-07 23:08:28 -07:00
Jennifer Wang d8a5812f76 increase miner codecov threshold from 1% to 1.5% 2021-09-08 01:57:33 -04:00
Jennifer Wang daf0b57528 make gen 2021-09-08 01:42:51 -04:00
Jennifer Wang b7c6143cef init v1.11.3 changelog 2021-09-08 01:36:07 -04:00
Jiaying Wang d1d8845ab2 Merge pull request #7298 from filecoin-project/jen/v1.11.4-dev
bump master to v1.11.4-dev
2021-09-07 22:33:14 -07:00
Jennifer Wang 6907797783 version bump v1.11.3-rc1 2021-09-08 01:31:23 -04:00
Jennifer Wang 612befc962 bump master to v1.11.4-dev 2021-09-08 01:23:35 -04:00
Jiaying Wang aa09b799b3 Merge pull request #7297 from filecoin-project/jen/proof
update to proof v0.9.2
2021-09-07 22:11:45 -07:00
Jennifer Wang f751291f1a update to proof v0.9.2 2021-09-08 01:03:11 -04:00
Łukasz Magiera b7f771b258 Merge pull request #7261 from filecoin-project/feat/sectors-list-sealing-deals
Show deal sizes is sealing sectors
2021-09-07 11:17:19 -07:00
Łukasz Magiera 93e1c80569 Merge pull request #7291 from Kayuii/master
docker entrypoint.sh missing variable escape character
2021-09-07 10:57:20 -07:00
Łukasz Magiera dfc039276d address review 2021-09-07 19:42:52 +02:00
Łukasz Magiera 8b9e9fede4 docsgen 2021-09-07 18:49:53 +02:00
Łukasz Magiera 186c4990dd Reduce nesting in sectors list command 2021-09-07 18:49:53 +02:00
Łukasz Magiera e4044151f0 Show deal sizes is sealing sectors 2021-09-07 18:49:53 +02:00
Jiaying Wang b089cc4fc3 Merge pull request #7294 from filecoin-project/feat/update-graphsync-v0.9.1
Update go-graphsync v0.9.1
2021-09-07 08:27:10 -07:00
hannahhoward a63bc10d26 feat(deps): update go-graphsync v0.9.1 2021-09-07 16:24:06 +02:00
Steven Allen b093d8a6e4 Merge pull request #7292 from filecoin-project/nonsense/fix-flaky-test-increase-deal-size
itests: remove cid equality comparison
2021-09-07 12:21:03 +02:00
Anton Evangelatov 567d0546ec itests: remove equality comparison for cids 2021-09-07 10:57:10 +02:00
KAYUII a75d67a42c Update docker-lotus-miner-entrypoint.sh
Missing variable escape character
2021-09-07 15:11:29 +08:00
KAYUII 4f5fa3be3c Update docker-lotus-entrypoint.sh
Missing variable escape character
2021-09-07 15:10:43 +08:00
Jiaying Wang 0216697b98 Merge pull request #7288 from filecoin-project/jen/backport
v1.11.2 -> master
2021-09-06 18:35:29 -07:00
Jennifer Wang 768ecbc397 Merge branch 'releases' into jen/backport 2021-09-06 21:24:57 -04:00
Jiaying Wang 785a54692b Merge pull request #7284 from filecoin-project/release/v1.11.2
Release/v1.11.2
2021-09-06 17:23:39 -07:00
Jiaying Wang 41b8b6d416 Merge pull request #7266 from filecoin-project/jen/v1.11.2-final
v1.11.2
2021-09-06 17:11:50 -07:00
Jennifer Wang aef4cc829b add dag bulk initialization note in changelog 2021-09-06 19:53:57 -04:00
Jennifer Wang f7b90cb5c1 docsgen 2021-09-06 19:36:10 -04:00
Jennifer Wang db34b828e4 update changelog 2021-09-06 19:25:19 -04:00
Łukasz Magiera ff12fd3a61 Merge pull request #7273 from frankffenn/fix/commit-batch-panic
fix index out of range
2021-09-06 10:24:42 -07:00
Jiaying Wang 52cb19cc5c Merge pull request #7234 from filecoin-project/feat/dealpub-validation
dealpublisher: Fully validate deals before publishing
2021-09-06 10:12:11 -07:00
Łukasz Magiera 3a3a4fc413 Merge pull request #7276 from filecoin-project/nonsense/reject-deal-too-many-staging-deals
introduce MaxStagingDealsBytes - reject new deals if our staging deals area is full
2021-09-06 10:01:44 -07:00
Jiaying Wang e922791012 Merge pull request #7197 from filecoin-project/feat/update-graphsync-v0.9.0
Update to unified go-graphsync v0.9.0
2021-09-06 08:44:42 -07:00
Anton Evangelatov 992cc3ffbf itests: MaxStagingDealsBytes integration test 2021-09-06 17:39:35 +02:00
Anton Evangelatov 9e2129338a clarify that 0 is unlimited 2021-09-06 17:07:19 +02:00
Anton Evangelatov 0b7793a927 GiB to Bytes 2021-09-06 15:52:25 +02:00
Anton Evangelatov c69d1db1eb introduce MaxStagingDealsGiB - reject new deals if our staging deals area is "full" 2021-09-06 15:01:06 +02:00
frank 179458efe9 index out of range 2021-09-06 16:20:23 +08:00
Łukasz Magiera 42135ec7cc dealpublisher: Test deal verification 2021-09-03 19:40:02 +02:00
Dirk McCormick dc1f482a7d feat: update to markets v1.12.0 2021-09-03 16:23:36 +02:00
hannahhoward 91804d5746 feat(deps): update go-graphsync v0.9.0 2021-09-03 16:22:51 +02:00
hannahhoward b4e9bc50f8 feat(deps): update go-graphsync v0.8.0
Update to go-graphsync v0.8.0 with go-ipld-prime linksystem branch & trusted store.
2021-09-03 16:21:55 +02:00
Jennifer Wang 0853b99fca bump the version 2021-09-02 17:43:54 -04:00
Jennifer Wang a6ddd167c6 integrate the proof patch: tag proofs-v9-revert-deps-hotfix 2021-09-02 17:25:46 -04:00
Łukasz Magiera 386910589d dealpublisher: Fully validate deals before publishing 2021-09-02 23:11:09 +02:00
Łukasz Magiera 212400b635 Merge pull request #7262 from filecoin-project/chore/tweak-codecov-threshold
Increase threshold from 0.5% to 1%
2021-09-02 22:30:02 +02:00
ZenGround0 56acfe30af 0.5% => 1% test threshold after seeing .75% in the wild 2021-09-02 16:03:55 -04:00
Łukasz Magiera c9bf20ec56 Merge pull request #7260 from filecoin-project/jen/proof-patch
integrate the proof patch: tag proofs-v9-revert-deps-hotfix
2021-09-02 22:03:09 +02:00
Jennifer Wang 6379d5129f integrate the proof patch: tag proofs-v9-revert-deps-hotfix 2021-09-02 15:40:15 -04:00
Łukasz Magiera baa1ec098d Merge pull request #7253 from filecoin-project/feat/markets-v1.11
update to go-fil-markets v1.11.0
2021-09-02 20:48:54 +02:00
Łukasz Magiera 3c2d854a9e Merge pull request #7246 from filecoin-project/feat/sectorinfo-partition
Add partition info to the 'sectors status' command
2021-09-02 20:22:11 +02:00
Łukasz Magiera fea430a553 Add partition info to the 'sectors status' command 2021-09-02 20:01:15 +02:00
Łukasz Magiera 4659b9207c Merge pull request #7256 from filecoin-project/fix/finearly-accounting
sealing: Fix sector state accounting with FinalizeEarly
2021-09-02 19:56:45 +02:00
Łukasz Magiera 31efe8a690 Merge pull request #7255 from filecoin-project/cleanup/consensus
chain: Cleanup consensus logic
2021-09-02 19:48:37 +02:00
Łukasz Magiera 7ef1b62b41 sealing: Fix sector state accounting with FinalizeEarly 2021-09-02 19:27:10 +02:00
Łukasz Magiera 727bb84592 stmgr: drop MethdosMap 2021-09-02 18:58:34 +02:00
Łukasz Magiera 30fccaa0bd fix lint 2021-09-02 18:45:18 +02:00
Łukasz Magiera 95b128b7bc chain: Cleanup consensus logic 2021-09-02 18:09:37 +02:00
Dirk McCormick dbee23c895 feat: update to go-fil-markets v1.11.0 2021-09-02 14:06:14 +02:00
Steven Allen 591f8f561a Merge pull request #7232 from filecoin-project/chore/builder-repo-cleanup
builder: Handle chainstore config in ConfigFullNode
2021-09-02 13:54:30 +02:00
Łukasz Magiera 5831a6ba4a Merge pull request #7245 from filecoin-project/fix/commagg-loop
sealing: Fix retry loop in SubmitCommitAggregate
2021-09-02 11:31:34 +02:00
Łukasz Magiera 41db98d49f sealing: Fix tests 2021-09-01 12:09:44 +02:00
Łukasz Magiera b280e29409 sealing: Fix retry loop in SubmitCommitAggregate 2021-09-01 11:33:23 +02:00
Jiaying Wang 570edcbbb9 Merge pull request #7225 from filecoin-project/jen/rc2-prep
v1.11.2-rc2
2021-08-31 12:32:35 -07:00
Steven Allen 6a02237f6f Merge pull request #7210 from filecoin-project/fix/fork-check
fix: correctly handle null blocks when detecting an expensive fork
2021-08-31 11:01:45 -07:00
Jennifer Wang 074eac16cc update the ffi commit 2021-08-31 13:46:03 -04:00
Steven Allen 91da70fb7d fix: comment spelling 2021-08-31 10:37:51 -07:00
Łukasz Magiera 7a38cd9286 Merge pull request #7236 from filecoin-project/fix/expired-precomm
sectors expired: Handle precomitted and unproven sectors correctly
2021-08-31 18:25:24 +02:00
Łukasz Magiera 4c607d92f9 Merge pull request #7233 from filecoin-project/fix/storage-reserved-spam
stores: Fix reserved disk usage log spam
2021-08-31 18:20:52 +02:00
Łukasz Magiera daaa725e3b sectors expired: Handle precomitted and unproven sectors correctly 2021-08-31 16:24:29 +02:00
Łukasz Magiera a85e9953c9 Merge pull request #7230 from filecoin-project/fix/gateway-check-getpath-ts
gateway: check tipsets in ChainGetPath
2021-08-31 13:46:46 +02:00
Łukasz Magiera 3118bd1039 stores: Fix reserved disk usage log spam 2021-08-31 13:36:09 +02:00
Łukasz Magiera ed05eaf1d1 gateway: Fix lint 2021-08-31 13:26:46 +02:00
Łukasz Magiera 52e93371bd builder: Handle chainstore config in ConfigFullNode 2021-08-31 13:25:18 +02:00
Łukasz Magiera 41dfd010b3 gateway: check tipsets in ChainGetPath 2021-08-31 12:51:13 +02:00
Łukasz Magiera b0f57d74e5 Merge pull request #7000 from filecoin-project/feat/refactor-events
Refactor events subsystem
2021-08-31 12:02:22 +02:00
Steven Allen d113813b33 Merge pull request #7211 from filecoin-project/test/audit-disabled-tests
test: re-enable disabled tests
2021-08-30 17:03:03 -07:00
dirkmc 1da59fa2fe fix events API timeout handling for nil blocks (#7184) 2021-08-30 17:00:24 -07:00
Steven Allen 1cf556c3a2 feat: expose ChainGetPath on the gateway 2021-08-30 16:43:21 -07:00
Steven Allen 003eae81ce fix: address review 2021-08-30 16:43:21 -07:00
Steven Allen f518e34131 fix: atomically get head when registering an observer
This lets us always call check (accurately).
2021-08-30 16:43:21 -07:00
Steven Allen 82ac0a24a0 test: improve chain event tests 2021-08-30 16:43:21 -07:00
Steven Allen 3846170302 refactor events system 2021-08-30 16:43:21 -07:00
Steven Allen a875e9ba73 fix: check parents when adding tipsets to the "cache" 2021-08-30 16:43:21 -07:00
Steven Allen 43bbde1e6b fix: close chain head subscription when the reader is slow
The reader can just re-subscribe when they're ready to catch up. This
prevents a slow reader from bogging down the entire system.
2021-08-30 16:43:21 -07:00
Steven Allen 14754f1b18 chore: dedup datastore import 2021-08-30 16:43:21 -07:00
Steven Allen 08207912a5 fix: check if at genesis when testing for expensive forks in Call
Otherwise, we could try to lookup the parent of the block at height 0.
2021-08-30 16:23:13 -07:00
Steven Allen e6902304d5 fix: address expensive fork review 2021-08-30 16:20:23 -07:00
Jennifer Wang c298d8ca3e update the changelog 2021-08-30 18:58:25 -04:00
Jennifer Wang b4719c9daf docsgen 2021-08-30 19:03:11 -04:00
Jennifer Wang f44ba40450 update the changelog 2021-08-30 18:58:25 -04:00
Jennifer Wang 8385f1d2a1 bump the version 2021-08-30 18:54:15 -04:00
Jennifer Wang 37c9c397d3 update ffi to b4e4271db8f6e961934cd6ffff44fda3c610b9c0 per #7207 2021-08-30 18:52:16 -04:00
Raúl Kripalani c3e12a69cc upgrade go-data-transfer; propagate deal cancellations. 2021-08-30 18:50:38 -04:00
Steven Allen d1a68df21a Merge pull request #7221 from filecoin-project/fix/soup-mod
fix: make lotus soup use the correct dependencies
2021-08-30 10:47:41 -07:00
Steven Allen 0789a2927a fix: make lotus soup use the correct dependencies
1. Add a replace directive for lotus.
2. Make sure we're not depending on commits that don't exist.
2021-08-30 08:57:24 -07:00
Łukasz Magiera 3e450b8818 Merge pull request #7208 from filecoin-project/raulk/fix-deal-cancellation
upgrade go-data-transfer; propagate deal cancellations.
2021-08-30 14:06:14 +02:00
Łukasz Magiera 14bfd00c0e Merge pull request #7220 from filecoin-project/revert/on-deal-exp-changes
revert changes to OnDealExpiredOrChanged in #5431 #7201
2021-08-30 11:10:37 +02:00
Dirk McCormick 7b7a5b0b21 revert: changes to OnDealExpiredOrChanged in #5431 #7201 2021-08-30 10:42:41 +02:00
Steven Allen 8e52bf30c1 test: re-enable disabled tests
1. Rewrite VRF test to actually test win counts, and enable it.
2. Stop skipping some tests that now pass.
2021-08-27 15:43:55 -07:00
Steven Allen 165735d01a fix: correctly handle null blocks when detecting an expensive fork
Also improve/fix documentation to reflect the _actual_ tipset that's
passed into upgrades.

And update some comments.

fixes #7192
2021-08-27 15:04:01 -07:00
Raúl Kripalani 8f2d6ac042 upgrade go-data-transfer; propagate deal cancellations. 2021-08-27 20:50:16 +01:00
Steven Allen 714635c75c Merge pull request #7205 from filecoin-project/feat/reduce-startup-spam
Reduce lotus-miner startup spam
2021-08-27 12:49:46 -07:00
Łukasz Magiera b0293fe0e5 Merge pull request #7204 from filecoin-project/feat/natmap-config
config for disabling NAT port mapping
2021-08-27 19:44:08 +02:00
Łukasz Magiera 2293ecd8e8 Reduce lotus-miner startup spam 2021-08-27 19:41:54 +02:00
Łukasz Magiera 7db4ddaae7 Merge pull request #7202 from filecoin-project/filcloud-info-blocks
Add optional mined block list to miner info
2021-08-27 19:18:38 +02:00
Łukasz Magiera 3708a7ac30 config: Port some docstrings from go-ipfs 2021-08-27 19:17:32 +02:00
Łukasz Magiera 17b7dcef6f config for disabling NAT port mapping 2021-08-27 19:14:29 +02:00
raulk 982a3774f1 Merge pull request #7201 from filecoin-project/fix/on-deal-expired 2021-08-27 12:45:36 +01:00
Łukasz Magiera 22d75f4843 Tweak miner info --blocks output 2021-08-27 13:41:41 +02:00
Łukasz Magiera 4630216c38 Merge branch 'info-blocks' of github.com:filcloud/lotus-mirror into filcloud-info-blocks 2021-08-27 13:20:05 +02:00
Dirk McCormick 07dcb074f8 fix: catch deal slashed because sector was terminated 2021-08-27 12:56:23 +02:00
Łukasz Magiera a63f5c8bf2 Merge pull request #7025 from lanzafame/fix/need-empty-storage-json
fix: init restore adds empty storage.json
2021-08-27 12:29:27 +02:00
Łukasz Magiera c19ee58f46 Merge pull request #7194 from filecoin-project/feat/big-data
Insert miner and network power data as gibibytes to avoid int64 overflows
2021-08-27 11:19:54 +02:00
Łukasz Magiera 525c584fcf Merge pull request #7185 from filecoin-project/feat/ap-check-cid
sealing: Check piece CIDs after AddPiece
2021-08-27 11:14:12 +02:00
raulk a8bd8d13a9 Merge pull request #5431 from filecoin-project/refactor/mkts-deal-exp-params
markets: OnDealExpiredOrSlashed - get deal by proposal instead of deal ID
2021-08-27 09:26:09 +01:00
Dirk McCormick ac51b8eabc feat: go-fil-markets v1.9.0 2021-08-27 09:22:44 +02:00
dirkmc 77a19774cf fix events API timeout handling for nil blocks (#7184) 2021-08-27 09:05:00 +02:00
Dirk McCormick aa8ac05d6b fix: replace panic with err in OnDealExpiredOrSlashed 2021-08-27 09:02:56 +02:00
Dirk McCormick c7e7f89026 refactor: OnDealExpiredOrSlashed get deal by proposal instead of deal ID 2021-08-27 09:02:56 +02:00
Travis Person 0e8abc1973 Insert miner and network power data as gibibytes to avoid int64 overflows. 2021-08-27 00:01:44 +00:00
Steven Allen f33c02e56b Merge pull request #7191 from filecoin-project/ci/re-enable-broken-integration-test
Revert "Merge pull request #7187 from filecoin-project/test/disable-broken-testground"
2021-08-26 15:07:48 -07:00
Steven Allen 737ee90e69 Revert "Merge pull request #7187 from filecoin-project/test/disable-broken-testground"
This reverts commit a9826dce27, reversing
changes made to 8bcd917c12.
2021-08-26 14:27:28 -07:00
Łukasz Magiera b42171dc04 sealing: Check piece CIDs after AddPiece 2021-08-26 13:02:15 -07:00
Steven Allen c664f9e30c Merge pull request #7189 from filecoin-project/ci/code-cov-ignore
ci: exclude cruft from code coverage
2021-08-26 13:01:00 -07:00
Steven Allen a9826dce27 Merge pull request #7187 from filecoin-project/test/disable-broken-testground
fix: disable broken testground integration test
2021-08-26 12:45:19 -07:00
Steven Allen 1cecf3c9cb ci: exclude cruft from code coverage
1. Exclude generated code.
2. Exclude generated actors, we mostly test against the latest version.
2021-08-26 12:40:12 -07:00
Steven Allen b9015f8f29 fix: disable broken testground integration test 2021-08-26 12:25:35 -07:00
Steven Allen 8bcd917c12 Merge pull request #7181 from filecoin-project/asr/log
Incoming: improve a log message
2021-08-26 10:25:01 -07:00
Łukasz Magiera 55dbbf5f0c Merge pull request #7108 from filecoin-project/feat/alerting
Simple alert system; FD limit alerts
2021-08-26 16:34:04 +02:00
Łukasz Magiera 1ba427f638 alerting: Address review 2021-08-26 16:09:18 +02:00
Łukasz Magiera 667836fbe5 alerting: Add a test 2021-08-26 15:45:19 +02:00
Łukasz Magiera 88df721dcc alerting: Add Type to AlertEvent 2021-08-26 15:45:19 +02:00
Łukasz Magiera 502f2ba2ef alerting: Add some docs 2021-08-26 15:45:19 +02:00
Łukasz Magiera 2d79b34a1d fix lint 2021-08-26 15:45:19 +02:00
Łukasz Magiera d6e309aa01 Show alert count in lotus-miner info 2021-08-26 15:45:19 +02:00
Łukasz Magiera e2ba650a8c cli for checking alerts 2021-08-26 15:45:17 +02:00
Łukasz Magiera b094e0913d untangle fsjournal dependencies 2021-08-26 15:44:45 +02:00
Łukasz Magiera 5366821144 api for getting alert states 2021-08-26 15:44:45 +02:00
Łukasz Magiera 81b1dd12f8 Simple alert system; FD limit alerts 2021-08-26 15:44:45 +02:00
Adrian Lanzafame 15667db6a9 journal: make current log file have a fixed named (#7112) 2021-08-26 09:48:28 +01:00
Steven Allen 7c484cae13 Merge pull request #7104 from filecoin-project/nonsense/fix-repeat-string-negative
call string.Repeat always with positive int
2021-08-25 09:34:16 -07:00
Aayush Rajasekaran bdd1c36802 Incoming: improve a log message 2021-08-25 12:26:10 -04:00
Łukasz Magiera 1dbfa9caf6 Merge pull request #7180 from filecoin-project/asr/versionbump
Bump version to v1.11.3-dev
2021-08-25 17:51:03 +02:00
Aayush Rajasekaran de79bf57e5 Bump version to v1.11.13-dev 2021-08-25 11:18:38 -04:00
Aarsh Shah 7739051725 Merge pull request #7177 from filecoin-project/feat/fix-send-nil-throttle
Fix throttling bug
2021-08-25 16:44:25 +05:30
Aarsh Shah 928ac2191b fix throttling bug 2021-08-25 16:19:02 +05:30
Anton Evangelatov 548865e8dd simplify assignments to vmemBar and ramBar 2021-08-25 11:48:15 +03:00
Anton Evangelatov 0eacb9b9c8 call string.Repeat always with positive int 2021-08-25 11:48:15 +03:00
Steven Allen 87fc8db5a9 Merge pull request #7174 from filecoin-project/fix/timed-blockstore-test
fix: make TestTimedCacheBlockstoreSimple pass reliably
2021-08-24 18:06:06 -07:00
Aayush Rajasekaran 2495c52b05 Merge pull request #7099 from filecoin-project/asr/verifreg-nonmsig
Shed: Create a verifreg command for when VRK isn't a multisig
2021-08-24 21:03:38 -04:00
Aayush Rajasekaran b3966ab4eb Fix typo in comment 2021-08-24 20:39:28 -04:00
Aayush Rajasekaran 0c0fd00788 Merge pull request #7173 from filecoin-project/fix/publish-test-redux
fix TestDealPublisher
2021-08-24 20:39:15 -04:00
Aayush Rajasekaran 95965615a4 Merge pull request #7176 from filecoin-project/fix/disable-batch-deal-test
test: disable flaky TestBatchDealInput
2021-08-24 20:37:29 -04:00
Steven Allen 1105c24e8c test: disable flaky TestBatchDealInput
See #4611.
2021-08-24 15:37:52 -07:00
Steven Allen b509f1f098 Merge pull request #7148 from filecoin-project/raulk/test-large-deals
itests: support larger sector sizes; add large deal test.
2021-08-24 12:21:11 -07:00
Steven Allen cbf69f6ded fix: make TestTimedCacheBlockstoreSimple pass reliably 2021-08-24 11:35:56 -07:00
Steven Allen ee62dac67b Merge pull request #7166 from filecoin-project/chore/remove-replace
chore: remove unecessary replace
2021-08-24 11:11:25 -07:00
Steven Allen add699d238 fix: make sure we start the publish timer before recording the time
Otherwise, our nice and deterministic test may keep repeatedly setting
the time to _right_ before the timer fires.
2021-08-24 11:05:51 -07:00
Steven Allen 16f8a35e76 fix: idiomatic go
1. No need to slice a slice.
2. Idiomatic filter (https://github.com/golang/go/wiki/SliceTricks).
2021-08-24 11:05:05 -07:00
ZenGround0 263a85c2a6 Merge pull request #7172 from filecoin-project/fix/disable-patch
Turn off patch
2021-08-24 12:39:36 -04:00
ZenGround0 d29509b233 turn off patch 2021-08-24 11:52:45 -04:00
Łukasz Magiera d61612e05b Merge pull request #7140 from filecoin-project/feat/miner-expired-cmd
miner: Command to list/remove expired sectors
2021-08-24 11:52:31 +02:00
Łukasz Magiera 5a23c2bb90 sectors expired: Address review 2021-08-24 11:29:25 +02:00
Aarsh Shah 5993257eb1 Merge pull request #7169 from filecoin-project/feat/dagstore-zero-concurrency
Ignore nil throttler
2021-08-24 13:20:49 +05:30
Aarsh Shah e1a056db46 ignore nil throttler 2021-08-24 10:42:00 +05:30
Steven Allen 95d4483593 chore: remove unecessary replace 2021-08-23 15:18:01 -07:00
Łukasz Magiera a9bf24695d Fix lint 2021-08-23 11:27:34 -07:00
Łukasz Magiera ccf8844689 lotus-miner sectors expired --remove-expired 2021-08-23 11:27:34 -07:00
Łukasz Magiera d1759a4335 Show more info in sectors expired cmd 2021-08-23 11:27:34 -07:00
Łukasz Magiera 927ef041f8 miner: Command to list expired sectors 2021-08-23 11:27:34 -07:00
Steven Allen 01ea39adad Merge pull request #7153 from filecoin-project/fix/disable-flaky-test
test: disable flaky TestSimultaneousTransferLimit
2021-08-23 11:13:58 -07:00
Aayush Rajasekaran 371e90a40a Fix typos 2021-08-23 13:23:28 -04:00
Aayush RajasekaranandJacob Heun 80624845c4 Apply suggestions from code review
Co-authored-by: Jacob Heun <jacobheun@gmail.com>
2021-08-23 10:57:51 -04:00
Jiaying Wang 151cd76f75 Update CHANGELOG.md 2021-08-23 10:51:38 -04:00
Jennifer Wang 1858c0e290 fix docsgen 2021-08-23 10:51:38 -04:00
Jennifer Wang a7ab55dc00 lotus v1.11.2-rc prep 2021-08-23 10:48:06 -04:00
Aarsh Shah 68269b23fb Merge pull request #7160 from filecoin-project/feat/update-markets
Update markets, dt and graphsync
2021-08-23 15:10:24 +05:30
Aarsh Shah b096887b16 update deps 2021-08-23 14:45:17 +05:30
Aarsh Shah b3e73e4dad update markets, dt and graphsync 2021-08-23 11:23:11 +05:30
Łukasz Magiera 6c3acb8e21 Merge pull request #7117 from filecoin-project/fix/recoverdealids-loop
sealing: Fix RecoverDealIDs loop with changed PieceCID
2021-08-21 02:20:43 +02:00
Steven Allen 2a4ad207a5 test: disable flaky TestSimultaneousTransferLimit
See https://github.com/filecoin-project/lotus/issues/7152 for details.
2021-08-20 14:59:01 -07:00
Łukasz Magiera 36cb7d9451 Merge pull request #7150 from filecoin-project/feat/state-encode-params
api/command for encoding actor params
2021-08-20 20:09:17 +02:00
ZenGround0 de1c041900 Merge pull request #7151 from filecoin-project/fix/check-codecov-works
Fix nits and see if codecov works now with auto
2021-08-20 13:35:19 -04:00
ZenGround0 b7cda68c1c Allow for more threshold buffer 2021-08-20 13:10:17 -04:00
Raúl Kripalani 342134f853 EnableLargeSectors: restore previous supported proof types. 2021-08-20 18:07:25 +01:00
ZenGround0 abb0ea01a7 Fix nits and see if codecov works now with auto 2021-08-20 12:54:37 -04:00
ZenGround0 57337c1ae0 Merge pull request #7147 from filecoin-project/chore/codecov-projects
Codecov Projects
2021-08-20 12:53:23 -04:00
ZenGround0 c7aac60c6f Set code projects as non-informational 2021-08-20 12:43:18 -04:00
ZenGround0 b026c70f79 Stop being stupid 2021-08-20 12:30:11 -04:00
Łukasz Magiera 1ac87279d7 Add --to-code to chain encode params 2021-08-20 18:13:05 +02:00
ZenGround0 3506b9e8f2 Try to force failure 2021-08-20 12:09:00 -04:00
ZenGround0 4510fa7dcb Remove whitespace 2021-08-20 11:50:45 -04:00
Łukasz Magiera c05eb1251b Merge pull request #7149 from filecoin-project/feat/shed-cidid-raw
shed: Support raw encoding in cid id
2021-08-20 17:50:19 +02:00
ZenGround0 e74c374783 make everything informational=true to see if it works 2021-08-20 11:49:12 -04:00
Łukasz Magiera 12875a9664 api/command for encoding actor params 2021-08-20 17:32:57 +02:00
ZenGround0 ece154d73b Subdivide into projects 2021-08-20 11:27:37 -04:00
Łukasz Magiera 69204eea04 shed: Support raw encoding in cid id 2021-08-20 17:12:26 +02:00
Raúl Kripalani 0030e208a0 avoid reordering imports. 2021-08-20 15:59:19 +01:00
ZenGround0 5579001366 Try new file structure 2021-08-20 10:56:29 -04:00
Raúl Kripalani 2dde022a00 itests: support larger sector sizes; add large deal test. 2021-08-20 15:53:24 +01:00
ZenGround0 862a2ce695 Undo 2021-08-20 10:41:18 -04:00
ZenGround0 94f7205943 Give it a try 2021-08-20 10:38:46 -04:00
Łukasz Magiera 5bdc1862d9 Merge pull request #6952 from filecoin-project/feat/jsonrpc-redir
rpcenc: Support reader redirect
2021-08-20 16:18:01 +02:00
Łukasz Magiera 62769e3b11 sealing: Fix RecoverDealIDs loop with changed PieceCID 2021-08-20 16:00:40 +02:00
Łukasz Magiera fcc3103123 Merge pull request #7135 from filecoin-project/fix/addpiece-errval
Fix error handling in SectorAddPieceToAny api impl
2021-08-19 13:18:10 +02:00
Łukasz Magiera 0beb48f11d Fix error handling in SectorAddPieceToAny api impl 2021-08-19 12:56:40 +02:00
Jiaying Wang 28bf9688f1 Merge pull request #7125 from filecoin-project/fix/rice-box
add rice box to required binaries
2021-08-18 16:31:55 -04:00
Łukasz Magiera da86f445c8 Merge pull request #7121 from filecoin-project/jen/tempstuff
remove m1 templates and make area selection multi-optionable
2021-08-18 22:16:23 +02:00
Jiaying Wang 2d1494314e Merge branch 'master' into fix/rice-box 2021-08-18 15:05:12 -04:00
Travis Person 8c586d7f7c add rice box to required binaries 2021-08-18 17:38:52 +00:00
Jiaying WangandJacob Heun 5ca128e8bb Update .github/ISSUE_TEMPLATE/enhancement.yml
Co-authored-by: Jacob Heun <jacobheun@gmail.com>
2021-08-18 12:10:08 -04:00
Jennifer Wang c143fa922e format fix 2021-08-18 11:32:06 -04:00
Jennifer Wang 192fb159d2 copy paste is evil 2021-08-18 11:31:08 -04:00
Jennifer Wang 47d9a69802 renive and make area selection multi-optionable 2021-08-18 11:29:52 -04:00
Jiaying Wang 3350bd422f Merge pull request #7115 from filecoin-project/raulk/upgrade-deps
upgrade upstream dependencies.
2021-08-18 09:54:06 -04:00
Raúl Kripalani d494778435 upgrade upstream dependencies. 2021-08-18 11:13:11 +01:00
Aarsh Shah 88f5bcdb63 Remove replace directive for multihash dep (#7113) 2021-08-18 11:00:29 +01:00
Jiaying Wang f0143e351d Merge pull request #7110 from filecoin-project/asr/ffi-update
Update to latest FFI
2021-08-17 20:38:32 -04:00
Aayush Rajasekaran 113ea6dc4b Update to latest FFI 2021-08-17 18:15:12 -04:00
Jiaying Wang 1e6cc6f836 Merge pull request #7105 from filecoin-project/jen/mas
release -> master
2021-08-17 13:32:29 -04:00
Jennifer Wang e467b130c2 make go mod happy 2021-08-17 10:44:38 -04:00
Jennifer Wang 7ff5844aa2 Merge branch 'releases' into jen/mas 2021-08-17 10:38:36 -04:00
FrristandRaúl Kripalani 518b6f1d41 fix(miner): always create miner deal staging directory (#7098)
- fixes #7097

Co-authored-by: Raúl Kripalani <raul@protocol.ai>

Co-authored-by: Raúl Kripalani <raul@protocol.ai>
2021-08-17 00:16:06 +01:00
d7076778e2 integrate DAG store and CARv2 in deal-making (#6671)
This commit removes badger from the deal-making processes, and
moves to a new architecture with the dagstore as the cental
component on the miner-side, and CARv2s on the client-side.

Every deal that has been handed off to the sealing subsystem becomes
a shard in the dagstore. Shards are mounted via the LotusMount, which
teaches the dagstore how to load the related piece when serving
retrievals.

When the miner starts the Lotus for the first time with this patch,
we will perform a one-time migration of all active deals into the
dagstore. This is a lightweight process, and it consists simply
of registering the shards in the dagstore.

Shards are backed by the unsealed copy of the piece. This is currently
a CARv1. However, the dagstore keeps CARv2 indices for all pieces, so
when it's time to acquire a shard to serve a retrieval, the unsealed
CARv1 is joined with its index (safeguarded by the dagstore), to form
a read-only blockstore, thus taking the place of the monolithic
badger.

Data transfers have been adjusted to interface directly with CARv2 files.
On inbound transfers (client retrievals, miner storage deals), we stream
the received data into a CARv2 ReadWrite blockstore. On outbound transfers
(client storage deals, miner retrievals), we serve the data off a CARv2
ReadOnly blockstore.

Client-side imports are managed by the refactored *imports.Manager
component (when not using IPFS integration). Just like it before, we use
the go-filestore library to avoid duplicating the data from the original
file in the resulting UnixFS DAG (concretely the leaves). However, the
target of those imports are what we call "ref-CARv2s": CARv2 files placed
under the `$LOTUS_PATH/imports` directory, containing the intermediate
nodes in full, and the leaves as positional references to the original file
on disk.

Client-side retrievals are placed into CARv2 files in the location:
`$LOTUS_PATH/retrievals`.

A new set of `Dagstore*` JSON-RPC operations and `lotus-miner dagstore`
subcommands have been introduced on the miner-side to inspect and manage
the dagstore.

Despite moving to a CARv2-backed system, the IPFS integration has been
respected, and it continues to be possible to make storage deals with data
held in an IPFS node, and to perform retrievals directly into an IPFS node.

NOTE: because the "staging" and "client" Badger blockstores are no longer
used, existing imports on the client will be rendered useless. On startup,
Lotus will enumerate all imports and print WARN statements on the log for
each import that needs to be reimported. These log lines contain these
messages:

- import lacks carv2 path; import will not work; please reimport
- import has missing/broken carv2; please reimport

At the end, we will print a "sanity check completed" message indicating
the count of imports found, and how many were deemed broken.

Co-authored-by: Aarsh Shah <aarshkshah1992@gmail.com>
Co-authored-by: Dirk McCormick <dirkmdev@gmail.com>

Co-authored-by: Raúl Kripalani <raul@protocol.ai>
Co-authored-by: Dirk McCormick <dirkmdev@gmail.com>
2021-08-16 23:34:32 +01:00
raulk 473a192b85 fix build after merging #6097. (#7096)
fix build after merging #6097.
2021-08-16 23:18:32 +01:00
Jiaying Wang 15d90c24ed Merge pull request #7095 from filecoin-project/release/v1.11.1
Release v1.11.1
2021-08-16 17:27:45 -04:00
Jiaying Wang 52746911d8 Merge pull request #7094 from filecoin-project/jen/releasev1.11.1
V1.11.1 release prep
2021-08-16 16:39:58 -04:00
Jennifer Wang ea242b5bad Remove reverted pr from changelog 2021-08-16 16:34:31 -04:00
Jennifer Wang c37241c733 resolve conflicts and docsgen 2021-08-16 16:26:50 -04:00
Jennifer Wang 263ae6f99f update version 2021-08-16 16:21:06 -04:00
Jennifer Wang 11ff756b2e Add ChangeLog 2021-08-16 16:20:48 -04:00
ZenGround0 10615b53ad Merge pull request #6853 from filecoin-project/frrist/miner-temp-file-path
feat(miner deals): create subdir to miner repo for staged deals
2021-08-16 16:19:05 -04:00
ZenGround0 2e5b492edd Merge pull request #6097 from filcloud/sectors-renew
Extending sectors: more practical and flexible tools
2021-08-16 13:50:38 -04:00
Aayush Rajasekaran 90e60f7a98 Shed: Create a verifreg command for when VRK isn't a multisig 2021-08-16 12:56:27 -04:00
raulk 0d7654d2c9 Merge pull request #7088 from filecoin-project/nonsense/improve-get-api-error-msgs 2021-08-16 14:38:58 +01:00
He Weidong 92402e9f23 Update doc 2021-08-16 21:31:21 +08:00
Anton Evangelatov adcb8f3b15 improve get api error messages 2021-08-16 14:33:08 +03:00
Jiaying Wang 56c35ff1e9 Merge pull request #7065 from filecoin-project/jen/rc3
v1.11.3 rc3
2021-08-14 00:57:12 -04:00
Jennifer Wang e397a079c1 docsgen 2021-08-13 23:42:59 -04:00
Jennifer Wang 4bcf159381 v1.11.1-rc3 2021-08-13 23:16:03 -04:00
He Weidong b50b1e9ac4 Optimize for ci 2021-08-14 10:41:01 +08:00
He Weidong c5f81d35f5 minor modification 2021-08-13 13:47:48 +08:00
Jiaying Wang 6812c293b1 Merge pull request #6944 from filecoin-project/Lotus---release-process
Lotus release process  - how we make releases
2021-08-13 00:41:42 -04:00
Jennifer Wang 34dc70ca2a nits 2021-08-13 00:39:51 -04:00
Jiaying Wang 81a5521845 Merge pull request #7051 from filecoin-project/jen/backports
Master->v1.11.1
2021-08-13 00:16:40 -04:00
Jennifer Wang f7cfb74a3f tidy1 2021-08-13 00:02:20 -04:00
ZenGround0 f34631facc Fix docsgen 2021-08-13 00:00:56 -04:00
ZenGround0 35c8c5885b Update deps to revert version representation 2021-08-12 23:58:40 -04:00
ZenGround0 8c9321ce7b revert pricelist by version to pricelist by epoch 2021-08-12 23:58:20 -04:00
ZenGround0 2e2b9009fc Fix actor policy codegen 2021-08-12 23:50:47 -04:00
ZenGround0 eaff65c00f Remove network version panic 2021-08-12 23:50:30 -04:00
whyrusleeping 931cf9342e WIP: dont panic if input is bad 2021-08-12 23:50:25 -04:00
Raúl Kripalani e23c3b3e77 remove commented code. 2021-08-12 23:13:54 -04:00
Raúl Kripalani 230f81661c make lotus-miner net commands hit markets subsystem. 2021-08-12 23:13:50 -04:00
vyzo d95fcd55bf clear splitstore dir before deleting, only warn if the latter fails
to address situations with symlinks
2021-08-12 23:07:16 -04:00
vyzo 3983dadf3a add option to only clear splistore keys 2021-08-12 23:07:10 -04:00
vyzo f312ba376c document splitstore clear shed command 2021-08-12 23:07:00 -04:00
vyzo 13e9d7c71c add lotus-shed splitstore clear command 2021-08-12 23:06:47 -04:00
Raúl Kripalani 8c326d7bad fix compilation error. 2021-08-12 23:06:06 -04:00
Raúl Kripalani 04b358f340 use fallback api infos last; init service with markets-path. 2021-08-12 23:05:51 -04:00
Raúl Kripalani 23cd561f2e bugfix. 2021-08-12 23:05:34 -04:00
Raúl Kripalani 3733fa9cc2 add RepoType#String; adjust repo parsing logic. 2021-08-12 23:05:13 -04:00
Raúl Kripalani a94ab050bf fix docs, add flag. 2021-08-12 23:04:45 -04:00
Raúl Kripalani 1527ed46bc fix tests. 2021-08-12 23:04:08 -04:00
Raúl Kripalani 43d48f37b6 polish. 2021-08-12 23:04:03 -04:00
Raúl Kripalani 2c9edb1d1a refactor miner info command. 2021-08-12 23:03:59 -04:00
Raúl Kripalani a1aed960a9 target markets API for markets commands. 2021-08-12 23:03:50 -04:00
Raúl Kripalani 22461f30e9 support MARKETS_API_INFO env var; support markets-repo, markets-api-url flags. 2021-08-12 23:02:52 -04:00
Aarsh Shah 7b1a82a3cc update deps for logging 2021-08-12 22:25:33 -04:00
aarshkshah1992 0d06527507 more logging in data transfer and markets 2021-08-12 22:25:07 -04:00
vyzo 2b5bcfdb7f make symlink helper freestanding 2021-08-12 22:24:20 -04:00
vyzoandJakub Sztandera 9133f819e0 fix typo
Co-authored-by: Jakub Sztandera <kubuxu@protocol.ai>
2021-08-12 22:24:14 -04:00
vyzo 73c161a295 fix format specifier 2021-08-12 22:24:09 -04:00
vyzo b46b26f1ae improve detection of relative links 2021-08-12 22:23:29 -04:00
vyzo 18eadd338e extend test to check the validity of relative links 2021-08-12 22:23:15 -04:00
vyzo 21b1059ba5 make relative links when the canonical and new db paths are in the same directory 2021-08-12 22:22:55 -04:00
vyzo c25ed49f0d code cosmetics: rename variables for better readability and some comments 2021-08-12 22:19:03 -04:00
hannahhoward 2ecf8914a1 feat(deps): update to branches with improved logging
update sub repos with improved logging around data transfer processing
2021-08-12 22:18:03 -04:00
Raúl Kripalani f9ea2e834c address nits. 2021-08-12 22:11:09 -04:00
Raúl Kripalani 85a4f8325f fix docs and nits. 2021-08-12 22:08:20 -04:00
Anton Evangelatov 60b612247d make linter happy 2021-08-12 22:06:57 -04:00
Anton Evangelatov d92c6a2097 extract outputs for mining node and markets node in separate functions 2021-08-12 22:06:41 -04:00
Anton Evangelatov 45166e760b fixup 2021-08-12 22:06:11 -04:00
Anton Evangelatov e90e71456b add RuntimeSubsystems API method; use it in lotus-miner info 2021-08-12 22:05:08 -04:00
ZenGround0 ce58b119bf Merge pull request #7038 from filecoin-project/spike/restrict-api-versions
Strict major minor version checking on v0 and v1 apis
2021-08-12 14:34:31 -04:00
ZenGround0 2d8c9bba99 more fix 2021-08-12 14:03:19 -04:00
ZenGround0 c8720fef02 Fix tests 2021-08-12 14:01:24 -04:00
ZenGround0 73a644f320 Review response 2021-08-12 13:09:43 -04:00
raulk 3960f719db Merge pull request #7042 from filecoin-project/fix/lotus-miner-net-markets 2021-08-12 16:45:58 +01:00
Raúl Kripalani 2484fbc1f7 remove commented code. 2021-08-12 15:38:19 +01:00
Raúl Kripalani 5f6166435c make lotus-miner net commands hit markets subsystem. 2021-08-12 11:15:00 +01:00
Steven Allen af9a71ac7c Merge pull request #6998 from filecoin-project/feat/latest-genesis
Test with latest actors version
2021-08-11 14:29:18 -07:00
Steven Allen ee44312c00 Merge pull request #7039 from filecoin-project/fix/codecov-again
codecov: fix mock name
2021-08-11 13:56:59 -07:00
Steven Allen 4214ab12ef codecov: fix mock name 2021-08-11 13:50:33 -07:00
ZenGround0 3bb5d4eb8f Strict major minor version checking on v0 and v1 apis 2021-08-11 16:40:14 -04:00
Steven Allen dcff06bd91 test: genesis actors version
Properly handle genesis in actors tests. Fast-forward upgrading to
actors v13 doesn't work because there needs to be at least a day between
v0 genesis and v13 (due to differences in miner cron).
2021-08-11 13:30:15 -07:00
Steven Allen 3235dbfaee fix genesis for actors v2 2021-08-11 13:30:15 -07:00
Steven Allen 9911ab1000 Merge pull request #7037 from filecoin-project/fix/codecov-regex
codecov: fix regexes
2021-08-11 13:27:14 -07:00
Steven Allen 4bf8cb455b codecov: fix regexes
Unfortunately, these changes don't apply till they hit master.
2021-08-11 13:25:19 -07:00
Steven Allen cbb7c191e6 Merge pull request #7036 from filecoin-project/codecov/ignore-old-shims
Magically increase code coverage
2021-08-11 13:14:25 -07:00
Steven Allen b2714e19d5 codecov: ignore generated and non-essential code
1. Ignore debugging/testing commands.
2. Ignore build related code.
3. Ignore all generated "mocks" code.
4. Ignore all *_gen.go files.
5. Ignore old actors shims.
2021-08-11 12:38:20 -07:00
Steven Allen 498644acab Merge pull request #7011 from filecoin-project/fix/no-t-aux
fix: don't check for t_aux when proving
2021-08-11 11:28:29 -07:00
Łukasz Magiera e8a6ea1dc8 Merge pull request #7027 from swift-mx/master
Support --actor in miner actor control list
2021-08-11 19:56:30 +02:00
Aayush Rajasekaran 07c636bf86 Merge pull request #7018 from filecoin-project/asr/sector-exp-alignment
PreCommitPolicy: Don't try to align expirations on proving period boundaries
2021-08-11 13:05:27 -04:00
Aayush Rajasekaran a52352b13a PreCommitPolicy: Don't try to align expirations on proving period boundaries 2021-08-11 12:44:12 -04:00
ZenGround0 14dcc477f1 Merge pull request #7022 from filecoin-project/revert/pricelist-fix
revert pricelist by version to pricelist by epoch
2021-08-11 12:14:26 -04:00
ZenGround0 bfda864c1b Fix docsgen 2021-08-11 09:49:23 -04:00
ZenGround0 bf41240ee1 Update deps to revert version representation 2021-08-11 09:49:23 -04:00
ZenGround0 b914e95f34 revert pricelist by version to pricelist by epoch 2021-08-11 09:49:23 -04:00
swift-mx d6562bccfc Merge branch 'filecoin-project:master' into master 2021-08-11 19:25:27 +08:00
mx 46a93bb78a fix: get other actor controlList 2021-08-11 19:23:37 +08:00
lanzafame 0b8a211e70 fix: init restore adds empty storage.json 2021-08-11 13:36:01 +10:00
Steven Allen 130fc6fce1 Merge pull request #7019 from filecoin-project/asr/genesis-shed
Shed: Include network name in genesis-verify
2021-08-10 16:25:02 -07:00
Steven Allen 65e3540d03 Merge pull request #7007 from filecoin-project/fix/panic-less
Dont panic if input is bad
2021-08-10 16:22:56 -07:00
Aayush Rajasekaran feb9d3c557 Shed: Include network name in genesis-verify 2021-08-10 14:46:24 -04:00
ZenGround0 234030218c Fix actor policy codegen 2021-08-10 13:32:00 -04:00
ZenGround0 6da26dcefc Remove network version panic 2021-08-10 13:07:30 -04:00
vyzo c24d4e11d5 Merge pull request #6949 from filecoin-project/fix/splitstore-memory-usage
Reduce splitstore memory usage during chain walks
2021-08-10 11:05:41 +03:00
vyzo eb0a62e9e9 RIP bloom filter markset; you weren't used anyway. 2021-08-10 10:47:01 +03:00
vyzo 742c85bf81 add SupportsVisitor in the markset env interface 2021-08-10 10:47:01 +03:00
vyzo 79f348a01c make the write lock scope limited within a function
Also avoid removing the writing set if there was an error while writing.
2021-08-10 10:47:01 +03:00
vyzo a9403b42f0 deduplicate put code 2021-08-10 10:47:01 +03:00
vyzo 1a59b73adc add .tmp suffix to transient db names 2021-08-10 10:47:01 +03:00
vyzo 26a5832f92 simplify and deduplicate Has/Visit using helper methods tryPending and tryDB. 2021-08-10 10:47:01 +03:00
vyzo 380e16d465 remove redundant writers state variable 2021-08-10 10:47:01 +03:00
vyzo b83b5405c6 widen MarkSetVisitor interface and get rid of the casts 2021-08-10 10:47:01 +03:00
vyzo 57c984cea1 improve concurrency properties of Visit with optimistic concurrency 2021-08-10 10:47:01 +03:00
vyzo 563fa1e31a take advantage of MarkSet/Visitor unification to atomically check+mark 2021-08-10 10:47:01 +03:00
vyzo cb3c53664d unify marksets and visitors 2021-08-10 10:47:01 +03:00
vyzo 3c994d94aa deduplicate some code in markset_badger 2021-08-10 10:47:01 +03:00
vyzo 32d94d4e85 reset walked set as epoch boundaries are crossed
the walk is BFS, so we can do this!
2021-08-10 10:47:01 +03:00
vyzo 49346f5679 use visitors instead of cidsets in walks 2021-08-10 10:47:01 +03:00
vyzo 1323d8fb20 markset-backed visitors 2021-08-10 10:47:01 +03:00
vyzo 6f22cffb6b object visitor interface 2021-08-10 10:47:01 +03:00
Steven Allen e1e5af8661 Merge pull request #6999 from filecoin-project/fix/vets
fix: vet actors shims
2021-08-09 11:11:51 -07:00
Steven Allen 18f39be3ba fix: don't check for t_aux when proving
We don't need it.
2021-08-09 11:07:35 -07:00
whyrusleeping bfd69f5381 WIP: dont panic if input is bad 2021-08-09 12:17:54 +02:00
Steven Allen 5e27023ba7 Merge pull request #6996 from swift-mx/master
fix: more logging in maybeStartBatch error
2021-08-06 15:25:37 -07:00
Steven Allen 5a321f970e fix: vet actors shims
1. Check error in EraseAllUnproven
2. Avoid dead code.
2021-08-06 14:56:29 -07:00
Steven Allen f7e288589b Merge pull request #6991 from filecoin-project/fix/flaky-deal-test
fix flaky TestDealPublisher and re-enable
2021-08-06 03:15:39 -07:00
Steven Allen 66bfadd7f0 Merge pull request #6990 from filecoin-project/feat/add-chain-after
feat: add ChainGetTipSetAfterHeight
2021-08-06 02:18:52 -07:00
mx cfc10e9b52 fix: more logging in maybeStartBatch error 2021-08-06 16:50:37 +08:00
Steven Allen be2ecf6236 fix flaky TestDealPublisher and re-enable
fixes #6799
2021-08-05 19:46:08 -07:00
Steven Allen 57bf5c2143 feat: add ChainGetTipSetAfterHeight
This is identical to ChainGetTipSetByHeight, but returns the tipset
following any null tipsets. This is what the user usually wants anyways.

(and I need it for another PR)
2021-08-05 12:07:14 -07:00
Whyrusleeping 9dca65634d Merge pull request #6970 from filecoin-project/chore/remove-old-tracer
Remove forgotten non-functioning config from the pre-mainnet days
2021-08-04 10:46:08 +02:00
Frank 2744bb4e5a update 2021-08-04 15:49:35 +08:00
Frank 2fec0c2440 add produced blocks info 2021-08-04 15:41:06 +08:00
Jiaying Wang faf8a47684 Merge pull request #6967 from filecoin-project/tools/shed-splitstore-clear
lotus-shed splitstore clear command
2021-08-03 18:49:30 -04:00
vyzo c9124bd1a9 clear splitstore dir before deleting, only warn if the latter fails
to address situations with symlinks
2021-08-03 15:39:48 +03:00
vyzo db6b7b91d8 add option to only clear splistore keys 2021-08-03 15:32:53 +03:00
Peter Rabbitson eefdcb0454 Remove forgotten non-functioning config from the pre-mainnet days 2021-08-02 17:04:23 +02:00
He Weidong 94c5076710 Make flags more intuitive 2021-08-02 16:44:22 +08:00
He Weidong 66e8418125 Enable exclude 2021-08-02 16:39:16 +08:00
He Weidong 677afbcb91 update to miner5 2021-08-02 16:26:29 +08:00
He Weidong 7f6c942b81 Use max-fee instead of gas-feecap 2021-08-02 16:09:00 +08:00
He Weidong e09cdc45a7 Add gas-feecap flag for cmd sectors renew 2021-08-02 16:08:57 +08:00
He Weidong 9ee80fd1db Prettify json output of extending params 2021-08-02 16:08:55 +08:00
He Weidong 77166f88ac Optimize search of sectors location 2021-08-02 16:08:52 +08:00
He Weidong e0777fed15 Add a more flexible cli tool: sectors renew 2021-08-02 16:08:50 +08:00
He Weidong 075bb3b314 Add a cli tool: sectors check-expire 2021-08-02 16:08:47 +08:00
vyzo a768dd84fa document splitstore clear shed command 2021-08-01 19:18:34 +03:00
vyzo 4a1655b225 add lotus-shed splitstore clear command 2021-08-01 19:18:29 +03:00
Jiaying Wang 9e707e18e1 Merge pull request #6909 from filecoin-project/nonsense/better-error-on-wrong-repo-location
add explicit error msg if repo dir does not exist
2021-08-01 01:06:24 -04:00
Anton Evangelatov fa7e52dbda add explicit error msg if repo dir does not exist 2021-08-01 00:22:55 -04:00
Steven Allen 1ce5c3bf9c Merge pull request #6958 from filecoin-project/deps/update-pubsub
update go-libp2p-pubsub to v0.5.4
2021-07-30 13:34:43 -07:00
vyzo 8d51c5a971 update go-libp2p-pubsub to v0.5.4 2021-07-30 23:15:24 +03:00
Łukasz Magiera d06f38757d Merge pull request #6957 from filecoin-project/fix/disable-flaky-deals-test
chore: disable flaky test
2021-07-30 18:49:14 +02:00
Steven Allen b885d69aaa chore: disable flaky test 2021-07-30 09:01:31 -07:00
Łukasz Magiera 8426a62d15 rpcenc: Test early close, add reader.MustRedirect 2021-07-30 13:35:16 +02:00
Łukasz Magiera 555c402ba3 rpcenc: Fix POST read 2021-07-30 13:03:31 +02:00
Łukasz Magiera 0c809d3a5f rpcenc: Support reader redirect 2021-07-30 12:58:35 +02:00
frrist ca697c9aa2 feat(miner deals): create subdir to miner repo for staged deals 2021-07-29 21:08:38 -07:00
Steven Allen 73b2b5f384 Merge pull request #6537 from filecoin-project/test/pledge-batching-msg-prop
Test/pledge batching msg prop
2021-07-29 21:07:21 -07:00
Aayush Rajasekaran 0340189baa Merge pull request #6085 from filecoin-project/feat/more-build-types
set buildtype in nerpa and butterfly
2021-07-30 00:05:19 -04:00
ZenGround0 823bd54484 Review 2021-07-29 20:48:27 -07:00
ZenGround0 756e5ac0b8 Add a separate node to ensemble and check propagation reached 2021-07-29 20:48:27 -07:00
ZenGround0 7c99169fb4 Fix 2021-07-29 20:48:27 -07:00
ZenGround0 2380d252e1 Post rebase fix 2021-07-29 20:48:27 -07:00
ZenGround0 f2f6c209ea Integration test forcing max batch size 2021-07-29 20:48:27 -07:00
Steven Allen ff734ed080 Merge pull request #6099 from filcloud/min-max-exp
reasonable max value for initial sector expiration
2021-07-29 20:43:42 -07:00
Cory Schwartz c4ca3660de set buildtype in nerpa and butterfly 2021-07-29 20:41:24 -07:00
Steven Allen b584f44661 Merge pull request #6940 from filcloud/fix-skip-count
fix skipCount
2021-07-29 13:29:24 -07:00
Steven Allen f63d1b114a Merge pull request #6945 from filecoin-project/fix/mpool-pending
fix bug in MpoolPending message exclusion
2021-07-29 13:24:14 -07:00
Aayush Rajasekaran e5fb4a6c04 Merge pull request #6942 from filecoin-project/asr/nit
Improve formatting of workers CLI
2021-07-29 15:09:06 -04:00
vyzo 1d50dadc18 fix bug in message exclusion 2021-07-29 21:58:59 +03:00
Aayush Rajasekaran 1f7d584517 Update cmd/lotus-miner/sealing.go 2021-07-29 14:46:19 -04:00
Dragan Z 08e046066d Lotus release process - how we make releases
Lotus release philosophy explained
2021-07-29 19:23:15 +02:00
raulk c17a0c4fed Merge pull request #6936 from filecoin-project/feat/markets-env-var
support MARKETS_API_INFO env var, and markets-repo, markets-api-url CLI flags.
2021-07-29 16:53:20 +01:00
Aayush Rajasekaran 28e3c8bd3f Improve formatting of workers CLI 2021-07-29 11:46:42 -04:00
Raúl Kripalani 00fb675452 fix compilation error. 2021-07-29 16:18:43 +01:00
Aarsh Shah 83a4d7dc1c Merge pull request #6941 from filecoin-project/feat/update-sm-logging
Update state machine deps for logging
2021-07-29 20:46:41 +05:30
Raúl Kripalani 8433aae1af use fallback api infos last; init service with markets-path. 2021-07-29 16:10:04 +01:00
Aarsh Shah 9549087ba9 update deps for logging 2021-07-29 20:04:50 +05:30
Raúl Kripalani b17fcfc4d1 bugfix. 2021-07-29 14:36:04 +01:00
Raúl Kripalani 3144da86f3 add RepoType#String; adjust repo parsing logic. 2021-07-29 13:49:51 +01:00
Raúl Kripalani 90427bc3af fix docs, add flag. 2021-07-29 13:39:03 +01:00
Raúl Kripalani 8fae68a5ae fix tests. 2021-07-29 13:21:55 +01:00
Raúl Kripalani 3b2c3a3f6b polish. 2021-07-29 12:56:08 +01:00
Raúl Kripalani d9c6a32b8e refactor miner info command. 2021-07-29 12:54:08 +01:00
He Weidong 00e32d1ede fix skipCount 2021-07-29 19:51:25 +08:00
Raúl Kripalani 7d6eb250ea Merge branch 'master' into feat/markets-env-var 2021-07-29 12:37:46 +01:00
Raúl Kripalani 22c0884f5f target markets API for markets commands. 2021-07-29 12:37:29 +01:00
Łukasz Magiera e00cb29804 Merge pull request #6937 from filecoin-project/feat/update-deps-logging
Update deps for more logging in data transfer and markets
2021-07-29 12:29:16 +02:00
aarshkshah1992 973476930e more logging in data transfer and markets 2021-07-29 15:28:08 +05:30
Raúl Kripalani 4e19d8d562 support MARKETS_API_INFO env var; support markets-repo, markets-api-url flags. 2021-07-29 10:55:37 +01:00
Łukasz Magiera 595695a459 Merge pull request #6929 from filecoin-project/jen/backport-to-master
release v1.11.1 backport -> master
2021-07-29 11:07:11 +02:00
Łukasz Magiera 7f41d30ce8 Merge branch 'master' into jen/backport-to-master 2021-07-29 11:06:57 +02:00
Łukasz Magiera 18652bc388 Merge pull request #6932 from filecoin-project/fix/make-gocc-early
make: set default GOCC earlier
2021-07-29 10:49:03 +02:00
Łukasz Magiera 4f2722e7cf Merge branch 'master' into jen/backport-to-master 2021-07-29 10:44:57 +02:00
Łukasz Magiera 57d87ef24b make: set default GOCC earlier 2021-07-29 10:29:22 +02:00
He Weidong 4273fb067c reduce diff 2021-07-29 15:01:52 +08:00
He Weidong ef6620ad8e reasonable max value for initial sector expiration 2021-07-29 14:57:06 +08:00
He Weidong ee20d30480 reasonable min and max value for initial sector expiration 2021-07-29 14:55:11 +08:00
vyzo 2fd12daf9f Merge pull request #6905 from filecoin-project/fix/moving-gc-followup
Moving GC Followup
2021-07-29 08:54:57 +03:00
vyzo 351f615ce6 Merge branch 'master' into fix/moving-gc-followup 2021-07-29 08:36:15 +03:00
vyzo 5e8b2c7860 make symlink helper freestanding 2021-07-29 08:35:53 +03:00
Jiaying Wang 8be8f043bd Merge branch 'master' into jen/backport-to-master 2021-07-29 01:17:21 -04:00
hannahhoward 8d6bff36f2 fix(marketevents): use ReceivedCidsLen
improve data transfer logger by not reading in entire cid lists
2021-07-29 01:12:13 -04:00
ZenGround0 ee59479e25 Merge pull request #6927 from filecoin-project/wnezhenxiang/patch-3-fixed
PR #5109 + suggested fix
2021-07-29 00:53:40 -04:00
ZenGround0 11394aa4aa Improve cli docs 2021-07-29 00:29:27 -04:00
ZenGround0 8ccee51887 docsgen 2021-07-29 00:24:24 -04:00
ZenGround0 5c823e9b42 PR #5109 + suggested fix 2021-07-28 23:59:59 -04:00
Steven Allen ca76822fde Merge pull request #6918 from filecoin-project/feat/print-runtime-send-update
Log more call context during errors
2021-07-28 20:47:15 -07:00
Steven Allen fe74311209 Merge branch 'master' into feat/print-runtime-send-update 2021-07-28 18:55:38 -07:00
Steven Allen 742321dd08 Merge pull request #6916 from filecoin-project/fix/make-gotip-ver-check
make: fix version check when using gotip
2021-07-28 18:55:05 -07:00
Steven Allen cf94aed32e Merge branch 'master' into fix/vouchers 2021-07-28 18:45:58 -07:00
Steven Allen 69f0bdd486 Merge branch 'master' into fix/make-gotip-ver-check 2021-07-28 18:36:29 -07:00
Steven Allen 6ffcf611a6 Merge pull request #6923 from filecoin-project/frrist/better-state-tree-errors
polish(errors): better state tree errors
2021-07-28 18:35:57 -07:00
frrist 256d12773b polish(errors): better state tree errors 2021-07-28 17:50:22 -07:00
raulk 5be5f255d1 Merge pull request #6919 from filecoin-project/feat/improve-logging-transfers
Update to branches with improved logging
2021-07-29 00:47:54 +01:00
raulk b812d3ec26 Merge branch 'master' into feat/improve-logging-transfers 2021-07-29 00:27:41 +01:00
raulk 640407aae7 Merge pull request #6906 from filecoin-project/nonsense/get-enabled-subsystems-api
adding an RuntimeSubsystems API to storage miner; fix `lotus-miner info`
2021-07-29 00:04:29 +01:00
Raúl Kripalani d3742048f9 address nits. 2021-07-28 23:56:18 +01:00
Raúl Kripalani a61ba7b09c Merge branch 'master' into nonsense/get-enabled-subsystems-api 2021-07-28 23:55:59 +01:00
Steven Allen b1fb707a3a Merge pull request #6882 from hunjixin/fix/check_ticket_msg
fix ticket check
2021-07-28 15:44:06 -07:00
ZenGround0 e09a25ca68 Remove unnecessary ret log 2021-07-28 18:26:29 -04:00
ZenGround0 a968784908 fix new panics in invoker_test.go 2021-07-28 18:26:29 -04:00
ZenGround0 0202192fc0 Log more call context during errors 2021-07-28 18:26:29 -04:00
Steven Allen dbe4891a39 Merge branch 'master' into fix/check_ticket_msg 2021-07-28 15:25:40 -07:00
hannahhoward 5a3b4ab34c feat(deps): update to branches with improved logging
update sub repos with improved logging around data transfer processing
2021-07-28 14:46:13 -07:00
Aayush Rajasekaran acf6b07794 Merge pull request #6907 from filecoin-project/deps/update-pubsub
update go-libp2p-pubsub to v0.5.3
2021-07-28 17:34:29 -04:00
Aayush Rajasekaran b397955f24 Merge branch 'master' into deps/update-pubsub 2021-07-28 17:15:38 -04:00
Aayush Rajasekaran 4a90c0f13b Merge pull request #6803 from filecoin-project/mg/feat/configurable-sector-expirations
Configurable CC Sector Expiration
2021-07-28 17:07:19 -04:00
Aayush Rajasekaran 21244704fc Merge branch 'master' into mg/feat/configurable-sector-expirations 2021-07-28 16:45:27 -04:00
raulk 80aedcd276 Merge branch 'master' into nonsense/get-enabled-subsystems-api 2021-07-28 20:09:43 +01:00
Raúl Kripalani 07f40b9488 fix docs and nits. 2021-07-28 20:03:25 +01:00
Łukasz Magiera a1a23d8be5 make: fix version check when using gotip 2021-07-28 19:12:23 +02:00
Łukasz Magiera ef94509eac Merge pull request #6912 from filecoin-project/chore/drop-dead-utils
Drop townhall/chainwatch
2021-07-28 18:20:34 +02:00
Łukasz Magiera 3b617f4528 mod tidy 2021-07-28 17:59:37 +02:00
Łukasz Magiera 25052fe48f Remove chainwatch (now filecoin-project/sentinel) 2021-07-28 17:59:01 +02:00
Łukasz Magiera 389f71251c Remove townhall 2021-07-28 17:58:46 +02:00
Łukasz Magiera 5867e34ec9 Merge pull request #6911 from filecoin-project/feat/make-gocc
make: Allow setting Go compiler with GOCC
2021-07-28 17:57:27 +02:00
Łukasz Magiera f8afb699cd make: Allow setting Go compiler with GOCC 2021-07-28 17:29:17 +02:00
Anton Evangelatov 6969202a03 make linter happy 2021-07-28 17:47:01 +03:00
Anton Evangelatov 54c6a3a454 extract outputs for mining node and markets node in separate functions 2021-07-28 17:31:48 +03:00
vyzoandJakub Sztandera b75ff37448 fix typo
Co-authored-by: Jakub Sztandera <kubuxu@protocol.ai>
2021-07-28 17:11:04 +03:00
Anton Evangelatov 4cf5c8f656 fixup 2021-07-28 16:23:04 +03:00
vyzo c65d72fbca fix format specifier 2021-07-28 16:20:25 +03:00
vyzo fff1c0ae57 improve detection of relative links 2021-07-28 16:15:39 +03:00
Anton Evangelatov de4a847078 add RuntimeSubsystems API method; use it in lotus-miner info 2021-07-28 16:02:05 +03:00
vyzo 66e793531d update go-libp2p-pubsub to v0.5.3 2021-07-28 15:59:16 +03:00
vyzo 297c9e2f7a extend test to check the validity of relative links 2021-07-28 11:56:35 +03:00
vyzo 0740274b7c make relative links when the canonical and new db paths are in the same directory 2021-07-28 11:56:23 +03:00
vyzo 950ded454d code cosmetics: rename variables for better readability and some comments 2021-07-28 11:49:42 +03:00
Steven Allen 9d0cc2c9d7 Merge pull request #6899 from filecoin-project/fix/issue-templates
chore: fixup issue templates
2021-07-27 22:29:17 -07:00
Steven Allen 0bc7456b7f Merge branch 'master' into fix/issue-templates 2021-07-27 22:03:52 -07:00
Jiaying Wang b8bb673b75 Merge pull request #6903 from filecoin-project/feat/v1.11.2
bump master version to v1.11.2-dev
2021-07-27 23:38:45 -04:00
Jiaying Wang 2e7ba05173 Merge branch 'master' into feat/v1.11.2 2021-07-27 23:05:15 -04:00
Jennifer Wang f9595b58ee make gen 2021-07-27 23:02:54 -04:00
Jennifer Wang e49c77e29c bump master version to v1.11.2-dev 2021-07-27 22:54:23 -04:00
Steven Allen 01c786c141 chore: fixup issue templates
1. Render logs/version as text, body as markdown. Previously, the _body_
was rendered as bash.
2. Fix spelling of "required".
2021-07-27 18:48:08 -07:00
Jiaying Wang c0b07286aa Merge pull request #6894 from filecoin-project/fix/11-masyer
releases -> master for v1.11.0
2021-07-27 21:14:48 -04:00
Jennifer Wang 9afb63d2e4 Merge branch 'master' into fix/11-masyer 2021-07-27 20:03:43 -04:00
Jiaying Wang c31e5596e8 Merge pull request #6889 from filecoin-project/chore/cleanup-chain
Reduce entropy in the chain package
2021-07-27 18:04:27 -04:00
Jiaying Wang 29b2d27f00 Merge branch 'master' into chore/cleanup-chain 2021-07-27 18:04:17 -04:00
Jiaying Wang d45b4a7a1f Merge branch 'master' into chore/cleanup-chain 2021-07-27 17:11:36 -04:00
Łukasz Magiera dfac7c5f29 Merge branch 'master' into chore/cleanup-chain 2021-07-27 21:35:48 +02:00
Jakub Sztandera a5bcf8b5b2 Add nolint
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2021-07-27 09:10:41 -07:00
Jakub Sztandera ab71bc0e78 Don't test extra as we don't support it
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2021-07-27 09:10:41 -07:00
Jakub Sztandera 26da526379 Verify Voucher locks in VoucherValidUnlocked
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2021-07-27 09:10:41 -07:00
Łukasz Magiera e163d556fb Merge branch 'master' into chore/cleanup-chain 2021-07-27 17:49:42 +02:00
Łukasz Magiera c57c20c6e4 fix lint 2021-07-27 15:58:18 +02:00
Łukasz Magiera 05a3710288 chainstore: Fix test build 2021-07-27 15:53:47 +02:00
Łukasz Magiera ae63a4b33b fix lotus-sim build 2021-07-27 15:49:01 +02:00
Łukasz Magiera ce82f2827b stmgr: Put actor state accessors in actors.go 2021-07-27 15:43:11 +02:00
Łukasz Magiera e7d73cbe56 vm: Remove unused ActorBalance 2021-07-27 15:34:39 +02:00
Łukasz Magiera 9bd312881d VMSys doesn't belong in chainstore 2021-07-27 15:30:23 +02:00
Łukasz Magiera ca1cd741c3 stmgr: Split stmgr.go into smaller subfiles 2021-07-27 15:15:50 +02:00
Łukasz Magiera 50b217817e stmgr: Split upgrade code from upgrade runtime 2021-07-27 14:48:30 +02:00
Łukasz Magiera 6ba42e3e6b chainstore: refactor store.go into more subfiles 2021-07-27 14:41:36 +02:00
hunjixin ac8937245c fix ticket check 2021-07-27 16:21:47 +08:00
Mike Greenberg e68c59f984 fix: Update node config docs 2021-07-23 21:05:50 -04:00
Mike Greenberg 64d2b7a122 Merge branch 'origin/master' into mg/feat/configurable-sector-expirations
* origin/master: (47 commits)
  Fix links in issue templates
  Update issue templates and add templates for M1
  config: Add newlines consistently
  config: Add note on codegen to types.go
  fix lint
  cli docsgen
  config: Bring some docs from filecoin-docs
  add comment about the necessity of FileIO
  improve README
  config doc gen: generate formatted code
  config: Fix doc finding logic
  Nicer lotus-miner config commands
  Move doc-comment logic to the config pkg
  config: doc struct codegen
  lotus daemon config utils
  adjust compaction test with badger to hit the db
  add splitstore compaction test with badger markset
  update README with configuration options
  tweak badger options
  some tweaks in badger markset
  ...

Conflicts:
        node/config/def.go
2021-07-23 20:36:54 -04:00
Mike Greenberg 41bce7925a fix: Remove unnecessary Truncate 2021-07-23 20:12:30 -04:00
Mike Greenberg 3829d6bd9a fix: Remove actor method from autogen source; Move inline to pkg 2021-07-22 15:10:49 -04:00
Mike Greenberg 123a976f62 chore: Add unit test for custom CC lifetime value expiration 2021-07-22 15:07:03 -04:00
Mike Greenberg 7ee46ad4e0 fix: PreCommitPolicy unit tests 2021-07-22 15:07:03 -04:00
Mike Greenberg adb62a3fff chore: Move cfg getter into PCPolicy; Clamp values on get 2021-07-22 15:07:03 -04:00
Mike Greenberg 9e34cce1f2 feat(config): support configurable CC sector expiration 2021-07-22 15:07:03 -04:00
1263 changed files with 115309 additions and 56412 deletions
+437 -223
View File
File diff suppressed because it is too large Load Diff
+282 -223
View File
@@ -1,23 +1,33 @@
version: 2.1
orbs:
go: gotest/tools@0.0.13
aws-cli: circleci/aws-cli@1.3.2
packer: salaxander/packer@0.0.3
executors:
golang:
docker:
- image: circleci/golang:1.16.4
# Must match GO_VERSION_MIN in project root
- image: cimg/go:1.18.1
resource_class: 2xlarge
ubuntu:
docker:
- image: ubuntu:20.04
packer:
description: |
The HashiCorp provided Packer container
parameters:
packer-version:
type: string
default: "1.8"
docker:
- image: hashicorp/packer:<< parameters.packer-version >>
commands:
install-deps:
steps:
- go/install-ssh
- go/install: {package: git}
- run: |
sudo apt update
sudo apt install python-is-python3
prepare:
parameters:
linux:
@@ -35,8 +45,46 @@ commands:
- when:
condition: << parameters.linux >>
steps:
- run:
name: Check Go Version
command: |
v=`go version | { read _ _ v _; echo ${v#go}; }`
if [["[[ $v != `cat GO_VERSION_MIN` ]]"]]; then
echo "GO_VERSION_MIN file does not match the go version being used."
echo "Please update image to cimg/go:`cat GO_VERSION_MIN` or update GO_VERSION_MIN to $v."
exit 1
fi
- run: sudo apt-get update
- run: sudo apt-get install ocl-icd-opencl-dev libhwloc-dev
- when:
condition: <<parameters.darwin>>
steps:
- run:
name: Install Go
command: |
curl https://dl.google.com/go/go`cat GO_VERSION_MIN`.darwin-amd64.pkg -o /tmp/go.pkg && \
sudo installer -pkg /tmp/go.pkg -target /
- run:
name: Export Go
command: |
echo 'export GOPATH="${HOME}/go"' >> $BASH_ENV
- run: go version
- run:
name: Install pkg-config, goreleaser, and sha512sum
command: HOMEBREW_NO_AUTO_UPDATE=1 brew install pkg-config goreleaser/tap/goreleaser coreutils
- run:
name: Install Rust
command: |
curl https://sh.rustup.rs -sSf | sh -s -- -y
- run:
name: Install hwloc
command: |
mkdir ~/hwloc
curl --location https://download.open-mpi.org/release/hwloc/v2.4/hwloc-2.4.1.tar.gz --output ~/hwloc/hwloc-2.4.1.tar.gz
cd ~/hwloc
tar -xvzpf hwloc-2.4.1.tar.gz
cd hwloc-2.4.1
./configure && make && sudo make install
- run: git submodule sync
- run: git submodule update --init
download-params:
@@ -44,13 +92,13 @@ commands:
- restore_cache:
name: Restore parameters cache
keys:
- 'v25-2k-lotus-params'
- 'v26-2k-lotus-params'
paths:
- /var/tmp/filecoin-proof-parameters/
- run: ./lotus fetch-params 2048
- save_cache:
name: Save parameters cache
key: 'v25-2k-lotus-params'
key: 'v26-2k-lotus-params'
paths:
- /var/tmp/filecoin-proof-parameters/
install_ipfs:
@@ -58,22 +106,51 @@ commands:
- run: |
apt update
apt install -y wget
wget https://github.com/ipfs/go-ipfs/releases/download/v0.4.22/go-ipfs_v0.4.22_linux-amd64.tar.gz
wget https://github.com/ipfs/go-ipfs/releases/download/v0.4.22/go-ipfs_v0.4.22_linux-amd64.tar.gz.sha512
if [ "$(sha512sum go-ipfs_v0.4.22_linux-amd64.tar.gz)" != "$(cat go-ipfs_v0.4.22_linux-amd64.tar.gz.sha512)" ]
wget https://github.com/ipfs/go-ipfs/releases/download/v0.12.2/go-ipfs_v0.12.2_linux-amd64.tar.gz
wget https://github.com/ipfs/go-ipfs/releases/download/v0.12.2/go-ipfs_v0.12.2_linux-amd64.tar.gz.sha512
if [ "$(sha512sum go-ipfs_v0.12.2_linux-amd64.tar.gz)" != "$(cat go-ipfs_v0.12.2_linux-amd64.tar.gz.sha512)" ]
then
echo "ipfs failed checksum check"
exit 1
fi
tar -xf go-ipfs_v0.4.22_linux-amd64.tar.gz
tar -xf go-ipfs_v0.12.2_linux-amd64.tar.gz
mv go-ipfs/ipfs /usr/local/bin/ipfs
chmod +x /usr/local/bin/ipfs
install_ipfs_macos:
steps:
- run: |
curl -O https://dist.ipfs.io/kubo/v0.14.0/kubo_v0.14.0_darwin-amd64.tar.gz
tar -xvzf kubo_v0.14.0_darwin-amd64.tar.gz
pushd kubo
sudo bash install.sh
popd
rm -rf kubo/
rm kubo_v0.14.0_darwin-amd64.tar.gz
git_fetch_all_tags:
steps:
- run:
name: fetch all tags
command: |
git fetch --all
packer_build:
description: "Run a packer build"
parameters:
template:
description: |
The name of the packer template file
type: string
default: packer.json
args:
description: |
Arguments to pass to the packer build command
type: string
default: ""
steps:
- run:
name: "Run a packer build"
command: packer build << parameters.args >> << parameters.template >>
no_output_timeout: 30m
jobs:
mod-tidy-check:
@@ -81,9 +158,13 @@ jobs:
steps:
- install-deps
- prepare
- go/mod-tidy-check
build-all:
- run: go mod tidy -v
- run:
name: Check git diff
command: |
git --no-pager diff go.mod go.sum
git --no-pager diff --quiet go.mod go.sum
build-linux:
executor: golang
steps:
- install-deps
@@ -92,6 +173,9 @@ jobs:
- run: sudo apt-get install npm
- run:
command: make buildall
- run:
name: check tag and version output match
command: ./scripts/version-check.sh ./lotus
- store_artifacts:
path: lotus
- store_artifacts:
@@ -138,16 +222,6 @@ jobs:
type: string
default: standard-verbose
description: gotestsum format. https://github.com/gotestyourself/gotestsum#format
coverage:
type: string
default: -coverprofile=coverage.txt -coverpkg=github.com/filecoin-project/lotus/...
description: Coverage flag. Set to the empty string to disable.
codecov-upload:
type: boolean
default: true
description: |
Upload coverage report to https://codecov.io/. Requires the codecov API token to be
set as an environment variable for private projects.
executor: << parameters.executor >>
steps:
- install-deps
@@ -156,14 +230,12 @@ jobs:
command: make deps lotus
no_output_timeout: 30m
- download-params
- go/install-gotestsum:
gobin: $HOME/.local/bin
version: 0.5.2
- run:
name: go test
environment:
TEST_RUSTPROOFS_LOGS: << parameters.proofs-log-test >>
SKIP_CONFORMANCE: "1"
LOTUS_SRC_DIR: /home/circleci/project
command: |
mkdir -p /tmp/test-reports/<< parameters.suite >>
mkdir -p /tmp/test-artifacts
@@ -172,7 +244,6 @@ jobs:
--junitfile /tmp/test-reports/<< parameters.suite >>/junit.xml \
--jsonfile /tmp/test-artifacts/<< parameters.suite >>.json \
-- \
<< parameters.coverage >> \
<< parameters.go-test-flags >> \
<< parameters.target >>
no_output_timeout: 30m
@@ -180,19 +251,10 @@ jobs:
path: /tmp/test-reports
- store_artifacts:
path: /tmp/test-artifacts/<< parameters.suite >>.json
- when:
condition: << parameters.codecov-upload >>
steps:
- go/install: {package: bash}
- go/install: {package: curl}
- run:
shell: /bin/bash -eo pipefail
command: |
bash <(curl -s https://codecov.io/bash)
test-conformance:
description: |
Run tests using a corpus of interoperable test vectors for Filecoin
Run tests using a corpus of interoperable test vectors for Filecoin
implementations to test their correctness and compliance with the Filecoin
specifications.
parameters:
@@ -223,9 +285,6 @@ jobs:
cd extern/test-vectors
git fetch
git checkout origin/<< parameters.vectors-branch >>
- go/install-gotestsum:
gobin: $HOME/.local/bin
version: 0.5.2
- run:
name: install statediff globally
command: |
@@ -282,21 +341,6 @@ jobs:
root: "."
paths:
- linux-butterflynet
build-ntwk-nerpa:
description: |
Compile lotus binaries for the nerpa network
parameters:
<<: *test-params
executor: << parameters.executor >>
steps:
- install-deps
- prepare
- run: make nerpanet
- run: mkdir linux-nerpanet && mv lotus lotus-miner lotus-worker linux-nerpanet
- persist_to_workspace:
root: "."
paths:
- linux-nerpanet
build-lotus-soup:
description: |
Compile `lotus-soup` Testground test plan
@@ -330,7 +374,7 @@ jobs:
command: pushd testplans/lotus-soup && mkdir -p $HOME/testground && cp env-ci.toml $HOME/testground/.env.toml && echo 'endpoint="https://ci.testground.ipfs.team"' >> $HOME/testground/.env.toml && echo 'user="circleci"' >> $HOME/testground/.env.toml
- run:
name: "prepare testground home dir and link test plans"
command: mkdir -p $HOME/testground/plans && ln -s $(pwd)/testplans/lotus-soup $HOME/testground/plans/lotus-soup && ln -s $(pwd)/testplans/graphsync $HOME/testground/plans/graphsync
command: mkdir -p $HOME/testground/plans && ln -s $(pwd)/testplans/lotus-soup $HOME/testground/plans/lotus-soup
- run:
name: "go get lotus@master"
command: cd testplans/lotus-soup && go get github.com/filecoin-project/lotus@master
@@ -340,65 +384,42 @@ jobs:
- run:
name: "trigger payment channel stress testplan on taas"
command: ~/testground-cli run composition -f $HOME/testground/plans/lotus-soup/_compositions/paych-stress-k8s.toml --metadata-commit=$CIRCLE_SHA1 --metadata-repo=filecoin-project/lotus --metadata-branch=$CIRCLE_BRANCH
- run:
name: "trigger graphsync testplan on taas"
command: ~/testground-cli run composition -f $HOME/testground/plans/graphsync/_compositions/stress-k8s.toml --metadata-commit=$CIRCLE_SHA1 --metadata-repo=filecoin-project/lotus --metadata-branch=$CIRCLE_BRANCH
build-macos:
description: build darwin lotus binary
parameters:
publish:
default: false
description: publish github release and homebrew?
type: boolean
macos:
xcode: "10.0.0"
xcode: "13.4.1"
working_directory: ~/go/src/github.com/filecoin-project/lotus
steps:
- prepare:
linux: false
darwin: true
- run:
name: Install go
command: |
curl -O https://dl.google.com/go/go1.16.4.darwin-amd64.pkg && \
sudo installer -pkg go1.16.4.darwin-amd64.pkg -target /
- run:
name: Install pkg-config
command: HOMEBREW_NO_AUTO_UPDATE=1 brew install pkg-config
- run: go version
- run:
name: Install Rust
command: |
curl https://sh.rustup.rs -sSf | sh -s -- -y
- run:
name: Install jq
command: |
curl --location https://github.com/stedolan/jq/releases/download/jq-1.6/jq-osx-amd64 --output /usr/local/bin/jq
chmod +x /usr/local/bin/jq
- run:
name: Install hwloc
command: |
mkdir ~/hwloc
curl --location https://download.open-mpi.org/release/hwloc/v2.4/hwloc-2.4.1.tar.gz --output ~/hwloc/hwloc-2.4.1.tar.gz
cd ~/hwloc
tar -xvzpf hwloc-2.4.1.tar.gz
cd hwloc-2.4.1
./configure && make && sudo make install
- install_ipfs_macos
- restore_cache:
name: restore cargo cache
key: v3-go-deps-{{ arch }}-{{ checksum "~/go/src/github.com/filecoin-project/lotus/go.sum" }}
- install-deps
- run:
command: make build
no_output_timeout: 30m
- when:
condition: << parameters.publish >>
steps:
- run: goreleaser release --rm-dist
- run: ./scripts/generate-checksums.sh
- run: ./scripts/publish-checksums.sh
- when:
condition:
not: << parameters.publish >>
steps:
- run: goreleaser release --rm-dist --snapshot
- run: ./scripts/generate-checksums.sh
- store_artifacts:
path: lotus
- store_artifacts:
path: lotus-miner
- store_artifacts:
path: lotus-worker
- run: mkdir darwin && mv lotus lotus-miner lotus-worker darwin/
path: dist
- persist_to_workspace:
root: "."
paths:
- darwin
- dist
- save_cache:
name: save cargo cache
key: v3-go-deps-{{ arch }}-{{ checksum "~/go/src/github.com/filecoin-project/lotus/go.sum" }}
@@ -408,14 +429,31 @@ jobs:
build-appimage:
machine:
image: ubuntu-2004:202104-01
image: ubuntu-2004:202111-02
steps:
- checkout
- attach_workspace:
at: "."
- run:
name: Update Go
command: |
sudo rm -rf /usr/local/go && \
curl -L https://golang.org/dl/go`cat GO_VERSION_MIN`.linux-amd64.tar.gz -o /tmp/go.tar.gz && \
sudo tar -C /usr/local -xvf /tmp/go.tar.gz
- run: go version
- run:
name: install appimage-builder
command: |
# appimage-builder requires /dev/snd to exist. It creates containers during the testing phase
# that pass sound devices from the host to the testing container. (hard coded!)
# https://github.com/AppImageCrafters/appimage-builder/blob/master/appimagebuilder/modules/test/execution_test.py#L54
# Circleci doesn't provide a working sound device; this is enough to fake it.
if [ ! -e /dev/snd ]
then
sudo mkdir /dev/snd
sudo mknod /dev/snd/ControlC0 c 1 2
fi
# docs: https://appimage-builder.readthedocs.io/en/latest/intro/install.html
sudo apt update
sudo apt install -y python3-pip python3-setuptools patchelf desktop-file-utils libgdk-pixbuf2.0-dev fakeroot strace
@@ -491,9 +529,6 @@ jobs:
executor:
type: executor
default: golang
golangci-lint-version:
type: string
default: 1.27.0
concurrency:
type: string
default: '2'
@@ -512,13 +547,10 @@ jobs:
- run:
command: make deps
no_output_timeout: 30m
- go/install-golangci-lint:
gobin: $HOME/.local/bin
version: << parameters.golangci-lint-version >>
- run:
name: Lint
command: |
$HOME/.local/bin/golangci-lint run -v --timeout 2m \
golangci-lint run -v --timeout 2m \
--concurrency << parameters.concurrency >> << parameters.args >>
lint-all:
<<: *lint
@@ -526,6 +558,15 @@ jobs:
publish:
description: publish binary artifacts
executor: ubuntu
parameters:
linux:
default: false
description: publish linux binaries?
type: boolean
appimage:
default: false
description: publish appimage binaries?
type: boolean
steps:
- run:
name: Install git jq curl
@@ -536,12 +577,16 @@ jobs:
- install_ipfs
- attach_workspace:
at: "."
- run:
name: Create bundles
command: ./scripts/build-bundle.sh
- run:
name: Publish release
command: ./scripts/publish-release.sh
- when:
condition: << parameters.linux >>
steps:
- run: ./scripts/build-arch-bundle.sh linux
- run: ./scripts/publish-arch-release.sh linux
- when:
condition: << parameters.appimage >>
steps:
- run: ./scripts/build-appimage-bundle.sh
- run: ./scripts/publish-arch-release.sh appimage
publish-snapcraft:
description: build and push snapcraft
@@ -553,22 +598,29 @@ jobs:
type: string
default: "edge"
description: snapcraft channel
snap-name:
type: string
default: 'lotus-filecoin'
description: name of snap in snap store
steps:
- checkout
- run:
name: install snapcraft
name: Install snapcraft
command: sudo snap install snapcraft --classic
- run:
name: create snapcraft config file
name: Build << parameters.snap-name >> snap
command: |
mkdir -p ~/.config/snapcraft
echo "$SNAPCRAFT_LOGIN_FILE" | base64 -d > ~/.config/snapcraft/snapcraft.cfg
if [ "<< parameters.snap-name >>" != 'lotus-filecoin' ]; then
cat snap/snapcraft.yaml | sed 's/lotus-filecoin/lotus/' > edited-snapcraft.yaml
mv edited-snapcraft.yaml snap/snapcraft.yaml
fi
snapcraft --use-lxd --debug
- run:
name: build snap
command: snapcraft --use-lxd
- run:
name: publish snap
command: snapcraft push *.snap --release << parameters.channel >>
name: Publish snap to << parameters.channel >> channel
shell: /bin/bash -o pipefail
command: |
snapcraft upload *.snap --release << parameters.channel >>
build-and-push-image:
description: build and push docker images to public AWS ECR registry
@@ -636,6 +688,11 @@ jobs:
default: "latest"
description: A comma-separated string containing docker image tags to build and push (default = latest)
target:
type: string
default: "lotus-all-in-one"
description: Docker target to build
steps:
- run:
name: Confirm that environment variables are set
@@ -675,6 +732,7 @@ jobs:
docker build \
<<#parameters.extra-build-args>><<parameters.extra-build-args>><</parameters.extra-build-args>> \
--target <<parameters.target>> \
-f <<parameters.path>>/<<parameters.dockerfile>> \
$docker_tag_args \
<<parameters.path>>
@@ -687,54 +745,16 @@ jobs:
docker push $<<parameters.account-url>>/<<parameters.repo>>:${tag}
done
publish-packer-mainnet:
description: build and push AWS IAM and DigitalOcean droplet.
publish-packer-snap:
description: build packer image with snap. mainnet only.
executor:
name: packer/default
packer-version: 1.6.6
name: packer
steps:
- checkout
- attach_workspace:
at: "."
- packer/build:
template: tools/packer/lotus.pkr.hcl
args: "-var ci_workspace_bins=./linux -var lotus_network=mainnet -var git_tag=$CIRCLE_TAG"
publish-packer-calibrationnet:
description: build and push AWS IAM and DigitalOcean droplet.
executor:
name: packer/default
packer-version: 1.6.6
steps:
- checkout
- attach_workspace:
at: "."
- packer/build:
template: tools/packer/lotus.pkr.hcl
args: "-var ci_workspace_bins=./linux-calibrationnet -var lotus_network=calibrationnet -var git_tag=$CIRCLE_TAG"
publish-packer-butterflynet:
description: build and push AWS IAM and DigitalOcean droplet.
executor:
name: packer/default
packer-version: 1.6.6
steps:
- checkout
- attach_workspace:
at: "."
- packer/build:
template: tools/packer/lotus.pkr.hcl
args: "-var ci_workspace_bins=./linux-butterflynet -var lotus_network=butterflynet -var git_tag=$CIRCLE_TAG"
publish-packer-nerpanet:
description: build and push AWS IAM and DigitalOcean droplet.
executor:
name: packer/default
packer-version: 1.6.6
steps:
- checkout
- attach_workspace:
at: "."
- packer/build:
template: tools/packer/lotus.pkr.hcl
args: "-var ci_workspace_bins=./linux-nerpanet -var lotus_network=nerpanet -var git_tag=$CIRCLE_TAG"
- packer_build:
template: tools/packer/lotus-snap.pkr.hcl
publish-dockerhub:
description: publish to dockerhub
machine:
@@ -752,26 +772,32 @@ jobs:
name: docker build
command: |
docker build --target lotus -t filecoin/lotus:<< parameters.tag >> -f Dockerfile.lotus .
docker build --target lotus-gateway -t filecoin/lotus-gateway:<< parameters.tag >> -f Dockerfile.lotus .
docker build --target lotus-all-in-one -t filecoin/lotus-all-in-one:<< parameters.tag >> -f Dockerfile.lotus .
if [["[[ ! -z $CIRCLE_SHA1 ]]"]]; then
docker build --target lotus -t filecoin/lotus:$CIRCLE_SHA1 -f Dockerfile.lotus .
docker build --target lotus-gateway -t filecoin/lotus-gateway:$CIRCLE_SHA1 -f Dockerfile.lotus .
docker build --target lotus-all-in-one -t filecoin/lotus-all-in-one:$CIRCLE_SHA1 -f Dockerfile.lotus .
fi
if [["[[ ! -z $CIRCLE_TAG ]]"]]; then
docker build --target lotus -t filecoin/lotus:$CIRCLE_TAG -f Dockerfile.lotus .
docker build --target lotus-gateway -t filecoin/lotus-gateway:$CIRCLE_TAG -f Dockerfile.lotus .
docker build --target lotus-all-in-one -t filecoin/lotus-all-in-one:$CIRCLE_TAG -f Dockerfile.lotus .
fi
- run:
name: docker push
command: |
docker push filecoin/lotus:<< parameters.tag >>
docker push filecoin/lotus-gateway:<< parameters.tag >>
docker push filecoin/lotus-all-in-one:<< parameters.tag >>
if [["[[ ! -z $CIRCLE_SHA1 ]]"]]; then
docker push filecoin/lotus:$CIRCLE_SHA1
docker push filecoin/lotus-gateway:$CIRCLE_SHA1
docker push filecoin/lotus-all-in-one:$CIRCLE_SHA1
fi
if [["[[ ! -z $CIRCLE_TAG ]]"]]; then
docker push filecoin/lotus:$CIRCLE_TAG
docker push filecoin/lotus-gateway:$CIRCLE_TAG
docker push filecoin/lotus-all-in-one:$CIRCLE_TAG
fi
@@ -804,25 +830,23 @@ workflows:
- test:
go-test-flags: "-run=TestMulticoreSDR"
suite: multicore-sdr-check
target: "./extern/sector-storage/ffiwrapper"
target: "./storage/sealer/ffiwrapper"
proofs-log-test: "1"
- test-conformance:
suite: conformance
codecov-upload: false
target: "./conformance"
- test-conformance:
name: test-conformance-bleeding-edge
codecov-upload: false
suite: conformance-bleeding-edge
target: "./conformance"
vectors-branch: master
vectors-branch: specs-actors-v7
- trigger-testplans:
filters:
branches:
only:
- master
- build-debug
- build-all:
- build-linux:
filters:
tags:
only:
@@ -837,21 +861,38 @@ workflows:
tags:
only:
- /^v\d+\.\d+\.\d+(-rc\d+)?$/
- build-ntwk-nerpa:
filters:
tags:
only:
- /^v\d+\.\d+\.\d+(-rc\d+)?$/
- build-lotus-soup
- build-macos:
name: publish-macos
publish: true
filters:
branches:
ignore:
- /.*/
tags:
only:
- /^v\d+\.\d+\.\d+(-rc\d+)?$/
- /^v\d+\.\d+\.\d+$/
- build-macos:
filters:
branches:
only:
- /^release\/v\d+\.\d+\.\d+(-rc\d+)?$/
tags:
only:
- /^v\d+\.\d+\.\d+-rc\d+$/
- build-appimage:
filters:
branches:
only:
- /^release\/v\d+\.\d+\.\d+(-rc\d+)?$/
tags:
only:
- /^v\d+\.\d+\.\d+(-rc\d+)?$/
- publish:
name: publish-linux
linux: true
requires:
- build-linux
filters:
branches:
ignore:
@@ -860,9 +901,9 @@ workflows:
only:
- /^v\d+\.\d+\.\d+(-rc\d+)?$/
- publish:
name: publish-appimage
appimage: true
requires:
- build-all
- build-macos
- build-appimage
filters:
branches:
@@ -872,60 +913,63 @@ workflows:
only:
- /^v\d+\.\d+\.\d+(-rc\d+)?$/
- build-and-push-image:
name: build-and-push/lotus-all-in-one
dockerfile: Dockerfile.lotus
path: .
repo: lotus-dev
tag: '${CIRCLE_SHA1:0:8}'
- publish-packer-mainnet:
requires:
- build-all
filters:
branches:
ignore:
- /.*/
tags:
only:
- /^v\d+\.\d+\.\d+(-rc\d+)?$/
- publish-packer-calibrationnet:
requires:
- build-ntwk-calibration
filters:
branches:
ignore:
- /.*/
tags:
only:
- /^v\d+\.\d+\.\d+(-rc\d+)?$/
- publish-packer-butterflynet:
requires:
- build-ntwk-butterfly
filters:
branches:
ignore:
- /.*/
tags:
only:
- /^v\d+\.\d+\.\d+(-rc\d+)?$/
- publish-packer-nerpanet:
requires:
- build-ntwk-nerpa
filters:
branches:
ignore:
- /.*/
tags:
only:
- /^v\d+\.\d+\.\d+(-rc\d+)?$/
target: lotus-all-in-one
- build-and-push-image:
name: build-and-push/lotus-test
dockerfile: Dockerfile.lotus
path: .
repo: lotus-test
tag: '${CIRCLE_SHA1:0:8}'
target: lotus-test
- publish-snapcraft:
name: publish-snapcraft-stable
name: "Publish Snapcraft (lotus-filecoin / candidate)"
channel: stable
snap-name: lotus-filecoin
filters:
branches:
ignore:
- /.*/
tags:
only:
- /^v\d+\.\d+\.\d+(-rc\d+)?$/
- /^v\d+\.\d+\.\d+$/
- publish-snapcraft:
name: "Publish Snapcraft (lotus-filecoin / candidate)"
channel: candidate
snap-name: lotus-filecoin
filters:
branches:
ignore:
- /.*/
tags:
only:
- /^v\d+\.\d+\.\d+-rc\d+$/
- publish-snapcraft:
name: "Publish Snapcraft (lotus / stable)"
channel: stable
snap-name: lotus
filters:
branches:
ignore:
- /.*/
tags:
only:
- /^v\d+\.\d+\.\d+$/
- publish-snapcraft:
name: "Publish Snapcraft (lotus / candidate)"
channel: candidate
snap-name: lotus
filters:
branches:
ignore:
- /.*/
tags:
only:
- /^v\d+\.\d+\.\d+-rc\d+$/
- publish-dockerhub:
name: publish-dockerhub
tag: stable
@@ -947,8 +991,23 @@ workflows:
- master
jobs:
- publish-snapcraft:
name: publish-snapcraft-nightly
name: "Publish Snapcraft Nightly (lotus-filecoin / edge)"
channel: edge
snap-name: lotus-filecoin
- publish-snapcraft:
name: "Publish Snapcraft Nightly (lotus / edge)"
channel: edge
snap-name: lotus
- publish-dockerhub:
name: publish-dockerhub-nightly
tag: nightly
monthly:
triggers:
- schedule:
cron: "0 0 1 * *"
filters:
branches:
only:
- master
jobs:
- publish-packer-snap
-19
View File
@@ -1,19 +0,0 @@
comment: off
ignore:
- "**/cbor_gen.go"
- "api/test/**/*"
- "api/test/*"
- "gen/**/*"
- "gen/*"
- "cmd/lotus-shed/*"
- "cmd/tvx/*"
- "cmd/lotus-pcr/*"
- "cmd/tvx/*"
- "cmd/lotus-chainwatch/*"
- "cmd/lotus-health/*"
- "cmd/lotus-fountain/*"
- "cmd/lotus-townhall/*"
- "cmd/lotus-stats/*"
- "cmd/lotus-pcr/*"
github_checks:
annotations: false
+28 -20
View File
@@ -21,35 +21,45 @@ body:
required: true
- label: I did not make any code changes to lotus.
required: false
- type: dropdown
id: component-and-area
validations:
required: true
- type: checkboxes
attributes:
label: Lotus component
description: Please select the lotus component you are filing a bug for
options:
- lotus daemon - chain sync
- lotus miner - mining and block production
- lotus miner/worker - sealing
- lotus miner - proving(WindowPoSt)
- lotus miner/market - storage deal
- lotus miner/market - retrieval deal
- lotus client
- lotus JSON-RPC API
- lotus message management (mpool)
- Other
- label: lotus daemon - chain sync
required: false
- label: lotus miner - mining and block production
required: false
- label: lotus miner/worker - sealing
required: false
- label: lotus miner - proving(WindowPoSt)
required: false
- label: lotus miner/market - storage deal
required: false
- label: lotus miner/market - retrieval deal
required: false
- label: lotus miner/market - data transfer
required: false
- label: lotus client
required: false
- label: lotus JSON-RPC API
required: false
- label: lotus message management (mpool)
required: false
- label: Other
required: false
- type: textarea
id: version
attributes:
label: Lotus Version
render: text
description: Enter the output of `lotus version` and `lotus-miner version` if applicable.
placeholder: |
e.g.
Daemon:1.11.0-rc2+debug+git.0519cd371.dirty+api1.3.0
Local: lotus version 1.11.0-rc2+debug+git.0519cd371.dirty
validations:
reuiqred: true
required: true
- type: textarea
id: Description
attributes:
@@ -62,19 +72,18 @@ body:
* For sealing issues, include the output of `lotus-miner sectors status --log <sectorId>` for the failed sector(s).
* For proving issues, include the output of `lotus-miner proving` info.
* For deal making issues, include the output of `lotus client list-deals -v` and/or `lotus-miner storage-deals|retrieval-deals|data-transfers list [-v]` commands for the deal(s) in question.
render: bash
validations:
required: true
- type: textarea
id: extraInfo
attributes:
label: Logging Information
render: text
description: |
Please provide debug logs of the problem, remember you can get set log level control for:
* lotus: use `lotus log list` to get all log systems available and set level by `lotus log set-level`. An example can be found [here](https://docs.filecoin.io/get-started/lotus/configuration-and-advanced-usage/#log-level-control).
* lotus: use `lotus log list` to get all log systems available and set level by `lotus log set-level`. An example can be found [here](https://lotus.filecoin.io/lotus/configure/defaults/#log-level-control).
* lotus-miner:`lotus-miner log list` to get all log systems available and set level by `lotus-miner log set-level
If you don't provide detailed logs when you raise the issue it will almost certainly be the first request I make before furthur diagnosing the problem.
render: bash
validations:
required: true
- type: textarea
@@ -87,6 +96,5 @@ body:
2. Do '...'
3. See error '...'
...
render: bash
validations:
required: false
required: false
+24 -15
View File
@@ -15,24 +15,33 @@ body:
required: true
- label: I **have** a specific, actionable, and well motivated improvement to propose.
required: true
- type: dropdown
id: component
validations:
required: true
- type: checkboxes
attributes:
label: Lotus component
description: Please select the lotus component you are propoing improvement for
description: Please select the lotus component you are filing an improvement request for
options:
- lotus daemon - chain sync
- lotus miner - mining and block production
- lotus miner/worker - sealing
- lotus miner - proving(WindowPoSt)
- lotus miner/market - storage deal
- lotus miner/market - retrieval deal
- lotus client
- lotus JSON-RPC API
- lotus message management (mpool)
- Other
- label: lotus daemon - chain sync
required: false
- label: lotus miner - mining and block production
required: false
- label: lotus miner/worker - sealing
required: false
- label: lotus miner - proving(WindowPoSt)
required: false
- label: lotus miner/market - storage deal
required: false
- label: lotus miner/market - retrieval deal
required: false
- label: lotus miner/market - data transfer
required: false
- label: lotus client
required: false
- label: lotus JSON-RPC API
required: false
- label: lotus message management (mpool)
required: false
- label: Other
required: false
- type: textarea
id: request
attributes:
+24 -15
View File
@@ -13,24 +13,33 @@ body:
required: true
- label: I **have** a specific, actionable, and well motivated feature request to propose.
required: true
- type: dropdown
id: component
validations:
required: true
- type: checkboxes
attributes:
label: Lotus component
description: Please select the lotus component you are requesting a new feature for
description: Please select the lotus component you are filing a new feature request for
options:
- lotus daemon - chain sync
- lotus miner - mining and block production
- lotus miner/worker - sealing
- lotus miner - proving(WindowPoSt)
- lotus miner/market - storage deal
- lotus miner/market - retrieval deal
- lotus client
- lotus JSON-RPC API
- lotus message management (mpool)
- Other
- label: lotus daemon - chain sync
required: false
- label: lotus miner - mining and block production
required: false
- label: lotus miner/worker - sealing
required: false
- label: lotus miner - proving(WindowPoSt)
required: false
- label: lotus miner/market - storage deal
required: false
- label: lotus miner/market - retrieval deal
required: false
- label: lotus miner/market - data transfer
required: false
- label: lotus client
required: false
- label: lotus JSON-RPC API
required: false
- label: lotus message management (mpool)
required: false
- label: Other
required: false
- type: textarea
id: request
attributes:
@@ -1,91 +0,0 @@
name: "M1 Bug Report For Deal Making"
description: "File a bug report around deal making for the M1 releases"
labels: [need/triage, kind/bug, M1-release]
body:
- type: checkboxes
id: checklist
attributes:
label: Checklist
description: Please check off the following boxes before continuing to file a bug report!
options:
- label: This is **not** a question or a support request. If you have any lotus related questions, please ask in the [lotus forum](https://github.com/filecoin-project/lotus/discussions).
required: true
- label: I **am** reporting a bug w.r.t one of the [M1 tags](https://github.com/filecoin-project/lotus/discussions/6852#discussioncomment-1043951). If not, choose another issue option [here](https://github.com/filecoin-project/lotus/issues/new/choose).
required: true
- label: I **am** reporting a bug around deal making. If not, create a [M1 Bug Report For Non Deal Making Issue](https://github.com/filecoin-project/lotus/issues/new?assignees=&labels=need%2Ftriage%2Ckind%2Fbug%2CM1-release&template=m1_bug_report_non_deal.yml).
required: true
- label: I have my log level set as instructed [here](https://github.com/filecoin-project/lotus/discussions/6852#discussioncomment-1043678) and have logs available for troubleshooting.
required: true
- label: The deal is coming from one of the M1 clients(communitcated in the coordination slack channel).
required: true
- label: I **have** searched on the [issue tracker](https://github.com/filecoin-project/lotus/issues) and the [lotus forum](https://github.com/filecoin-project/lotus/discussions), and there is no existing related issue or discussion.
required: true
- type: dropdown
id: lotus-componets
validations:
required: true
attributes:
label: Lotus Component
description: Please select the lotus component you are filing a bug for
options:
- lotus miner market subsystem - storage deal
- lotus miner market subsystem - retrieval deal
- lotus miner - storage deal
- lotus miner - retrieval deal
- type: textarea
id: version
attributes:
label: Lotus Tag and Version
description: Enter the lotus tag, output of `lotus version` and `lotus-miner version`.
validations:
reuiqred: true
- type: textarea
id: Description
attributes:
label: Describe the Bug
description: |
This is where you get to tell us what went wrong, when doing so, please try to provide a clear and concise description of the bug with all related information:
* What you were doding when you experienced the bug?
* Any *error* messages you saw, *where* you saw them, and what you believe may have caused them (if you have any ideas).
* What is the expected behaviour?
render: bash
validations:
required: true
- type: textarea
id: deal-status
attributes:
label: Deal Status
description: What's the status of the deal?
placeholder: |
Please share the output of `lotus-miner storage-deals|retrieval-deals list [-v]` commands for the deal(s) in question.
validations:
required: true
- type: textarea
id: data-transfer-status
attributes:
label: Data Transfer Status
description: What's the status of the data transfer?
placeholder: |
Please share the output of `lotus-miner data-transfers list -v` commands for the deal(s) in question.
validations:
required: true
- type: textarea
id: logging
attributes:
label: Logging Information
description: Please link to the whole of the miner logs on your side of the transaction. You can upload the logs to a [gist](https://gist.github.com).
validations:
required: true
- type: textarea
id: RepoSteps
attributes:
label: Repo Steps (optional)
description: "Steps to reproduce the behavior"
value: |
1. Run '...'
2. Do '...'
3. See error '...'
...
render: bash
validations:
required: false
@@ -1,81 +0,0 @@
name: "M1 Bug Report For Non Deal Making Issue"
description: "File a bug report around non deal making issue for the M1 releases"
labels: [need/triage, kind/bug, M1-release]
body:
- type: checkboxes
id: checklist
attributes:
label: Checklist
description: Please check off the following boxes before continuing to file a bug report!
options:
- label: This is **not** a question or a support request. If you have any lotus related questions, please ask in the [lotus forum](https://github.com/filecoin-project/lotus/discussions).
required: true
- label: I **am** reporting a bug w.r.t one of the [M1 tags](https://github.com/filecoin-project/lotus/discussions/6852#discussioncomment-1043951). If not, choose another issue option [here](https://github.com/filecoin-project/lotus/issues/new/choose).
required: true
- label: I am **not** reporting a bug around deal making. If yes, create a [M1 Bug Report For Deal Making](https://github.com/filecoin-project/lotus/issues/new?assignees=&labels=need%2Ftriage%2Ckind%2Fbug%2CM1-release&template=m1_bug_report_deal.yml).
required: true
- label: I **have** searched on the [issue tracker](https://github.com/filecoin-project/lotus/issues) and the [lotus forum](https://github.com/filecoin-project/lotus/discussions), and there is no existing related issue or discussion.
required: true
- type: dropdown
id: component-and-area
validations:
required: true
attributes:
label: Lotus component
description: Please select the lotus component you are filing a bug for
options:
- lotus daemon - chain sync **with** splitstore enabled
- lotus daemon - chain sync **without** splitstore enabled
- lotus miner - mining and block production
- lotus miner/worker - sealing
- lotus miner - proving(WindowPoSt)
- lotus client
- lotus JSON-RPC API
- lotus message management (mpool)
- Other
- type: textarea
id: version
attributes:
label: Lotus Tag and Version
description: Enter the lotus tag, output of `lotus version` and `lotus-miner version`.
validations:
reuiqred: true
- type: textarea
id: Description
attributes:
label: Describe the Bug
description: |
This is where you get to tell us what went wrong, when doing so, please try to provide a clear and concise description of the bug with all related information:
* What you were doding when you experienced the bug?
* Any *error* messages you saw, *where* you saw them, and what you believe may have caused them (if you have any ideas).
* What is the expected behaviour?
* For sealing issues, include the output of `lotus-miner sectors status --log <sectorId>` for the failed sector(s).
* For proving issues, include the output of `lotus-miner proving` info.
render: bash
validations:
required: true
- type: textarea
id: extraInfo
attributes:
label: Logging Information
description: |
Please provide debug logs of the problem, remember you can get set log level control for:
* lotus: use `lotus log list` to get all log systems available and set level by `lotus log set-level`. An example can be found [here](https://docs.filecoin.io/get-started/lotus/configuration-and-advanced-usage/#log-level-control).
* lotus-miner:`lotus-miner log list` to get all log systems available and set level by `lotus-miner log set-level
If you don't provide detailed logs when you raise the issue it will almost certainly be the first request I make before furthur diagnosing the problem.
render: bash
validations:
required: true
- type: textarea
id: RepoSteps
attributes:
label: Repo Steps
description: "Steps to reproduce the behavior"
value: |
1. Run '...'
2. Do '...'
3. See error '...'
...
render: bash
validations:
required: false
+21
View File
@@ -0,0 +1,21 @@
## Related Issues
<!-- link all issues that this PR might resolve/fix. If an issue doesn't exist, include a brief motivation for the change being made.-->
## Proposed Changes
<!-- provide a clear list of the changes being made-->
## Additional Info
<!-- callouts, links to documentation, and etc-->
## Checklist
Before you mark the PR ready for review, please make sure that:
- [ ] All commits have a clear commit message.
- [ ] The PR title is in the form of of `<PR type>: <area>: <change being made>`
- example: ` fix: mempool: Introduce a cache for valid signatures`
- `PR type`: _fix_, _feat_, _INTERFACE BREAKING CHANGE_, _CONSENSUS BREAKING_, _build_, _chore_, _ci_, _docs_,_perf_, _refactor_, _revert_, _style_, _test_
- `area`: _api_, _chain_, _state_, _vm_, _data transfer_, _market_, _mempool_, _message_, _block production_, _multisig_, _networking_, _paychan_, _proving_, _sealing_, _wallet_, _deps_
- [ ] This PR has tests for new functionality or change in behaviour
- [ ] If new user-facing features are introduced, clear usage guidelines and / or documentation updates should be included in https://lotus.filecoin.io or [Discussion Tutorials.](https://github.com/filecoin-project/lotus/discussions/categories/tutorials)
- [ ] CI is green
+1 -1
View File
@@ -37,7 +37,7 @@ jobs:
- uses: actions/setup-go@v1
with:
go-version: '1.16.4'
go-version: '1.18.1'
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
+1 -1
View File
@@ -29,5 +29,5 @@ jobs:
days-before-pr-close: 2
remove-stale-when-updated: true
enable-statistics: true
+14
View File
@@ -0,0 +1,14 @@
name: sync-master-main
on:
push:
branches:
- master
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: update remote branch main
run: |
# overrides the remote branch (origin:github) `main`
git push origin --force master:main
+1 -1
View File
@@ -21,7 +21,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: testground run
uses: coryschwartz/testground-github-action@v1.1
uses: testground/testground-github-action@v1
with:
backend_addr: ${{ matrix.backend_addr }}
backend_proto: ${{ matrix.backend_proto }}
+6 -3
View File
@@ -9,7 +9,6 @@
/lotus-chainwatch
/lotus-shed
/lotus-sim
/lotus-pond
/lotus-townhall
/lotus-fountain
/lotus-stats
@@ -21,8 +20,6 @@
/docgen-md
/docgen-openrpc
/bench.json
/lotuspond/front/node_modules
/lotuspond/front/build
/cmd/lotus-townhall/townhall/node_modules
/cmd/lotus-townhall/townhall/build
/cmd/lotus-townhall/townhall/package-lock.json
@@ -40,6 +37,7 @@ build/paramfetch.sh
/bundle
/darwin
/linux
*.snap
*-fuzz.zip
/chain/types/work_msg/
@@ -47,3 +45,8 @@ bin/ipget
bin/tmp/*
.idea
scratchpad
build/builtin-actors/v*
build/builtin-actors/*.car
dist/
+5 -5
View File
@@ -25,7 +25,7 @@ skip-dirs:
issues:
exclude:
- "func name will be used as test\\.Test.* by other packages, and that stutters; consider calling this"
- "by other packages, and that stutters; consider calling this"
- "Potential file inclusion via variable"
- "should have( a package)? comment"
- "Error return value of `logging.SetLogLevel` is not checked"
@@ -37,12 +37,12 @@ issues:
- "string .* has .* occurrences, make it a constant"
- "a blank import should be only in a main or test package, or have a comment justifying it"
- "package comment should be of the form"
- "Potential hardcoded credentials"
- "Use of weak random number generator"
- "xerrors.* is deprecated"
exclude-use-default: false
exclude-rules:
- path: lotuspond
linters:
- errcheck
- path: node/modules/lp2p
linters:
@@ -51,7 +51,7 @@ issues:
- path: build/params_.*\.go
linters:
- golint
- path: api/apistruct/struct.go
linters:
- golint
+165
View File
@@ -0,0 +1,165 @@
project_name: lotus
before:
hooks:
- go mod tidy
- make deps
universal_binaries:
- id: lotus
replace: true
name_template: lotus
ids:
- lotus_darwin_amd64
- lotus_darwin_arm64
- id: lotus-miner
replace: true
name_template: lotus-miner
ids:
- lotus-miner_darwin_amd64
- lotus-miner_darwin_arm64
- id: lotus-worker
replace: true
name_template: lotus-worker
ids:
- lotus-worker_darwin_amd64
- lotus-worker_darwin_arm64
builds:
- id: lotus_darwin_amd64
main: ./cmd/lotus
binary: lotus
goos:
- darwin
goarch:
- amd64
env:
- CGO_ENABLED=1
- FFI_BUILD_FROM_SOURCE=1
ldflags:
- -X=github.com/filecoin-project/lotus/build.CurrentCommit=+git.{{.ShortCommit}}
- id: lotus-miner_darwin_amd64
main: ./cmd/lotus-miner
binary: lotus-miner
goos:
- darwin
goarch:
- amd64
env:
- CGO_ENABLED=1
- FFI_BUILD_FROM_SOURCE=1
ldflags:
- -X=github.com/filecoin-project/lotus/build.CurrentCommit=+git.{{.ShortCommit}}
- id: lotus-worker_darwin_amd64
main: ./cmd/lotus-worker
binary: lotus-worker
goos:
- darwin
goarch:
- amd64
env:
- CGO_ENABLED=1
- FFI_BUILD_FROM_SOURCE=1
ldflags:
- -X=github.com/filecoin-project/lotus/build.CurrentCommit=+git.{{.ShortCommit}}
- id: lotus_darwin_arm64
main: ./cmd/lotus
binary: lotus
goos:
- darwin
goarch:
- arm64
env:
- CGO_ENABLED=1
- FFI_BUILD_FROM_SOURCE=1
- CPATH=/opt/homebrew/include
- LIBRARY_PATH=/opt/homebrew/lib
ldflags:
- -X=github.com/filecoin-project/lotus/build.CurrentCommit=+git.{{.ShortCommit}}
- id: lotus-miner_darwin_arm64
main: ./cmd/lotus-miner
binary: lotus-miner
goos:
- darwin
goarch:
- arm64
env:
- CGO_ENABLED=1
- FFI_BUILD_FROM_SOURCE=1
- CPATH=/opt/homebrew/include
- LIBRARY_PATH=/opt/homebrew/lib
ldflags:
- -X=github.com/filecoin-project/lotus/build.CurrentCommit=+git.{{.ShortCommit}}
- id: lotus-worker_darwin_arm64
main: ./cmd/lotus-worker
binary: lotus-worker
goos:
- darwin
goarch:
- arm64
env:
- CGO_ENABLED=1
- FFI_BUILD_FROM_SOURCE=1
- CPATH=/opt/homebrew/include
- LIBRARY_PATH=/opt/homebrew/lib
ldflags:
- -X=github.com/filecoin-project/lotus/build.CurrentCommit=+git.{{.ShortCommit}}
# - id: linux
# main: ./cmd/lotus
# binary: lotus
# goos:
# - linux
# goarch:
# - amd64
# env:
# - CGO_ENABLED=1
# ldflags:
# - -X=github.com/filecoin-project/lotus/build.CurrentCommit=+git.{{.ShortCommit}}
archives:
- id: primary
format: tar.gz
wrap_in_directory: true
files:
# this is a dumb but required hack so it doesn't include the default files
# https://github.com/goreleaser/goreleaser/issues/602
- _n_o_n_e_*
release:
github:
owner: filecoin-project
name: lotus
prerelease: auto
name_template: "Release v{{.Version}}"
brews:
- tap:
owner: filecoin-project
name: homebrew-lotus
branch: master
ids:
- primary
install: |
bin.install "lotus"
bin.install "lotus-miner"
bin.install "lotus-worker"
test: |
system "#{bin}/lotus --version"
system "#{bin}/lotus-miner --version"
system "#{bin}/lotus-worker --version"
folder: Formula
homepage: "https://filecoin.io"
description: "A homebrew cask for installing filecoin-project/lotus on MacOS"
license: MIT
dependencies:
- name: pkg-config
- name: jq
- name: bzr
- name: hwloc
# produced manually so we can include cid checksums
checksum:
disable: true
snapshot:
name_template: "{{ .Tag }}"
+5 -7
View File
@@ -49,25 +49,23 @@ AppDir:
fedora:
image: appimagecrafters/tests-env:fedora-30
command: ./AppRun
use_host_x: true
use_host_x: false
debian:
image: appimagecrafters/tests-env:debian-stable
command: ./AppRun
use_host_x: true
use_host_x: false
arch:
image: appimagecrafters/tests-env:archlinux-latest
command: ./AppRun
use_host_x: true
use_host_x: false
centos:
image: appimagecrafters/tests-env:centos-7
command: ./AppRun
use_host_x: true
use_host_x: false
ubuntu:
image: appimagecrafters/tests-env:ubuntu-xenial
command: ./AppRun
use_host_x: true
use_host_x: false
AppImage:
arch: x86_64
update-information: guess
sign-key: None
+2053 -197
View File
File diff suppressed because it is too large Load Diff
+52 -24
View File
@@ -1,4 +1,4 @@
FROM golang:1.16.4 AS builder-deps
FROM golang:1.18.1-buster AS builder-deps
MAINTAINER Lotus Development Team
RUN apt-get update && apt-get install -y ca-certificates build-essential clang ocl-icd-opencl-dev ocl-icd-libopencl1 jq libhwloc-dev
@@ -28,6 +28,14 @@ WORKDIR /opt/filecoin
RUN make clean deps
FROM builder-local AS builder-test
MAINTAINER Lotus Development Team
WORKDIR /opt/filecoin
RUN make debug
FROM builder-local AS builder
MAINTAINER Lotus Development Team
@@ -36,7 +44,7 @@ WORKDIR /opt/filecoin
ARG RUSTFLAGS=""
ARG GOFLAGS=""
RUN make lotus lotus-miner lotus-worker lotus-shed lotus-wallet lotus-gateway
RUN make lotus lotus-miner lotus-worker lotus-shed lotus-wallet lotus-gateway lotus-stats
FROM ubuntu:20.04 AS base
@@ -53,8 +61,9 @@ COPY --from=builder /usr/lib/x86_64-linux-gnu/libnuma.so.1 /lib/
COPY --from=builder /usr/lib/x86_64-linux-gnu/libhwloc.so.5 /lib/
COPY --from=builder /usr/lib/x86_64-linux-gnu/libOpenCL.so.1 /lib/
RUN useradd -r -u 532 -U fc
RUN useradd -r -u 532 -U fc \
&& mkdir -p /etc/OpenCL/vendors \
&& echo "libnvidia-opencl.so.1" > /etc/OpenCL/vendors/nvidia.icd
###
FROM base AS lotus
@@ -66,8 +75,6 @@ COPY scripts/docker-lotus-entrypoint.sh /
ENV FILECOIN_PARAMETER_CACHE /var/tmp/filecoin-proof-parameters
ENV LOTUS_PATH /var/lib/lotus
ENV LOTUS_JAEGER_AGENT_HOST 127.0.0.1
ENV LOTUS_JAEGER_AGENT_PORT 6831
ENV DOCKER_LOTUS_IMPORT_SNAPSHOT https://fil-chain-snapshots-fallback.s3.amazonaws.com/mainnet/minimal_finality_stateroots_latest.car
ENV DOCKER_LOTUS_IMPORT_WALLET ""
@@ -92,8 +99,6 @@ MAINTAINER Lotus Development Team
COPY --from=builder /opt/filecoin/lotus-wallet /usr/local/bin/
ENV WALLET_PATH /var/lib/lotus-wallet
ENV LOTUS_JAEGER_AGENT_HOST 127.0.0.1
ENV LOTUS_JAEGER_AGENT_PORT 6831
RUN mkdir /var/lib/lotus-wallet
RUN chown fc: /var/lib/lotus-wallet
@@ -114,10 +119,6 @@ MAINTAINER Lotus Development Team
COPY --from=builder /opt/filecoin/lotus-gateway /usr/local/bin/
ENV LOTUS_JAEGER_AGENT_HOST 127.0.0.1
ENV LOTUS_JAEGER_AGENT_PORT 6831
ENV FULLNODE_API_INFO /ip4/127.0.0.1/tcp/1234/http
USER fc
EXPOSE 1234
@@ -135,11 +136,7 @@ COPY --from=builder /opt/filecoin/lotus-miner /usr/local/bin/
COPY scripts/docker-lotus-miner-entrypoint.sh /
ENV FILECOIN_PARAMETER_CACHE /var/tmp/filecoin-proof-parameters
ENV FULLNODE_API_INFO /ip4/127.0.0.1/tcp/1234/http
ENV LOTUS_MINER_PATH /var/lib/lotus-miner
ENV LOTUS_JAEGER_AGENT_HOST 127.0.0.1
ENV LOTUS_JAEGER_AGENT_PORT 6831
ENV DOCKER_LOTUS_MINER_INIT true
RUN mkdir /var/lib/lotus-miner /var/tmp/filecoin-proof-parameters
RUN chown fc: /var/lib/lotus-miner /var/tmp/filecoin-proof-parameters
@@ -163,10 +160,7 @@ MAINTAINER Lotus Development Team
COPY --from=builder /opt/filecoin/lotus-worker /usr/local/bin/
ENV FILECOIN_PARAMETER_CACHE /var/tmp/filecoin-proof-parameters
ENV MINER_API_INFO /ip4/127.0.0.1/tcp/2345/http
ENV LOTUS_WORKER_PATH /var/lib/lotus-worker
ENV LOTUS_JAEGER_AGENT_HOST 127.0.0.1
ENV LOTUS_JAEGER_AGENT_PORT 6831
RUN mkdir /var/lib/lotus-worker
RUN chown fc: /var/lib/lotus-worker
@@ -186,16 +180,11 @@ CMD ["-help"]
from base as lotus-all-in-one
ENV FILECOIN_PARAMETER_CACHE /var/tmp/filecoin-proof-parameters
ENV FULLNODE_API_INFO /ip4/127.0.0.1/tcp/1234/http
ENV LOTUS_JAEGER_AGENT_HOST 127.0.0.1
ENV LOTUS_JAEGER_AGENT_PORT 6831
ENV LOTUS_MINER_PATH /var/lib/lotus-miner
ENV LOTUS_PATH /var/lib/lotus
ENV LOTUS_WORKER_PATH /var/lib/lotus-worker
ENV MINER_API_INFO /ip4/127.0.0.1/tcp/2345/http
ENV WALLET_PATH /var/lib/lotus-wallet
ENV DOCKER_LOTUS_IMPORT_SNAPSHOT https://fil-chain-snapshots-fallback.s3.amazonaws.com/mainnet/minimal_finality_stateroots_latest.car
ENV DOCKER_LOTUS_MINER_INIT true
COPY --from=builder /opt/filecoin/lotus /usr/local/bin/
COPY --from=builder /opt/filecoin/lotus-shed /usr/local/bin/
@@ -203,6 +192,7 @@ COPY --from=builder /opt/filecoin/lotus-wallet /usr/local/bin/
COPY --from=builder /opt/filecoin/lotus-gateway /usr/local/bin/
COPY --from=builder /opt/filecoin/lotus-miner /usr/local/bin/
COPY --from=builder /opt/filecoin/lotus-worker /usr/local/bin/
COPY --from=builder /opt/filecoin/lotus-stats /usr/local/bin/
RUN mkdir /var/tmp/filecoin-proof-parameters
RUN mkdir /var/lib/lotus
@@ -226,3 +216,41 @@ EXPOSE 1234
EXPOSE 2345
EXPOSE 3456
EXPOSE 1777
###
from base as lotus-test
ENV FILECOIN_PARAMETER_CACHE /var/tmp/filecoin-proof-parameters
ENV LOTUS_MINER_PATH /var/lib/lotus-miner
ENV LOTUS_PATH /var/lib/lotus
ENV LOTUS_WORKER_PATH /var/lib/lotus-worker
ENV WALLET_PATH /var/lib/lotus-wallet
COPY --from=builder-test /opt/filecoin/lotus /usr/local/bin/
COPY --from=builder-test /opt/filecoin/lotus-miner /usr/local/bin/
COPY --from=builder-test /opt/filecoin/lotus-worker /usr/local/bin/
COPY --from=builder-test /opt/filecoin/lotus-seed /usr/local/bin/
RUN mkdir /var/tmp/filecoin-proof-parameters
RUN mkdir /var/lib/lotus
RUN mkdir /var/lib/lotus-miner
RUN mkdir /var/lib/lotus-worker
RUN mkdir /var/lib/lotus-wallet
RUN chown fc: /var/tmp/filecoin-proof-parameters
RUN chown fc: /var/lib/lotus
RUN chown fc: /var/lib/lotus-miner
RUN chown fc: /var/lib/lotus-worker
RUN chown fc: /var/lib/lotus-wallet
VOLUME /var/tmp/filecoin-proof-parameters
VOLUME /var/lib/lotus
VOLUME /var/lib/lotus-miner
VOLUME /var/lib/lotus-worker
VOLUME /var/lib/lotus-wallet
EXPOSE 1234
EXPOSE 2345
EXPOSE 3456
EXPOSE 1777
+1
View File
@@ -0,0 +1 @@
1.18.1
+142
View File
@@ -0,0 +1,142 @@
<!-- TOC -->
- [`lotus` Release Flow](#lotus-release-flow)
- [Purpose](#purpose)
- [High-level Summary](#high-level-summary)
- [Motivation and Requirements](#motivation-and-requirements)
- [Adopted Conventions](#adopted-conventions)
- [Major Releases](#major-releases)
- [Mandatory Releases](#mandatory-releases)
- [Feature Releases](#feature-releases)
- [Examples Scenarios](#examples-scenarios)
- [Release Cycle](#release-cycle)
- [Patch Releases](#patch-releases)
- [Performing a Release](#performing-a-release)
- [Security Fix Policy](#security-fix-policy)
- [FAQ](#faq)
- [Why aren't Go major versions used more?](#why-arent-go-major-versions-used-more)
- [Related Items](#related-items)
<!-- /TOC -->
# `lotus` Release Flow
## Purpose
This document aims to describe how the Lotus team plans to ship releases of the Lotus implementation of Filecoin network. Interested parties can expect new releases to come out as described in this document.
## High-level Summary
- **Major releases** (1.0.0, 2.0.0, etc.) are reserved for significant changes to the Filecoin protocol that transform the network and its usecases. Such changes could include the addition of new Virtual Machines to the protocol, major upgrades to the Proofs of Replication used by Filecoin, etc.
- Even minor releases (1.2.0, 1.4.0, etc.) of the Lotus software correspond to **mandatory releases** as they ship Filecoin network upgrades. Users **must** upgrade to these releases before a certain time in order to keep in sync with the Filecoin network. We aim to ensure there is at least one week before the upgrade deadline.
- Patch versions of even minor releases (1.2.1, 1.4.2, etc.) correspond to **hotfix releases**. Such releases will only be shipped when a critical fix is needed to be applied on top of a mandatory release.
- Odd minor releases (1.3.0, 1.5.0, etc.), as well as patch releases in these series (1.3.1, 1.5.2, etc.) correspond to **feature releases** with new development and bugfixes. These releases are not mandatory, but still highly recommended, **as they may contain critical security fixes**.
- We aim to ship a new feature release of the Lotus software every 3 weeks, so users can expect a regular cadence of Lotus feature releases. Note that mandatory releases for network upgrades may disrupt this schedule.
## Motivation and Requirements
Our primary motivation is for users of the Lotus software (storage providers, storage clients, developers, etc.) to have a clear idea about when they can expect Lotus releases, and what they can expect in a release.
In order to achieve this, we need the following from our release process and conventions:
- Lotus version conventions make it immediately obvious whether a new Lotus release is mandatory or not. A release is mandatory if it ships a network upgrade to the Filecoin protocol.
- The ability to ship critical fixes on top of mandatory releases, so as to avoid forcing users to consume larger unrelated changes.
- A regular cadence of feature releases, so that users can know when a new Lotus release will be available for consumption.
- The ability to ship any number of feature releases between two mandatory releases.
- A clear description of the various stages of testing that a Lotus Release Candidate (RC) goes through.
- Lotus Release issues will present a single source of truth for what may be contained in Lotus releases, including security fixes, and how they will be disclosed.
## Adopted Conventions
This section describes the conventions we have adopted. Users of Lotus are encouraged to review this in detail so as to be informed when new Lotus releases are shipped.
### Major Releases
Bumps to the Lotus major version number (1.0.0, 2.0.0, etc.) are reserved for significant changes to the Filecoin protocol that dramatically transform the network itself. Such changes could include the addition of new Virtual Machines to the protocol, major upgrades to the Proofs of Replication used by Filecoin, etc. These releases are expected to take lots of time to develop and will be rare. See also "Why aren't Go major versions used more?" below.
### Mandatory Releases
Even bumps to the Lotus minor version number (1.2.0, 1.4.0, etc.) are reserved for **mandatory releases** that ship Filecoin network upgrades. Users **must** upgrade to these releases before a certain time in order to keep in sync with the Filecoin network.
Depending on the scope of the upgrade, these releases may take up to several weeks to fully develop and test. We aim to ensure there are at least 2 weeks between the publication of the final Lotus release and the Filecoin network upgrade deadline.
These releases do not follow a regular cadence, as they are developed in lockstep with the other implementations of the Filecoin protocol. As of August 2021, the developers aim to ship 3-4 Filecoin network upgrades a year, though smaller security-critical upgrades may occur unpredictably.
Mandatory releases are somewhat sensitive since all Lotus users are forced to upgrade to them at the same time. As a result, they will be shipped on top of the most recent stable release of Lotus, which will generally be the latest Lotus release that has been in production for more than 2 weeks. (Note: given this rule, the basis of a mandatory release could be a mandatory release or a feature release depending on timing). Mandatory releases will not include any new feature development or bugfixes that haven't already baked in production for 2+ weeks, except for the changes needed for the network upgrade itself. Further, any critical fixes that are needed after the network upgrade will be shipped as patch version bumps to the mandatory release (1.2.1, 1.2.2, etc.) This prevents users from being forced to quickly digest unnecessary changes.
Users should generally aim to always upgrade to a new even minor version release since they either introduce a mandatory network upgrade or a critical fix.
### Feature Releases
All releases under an odd minor version number indicate **feature releases**. These could include releases such as 1.3.0, 1.3.1, 1.5.2, etc.
Feature releases include new development and bug fixes. They are not mandatory, but still highly recommended, **as they may contain critical security fixes**. Note that some of these releases may be very small patch releases that include critical hotfixes. There is no way to distinguish between a bug fix release and a feature release on the "feature" version. Both cases will use the "patch" version number.
We aim to ship a new feature release of the Lotus software from our development (master) branch every 3 weeks, so users can expect a regular cadence of Lotus feature releases. Note that mandatory releases for network upgrades may disrupt this schedule. For more, see the Release Cycle section (TODO: Link).
### Examples Scenarios
- **Scenario 1**: **Lotus 1.12.0 shipped a network upgrade, and no network upgrades are needed for a long while.**
In this case, the next feature release will be Lotus 1.13.0. In three-week intervals, we will ship Lotus 1.13.1, 1.13.2, and 1.13.3, all containing new features and bug fixes.
Let us assume that after the release of 1.13.3, a critical issue is discovered and a hotfix quickly developed. This hotfix will then be shipped in **both** 1.12.1 and 1.13.4. Users who have already upgrade to the 1.13 series can simply upgrade to 1.13.4. Users who have chosen to still be on 1.12.0, however, can use 1.12.1 to patch the critical issue without being forced to consume all the changes in the 1.13 series.
- **Scenario 2**: **Lotus 1.12.0 shipped a network upgrade, but the need for an unexpected network upgrade soon arises**
In this case, the Lotus 1.13 series will be dropped entirely, including any RCs that may have been undergoing testing. Instead, the network upgrade will be shipped as Lotus 1.14.0, built on top of Lotus 1.12.0. It will thus include no unnecessary changes, only the work needed to support the new network upgrade.
Any changes that were being worked on in the 1.13.0 series will then get applied on top of Lotus 1.14.0 and get shipped as Lotus 1.15.0.
## Release Cycle
A mandatory release process should take about 3-6 weeks, depending on the amount and the overall complexity of new features being introduced to the network protocol. It may also be shorter if there is a network incident that requires an emergency upgrade. A feature release process should take about 2-3 weeks.
The start time of the mandatory release process is subject to the network upgrade timeline. We will start a new feature release process every 3 weeks on Tuesdays, regardless of when the previous release landed unless it's still ongoing.
### Patch Releases
**Mandatory Release**
If we encounter a serious bug in a mandatory release post a network upgrade, we will create a patch release based on this release. Strictly only the fix to the bug will be included in the patch, and the bug fix will be backported to the master (dev) branch, and any ongoing feature release branch if applicable.
Patch release process for the mandatory releases will follow a compressed release cycle from hours to days depending on the severity and the impact to the network of the bug. In a patch release:
1. Automated and internal testing (stage 0 and 1) will be compressed into a few hours.
2. Stage 2-3 will be skipped or shortened case by case.
Some patch releases, especially ones fixing one or more complex bugs that doesn't require a follow-up mandatory upgrade, may undergo the full release process.
**Feature Release**
Patch releases in odd minor releases (1.3.0, 1.5.0, etc.) like 1.3.1, 1.5.2 and etc are corresponding to another **feature releases** with new development and bugfixes. These releases are not mandatory, but still **highly** recommended, **as they may contain critical security fixes**.
---
### Performing a Release
At the beginning of each release cycle, we will generate our "Release tracking issue", which is populated with the content at [https://github.com/filecoin-project/lotus/blob/master/documentation/misc/RELEASE_ISSUE_TEMPLATE.md](https://github.com/filecoin-project/lotus/blob/master/documentation/misc/RELEASE_ISSUE_TEMPLATE.md)
This template will be used to track major goals we have, a planned shipping date, and a complete release checklist tied to a specific release.
### Security Fix Policy
Any release may contain security fixes. Unless the fix addresses a bug being exploited in the wild, the fix will *not* be called out in the release notes. Please make sure to update ASAP.
By policy, the team will usually wait until about 3 weeks after the final release to announce any fixed security issues. However, depending on the impact and ease of discovery of the issue, the team may wait more or less time.
It is important to always update to the latest version ASAP and file issues if you're unable to update for some reason.
Finally, unless a security issue is actively being exploited or a significant number of users are unable to update to the latest version (e.g., due to a difficult migration, breaking changes, etc.), security fixes will *not* be backported to previous releases.
## FAQ
### Why aren't Go major versions used more?
Golang tightly couples source code with versioning (major versions beyond v1 leak into import paths). This poses logistical difficulties to using major versions here. Concretely, if we were to pick a policy that bumped the major version on every network upgrade, we would disrupt every single downstream library/application that consumed the native Lotus API (e.g., libraries depending on the JSON-RPC client, testground tests). They would need to update their code every single time that we released a network breaking change, even if it brought on zero expectation of breakage for the Golang APIs that they depend on. In this scenario, we are signaling breakage on the wrong API surface! We're signaling breakage on the Go level, when what breaks is the network protocol.
## Related Items
1. [Release Issue template](https://github.com/filecoin-project/lotus/blob/master/documentation/misc/RELEASE_ISSUE_TEMPLATE.md)
2. [Lotus Release Flow Discussion](https://github.com/filecoin-project/lotus/discussions/7053): Leave a comment if you have any questions or feedbacks with regard to the lotus release flow.
+72 -90
View File
@@ -5,10 +5,14 @@ all: build
unexport GOFLAGS
GOVERSION:=$(shell go version | cut -d' ' -f 3 | sed 's/^go//' | awk -F. '{printf "%d%03d%03d", $$1, $$2, $$3}')
ifeq ($(shell expr $(GOVERSION) \< 1016000), 1)
GOCC?=go
GOVERSION:=$(shell $(GOCC) version | tr ' ' '\n' | grep go1 | sed 's/^go//' | awk -F. '{printf "%d%03d%03d", $$1, $$2, $$3}')
GOVERSIONMIN:=$(shell cat GO_VERSION_MIN | awk -F. '{printf "%d%03d%03d", $$1, $$2, $$3}')
ifeq ($(shell expr $(GOVERSION) \< $(GOVERSIONMIN)), 1)
$(warning Your Golang version is go$(shell expr $(GOVERSION) / 1000000).$(shell expr $(GOVERSION) % 1000000 / 1000).$(shell expr $(GOVERSION) % 1000))
$(error Update Golang to version to at least 1.16.0)
$(error Update Golang to version to at least $(shell cat GO_VERSION_MIN))
endif
# git modules that need to be loaded
@@ -62,7 +66,7 @@ CLEAN+=build/.update-modules
deps: $(BUILD_DEPS)
.PHONY: deps
build-devnets: build lotus-seed lotus-shed lotus-wallet lotus-gateway
build-devnets: build lotus-seed lotus-shed lotus-wallet lotus-gateway lotus-fountain lotus-stats
.PHONY: build-devnets
debug: GOFLAGS+=-tags=debug
@@ -74,9 +78,6 @@ debug: build-devnets
calibnet: GOFLAGS+=-tags=calibnet
calibnet: build-devnets
nerpanet: GOFLAGS+=-tags=nerpanet
nerpanet: build-devnets
butterflynet: GOFLAGS+=-tags=butterflynet
butterflynet: build-devnets
@@ -85,32 +86,32 @@ interopnet: build-devnets
lotus: $(BUILD_DEPS)
rm -f lotus
go build $(GOFLAGS) -o lotus ./cmd/lotus
$(GOCC) build $(GOFLAGS) -o lotus ./cmd/lotus
.PHONY: lotus
BINS+=lotus
lotus-miner: $(BUILD_DEPS)
rm -f lotus-miner
go build $(GOFLAGS) -o lotus-miner ./cmd/lotus-miner
$(GOCC) build $(GOFLAGS) -o lotus-miner ./cmd/lotus-miner
.PHONY: lotus-miner
BINS+=lotus-miner
lotus-worker: $(BUILD_DEPS)
rm -f lotus-worker
go build $(GOFLAGS) -o lotus-worker ./cmd/lotus-seal-worker
$(GOCC) build $(GOFLAGS) -o lotus-worker ./cmd/lotus-worker
.PHONY: lotus-worker
BINS+=lotus-worker
lotus-shed: $(BUILD_DEPS)
rm -f lotus-shed
go build $(GOFLAGS) -o lotus-shed ./cmd/lotus-shed
$(GOCC) build $(GOFLAGS) -o lotus-shed ./cmd/lotus-shed
.PHONY: lotus-shed
BINS+=lotus-shed
lotus-gateway: $(BUILD_DEPS)
rm -f lotus-gateway
go build $(GOFLAGS) -o lotus-gateway ./cmd/lotus-gateway
$(GOCC) build $(GOFLAGS) -o lotus-gateway ./cmd/lotus-gateway
.PHONY: lotus-gateway
BINS+=lotus-gateway
@@ -134,112 +135,91 @@ install-worker:
install-app:
install -C ./$(APP) /usr/local/bin/$(APP)
uninstall: uninstall-daemon uninstall-miner uninstall-worker
.PHONY: uninstall
uninstall-daemon:
rm -f /usr/local/bin/lotus
uninstall-miner:
rm -f /usr/local/bin/lotus-miner
uninstall-worker:
rm -f /usr/local/bin/lotus-worker
# TOOLS
lotus-seed: $(BUILD_DEPS)
rm -f lotus-seed
go build $(GOFLAGS) -o lotus-seed ./cmd/lotus-seed
$(GOCC) build $(GOFLAGS) -o lotus-seed ./cmd/lotus-seed
.PHONY: lotus-seed
BINS+=lotus-seed
benchmarks:
go run github.com/whyrusleeping/bencher ./... > bench.json
$(GOCC) run github.com/whyrusleeping/bencher ./... > bench.json
@echo Submitting results
@curl -X POST 'http://benchmark.kittyhawk.wtf/benchmark' -d '@bench.json' -u "${benchmark_http_cred}"
.PHONY: benchmarks
lotus-pond: 2k
go build -o lotus-pond ./lotuspond
.PHONY: lotus-pond
BINS+=lotus-pond
lotus-pond-front:
(cd lotuspond/front && npm i && CI=false npm run build)
.PHONY: lotus-pond-front
lotus-pond-app: lotus-pond-front lotus-pond
.PHONY: lotus-pond-app
lotus-townhall:
rm -f lotus-townhall
go build -o lotus-townhall ./cmd/lotus-townhall
.PHONY: lotus-townhall
BINS+=lotus-townhall
lotus-townhall-front:
(cd ./cmd/lotus-townhall/townhall && npm i && npm run build)
.PHONY: lotus-townhall-front
lotus-townhall-app: lotus-touch lotus-townhall-front
.PHONY: lotus-townhall-app
lotus-fountain:
rm -f lotus-fountain
go build -o lotus-fountain ./cmd/lotus-fountain
$(GOCC) build $(GOFLAGS) -o lotus-fountain ./cmd/lotus-fountain
$(GOCC) run github.com/GeertJohan/go.rice/rice append --exec lotus-fountain -i ./cmd/lotus-fountain -i ./build
.PHONY: lotus-fountain
BINS+=lotus-fountain
lotus-chainwatch:
rm -f lotus-chainwatch
go build $(GOFLAGS) -o lotus-chainwatch ./cmd/lotus-chainwatch
.PHONY: lotus-chainwatch
BINS+=lotus-chainwatch
lotus-bench:
rm -f lotus-bench
go build -o lotus-bench ./cmd/lotus-bench
$(GOCC) build $(GOFLAGS) -o lotus-bench ./cmd/lotus-bench
.PHONY: lotus-bench
BINS+=lotus-bench
lotus-stats:
rm -f lotus-stats
go build $(GOFLAGS) -o lotus-stats ./cmd/lotus-stats
$(GOCC) build $(GOFLAGS) -o lotus-stats ./cmd/lotus-stats
.PHONY: lotus-stats
BINS+=lotus-stats
lotus-pcr:
rm -f lotus-pcr
go build $(GOFLAGS) -o lotus-pcr ./cmd/lotus-pcr
$(GOCC) build $(GOFLAGS) -o lotus-pcr ./cmd/lotus-pcr
.PHONY: lotus-pcr
BINS+=lotus-pcr
lotus-health:
rm -f lotus-health
go build -o lotus-health ./cmd/lotus-health
$(GOCC) build -o lotus-health ./cmd/lotus-health
.PHONY: lotus-health
BINS+=lotus-health
lotus-wallet:
rm -f lotus-wallet
go build -o lotus-wallet ./cmd/lotus-wallet
$(GOCC) build $(GOFLAGS) -o lotus-wallet ./cmd/lotus-wallet
.PHONY: lotus-wallet
BINS+=lotus-wallet
lotus-keygen:
rm -f lotus-keygen
go build -o lotus-keygen ./cmd/lotus-keygen
$(GOCC) build -o lotus-keygen ./cmd/lotus-keygen
.PHONY: lotus-keygen
BINS+=lotus-keygen
testground:
go build -tags testground -o /dev/null ./cmd/lotus
$(GOCC) build -tags testground -o /dev/null ./cmd/lotus
.PHONY: testground
BINS+=testground
tvx:
rm -f tvx
go build -o tvx ./cmd/tvx
$(GOCC) build -o tvx ./cmd/tvx
.PHONY: tvx
BINS+=tvx
install-chainwatch: lotus-chainwatch
install -C ./lotus-chainwatch /usr/local/bin/lotus-chainwatch
lotus-sim: $(BUILD_DEPS)
rm -f lotus-sim
go build $(GOFLAGS) -o lotus-sim ./cmd/lotus-sim
$(GOCC) build $(GOFLAGS) -o lotus-sim ./cmd/lotus-sim
.PHONY: lotus-sim
BINS+=lotus-sim
@@ -261,21 +241,13 @@ install-miner-service: install-miner install-daemon-service
@echo
@echo "lotus-miner service installed. Don't forget to run 'sudo systemctl start lotus-miner' to start it and 'sudo systemctl enable lotus-miner' for it to be enabled on startup."
install-chainwatch-service: install-chainwatch install-daemon-service
mkdir -p /etc/systemd/system
mkdir -p /var/log/lotus
install -C -m 0644 ./scripts/lotus-chainwatch.service /etc/systemd/system/lotus-chainwatch.service
systemctl daemon-reload
@echo
@echo "chainwatch service installed. Don't forget to run 'sudo systemctl start lotus-chainwatch' to start it and 'sudo systemctl enable lotus-chainwatch' for it to be enabled on startup."
install-main-services: install-miner-service
install-all-services: install-main-services install-chainwatch-service
install-all-services: install-main-services
install-services: install-main-services
clean-daemon-service: clean-miner-service clean-chainwatch-service
clean-daemon-service: clean-miner-service
-systemctl stop lotus-daemon
-systemctl disable lotus-daemon
rm -f /etc/systemd/system/lotus-daemon.service
@@ -287,12 +259,6 @@ clean-miner-service:
rm -f /etc/systemd/system/lotus-miner.service
systemctl daemon-reload
clean-chainwatch-service:
-systemctl stop lotus-chainwatch
-systemctl disable lotus-chainwatch
rm -f /etc/systemd/system/lotus-chainwatch.service
systemctl daemon-reload
clean-main-services: clean-daemon-service
clean-all-services: clean-main-services
@@ -319,25 +285,32 @@ dist-clean:
.PHONY: dist-clean
type-gen: api-gen
go run ./gen/main.go
go generate -x ./...
$(GOCC) run ./gen/main.go
$(GOCC) generate -x ./...
goimports -w api/
method-gen: api-gen
(cd ./lotuspond/front/src/chain && go run ./methodgen.go)
actors-code-gen:
$(GOCC) run ./gen/inline-gen . gen/inlinegen-data.json
$(GOCC) run ./chain/actors/agen
$(GOCC) fmt ./...
actors-gen: actors-code-gen fiximports
.PHONY: actors-gen
bundle-gen:
$(GOCC) run ./gen/bundle
$(GOCC) fmt ./build/...
.PHONY: bundle-gen
actors-gen:
go run ./chain/actors/agen
go fmt ./...
api-gen:
go run ./gen/api
$(GOCC) run ./gen/api
goimports -w api
goimports -w api
.PHONY: api-gen
cfgdoc-gen:
go run ./node/config/cfgdocgen > ./node/config/doc_gen.go
$(GOCC) run ./node/config/cfgdocgen > ./node/config/doc_gen.go
appimage: lotus
rm -rf appimage-builder-cache || true
@@ -348,12 +321,12 @@ appimage: lotus
cp ./lotus AppDir/usr/bin/
appimage-builder
docsgen: docsgen-md docsgen-openrpc
docsgen: docsgen-md docsgen-openrpc fiximports
docsgen-md-bin: api-gen actors-gen
go build $(GOFLAGS) -o docgen-md ./api/docgen/cmd
$(GOCC) build $(GOFLAGS) -o docgen-md ./api/docgen/cmd
docsgen-openrpc-bin: api-gen actors-gen
go build $(GOFLAGS) -o docgen-openrpc ./api/docgen-openrpc/cmd
$(GOCC) build $(GOFLAGS) -o docgen-openrpc ./api/docgen-openrpc/cmd
docsgen-md: docsgen-md-full docsgen-md-storage docsgen-md-worker
@@ -365,7 +338,7 @@ docsgen-md-storage: docsgen-md-bin
docsgen-md-worker: docsgen-md-bin
./docgen-md "api/api_worker.go" "Worker" "api" "./api" > documentation/en/api-v0-methods-worker.md
docsgen-openrpc: docsgen-openrpc-full docsgen-openrpc-storage docsgen-openrpc-worker
docsgen-openrpc: docsgen-openrpc-full docsgen-openrpc-storage docsgen-openrpc-worker docsgen-openrpc-gateway
docsgen-openrpc-full: docsgen-openrpc-bin
./docgen-openrpc "api/api_full.go" "FullNode" "api" "./api" -gzip > build/openrpc/full.json.gz
@@ -373,13 +346,20 @@ docsgen-openrpc-storage: docsgen-openrpc-bin
./docgen-openrpc "api/api_storage.go" "StorageMiner" "api" "./api" -gzip > build/openrpc/miner.json.gz
docsgen-openrpc-worker: docsgen-openrpc-bin
./docgen-openrpc "api/api_worker.go" "Worker" "api" "./api" -gzip > build/openrpc/worker.json.gz
docsgen-openrpc-gateway: docsgen-openrpc-bin
./docgen-openrpc "api/api_gateway.go" "Gateway" "api" "./api" -gzip > build/openrpc/gateway.json.gz
.PHONY: docsgen docsgen-md-bin docsgen-openrpc-bin
gen: actors-gen type-gen method-gen cfgdoc-gen docsgen api-gen circleci
@echo ">>> IF YOU'VE MODIFIED THE CLI, REMEMBER TO ALSO MAKE docsgen-cli"
fiximports:
./scripts/fiximports
gen: actors-code-gen type-gen cfgdoc-gen docsgen api-gen circleci bundle-gen fiximports
@echo ">>> IF YOU'VE MODIFIED THE CLI OR CONFIG, REMEMBER TO ALSO MAKE docsgen-cli"
.PHONY: gen
jen: gen
snap: lotus lotus-miner lotus-worker
snapcraft
# snapcraft upload ./lotus_*.snap
@@ -387,10 +367,12 @@ snap: lotus lotus-miner lotus-worker
# separate from gen because it needs binaries
docsgen-cli: lotus lotus-miner lotus-worker
python ./scripts/generate-lotus-cli.py
./lotus config default > documentation/en/default-lotus-config.toml
./lotus-miner config default > documentation/en/default-lotus-miner-config.toml
.PHONY: docsgen-cli
print-%:
@echo $*=$($*)
circleci:
go generate -x ./.circleci
go generate -x ./.circleci
+13 -14
View File
@@ -1,5 +1,5 @@
<p align="center">
<a href="https://docs.filecoin.io/" title="Filecoin Docs">
<a href="https://lotus.filecoin.io/" title="Filecoin Docs">
<img src="documentation/images/lotus_logo_h.png" alt="Project Lotus Logo" width="244" />
</a>
</p>
@@ -10,7 +10,7 @@
<a href="https://circleci.com/gh/filecoin-project/lotus"><img src="https://circleci.com/gh/filecoin-project/lotus.svg?style=svg"></a>
<a href="https://codecov.io/gh/filecoin-project/lotus"><img src="https://codecov.io/gh/filecoin-project/lotus/branch/master/graph/badge.svg"></a>
<a href="https://goreportcard.com/report/github.com/filecoin-project/lotus"><img src="https://goreportcard.com/badge/github.com/filecoin-project/lotus" /></a>
<a href=""><img src="https://img.shields.io/badge/golang-%3E%3D1.16-blue.svg" /></a>
<a href=""><img src="https://img.shields.io/badge/golang-%3E%3D1.17-blue.svg" /></a>
<br>
</p>
@@ -20,7 +20,7 @@ Lotus is an implementation of the Filecoin Distributed Storage Network. For more
> Note: The default `master` branch is the dev branch, please use with caution. For the latest stable version, checkout the most recent [`Latest release`](https://github.com/filecoin-project/lotus/releases).
For complete instructions on how to build, install and setup lotus, please visit [https://docs.filecoin.io/get-started/lotus](https://docs.filecoin.io/get-started/lotus/). Basic build instructions can be found further down in this readme.
For complete instructions on how to build, install and setup lotus, please visit [https://lotus.filecoin.io](https://lotus.filecoin.io/lotus/install/prerequisites/#supported-platforms). Basic build instructions can be found further down in this readme.
## Reporting a Vulnerability
@@ -31,7 +31,7 @@ Please send an email to security@filecoin.org. See our [security policy](SECURIT
These repos are independent and reusable modules, but are tightly integrated into Lotus to make up a fully featured Filecoin implementation:
- [go-fil-markets](https://github.com/filecoin-project/go-fil-markets) which has its own [kanban work tracker available here](https://app.zenhub.com/workspaces/markets-shared-components-5daa144a7046a60001c6e253/board)
- [specs-actors](https://github.com/filecoin-project/specs-actors) which has its own [kanban work tracker available here](https://app.zenhub.com/workspaces/actors-5ee6f3aa87591f0016c05685/board)
- [builtin-actors](https://github.com/filecoin-project/builtin-actors)
## Contribute
@@ -64,17 +64,17 @@ sudo apt install mesa-opencl-icd ocl-icd-opencl-dev gcc git bzr jq pkg-config cu
Fedora:
```
sudo dnf -y install gcc make git bzr jq pkgconfig mesa-libOpenCL mesa-libOpenCL-devel opencl-headers ocl-icd ocl-icd-devel clang llvm wget hwloc libhwloc-dev
sudo dnf -y install gcc make git bzr jq pkgconfig mesa-libOpenCL mesa-libOpenCL-devel opencl-headers ocl-icd ocl-icd-devel clang llvm wget hwloc hwloc-devel
```
For other distributions you can find the required dependencies [here.](https://docs.filecoin.io/get-started/lotus/installation/#system-specific) For instructions specific to macOS, you can find them [here.](https://docs.filecoin.io/get-started/lotus/installation/#macos)
For other distributions you can find the required dependencies [here.](https://lotus.filecoin.io/lotus/install/prerequisites/#supported-platforms) For instructions specific to macOS, you can find them [here.](https://lotus.filecoin.io/lotus/install/macos/)
#### Go
To build Lotus, you need a working installation of [Go 1.16.4 or higher](https://golang.org/dl/):
To build Lotus, you need a working installation of [Go 1.18.1 or higher](https://golang.org/dl/):
```bash
wget -c https://golang.org/dl/go1.16.4.linux-amd64.tar.gz -O - | sudo tar -xz -C /usr/local
wget -c https://golang.org/dl/go1.18.1.linux-amd64.tar.gz -O - | sudo tar -xz -C /usr/local
```
**TIP:**
@@ -101,7 +101,7 @@ Note: The default branch `master` is the dev branch where the latest new feature
2. To join mainnet, checkout the [latest release](https://github.com/filecoin-project/lotus/releases).
If you are changing networks from a previous Lotus installation or there has been a network reset, read the [Switch networks guide](https://docs.filecoin.io/get-started/lotus/switch-networks/) before proceeding.
If you are changing networks from a previous Lotus installation or there has been a network reset, read the [Switch networks guide](https://lotus.filecoin.io/lotus/manage/switch-networks/) before proceeding.
For networks other than mainnet, look up the current branch or tag/commit for the network you want to join in the [Filecoin networks dashboard](https://network.filecoin.io), then build Lotus for your specific network below.
@@ -113,8 +113,8 @@ Note: The default branch `master` is the dev branch where the latest new feature
Currently, the latest code on the _master_ branch corresponds to mainnet.
3. If you are in China, see "[Lotus: tips when running in China](https://docs.filecoin.io/get-started/lotus/tips-running-in-china/)".
4. This build instruction uses the prebuilt proofs binaries. If you want to build the proof binaries from source check the [complete instructions](https://docs.filecoin.io/get-started/lotus/installation/#build-and-install-lotus). Note, if you are building the proof binaries from source, [installing rustup](https://docs.filecoin.io/get-started/lotus/installation/#rustup) is also needed.
3. If you are in China, see "[Lotus: tips when running in China](https://lotus.filecoin.io/lotus/configure/nodes-in-china/)".
4. This build instruction uses the prebuilt proofs binaries. If you want to build the proof binaries from source check the [complete instructions](https://lotus.filecoin.io/lotus/install/prerequisites/). Note, if you are building the proof binaries from source, [installing rustup](https://lotus.filecoin.io/lotus/install/linux/#rustup) is also needed.
5. Build and install Lotus:
@@ -123,16 +123,15 @@ Note: The default branch `master` is the dev branch where the latest new feature
# Or to join a testnet or devnet:
make clean calibnet # Calibration with min 32GiB sectors
make clean nerpanet # Nerpa with min 512MiB sectors
sudo make install
```
This will put `lotus`, `lotus-miner` and `lotus-worker` in `/usr/local/bin`.
`lotus` will use the `$HOME/.lotus` folder by default for storage (configuration, chain data, wallets, etc). See [advanced options](https://docs.filecoin.io/get-started/lotus/configuration-and-advanced-usage/) for information on how to customize the Lotus folder.
`lotus` will use the `$HOME/.lotus` folder by default for storage (configuration, chain data, wallets, etc). See [advanced options](https://lotus.filecoin.io/lotus/configure/defaults/#environment-variables) for information on how to customize the Lotus folder.
6. You should now have Lotus installed. You can now [start the Lotus daemon and sync the chain](https://docs.filecoin.io/get-started/lotus/installation/#start-the-lotus-daemon-and-sync-the-chain).
6. You should now have Lotus installed. You can now [start the Lotus daemon and sync the chain](https://lotus.filecoin.io/lotus/install/linux/#start-the-lotus-daemon-and-sync-the-chain).
## License
+7 -2
View File
@@ -4,11 +4,12 @@ import (
"context"
"fmt"
apitypes "github.com/filecoin-project/lotus/api/types"
"github.com/google/uuid"
"github.com/filecoin-project/go-jsonrpc/auth"
apitypes "github.com/filecoin-project/lotus/api/types"
"github.com/filecoin-project/lotus/journal/alerting"
)
// MODIFYING THE API INTERFACE
@@ -33,6 +34,10 @@ type Common interface {
LogList(context.Context) ([]string, error) //perm:write
LogSetLevel(context.Context, string, string) error //perm:write
// LogAlerts returns list of all, active and inactive alerts tracked by the
// node
LogAlerts(ctx context.Context) ([]alerting.Alert, error) //perm:admin
// MethodGroup: Common
// Version provides information about API provider
+42
View File
@@ -0,0 +1,42 @@
package api
import (
"errors"
"reflect"
"github.com/filecoin-project/go-jsonrpc"
)
const (
EOutOfGas = iota + jsonrpc.FirstUserCode
EActorNotFound
)
type ErrOutOfGas struct{}
func (e *ErrOutOfGas) Error() string {
return "call ran out of gas"
}
type ErrActorNotFound struct{}
func (e *ErrActorNotFound) Error() string {
return "actor not found"
}
var RPCErrors = jsonrpc.NewErrors()
func ErrorIsIn(err error, errorTypes []error) bool {
for _, etype := range errorTypes {
tmp := reflect.New(reflect.PointerTo(reflect.ValueOf(etype).Elem().Type())).Interface()
if errors.As(err, tmp) {
return true
}
}
return false
}
func init() {
RPCErrors.Register(EOutOfGas, new(*ErrOutOfGas))
RPCErrors.Register(EActorNotFound, new(*ErrActorNotFound))
}
+145 -52
View File
@@ -6,29 +6,32 @@ import (
"fmt"
"time"
blocks "github.com/ipfs/go-block-format"
"github.com/ipfs/go-cid"
"github.com/libp2p/go-libp2p-core/peer"
"github.com/libp2p/go-libp2p/core/peer"
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-bitfield"
datatransfer "github.com/filecoin-project/go-data-transfer"
"github.com/filecoin-project/go-fil-markets/retrievalmarket"
"github.com/filecoin-project/go-fil-markets/storagemarket"
"github.com/filecoin-project/go-multistore"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/big"
"github.com/filecoin-project/go-state-types/builtin/v8/paych"
"github.com/filecoin-project/go-state-types/builtin/v9/market"
"github.com/filecoin-project/go-state-types/builtin/v9/miner"
verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
"github.com/filecoin-project/go-state-types/crypto"
"github.com/filecoin-project/go-state-types/dline"
abinetwork "github.com/filecoin-project/go-state-types/network"
apitypes "github.com/filecoin-project/lotus/api/types"
"github.com/filecoin-project/lotus/chain/actors/builtin"
"github.com/filecoin-project/lotus/chain/actors/builtin/market"
"github.com/filecoin-project/lotus/chain/actors/builtin/miner"
"github.com/filecoin-project/lotus/chain/actors/builtin/paych"
lminer "github.com/filecoin-project/lotus/chain/actors/builtin/miner"
"github.com/filecoin-project/lotus/chain/actors/builtin/power"
"github.com/filecoin-project/lotus/chain/types"
marketevents "github.com/filecoin-project/lotus/markets/loggers"
"github.com/filecoin-project/lotus/node/modules/dtypes"
"github.com/filecoin-project/lotus/node/repo/imports"
)
//go:generate go run github.com/golang/mock/mockgen -destination=mocks/mock_full.go -package=mocks . FullNode
@@ -37,6 +40,7 @@ import (
type ChainIO interface {
ChainReadObj(context.Context, cid.Cid) ([]byte, error)
ChainHasObj(context.Context, cid.Cid) (bool, error)
ChainPutObj(context.Context, blocks.Block) error
}
const LookbackNoLimit = abi.ChainEpoch(-1)
@@ -71,12 +75,6 @@ type FullNode interface {
// ChainHead returns the current head of the chain.
ChainHead(context.Context) (*types.TipSet, error) //perm:read
// ChainGetRandomnessFromTickets is used to sample the chain for randomness.
ChainGetRandomnessFromTickets(ctx context.Context, tsk types.TipSetKey, personalization crypto.DomainSeparationTag, randEpoch abi.ChainEpoch, entropy []byte) (abi.Randomness, error) //perm:read
// ChainGetRandomnessFromBeacon is used to sample the beacon for randomness.
ChainGetRandomnessFromBeacon(ctx context.Context, tsk types.TipSetKey, personalization crypto.DomainSeparationTag, randEpoch abi.ChainEpoch, entropy []byte) (abi.Randomness, error) //perm:read
// ChainGetBlock returns the block specified by the given CID.
ChainGetBlock(context.Context, cid.Cid) (*types.BlockHeader, error) //perm:read
// ChainGetTipSet returns the tipset specified by the given TipSetKey.
@@ -113,6 +111,11 @@ type FullNode interface {
// will be returned.
ChainGetTipSetByHeight(context.Context, abi.ChainEpoch, types.TipSetKey) (*types.TipSet, error) //perm:read
// ChainGetTipSetAfterHeight looks back for a tipset at the specified epoch.
// If there are no blocks at the specified epoch, the first non-nil tipset at a later epoch
// will be returned.
ChainGetTipSetAfterHeight(context.Context, abi.ChainEpoch, types.TipSetKey) (*types.TipSet, error) //perm:read
// ChainReadObj reads ipld nodes referenced by the specified CID from chain
// blockstore and returns raw bytes.
ChainReadObj(context.Context, cid.Cid) ([]byte, error) //perm:read
@@ -123,6 +126,9 @@ type FullNode interface {
// ChainHasObj checks if a given CID exists in the chain blockstore.
ChainHasObj(context.Context, cid.Cid) (bool, error) //perm:read
// ChainPutObj puts a given object into the block store
ChainPutObj(context.Context, blocks.Block) error //perm:admin
// ChainStatObj returns statistics about the graph referenced by 'obj'.
// If 'base' is also specified, then the returned stat will be a diff
// between the two objects.
@@ -164,6 +170,10 @@ type FullNode interface {
// If oldmsgskip is set, messages from before the requested roots are also not included.
ChainExport(ctx context.Context, nroots abi.ChainEpoch, oldmsgskip bool, tsk types.TipSetKey) (<-chan []byte, error) //perm:read
// ChainPrune prunes the stored chain state and garbage collects; only supported if you
// are using the splitstore
ChainPrune(ctx context.Context, opts PruneOpts) error //perm:admin
// ChainCheckBlockstore performs an (asynchronous) health check on the chain/state blockstore
// if supported by the underlying implementation.
ChainCheckBlockstore(context.Context) error //perm:admin
@@ -171,14 +181,6 @@ type FullNode interface {
// ChainBlockstoreInfo returns some basic information about the blockstore
ChainBlockstoreInfo(context.Context) (map[string]interface{}, error) //perm:read
// MethodGroup: Beacon
// The Beacon method group contains methods for interacting with the random beacon (DRAND)
// BeaconGetEntry returns the beacon entry for the given filecoin epoch. If
// the entry has not yet been produced, the call will block until the entry
// becomes available
BeaconGetEntry(ctx context.Context, epoch abi.ChainEpoch) (*types.BeaconEntry, error) //perm:read
// GasEstimateFeeCap estimates gas fee cap
GasEstimateFeeCap(context.Context, *types.Message, int64, types.TipSetKey) (types.BigInt, error) //perm:read
@@ -290,7 +292,7 @@ type FullNode interface {
// // UX ?
// MethodGroup: Wallet
// MethodGroup: WalletF
// WalletNew creates a new address in the wallet with the given sigType.
// Available key types: bls, secp256k1, secp256k1-ledger
@@ -331,7 +333,7 @@ type FullNode interface {
// ClientImport imports file under the specified path into filestore.
ClientImport(ctx context.Context, ref FileRef) (*ImportRes, error) //perm:admin
// ClientRemoveImport removes file import
ClientRemoveImport(ctx context.Context, importID multistore.StoreID) error //perm:admin
ClientRemoveImport(ctx context.Context, importID imports.ID) error //perm:admin
// ClientStartDeal proposes a deal with a miner.
ClientStartDeal(ctx context.Context, params *StartDealParams) (*cid.Cid, error) //perm:admin
// ClientStatelessDeal fire-and-forget-proposes an offline deal to a miner without subsequent tracking.
@@ -351,16 +353,17 @@ type FullNode interface {
// ClientMinerQueryOffer returns a QueryOffer for the specific miner and file.
ClientMinerQueryOffer(ctx context.Context, miner address.Address, root cid.Cid, piece *cid.Cid) (QueryOffer, error) //perm:read
// ClientRetrieve initiates the retrieval of a file, as specified in the order.
ClientRetrieve(ctx context.Context, order RetrievalOrder, ref *FileRef) error //perm:admin
// ClientRetrieveWithEvents initiates the retrieval of a file, as specified in the order, and provides a channel
// of status updates.
ClientRetrieveWithEvents(ctx context.Context, order RetrievalOrder, ref *FileRef) (<-chan marketevents.RetrievalEvent, error) //perm:admin
ClientRetrieve(ctx context.Context, params RetrievalOrder) (*RestrievalRes, error) //perm:admin
// ClientRetrieveWait waits for retrieval to be complete
ClientRetrieveWait(ctx context.Context, deal retrievalmarket.DealID) error //perm:admin
// ClientExport exports a file stored in the local filestore to a system file
ClientExport(ctx context.Context, exportRef ExportRef, fileRef FileRef) error //perm:admin
// ClientListRetrievals returns information about retrievals made by the local client
ClientListRetrievals(ctx context.Context) ([]RetrievalInfo, error) //perm:write
// ClientGetRetrievalUpdates returns status of updated retrieval deals
ClientGetRetrievalUpdates(ctx context.Context) (<-chan RetrievalInfo, error) //perm:write
// ClientQueryAsk returns a signed StorageAsk from the specified miner.
ClientQueryAsk(ctx context.Context, p peer.ID, miner address.Address) (*storagemarket.StorageAsk, error) //perm:read
ClientQueryAsk(ctx context.Context, p peer.ID, miner address.Address) (*StorageAsk, error) //perm:read
// ClientCalcCommP calculates the CommP and data size of the specified CID
ClientDealPieceCID(ctx context.Context, root cid.Cid) (DataCIDSize, error) //perm:read
// ClientCalcCommP calculates the CommP for a specified file
@@ -404,7 +407,7 @@ type FullNode interface {
StateCall(context.Context, *types.Message, types.TipSetKey) (*InvocResult, error) //perm:read
// StateReplay replays a given message, assuming it was included in a block in the specified tipset.
//
// If a tipset key is provided, and a replacing message is found on chain,
// If a tipset key is provided, and a replacing message is not found on chain,
// the method will return an error saying that the message wasn't found
//
// If no tipset key is provided, the appropriate tipset is looked up, and if
@@ -428,6 +431,8 @@ type FullNode interface {
StateListMessages(ctx context.Context, match *MessageMatch, tsk types.TipSetKey, toht abi.ChainEpoch) ([]cid.Cid, error) //perm:read
// StateDecodeParams attempts to decode the provided params, based on the recipient actor address and method number.
StateDecodeParams(ctx context.Context, toAddr address.Address, method abi.MethodNum, params []byte, tsk types.TipSetKey) (interface{}, error) //perm:read
// StateEncodeParams attempts to encode the provided json params to the binary from
StateEncodeParams(ctx context.Context, toActCode cid.Cid, method abi.MethodNum, params json.RawMessage) ([]byte, error) //perm:read
// StateNetworkName returns the name of the network the node is synced to
StateNetworkName(context.Context) (dtypes.NetworkName, error) //perm:read
@@ -441,7 +446,7 @@ type FullNode interface {
// StateMinerPower returns the power of the indicated miner
StateMinerPower(context.Context, address.Address, types.TipSetKey) (*MinerPower, error) //perm:read
// StateMinerInfo returns info about the indicated miner
StateMinerInfo(context.Context, address.Address, types.TipSetKey) (miner.MinerInfo, error) //perm:read
StateMinerInfo(context.Context, address.Address, types.TipSetKey) (MinerInfo, error) //perm:read
// StateMinerDeadlines returns all the proving deadlines for the given miner
StateMinerDeadlines(context.Context, address.Address, types.TipSetKey) ([]Deadline, error) //perm:read
// StateMinerPartitions returns all partitions in the specified deadline
@@ -458,18 +463,23 @@ type FullNode interface {
StateMinerInitialPledgeCollateral(context.Context, address.Address, miner.SectorPreCommitInfo, types.TipSetKey) (types.BigInt, error) //perm:read
// StateMinerAvailableBalance returns the portion of a miner's balance that can be withdrawn or spent
StateMinerAvailableBalance(context.Context, address.Address, types.TipSetKey) (types.BigInt, error) //perm:read
// StateMinerSectorAllocated checks if a sector is allocated
// StateMinerSectorAllocated checks if a sector number is marked as allocated.
StateMinerSectorAllocated(context.Context, address.Address, abi.SectorNumber, types.TipSetKey) (bool, error) //perm:read
// StateSectorPreCommitInfo returns the PreCommit info for the specified miner's sector
StateSectorPreCommitInfo(context.Context, address.Address, abi.SectorNumber, types.TipSetKey) (miner.SectorPreCommitOnChainInfo, error) //perm:read
// StateSectorPreCommitInfo returns the PreCommit info for the specified miner's sector.
// Returns nil and no error if the sector isn't precommitted.
//
// Note that the sector number may be allocated while PreCommitInfo is nil. This means that either allocated sector
// numbers were compacted, and the sector number was marked as allocated in order to reduce size of the allocated
// sectors bitfield, or that the sector was precommitted, but the precommit has expired.
StateSectorPreCommitInfo(context.Context, address.Address, abi.SectorNumber, types.TipSetKey) (*miner.SectorPreCommitOnChainInfo, error) //perm:read
// StateSectorGetInfo returns the on-chain info for the specified miner's sector. Returns null in case the sector info isn't found
// NOTE: returned info.Expiration may not be accurate in some cases, use StateSectorExpiration to get accurate
// expiration epoch
StateSectorGetInfo(context.Context, address.Address, abi.SectorNumber, types.TipSetKey) (*miner.SectorOnChainInfo, error) //perm:read
// StateSectorExpiration returns epoch at which given sector will expire
StateSectorExpiration(context.Context, address.Address, abi.SectorNumber, types.TipSetKey) (*miner.SectorExpiration, error) //perm:read
StateSectorExpiration(context.Context, address.Address, abi.SectorNumber, types.TipSetKey) (*lminer.SectorExpiration, error) //perm:read
// StateSectorPartition finds deadline/partition with the specified sector
StateSectorPartition(ctx context.Context, maddr address.Address, sectorNumber abi.SectorNumber, tok types.TipSetKey) (*miner.SectorLocation, error) //perm:read
StateSectorPartition(ctx context.Context, maddr address.Address, sectorNumber abi.SectorNumber, tok types.TipSetKey) (*lminer.SectorLocation, error) //perm:read
// StateSearchMsg looks back up to limit epochs in the chain for a message, and returns its receipt and the tipset where it was executed
//
// NOTE: If a replacing message is found on chain, this method will return
@@ -515,18 +525,35 @@ type FullNode interface {
// StateMarketParticipants returns the Escrow and Locked balances of every participant in the Storage Market
StateMarketParticipants(context.Context, types.TipSetKey) (map[string]MarketBalance, error) //perm:read
// StateMarketDeals returns information about every deal in the Storage Market
StateMarketDeals(context.Context, types.TipSetKey) (map[string]MarketDeal, error) //perm:read
StateMarketDeals(context.Context, types.TipSetKey) (map[string]*MarketDeal, error) //perm:read
// StateMarketStorageDeal returns information about the indicated deal
StateMarketStorageDeal(context.Context, abi.DealID, types.TipSetKey) (*MarketDeal, error) //perm:read
// StateGetAllocationForPendingDeal returns the allocation for a given deal ID of a pending deal. Returns nil if
// pending allocation is not found.
StateGetAllocationForPendingDeal(ctx context.Context, dealId abi.DealID, tsk types.TipSetKey) (*verifregtypes.Allocation, error) //perm:read
// StateGetAllocation returns the allocation for a given address and allocation ID.
StateGetAllocation(ctx context.Context, clientAddr address.Address, allocationId verifregtypes.AllocationId, tsk types.TipSetKey) (*verifregtypes.Allocation, error) //perm:read
// StateGetAllocations returns the all the allocations for a given client.
StateGetAllocations(ctx context.Context, clientAddr address.Address, tsk types.TipSetKey) (map[verifregtypes.AllocationId]verifregtypes.Allocation, error) //perm:read
// StateGetClaim returns the claim for a given address and claim ID.
StateGetClaim(ctx context.Context, providerAddr address.Address, claimId verifregtypes.ClaimId, tsk types.TipSetKey) (*verifregtypes.Claim, error) //perm:read
// StateGetClaims returns the all the claims for a given provider.
StateGetClaims(ctx context.Context, providerAddr address.Address, tsk types.TipSetKey) (map[verifregtypes.ClaimId]verifregtypes.Claim, error) //perm:read
// StateComputeDataCID computes DataCID from a set of on-chain deals
StateComputeDataCID(ctx context.Context, maddr address.Address, sectorType abi.RegisteredSealProof, deals []abi.DealID, tsk types.TipSetKey) (cid.Cid, error) //perm:read
// StateLookupID retrieves the ID address of the given address
StateLookupID(context.Context, address.Address, types.TipSetKey) (address.Address, error) //perm:read
// StateAccountKey returns the public key address of the given ID address
// StateAccountKey returns the public key address of the given ID address for secp and bls accounts
StateAccountKey(context.Context, address.Address, types.TipSetKey) (address.Address, error) //perm:read
// StateLookupRobustAddress returns the public key address of the given ID address for non-account addresses (multisig, miners etc)
StateLookupRobustAddress(context.Context, address.Address, types.TipSetKey) (address.Address, error) //perm:read
// StateChangedActors returns all the actors whose states change between the two given state CIDs
// TODO: Should this take tipset keys instead?
StateChangedActors(context.Context, cid.Cid, cid.Cid) (map[string]types.Actor, error) //perm:read
// StateMinerSectorCount returns the number of sectors in a miner's sector set and proving set
StateMinerSectorCount(context.Context, address.Address, types.TipSetKey) (MinerSectors, error) //perm:read
// StateMinerAllocated returns a bitfield containing all sector numbers marked as allocated in miner state
StateMinerAllocated(context.Context, address.Address, types.TipSetKey) (*bitfield.BitField, error) //perm:read
// StateCompute is a flexible command that applies the given messages on the given tipset.
// The messages are run as though the VM were at the provided height.
//
@@ -568,7 +595,7 @@ type FullNode interface {
// Returns nil if there is no entry in the data cap table for the
// address.
StateVerifiedClientStatus(ctx context.Context, addr address.Address, tsk types.TipSetKey) (*abi.StoragePower, error) //perm:read
// StateVerifiedClientStatus returns the address of the Verified Registry's root key
// StateVerifiedRegistryRootKey returns the address of the Verified Registry's root key
StateVerifiedRegistryRootKey(ctx context.Context, tsk types.TipSetKey) (address.Address, error) //perm:read
// StateDealProviderCollateralBounds returns the min and max collateral a storage provider
// can issue. It takes the deal size and verified status as parameters.
@@ -582,6 +609,23 @@ type FullNode interface {
StateVMCirculatingSupplyInternal(context.Context, types.TipSetKey) (CirculatingSupply, error) //perm:read
// StateNetworkVersion returns the network version at the given tipset
StateNetworkVersion(context.Context, types.TipSetKey) (apitypes.NetworkVersion, error) //perm:read
// StateActorCodeCIDs returns the CIDs of all the builtin actors for the given network version
StateActorCodeCIDs(context.Context, abinetwork.Version) (map[string]cid.Cid, error) //perm:read
// StateActorManifestCID returns the CID of the builtin actors manifest for the given network version
StateActorManifestCID(context.Context, abinetwork.Version) (cid.Cid, error) //perm:read
// StateGetRandomnessFromTickets is used to sample the chain for randomness.
StateGetRandomnessFromTickets(ctx context.Context, personalization crypto.DomainSeparationTag, randEpoch abi.ChainEpoch, entropy []byte, tsk types.TipSetKey) (abi.Randomness, error) //perm:read
// StateGetRandomnessFromBeacon is used to sample the beacon for randomness.
StateGetRandomnessFromBeacon(ctx context.Context, personalization crypto.DomainSeparationTag, randEpoch abi.ChainEpoch, entropy []byte, tsk types.TipSetKey) (abi.Randomness, error) //perm:read
// StateGetBeaconEntry returns the beacon entry for the given filecoin epoch. If
// the entry has not yet been produced, the call will block until the entry
// becomes available
StateGetBeaconEntry(ctx context.Context, epoch abi.ChainEpoch) (*types.BeaconEntry, error) //perm:read
// StateGetNetworkParams return current network params
StateGetNetworkParams(ctx context.Context) (*NetworkParams, error) //perm:read
// MethodGroup: Msig
// The Msig methods are used to interact with multisig wallets on the
@@ -622,10 +666,14 @@ type FullNode interface {
// <sender address of the approve msg>, <method to call in the proposed message>, <params to include in the proposed message>
MsigApproveTxnHash(context.Context, address.Address, uint64, address.Address, address.Address, types.BigInt, address.Address, uint64, []byte) (*MessagePrototype, error) //perm:sign
// MsigCancel cancels a previously-proposed multisig message
// It takes the following params: <multisig address>, <proposed transaction ID> <signer address>
MsigCancel(context.Context, address.Address, uint64, address.Address) (*MessagePrototype, error) //perm:sign
// MsigCancel cancels a previously-proposed multisig message
// It takes the following params: <multisig address>, <proposed transaction ID>, <recipient address>, <value to transfer>,
// <sender address of the cancel msg>, <method to call in the proposed message>, <params to include in the proposed message>
MsigCancel(context.Context, address.Address, uint64, address.Address, types.BigInt, address.Address, uint64, []byte) (*MessagePrototype, error) //perm:sign
MsigCancelTxnHash(context.Context, address.Address, uint64, address.Address, types.BigInt, address.Address, uint64, []byte) (*MessagePrototype, error) //perm:sign
// MsigAddPropose proposes adding a signer in the multisig
// It takes the following params: <multisig address>, <sender address of the propose msg>,
@@ -678,7 +726,17 @@ type FullNode interface {
// MethodGroup: Paych
// The Paych methods are for interacting with and managing payment channels
PaychGet(ctx context.Context, from, to address.Address, amt types.BigInt) (*ChannelInfo, error) //perm:sign
// PaychGet gets or creates a payment channel between address pair
// The specified amount will be reserved for use. If there aren't enough non-reserved funds
// available, funds will be added through an on-chain message.
// - When opts.OffChain is true, this call will not cause any messages to be sent to the chain (no automatic
// channel creation/funds adding). If the operation can't be performed without sending a message an error will be
// returned. Note that even when this option is specified, this call can be blocked by previous operations on the
// channel waiting for on-chain operations.
PaychGet(ctx context.Context, from, to address.Address, amt types.BigInt, opts PaychGetOpts) (*ChannelInfo, error) //perm:sign
// PaychFund gets or creates a payment channel between address pair.
// The specified amount will be added to the channel through on-chain send for future use
PaychFund(ctx context.Context, from, to address.Address, amt types.BigInt) (*ChannelInfo, error) //perm:sign
PaychGetWaitReady(context.Context, cid.Cid) (address.Address, error) //perm:sign
PaychAvailableFunds(ctx context.Context, ch address.Address) (*ChannelAvailableFunds, error) //perm:sign
PaychAvailableFundsByFromTo(ctx context.Context, from, to address.Address) (*ChannelAvailableFunds, error) //perm:sign
@@ -707,6 +765,12 @@ type FullNode interface {
CreateBackup(ctx context.Context, fpath string) error //perm:admin
}
type StorageAsk struct {
Response *storagemarket.StorageAsk
DealProtocols []string
}
type FileRef struct {
Path string
IsCAR bool
@@ -723,16 +787,28 @@ type MinerSectors struct {
type ImportRes struct {
Root cid.Cid
ImportID multistore.StoreID
ImportID imports.ID
}
type Import struct {
Key multistore.StoreID
Key imports.ID
Err string
Root *cid.Cid
Source string
Root *cid.Cid
// Source is the provenance of the import, e.g. "import", "unknown", else.
// Currently useless but may be used in the future.
Source string
// FilePath is the path of the original file. It is important that the file
// is retained at this path, because it will be referenced during
// the transfer (when we do the UnixFS chunking, we don't duplicate the
// leaves, but rather point to chunks of the original data through
// positional references).
FilePath string
// CARPath is the path of the CAR file containing the DAG for this import.
CARPath string
}
type DealInfo struct {
@@ -805,6 +881,10 @@ const (
PCHOutbound
)
type PaychGetOpts struct {
OffChain bool
}
type PaychStatus struct {
ControlAddr address.Address
Direction PCHDir
@@ -822,16 +902,23 @@ type ChannelAvailableFunds struct {
From address.Address
// To is the to address of the channel
To address.Address
// ConfirmedAmt is the amount of funds that have been confirmed on-chain
// for the channel
// ConfirmedAmt is the total amount of funds that have been confirmed on-chain for the channel
ConfirmedAmt types.BigInt
// PendingAmt is the amount of funds that are pending confirmation on-chain
PendingAmt types.BigInt
// NonReservedAmt is part of ConfirmedAmt that is available for use (e.g. when the payment channel was pre-funded)
NonReservedAmt types.BigInt
// PendingAvailableAmt is the amount of funds that are pending confirmation on-chain that will become available once confirmed
PendingAvailableAmt types.BigInt
// PendingWaitSentinel can be used with PaychGetWaitReady to wait for
// confirmation of pending funds
PendingWaitSentinel *cid.Cid
// QueuedAmt is the amount that is queued up behind a pending request
QueuedAmt types.BigInt
// VoucherRedeemedAmt is the amount that is redeemed by vouchers on-chain
// and in the local datastore
VoucherReedeemedAmt types.BigInt
@@ -877,6 +964,7 @@ type QueryOffer struct {
Size uint64
MinPrice types.BigInt
UnsealPrice types.BigInt
PricePerByte abi.TokenAmount
PaymentInterval uint64
PaymentIntervalIncrease uint64
Miner address.Address
@@ -910,14 +998,14 @@ type MarketDeal struct {
}
type RetrievalOrder struct {
// TODO: make this less unixfs specific
Root cid.Cid
Piece *cid.Cid
Root cid.Cid
Piece *cid.Cid
DataSelector *Selector
// todo: Size/Total are only used for calculating price per byte; we should let users just pass that
Size uint64
Total types.BigInt
LocalStore *multistore.StoreID // if specified, get data from local store
// TODO: support offset
Total types.BigInt
UnsealPrice types.BigInt
PaymentInterval uint64
PaymentIntervalIncrease uint64
@@ -1060,7 +1148,7 @@ type CirculatingSupply struct {
type MiningBaseInfo struct {
MinerPower types.BigInt
NetworkPower types.BigInt
Sectors []builtin.SectorInfo
Sectors []builtin.ExtendedSectorInfo
WorkerKey address.Address
SectorSize abi.SectorSize
PrevBeaconEntry types.BeaconEntry
@@ -1151,3 +1239,8 @@ type MsigTransaction struct {
Approved []address.Address
}
type PruneOpts struct {
MovingGC bool
RetainState int64
}
+12 -3
View File
@@ -3,14 +3,15 @@ package api
import (
"context"
blocks "github.com/ipfs/go-block-format"
"github.com/ipfs/go-cid"
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/builtin/v9/miner"
"github.com/filecoin-project/go-state-types/dline"
apitypes "github.com/filecoin-project/lotus/api/types"
"github.com/filecoin-project/lotus/chain/actors/builtin/miner"
"github.com/filecoin-project/lotus/chain/types"
)
@@ -30,18 +31,25 @@ import (
type Gateway interface {
ChainHasObj(context.Context, cid.Cid) (bool, error)
ChainPutObj(context.Context, blocks.Block) error
ChainHead(ctx context.Context) (*types.TipSet, error)
ChainGetParentMessages(context.Context, cid.Cid) ([]Message, error)
ChainGetParentReceipts(context.Context, cid.Cid) ([]*types.MessageReceipt, error)
ChainGetBlockMessages(context.Context, cid.Cid) (*BlockMessages, error)
ChainGetMessage(ctx context.Context, mc cid.Cid) (*types.Message, error)
ChainGetPath(ctx context.Context, from, to types.TipSetKey) ([]*HeadChange, error)
ChainGetTipSet(ctx context.Context, tsk types.TipSetKey) (*types.TipSet, error)
ChainGetTipSetByHeight(ctx context.Context, h abi.ChainEpoch, tsk types.TipSetKey) (*types.TipSet, error)
ChainGetTipSetAfterHeight(ctx context.Context, h abi.ChainEpoch, tsk types.TipSetKey) (*types.TipSet, error)
ChainNotify(context.Context) (<-chan []*HeadChange, error)
ChainReadObj(context.Context, cid.Cid) ([]byte, error)
ChainGetGenesis(context.Context) (*types.TipSet, error)
GasEstimateMessageGas(ctx context.Context, msg *types.Message, spec *MessageSendSpec, tsk types.TipSetKey) (*types.Message, error)
MpoolPush(ctx context.Context, sm *types.SignedMessage) (cid.Cid, error)
MsigGetAvailableBalance(ctx context.Context, addr address.Address, tsk types.TipSetKey) (types.BigInt, error)
MsigGetVested(ctx context.Context, addr address.Address, start types.TipSetKey, end types.TipSetKey) (types.BigInt, error)
MsigGetPending(context.Context, address.Address, types.TipSetKey) ([]*MsigTransaction, error)
MsigGetVested(ctx context.Context, addr address.Address, start types.TipSetKey, end types.TipSetKey) (types.BigInt, error)
MsigGetVestingSchedule(ctx context.Context, addr address.Address, tsk types.TipSetKey) (MsigVesting, error)
StateAccountKey(ctx context.Context, addr address.Address, tsk types.TipSetKey) (address.Address, error)
StateDealProviderCollateralBounds(ctx context.Context, size abi.PaddedPieceSize, verified bool, tsk types.TipSetKey) (DealCollateralBounds, error)
StateGetActor(ctx context.Context, actor address.Address, ts types.TipSetKey) (*types.Actor, error)
@@ -50,7 +58,7 @@ type Gateway interface {
StateLookupID(ctx context.Context, addr address.Address, tsk types.TipSetKey) (address.Address, error)
StateMarketBalance(ctx context.Context, addr address.Address, tsk types.TipSetKey) (MarketBalance, error)
StateMarketStorageDeal(ctx context.Context, dealId abi.DealID, tsk types.TipSetKey) (*MarketDeal, error)
StateMinerInfo(ctx context.Context, actor address.Address, tsk types.TipSetKey) (miner.MinerInfo, error)
StateMinerInfo(ctx context.Context, actor address.Address, tsk types.TipSetKey) (MinerInfo, error)
StateMinerProvingDeadline(ctx context.Context, addr address.Address, tsk types.TipSetKey) (*dline.Info, error)
StateMinerPower(context.Context, address.Address, types.TipSetKey) (*MinerPower, error)
StateNetworkVersion(context.Context, types.TipSetKey) (apitypes.NetworkVersion, error)
@@ -60,4 +68,5 @@ type Gateway interface {
StateWaitMsg(ctx context.Context, cid cid.Cid, confidence uint64, limit abi.ChainEpoch, allowReplaced bool) (*MsgLookup, error)
WalletBalance(context.Context, address.Address) (types.BigInt, error)
Version(context.Context) (APIVersion, error)
Discover(context.Context) (apitypes.OpenRPCDocument, error)
}
+15 -4
View File
@@ -2,11 +2,12 @@ package api
import (
"context"
"time"
metrics "github.com/libp2p/go-libp2p-core/metrics"
"github.com/libp2p/go-libp2p-core/network"
"github.com/libp2p/go-libp2p-core/peer"
"github.com/libp2p/go-libp2p-core/protocol"
"github.com/libp2p/go-libp2p/core/metrics"
"github.com/libp2p/go-libp2p/core/network"
"github.com/libp2p/go-libp2p/core/peer"
"github.com/libp2p/go-libp2p/core/protocol"
)
// MODIFYING THE API INTERFACE
@@ -25,6 +26,7 @@ type Net interface {
NetConnectedness(context.Context, peer.ID) (network.Connectedness, error) //perm:read
NetPeers(context.Context) ([]peer.AddrInfo, error) //perm:read
NetPing(context.Context, peer.ID) (time.Duration, error) //perm:read
NetConnect(context.Context, peer.AddrInfo) error //perm:write
NetAddrsListen(context.Context) (peer.AddrInfo, error) //perm:read
NetDisconnect(context.Context, peer.ID) error //perm:write
@@ -51,6 +53,15 @@ type Net interface {
NetBlockRemove(ctx context.Context, acl NetBlockList) error //perm:admin
NetBlockList(ctx context.Context) (NetBlockList, error) //perm:read
NetProtectAdd(ctx context.Context, acl []peer.ID) error //perm:admin
NetProtectRemove(ctx context.Context, acl []peer.ID) error //perm:admin
NetProtectList(ctx context.Context) ([]peer.ID, error) //perm:read
// ResourceManager API
NetStat(ctx context.Context, scope string) (NetStat, error) //perm:read
NetLimit(ctx context.Context, scope string) (NetLimit, error) //perm:read
NetSetLimit(ctx context.Context, scope string, limit NetLimit) error //perm:admin
// ID returns peerID of libp2p node backing this API
ID(context.Context) (peer.ID, error) //perm:read
}
+335 -57
View File
@@ -5,26 +5,28 @@ import (
"context"
"time"
"github.com/filecoin-project/lotus/chain/actors/builtin"
"github.com/google/uuid"
"github.com/ipfs/go-cid"
"github.com/libp2p/go-libp2p-core/peer"
"github.com/libp2p/go-libp2p/core/peer"
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-bitfield"
datatransfer "github.com/filecoin-project/go-data-transfer"
"github.com/filecoin-project/go-fil-markets/piecestore"
"github.com/filecoin-project/go-fil-markets/retrievalmarket"
"github.com/filecoin-project/go-fil-markets/storagemarket"
"github.com/filecoin-project/go-jsonrpc/auth"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/specs-actors/v2/actors/builtin/market"
"github.com/filecoin-project/specs-storage/storage"
"github.com/filecoin-project/go-state-types/big"
"github.com/filecoin-project/go-state-types/builtin/v9/market"
"github.com/filecoin-project/go-state-types/builtin/v9/miner"
abinetwork "github.com/filecoin-project/go-state-types/network"
"github.com/filecoin-project/lotus/chain/actors/builtin"
"github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/extern/sector-storage/fsutil"
"github.com/filecoin-project/lotus/extern/sector-storage/stores"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface"
"github.com/filecoin-project/lotus/extern/storage-sealing/sealiface"
"github.com/filecoin-project/lotus/storage/pipeline/sealiface"
"github.com/filecoin-project/lotus/storage/sealer/fsutil"
"github.com/filecoin-project/lotus/storage/sealer/storiface"
)
// MODIFYING THE API INTERFACE
@@ -48,8 +50,22 @@ type StorageMiner interface {
ActorSectorSize(context.Context, address.Address) (abi.SectorSize, error) //perm:read
ActorAddressConfig(ctx context.Context) (AddressConfig, error) //perm:read
// WithdrawBalance allows to withdraw balance from miner actor to owner address
// Specify amount as "0" to withdraw full balance. This method returns a message CID
// and does not wait for message execution
ActorWithdrawBalance(ctx context.Context, amount abi.TokenAmount) (cid.Cid, error) //perm:admin
// BeneficiaryWithdrawBalance allows the beneficiary of a miner to withdraw balance from miner actor
// Specify amount as "0" to withdraw full balance. This method returns a message CID
// and does not wait for message execution
BeneficiaryWithdrawBalance(context.Context, abi.TokenAmount) (cid.Cid, error) //perm:admin
MiningBase(context.Context) (*types.TipSet, error) //perm:read
ComputeWindowPoSt(ctx context.Context, dlIdx uint64, tsk types.TipSetKey) ([]miner.SubmitWindowedPoStParams, error) //perm:admin
ComputeDataCid(ctx context.Context, pieceSize abi.UnpaddedPieceSize, pieceData storiface.Data) (abi.PieceInfo, error) //perm:admin
// Temp api for testing
PledgeSector(context.Context) (abi.SectorID, error) //perm:write
@@ -59,9 +75,9 @@ type StorageMiner interface {
// Add piece to an open sector. If no sectors with enough space are open,
// either a new sector will be created, or this call will block until more
// sectors can be created.
SectorAddPieceToAny(ctx context.Context, size abi.UnpaddedPieceSize, r storage.Data, d PieceDealInfo) (SectorOffset, error) //perm:admin
SectorAddPieceToAny(ctx context.Context, size abi.UnpaddedPieceSize, r storiface.Data, d PieceDealInfo) (SectorOffset, error) //perm:admin
SectorsUnsealPiece(ctx context.Context, sector storage.SectorRef, offset storiface.UnpaddedByteIndex, size abi.UnpaddedPieceSize, randomness abi.SealRandomness, commd *cid.Cid) error //perm:admin
SectorsUnsealPiece(ctx context.Context, sector storiface.SectorRef, offset storiface.UnpaddedByteIndex, size abi.UnpaddedPieceSize, randomness abi.SealRandomness, commd *cid.Cid) error //perm:admin
// List all staged sectors
SectorsList(context.Context) ([]abi.SectorNumber, error) //perm:read
@@ -90,7 +106,8 @@ type StorageMiner interface {
SectorsUpdate(context.Context, abi.SectorNumber, SectorState) error //perm:admin
// SectorRemove removes the sector from storage. It doesn't terminate it on-chain, which can
// be done with SectorTerminate. Removing and not terminating live sectors will cause additional penalties.
SectorRemove(context.Context, abi.SectorNumber) error //perm:admin
SectorRemove(context.Context, abi.SectorNumber) error //perm:admin
SectorMarkForUpgrade(ctx context.Context, id abi.SectorNumber, snap bool) error //perm:admin
// SectorTerminate terminates the sector on-chain (adding it to a termination batch first), then
// automatically removes it from storage
SectorTerminate(context.Context, abi.SectorNumber) error //perm:admin
@@ -98,8 +115,7 @@ type StorageMiner interface {
// Returns null if message wasn't sent
SectorTerminateFlush(ctx context.Context) (*cid.Cid, error) //perm:admin
// SectorTerminatePending returns a list of pending sector terminations to be sent in the next batch message
SectorTerminatePending(ctx context.Context) ([]abi.SectorID, error) //perm:admin
SectorMarkForUpgrade(ctx context.Context, id abi.SectorNumber) error //perm:admin
SectorTerminatePending(ctx context.Context) ([]abi.SectorID, error) //perm:admin
// SectorPreCommitFlush immediately sends a PreCommit message with sectors batched for PreCommit.
// Returns null if message wasn't sent
SectorPreCommitFlush(ctx context.Context) ([]sealiface.PreCommitBatchRes, error) //perm:admin
@@ -110,6 +126,26 @@ type StorageMiner interface {
SectorCommitFlush(ctx context.Context) ([]sealiface.CommitBatchRes, error) //perm:admin
// SectorCommitPending returns a list of pending Commit sectors to be sent in the next aggregate message
SectorCommitPending(ctx context.Context) ([]abi.SectorID, error) //perm:admin
SectorMatchPendingPiecesToOpenSectors(ctx context.Context) error //perm:admin
// SectorAbortUpgrade can be called on sectors that are in the process of being upgraded to abort it
SectorAbortUpgrade(context.Context, abi.SectorNumber) error //perm:admin
// SectorNumAssignerMeta returns sector number assigner metadata - reserved/allocated
SectorNumAssignerMeta(ctx context.Context) (NumAssignerMeta, error) //perm:read
// SectorNumReservations returns a list of sector number reservations
SectorNumReservations(ctx context.Context) (map[string]bitfield.BitField, error) //perm:read
// SectorNumReserve creates a new sector number reservation. Will fail if any other reservation has colliding
// numbers or name. Set force to true to override safety checks.
// Valid characters for name: a-z, A-Z, 0-9, _, -
SectorNumReserve(ctx context.Context, name string, sectors bitfield.BitField, force bool) error //perm:admin
// SectorNumReserveCount creates a new sector number reservation for `count` sector numbers.
// by default lotus will allocate lowest-available sector numbers to the reservation.
// For restrictions on `name` see SectorNumReserve
SectorNumReserveCount(ctx context.Context, name string, count uint64) (bitfield.BitField, error) //perm:admin
// SectorNumFree drops a sector reservation
SectorNumFree(ctx context.Context, name string) error //perm:admin
SectorReceive(ctx context.Context, meta RemoteSectorMeta) error //perm:admin
// WorkerConnect tells the node to connect to workers RPC
WorkerConnect(context.Context, string) error //perm:admin retry:true
@@ -117,39 +153,67 @@ type StorageMiner interface {
WorkerJobs(context.Context) (map[uuid.UUID][]storiface.WorkerJob, error) //perm:admin
//storiface.WorkerReturn
ReturnAddPiece(ctx context.Context, callID storiface.CallID, pi abi.PieceInfo, err *storiface.CallError) error //perm:admin retry:true
ReturnSealPreCommit1(ctx context.Context, callID storiface.CallID, p1o storage.PreCommit1Out, err *storiface.CallError) error //perm:admin retry:true
ReturnSealPreCommit2(ctx context.Context, callID storiface.CallID, sealed storage.SectorCids, err *storiface.CallError) error //perm:admin retry:true
ReturnSealCommit1(ctx context.Context, callID storiface.CallID, out storage.Commit1Out, err *storiface.CallError) error //perm:admin retry:true
ReturnSealCommit2(ctx context.Context, callID storiface.CallID, proof storage.Proof, err *storiface.CallError) error //perm:admin retry:true
ReturnFinalizeSector(ctx context.Context, callID storiface.CallID, err *storiface.CallError) error //perm:admin retry:true
ReturnReleaseUnsealed(ctx context.Context, callID storiface.CallID, err *storiface.CallError) error //perm:admin retry:true
ReturnMoveStorage(ctx context.Context, callID storiface.CallID, err *storiface.CallError) error //perm:admin retry:true
ReturnUnsealPiece(ctx context.Context, callID storiface.CallID, err *storiface.CallError) error //perm:admin retry:true
ReturnReadPiece(ctx context.Context, callID storiface.CallID, ok bool, err *storiface.CallError) error //perm:admin retry:true
ReturnFetch(ctx context.Context, callID storiface.CallID, err *storiface.CallError) error //perm:admin retry:true
ReturnDataCid(ctx context.Context, callID storiface.CallID, pi abi.PieceInfo, err *storiface.CallError) error //perm:admin retry:true
ReturnAddPiece(ctx context.Context, callID storiface.CallID, pi abi.PieceInfo, err *storiface.CallError) error //perm:admin retry:true
ReturnSealPreCommit1(ctx context.Context, callID storiface.CallID, p1o storiface.PreCommit1Out, err *storiface.CallError) error //perm:admin retry:true
ReturnSealPreCommit2(ctx context.Context, callID storiface.CallID, sealed storiface.SectorCids, err *storiface.CallError) error //perm:admin retry:true
ReturnSealCommit1(ctx context.Context, callID storiface.CallID, out storiface.Commit1Out, err *storiface.CallError) error //perm:admin retry:true
ReturnSealCommit2(ctx context.Context, callID storiface.CallID, proof storiface.Proof, err *storiface.CallError) error //perm:admin retry:true
ReturnFinalizeSector(ctx context.Context, callID storiface.CallID, err *storiface.CallError) error //perm:admin retry:true
ReturnReplicaUpdate(ctx context.Context, callID storiface.CallID, out storiface.ReplicaUpdateOut, err *storiface.CallError) error //perm:admin retry:true
ReturnProveReplicaUpdate1(ctx context.Context, callID storiface.CallID, vanillaProofs storiface.ReplicaVanillaProofs, err *storiface.CallError) error //perm:admin retry:true
ReturnProveReplicaUpdate2(ctx context.Context, callID storiface.CallID, proof storiface.ReplicaUpdateProof, err *storiface.CallError) error //perm:admin retry:true
ReturnGenerateSectorKeyFromData(ctx context.Context, callID storiface.CallID, err *storiface.CallError) error //perm:admin retry:true
ReturnFinalizeReplicaUpdate(ctx context.Context, callID storiface.CallID, err *storiface.CallError) error //perm:admin retry:true
ReturnReleaseUnsealed(ctx context.Context, callID storiface.CallID, err *storiface.CallError) error //perm:admin retry:true
ReturnMoveStorage(ctx context.Context, callID storiface.CallID, err *storiface.CallError) error //perm:admin retry:true
ReturnUnsealPiece(ctx context.Context, callID storiface.CallID, err *storiface.CallError) error //perm:admin retry:true
ReturnReadPiece(ctx context.Context, callID storiface.CallID, ok bool, err *storiface.CallError) error //perm:admin retry:true
ReturnDownloadSector(ctx context.Context, callID storiface.CallID, err *storiface.CallError) error //perm:admin retry:true
ReturnFetch(ctx context.Context, callID storiface.CallID, err *storiface.CallError) error //perm:admin retry:true
// SealingSchedDiag dumps internal sealing scheduler state
SealingSchedDiag(ctx context.Context, doSched bool) (interface{}, error) //perm:admin
SealingAbort(ctx context.Context, call storiface.CallID) error //perm:admin
//SealingSchedRemove removes a request from sealing pipeline
SealingRemoveRequest(ctx context.Context, schedId uuid.UUID) error //perm:admin
//stores.SectorIndex
StorageAttach(context.Context, stores.StorageInfo, fsutil.FsStat) error //perm:admin
StorageInfo(context.Context, stores.ID) (stores.StorageInfo, error) //perm:admin
StorageReportHealth(context.Context, stores.ID, stores.HealthReport) error //perm:admin
StorageDeclareSector(ctx context.Context, storageID stores.ID, s abi.SectorID, ft storiface.SectorFileType, primary bool) error //perm:admin
StorageDropSector(ctx context.Context, storageID stores.ID, s abi.SectorID, ft storiface.SectorFileType) error //perm:admin
StorageFindSector(ctx context.Context, sector abi.SectorID, ft storiface.SectorFileType, ssize abi.SectorSize, allowFetch bool) ([]stores.SectorStorageInfo, error) //perm:admin
StorageBestAlloc(ctx context.Context, allocate storiface.SectorFileType, ssize abi.SectorSize, pathType storiface.PathType) ([]stores.StorageInfo, error) //perm:admin
StorageLock(ctx context.Context, sector abi.SectorID, read storiface.SectorFileType, write storiface.SectorFileType) error //perm:admin
StorageTryLock(ctx context.Context, sector abi.SectorID, read storiface.SectorFileType, write storiface.SectorFileType) (bool, error) //perm:admin
StorageList(ctx context.Context) (map[stores.ID][]stores.Decl, error) //perm:admin
// paths.SectorIndex
StorageAttach(context.Context, storiface.StorageInfo, fsutil.FsStat) error //perm:admin
StorageDetach(ctx context.Context, id storiface.ID, url string) error //perm:admin
StorageInfo(context.Context, storiface.ID) (storiface.StorageInfo, error) //perm:admin
StorageReportHealth(context.Context, storiface.ID, storiface.HealthReport) error //perm:admin
StorageDeclareSector(ctx context.Context, storageID storiface.ID, s abi.SectorID, ft storiface.SectorFileType, primary bool) error //perm:admin
StorageDropSector(ctx context.Context, storageID storiface.ID, s abi.SectorID, ft storiface.SectorFileType) error //perm:admin
// StorageFindSector returns list of paths where the specified sector files exist.
//
// If allowFetch is set, list of paths to which the sector can be fetched will also be returned.
// - Paths which have sector files locally (don't require fetching) will be listed first.
// - Paths which have sector files locally will not be filtered based on based on AllowTypes/DenyTypes.
// - Paths which require fetching will be filtered based on AllowTypes/DenyTypes. If multiple
// file types are specified, each type will be considered individually, and a union of all paths
// which can accommodate each file type will be returned.
StorageFindSector(ctx context.Context, sector abi.SectorID, ft storiface.SectorFileType, ssize abi.SectorSize, allowFetch bool) ([]storiface.SectorStorageInfo, error) //perm:admin
// StorageBestAlloc returns list of paths where sector files of the specified type can be allocated, ordered by preference.
// Paths with more weight and more % of free space are preferred.
// Note: This method doesn't filter paths based on AllowTypes/DenyTypes.
StorageBestAlloc(ctx context.Context, allocate storiface.SectorFileType, ssize abi.SectorSize, pathType storiface.PathType) ([]storiface.StorageInfo, error) //perm:admin
StorageLock(ctx context.Context, sector abi.SectorID, read storiface.SectorFileType, write storiface.SectorFileType) error //perm:admin
StorageTryLock(ctx context.Context, sector abi.SectorID, read storiface.SectorFileType, write storiface.SectorFileType) (bool, error) //perm:admin
StorageList(ctx context.Context) (map[storiface.ID][]storiface.Decl, error) //perm:admin
StorageGetLocks(ctx context.Context) (storiface.SectorLocks, error) //perm:admin
StorageLocal(ctx context.Context) (map[stores.ID]string, error) //perm:admin
StorageStat(ctx context.Context, id stores.ID) (fsutil.FsStat, error) //perm:admin
StorageLocal(ctx context.Context) (map[storiface.ID]string, error) //perm:admin
StorageStat(ctx context.Context, id storiface.ID) (fsutil.FsStat, error) //perm:admin
StorageAuthVerify(ctx context.Context, token string) ([]auth.Permission, error) //perm:read
StorageAddLocal(ctx context.Context, path string) error //perm:admin
StorageDetachLocal(ctx context.Context, path string) error //perm:admin
StorageRedeclareLocal(ctx context.Context, id *storiface.ID, dropMissing bool) error //perm:admin
MarketImportDealData(ctx context.Context, propcid cid.Cid, path string) error //perm:write
MarketListDeals(ctx context.Context) ([]MarketDeal, error) //perm:read
MarketListDeals(ctx context.Context) ([]*MarketDeal, error) //perm:read
MarketListRetrievalDeals(ctx context.Context) ([]retrievalmarket.ProviderDealState, error) //perm:read
MarketGetDealUpdates(ctx context.Context) (<-chan storagemarket.MinerDeal, error) //perm:read
MarketListIncompleteDeals(ctx context.Context) ([]storagemarket.MinerDeal, error) //perm:read
@@ -159,19 +223,77 @@ type StorageMiner interface {
MarketGetRetrievalAsk(ctx context.Context) (*retrievalmarket.Ask, error) //perm:read
MarketListDataTransfers(ctx context.Context) ([]DataTransferChannel, error) //perm:write
MarketDataTransferUpdates(ctx context.Context) (<-chan DataTransferChannel, error) //perm:write
// MarketDataTransferDiagnostics generates debugging information about current data transfers over graphsync
MarketDataTransferDiagnostics(ctx context.Context, p peer.ID) (*TransferDiagnostics, error) //perm:write
// MarketRestartDataTransfer attempts to restart a data transfer with the given transfer ID and other peer
MarketRestartDataTransfer(ctx context.Context, transferID datatransfer.TransferID, otherPeer peer.ID, isInitiator bool) error //perm:write
// MarketCancelDataTransfer cancels a data transfer with the given transfer ID and other peer
MarketCancelDataTransfer(ctx context.Context, transferID datatransfer.TransferID, otherPeer peer.ID, isInitiator bool) error //perm:write
MarketPendingDeals(ctx context.Context) (PendingDealInfo, error) //perm:write
MarketPublishPendingDeals(ctx context.Context) error //perm:admin
MarketRetryPublishDeal(ctx context.Context, propcid cid.Cid) error //perm:admin
// DagstoreListShards returns information about all shards known to the
// DAG store. Only available on nodes running the markets subsystem.
DagstoreListShards(ctx context.Context) ([]DagstoreShardInfo, error) //perm:read
// DagstoreInitializeShard initializes an uninitialized shard.
//
// Initialization consists of fetching the shard's data (deal payload) from
// the storage subsystem, generating an index, and persisting the index
// to facilitate later retrievals, and/or to publish to external sources.
//
// This operation is intended to complement the initial migration. The
// migration registers a shard for every unique piece CID, with lazy
// initialization. Thus, shards are not initialized immediately to avoid
// IO activity competing with proving. Instead, shard are initialized
// when first accessed. This method forces the initialization of a shard by
// accessing it and immediately releasing it. This is useful to warm up the
// cache to facilitate subsequent retrievals, and to generate the indexes
// to publish them externally.
//
// This operation fails if the shard is not in ShardStateNew state.
// It blocks until initialization finishes.
DagstoreInitializeShard(ctx context.Context, key string) error //perm:write
// DagstoreRecoverShard attempts to recover a failed shard.
//
// This operation fails if the shard is not in ShardStateErrored state.
// It blocks until recovery finishes. If recovery failed, it returns the
// error.
DagstoreRecoverShard(ctx context.Context, key string) error //perm:write
// DagstoreInitializeAll initializes all uninitialized shards in bulk,
// according to the policy passed in the parameters.
//
// It is recommended to set a maximum concurrency to avoid extreme
// IO pressure if the storage subsystem has a large amount of deals.
//
// It returns a stream of events to report progress.
DagstoreInitializeAll(ctx context.Context, params DagstoreInitializeAllParams) (<-chan DagstoreInitializeAllEvent, error) //perm:write
// DagstoreGC runs garbage collection on the DAG store.
DagstoreGC(ctx context.Context) ([]DagstoreShardResult, error) //perm:admin
// DagstoreRegisterShard registers a shard manually with dagstore with given pieceCID
DagstoreRegisterShard(ctx context.Context, key string) error //perm:admin
// IndexerAnnounceDeal informs indexer nodes that a new deal was received,
// so they can download its index
IndexerAnnounceDeal(ctx context.Context, proposalCid cid.Cid) error //perm:admin
// IndexerAnnounceAllDeals informs the indexer nodes aboutall active deals.
IndexerAnnounceAllDeals(ctx context.Context) error //perm:admin
// DagstoreLookupPieces returns information about shards that contain the given CID.
DagstoreLookupPieces(ctx context.Context, cid cid.Cid) ([]DagstoreShardInfo, error) //perm:admin
// RuntimeSubsystems returns the subsystems that are enabled
// in this instance.
RuntimeSubsystems(ctx context.Context) (MinerSubsystems, error) //perm:read
DealsImportData(ctx context.Context, dealPropCid cid.Cid, file string) error //perm:admin
DealsList(ctx context.Context) ([]MarketDeal, error) //perm:admin
DealsList(ctx context.Context) ([]*MarketDeal, error) //perm:admin
DealsConsiderOnlineStorageDeals(context.Context) (bool, error) //perm:admin
DealsSetConsiderOnlineStorageDeals(context.Context, bool) error //perm:admin
DealsConsiderOnlineRetrievalDeals(context.Context) (bool, error) //perm:admin
@@ -187,8 +309,6 @@ type StorageMiner interface {
DealsConsiderUnverifiedStorageDeals(context.Context) (bool, error) //perm:admin
DealsSetConsiderUnverifiedStorageDeals(context.Context, bool) error //perm:admin
StorageAddLocal(ctx context.Context, path string) error //perm:admin
PiecesListPieces(ctx context.Context) ([]cid.Cid, error) //perm:read
PiecesListCidInfos(ctx context.Context) ([]cid.Cid, error) //perm:read
PiecesGetPieceInfo(ctx context.Context, pieceCid cid.Cid) (*piecestore.PieceInfo, error) //perm:read
@@ -200,13 +320,17 @@ type StorageMiner interface {
// the path specified when calling CreateBackup is within the base path
CreateBackup(ctx context.Context, fpath string) error //perm:admin
CheckProvable(ctx context.Context, pp abi.RegisteredPoStProof, sectors []storage.SectorRef, expensive bool) (map[abi.SectorNumber]string, error) //perm:admin
CheckProvable(ctx context.Context, pp abi.RegisteredPoStProof, sectors []storiface.SectorRef, expensive bool) (map[abi.SectorNumber]string, error) //perm:admin
ComputeProof(ctx context.Context, ssi []builtin.SectorInfo, rand abi.PoStRandomness) ([]builtin.PoStProof, error) //perm:read
ComputeProof(ctx context.Context, ssi []builtin.ExtendedSectorInfo, rand abi.PoStRandomness, poStEpoch abi.ChainEpoch, nv abinetwork.Version) ([]builtin.PoStProof, error) //perm:read
// RecoverFault can be used to declare recoveries manually. It sends messages
// to the miner actor with details of recovered sectors and returns the CID of messages. It honors the
// maxPartitionsPerRecoveryMessage from the config
RecoverFault(ctx context.Context, sectors []abi.SectorNumber) ([]cid.Cid, error) //perm:admin
}
var _ storiface.WorkerReturn = *new(StorageMiner)
var _ stores.SectorIndex = *new(StorageMiner)
type SealRes struct {
Err string
@@ -224,19 +348,26 @@ type SectorLog struct {
Message string
}
type SectorPiece struct {
Piece abi.PieceInfo
DealInfo *PieceDealInfo // nil for pieces which do not appear in deals (e.g. filler pieces)
}
type SectorInfo struct {
SectorID abi.SectorNumber
State SectorState
CommD *cid.Cid
CommR *cid.Cid
Proof []byte
Deals []abi.DealID
Ticket SealTicket
Seed SealSeed
PreCommitMsg *cid.Cid
CommitMsg *cid.Cid
Retries uint64
ToUpgrade bool
SectorID abi.SectorNumber
State SectorState
CommD *cid.Cid
CommR *cid.Cid
Proof []byte
Deals []abi.DealID
Pieces []SectorPiece
Ticket SealTicket
Seed SealSeed
PreCommitMsg *cid.Cid
CommitMsg *cid.Cid
Retries uint64
ToUpgrade bool
ReplicaUpdateMessage *cid.Cid
LastErr string
@@ -336,3 +467,150 @@ type DealSchedule struct {
StartEpoch abi.ChainEpoch
EndEpoch abi.ChainEpoch
}
// DagstoreShardInfo is the serialized form of dagstore.DagstoreShardInfo that
// we expose through JSON-RPC to avoid clients having to depend on the
// dagstore lib.
type DagstoreShardInfo struct {
Key string
State string
Error string
}
// DagstoreShardResult enumerates results per shard.
type DagstoreShardResult struct {
Key string
Success bool
Error string
}
type DagstoreInitializeAllParams struct {
MaxConcurrency int
IncludeSealed bool
}
// DagstoreInitializeAllEvent represents an initialization event.
type DagstoreInitializeAllEvent struct {
Key string
Event string // "start", "end"
Success bool
Error string
Total int
Current int
}
type NumAssignerMeta struct {
Reserved bitfield.BitField
Allocated bitfield.BitField
// ChainAllocated+Reserved+Allocated
InUse bitfield.BitField
Next abi.SectorNumber
}
type RemoteSectorMeta struct {
////////
// BASIC SECTOR INFORMATION
// State specifies the first state the sector will enter after being imported
// Must be one of the following states:
// * Packing
// * GetTicket
// * PreCommitting
// * SubmitCommit
// * Proving/Available
State SectorState
Sector abi.SectorID
Type abi.RegisteredSealProof
////////
// SEALING METADATA
// (allows lotus to continue the sealing process)
// Required in Packing and later
Pieces []SectorPiece // todo better type?
// Required in PreCommitting and later
TicketValue abi.SealRandomness
TicketEpoch abi.ChainEpoch
PreCommit1Out storiface.PreCommit1Out // todo specify better
CommD *cid.Cid
CommR *cid.Cid // SectorKey
// Required in SubmitCommit and later
PreCommitInfo *miner.SectorPreCommitInfo
PreCommitDeposit *big.Int
PreCommitMessage *cid.Cid
PreCommitTipSet types.TipSetKey
SeedValue abi.InteractiveSealRandomness
SeedEpoch abi.ChainEpoch
CommitProof []byte
// Required in Proving/Available
CommitMessage *cid.Cid
// Optional sector metadata to import
Log []SectorLog
////////
// SECTOR DATA SOURCE
// Sector urls - lotus will use those for fetching files into local storage
// Required in all states
DataUnsealed *storiface.SectorLocation
// Required in PreCommitting and later
DataSealed *storiface.SectorLocation
DataCache *storiface.SectorLocation
////////
// SEALING SERVICE HOOKS
// URL
// RemoteCommit1Endpoint is an URL of POST endpoint which lotus will call requesting Commit1 (seal_commit_phase1)
// request body will be json-serialized RemoteCommit1Params struct
RemoteCommit1Endpoint string
// RemoteCommit2Endpoint is an URL of POST endpoint which lotus will call requesting Commit2 (seal_commit_phase2)
// request body will be json-serialized RemoteCommit2Params struct
RemoteCommit2Endpoint string
// RemoteSealingDoneEndpoint is called after the sector exists the sealing pipeline
// request body will be json-serialized RemoteSealingDoneParams struct
RemoteSealingDoneEndpoint string
}
type RemoteCommit1Params struct {
Ticket, Seed []byte
Unsealed cid.Cid
Sealed cid.Cid
ProofType abi.RegisteredSealProof
}
type RemoteCommit2Params struct {
Sector abi.SectorID
ProofType abi.RegisteredSealProof
// todo spec better
Commit1Out storiface.Commit1Out
}
type RemoteSealingDoneParams struct {
// Successful is true if the sector has entered state considered as "successfully sealed"
Successful bool
// State is the state the sector has entered
// For example "Proving" / "Removing"
State string
// Optional commit message CID
CommitMessage *cid.Cid
}
+24 -1
View File
@@ -1,3 +1,4 @@
// stm: #unit
package api
import (
@@ -11,6 +12,9 @@ import (
"testing"
"github.com/stretchr/testify/require"
"golang.org/x/xerrors"
"github.com/filecoin-project/go-jsonrpc"
)
func goCmd() string {
@@ -26,6 +30,7 @@ func goCmd() string {
}
func TestDoesntDependOnFFI(t *testing.T) {
//stm: @OTHER_IMPLEMENTATION_FFI_DEPENDENCE_001
deps, err := exec.Command(goCmd(), "list", "-deps", "github.com/filecoin-project/lotus/api").Output()
if err != nil {
t.Fatal(err)
@@ -38,6 +43,7 @@ func TestDoesntDependOnFFI(t *testing.T) {
}
func TestDoesntDependOnBuild(t *testing.T) {
//stm: @OTHER_IMPLEMENTATION_FFI_DEPENDENCE_002
deps, err := exec.Command(goCmd(), "list", "-deps", "github.com/filecoin-project/lotus/api").Output()
if err != nil {
t.Fatal(err)
@@ -50,6 +56,7 @@ func TestDoesntDependOnBuild(t *testing.T) {
}
func TestReturnTypes(t *testing.T) {
//stm: @OTHER_IMPLEMENTATION_001
errType := reflect.TypeOf(new(error)).Elem()
bareIface := reflect.TypeOf(new(interface{})).Elem()
jmarsh := reflect.TypeOf(new(json.Marshaler)).Elem()
@@ -76,7 +83,7 @@ func TestReturnTypes(t *testing.T) {
seen[typ] = struct{}{}
if typ.Kind() == reflect.Interface && typ != bareIface && !typ.Implements(jmarsh) {
t.Error("methods can't return interfaces", m.Name)
t.Error("methods can't return interfaces or struct types not implementing json.Marshaller", m.Name)
}
switch typ.Kind() {
@@ -115,7 +122,23 @@ func TestReturnTypes(t *testing.T) {
}
func TestPermTags(t *testing.T) {
//stm: @OTHER_IMPLEMENTATION_PERM_TAGS_001
_ = PermissionedFullAPI(&FullNodeStruct{})
_ = PermissionedStorMinerAPI(&StorageMinerStruct{})
_ = PermissionedWorkerAPI(&WorkerStruct{})
}
func TestRetryErrorIsInTrue(t *testing.T) {
errorsToRetry := []error{&jsonrpc.RPCConnectionError{}}
require.True(t, ErrorIsIn(&jsonrpc.RPCConnectionError{}, errorsToRetry))
}
func TestRetryErrorIsInFalse(t *testing.T) {
errorsToRetry := []error{&jsonrpc.RPCConnectionError{}}
require.False(t, ErrorIsIn(xerrors.Errorf("random error"), errorsToRetry))
}
func TestRetryWrappedErrorIsInTrue(t *testing.T) {
errorsToRetry := []error{&jsonrpc.RPCConnectionError{}}
require.True(t, ErrorIsIn(xerrors.Errorf("wrapped: %w", &jsonrpc.RPCConnectionError{}), errorsToRetry))
}
+34 -16
View File
@@ -7,10 +7,10 @@ import (
"github.com/ipfs/go-cid"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/lotus/extern/sector-storage/sealtasks"
"github.com/filecoin-project/lotus/extern/sector-storage/stores"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface"
"github.com/filecoin-project/specs-storage/storage"
"github.com/filecoin-project/go-state-types/proof"
"github.com/filecoin-project/lotus/storage/sealer/sealtasks"
"github.com/filecoin-project/lotus/storage/sealer/storiface"
)
// MODIFYING THE API INTERFACE
@@ -29,20 +29,30 @@ type Worker interface {
// TaskType -> Weight
TaskTypes(context.Context) (map[sealtasks.TaskType]struct{}, error) //perm:admin
Paths(context.Context) ([]stores.StoragePath, error) //perm:admin
Paths(context.Context) ([]storiface.StoragePath, error) //perm:admin
Info(context.Context) (storiface.WorkerInfo, error) //perm:admin
// storiface.WorkerCalls
AddPiece(ctx context.Context, sector storage.SectorRef, pieceSizes []abi.UnpaddedPieceSize, newPieceSize abi.UnpaddedPieceSize, pieceData storage.Data) (storiface.CallID, error) //perm:admin
SealPreCommit1(ctx context.Context, sector storage.SectorRef, ticket abi.SealRandomness, pieces []abi.PieceInfo) (storiface.CallID, error) //perm:admin
SealPreCommit2(ctx context.Context, sector storage.SectorRef, pc1o storage.PreCommit1Out) (storiface.CallID, error) //perm:admin
SealCommit1(ctx context.Context, sector storage.SectorRef, ticket abi.SealRandomness, seed abi.InteractiveSealRandomness, pieces []abi.PieceInfo, cids storage.SectorCids) (storiface.CallID, error) //perm:admin
SealCommit2(ctx context.Context, sector storage.SectorRef, c1o storage.Commit1Out) (storiface.CallID, error) //perm:admin
FinalizeSector(ctx context.Context, sector storage.SectorRef, keepUnsealed []storage.Range) (storiface.CallID, error) //perm:admin
ReleaseUnsealed(ctx context.Context, sector storage.SectorRef, safeToFree []storage.Range) (storiface.CallID, error) //perm:admin
MoveStorage(ctx context.Context, sector storage.SectorRef, types storiface.SectorFileType) (storiface.CallID, error) //perm:admin
UnsealPiece(context.Context, storage.SectorRef, storiface.UnpaddedByteIndex, abi.UnpaddedPieceSize, abi.SealRandomness, cid.Cid) (storiface.CallID, error) //perm:admin
Fetch(context.Context, storage.SectorRef, storiface.SectorFileType, storiface.PathType, storiface.AcquireMode) (storiface.CallID, error) //perm:admin
DataCid(ctx context.Context, pieceSize abi.UnpaddedPieceSize, pieceData storiface.Data) (storiface.CallID, error) //perm:admin
AddPiece(ctx context.Context, sector storiface.SectorRef, pieceSizes []abi.UnpaddedPieceSize, newPieceSize abi.UnpaddedPieceSize, pieceData storiface.Data) (storiface.CallID, error) //perm:admin
SealPreCommit1(ctx context.Context, sector storiface.SectorRef, ticket abi.SealRandomness, pieces []abi.PieceInfo) (storiface.CallID, error) //perm:admin
SealPreCommit2(ctx context.Context, sector storiface.SectorRef, pc1o storiface.PreCommit1Out) (storiface.CallID, error) //perm:admin
SealCommit1(ctx context.Context, sector storiface.SectorRef, ticket abi.SealRandomness, seed abi.InteractiveSealRandomness, pieces []abi.PieceInfo, cids storiface.SectorCids) (storiface.CallID, error) //perm:admin
SealCommit2(ctx context.Context, sector storiface.SectorRef, c1o storiface.Commit1Out) (storiface.CallID, error) //perm:admin
FinalizeSector(ctx context.Context, sector storiface.SectorRef, keepUnsealed []storiface.Range) (storiface.CallID, error) //perm:admin
FinalizeReplicaUpdate(ctx context.Context, sector storiface.SectorRef, keepUnsealed []storiface.Range) (storiface.CallID, error) //perm:admin
ReplicaUpdate(ctx context.Context, sector storiface.SectorRef, pieces []abi.PieceInfo) (storiface.CallID, error) //perm:admin
ProveReplicaUpdate1(ctx context.Context, sector storiface.SectorRef, sectorKey, newSealed, newUnsealed cid.Cid) (storiface.CallID, error) //perm:admin
ProveReplicaUpdate2(ctx context.Context, sector storiface.SectorRef, sectorKey, newSealed, newUnsealed cid.Cid, vanillaProofs storiface.ReplicaVanillaProofs) (storiface.CallID, error) //perm:admin
GenerateSectorKeyFromData(ctx context.Context, sector storiface.SectorRef, commD cid.Cid) (storiface.CallID, error) //perm:admin
ReleaseUnsealed(ctx context.Context, sector storiface.SectorRef, safeToFree []storiface.Range) (storiface.CallID, error) //perm:admin
MoveStorage(ctx context.Context, sector storiface.SectorRef, types storiface.SectorFileType) (storiface.CallID, error) //perm:admin
UnsealPiece(context.Context, storiface.SectorRef, storiface.UnpaddedByteIndex, abi.UnpaddedPieceSize, abi.SealRandomness, cid.Cid) (storiface.CallID, error) //perm:admin
Fetch(context.Context, storiface.SectorRef, storiface.SectorFileType, storiface.PathType, storiface.AcquireMode) (storiface.CallID, error) //perm:admin
DownloadSectorData(ctx context.Context, sector storiface.SectorRef, finalized bool, src map[storiface.SectorFileType]storiface.SectorLocation) (storiface.CallID, error) //perm:admin
GenerateWinningPoSt(ctx context.Context, ppt abi.RegisteredPoStProof, mid abi.ActorID, sectors []storiface.PostSectorChallenge, randomness abi.PoStRandomness) ([]proof.PoStProof, error) //perm:admin
GenerateWindowPoSt(ctx context.Context, ppt abi.RegisteredPoStProof, mid abi.ActorID, sectors []storiface.PostSectorChallenge, partitionIdx int, randomness abi.PoStRandomness) (storiface.WindowPoStResult, error) //perm:admin
TaskDisable(ctx context.Context, tt sealtasks.TaskType) error //perm:admin
TaskEnable(ctx context.Context, tt sealtasks.TaskType) error //perm:admin
@@ -50,7 +60,11 @@ type Worker interface {
// Storage / Other
Remove(ctx context.Context, sector abi.SectorID) error //perm:admin
StorageAddLocal(ctx context.Context, path string) error //perm:admin
StorageLocal(ctx context.Context) (map[storiface.ID]string, error) //perm:admin
StorageAddLocal(ctx context.Context, path string) error //perm:admin
StorageDetachLocal(ctx context.Context, path string) error //perm:admin
StorageDetachAll(ctx context.Context) error //perm:admin
StorageRedeclareLocal(ctx context.Context, id *storiface.ID, dropMissing bool) error //perm:admin
// SetEnabled marks the worker as enabled/disabled. Not that this setting
// may take a few seconds to propagate to task scheduler
@@ -67,6 +81,10 @@ type Worker interface {
// Like ProcessSession, but returns an error when worker is disabled
Session(context.Context) (uuid.UUID, error) //perm:admin
// Trigger shutdown
Shutdown(context.Context) error //perm:admin
}
var _ storiface.WorkerCalls = *new(Worker)
+297 -129
View File
File diff suppressed because it is too large Load Diff
+8 -5
View File
@@ -19,7 +19,7 @@ import (
func NewCommonRPCV0(ctx context.Context, addr string, requestHeader http.Header) (api.CommonNet, jsonrpc.ClientCloser, error) {
var res v0api.CommonNetStruct
closer, err := jsonrpc.NewMergeClient(ctx, addr, "Filecoin",
api.GetInternalStructs(&res), requestHeader)
api.GetInternalStructs(&res), requestHeader, jsonrpc.WithErrors(api.RPCErrors))
return &res, closer, err
}
@@ -29,7 +29,7 @@ func NewFullNodeRPCV0(ctx context.Context, addr string, requestHeader http.Heade
var res v0api.FullNodeStruct
closer, err := jsonrpc.NewMergeClient(ctx, addr, "Filecoin",
api.GetInternalStructs(&res), requestHeader)
api.GetInternalStructs(&res), requestHeader, jsonrpc.WithErrors(api.RPCErrors))
return &res, closer, err
}
@@ -38,7 +38,7 @@ func NewFullNodeRPCV0(ctx context.Context, addr string, requestHeader http.Heade
func NewFullNodeRPCV1(ctx context.Context, addr string, requestHeader http.Header) (api.FullNode, jsonrpc.ClientCloser, error) {
var res v1api.FullNodeStruct
closer, err := jsonrpc.NewMergeClient(ctx, addr, "Filecoin",
api.GetInternalStructs(&res), requestHeader)
api.GetInternalStructs(&res), requestHeader, jsonrpc.WithErrors(api.RPCErrors))
return &res, closer, err
}
@@ -72,6 +72,7 @@ func NewStorageMinerRPCV0(ctx context.Context, addr string, requestHeader http.H
api.GetInternalStructs(&res), requestHeader,
append([]jsonrpc.Option{
rpcenc.ReaderParamEncoder(pushUrl),
jsonrpc.WithErrors(api.RPCErrors),
}, opts...)...)
return &res, closer, err
@@ -90,6 +91,7 @@ func NewWorkerRPCV0(ctx context.Context, addr string, requestHeader http.Header)
rpcenc.ReaderParamEncoder(pushUrl),
jsonrpc.WithNoReconnect(),
jsonrpc.WithTimeout(30*time.Second),
jsonrpc.WithErrors(api.RPCErrors),
)
return &res, closer, err
@@ -101,7 +103,7 @@ func NewGatewayRPCV1(ctx context.Context, addr string, requestHeader http.Header
closer, err := jsonrpc.NewMergeClient(ctx, addr, "Filecoin",
api.GetInternalStructs(&res),
requestHeader,
opts...,
append(opts, jsonrpc.WithErrors(api.RPCErrors))...,
)
return &res, closer, err
@@ -113,7 +115,7 @@ func NewGatewayRPCV0(ctx context.Context, addr string, requestHeader http.Header
closer, err := jsonrpc.NewMergeClient(ctx, addr, "Filecoin",
api.GetInternalStructs(&res),
requestHeader,
opts...,
append(opts, jsonrpc.WithErrors(api.RPCErrors))...,
)
return &res, closer, err
@@ -124,6 +126,7 @@ func NewWalletRPCV0(ctx context.Context, addr string, requestHeader http.Header)
closer, err := jsonrpc.NewMergeClient(ctx, addr, "Filecoin",
api.GetInternalStructs(&res),
requestHeader,
jsonrpc.WithErrors(api.RPCErrors),
)
return &res, closer, err
-1
View File
@@ -8,7 +8,6 @@ import (
"os"
"github.com/filecoin-project/lotus/api/docgen"
docgen_openrpc "github.com/filecoin-project/lotus/api/docgen-openrpc"
)
+3 -2
View File
@@ -8,10 +8,11 @@ import (
"github.com/alecthomas/jsonschema"
go_openrpc_reflect "github.com/etclabscore/go-openrpc-reflect"
"github.com/filecoin-project/lotus/api/docgen"
"github.com/filecoin-project/lotus/build"
"github.com/ipfs/go-cid"
meta_schema "github.com/open-rpc/meta-schema"
"github.com/filecoin-project/lotus/api/docgen"
"github.com/filecoin-project/lotus/build"
)
// schemaDictEntry represents a type association passed to the jsonschema reflector.
+121 -27
View File
@@ -1,35 +1,38 @@
package docgen
import (
"encoding/json"
"fmt"
"go/ast"
"go/parser"
"go/token"
"net/http"
"path/filepath"
"reflect"
"strings"
"time"
"unicode"
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-bitfield"
"github.com/google/uuid"
blocks "github.com/ipfs/go-block-format"
"github.com/ipfs/go-cid"
"github.com/ipfs/go-filestore"
"github.com/libp2p/go-libp2p-core/metrics"
"github.com/libp2p/go-libp2p-core/network"
"github.com/libp2p/go-libp2p-core/peer"
"github.com/libp2p/go-libp2p-core/protocol"
"github.com/ipfs/go-graphsync"
textselector "github.com/ipld/go-ipld-selector-text-lite"
pubsub "github.com/libp2p/go-libp2p-pubsub"
"github.com/libp2p/go-libp2p/core/metrics"
"github.com/libp2p/go-libp2p/core/network"
"github.com/libp2p/go-libp2p/core/peer"
"github.com/libp2p/go-libp2p/core/protocol"
"github.com/multiformats/go-multiaddr"
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-bitfield"
datatransfer "github.com/filecoin-project/go-data-transfer"
filestore2 "github.com/filecoin-project/go-fil-markets/filestore"
"github.com/filecoin-project/go-fil-markets/filestore"
"github.com/filecoin-project/go-fil-markets/retrievalmarket"
"github.com/filecoin-project/go-jsonrpc/auth"
"github.com/filecoin-project/go-multistore"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
"github.com/filecoin-project/go-state-types/crypto"
"github.com/filecoin-project/go-state-types/exitcode"
@@ -38,11 +41,11 @@ import (
"github.com/filecoin-project/lotus/api/v0api"
"github.com/filecoin-project/lotus/build"
"github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/extern/sector-storage/sealtasks"
"github.com/filecoin-project/lotus/extern/sector-storage/stores"
"github.com/filecoin-project/lotus/extern/sector-storage/storiface"
sealing "github.com/filecoin-project/lotus/extern/storage-sealing"
"github.com/filecoin-project/lotus/node/modules/dtypes"
"github.com/filecoin-project/lotus/node/repo/imports"
sealing "github.com/filecoin-project/lotus/storage/pipeline"
"github.com/filecoin-project/lotus/storage/sealer/sealtasks"
"github.com/filecoin-project/lotus/storage/sealer/storiface"
)
var ExampleValues = map[reflect.Type]interface{}{
@@ -89,7 +92,13 @@ func init() {
addExample(pid)
addExample(&pid)
multistoreIDExample := multistore.StoreID(50)
storeIDExample := imports.ID(50)
textSelExample := textselector.Expression("Links/21/Hash/Links/42/Hash")
apiSelExample := api.Selector("Links/21/Hash/Links/42/Hash")
clientEvent := retrievalmarket.ClientEventDealAccepted
block := blocks.Block(&blocks.BasicBlock{})
ExampleValues[reflect.TypeOf(&block).Elem()] = block
addExample(bitfield.NewFromSet([]uint64{5}))
addExample(abi.RegisteredSealProof_StackedDrg32GiBV1_1)
@@ -108,7 +117,6 @@ func init() {
addExample(abi.UnpaddedPieceSize(1024))
addExample(abi.UnpaddedPieceSize(1024).Padded())
addExample(abi.DealID(5432))
addExample(filestore.StatusFileChanged)
addExample(abi.SectorNumber(9))
addExample(abi.SectorSize(32 * 1024 * 1024 * 1024))
addExample(api.MpoolChange(0))
@@ -118,14 +126,27 @@ func init() {
addExample(api.FullAPIVersion1)
addExample(api.PCHInbound)
addExample(time.Minute)
addExample(graphsync.NewRequestID())
addExample(datatransfer.TransferID(3))
addExample(datatransfer.Ongoing)
addExample(multistoreIDExample)
addExample(&multistoreIDExample)
addExample(storeIDExample)
addExample(&storeIDExample)
addExample(clientEvent)
addExample(&clientEvent)
addExample(retrievalmarket.ClientEventDealAccepted)
addExample(retrievalmarket.DealStatusNew)
addExample(&textSelExample)
addExample(&apiSelExample)
addExample(network.ReachabilityPublic)
addExample(build.NewestNetworkVersion)
addExample(build.TestNetworkVersion)
allocationId := verifreg.AllocationId(0)
addExample(allocationId)
addExample(&allocationId)
addExample(map[verifreg.AllocationId]verifreg.Allocation{})
claimId := verifreg.ClaimId(0)
addExample(claimId)
addExample(&claimId)
addExample(map[verifreg.ClaimId]verifreg.Claim{})
addExample(map[string]int{"name": 42})
addExample(map[string]time.Time{"name": time.Unix(1615243938, 0).UTC()})
addExample(&types.ExecutionTrace{
@@ -138,6 +159,10 @@ func init() {
addExample(map[string]api.MarketDeal{
"t026363": ExampleValue("init", reflect.TypeOf(api.MarketDeal{}), nil).(api.MarketDeal),
})
addExample(map[string]*api.MarketDeal{
"t026363": ExampleValue("init", reflect.TypeOf(&api.MarketDeal{}), nil).(*api.MarketDeal),
})
addExample(map[string]api.MarketBalance{
"t026363": ExampleValue("init", reflect.TypeOf(api.MarketBalance{}), nil).(api.MarketBalance),
})
@@ -175,11 +200,12 @@ func init() {
ExampleValues[reflect.TypeOf(struct{ A multiaddr.Multiaddr }{}).Field(0).Type] = maddr
// miner specific
addExample(filestore2.Path(".lotusminer/fstmp123"))
si := multistore.StoreID(12)
addExample(filestore.Path(".lotusminer/fstmp123"))
si := uint64(12)
addExample(&si)
addExample(retrievalmarket.DealID(5))
addExample(abi.ActorID(1000))
addExample(map[string]cid.Cid{})
addExample(map[string][]api.SealedRef{
"98000": {
api.SealedRef{
@@ -190,10 +216,10 @@ func init() {
},
})
addExample(api.SectorState(sealing.Proving))
addExample(stores.ID("76f1988b-ef30-4d7e-b3ec-9a627f4ba5a8"))
addExample(storiface.ID("76f1988b-ef30-4d7e-b3ec-9a627f4ba5a8"))
addExample(storiface.FTUnsealed)
addExample(storiface.PathSealing)
addExample(map[stores.ID][]stores.Decl{
addExample(map[storiface.ID][]storiface.Decl{
"76f1988b-ef30-4d7e-b3ec-9a627f4ba5a8": {
{
SectorID: abi.SectorID{Miner: 1000, Number: 100},
@@ -201,7 +227,7 @@ func init() {
},
},
})
addExample(map[stores.ID]string{
addExample(map[storiface.ID]string{
"76f1988b-ef30-4d7e-b3ec-9a627f4ba5a8": "/data/path",
})
addExample(map[uuid.UUID][]storiface.WorkerJob{
@@ -225,16 +251,18 @@ func init() {
Hostname: "host",
Resources: storiface.WorkerResources{
MemPhysical: 256 << 30,
MemUsed: 2 << 30,
MemSwap: 120 << 30,
MemReserved: 2 << 30,
MemSwapUsed: 2 << 30,
CPUs: 64,
GPUs: []string{"aGPU 1337"},
Resources: storiface.ResourceTable,
},
},
Enabled: true,
MemUsedMin: 0,
MemUsedMax: 0,
GpuUsed: false,
GpuUsed: 0,
CpuUse: 0,
},
})
@@ -242,10 +270,20 @@ func init() {
addExample(map[abi.SectorNumber]string{
123: "can't acquire read lock",
})
addExample(json.RawMessage(`"json raw message"`))
addExample(map[api.SectorState]int{
api.SectorState(sealing.Proving): 120,
})
addExample([]abi.SectorNumber{123, 124})
addExample([]storiface.SectorLock{
{
Sector: abi.SectorID{Number: 123, Miner: 1000},
Write: [storiface.FileTypes]uint{0, 0, 1},
Read: [storiface.FileTypes]uint{2, 3, 0},
},
})
storifaceid := storiface.ID("1399aa04-2625-44b1-bad4-bd07b59b22c4")
addExample(&storifaceid)
// worker specific
addExample(storiface.AcquireMove)
@@ -271,6 +309,58 @@ func init() {
api.SubsystemSectorStorage,
api.SubsystemMarkets,
})
addExample(api.DagstoreShardResult{
Key: "baga6ea4seaqecmtz7iak33dsfshi627abz4i4665dfuzr3qfs4bmad6dx3iigdq",
Error: "<error>",
})
addExample(api.DagstoreShardInfo{
Key: "baga6ea4seaqecmtz7iak33dsfshi627abz4i4665dfuzr3qfs4bmad6dx3iigdq",
State: "ShardStateAvailable",
Error: "<error>",
})
addExample(storiface.ResourceTable)
addExample(network.ScopeStat{
Memory: 123,
NumStreamsInbound: 1,
NumStreamsOutbound: 2,
NumConnsInbound: 3,
NumConnsOutbound: 4,
NumFD: 5,
})
addExample(map[string]network.ScopeStat{
"abc": {
Memory: 123,
NumStreamsInbound: 1,
NumStreamsOutbound: 2,
NumConnsInbound: 3,
NumConnsOutbound: 4,
NumFD: 5,
}})
addExample(api.NetLimit{
Memory: 123,
StreamsInbound: 1,
StreamsOutbound: 2,
Streams: 3,
ConnsInbound: 3,
ConnsOutbound: 4,
Conns: 4,
FD: 5,
})
addExample(map[string]bitfield.BitField{
"": bitfield.NewFromSet([]uint64{5, 6, 7, 10}),
})
addExample(http.Header{
"Authorization": []string{"Bearer ey.."},
})
addExample(map[storiface.SectorFileType]storiface.SectorLocation{
storiface.FTSealed: {
Local: false,
URL: "https://example.com/sealingservice/sectors/s-f0123-12345",
Headers: nil,
},
})
}
func GetAPIType(name, pkg string) (i interface{}, t reflect.Type, permStruct []reflect.Type) {
@@ -294,6 +384,10 @@ func GetAPIType(name, pkg string) (i interface{}, t reflect.Type, permStruct []r
i = &api.WorkerStruct{}
t = reflect.TypeOf(new(struct{ api.Worker })).Elem()
permStruct = append(permStruct, reflect.TypeOf(api.WorkerStruct{}.Internal))
case "Gateway":
i = &api.GatewayStruct{}
t = reflect.TypeOf(new(struct{ api.Gateway })).Elem()
permStruct = append(permStruct, reflect.TypeOf(api.GatewayStruct{}.Internal))
default:
panic("unknown type")
}
@@ -321,7 +415,7 @@ func ExampleValue(method string, t, parent reflect.Type) interface{} {
switch t.Kind() {
case reflect.Slice:
out := reflect.New(t).Elem()
reflect.Append(out, reflect.ValueOf(ExampleValue(method, t.Elem(), t)))
out = reflect.Append(out, reflect.ValueOf(ExampleValue(method, t.Elem(), t)))
return out.Interface()
case reflect.Chan:
return ExampleValue(method, t.Elem(), nil)
+486 -97
View File
@@ -6,35 +6,40 @@ package mocks
import (
context "context"
json "encoding/json"
reflect "reflect"
time "time"
gomock "github.com/golang/mock/gomock"
uuid "github.com/google/uuid"
blocks "github.com/ipfs/go-block-format"
cid "github.com/ipfs/go-cid"
metrics "github.com/libp2p/go-libp2p/core/metrics"
network0 "github.com/libp2p/go-libp2p/core/network"
peer "github.com/libp2p/go-libp2p/core/peer"
protocol "github.com/libp2p/go-libp2p/core/protocol"
address "github.com/filecoin-project/go-address"
bitfield "github.com/filecoin-project/go-bitfield"
datatransfer "github.com/filecoin-project/go-data-transfer"
retrievalmarket "github.com/filecoin-project/go-fil-markets/retrievalmarket"
storagemarket "github.com/filecoin-project/go-fil-markets/storagemarket"
auth "github.com/filecoin-project/go-jsonrpc/auth"
multistore "github.com/filecoin-project/go-multistore"
abi "github.com/filecoin-project/go-state-types/abi"
big "github.com/filecoin-project/go-state-types/big"
paych "github.com/filecoin-project/go-state-types/builtin/v8/paych"
miner "github.com/filecoin-project/go-state-types/builtin/v9/miner"
verifreg "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
crypto "github.com/filecoin-project/go-state-types/crypto"
dline "github.com/filecoin-project/go-state-types/dline"
network "github.com/filecoin-project/go-state-types/network"
api "github.com/filecoin-project/lotus/api"
apitypes "github.com/filecoin-project/lotus/api/types"
miner "github.com/filecoin-project/lotus/chain/actors/builtin/miner"
miner0 "github.com/filecoin-project/lotus/chain/actors/builtin/miner"
types "github.com/filecoin-project/lotus/chain/types"
marketevents "github.com/filecoin-project/lotus/markets/loggers"
alerting "github.com/filecoin-project/lotus/journal/alerting"
dtypes "github.com/filecoin-project/lotus/node/modules/dtypes"
miner0 "github.com/filecoin-project/specs-actors/actors/builtin/miner"
paych "github.com/filecoin-project/specs-actors/actors/builtin/paych"
gomock "github.com/golang/mock/gomock"
uuid "github.com/google/uuid"
cid "github.com/ipfs/go-cid"
metrics "github.com/libp2p/go-libp2p-core/metrics"
network0 "github.com/libp2p/go-libp2p-core/network"
peer "github.com/libp2p/go-libp2p-core/peer"
protocol "github.com/libp2p/go-libp2p-core/protocol"
imports "github.com/filecoin-project/lotus/node/repo/imports"
)
// MockFullNode is a mock of FullNode interface.
@@ -90,21 +95,6 @@ func (mr *MockFullNodeMockRecorder) AuthVerify(arg0, arg1 interface{}) *gomock.C
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthVerify", reflect.TypeOf((*MockFullNode)(nil).AuthVerify), arg0, arg1)
}
// BeaconGetEntry mocks base method.
func (m *MockFullNode) BeaconGetEntry(arg0 context.Context, arg1 abi.ChainEpoch) (*types.BeaconEntry, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "BeaconGetEntry", arg0, arg1)
ret0, _ := ret[0].(*types.BeaconEntry)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// BeaconGetEntry indicates an expected call of BeaconGetEntry.
func (mr *MockFullNodeMockRecorder) BeaconGetEntry(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BeaconGetEntry", reflect.TypeOf((*MockFullNode)(nil).BeaconGetEntry), arg0, arg1)
}
// ChainBlockstoreInfo mocks base method.
func (m *MockFullNode) ChainBlockstoreInfo(arg0 context.Context) (map[string]interface{}, error) {
m.ctrl.T.Helper()
@@ -298,36 +288,6 @@ func (mr *MockFullNodeMockRecorder) ChainGetPath(arg0, arg1, arg2 interface{}) *
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChainGetPath", reflect.TypeOf((*MockFullNode)(nil).ChainGetPath), arg0, arg1, arg2)
}
// ChainGetRandomnessFromBeacon mocks base method.
func (m *MockFullNode) ChainGetRandomnessFromBeacon(arg0 context.Context, arg1 types.TipSetKey, arg2 crypto.DomainSeparationTag, arg3 abi.ChainEpoch, arg4 []byte) (abi.Randomness, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ChainGetRandomnessFromBeacon", arg0, arg1, arg2, arg3, arg4)
ret0, _ := ret[0].(abi.Randomness)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ChainGetRandomnessFromBeacon indicates an expected call of ChainGetRandomnessFromBeacon.
func (mr *MockFullNodeMockRecorder) ChainGetRandomnessFromBeacon(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChainGetRandomnessFromBeacon", reflect.TypeOf((*MockFullNode)(nil).ChainGetRandomnessFromBeacon), arg0, arg1, arg2, arg3, arg4)
}
// ChainGetRandomnessFromTickets mocks base method.
func (m *MockFullNode) ChainGetRandomnessFromTickets(arg0 context.Context, arg1 types.TipSetKey, arg2 crypto.DomainSeparationTag, arg3 abi.ChainEpoch, arg4 []byte) (abi.Randomness, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ChainGetRandomnessFromTickets", arg0, arg1, arg2, arg3, arg4)
ret0, _ := ret[0].(abi.Randomness)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ChainGetRandomnessFromTickets indicates an expected call of ChainGetRandomnessFromTickets.
func (mr *MockFullNodeMockRecorder) ChainGetRandomnessFromTickets(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChainGetRandomnessFromTickets", reflect.TypeOf((*MockFullNode)(nil).ChainGetRandomnessFromTickets), arg0, arg1, arg2, arg3, arg4)
}
// ChainGetTipSet mocks base method.
func (m *MockFullNode) ChainGetTipSet(arg0 context.Context, arg1 types.TipSetKey) (*types.TipSet, error) {
m.ctrl.T.Helper()
@@ -343,6 +303,21 @@ func (mr *MockFullNodeMockRecorder) ChainGetTipSet(arg0, arg1 interface{}) *gomo
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChainGetTipSet", reflect.TypeOf((*MockFullNode)(nil).ChainGetTipSet), arg0, arg1)
}
// ChainGetTipSetAfterHeight mocks base method.
func (m *MockFullNode) ChainGetTipSetAfterHeight(arg0 context.Context, arg1 abi.ChainEpoch, arg2 types.TipSetKey) (*types.TipSet, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ChainGetTipSetAfterHeight", arg0, arg1, arg2)
ret0, _ := ret[0].(*types.TipSet)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ChainGetTipSetAfterHeight indicates an expected call of ChainGetTipSetAfterHeight.
func (mr *MockFullNodeMockRecorder) ChainGetTipSetAfterHeight(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChainGetTipSetAfterHeight", reflect.TypeOf((*MockFullNode)(nil).ChainGetTipSetAfterHeight), arg0, arg1, arg2)
}
// ChainGetTipSetByHeight mocks base method.
func (m *MockFullNode) ChainGetTipSetByHeight(arg0 context.Context, arg1 abi.ChainEpoch, arg2 types.TipSetKey) (*types.TipSet, error) {
m.ctrl.T.Helper()
@@ -403,6 +378,34 @@ func (mr *MockFullNodeMockRecorder) ChainNotify(arg0 interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChainNotify", reflect.TypeOf((*MockFullNode)(nil).ChainNotify), arg0)
}
// ChainPrune mocks base method.
func (m *MockFullNode) ChainPrune(arg0 context.Context, arg1 api.PruneOpts) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ChainPrune", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// ChainPrune indicates an expected call of ChainPrune.
func (mr *MockFullNodeMockRecorder) ChainPrune(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChainPrune", reflect.TypeOf((*MockFullNode)(nil).ChainPrune), arg0, arg1)
}
// ChainPutObj mocks base method.
func (m *MockFullNode) ChainPutObj(arg0 context.Context, arg1 blocks.Block) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ChainPutObj", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// ChainPutObj indicates an expected call of ChainPutObj.
func (mr *MockFullNodeMockRecorder) ChainPutObj(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChainPutObj", reflect.TypeOf((*MockFullNode)(nil).ChainPutObj), arg0, arg1)
}
// ChainReadObj mocks base method.
func (m *MockFullNode) ChainReadObj(arg0 context.Context, arg1 cid.Cid) ([]byte, error) {
m.ctrl.T.Helper()
@@ -550,6 +553,20 @@ func (mr *MockFullNodeMockRecorder) ClientDealSize(arg0, arg1 interface{}) *gomo
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClientDealSize", reflect.TypeOf((*MockFullNode)(nil).ClientDealSize), arg0, arg1)
}
// ClientExport mocks base method.
func (m *MockFullNode) ClientExport(arg0 context.Context, arg1 api.ExportRef, arg2 api.FileRef) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ClientExport", arg0, arg1, arg2)
ret0, _ := ret[0].(error)
return ret0
}
// ClientExport indicates an expected call of ClientExport.
func (mr *MockFullNodeMockRecorder) ClientExport(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClientExport", reflect.TypeOf((*MockFullNode)(nil).ClientExport), arg0, arg1, arg2)
}
// ClientFindData mocks base method.
func (m *MockFullNode) ClientFindData(arg0 context.Context, arg1 cid.Cid, arg2 *cid.Cid) ([]api.QueryOffer, error) {
m.ctrl.T.Helper()
@@ -745,10 +762,10 @@ func (mr *MockFullNodeMockRecorder) ClientMinerQueryOffer(arg0, arg1, arg2, arg3
}
// ClientQueryAsk mocks base method.
func (m *MockFullNode) ClientQueryAsk(arg0 context.Context, arg1 peer.ID, arg2 address.Address) (*storagemarket.StorageAsk, error) {
func (m *MockFullNode) ClientQueryAsk(arg0 context.Context, arg1 peer.ID, arg2 address.Address) (*api.StorageAsk, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ClientQueryAsk", arg0, arg1, arg2)
ret0, _ := ret[0].(*storagemarket.StorageAsk)
ret0, _ := ret[0].(*api.StorageAsk)
ret1, _ := ret[1].(error)
return ret0, ret1
}
@@ -760,7 +777,7 @@ func (mr *MockFullNodeMockRecorder) ClientQueryAsk(arg0, arg1, arg2 interface{})
}
// ClientRemoveImport mocks base method.
func (m *MockFullNode) ClientRemoveImport(arg0 context.Context, arg1 multistore.StoreID) error {
func (m *MockFullNode) ClientRemoveImport(arg0 context.Context, arg1 imports.ID) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ClientRemoveImport", arg0, arg1)
ret0, _ := ret[0].(error)
@@ -788,17 +805,18 @@ func (mr *MockFullNodeMockRecorder) ClientRestartDataTransfer(arg0, arg1, arg2,
}
// ClientRetrieve mocks base method.
func (m *MockFullNode) ClientRetrieve(arg0 context.Context, arg1 api.RetrievalOrder, arg2 *api.FileRef) error {
func (m *MockFullNode) ClientRetrieve(arg0 context.Context, arg1 api.RetrievalOrder) (*api.RestrievalRes, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ClientRetrieve", arg0, arg1, arg2)
ret0, _ := ret[0].(error)
return ret0
ret := m.ctrl.Call(m, "ClientRetrieve", arg0, arg1)
ret0, _ := ret[0].(*api.RestrievalRes)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ClientRetrieve indicates an expected call of ClientRetrieve.
func (mr *MockFullNodeMockRecorder) ClientRetrieve(arg0, arg1, arg2 interface{}) *gomock.Call {
func (mr *MockFullNodeMockRecorder) ClientRetrieve(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClientRetrieve", reflect.TypeOf((*MockFullNode)(nil).ClientRetrieve), arg0, arg1, arg2)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClientRetrieve", reflect.TypeOf((*MockFullNode)(nil).ClientRetrieve), arg0, arg1)
}
// ClientRetrieveTryRestartInsufficientFunds mocks base method.
@@ -815,19 +833,18 @@ func (mr *MockFullNodeMockRecorder) ClientRetrieveTryRestartInsufficientFunds(ar
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClientRetrieveTryRestartInsufficientFunds", reflect.TypeOf((*MockFullNode)(nil).ClientRetrieveTryRestartInsufficientFunds), arg0, arg1)
}
// ClientRetrieveWithEvents mocks base method.
func (m *MockFullNode) ClientRetrieveWithEvents(arg0 context.Context, arg1 api.RetrievalOrder, arg2 *api.FileRef) (<-chan marketevents.RetrievalEvent, error) {
// ClientRetrieveWait mocks base method.
func (m *MockFullNode) ClientRetrieveWait(arg0 context.Context, arg1 retrievalmarket.DealID) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ClientRetrieveWithEvents", arg0, arg1, arg2)
ret0, _ := ret[0].(<-chan marketevents.RetrievalEvent)
ret1, _ := ret[1].(error)
return ret0, ret1
ret := m.ctrl.Call(m, "ClientRetrieveWait", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// ClientRetrieveWithEvents indicates an expected call of ClientRetrieveWithEvents.
func (mr *MockFullNodeMockRecorder) ClientRetrieveWithEvents(arg0, arg1, arg2 interface{}) *gomock.Call {
// ClientRetrieveWait indicates an expected call of ClientRetrieveWait.
func (mr *MockFullNodeMockRecorder) ClientRetrieveWait(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClientRetrieveWithEvents", reflect.TypeOf((*MockFullNode)(nil).ClientRetrieveWithEvents), arg0, arg1, arg2)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ClientRetrieveWait", reflect.TypeOf((*MockFullNode)(nil).ClientRetrieveWait), arg0, arg1)
}
// ClientStartDeal mocks base method.
@@ -979,6 +996,21 @@ func (mr *MockFullNodeMockRecorder) ID(arg0 interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ID", reflect.TypeOf((*MockFullNode)(nil).ID), arg0)
}
// LogAlerts mocks base method.
func (m *MockFullNode) LogAlerts(arg0 context.Context) ([]alerting.Alert, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "LogAlerts", arg0)
ret0, _ := ret[0].([]alerting.Alert)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// LogAlerts indicates an expected call of LogAlerts.
func (mr *MockFullNodeMockRecorder) LogAlerts(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LogAlerts", reflect.TypeOf((*MockFullNode)(nil).LogAlerts), arg0)
}
// LogList mocks base method.
func (m *MockFullNode) LogList(arg0 context.Context) ([]string, error) {
m.ctrl.T.Helper()
@@ -1426,18 +1458,33 @@ func (mr *MockFullNodeMockRecorder) MsigApproveTxnHash(arg0, arg1, arg2, arg3, a
}
// MsigCancel mocks base method.
func (m *MockFullNode) MsigCancel(arg0 context.Context, arg1 address.Address, arg2 uint64, arg3 address.Address, arg4 big.Int, arg5 address.Address, arg6 uint64, arg7 []byte) (*api.MessagePrototype, error) {
func (m *MockFullNode) MsigCancel(arg0 context.Context, arg1 address.Address, arg2 uint64, arg3 address.Address) (*api.MessagePrototype, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "MsigCancel", arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7)
ret := m.ctrl.Call(m, "MsigCancel", arg0, arg1, arg2, arg3)
ret0, _ := ret[0].(*api.MessagePrototype)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// MsigCancel indicates an expected call of MsigCancel.
func (mr *MockFullNodeMockRecorder) MsigCancel(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 interface{}) *gomock.Call {
func (mr *MockFullNodeMockRecorder) MsigCancel(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MsigCancel", reflect.TypeOf((*MockFullNode)(nil).MsigCancel), arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MsigCancel", reflect.TypeOf((*MockFullNode)(nil).MsigCancel), arg0, arg1, arg2, arg3)
}
// MsigCancelTxnHash mocks base method.
func (m *MockFullNode) MsigCancelTxnHash(arg0 context.Context, arg1 address.Address, arg2 uint64, arg3 address.Address, arg4 big.Int, arg5 address.Address, arg6 uint64, arg7 []byte) (*api.MessagePrototype, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "MsigCancelTxnHash", arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7)
ret0, _ := ret[0].(*api.MessagePrototype)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// MsigCancelTxnHash indicates an expected call of MsigCancelTxnHash.
func (mr *MockFullNodeMockRecorder) MsigCancelTxnHash(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MsigCancelTxnHash", reflect.TypeOf((*MockFullNode)(nil).MsigCancelTxnHash), arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7)
}
// MsigCreate mocks base method.
@@ -1781,6 +1828,21 @@ func (mr *MockFullNodeMockRecorder) NetFindPeer(arg0, arg1 interface{}) *gomock.
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetFindPeer", reflect.TypeOf((*MockFullNode)(nil).NetFindPeer), arg0, arg1)
}
// NetLimit mocks base method.
func (m *MockFullNode) NetLimit(arg0 context.Context, arg1 string) (api.NetLimit, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "NetLimit", arg0, arg1)
ret0, _ := ret[0].(api.NetLimit)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// NetLimit indicates an expected call of NetLimit.
func (mr *MockFullNodeMockRecorder) NetLimit(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetLimit", reflect.TypeOf((*MockFullNode)(nil).NetLimit), arg0, arg1)
}
// NetPeerInfo mocks base method.
func (m *MockFullNode) NetPeerInfo(arg0 context.Context, arg1 peer.ID) (*api.ExtendedPeerInfo, error) {
m.ctrl.T.Helper()
@@ -1811,6 +1873,64 @@ func (mr *MockFullNodeMockRecorder) NetPeers(arg0 interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetPeers", reflect.TypeOf((*MockFullNode)(nil).NetPeers), arg0)
}
// NetPing mocks base method.
func (m *MockFullNode) NetPing(arg0 context.Context, arg1 peer.ID) (time.Duration, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "NetPing", arg0, arg1)
ret0, _ := ret[0].(time.Duration)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// NetPing indicates an expected call of NetPing.
func (mr *MockFullNodeMockRecorder) NetPing(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetPing", reflect.TypeOf((*MockFullNode)(nil).NetPing), arg0, arg1)
}
// NetProtectAdd mocks base method.
func (m *MockFullNode) NetProtectAdd(arg0 context.Context, arg1 []peer.ID) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "NetProtectAdd", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// NetProtectAdd indicates an expected call of NetProtectAdd.
func (mr *MockFullNodeMockRecorder) NetProtectAdd(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetProtectAdd", reflect.TypeOf((*MockFullNode)(nil).NetProtectAdd), arg0, arg1)
}
// NetProtectList mocks base method.
func (m *MockFullNode) NetProtectList(arg0 context.Context) ([]peer.ID, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "NetProtectList", arg0)
ret0, _ := ret[0].([]peer.ID)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// NetProtectList indicates an expected call of NetProtectList.
func (mr *MockFullNodeMockRecorder) NetProtectList(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetProtectList", reflect.TypeOf((*MockFullNode)(nil).NetProtectList), arg0)
}
// NetProtectRemove mocks base method.
func (m *MockFullNode) NetProtectRemove(arg0 context.Context, arg1 []peer.ID) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "NetProtectRemove", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// NetProtectRemove indicates an expected call of NetProtectRemove.
func (mr *MockFullNodeMockRecorder) NetProtectRemove(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetProtectRemove", reflect.TypeOf((*MockFullNode)(nil).NetProtectRemove), arg0, arg1)
}
// NetPubsubScores mocks base method.
func (m *MockFullNode) NetPubsubScores(arg0 context.Context) ([]api.PubsubScore, error) {
m.ctrl.T.Helper()
@@ -1826,6 +1946,35 @@ func (mr *MockFullNodeMockRecorder) NetPubsubScores(arg0 interface{}) *gomock.Ca
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetPubsubScores", reflect.TypeOf((*MockFullNode)(nil).NetPubsubScores), arg0)
}
// NetSetLimit mocks base method.
func (m *MockFullNode) NetSetLimit(arg0 context.Context, arg1 string, arg2 api.NetLimit) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "NetSetLimit", arg0, arg1, arg2)
ret0, _ := ret[0].(error)
return ret0
}
// NetSetLimit indicates an expected call of NetSetLimit.
func (mr *MockFullNodeMockRecorder) NetSetLimit(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetSetLimit", reflect.TypeOf((*MockFullNode)(nil).NetSetLimit), arg0, arg1, arg2)
}
// NetStat mocks base method.
func (m *MockFullNode) NetStat(arg0 context.Context, arg1 string) (api.NetStat, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "NetStat", arg0, arg1)
ret0, _ := ret[0].(api.NetStat)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// NetStat indicates an expected call of NetStat.
func (mr *MockFullNodeMockRecorder) NetStat(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetStat", reflect.TypeOf((*MockFullNode)(nil).NetStat), arg0, arg1)
}
// NodeStatus mocks base method.
func (m *MockFullNode) NodeStatus(arg0 context.Context, arg1 bool) (api.NodeStatus, error) {
m.ctrl.T.Helper()
@@ -1901,19 +2050,34 @@ func (mr *MockFullNodeMockRecorder) PaychCollect(arg0, arg1 interface{}) *gomock
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PaychCollect", reflect.TypeOf((*MockFullNode)(nil).PaychCollect), arg0, arg1)
}
// PaychGet mocks base method.
func (m *MockFullNode) PaychGet(arg0 context.Context, arg1, arg2 address.Address, arg3 big.Int) (*api.ChannelInfo, error) {
// PaychFund mocks base method.
func (m *MockFullNode) PaychFund(arg0 context.Context, arg1, arg2 address.Address, arg3 big.Int) (*api.ChannelInfo, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "PaychGet", arg0, arg1, arg2, arg3)
ret := m.ctrl.Call(m, "PaychFund", arg0, arg1, arg2, arg3)
ret0, _ := ret[0].(*api.ChannelInfo)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// PaychFund indicates an expected call of PaychFund.
func (mr *MockFullNodeMockRecorder) PaychFund(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PaychFund", reflect.TypeOf((*MockFullNode)(nil).PaychFund), arg0, arg1, arg2, arg3)
}
// PaychGet mocks base method.
func (m *MockFullNode) PaychGet(arg0 context.Context, arg1, arg2 address.Address, arg3 big.Int, arg4 api.PaychGetOpts) (*api.ChannelInfo, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "PaychGet", arg0, arg1, arg2, arg3, arg4)
ret0, _ := ret[0].(*api.ChannelInfo)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// PaychGet indicates an expected call of PaychGet.
func (mr *MockFullNodeMockRecorder) PaychGet(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
func (mr *MockFullNodeMockRecorder) PaychGet(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PaychGet", reflect.TypeOf((*MockFullNode)(nil).PaychGet), arg0, arg1, arg2, arg3)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PaychGet", reflect.TypeOf((*MockFullNode)(nil).PaychGet), arg0, arg1, arg2, arg3, arg4)
}
// PaychGetWaitReady mocks base method.
@@ -2124,6 +2288,36 @@ func (mr *MockFullNodeMockRecorder) StateAccountKey(arg0, arg1, arg2 interface{}
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateAccountKey", reflect.TypeOf((*MockFullNode)(nil).StateAccountKey), arg0, arg1, arg2)
}
// StateActorCodeCIDs mocks base method.
func (m *MockFullNode) StateActorCodeCIDs(arg0 context.Context, arg1 network.Version) (map[string]cid.Cid, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StateActorCodeCIDs", arg0, arg1)
ret0, _ := ret[0].(map[string]cid.Cid)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// StateActorCodeCIDs indicates an expected call of StateActorCodeCIDs.
func (mr *MockFullNodeMockRecorder) StateActorCodeCIDs(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateActorCodeCIDs", reflect.TypeOf((*MockFullNode)(nil).StateActorCodeCIDs), arg0, arg1)
}
// StateActorManifestCID mocks base method.
func (m *MockFullNode) StateActorManifestCID(arg0 context.Context, arg1 network.Version) (cid.Cid, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StateActorManifestCID", arg0, arg1)
ret0, _ := ret[0].(cid.Cid)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// StateActorManifestCID indicates an expected call of StateActorManifestCID.
func (mr *MockFullNodeMockRecorder) StateActorManifestCID(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateActorManifestCID", reflect.TypeOf((*MockFullNode)(nil).StateActorManifestCID), arg0, arg1)
}
// StateAllMinerFaults mocks base method.
func (m *MockFullNode) StateAllMinerFaults(arg0 context.Context, arg1 abi.ChainEpoch, arg2 types.TipSetKey) ([]*api.Fault, error) {
m.ctrl.T.Helper()
@@ -2199,6 +2393,21 @@ func (mr *MockFullNodeMockRecorder) StateCompute(arg0, arg1, arg2, arg3 interfac
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateCompute", reflect.TypeOf((*MockFullNode)(nil).StateCompute), arg0, arg1, arg2, arg3)
}
// StateComputeDataCID mocks base method.
func (m *MockFullNode) StateComputeDataCID(arg0 context.Context, arg1 address.Address, arg2 abi.RegisteredSealProof, arg3 []abi.DealID, arg4 types.TipSetKey) (cid.Cid, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StateComputeDataCID", arg0, arg1, arg2, arg3, arg4)
ret0, _ := ret[0].(cid.Cid)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// StateComputeDataCID indicates an expected call of StateComputeDataCID.
func (mr *MockFullNodeMockRecorder) StateComputeDataCID(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateComputeDataCID", reflect.TypeOf((*MockFullNode)(nil).StateComputeDataCID), arg0, arg1, arg2, arg3, arg4)
}
// StateDealProviderCollateralBounds mocks base method.
func (m *MockFullNode) StateDealProviderCollateralBounds(arg0 context.Context, arg1 abi.PaddedPieceSize, arg2 bool, arg3 types.TipSetKey) (api.DealCollateralBounds, error) {
m.ctrl.T.Helper()
@@ -2229,6 +2438,21 @@ func (mr *MockFullNodeMockRecorder) StateDecodeParams(arg0, arg1, arg2, arg3, ar
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateDecodeParams", reflect.TypeOf((*MockFullNode)(nil).StateDecodeParams), arg0, arg1, arg2, arg3, arg4)
}
// StateEncodeParams mocks base method.
func (m *MockFullNode) StateEncodeParams(arg0 context.Context, arg1 cid.Cid, arg2 abi.MethodNum, arg3 json.RawMessage) ([]byte, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StateEncodeParams", arg0, arg1, arg2, arg3)
ret0, _ := ret[0].([]byte)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// StateEncodeParams indicates an expected call of StateEncodeParams.
func (mr *MockFullNodeMockRecorder) StateEncodeParams(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateEncodeParams", reflect.TypeOf((*MockFullNode)(nil).StateEncodeParams), arg0, arg1, arg2, arg3)
}
// StateGetActor mocks base method.
func (m *MockFullNode) StateGetActor(arg0 context.Context, arg1 address.Address, arg2 types.TipSetKey) (*types.Actor, error) {
m.ctrl.T.Helper()
@@ -2244,6 +2468,141 @@ func (mr *MockFullNodeMockRecorder) StateGetActor(arg0, arg1, arg2 interface{})
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateGetActor", reflect.TypeOf((*MockFullNode)(nil).StateGetActor), arg0, arg1, arg2)
}
// StateGetAllocation mocks base method.
func (m *MockFullNode) StateGetAllocation(arg0 context.Context, arg1 address.Address, arg2 verifreg.AllocationId, arg3 types.TipSetKey) (*verifreg.Allocation, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StateGetAllocation", arg0, arg1, arg2, arg3)
ret0, _ := ret[0].(*verifreg.Allocation)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// StateGetAllocation indicates an expected call of StateGetAllocation.
func (mr *MockFullNodeMockRecorder) StateGetAllocation(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateGetAllocation", reflect.TypeOf((*MockFullNode)(nil).StateGetAllocation), arg0, arg1, arg2, arg3)
}
// StateGetAllocationForPendingDeal mocks base method.
func (m *MockFullNode) StateGetAllocationForPendingDeal(arg0 context.Context, arg1 abi.DealID, arg2 types.TipSetKey) (*verifreg.Allocation, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StateGetAllocationForPendingDeal", arg0, arg1, arg2)
ret0, _ := ret[0].(*verifreg.Allocation)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// StateGetAllocationForPendingDeal indicates an expected call of StateGetAllocationForPendingDeal.
func (mr *MockFullNodeMockRecorder) StateGetAllocationForPendingDeal(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateGetAllocationForPendingDeal", reflect.TypeOf((*MockFullNode)(nil).StateGetAllocationForPendingDeal), arg0, arg1, arg2)
}
// StateGetAllocations mocks base method.
func (m *MockFullNode) StateGetAllocations(arg0 context.Context, arg1 address.Address, arg2 types.TipSetKey) (map[verifreg.AllocationId]verifreg.Allocation, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StateGetAllocations", arg0, arg1, arg2)
ret0, _ := ret[0].(map[verifreg.AllocationId]verifreg.Allocation)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// StateGetAllocations indicates an expected call of StateGetAllocations.
func (mr *MockFullNodeMockRecorder) StateGetAllocations(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateGetAllocations", reflect.TypeOf((*MockFullNode)(nil).StateGetAllocations), arg0, arg1, arg2)
}
// StateGetBeaconEntry mocks base method.
func (m *MockFullNode) StateGetBeaconEntry(arg0 context.Context, arg1 abi.ChainEpoch) (*types.BeaconEntry, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StateGetBeaconEntry", arg0, arg1)
ret0, _ := ret[0].(*types.BeaconEntry)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// StateGetBeaconEntry indicates an expected call of StateGetBeaconEntry.
func (mr *MockFullNodeMockRecorder) StateGetBeaconEntry(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateGetBeaconEntry", reflect.TypeOf((*MockFullNode)(nil).StateGetBeaconEntry), arg0, arg1)
}
// StateGetClaim mocks base method.
func (m *MockFullNode) StateGetClaim(arg0 context.Context, arg1 address.Address, arg2 verifreg.ClaimId, arg3 types.TipSetKey) (*verifreg.Claim, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StateGetClaim", arg0, arg1, arg2, arg3)
ret0, _ := ret[0].(*verifreg.Claim)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// StateGetClaim indicates an expected call of StateGetClaim.
func (mr *MockFullNodeMockRecorder) StateGetClaim(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateGetClaim", reflect.TypeOf((*MockFullNode)(nil).StateGetClaim), arg0, arg1, arg2, arg3)
}
// StateGetClaims mocks base method.
func (m *MockFullNode) StateGetClaims(arg0 context.Context, arg1 address.Address, arg2 types.TipSetKey) (map[verifreg.ClaimId]verifreg.Claim, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StateGetClaims", arg0, arg1, arg2)
ret0, _ := ret[0].(map[verifreg.ClaimId]verifreg.Claim)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// StateGetClaims indicates an expected call of StateGetClaims.
func (mr *MockFullNodeMockRecorder) StateGetClaims(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateGetClaims", reflect.TypeOf((*MockFullNode)(nil).StateGetClaims), arg0, arg1, arg2)
}
// StateGetNetworkParams mocks base method.
func (m *MockFullNode) StateGetNetworkParams(arg0 context.Context) (*api.NetworkParams, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StateGetNetworkParams", arg0)
ret0, _ := ret[0].(*api.NetworkParams)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// StateGetNetworkParams indicates an expected call of StateGetNetworkParams.
func (mr *MockFullNodeMockRecorder) StateGetNetworkParams(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateGetNetworkParams", reflect.TypeOf((*MockFullNode)(nil).StateGetNetworkParams), arg0)
}
// StateGetRandomnessFromBeacon mocks base method.
func (m *MockFullNode) StateGetRandomnessFromBeacon(arg0 context.Context, arg1 crypto.DomainSeparationTag, arg2 abi.ChainEpoch, arg3 []byte, arg4 types.TipSetKey) (abi.Randomness, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StateGetRandomnessFromBeacon", arg0, arg1, arg2, arg3, arg4)
ret0, _ := ret[0].(abi.Randomness)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// StateGetRandomnessFromBeacon indicates an expected call of StateGetRandomnessFromBeacon.
func (mr *MockFullNodeMockRecorder) StateGetRandomnessFromBeacon(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateGetRandomnessFromBeacon", reflect.TypeOf((*MockFullNode)(nil).StateGetRandomnessFromBeacon), arg0, arg1, arg2, arg3, arg4)
}
// StateGetRandomnessFromTickets mocks base method.
func (m *MockFullNode) StateGetRandomnessFromTickets(arg0 context.Context, arg1 crypto.DomainSeparationTag, arg2 abi.ChainEpoch, arg3 []byte, arg4 types.TipSetKey) (abi.Randomness, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StateGetRandomnessFromTickets", arg0, arg1, arg2, arg3, arg4)
ret0, _ := ret[0].(abi.Randomness)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// StateGetRandomnessFromTickets indicates an expected call of StateGetRandomnessFromTickets.
func (mr *MockFullNodeMockRecorder) StateGetRandomnessFromTickets(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateGetRandomnessFromTickets", reflect.TypeOf((*MockFullNode)(nil).StateGetRandomnessFromTickets), arg0, arg1, arg2, arg3, arg4)
}
// StateListActors mocks base method.
func (m *MockFullNode) StateListActors(arg0 context.Context, arg1 types.TipSetKey) ([]address.Address, error) {
m.ctrl.T.Helper()
@@ -2304,6 +2663,21 @@ func (mr *MockFullNodeMockRecorder) StateLookupID(arg0, arg1, arg2 interface{})
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateLookupID", reflect.TypeOf((*MockFullNode)(nil).StateLookupID), arg0, arg1, arg2)
}
// StateLookupRobustAddress mocks base method.
func (m *MockFullNode) StateLookupRobustAddress(arg0 context.Context, arg1 address.Address, arg2 types.TipSetKey) (address.Address, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StateLookupRobustAddress", arg0, arg1, arg2)
ret0, _ := ret[0].(address.Address)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// StateLookupRobustAddress indicates an expected call of StateLookupRobustAddress.
func (mr *MockFullNodeMockRecorder) StateLookupRobustAddress(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateLookupRobustAddress", reflect.TypeOf((*MockFullNode)(nil).StateLookupRobustAddress), arg0, arg1, arg2)
}
// StateMarketBalance mocks base method.
func (m *MockFullNode) StateMarketBalance(arg0 context.Context, arg1 address.Address, arg2 types.TipSetKey) (api.MarketBalance, error) {
m.ctrl.T.Helper()
@@ -2320,10 +2694,10 @@ func (mr *MockFullNodeMockRecorder) StateMarketBalance(arg0, arg1, arg2 interfac
}
// StateMarketDeals mocks base method.
func (m *MockFullNode) StateMarketDeals(arg0 context.Context, arg1 types.TipSetKey) (map[string]api.MarketDeal, error) {
func (m *MockFullNode) StateMarketDeals(arg0 context.Context, arg1 types.TipSetKey) (map[string]*api.MarketDeal, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StateMarketDeals", arg0, arg1)
ret0, _ := ret[0].(map[string]api.MarketDeal)
ret0, _ := ret[0].(map[string]*api.MarketDeal)
ret1, _ := ret[1].(error)
return ret0, ret1
}
@@ -2379,6 +2753,21 @@ func (mr *MockFullNodeMockRecorder) StateMinerActiveSectors(arg0, arg1, arg2 int
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateMinerActiveSectors", reflect.TypeOf((*MockFullNode)(nil).StateMinerActiveSectors), arg0, arg1, arg2)
}
// StateMinerAllocated mocks base method.
func (m *MockFullNode) StateMinerAllocated(arg0 context.Context, arg1 address.Address, arg2 types.TipSetKey) (*bitfield.BitField, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StateMinerAllocated", arg0, arg1, arg2)
ret0, _ := ret[0].(*bitfield.BitField)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// StateMinerAllocated indicates an expected call of StateMinerAllocated.
func (mr *MockFullNodeMockRecorder) StateMinerAllocated(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateMinerAllocated", reflect.TypeOf((*MockFullNode)(nil).StateMinerAllocated), arg0, arg1, arg2)
}
// StateMinerAvailableBalance mocks base method.
func (m *MockFullNode) StateMinerAvailableBalance(arg0 context.Context, arg1 address.Address, arg2 types.TipSetKey) (big.Int, error) {
m.ctrl.T.Helper()
@@ -2425,10 +2814,10 @@ func (mr *MockFullNodeMockRecorder) StateMinerFaults(arg0, arg1, arg2 interface{
}
// StateMinerInfo mocks base method.
func (m *MockFullNode) StateMinerInfo(arg0 context.Context, arg1 address.Address, arg2 types.TipSetKey) (miner.MinerInfo, error) {
func (m *MockFullNode) StateMinerInfo(arg0 context.Context, arg1 address.Address, arg2 types.TipSetKey) (api.MinerInfo, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StateMinerInfo", arg0, arg1, arg2)
ret0, _ := ret[0].(miner.MinerInfo)
ret0, _ := ret[0].(api.MinerInfo)
ret1, _ := ret[1].(error)
return ret0, ret1
}
@@ -2440,7 +2829,7 @@ func (mr *MockFullNodeMockRecorder) StateMinerInfo(arg0, arg1, arg2 interface{})
}
// StateMinerInitialPledgeCollateral mocks base method.
func (m *MockFullNode) StateMinerInitialPledgeCollateral(arg0 context.Context, arg1 address.Address, arg2 miner0.SectorPreCommitInfo, arg3 types.TipSetKey) (big.Int, error) {
func (m *MockFullNode) StateMinerInitialPledgeCollateral(arg0 context.Context, arg1 address.Address, arg2 miner.SectorPreCommitInfo, arg3 types.TipSetKey) (big.Int, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StateMinerInitialPledgeCollateral", arg0, arg1, arg2, arg3)
ret0, _ := ret[0].(big.Int)
@@ -2485,7 +2874,7 @@ func (mr *MockFullNodeMockRecorder) StateMinerPower(arg0, arg1, arg2 interface{}
}
// StateMinerPreCommitDepositForPower mocks base method.
func (m *MockFullNode) StateMinerPreCommitDepositForPower(arg0 context.Context, arg1 address.Address, arg2 miner0.SectorPreCommitInfo, arg3 types.TipSetKey) (big.Int, error) {
func (m *MockFullNode) StateMinerPreCommitDepositForPower(arg0 context.Context, arg1 address.Address, arg2 miner.SectorPreCommitInfo, arg3 types.TipSetKey) (big.Int, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StateMinerPreCommitDepositForPower", arg0, arg1, arg2, arg3)
ret0, _ := ret[0].(big.Int)
@@ -2650,10 +3039,10 @@ func (mr *MockFullNodeMockRecorder) StateSearchMsg(arg0, arg1, arg2, arg3, arg4
}
// StateSectorExpiration mocks base method.
func (m *MockFullNode) StateSectorExpiration(arg0 context.Context, arg1 address.Address, arg2 abi.SectorNumber, arg3 types.TipSetKey) (*miner.SectorExpiration, error) {
func (m *MockFullNode) StateSectorExpiration(arg0 context.Context, arg1 address.Address, arg2 abi.SectorNumber, arg3 types.TipSetKey) (*miner0.SectorExpiration, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StateSectorExpiration", arg0, arg1, arg2, arg3)
ret0, _ := ret[0].(*miner.SectorExpiration)
ret0, _ := ret[0].(*miner0.SectorExpiration)
ret1, _ := ret[1].(error)
return ret0, ret1
}
@@ -2680,10 +3069,10 @@ func (mr *MockFullNodeMockRecorder) StateSectorGetInfo(arg0, arg1, arg2, arg3 in
}
// StateSectorPartition mocks base method.
func (m *MockFullNode) StateSectorPartition(arg0 context.Context, arg1 address.Address, arg2 abi.SectorNumber, arg3 types.TipSetKey) (*miner.SectorLocation, error) {
func (m *MockFullNode) StateSectorPartition(arg0 context.Context, arg1 address.Address, arg2 abi.SectorNumber, arg3 types.TipSetKey) (*miner0.SectorLocation, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StateSectorPartition", arg0, arg1, arg2, arg3)
ret0, _ := ret[0].(*miner.SectorLocation)
ret0, _ := ret[0].(*miner0.SectorLocation)
ret1, _ := ret[1].(error)
return ret0, ret1
}
@@ -2695,10 +3084,10 @@ func (mr *MockFullNodeMockRecorder) StateSectorPartition(arg0, arg1, arg2, arg3
}
// StateSectorPreCommitInfo mocks base method.
func (m *MockFullNode) StateSectorPreCommitInfo(arg0 context.Context, arg1 address.Address, arg2 abi.SectorNumber, arg3 types.TipSetKey) (miner.SectorPreCommitOnChainInfo, error) {
func (m *MockFullNode) StateSectorPreCommitInfo(arg0 context.Context, arg1 address.Address, arg2 abi.SectorNumber, arg3 types.TipSetKey) (*miner.SectorPreCommitOnChainInfo, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StateSectorPreCommitInfo", arg0, arg1, arg2, arg3)
ret0, _ := ret[0].(miner.SectorPreCommitOnChainInfo)
ret0, _ := ret[0].(*miner.SectorPreCommitOnChainInfo)
ret1, _ := ret[1].(error)
return ret0, ret1
}
+1347 -223
View File
File diff suppressed because it is too large Load Diff
+3
View File
@@ -1,3 +1,4 @@
// stm: #unit
package api
import (
@@ -29,6 +30,7 @@ type StrC struct {
}
func TestGetInternalStructs(t *testing.T) {
//stm: @OTHER_IMPLEMENTATION_API_STRUCTS_001
var proxy StrA
sts := GetInternalStructs(&proxy)
@@ -44,6 +46,7 @@ func TestGetInternalStructs(t *testing.T) {
}
func TestNestedInternalStructs(t *testing.T) {
//stm: @OTHER_IMPLEMENTATION_API_STRUCTS_001
var proxy StrC
// check that only the top-level internal struct gets picked up
+149 -10
View File
@@ -5,19 +5,23 @@ import (
"fmt"
"time"
"github.com/filecoin-project/go-fil-markets/retrievalmarket"
"github.com/filecoin-project/lotus/chain/types"
datatransfer "github.com/filecoin-project/go-data-transfer"
"github.com/filecoin-project/go-state-types/abi"
"github.com/google/uuid"
"github.com/ipfs/go-cid"
"github.com/libp2p/go-libp2p-core/peer"
"github.com/ipfs/go-graphsync"
pubsub "github.com/libp2p/go-libp2p-pubsub"
"github.com/libp2p/go-libp2p/core/network"
"github.com/libp2p/go-libp2p/core/peer"
ma "github.com/multiformats/go-multiaddr"
)
// TODO: check if this exists anywhere else
"github.com/filecoin-project/go-address"
datatransfer "github.com/filecoin-project/go-data-transfer"
"github.com/filecoin-project/go-fil-markets/retrievalmarket"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/builtin/v9/miner"
"github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/node/modules/dtypes"
)
type MultiaddrSlice []ma.Multiaddr
@@ -51,7 +55,32 @@ type PubsubScore struct {
}
type MessageSendSpec struct {
MaxFee abi.TokenAmount
MaxFee abi.TokenAmount
MsgUuid uuid.UUID
}
// GraphSyncDataTransfer provides diagnostics on a data transfer happening over graphsync
type GraphSyncDataTransfer struct {
// GraphSync request id for this transfer
RequestID *graphsync.RequestID
// Graphsync state for this transfer
RequestState string
// If a channel ID is present, indicates whether this is the current graphsync request for this channel
// (could have changed in a restart)
IsCurrentChannelRequest bool
// Data transfer channel ID for this transfer
ChannelID *datatransfer.ChannelID
// Data transfer state for this transfer
ChannelState *DataTransferChannel
// Diagnostic information about this request -- and unexpected inconsistencies in
// request state
Diagnostics []string
}
// TransferDiagnostics give current information about transfers going over graphsync that may be helpful for debugging
type TransferDiagnostics struct {
ReceivingTransfers []*GraphSyncDataTransfer
SendingTransfers []*GraphSyncDataTransfer
}
type DataTransferChannel struct {
@@ -99,6 +128,22 @@ func NewDataTransferChannel(hostID peer.ID, channelState datatransfer.ChannelSta
return channel
}
type NetStat struct {
System *network.ScopeStat `json:",omitempty"`
Transient *network.ScopeStat `json:",omitempty"`
Services map[string]network.ScopeStat `json:",omitempty"`
Protocols map[string]network.ScopeStat `json:",omitempty"`
Peers map[string]network.ScopeStat `json:",omitempty"`
}
type NetLimit struct {
Memory int64 `json:",omitempty"`
Streams, StreamsInbound, StreamsOutbound int
Conns, ConnsInbound, ConnsOutbound int
FD int
}
type NetBlockList struct {
Peers []peer.ID
IPAddrs []string
@@ -194,4 +239,98 @@ type RetrievalInfo struct {
TransferChannelID *datatransfer.ChannelID
DataTransfer *DataTransferChannel
// optional event if part of ClientGetRetrievalUpdates
Event *retrievalmarket.ClientEvent
}
type RestrievalRes struct {
DealID retrievalmarket.DealID
}
// Selector specifies ipld selector string
// - if the string starts with '{', it's interpreted as json selector string
// see https://ipld.io/specs/selectors/ and https://ipld.io/specs/selectors/fixtures/selector-fixtures-1/
// - otherwise the string is interpreted as ipld-selector-text-lite (simple ipld path)
// see https://github.com/ipld/go-ipld-selector-text-lite
type Selector string
type DagSpec struct {
// DataSelector matches data to be retrieved
// - when using textselector, the path specifies subtree
// - the matched graph must have a single root
DataSelector *Selector
// ExportMerkleProof is applicable only when exporting to a CAR file via a path textselector
// When true, in addition to the selection target, the resulting CAR will contain every block along the
// path back to, and including the original root
// When false the resulting CAR contains only the blocks of the target subdag
ExportMerkleProof bool
}
type ExportRef struct {
Root cid.Cid
// DAGs array specifies a list of DAGs to export
// - If exporting into unixfs files, only one DAG is supported, DataSelector is only used to find the targeted root node
// - If exporting into a car file
// - When exactly one text-path DataSelector is specified exports the subgraph and its full merkle-path from the original root
// - Otherwise ( multiple paths and/or JSON selector specs) determines each individual subroot and exports the subtrees as a multi-root car
// - When not specified defaults to a single DAG:
// - Data - the entire DAG: `{"R":{"l":{"none":{}},":>":{"a":{">":{"@":{}}}}}}`
DAGs []DagSpec
FromLocalCAR string // if specified, get data from a local CARv2 file.
DealID retrievalmarket.DealID
}
type MinerInfo struct {
Owner address.Address // Must be an ID-address.
Worker address.Address // Must be an ID-address.
NewWorker address.Address // Must be an ID-address.
ControlAddresses []address.Address // Must be an ID-addresses.
WorkerChangeEpoch abi.ChainEpoch
PeerId *peer.ID
Multiaddrs []abi.Multiaddrs
WindowPoStProofType abi.RegisteredPoStProof
SectorSize abi.SectorSize
WindowPoStPartitionSectors uint64
ConsensusFaultElapsed abi.ChainEpoch
Beneficiary address.Address
BeneficiaryTerm *miner.BeneficiaryTerm
PendingBeneficiaryTerm *miner.PendingBeneficiaryChange
}
type NetworkParams struct {
NetworkName dtypes.NetworkName
BlockDelaySecs uint64
ConsensusMinerMinPower abi.StoragePower
SupportedProofTypes []abi.RegisteredSealProof
PreCommitChallengeDelay abi.ChainEpoch
ForkUpgradeParams ForkUpgradeParams
}
type ForkUpgradeParams struct {
UpgradeSmokeHeight abi.ChainEpoch
UpgradeBreezeHeight abi.ChainEpoch
UpgradeIgnitionHeight abi.ChainEpoch
UpgradeLiftoffHeight abi.ChainEpoch
UpgradeAssemblyHeight abi.ChainEpoch
UpgradeRefuelHeight abi.ChainEpoch
UpgradeTapeHeight abi.ChainEpoch
UpgradeKumquatHeight abi.ChainEpoch
UpgradePriceListOopsHeight abi.ChainEpoch
BreezeGasTampingDuration abi.ChainEpoch
UpgradeCalicoHeight abi.ChainEpoch
UpgradePersianHeight abi.ChainEpoch
UpgradeOrangeHeight abi.ChainEpoch
UpgradeClausHeight abi.ChainEpoch
UpgradeTrustHeight abi.ChainEpoch
UpgradeNorwegianHeight abi.ChainEpoch
UpgradeTurboHeight abi.ChainEpoch
UpgradeHyperdriveHeight abi.ChainEpoch
UpgradeChocolateHeight abi.ChainEpoch
UpgradeOhSnapHeight abi.ChainEpoch
UpgradeSkyrHeight abi.ChainEpoch
UpgradeSharkHeight abi.ChainEpoch
}
+79 -14
View File
@@ -3,25 +3,31 @@ package v0api
import (
"context"
blocks "github.com/ipfs/go-block-format"
"github.com/ipfs/go-cid"
textselector "github.com/ipld/go-ipld-selector-text-lite"
"github.com/libp2p/go-libp2p/core/peer"
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-bitfield"
datatransfer "github.com/filecoin-project/go-data-transfer"
"github.com/filecoin-project/go-fil-markets/retrievalmarket"
"github.com/filecoin-project/go-fil-markets/storagemarket"
"github.com/filecoin-project/go-multistore"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/builtin/v8/paych"
"github.com/filecoin-project/go-state-types/builtin/v9/miner"
verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
"github.com/filecoin-project/go-state-types/crypto"
"github.com/filecoin-project/go-state-types/dline"
"github.com/ipfs/go-cid"
"github.com/libp2p/go-libp2p-core/peer"
abinetwork "github.com/filecoin-project/go-state-types/network"
"github.com/filecoin-project/lotus/api"
apitypes "github.com/filecoin-project/lotus/api/types"
"github.com/filecoin-project/lotus/chain/actors/builtin/miner"
"github.com/filecoin-project/lotus/chain/actors/builtin/paych"
lminer "github.com/filecoin-project/lotus/chain/actors/builtin/miner"
"github.com/filecoin-project/lotus/chain/types"
marketevents "github.com/filecoin-project/lotus/markets/loggers"
"github.com/filecoin-project/lotus/node/modules/dtypes"
"github.com/filecoin-project/lotus/node/repo/imports"
)
//go:generate go run github.com/golang/mock/mockgen -destination=v0mocks/mock_full.go -package=v0mocks . FullNode
@@ -108,6 +114,9 @@ type FullNode interface {
// ChainDeleteObj deletes node referenced by the given CID
ChainDeleteObj(context.Context, cid.Cid) error //perm:admin
// ChainPutObj puts and object into the blockstore
ChainPutObj(context.Context, blocks.Block) error
// ChainHasObj checks if a given CID exists in the chain blockstore.
ChainHasObj(context.Context, cid.Cid) (bool, error) //perm:read
@@ -305,7 +314,7 @@ type FullNode interface {
// ClientImport imports file under the specified path into filestore.
ClientImport(ctx context.Context, ref api.FileRef) (*api.ImportRes, error) //perm:admin
// ClientRemoveImport removes file import
ClientRemoveImport(ctx context.Context, importID multistore.StoreID) error //perm:admin
ClientRemoveImport(ctx context.Context, importID imports.ID) error //perm:admin
// ClientStartDeal proposes a deal with a miner.
ClientStartDeal(ctx context.Context, params *api.StartDealParams) (*cid.Cid, error) //perm:admin
// ClientStatelessDeal fire-and-forget-proposes an offline deal to a miner without subsequent tracking.
@@ -325,10 +334,10 @@ type FullNode interface {
// ClientMinerQueryOffer returns a QueryOffer for the specific miner and file.
ClientMinerQueryOffer(ctx context.Context, miner address.Address, root cid.Cid, piece *cid.Cid) (api.QueryOffer, error) //perm:read
// ClientRetrieve initiates the retrieval of a file, as specified in the order.
ClientRetrieve(ctx context.Context, order api.RetrievalOrder, ref *api.FileRef) error //perm:admin
ClientRetrieve(ctx context.Context, order RetrievalOrder, ref *api.FileRef) error //perm:admin
// ClientRetrieveWithEvents initiates the retrieval of a file, as specified in the order, and provides a channel
// of status updates.
ClientRetrieveWithEvents(ctx context.Context, order api.RetrievalOrder, ref *api.FileRef) (<-chan marketevents.RetrievalEvent, error) //perm:admin
ClientRetrieveWithEvents(ctx context.Context, order RetrievalOrder, ref *api.FileRef) (<-chan marketevents.RetrievalEvent, error) //perm:admin
// ClientQueryAsk returns a signed StorageAsk from the specified miner.
// ClientListRetrievals returns information about retrievals made by the local client
ClientListRetrievals(ctx context.Context) ([]api.RetrievalInfo, error) //perm:write
@@ -378,7 +387,7 @@ type FullNode interface {
StateCall(context.Context, *types.Message, types.TipSetKey) (*api.InvocResult, error) //perm:read
// StateReplay replays a given message, assuming it was included in a block in the specified tipset.
//
// If a tipset key is provided, and a replacing message is found on chain,
// If a tipset key is provided, and a replacing message is not found on chain,
// the method will return an error saying that the message wasn't found
//
// If no tipset key is provided, the appropriate tipset is looked up, and if
@@ -415,7 +424,7 @@ type FullNode interface {
// StateMinerPower returns the power of the indicated miner
StateMinerPower(context.Context, address.Address, types.TipSetKey) (*api.MinerPower, error) //perm:read
// StateMinerInfo returns info about the indicated miner
StateMinerInfo(context.Context, address.Address, types.TipSetKey) (miner.MinerInfo, error) //perm:read
StateMinerInfo(context.Context, address.Address, types.TipSetKey) (api.MinerInfo, error) //perm:read
// StateMinerDeadlines returns all the proving deadlines for the given miner
StateMinerDeadlines(context.Context, address.Address, types.TipSetKey) ([]api.Deadline, error) //perm:read
// StateMinerPartitions returns all partitions in the specified deadline
@@ -441,9 +450,9 @@ type FullNode interface {
// expiration epoch
StateSectorGetInfo(context.Context, address.Address, abi.SectorNumber, types.TipSetKey) (*miner.SectorOnChainInfo, error) //perm:read
// StateSectorExpiration returns epoch at which given sector will expire
StateSectorExpiration(context.Context, address.Address, abi.SectorNumber, types.TipSetKey) (*miner.SectorExpiration, error) //perm:read
StateSectorExpiration(context.Context, address.Address, abi.SectorNumber, types.TipSetKey) (*lminer.SectorExpiration, error) //perm:read
// StateSectorPartition finds deadline/partition with the specified sector
StateSectorPartition(ctx context.Context, maddr address.Address, sectorNumber abi.SectorNumber, tok types.TipSetKey) (*miner.SectorLocation, error) //perm:read
StateSectorPartition(ctx context.Context, maddr address.Address, sectorNumber abi.SectorNumber, tok types.TipSetKey) (*lminer.SectorLocation, error) //perm:read
// StateSearchMsg searches for a message in the chain, and returns its receipt and the tipset where it was executed
//
// NOTE: If a replacing message is found on chain, this method will return
@@ -520,9 +529,19 @@ type FullNode interface {
// StateMarketParticipants returns the Escrow and Locked balances of every participant in the Storage Market
StateMarketParticipants(context.Context, types.TipSetKey) (map[string]api.MarketBalance, error) //perm:read
// StateMarketDeals returns information about every deal in the Storage Market
StateMarketDeals(context.Context, types.TipSetKey) (map[string]api.MarketDeal, error) //perm:read
StateMarketDeals(context.Context, types.TipSetKey) (map[string]*api.MarketDeal, error) //perm:read
// StateMarketStorageDeal returns information about the indicated deal
StateMarketStorageDeal(context.Context, abi.DealID, types.TipSetKey) (*api.MarketDeal, error) //perm:read
// StateGetAllocationForPendingDeal returns the allocation for a given deal ID of a pending deal.
StateGetAllocationForPendingDeal(ctx context.Context, dealId abi.DealID, tsk types.TipSetKey) (*verifregtypes.Allocation, error) //perm:read
// StateGetAllocation returns the allocation for a given address and allocation ID.
StateGetAllocation(ctx context.Context, clientAddr address.Address, allocationId verifregtypes.AllocationId, tsk types.TipSetKey) (*verifregtypes.Allocation, error) //perm:read
// StateGetAllocations returns the all the allocations for a given client.
StateGetAllocations(ctx context.Context, clientAddr address.Address, tsk types.TipSetKey) (map[verifregtypes.AllocationId]verifregtypes.Allocation, error) //perm:read
// StateGetClaim returns the claim for a given address and claim ID.
StateGetClaim(ctx context.Context, providerAddr address.Address, claimId verifregtypes.ClaimId, tsk types.TipSetKey) (*verifregtypes.Claim, error) //perm:read
// StateGetClaims returns the all the claims for a given provider.
StateGetClaims(ctx context.Context, providerAddr address.Address, tsk types.TipSetKey) (map[verifregtypes.ClaimId]verifregtypes.Claim, error) //perm:read
// StateLookupID retrieves the ID address of the given address
StateLookupID(context.Context, address.Address, types.TipSetKey) (address.Address, error) //perm:read
// StateAccountKey returns the public key address of the given ID address
@@ -583,7 +602,7 @@ type FullNode interface {
// Returns nil if there is no entry in the data cap table for the
// address.
StateVerifiedClientStatus(ctx context.Context, addr address.Address, tsk types.TipSetKey) (*abi.StoragePower, error) //perm:read
// StateVerifiedClientStatus returns the address of the Verified Registry's root key
// StateVerifiedRegistryRootKey returns the address of the Verified Registry's root key
StateVerifiedRegistryRootKey(ctx context.Context, tsk types.TipSetKey) (address.Address, error) //perm:read
// StateDealProviderCollateralBounds returns the min and max collateral a storage provider
// can issue. It takes the deal size and verified status as parameters.
@@ -597,6 +616,18 @@ type FullNode interface {
StateVMCirculatingSupplyInternal(context.Context, types.TipSetKey) (api.CirculatingSupply, error) //perm:read
// StateNetworkVersion returns the network version at the given tipset
StateNetworkVersion(context.Context, types.TipSetKey) (apitypes.NetworkVersion, error) //perm:read
// StateActorCodeCIDs returns the CIDs of all the builtin actors for the given network version
StateActorCodeCIDs(context.Context, abinetwork.Version) (map[string]cid.Cid, error) //perm:read
// StateActorManifestCID returns the CID of the builtin actors manifest for the given network version
StateActorManifestCID(context.Context, abinetwork.Version) (cid.Cid, error) //perm:read
// StateGetRandomnessFromTickets is used to sample the chain for randomness.
StateGetRandomnessFromTickets(ctx context.Context, personalization crypto.DomainSeparationTag, randEpoch abi.ChainEpoch, entropy []byte, tsk types.TipSetKey) (abi.Randomness, error) //perm:read
// StateGetRandomnessFromBeacon is used to sample the beacon for randomness.
StateGetRandomnessFromBeacon(ctx context.Context, personalization crypto.DomainSeparationTag, randEpoch abi.ChainEpoch, entropy []byte, tsk types.TipSetKey) (abi.Randomness, error) //perm:read
// StateGetNetworkParams return current network params
StateGetNetworkParams(ctx context.Context) (*api.NetworkParams, error) //perm:read
// MethodGroup: Msig
// The Msig methods are used to interact with multisig wallets on the
@@ -709,3 +740,37 @@ type FullNode interface {
// the path specified when calling CreateBackup is within the base path
CreateBackup(ctx context.Context, fpath string) error //perm:admin
}
func OfferOrder(o api.QueryOffer, client address.Address) RetrievalOrder {
return RetrievalOrder{
Root: o.Root,
Piece: o.Piece,
Size: o.Size,
Total: o.MinPrice,
UnsealPrice: o.UnsealPrice,
PaymentInterval: o.PaymentInterval,
PaymentIntervalIncrease: o.PaymentIntervalIncrease,
Client: client,
Miner: o.Miner,
MinerPeer: &o.MinerPeer,
}
}
type RetrievalOrder struct {
// TODO: make this less unixfs specific
Root cid.Cid
Piece *cid.Cid
DatamodelPathSelector *textselector.Expression
Size uint64
FromLocalCAR string // if specified, get data from a local CARv2 file.
// TODO: support offset
Total types.BigInt
UnsealPrice types.BigInt
PaymentInterval uint64
PaymentIntervalIncrease uint64
Client address.Address
Miner address.Address
MinerPeer *retrievalmarket.RetrievalPeer
}
+6 -4
View File
@@ -3,15 +3,16 @@ package v0api
import (
"context"
blocks "github.com/ipfs/go-block-format"
"github.com/ipfs/go-cid"
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/builtin/v9/miner"
"github.com/filecoin-project/go-state-types/dline"
"github.com/filecoin-project/go-state-types/network"
abinetwork "github.com/filecoin-project/go-state-types/network"
"github.com/filecoin-project/lotus/api"
"github.com/filecoin-project/lotus/chain/actors/builtin/miner"
"github.com/filecoin-project/lotus/chain/types"
)
@@ -34,6 +35,7 @@ import (
type Gateway interface {
ChainHasObj(context.Context, cid.Cid) (bool, error)
ChainPutObj(context.Context, blocks.Block) error
ChainHead(ctx context.Context) (*types.TipSet, error)
ChainGetBlockMessages(context.Context, cid.Cid) (*api.BlockMessages, error)
ChainGetMessage(ctx context.Context, mc cid.Cid) (*types.Message, error)
@@ -54,10 +56,10 @@ type Gateway interface {
StateLookupID(ctx context.Context, addr address.Address, tsk types.TipSetKey) (address.Address, error)
StateMarketBalance(ctx context.Context, addr address.Address, tsk types.TipSetKey) (api.MarketBalance, error)
StateMarketStorageDeal(ctx context.Context, dealId abi.DealID, tsk types.TipSetKey) (*api.MarketDeal, error)
StateMinerInfo(ctx context.Context, actor address.Address, tsk types.TipSetKey) (miner.MinerInfo, error)
StateMinerInfo(ctx context.Context, actor address.Address, tsk types.TipSetKey) (api.MinerInfo, error)
StateMinerProvingDeadline(ctx context.Context, addr address.Address, tsk types.TipSetKey) (*dline.Info, error)
StateMinerPower(context.Context, address.Address, types.TipSetKey) (*api.MinerPower, error)
StateNetworkVersion(context.Context, types.TipSetKey) (network.Version, error)
StateNetworkVersion(context.Context, types.TipSetKey) (abinetwork.Version, error)
StateSearchMsg(ctx context.Context, msg cid.Cid) (*api.MsgLookup, error)
StateSectorGetInfo(ctx context.Context, maddr address.Address, n abi.SectorNumber, tsk types.TipSetKey) (*miner.SectorOnChainInfo, error)
StateVerifiedClientStatus(ctx context.Context, addr address.Address, tsk types.TipSetKey) (*abi.StoragePower, error)
+1
View File
@@ -2,6 +2,7 @@ package v0api
import (
"github.com/filecoin-project/go-jsonrpc/auth"
"github.com/filecoin-project/lotus/api"
)
+203 -42
View File
@@ -5,26 +5,31 @@ package v0api
import (
"context"
blocks "github.com/ipfs/go-block-format"
"github.com/ipfs/go-cid"
"github.com/libp2p/go-libp2p/core/peer"
"golang.org/x/xerrors"
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-bitfield"
datatransfer "github.com/filecoin-project/go-data-transfer"
"github.com/filecoin-project/go-fil-markets/retrievalmarket"
"github.com/filecoin-project/go-fil-markets/storagemarket"
"github.com/filecoin-project/go-multistore"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/builtin/v8/paych"
"github.com/filecoin-project/go-state-types/builtin/v9/miner"
verifregtypes "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
"github.com/filecoin-project/go-state-types/crypto"
"github.com/filecoin-project/go-state-types/dline"
"github.com/filecoin-project/go-state-types/network"
abinetwork "github.com/filecoin-project/go-state-types/network"
"github.com/filecoin-project/lotus/api"
apitypes "github.com/filecoin-project/lotus/api/types"
"github.com/filecoin-project/lotus/chain/actors/builtin/miner"
"github.com/filecoin-project/lotus/chain/actors/builtin/paych"
lminer "github.com/filecoin-project/lotus/chain/actors/builtin/miner"
"github.com/filecoin-project/lotus/chain/types"
marketevents "github.com/filecoin-project/lotus/markets/loggers"
"github.com/filecoin-project/lotus/node/modules/dtypes"
"github.com/ipfs/go-cid"
"github.com/libp2p/go-libp2p-core/peer"
"golang.org/x/xerrors"
"github.com/filecoin-project/lotus/node/repo/imports"
)
var ErrNotSupported = xerrors.New("method not supported")
@@ -73,6 +78,8 @@ type FullNodeStruct struct {
ChainNotify func(p0 context.Context) (<-chan []*api.HeadChange, error) `perm:"read"`
ChainPutObj func(p0 context.Context, p1 blocks.Block) error ``
ChainReadObj func(p0 context.Context, p1 cid.Cid) ([]byte, error) `perm:"read"`
ChainSetHead func(p0 context.Context, p1 types.TipSetKey) error `perm:"admin"`
@@ -121,15 +128,15 @@ type FullNodeStruct struct {
ClientQueryAsk func(p0 context.Context, p1 peer.ID, p2 address.Address) (*storagemarket.StorageAsk, error) `perm:"read"`
ClientRemoveImport func(p0 context.Context, p1 multistore.StoreID) error `perm:"admin"`
ClientRemoveImport func(p0 context.Context, p1 imports.ID) error `perm:"admin"`
ClientRestartDataTransfer func(p0 context.Context, p1 datatransfer.TransferID, p2 peer.ID, p3 bool) error `perm:"write"`
ClientRetrieve func(p0 context.Context, p1 api.RetrievalOrder, p2 *api.FileRef) error `perm:"admin"`
ClientRetrieve func(p0 context.Context, p1 RetrievalOrder, p2 *api.FileRef) error `perm:"admin"`
ClientRetrieveTryRestartInsufficientFunds func(p0 context.Context, p1 address.Address) error `perm:"write"`
ClientRetrieveWithEvents func(p0 context.Context, p1 api.RetrievalOrder, p2 *api.FileRef) (<-chan marketevents.RetrievalEvent, error) `perm:"admin"`
ClientRetrieveWithEvents func(p0 context.Context, p1 RetrievalOrder, p2 *api.FileRef) (<-chan marketevents.RetrievalEvent, error) `perm:"admin"`
ClientStartDeal func(p0 context.Context, p1 *api.StartDealParams) (*cid.Cid, error) `perm:"admin"`
@@ -251,6 +258,10 @@ type FullNodeStruct struct {
StateAccountKey func(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (address.Address, error) `perm:"read"`
StateActorCodeCIDs func(p0 context.Context, p1 abinetwork.Version) (map[string]cid.Cid, error) `perm:"read"`
StateActorManifestCID func(p0 context.Context, p1 abinetwork.Version) (cid.Cid, error) `perm:"read"`
StateAllMinerFaults func(p0 context.Context, p1 abi.ChainEpoch, p2 types.TipSetKey) ([]*api.Fault, error) `perm:"read"`
StateCall func(p0 context.Context, p1 *types.Message, p2 types.TipSetKey) (*api.InvocResult, error) `perm:"read"`
@@ -267,6 +278,22 @@ type FullNodeStruct struct {
StateGetActor func(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (*types.Actor, error) `perm:"read"`
StateGetAllocation func(p0 context.Context, p1 address.Address, p2 verifregtypes.AllocationId, p3 types.TipSetKey) (*verifregtypes.Allocation, error) `perm:"read"`
StateGetAllocationForPendingDeal func(p0 context.Context, p1 abi.DealID, p2 types.TipSetKey) (*verifregtypes.Allocation, error) `perm:"read"`
StateGetAllocations func(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (map[verifregtypes.AllocationId]verifregtypes.Allocation, error) `perm:"read"`
StateGetClaim func(p0 context.Context, p1 address.Address, p2 verifregtypes.ClaimId, p3 types.TipSetKey) (*verifregtypes.Claim, error) `perm:"read"`
StateGetClaims func(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (map[verifregtypes.ClaimId]verifregtypes.Claim, error) `perm:"read"`
StateGetNetworkParams func(p0 context.Context) (*api.NetworkParams, error) `perm:"read"`
StateGetRandomnessFromBeacon func(p0 context.Context, p1 crypto.DomainSeparationTag, p2 abi.ChainEpoch, p3 []byte, p4 types.TipSetKey) (abi.Randomness, error) `perm:"read"`
StateGetRandomnessFromTickets func(p0 context.Context, p1 crypto.DomainSeparationTag, p2 abi.ChainEpoch, p3 []byte, p4 types.TipSetKey) (abi.Randomness, error) `perm:"read"`
StateGetReceipt func(p0 context.Context, p1 cid.Cid, p2 types.TipSetKey) (*types.MessageReceipt, error) `perm:"read"`
StateListActors func(p0 context.Context, p1 types.TipSetKey) ([]address.Address, error) `perm:"read"`
@@ -279,7 +306,7 @@ type FullNodeStruct struct {
StateMarketBalance func(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (api.MarketBalance, error) `perm:"read"`
StateMarketDeals func(p0 context.Context, p1 types.TipSetKey) (map[string]api.MarketDeal, error) `perm:"read"`
StateMarketDeals func(p0 context.Context, p1 types.TipSetKey) (map[string]*api.MarketDeal, error) `perm:"read"`
StateMarketParticipants func(p0 context.Context, p1 types.TipSetKey) (map[string]api.MarketBalance, error) `perm:"read"`
@@ -293,7 +320,7 @@ type FullNodeStruct struct {
StateMinerFaults func(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (bitfield.BitField, error) `perm:"read"`
StateMinerInfo func(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (miner.MinerInfo, error) `perm:"read"`
StateMinerInfo func(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (api.MinerInfo, error) `perm:"read"`
StateMinerInitialPledgeCollateral func(p0 context.Context, p1 address.Address, p2 miner.SectorPreCommitInfo, p3 types.TipSetKey) (types.BigInt, error) `perm:"read"`
@@ -325,11 +352,11 @@ type FullNodeStruct struct {
StateSearchMsgLimited func(p0 context.Context, p1 cid.Cid, p2 abi.ChainEpoch) (*api.MsgLookup, error) `perm:"read"`
StateSectorExpiration func(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (*miner.SectorExpiration, error) `perm:"read"`
StateSectorExpiration func(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (*lminer.SectorExpiration, error) `perm:"read"`
StateSectorGetInfo func(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (*miner.SectorOnChainInfo, error) `perm:"read"`
StateSectorPartition func(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (*miner.SectorLocation, error) `perm:"read"`
StateSectorPartition func(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (*lminer.SectorLocation, error) `perm:"read"`
StateSectorPreCommitInfo func(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (miner.SectorPreCommitOnChainInfo, error) `perm:"read"`
@@ -413,6 +440,8 @@ type GatewayStruct struct {
ChainNotify func(p0 context.Context) (<-chan []*api.HeadChange, error) ``
ChainPutObj func(p0 context.Context, p1 blocks.Block) error ``
ChainReadObj func(p0 context.Context, p1 cid.Cid) ([]byte, error) ``
GasEstimateMessageGas func(p0 context.Context, p1 *types.Message, p2 *api.MessageSendSpec, p3 types.TipSetKey) (*types.Message, error) ``
@@ -441,13 +470,13 @@ type GatewayStruct struct {
StateMarketStorageDeal func(p0 context.Context, p1 abi.DealID, p2 types.TipSetKey) (*api.MarketDeal, error) ``
StateMinerInfo func(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (miner.MinerInfo, error) ``
StateMinerInfo func(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (api.MinerInfo, error) ``
StateMinerPower func(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (*api.MinerPower, error) ``
StateMinerProvingDeadline func(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (*dline.Info, error) ``
StateNetworkVersion func(p0 context.Context, p1 types.TipSetKey) (network.Version, error) ``
StateNetworkVersion func(p0 context.Context, p1 types.TipSetKey) (abinetwork.Version, error) ``
StateSearchMsg func(p0 context.Context, p1 cid.Cid) (*api.MsgLookup, error) ``
@@ -675,6 +704,17 @@ func (s *FullNodeStub) ChainNotify(p0 context.Context) (<-chan []*api.HeadChange
return nil, ErrNotSupported
}
func (s *FullNodeStruct) ChainPutObj(p0 context.Context, p1 blocks.Block) error {
if s.Internal.ChainPutObj == nil {
return ErrNotSupported
}
return s.Internal.ChainPutObj(p0, p1)
}
func (s *FullNodeStub) ChainPutObj(p0 context.Context, p1 blocks.Block) error {
return ErrNotSupported
}
func (s *FullNodeStruct) ChainReadObj(p0 context.Context, p1 cid.Cid) ([]byte, error) {
if s.Internal.ChainReadObj == nil {
return *new([]byte), ErrNotSupported
@@ -939,14 +979,14 @@ func (s *FullNodeStub) ClientQueryAsk(p0 context.Context, p1 peer.ID, p2 address
return nil, ErrNotSupported
}
func (s *FullNodeStruct) ClientRemoveImport(p0 context.Context, p1 multistore.StoreID) error {
func (s *FullNodeStruct) ClientRemoveImport(p0 context.Context, p1 imports.ID) error {
if s.Internal.ClientRemoveImport == nil {
return ErrNotSupported
}
return s.Internal.ClientRemoveImport(p0, p1)
}
func (s *FullNodeStub) ClientRemoveImport(p0 context.Context, p1 multistore.StoreID) error {
func (s *FullNodeStub) ClientRemoveImport(p0 context.Context, p1 imports.ID) error {
return ErrNotSupported
}
@@ -961,14 +1001,14 @@ func (s *FullNodeStub) ClientRestartDataTransfer(p0 context.Context, p1 datatran
return ErrNotSupported
}
func (s *FullNodeStruct) ClientRetrieve(p0 context.Context, p1 api.RetrievalOrder, p2 *api.FileRef) error {
func (s *FullNodeStruct) ClientRetrieve(p0 context.Context, p1 RetrievalOrder, p2 *api.FileRef) error {
if s.Internal.ClientRetrieve == nil {
return ErrNotSupported
}
return s.Internal.ClientRetrieve(p0, p1, p2)
}
func (s *FullNodeStub) ClientRetrieve(p0 context.Context, p1 api.RetrievalOrder, p2 *api.FileRef) error {
func (s *FullNodeStub) ClientRetrieve(p0 context.Context, p1 RetrievalOrder, p2 *api.FileRef) error {
return ErrNotSupported
}
@@ -983,14 +1023,14 @@ func (s *FullNodeStub) ClientRetrieveTryRestartInsufficientFunds(p0 context.Cont
return ErrNotSupported
}
func (s *FullNodeStruct) ClientRetrieveWithEvents(p0 context.Context, p1 api.RetrievalOrder, p2 *api.FileRef) (<-chan marketevents.RetrievalEvent, error) {
func (s *FullNodeStruct) ClientRetrieveWithEvents(p0 context.Context, p1 RetrievalOrder, p2 *api.FileRef) (<-chan marketevents.RetrievalEvent, error) {
if s.Internal.ClientRetrieveWithEvents == nil {
return nil, ErrNotSupported
}
return s.Internal.ClientRetrieveWithEvents(p0, p1, p2)
}
func (s *FullNodeStub) ClientRetrieveWithEvents(p0 context.Context, p1 api.RetrievalOrder, p2 *api.FileRef) (<-chan marketevents.RetrievalEvent, error) {
func (s *FullNodeStub) ClientRetrieveWithEvents(p0 context.Context, p1 RetrievalOrder, p2 *api.FileRef) (<-chan marketevents.RetrievalEvent, error) {
return nil, ErrNotSupported
}
@@ -1654,6 +1694,28 @@ func (s *FullNodeStub) StateAccountKey(p0 context.Context, p1 address.Address, p
return *new(address.Address), ErrNotSupported
}
func (s *FullNodeStruct) StateActorCodeCIDs(p0 context.Context, p1 abinetwork.Version) (map[string]cid.Cid, error) {
if s.Internal.StateActorCodeCIDs == nil {
return *new(map[string]cid.Cid), ErrNotSupported
}
return s.Internal.StateActorCodeCIDs(p0, p1)
}
func (s *FullNodeStub) StateActorCodeCIDs(p0 context.Context, p1 abinetwork.Version) (map[string]cid.Cid, error) {
return *new(map[string]cid.Cid), ErrNotSupported
}
func (s *FullNodeStruct) StateActorManifestCID(p0 context.Context, p1 abinetwork.Version) (cid.Cid, error) {
if s.Internal.StateActorManifestCID == nil {
return *new(cid.Cid), ErrNotSupported
}
return s.Internal.StateActorManifestCID(p0, p1)
}
func (s *FullNodeStub) StateActorManifestCID(p0 context.Context, p1 abinetwork.Version) (cid.Cid, error) {
return *new(cid.Cid), ErrNotSupported
}
func (s *FullNodeStruct) StateAllMinerFaults(p0 context.Context, p1 abi.ChainEpoch, p2 types.TipSetKey) ([]*api.Fault, error) {
if s.Internal.StateAllMinerFaults == nil {
return *new([]*api.Fault), ErrNotSupported
@@ -1742,6 +1804,94 @@ func (s *FullNodeStub) StateGetActor(p0 context.Context, p1 address.Address, p2
return nil, ErrNotSupported
}
func (s *FullNodeStruct) StateGetAllocation(p0 context.Context, p1 address.Address, p2 verifregtypes.AllocationId, p3 types.TipSetKey) (*verifregtypes.Allocation, error) {
if s.Internal.StateGetAllocation == nil {
return nil, ErrNotSupported
}
return s.Internal.StateGetAllocation(p0, p1, p2, p3)
}
func (s *FullNodeStub) StateGetAllocation(p0 context.Context, p1 address.Address, p2 verifregtypes.AllocationId, p3 types.TipSetKey) (*verifregtypes.Allocation, error) {
return nil, ErrNotSupported
}
func (s *FullNodeStruct) StateGetAllocationForPendingDeal(p0 context.Context, p1 abi.DealID, p2 types.TipSetKey) (*verifregtypes.Allocation, error) {
if s.Internal.StateGetAllocationForPendingDeal == nil {
return nil, ErrNotSupported
}
return s.Internal.StateGetAllocationForPendingDeal(p0, p1, p2)
}
func (s *FullNodeStub) StateGetAllocationForPendingDeal(p0 context.Context, p1 abi.DealID, p2 types.TipSetKey) (*verifregtypes.Allocation, error) {
return nil, ErrNotSupported
}
func (s *FullNodeStruct) StateGetAllocations(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (map[verifregtypes.AllocationId]verifregtypes.Allocation, error) {
if s.Internal.StateGetAllocations == nil {
return *new(map[verifregtypes.AllocationId]verifregtypes.Allocation), ErrNotSupported
}
return s.Internal.StateGetAllocations(p0, p1, p2)
}
func (s *FullNodeStub) StateGetAllocations(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (map[verifregtypes.AllocationId]verifregtypes.Allocation, error) {
return *new(map[verifregtypes.AllocationId]verifregtypes.Allocation), ErrNotSupported
}
func (s *FullNodeStruct) StateGetClaim(p0 context.Context, p1 address.Address, p2 verifregtypes.ClaimId, p3 types.TipSetKey) (*verifregtypes.Claim, error) {
if s.Internal.StateGetClaim == nil {
return nil, ErrNotSupported
}
return s.Internal.StateGetClaim(p0, p1, p2, p3)
}
func (s *FullNodeStub) StateGetClaim(p0 context.Context, p1 address.Address, p2 verifregtypes.ClaimId, p3 types.TipSetKey) (*verifregtypes.Claim, error) {
return nil, ErrNotSupported
}
func (s *FullNodeStruct) StateGetClaims(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (map[verifregtypes.ClaimId]verifregtypes.Claim, error) {
if s.Internal.StateGetClaims == nil {
return *new(map[verifregtypes.ClaimId]verifregtypes.Claim), ErrNotSupported
}
return s.Internal.StateGetClaims(p0, p1, p2)
}
func (s *FullNodeStub) StateGetClaims(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (map[verifregtypes.ClaimId]verifregtypes.Claim, error) {
return *new(map[verifregtypes.ClaimId]verifregtypes.Claim), ErrNotSupported
}
func (s *FullNodeStruct) StateGetNetworkParams(p0 context.Context) (*api.NetworkParams, error) {
if s.Internal.StateGetNetworkParams == nil {
return nil, ErrNotSupported
}
return s.Internal.StateGetNetworkParams(p0)
}
func (s *FullNodeStub) StateGetNetworkParams(p0 context.Context) (*api.NetworkParams, error) {
return nil, ErrNotSupported
}
func (s *FullNodeStruct) StateGetRandomnessFromBeacon(p0 context.Context, p1 crypto.DomainSeparationTag, p2 abi.ChainEpoch, p3 []byte, p4 types.TipSetKey) (abi.Randomness, error) {
if s.Internal.StateGetRandomnessFromBeacon == nil {
return *new(abi.Randomness), ErrNotSupported
}
return s.Internal.StateGetRandomnessFromBeacon(p0, p1, p2, p3, p4)
}
func (s *FullNodeStub) StateGetRandomnessFromBeacon(p0 context.Context, p1 crypto.DomainSeparationTag, p2 abi.ChainEpoch, p3 []byte, p4 types.TipSetKey) (abi.Randomness, error) {
return *new(abi.Randomness), ErrNotSupported
}
func (s *FullNodeStruct) StateGetRandomnessFromTickets(p0 context.Context, p1 crypto.DomainSeparationTag, p2 abi.ChainEpoch, p3 []byte, p4 types.TipSetKey) (abi.Randomness, error) {
if s.Internal.StateGetRandomnessFromTickets == nil {
return *new(abi.Randomness), ErrNotSupported
}
return s.Internal.StateGetRandomnessFromTickets(p0, p1, p2, p3, p4)
}
func (s *FullNodeStub) StateGetRandomnessFromTickets(p0 context.Context, p1 crypto.DomainSeparationTag, p2 abi.ChainEpoch, p3 []byte, p4 types.TipSetKey) (abi.Randomness, error) {
return *new(abi.Randomness), ErrNotSupported
}
func (s *FullNodeStruct) StateGetReceipt(p0 context.Context, p1 cid.Cid, p2 types.TipSetKey) (*types.MessageReceipt, error) {
if s.Internal.StateGetReceipt == nil {
return nil, ErrNotSupported
@@ -1808,15 +1958,15 @@ func (s *FullNodeStub) StateMarketBalance(p0 context.Context, p1 address.Address
return *new(api.MarketBalance), ErrNotSupported
}
func (s *FullNodeStruct) StateMarketDeals(p0 context.Context, p1 types.TipSetKey) (map[string]api.MarketDeal, error) {
func (s *FullNodeStruct) StateMarketDeals(p0 context.Context, p1 types.TipSetKey) (map[string]*api.MarketDeal, error) {
if s.Internal.StateMarketDeals == nil {
return *new(map[string]api.MarketDeal), ErrNotSupported
return *new(map[string]*api.MarketDeal), ErrNotSupported
}
return s.Internal.StateMarketDeals(p0, p1)
}
func (s *FullNodeStub) StateMarketDeals(p0 context.Context, p1 types.TipSetKey) (map[string]api.MarketDeal, error) {
return *new(map[string]api.MarketDeal), ErrNotSupported
func (s *FullNodeStub) StateMarketDeals(p0 context.Context, p1 types.TipSetKey) (map[string]*api.MarketDeal, error) {
return *new(map[string]*api.MarketDeal), ErrNotSupported
}
func (s *FullNodeStruct) StateMarketParticipants(p0 context.Context, p1 types.TipSetKey) (map[string]api.MarketBalance, error) {
@@ -1885,15 +2035,15 @@ func (s *FullNodeStub) StateMinerFaults(p0 context.Context, p1 address.Address,
return *new(bitfield.BitField), ErrNotSupported
}
func (s *FullNodeStruct) StateMinerInfo(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (miner.MinerInfo, error) {
func (s *FullNodeStruct) StateMinerInfo(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (api.MinerInfo, error) {
if s.Internal.StateMinerInfo == nil {
return *new(miner.MinerInfo), ErrNotSupported
return *new(api.MinerInfo), ErrNotSupported
}
return s.Internal.StateMinerInfo(p0, p1, p2)
}
func (s *FullNodeStub) StateMinerInfo(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (miner.MinerInfo, error) {
return *new(miner.MinerInfo), ErrNotSupported
func (s *FullNodeStub) StateMinerInfo(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (api.MinerInfo, error) {
return *new(api.MinerInfo), ErrNotSupported
}
func (s *FullNodeStruct) StateMinerInitialPledgeCollateral(p0 context.Context, p1 address.Address, p2 miner.SectorPreCommitInfo, p3 types.TipSetKey) (types.BigInt, error) {
@@ -2061,14 +2211,14 @@ func (s *FullNodeStub) StateSearchMsgLimited(p0 context.Context, p1 cid.Cid, p2
return nil, ErrNotSupported
}
func (s *FullNodeStruct) StateSectorExpiration(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (*miner.SectorExpiration, error) {
func (s *FullNodeStruct) StateSectorExpiration(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (*lminer.SectorExpiration, error) {
if s.Internal.StateSectorExpiration == nil {
return nil, ErrNotSupported
}
return s.Internal.StateSectorExpiration(p0, p1, p2, p3)
}
func (s *FullNodeStub) StateSectorExpiration(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (*miner.SectorExpiration, error) {
func (s *FullNodeStub) StateSectorExpiration(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (*lminer.SectorExpiration, error) {
return nil, ErrNotSupported
}
@@ -2083,14 +2233,14 @@ func (s *FullNodeStub) StateSectorGetInfo(p0 context.Context, p1 address.Address
return nil, ErrNotSupported
}
func (s *FullNodeStruct) StateSectorPartition(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (*miner.SectorLocation, error) {
func (s *FullNodeStruct) StateSectorPartition(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (*lminer.SectorLocation, error) {
if s.Internal.StateSectorPartition == nil {
return nil, ErrNotSupported
}
return s.Internal.StateSectorPartition(p0, p1, p2, p3)
}
func (s *FullNodeStub) StateSectorPartition(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (*miner.SectorLocation, error) {
func (s *FullNodeStub) StateSectorPartition(p0 context.Context, p1 address.Address, p2 abi.SectorNumber, p3 types.TipSetKey) (*lminer.SectorLocation, error) {
return nil, ErrNotSupported
}
@@ -2490,6 +2640,17 @@ func (s *GatewayStub) ChainNotify(p0 context.Context) (<-chan []*api.HeadChange,
return nil, ErrNotSupported
}
func (s *GatewayStruct) ChainPutObj(p0 context.Context, p1 blocks.Block) error {
if s.Internal.ChainPutObj == nil {
return ErrNotSupported
}
return s.Internal.ChainPutObj(p0, p1)
}
func (s *GatewayStub) ChainPutObj(p0 context.Context, p1 blocks.Block) error {
return ErrNotSupported
}
func (s *GatewayStruct) ChainReadObj(p0 context.Context, p1 cid.Cid) ([]byte, error) {
if s.Internal.ChainReadObj == nil {
return *new([]byte), ErrNotSupported
@@ -2644,15 +2805,15 @@ func (s *GatewayStub) StateMarketStorageDeal(p0 context.Context, p1 abi.DealID,
return nil, ErrNotSupported
}
func (s *GatewayStruct) StateMinerInfo(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (miner.MinerInfo, error) {
func (s *GatewayStruct) StateMinerInfo(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (api.MinerInfo, error) {
if s.Internal.StateMinerInfo == nil {
return *new(miner.MinerInfo), ErrNotSupported
return *new(api.MinerInfo), ErrNotSupported
}
return s.Internal.StateMinerInfo(p0, p1, p2)
}
func (s *GatewayStub) StateMinerInfo(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (miner.MinerInfo, error) {
return *new(miner.MinerInfo), ErrNotSupported
func (s *GatewayStub) StateMinerInfo(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (api.MinerInfo, error) {
return *new(api.MinerInfo), ErrNotSupported
}
func (s *GatewayStruct) StateMinerPower(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (*api.MinerPower, error) {
@@ -2677,15 +2838,15 @@ func (s *GatewayStub) StateMinerProvingDeadline(p0 context.Context, p1 address.A
return nil, ErrNotSupported
}
func (s *GatewayStruct) StateNetworkVersion(p0 context.Context, p1 types.TipSetKey) (network.Version, error) {
func (s *GatewayStruct) StateNetworkVersion(p0 context.Context, p1 types.TipSetKey) (abinetwork.Version, error) {
if s.Internal.StateNetworkVersion == nil {
return *new(network.Version), ErrNotSupported
return *new(abinetwork.Version), ErrNotSupported
}
return s.Internal.StateNetworkVersion(p0, p1)
}
func (s *GatewayStub) StateNetworkVersion(p0 context.Context, p1 types.TipSetKey) (network.Version, error) {
return *new(network.Version), ErrNotSupported
func (s *GatewayStub) StateNetworkVersion(p0 context.Context, p1 types.TipSetKey) (abinetwork.Version, error) {
return *new(abinetwork.Version), ErrNotSupported
}
func (s *GatewayStruct) StateSearchMsg(p0 context.Context, p1 cid.Cid) (*api.MsgLookup, error) {
+312 -24
View File
@@ -7,6 +7,16 @@ package v0mocks
import (
context "context"
reflect "reflect"
time "time"
gomock "github.com/golang/mock/gomock"
uuid "github.com/google/uuid"
blocks "github.com/ipfs/go-block-format"
cid "github.com/ipfs/go-cid"
metrics "github.com/libp2p/go-libp2p/core/metrics"
network0 "github.com/libp2p/go-libp2p/core/network"
peer "github.com/libp2p/go-libp2p/core/peer"
protocol "github.com/libp2p/go-libp2p/core/protocol"
address "github.com/filecoin-project/go-address"
bitfield "github.com/filecoin-project/go-bitfield"
@@ -14,27 +24,24 @@ import (
retrievalmarket "github.com/filecoin-project/go-fil-markets/retrievalmarket"
storagemarket "github.com/filecoin-project/go-fil-markets/storagemarket"
auth "github.com/filecoin-project/go-jsonrpc/auth"
multistore "github.com/filecoin-project/go-multistore"
abi "github.com/filecoin-project/go-state-types/abi"
big "github.com/filecoin-project/go-state-types/big"
paych "github.com/filecoin-project/go-state-types/builtin/v8/paych"
miner "github.com/filecoin-project/go-state-types/builtin/v9/miner"
verifreg "github.com/filecoin-project/go-state-types/builtin/v9/verifreg"
crypto "github.com/filecoin-project/go-state-types/crypto"
dline "github.com/filecoin-project/go-state-types/dline"
network "github.com/filecoin-project/go-state-types/network"
api "github.com/filecoin-project/lotus/api"
apitypes "github.com/filecoin-project/lotus/api/types"
miner "github.com/filecoin-project/lotus/chain/actors/builtin/miner"
v0api "github.com/filecoin-project/lotus/api/v0api"
miner0 "github.com/filecoin-project/lotus/chain/actors/builtin/miner"
types "github.com/filecoin-project/lotus/chain/types"
alerting "github.com/filecoin-project/lotus/journal/alerting"
marketevents "github.com/filecoin-project/lotus/markets/loggers"
dtypes "github.com/filecoin-project/lotus/node/modules/dtypes"
miner0 "github.com/filecoin-project/specs-actors/actors/builtin/miner"
paych "github.com/filecoin-project/specs-actors/actors/builtin/paych"
gomock "github.com/golang/mock/gomock"
uuid "github.com/google/uuid"
cid "github.com/ipfs/go-cid"
metrics "github.com/libp2p/go-libp2p-core/metrics"
network0 "github.com/libp2p/go-libp2p-core/network"
peer "github.com/libp2p/go-libp2p-core/peer"
protocol "github.com/libp2p/go-libp2p-core/protocol"
imports "github.com/filecoin-project/lotus/node/repo/imports"
)
// MockFullNode is a mock of FullNode interface.
@@ -374,6 +381,20 @@ func (mr *MockFullNodeMockRecorder) ChainNotify(arg0 interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChainNotify", reflect.TypeOf((*MockFullNode)(nil).ChainNotify), arg0)
}
// ChainPutObj mocks base method.
func (m *MockFullNode) ChainPutObj(arg0 context.Context, arg1 blocks.Block) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ChainPutObj", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// ChainPutObj indicates an expected call of ChainPutObj.
func (mr *MockFullNodeMockRecorder) ChainPutObj(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChainPutObj", reflect.TypeOf((*MockFullNode)(nil).ChainPutObj), arg0, arg1)
}
// ChainReadObj mocks base method.
func (m *MockFullNode) ChainReadObj(arg0 context.Context, arg1 cid.Cid) ([]byte, error) {
m.ctrl.T.Helper()
@@ -731,7 +752,7 @@ func (mr *MockFullNodeMockRecorder) ClientQueryAsk(arg0, arg1, arg2 interface{})
}
// ClientRemoveImport mocks base method.
func (m *MockFullNode) ClientRemoveImport(arg0 context.Context, arg1 multistore.StoreID) error {
func (m *MockFullNode) ClientRemoveImport(arg0 context.Context, arg1 imports.ID) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ClientRemoveImport", arg0, arg1)
ret0, _ := ret[0].(error)
@@ -759,7 +780,7 @@ func (mr *MockFullNodeMockRecorder) ClientRestartDataTransfer(arg0, arg1, arg2,
}
// ClientRetrieve mocks base method.
func (m *MockFullNode) ClientRetrieve(arg0 context.Context, arg1 api.RetrievalOrder, arg2 *api.FileRef) error {
func (m *MockFullNode) ClientRetrieve(arg0 context.Context, arg1 v0api.RetrievalOrder, arg2 *api.FileRef) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ClientRetrieve", arg0, arg1, arg2)
ret0, _ := ret[0].(error)
@@ -787,7 +808,7 @@ func (mr *MockFullNodeMockRecorder) ClientRetrieveTryRestartInsufficientFunds(ar
}
// ClientRetrieveWithEvents mocks base method.
func (m *MockFullNode) ClientRetrieveWithEvents(arg0 context.Context, arg1 api.RetrievalOrder, arg2 *api.FileRef) (<-chan marketevents.RetrievalEvent, error) {
func (m *MockFullNode) ClientRetrieveWithEvents(arg0 context.Context, arg1 v0api.RetrievalOrder, arg2 *api.FileRef) (<-chan marketevents.RetrievalEvent, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ClientRetrieveWithEvents", arg0, arg1, arg2)
ret0, _ := ret[0].(<-chan marketevents.RetrievalEvent)
@@ -950,6 +971,21 @@ func (mr *MockFullNodeMockRecorder) ID(arg0 interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ID", reflect.TypeOf((*MockFullNode)(nil).ID), arg0)
}
// LogAlerts mocks base method.
func (m *MockFullNode) LogAlerts(arg0 context.Context) ([]alerting.Alert, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "LogAlerts", arg0)
ret0, _ := ret[0].([]alerting.Alert)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// LogAlerts indicates an expected call of LogAlerts.
func (mr *MockFullNodeMockRecorder) LogAlerts(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LogAlerts", reflect.TypeOf((*MockFullNode)(nil).LogAlerts), arg0)
}
// LogList mocks base method.
func (m *MockFullNode) LogList(arg0 context.Context) ([]string, error) {
m.ctrl.T.Helper()
@@ -1707,6 +1743,21 @@ func (mr *MockFullNodeMockRecorder) NetFindPeer(arg0, arg1 interface{}) *gomock.
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetFindPeer", reflect.TypeOf((*MockFullNode)(nil).NetFindPeer), arg0, arg1)
}
// NetLimit mocks base method.
func (m *MockFullNode) NetLimit(arg0 context.Context, arg1 string) (api.NetLimit, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "NetLimit", arg0, arg1)
ret0, _ := ret[0].(api.NetLimit)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// NetLimit indicates an expected call of NetLimit.
func (mr *MockFullNodeMockRecorder) NetLimit(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetLimit", reflect.TypeOf((*MockFullNode)(nil).NetLimit), arg0, arg1)
}
// NetPeerInfo mocks base method.
func (m *MockFullNode) NetPeerInfo(arg0 context.Context, arg1 peer.ID) (*api.ExtendedPeerInfo, error) {
m.ctrl.T.Helper()
@@ -1737,6 +1788,64 @@ func (mr *MockFullNodeMockRecorder) NetPeers(arg0 interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetPeers", reflect.TypeOf((*MockFullNode)(nil).NetPeers), arg0)
}
// NetPing mocks base method.
func (m *MockFullNode) NetPing(arg0 context.Context, arg1 peer.ID) (time.Duration, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "NetPing", arg0, arg1)
ret0, _ := ret[0].(time.Duration)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// NetPing indicates an expected call of NetPing.
func (mr *MockFullNodeMockRecorder) NetPing(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetPing", reflect.TypeOf((*MockFullNode)(nil).NetPing), arg0, arg1)
}
// NetProtectAdd mocks base method.
func (m *MockFullNode) NetProtectAdd(arg0 context.Context, arg1 []peer.ID) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "NetProtectAdd", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// NetProtectAdd indicates an expected call of NetProtectAdd.
func (mr *MockFullNodeMockRecorder) NetProtectAdd(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetProtectAdd", reflect.TypeOf((*MockFullNode)(nil).NetProtectAdd), arg0, arg1)
}
// NetProtectList mocks base method.
func (m *MockFullNode) NetProtectList(arg0 context.Context) ([]peer.ID, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "NetProtectList", arg0)
ret0, _ := ret[0].([]peer.ID)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// NetProtectList indicates an expected call of NetProtectList.
func (mr *MockFullNodeMockRecorder) NetProtectList(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetProtectList", reflect.TypeOf((*MockFullNode)(nil).NetProtectList), arg0)
}
// NetProtectRemove mocks base method.
func (m *MockFullNode) NetProtectRemove(arg0 context.Context, arg1 []peer.ID) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "NetProtectRemove", arg0, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// NetProtectRemove indicates an expected call of NetProtectRemove.
func (mr *MockFullNodeMockRecorder) NetProtectRemove(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetProtectRemove", reflect.TypeOf((*MockFullNode)(nil).NetProtectRemove), arg0, arg1)
}
// NetPubsubScores mocks base method.
func (m *MockFullNode) NetPubsubScores(arg0 context.Context) ([]api.PubsubScore, error) {
m.ctrl.T.Helper()
@@ -1752,6 +1861,35 @@ func (mr *MockFullNodeMockRecorder) NetPubsubScores(arg0 interface{}) *gomock.Ca
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetPubsubScores", reflect.TypeOf((*MockFullNode)(nil).NetPubsubScores), arg0)
}
// NetSetLimit mocks base method.
func (m *MockFullNode) NetSetLimit(arg0 context.Context, arg1 string, arg2 api.NetLimit) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "NetSetLimit", arg0, arg1, arg2)
ret0, _ := ret[0].(error)
return ret0
}
// NetSetLimit indicates an expected call of NetSetLimit.
func (mr *MockFullNodeMockRecorder) NetSetLimit(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetSetLimit", reflect.TypeOf((*MockFullNode)(nil).NetSetLimit), arg0, arg1, arg2)
}
// NetStat mocks base method.
func (m *MockFullNode) NetStat(arg0 context.Context, arg1 string) (api.NetStat, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "NetStat", arg0, arg1)
ret0, _ := ret[0].(api.NetStat)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// NetStat indicates an expected call of NetStat.
func (mr *MockFullNodeMockRecorder) NetStat(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NetStat", reflect.TypeOf((*MockFullNode)(nil).NetStat), arg0, arg1)
}
// PaychAllocateLane mocks base method.
func (m *MockFullNode) PaychAllocateLane(arg0 context.Context, arg1 address.Address) (uint64, error) {
m.ctrl.T.Helper()
@@ -2035,6 +2173,36 @@ func (mr *MockFullNodeMockRecorder) StateAccountKey(arg0, arg1, arg2 interface{}
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateAccountKey", reflect.TypeOf((*MockFullNode)(nil).StateAccountKey), arg0, arg1, arg2)
}
// StateActorCodeCIDs mocks base method.
func (m *MockFullNode) StateActorCodeCIDs(arg0 context.Context, arg1 network.Version) (map[string]cid.Cid, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StateActorCodeCIDs", arg0, arg1)
ret0, _ := ret[0].(map[string]cid.Cid)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// StateActorCodeCIDs indicates an expected call of StateActorCodeCIDs.
func (mr *MockFullNodeMockRecorder) StateActorCodeCIDs(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateActorCodeCIDs", reflect.TypeOf((*MockFullNode)(nil).StateActorCodeCIDs), arg0, arg1)
}
// StateActorManifestCID mocks base method.
func (m *MockFullNode) StateActorManifestCID(arg0 context.Context, arg1 network.Version) (cid.Cid, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StateActorManifestCID", arg0, arg1)
ret0, _ := ret[0].(cid.Cid)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// StateActorManifestCID indicates an expected call of StateActorManifestCID.
func (mr *MockFullNodeMockRecorder) StateActorManifestCID(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateActorManifestCID", reflect.TypeOf((*MockFullNode)(nil).StateActorManifestCID), arg0, arg1)
}
// StateAllMinerFaults mocks base method.
func (m *MockFullNode) StateAllMinerFaults(arg0 context.Context, arg1 abi.ChainEpoch, arg2 types.TipSetKey) ([]*api.Fault, error) {
m.ctrl.T.Helper()
@@ -2155,6 +2323,126 @@ func (mr *MockFullNodeMockRecorder) StateGetActor(arg0, arg1, arg2 interface{})
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateGetActor", reflect.TypeOf((*MockFullNode)(nil).StateGetActor), arg0, arg1, arg2)
}
// StateGetAllocation mocks base method.
func (m *MockFullNode) StateGetAllocation(arg0 context.Context, arg1 address.Address, arg2 verifreg.AllocationId, arg3 types.TipSetKey) (*verifreg.Allocation, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StateGetAllocation", arg0, arg1, arg2, arg3)
ret0, _ := ret[0].(*verifreg.Allocation)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// StateGetAllocation indicates an expected call of StateGetAllocation.
func (mr *MockFullNodeMockRecorder) StateGetAllocation(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateGetAllocation", reflect.TypeOf((*MockFullNode)(nil).StateGetAllocation), arg0, arg1, arg2, arg3)
}
// StateGetAllocationForPendingDeal mocks base method.
func (m *MockFullNode) StateGetAllocationForPendingDeal(arg0 context.Context, arg1 abi.DealID, arg2 types.TipSetKey) (*verifreg.Allocation, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StateGetAllocationForPendingDeal", arg0, arg1, arg2)
ret0, _ := ret[0].(*verifreg.Allocation)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// StateGetAllocationForPendingDeal indicates an expected call of StateGetAllocationForPendingDeal.
func (mr *MockFullNodeMockRecorder) StateGetAllocationForPendingDeal(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateGetAllocationForPendingDeal", reflect.TypeOf((*MockFullNode)(nil).StateGetAllocationForPendingDeal), arg0, arg1, arg2)
}
// StateGetAllocations mocks base method.
func (m *MockFullNode) StateGetAllocations(arg0 context.Context, arg1 address.Address, arg2 types.TipSetKey) (map[verifreg.AllocationId]verifreg.Allocation, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StateGetAllocations", arg0, arg1, arg2)
ret0, _ := ret[0].(map[verifreg.AllocationId]verifreg.Allocation)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// StateGetAllocations indicates an expected call of StateGetAllocations.
func (mr *MockFullNodeMockRecorder) StateGetAllocations(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateGetAllocations", reflect.TypeOf((*MockFullNode)(nil).StateGetAllocations), arg0, arg1, arg2)
}
// StateGetClaim mocks base method.
func (m *MockFullNode) StateGetClaim(arg0 context.Context, arg1 address.Address, arg2 verifreg.ClaimId, arg3 types.TipSetKey) (*verifreg.Claim, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StateGetClaim", arg0, arg1, arg2, arg3)
ret0, _ := ret[0].(*verifreg.Claim)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// StateGetClaim indicates an expected call of StateGetClaim.
func (mr *MockFullNodeMockRecorder) StateGetClaim(arg0, arg1, arg2, arg3 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateGetClaim", reflect.TypeOf((*MockFullNode)(nil).StateGetClaim), arg0, arg1, arg2, arg3)
}
// StateGetClaims mocks base method.
func (m *MockFullNode) StateGetClaims(arg0 context.Context, arg1 address.Address, arg2 types.TipSetKey) (map[verifreg.ClaimId]verifreg.Claim, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StateGetClaims", arg0, arg1, arg2)
ret0, _ := ret[0].(map[verifreg.ClaimId]verifreg.Claim)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// StateGetClaims indicates an expected call of StateGetClaims.
func (mr *MockFullNodeMockRecorder) StateGetClaims(arg0, arg1, arg2 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateGetClaims", reflect.TypeOf((*MockFullNode)(nil).StateGetClaims), arg0, arg1, arg2)
}
// StateGetNetworkParams mocks base method.
func (m *MockFullNode) StateGetNetworkParams(arg0 context.Context) (*api.NetworkParams, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StateGetNetworkParams", arg0)
ret0, _ := ret[0].(*api.NetworkParams)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// StateGetNetworkParams indicates an expected call of StateGetNetworkParams.
func (mr *MockFullNodeMockRecorder) StateGetNetworkParams(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateGetNetworkParams", reflect.TypeOf((*MockFullNode)(nil).StateGetNetworkParams), arg0)
}
// StateGetRandomnessFromBeacon mocks base method.
func (m *MockFullNode) StateGetRandomnessFromBeacon(arg0 context.Context, arg1 crypto.DomainSeparationTag, arg2 abi.ChainEpoch, arg3 []byte, arg4 types.TipSetKey) (abi.Randomness, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StateGetRandomnessFromBeacon", arg0, arg1, arg2, arg3, arg4)
ret0, _ := ret[0].(abi.Randomness)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// StateGetRandomnessFromBeacon indicates an expected call of StateGetRandomnessFromBeacon.
func (mr *MockFullNodeMockRecorder) StateGetRandomnessFromBeacon(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateGetRandomnessFromBeacon", reflect.TypeOf((*MockFullNode)(nil).StateGetRandomnessFromBeacon), arg0, arg1, arg2, arg3, arg4)
}
// StateGetRandomnessFromTickets mocks base method.
func (m *MockFullNode) StateGetRandomnessFromTickets(arg0 context.Context, arg1 crypto.DomainSeparationTag, arg2 abi.ChainEpoch, arg3 []byte, arg4 types.TipSetKey) (abi.Randomness, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StateGetRandomnessFromTickets", arg0, arg1, arg2, arg3, arg4)
ret0, _ := ret[0].(abi.Randomness)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// StateGetRandomnessFromTickets indicates an expected call of StateGetRandomnessFromTickets.
func (mr *MockFullNodeMockRecorder) StateGetRandomnessFromTickets(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateGetRandomnessFromTickets", reflect.TypeOf((*MockFullNode)(nil).StateGetRandomnessFromTickets), arg0, arg1, arg2, arg3, arg4)
}
// StateGetReceipt mocks base method.
func (m *MockFullNode) StateGetReceipt(arg0 context.Context, arg1 cid.Cid, arg2 types.TipSetKey) (*types.MessageReceipt, error) {
m.ctrl.T.Helper()
@@ -2246,10 +2534,10 @@ func (mr *MockFullNodeMockRecorder) StateMarketBalance(arg0, arg1, arg2 interfac
}
// StateMarketDeals mocks base method.
func (m *MockFullNode) StateMarketDeals(arg0 context.Context, arg1 types.TipSetKey) (map[string]api.MarketDeal, error) {
func (m *MockFullNode) StateMarketDeals(arg0 context.Context, arg1 types.TipSetKey) (map[string]*api.MarketDeal, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StateMarketDeals", arg0, arg1)
ret0, _ := ret[0].(map[string]api.MarketDeal)
ret0, _ := ret[0].(map[string]*api.MarketDeal)
ret1, _ := ret[1].(error)
return ret0, ret1
}
@@ -2351,10 +2639,10 @@ func (mr *MockFullNodeMockRecorder) StateMinerFaults(arg0, arg1, arg2 interface{
}
// StateMinerInfo mocks base method.
func (m *MockFullNode) StateMinerInfo(arg0 context.Context, arg1 address.Address, arg2 types.TipSetKey) (miner.MinerInfo, error) {
func (m *MockFullNode) StateMinerInfo(arg0 context.Context, arg1 address.Address, arg2 types.TipSetKey) (api.MinerInfo, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StateMinerInfo", arg0, arg1, arg2)
ret0, _ := ret[0].(miner.MinerInfo)
ret0, _ := ret[0].(api.MinerInfo)
ret1, _ := ret[1].(error)
return ret0, ret1
}
@@ -2366,7 +2654,7 @@ func (mr *MockFullNodeMockRecorder) StateMinerInfo(arg0, arg1, arg2 interface{})
}
// StateMinerInitialPledgeCollateral mocks base method.
func (m *MockFullNode) StateMinerInitialPledgeCollateral(arg0 context.Context, arg1 address.Address, arg2 miner0.SectorPreCommitInfo, arg3 types.TipSetKey) (big.Int, error) {
func (m *MockFullNode) StateMinerInitialPledgeCollateral(arg0 context.Context, arg1 address.Address, arg2 miner.SectorPreCommitInfo, arg3 types.TipSetKey) (big.Int, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StateMinerInitialPledgeCollateral", arg0, arg1, arg2, arg3)
ret0, _ := ret[0].(big.Int)
@@ -2411,7 +2699,7 @@ func (mr *MockFullNodeMockRecorder) StateMinerPower(arg0, arg1, arg2 interface{}
}
// StateMinerPreCommitDepositForPower mocks base method.
func (m *MockFullNode) StateMinerPreCommitDepositForPower(arg0 context.Context, arg1 address.Address, arg2 miner0.SectorPreCommitInfo, arg3 types.TipSetKey) (big.Int, error) {
func (m *MockFullNode) StateMinerPreCommitDepositForPower(arg0 context.Context, arg1 address.Address, arg2 miner.SectorPreCommitInfo, arg3 types.TipSetKey) (big.Int, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StateMinerPreCommitDepositForPower", arg0, arg1, arg2, arg3)
ret0, _ := ret[0].(big.Int)
@@ -2591,10 +2879,10 @@ func (mr *MockFullNodeMockRecorder) StateSearchMsgLimited(arg0, arg1, arg2 inter
}
// StateSectorExpiration mocks base method.
func (m *MockFullNode) StateSectorExpiration(arg0 context.Context, arg1 address.Address, arg2 abi.SectorNumber, arg3 types.TipSetKey) (*miner.SectorExpiration, error) {
func (m *MockFullNode) StateSectorExpiration(arg0 context.Context, arg1 address.Address, arg2 abi.SectorNumber, arg3 types.TipSetKey) (*miner0.SectorExpiration, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StateSectorExpiration", arg0, arg1, arg2, arg3)
ret0, _ := ret[0].(*miner.SectorExpiration)
ret0, _ := ret[0].(*miner0.SectorExpiration)
ret1, _ := ret[1].(error)
return ret0, ret1
}
@@ -2621,10 +2909,10 @@ func (mr *MockFullNodeMockRecorder) StateSectorGetInfo(arg0, arg1, arg2, arg3 in
}
// StateSectorPartition mocks base method.
func (m *MockFullNode) StateSectorPartition(arg0 context.Context, arg1 address.Address, arg2 abi.SectorNumber, arg3 types.TipSetKey) (*miner.SectorLocation, error) {
func (m *MockFullNode) StateSectorPartition(arg0 context.Context, arg1 address.Address, arg2 abi.SectorNumber, arg3 types.TipSetKey) (*miner0.SectorLocation, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "StateSectorPartition", arg0, arg1, arg2, arg3)
ret0, _ := ret[0].(*miner.SectorLocation)
ret0, _ := ret[0].(*miner0.SectorLocation)
ret1, _ := ret[1].(error)
return ret0, ret1
}
+187 -5
View File
@@ -3,22 +3,40 @@ package v0api
import (
"context"
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/lotus/chain/types"
"github.com/ipfs/go-cid"
"github.com/libp2p/go-libp2p/core/peer"
"golang.org/x/xerrors"
"github.com/ipfs/go-cid"
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-fil-markets/retrievalmarket"
"github.com/filecoin-project/go-fil-markets/storagemarket"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/big"
"github.com/filecoin-project/go-state-types/builtin/v9/miner"
"github.com/filecoin-project/go-state-types/crypto"
"github.com/filecoin-project/lotus/api"
"github.com/filecoin-project/lotus/api/v1api"
"github.com/filecoin-project/lotus/chain/types"
marketevents "github.com/filecoin-project/lotus/markets/loggers"
)
type WrapperV1Full struct {
v1api.FullNode
}
func (w *WrapperV1Full) StateSectorPreCommitInfo(ctx context.Context, maddr address.Address, s abi.SectorNumber, tsk types.TipSetKey) (miner.SectorPreCommitOnChainInfo, error) {
pi, err := w.FullNode.StateSectorPreCommitInfo(ctx, maddr, s, tsk)
if err != nil {
return miner.SectorPreCommitOnChainInfo{}, err
}
if pi == nil {
return miner.SectorPreCommitOnChainInfo{}, xerrors.Errorf("precommit info does not exist")
}
return *pi, nil
}
func (w *WrapperV1Full) StateSearchMsg(ctx context.Context, msg cid.Cid) (*api.MsgLookup, error) {
return w.FullNode.StateSearchMsg(ctx, types.EmptyTSK, msg, api.LookbackNoLimit, true)
}
@@ -106,7 +124,7 @@ func (w *WrapperV1Full) MsigApproveTxnHash(ctx context.Context, msig address.Add
}
func (w *WrapperV1Full) MsigCancel(ctx context.Context, msig address.Address, txID uint64, to address.Address, amt types.BigInt, src address.Address, method uint64, params []byte) (cid.Cid, error) {
p, err := w.FullNode.MsigCancel(ctx, msig, txID, to, amt, src, method, params)
p, err := w.FullNode.MsigCancelTxnHash(ctx, msig, txID, to, amt, src, method, params)
if err != nil {
return cid.Undef, xerrors.Errorf("creating prototype: %w", err)
}
@@ -184,4 +202,168 @@ func (w *WrapperV1Full) MsigRemoveSigner(ctx context.Context, msig address.Addre
return w.executePrototype(ctx, p)
}
func (w *WrapperV1Full) ChainGetRandomnessFromTickets(ctx context.Context, tsk types.TipSetKey, personalization crypto.DomainSeparationTag, randEpoch abi.ChainEpoch, entropy []byte) (abi.Randomness, error) {
return w.StateGetRandomnessFromTickets(ctx, personalization, randEpoch, entropy, tsk)
}
func (w *WrapperV1Full) ChainGetRandomnessFromBeacon(ctx context.Context, tsk types.TipSetKey, personalization crypto.DomainSeparationTag, randEpoch abi.ChainEpoch, entropy []byte) (abi.Randomness, error) {
return w.StateGetRandomnessFromBeacon(ctx, personalization, randEpoch, entropy, tsk)
}
func (w *WrapperV1Full) ClientRetrieve(ctx context.Context, order RetrievalOrder, ref *api.FileRef) error {
events := make(chan marketevents.RetrievalEvent)
go w.clientRetrieve(ctx, order, ref, events)
for {
select {
case evt, ok := <-events:
if !ok { // done successfully
return nil
}
if evt.Err != "" {
return xerrors.Errorf("retrieval failed: %s", evt.Err)
}
case <-ctx.Done():
return xerrors.Errorf("retrieval timed out")
}
}
}
func (w *WrapperV1Full) ClientRetrieveWithEvents(ctx context.Context, order RetrievalOrder, ref *api.FileRef) (<-chan marketevents.RetrievalEvent, error) {
events := make(chan marketevents.RetrievalEvent)
go w.clientRetrieve(ctx, order, ref, events)
return events, nil
}
func readSubscribeEvents(ctx context.Context, dealID retrievalmarket.DealID, subscribeEvents <-chan api.RetrievalInfo, events chan marketevents.RetrievalEvent) error {
for {
var subscribeEvent api.RetrievalInfo
var evt retrievalmarket.ClientEvent
select {
case <-ctx.Done():
return xerrors.New("Retrieval Timed Out")
case subscribeEvent = <-subscribeEvents:
if subscribeEvent.ID != dealID {
// we can't check the deal ID ahead of time because:
// 1. We need to subscribe before retrieving.
// 2. We won't know the deal ID until after retrieving.
continue
}
if subscribeEvent.Event != nil {
evt = *subscribeEvent.Event
}
}
select {
case <-ctx.Done():
return xerrors.New("Retrieval Timed Out")
case events <- marketevents.RetrievalEvent{
Event: evt,
Status: subscribeEvent.Status,
BytesReceived: subscribeEvent.BytesReceived,
FundsSpent: subscribeEvent.TotalPaid,
}:
}
switch subscribeEvent.Status {
case retrievalmarket.DealStatusCompleted:
return nil
case retrievalmarket.DealStatusRejected:
return xerrors.Errorf("Retrieval Proposal Rejected: %s", subscribeEvent.Message)
case
retrievalmarket.DealStatusDealNotFound,
retrievalmarket.DealStatusErrored:
return xerrors.Errorf("Retrieval Error: %s", subscribeEvent.Message)
}
}
}
func (w *WrapperV1Full) clientRetrieve(ctx context.Context, order RetrievalOrder, ref *api.FileRef, events chan marketevents.RetrievalEvent) {
defer close(events)
finish := func(e error) {
if e != nil {
events <- marketevents.RetrievalEvent{Err: e.Error(), FundsSpent: big.Zero()}
}
}
var dealID retrievalmarket.DealID
if order.FromLocalCAR == "" {
// Subscribe to events before retrieving to avoid losing events.
subscribeCtx, cancel := context.WithCancel(ctx)
defer cancel()
retrievalEvents, err := w.ClientGetRetrievalUpdates(subscribeCtx)
if err != nil {
finish(xerrors.Errorf("GetRetrievalUpdates failed: %w", err))
return
}
retrievalRes, err := w.FullNode.ClientRetrieve(ctx, api.RetrievalOrder{
Root: order.Root,
Piece: order.Piece,
Size: order.Size,
Total: order.Total,
UnsealPrice: order.UnsealPrice,
PaymentInterval: order.PaymentInterval,
PaymentIntervalIncrease: order.PaymentIntervalIncrease,
Client: order.Client,
Miner: order.Miner,
MinerPeer: order.MinerPeer,
})
if err != nil {
finish(xerrors.Errorf("Retrieve failed: %w", err))
return
}
dealID = retrievalRes.DealID
err = readSubscribeEvents(ctx, retrievalRes.DealID, retrievalEvents, events)
if err != nil {
finish(xerrors.Errorf("Retrieve: %w", err))
return
}
}
// If ref is nil, it only fetches the data into the configured blockstore.
if ref == nil {
finish(nil)
return
}
eref := api.ExportRef{
Root: order.Root,
FromLocalCAR: order.FromLocalCAR,
DealID: dealID,
}
if order.DatamodelPathSelector != nil {
s := api.Selector(*order.DatamodelPathSelector)
eref.DAGs = append(eref.DAGs, api.DagSpec{
DataSelector: &s,
ExportMerkleProof: true,
})
}
finish(w.ClientExport(ctx, eref, *ref))
}
func (w *WrapperV1Full) PaychGet(ctx context.Context, from, to address.Address, amt types.BigInt) (*api.ChannelInfo, error) {
return w.FullNode.PaychFund(ctx, from, to, amt)
}
func (w *WrapperV1Full) ClientQueryAsk(ctx context.Context, p peer.ID, miner address.Address) (*storagemarket.StorageAsk, error) {
a, err := w.FullNode.ClientQueryAsk(ctx, p, miner)
if err != nil {
return nil, err
}
return a.Response, nil
}
func (w *WrapperV1Full) BeaconGetEntry(ctx context.Context, epoch abi.ChainEpoch) (*types.BeaconEntry, error) {
return w.StateGetBeaconEntry(ctx, epoch)
}
var _ FullNode = &WrapperV1Full{}
+2
View File
@@ -7,6 +7,8 @@ import (
type FullNode = api.FullNode
type FullNodeStruct = api.FullNodeStruct
type RawFullNodeAPI FullNode
func PermissionedFullAPI(a FullNode) FullNode {
return api.PermissionedFullAPI(a)
}
+5 -5
View File
@@ -3,7 +3,7 @@ package api
import (
"fmt"
xerrors "golang.org/x/xerrors"
"golang.org/x/xerrors"
)
type Version uint32
@@ -54,11 +54,11 @@ func VersionForType(nodeType NodeType) (Version, error) {
// semver versions of the rpc api exposed
var (
FullAPIVersion0 = newVer(1, 3, 1)
FullAPIVersion1 = newVer(2, 1, 1)
FullAPIVersion0 = newVer(1, 5, 0)
FullAPIVersion1 = newVer(2, 3, 0)
MinerAPIVersion0 = newVer(1, 2, 0)
WorkerAPIVersion0 = newVer(1, 1, 0)
MinerAPIVersion0 = newVer(1, 5, 0)
WorkerAPIVersion0 = newVer(1, 6, 0)
)
//nolint:varcheck,deadcode
+18 -11
View File
@@ -11,6 +11,7 @@ import (
type ChainIO interface {
ChainReadObj(context.Context, cid.Cid) ([]byte, error)
ChainHasObj(context.Context, cid.Cid) (bool, error)
ChainPutObj(context.Context, blocks.Block) error
}
type apiBlockstore struct {
@@ -25,36 +26,42 @@ func NewAPIBlockstore(cio ChainIO) Blockstore {
return Adapt(bs) // return an adapted blockstore.
}
func (a *apiBlockstore) DeleteBlock(cid.Cid) error {
func (a *apiBlockstore) DeleteBlock(context.Context, cid.Cid) error {
return xerrors.New("not supported")
}
func (a *apiBlockstore) Has(c cid.Cid) (bool, error) {
return a.api.ChainHasObj(context.TODO(), c)
func (a *apiBlockstore) Has(ctx context.Context, c cid.Cid) (bool, error) {
return a.api.ChainHasObj(ctx, c)
}
func (a *apiBlockstore) Get(c cid.Cid) (blocks.Block, error) {
bb, err := a.api.ChainReadObj(context.TODO(), c)
func (a *apiBlockstore) Get(ctx context.Context, c cid.Cid) (blocks.Block, error) {
bb, err := a.api.ChainReadObj(ctx, c)
if err != nil {
return nil, err
}
return blocks.NewBlockWithCid(bb, c)
}
func (a *apiBlockstore) GetSize(c cid.Cid) (int, error) {
bb, err := a.api.ChainReadObj(context.TODO(), c)
func (a *apiBlockstore) GetSize(ctx context.Context, c cid.Cid) (int, error) {
bb, err := a.api.ChainReadObj(ctx, c)
if err != nil {
return 0, err
}
return len(bb), nil
}
func (a *apiBlockstore) Put(blocks.Block) error {
return xerrors.New("not supported")
func (a *apiBlockstore) Put(ctx context.Context, block blocks.Block) error {
return a.api.ChainPutObj(ctx, block)
}
func (a *apiBlockstore) PutMany([]blocks.Block) error {
return xerrors.New("not supported")
func (a *apiBlockstore) PutMany(ctx context.Context, blocks []blocks.Block) error {
for _, block := range blocks {
err := a.api.ChainPutObj(ctx, block)
if err != nil {
return err
}
}
return nil
}
func (a *apiBlockstore) AllKeysChan(ctx context.Context) (<-chan cid.Cid, error) {
+266
View File
@@ -0,0 +1,266 @@
package blockstore
import (
"context"
"sync"
"time"
block "github.com/ipfs/go-block-format"
"github.com/ipfs/go-cid"
ipld "github.com/ipfs/go-ipld-format"
"golang.org/x/xerrors"
)
// autolog is a logger for the autobatching blockstore. It is subscoped from the
// blockstore logger.
var autolog = log.Named("auto")
// contains the same set of blocks twice, once as an ordered list for flushing, and as a map for fast access
type blockBatch struct {
blockList []block.Block
blockMap map[cid.Cid]block.Block
}
type AutobatchBlockstore struct {
// TODO: drop if memory consumption is too high
addedCids map[cid.Cid]struct{}
stateLock sync.Mutex
bufferedBatch blockBatch
flushingBatch blockBatch
flushErr error
flushCh chan struct{}
doFlushLock sync.Mutex
flushRetryDelay time.Duration
doneCh chan struct{}
shutdown context.CancelFunc
backingBs Blockstore
bufferCapacity int
bufferSize int
}
func NewAutobatch(ctx context.Context, backingBs Blockstore, bufferCapacity int) *AutobatchBlockstore {
ctx, cancel := context.WithCancel(ctx)
bs := &AutobatchBlockstore{
addedCids: make(map[cid.Cid]struct{}),
backingBs: backingBs,
bufferCapacity: bufferCapacity,
flushCh: make(chan struct{}, 1),
doneCh: make(chan struct{}),
// could be made configable
flushRetryDelay: time.Millisecond * 100,
shutdown: cancel,
}
bs.bufferedBatch.blockMap = make(map[cid.Cid]block.Block)
go bs.flushWorker(ctx)
return bs
}
func (bs *AutobatchBlockstore) Put(ctx context.Context, blk block.Block) error {
bs.stateLock.Lock()
defer bs.stateLock.Unlock()
_, ok := bs.addedCids[blk.Cid()]
if !ok {
bs.addedCids[blk.Cid()] = struct{}{}
bs.bufferedBatch.blockList = append(bs.bufferedBatch.blockList, blk)
bs.bufferedBatch.blockMap[blk.Cid()] = blk
bs.bufferSize += len(blk.RawData())
if bs.bufferSize >= bs.bufferCapacity {
// signal that a flush is appropriate, may be ignored
select {
case bs.flushCh <- struct{}{}:
default:
// do nothing
}
}
}
return nil
}
func (bs *AutobatchBlockstore) flushWorker(ctx context.Context) {
defer close(bs.doneCh)
for {
select {
case <-bs.flushCh:
// TODO: check if we _should_ actually flush. We could get a spurious wakeup
// here.
putErr := bs.doFlush(ctx, false)
for putErr != nil {
select {
case <-ctx.Done():
return
case <-time.After(bs.flushRetryDelay):
autolog.Errorf("FLUSH ERRORED: %w, retrying after %v", putErr, bs.flushRetryDelay)
putErr = bs.doFlush(ctx, true)
}
}
case <-ctx.Done():
// Do one last flush.
_ = bs.doFlush(ctx, false)
return
}
}
}
// caller must NOT hold stateLock
// set retryOnly to true to only retry a failed flush and not flush anything new.
func (bs *AutobatchBlockstore) doFlush(ctx context.Context, retryOnly bool) error {
bs.doFlushLock.Lock()
defer bs.doFlushLock.Unlock()
// If we failed to flush last time, try flushing again.
if bs.flushErr != nil {
bs.flushErr = bs.backingBs.PutMany(ctx, bs.flushingBatch.blockList)
}
// If we failed, or we're _only_ retrying, bail.
if retryOnly || bs.flushErr != nil {
return bs.flushErr
}
// Then take the current batch...
bs.stateLock.Lock()
// We do NOT clear addedCids here, because its purpose is to expedite Puts
bs.flushingBatch = bs.bufferedBatch
bs.bufferedBatch.blockList = make([]block.Block, 0, len(bs.flushingBatch.blockList))
bs.bufferedBatch.blockMap = make(map[cid.Cid]block.Block, len(bs.flushingBatch.blockMap))
bs.stateLock.Unlock()
// And try to flush it.
bs.flushErr = bs.backingBs.PutMany(ctx, bs.flushingBatch.blockList)
// If we succeeded, reset the batch. Otherwise, we'll try again next time.
if bs.flushErr == nil {
bs.stateLock.Lock()
bs.flushingBatch = blockBatch{}
bs.stateLock.Unlock()
}
return bs.flushErr
}
// caller must NOT hold stateLock
func (bs *AutobatchBlockstore) Flush(ctx context.Context) error {
return bs.doFlush(ctx, false)
}
func (bs *AutobatchBlockstore) Shutdown(ctx context.Context) error {
// TODO: Prevent puts after we call this to avoid losing data.
bs.shutdown()
select {
case <-bs.doneCh:
case <-ctx.Done():
return ctx.Err()
}
bs.doFlushLock.Lock()
defer bs.doFlushLock.Unlock()
return bs.flushErr
}
func (bs *AutobatchBlockstore) Get(ctx context.Context, c cid.Cid) (block.Block, error) {
// may seem backward to check the backingBs first, but that is the likeliest case
blk, err := bs.backingBs.Get(ctx, c)
if err == nil {
return blk, nil
}
if !ipld.IsNotFound(err) {
return blk, err
}
bs.stateLock.Lock()
v, ok := bs.flushingBatch.blockMap[c]
if ok {
bs.stateLock.Unlock()
return v, nil
}
v, ok = bs.bufferedBatch.blockMap[c]
if ok {
bs.stateLock.Unlock()
return v, nil
}
bs.stateLock.Unlock()
// We have to check the backing store one more time because it may have been flushed by the
// time we were able to take the lock above.
return bs.backingBs.Get(ctx, c)
}
func (bs *AutobatchBlockstore) DeleteBlock(context.Context, cid.Cid) error {
// if we wanted to support this, we would have to:
// - flush
// - delete from the backingBs (if present)
// - remove from addedCids (if present)
// - if present in addedCids, also walk the ordered lists and remove if present
return xerrors.New("deletion is unsupported")
}
func (bs *AutobatchBlockstore) DeleteMany(ctx context.Context, cids []cid.Cid) error {
// see note in DeleteBlock()
return xerrors.New("deletion is unsupported")
}
func (bs *AutobatchBlockstore) Has(ctx context.Context, c cid.Cid) (bool, error) {
_, err := bs.Get(ctx, c)
if err == nil {
return true, nil
}
if ipld.IsNotFound(err) {
return false, nil
}
return false, err
}
func (bs *AutobatchBlockstore) GetSize(ctx context.Context, c cid.Cid) (int, error) {
blk, err := bs.Get(ctx, c)
if err != nil {
return 0, err
}
return len(blk.RawData()), nil
}
func (bs *AutobatchBlockstore) PutMany(ctx context.Context, blks []block.Block) error {
for _, blk := range blks {
if err := bs.Put(ctx, blk); err != nil {
return err
}
}
return nil
}
func (bs *AutobatchBlockstore) AllKeysChan(ctx context.Context) (<-chan cid.Cid, error) {
if err := bs.Flush(ctx); err != nil {
return nil, err
}
return bs.backingBs.AllKeysChan(ctx)
}
func (bs *AutobatchBlockstore) HashOnRead(enabled bool) {
bs.backingBs.HashOnRead(enabled)
}
func (bs *AutobatchBlockstore) View(ctx context.Context, cid cid.Cid, callback func([]byte) error) error {
blk, err := bs.Get(ctx, cid)
if err != nil {
return err
}
return callback(blk.RawData())
}
+39
View File
@@ -0,0 +1,39 @@
package blockstore
import (
"context"
"testing"
ipld "github.com/ipfs/go-ipld-format"
"github.com/stretchr/testify/require"
)
func TestAutobatchBlockstore(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
ab := NewAutobatch(ctx, NewMemory(), len(b0.RawData())+len(b1.RawData())-1)
require.NoError(t, ab.Put(ctx, b0))
require.NoError(t, ab.Put(ctx, b1))
require.NoError(t, ab.Put(ctx, b2))
v0, err := ab.Get(ctx, b0.Cid())
require.NoError(t, err)
require.Equal(t, b0.RawData(), v0.RawData())
v1, err := ab.Get(ctx, b1.Cid())
require.NoError(t, err)
require.Equal(t, b1.RawData(), v1.RawData())
v2, err := ab.Get(ctx, b2.Cid())
require.NoError(t, err)
require.Equal(t, b2.RawData(), v2.RawData())
// Regression test for a deadlock.
_, err = ab.Get(ctx, b3.Cid())
require.True(t, ipld.IsNotFound(err))
require.NoError(t, ab.Flush(ctx))
require.NoError(t, ab.Shutdown(ctx))
}
+15 -15
View File
@@ -13,13 +13,13 @@ import (
"github.com/dgraph-io/badger/v2"
"github.com/dgraph-io/badger/v2/options"
"github.com/dgraph-io/badger/v2/pb"
"github.com/multiformats/go-base32"
"go.uber.org/zap"
blocks "github.com/ipfs/go-block-format"
"github.com/ipfs/go-cid"
ipld "github.com/ipfs/go-ipld-format"
logger "github.com/ipfs/go-log/v2"
pool "github.com/libp2p/go-buffer-pool"
"github.com/multiformats/go-base32"
"go.uber.org/zap"
"github.com/filecoin-project/lotus/blockstore"
)
@@ -525,7 +525,7 @@ func (b *Blockstore) Size() (int64, error) {
// View implements blockstore.Viewer, which leverages zero-copy read-only
// access to values.
func (b *Blockstore) View(cid cid.Cid, fn func([]byte) error) error {
func (b *Blockstore) View(ctx context.Context, cid cid.Cid, fn func([]byte) error) error {
if err := b.access(); err != nil {
return err
}
@@ -544,7 +544,7 @@ func (b *Blockstore) View(cid cid.Cid, fn func([]byte) error) error {
case nil:
return item.Value(fn)
case badger.ErrKeyNotFound:
return blockstore.ErrNotFound
return ipld.ErrNotFound{Cid: cid}
default:
return fmt.Errorf("failed to view block from badger blockstore: %w", err)
}
@@ -552,7 +552,7 @@ func (b *Blockstore) View(cid cid.Cid, fn func([]byte) error) error {
}
// Has implements Blockstore.Has.
func (b *Blockstore) Has(cid cid.Cid) (bool, error) {
func (b *Blockstore) Has(ctx context.Context, cid cid.Cid) (bool, error) {
if err := b.access(); err != nil {
return false, err
}
@@ -582,9 +582,9 @@ func (b *Blockstore) Has(cid cid.Cid) (bool, error) {
}
// Get implements Blockstore.Get.
func (b *Blockstore) Get(cid cid.Cid) (blocks.Block, error) {
func (b *Blockstore) Get(ctx context.Context, cid cid.Cid) (blocks.Block, error) {
if !cid.Defined() {
return nil, blockstore.ErrNotFound
return nil, ipld.ErrNotFound{Cid: cid}
}
if err := b.access(); err != nil {
@@ -607,7 +607,7 @@ func (b *Blockstore) Get(cid cid.Cid) (blocks.Block, error) {
val, err = item.ValueCopy(nil)
return err
case badger.ErrKeyNotFound:
return blockstore.ErrNotFound
return ipld.ErrNotFound{Cid: cid}
default:
return fmt.Errorf("failed to get block from badger blockstore: %w", err)
}
@@ -619,7 +619,7 @@ func (b *Blockstore) Get(cid cid.Cid) (blocks.Block, error) {
}
// GetSize implements Blockstore.GetSize.
func (b *Blockstore) GetSize(cid cid.Cid) (int, error) {
func (b *Blockstore) GetSize(ctx context.Context, cid cid.Cid) (int, error) {
if err := b.access(); err != nil {
return 0, err
}
@@ -639,7 +639,7 @@ func (b *Blockstore) GetSize(cid cid.Cid) (int, error) {
case nil:
size = int(item.ValueSize())
case badger.ErrKeyNotFound:
return blockstore.ErrNotFound
return ipld.ErrNotFound{Cid: cid}
default:
return fmt.Errorf("failed to get block size from badger blockstore: %w", err)
}
@@ -652,7 +652,7 @@ func (b *Blockstore) GetSize(cid cid.Cid) (int, error) {
}
// Put implements Blockstore.Put.
func (b *Blockstore) Put(block blocks.Block) error {
func (b *Blockstore) Put(ctx context.Context, block blocks.Block) error {
if err := b.access(); err != nil {
return err
}
@@ -691,7 +691,7 @@ func (b *Blockstore) Put(block blocks.Block) error {
}
// PutMany implements Blockstore.PutMany.
func (b *Blockstore) PutMany(blocks []blocks.Block) error {
func (b *Blockstore) PutMany(ctx context.Context, blocks []blocks.Block) error {
if err := b.access(); err != nil {
return err
}
@@ -755,7 +755,7 @@ func (b *Blockstore) PutMany(blocks []blocks.Block) error {
}
// DeleteBlock implements Blockstore.DeleteBlock.
func (b *Blockstore) DeleteBlock(cid cid.Cid) error {
func (b *Blockstore) DeleteBlock(ctx context.Context, cid cid.Cid) error {
if err := b.access(); err != nil {
return err
}
@@ -774,7 +774,7 @@ func (b *Blockstore) DeleteBlock(cid cid.Cid) error {
})
}
func (b *Blockstore) DeleteMany(cids []cid.Cid) error {
func (b *Blockstore) DeleteMany(ctx context.Context, cids []cid.Cid) error {
if err := b.access(); err != nil {
return err
}
+23 -26
View File
@@ -1,24 +1,26 @@
// stm: #unit
package badgerbs
import (
"bytes"
"context"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"strings"
"testing"
blocks "github.com/ipfs/go-block-format"
"github.com/ipfs/go-cid"
"github.com/stretchr/testify/require"
"golang.org/x/sync/errgroup"
blocks "github.com/ipfs/go-block-format"
cid "github.com/ipfs/go-cid"
"github.com/filecoin-project/lotus/blockstore"
)
func TestBadgerBlockstore(t *testing.T) {
//stm: @SPLITSTORE_BADGER_PUT_001, @SPLITSTORE_BADGER_POOLED_STORAGE_KEY_001
//stm: @SPLITSTORE_BADGER_OPEN_001, @SPLITSTORE_BADGER_CLOSE_001
(&Suite{
NewBlockstore: newBlockstore(DefaultOptions),
OpenBlockstore: openBlockstore(DefaultOptions),
@@ -37,6 +39,8 @@ func TestBadgerBlockstore(t *testing.T) {
}
func TestStorageKey(t *testing.T) {
//stm: @SPLITSTORE_BADGER_OPEN_001, @SPLITSTORE_BADGER_CLOSE_001
//stm: @SPLITSTORE_BADGER_STORAGE_KEY_001
bs, _ := newBlockstore(DefaultOptions)(t)
bbs := bs.(*Blockstore)
defer bbs.Close() //nolint:errcheck
@@ -72,20 +76,13 @@ func newBlockstore(optsSupplier func(path string) Options) func(tb testing.TB) (
return func(tb testing.TB) (bs blockstore.BasicBlockstore, path string) {
tb.Helper()
path, err := ioutil.TempDir("", "")
if err != nil {
tb.Fatal(err)
}
path = tb.TempDir()
db, err := Open(optsSupplier(path))
if err != nil {
tb.Fatal(err)
}
tb.Cleanup(func() {
_ = os.RemoveAll(path)
})
return db, path
}
}
@@ -98,17 +95,11 @@ func openBlockstore(optsSupplier func(path string) Options) func(tb testing.TB,
}
func testMove(t *testing.T, optsF func(string) Options) {
basePath, err := ioutil.TempDir("", "")
if err != nil {
t.Fatal(err)
}
ctx := context.Background()
basePath := t.TempDir()
dbPath := filepath.Join(basePath, "db")
t.Cleanup(func() {
_ = os.RemoveAll(basePath)
})
db, err := Open(optsF(dbPath))
if err != nil {
t.Fatal(err)
@@ -122,7 +113,7 @@ func testMove(t *testing.T, optsF func(string) Options) {
// add some blocks
for i := 0; i < 10; i++ {
blk := blocks.NewBlock([]byte(fmt.Sprintf("some data %d", i)))
err := db.Put(blk)
err := db.Put(ctx, blk)
if err != nil {
t.Fatal(err)
}
@@ -132,7 +123,7 @@ func testMove(t *testing.T, optsF func(string) Options) {
// delete some of them
for i := 5; i < 10; i++ {
c := have[i].Cid()
err := db.DeleteBlock(c)
err := db.DeleteBlock(ctx, c)
if err != nil {
t.Fatal(err)
}
@@ -145,7 +136,7 @@ func testMove(t *testing.T, optsF func(string) Options) {
g.Go(func() error {
for i := 10; i < 1000; i++ {
blk := blocks.NewBlock([]byte(fmt.Sprintf("some data %d", i)))
err := db.Put(blk)
err := db.Put(ctx, blk)
if err != nil {
return err
}
@@ -165,7 +156,7 @@ func testMove(t *testing.T, optsF func(string) Options) {
// now check that we have all the blocks in have and none in the deleted lists
checkBlocks := func() {
for _, blk := range have {
has, err := db.Has(blk.Cid())
has, err := db.Has(ctx, blk.Cid())
if err != nil {
t.Fatal(err)
}
@@ -174,7 +165,7 @@ func testMove(t *testing.T, optsF func(string) Options) {
t.Fatal("missing block")
}
blk2, err := db.Get(blk.Cid())
blk2, err := db.Get(ctx, blk.Cid())
if err != nil {
t.Fatal(err)
}
@@ -185,7 +176,7 @@ func testMove(t *testing.T, optsF func(string) Options) {
}
for _, c := range deleted {
has, err := db.Has(c)
has, err := db.Has(ctx, c)
if err != nil {
t.Fatal(err)
}
@@ -263,10 +254,16 @@ func testMove(t *testing.T, optsF func(string) Options) {
}
func TestMoveNoPrefix(t *testing.T) {
//stm: @SPLITSTORE_BADGER_OPEN_001, @SPLITSTORE_BADGER_CLOSE_001
//stm: @SPLITSTORE_BADGER_PUT_001, @SPLITSTORE_BADGER_POOLED_STORAGE_KEY_001
//stm: @SPLITSTORE_BADGER_DELETE_001, @SPLITSTORE_BADGER_COLLECT_GARBAGE_001
testMove(t, DefaultOptions)
}
func TestMoveWithPrefix(t *testing.T) {
//stm: @SPLITSTORE_BADGER_OPEN_001, @SPLITSTORE_BADGER_CLOSE_001
//stm: @SPLITSTORE_BADGER_PUT_001, @SPLITSTORE_BADGER_POOLED_STORAGE_KEY_001
//stm: @SPLITSTORE_BADGER_DELETE_001, @SPLITSTORE_BADGER_COLLECT_GARBAGE_001
testMove(t, func(path string) Options {
opts := DefaultOptions(path)
opts.Prefix = "/prefixed/"
+74 -29
View File
@@ -1,3 +1,4 @@
// stm: #unit
package badgerbs
import (
@@ -11,10 +12,10 @@ import (
blocks "github.com/ipfs/go-block-format"
"github.com/ipfs/go-cid"
u "github.com/ipfs/go-ipfs-util"
ipld "github.com/ipfs/go-ipld-format"
"github.com/stretchr/testify/require"
"github.com/filecoin-project/lotus/blockstore"
"github.com/stretchr/testify/require"
)
// TODO: move this to go-ipfs-blockstore.
@@ -44,28 +45,38 @@ func (s *Suite) RunTests(t *testing.T, prefix string) {
}
func (s *Suite) TestGetWhenKeyNotPresent(t *testing.T) {
//stm: @SPLITSTORE_BADGER_OPEN_001, @SPLITSTORE_BADGER_CLOSE_001
//stm: @SPLITSTORE_BADGER_GET_001, @SPLITSTORE_BADGER_POOLED_STORAGE_KEY_001
ctx := context.Background()
bs, _ := s.NewBlockstore(t)
if c, ok := bs.(io.Closer); ok {
defer func() { require.NoError(t, c.Close()) }()
}
c := cid.NewCidV0(u.Hash([]byte("stuff")))
bl, err := bs.Get(c)
bl, err := bs.Get(ctx, c)
require.Nil(t, bl)
require.Equal(t, blockstore.ErrNotFound, err)
require.Equal(t, ipld.ErrNotFound{Cid: c}, err)
}
func (s *Suite) TestGetWhenKeyIsNil(t *testing.T) {
//stm: @SPLITSTORE_BADGER_OPEN_001, @SPLITSTORE_BADGER_CLOSE_001
//stm: @SPLITSTORE_BADGER_GET_001
ctx := context.Background()
bs, _ := s.NewBlockstore(t)
if c, ok := bs.(io.Closer); ok {
defer func() { require.NoError(t, c.Close()) }()
}
_, err := bs.Get(cid.Undef)
require.Equal(t, blockstore.ErrNotFound, err)
_, err := bs.Get(ctx, cid.Undef)
require.Equal(t, ipld.ErrNotFound{Cid: cid.Undef}, err)
}
func (s *Suite) TestPutThenGetBlock(t *testing.T) {
//stm: @SPLITSTORE_BADGER_OPEN_001, @SPLITSTORE_BADGER_CLOSE_001
//stm: @SPLITSTORE_BADGER_PUT_001, @SPLITSTORE_BADGER_POOLED_STORAGE_KEY_001
//stm: @SPLITSTORE_BADGER_GET_001
ctx := context.Background()
bs, _ := s.NewBlockstore(t)
if c, ok := bs.(io.Closer); ok {
defer func() { require.NoError(t, c.Close()) }()
@@ -73,15 +84,18 @@ func (s *Suite) TestPutThenGetBlock(t *testing.T) {
orig := blocks.NewBlock([]byte("some data"))
err := bs.Put(orig)
err := bs.Put(ctx, orig)
require.NoError(t, err)
fetched, err := bs.Get(orig.Cid())
fetched, err := bs.Get(ctx, orig.Cid())
require.NoError(t, err)
require.Equal(t, orig.RawData(), fetched.RawData())
}
func (s *Suite) TestHas(t *testing.T) {
//stm: @SPLITSTORE_BADGER_OPEN_001, @SPLITSTORE_BADGER_CLOSE_001
//stm: @SPLITSTORE_BADGER_HAS_001, @SPLITSTORE_BADGER_POOLED_STORAGE_KEY_001
ctx := context.Background()
bs, _ := s.NewBlockstore(t)
if c, ok := bs.(io.Closer); ok {
defer func() { require.NoError(t, c.Close()) }()
@@ -89,19 +103,23 @@ func (s *Suite) TestHas(t *testing.T) {
orig := blocks.NewBlock([]byte("some data"))
err := bs.Put(orig)
err := bs.Put(ctx, orig)
require.NoError(t, err)
ok, err := bs.Has(orig.Cid())
ok, err := bs.Has(ctx, orig.Cid())
require.NoError(t, err)
require.True(t, ok)
ok, err = bs.Has(blocks.NewBlock([]byte("another thing")).Cid())
ok, err = bs.Has(ctx, blocks.NewBlock([]byte("another thing")).Cid())
require.NoError(t, err)
require.False(t, ok)
}
func (s *Suite) TestCidv0v1(t *testing.T) {
//stm: @SPLITSTORE_BADGER_OPEN_001, @SPLITSTORE_BADGER_CLOSE_001
//stm: @SPLITSTORE_BADGER_PUT_001, @SPLITSTORE_BADGER_POOLED_STORAGE_KEY_001
//stm: @SPLITSTORE_BADGER_GET_001
ctx := context.Background()
bs, _ := s.NewBlockstore(t)
if c, ok := bs.(io.Closer); ok {
defer func() { require.NoError(t, c.Close()) }()
@@ -109,15 +127,20 @@ func (s *Suite) TestCidv0v1(t *testing.T) {
orig := blocks.NewBlock([]byte("some data"))
err := bs.Put(orig)
err := bs.Put(ctx, orig)
require.NoError(t, err)
fetched, err := bs.Get(cid.NewCidV1(cid.DagProtobuf, orig.Cid().Hash()))
fetched, err := bs.Get(ctx, cid.NewCidV1(cid.DagProtobuf, orig.Cid().Hash()))
require.NoError(t, err)
require.Equal(t, orig.RawData(), fetched.RawData())
}
func (s *Suite) TestPutThenGetSizeBlock(t *testing.T) {
//stm: @SPLITSTORE_BADGER_OPEN_001, @SPLITSTORE_BADGER_CLOSE_001
//stm: @SPLITSTORE_BADGER_PUT_001, @SPLITSTORE_BADGER_POOLED_STORAGE_KEY_001
//stm: @SPLITSTORE_BADGER_GET_SIZE_001
ctx := context.Background()
bs, _ := s.NewBlockstore(t)
if c, ok := bs.(io.Closer); ok {
defer func() { require.NoError(t, c.Close()) }()
@@ -127,26 +150,29 @@ func (s *Suite) TestPutThenGetSizeBlock(t *testing.T) {
missingBlock := blocks.NewBlock([]byte("missingBlock"))
emptyBlock := blocks.NewBlock([]byte{})
err := bs.Put(block)
err := bs.Put(ctx, block)
require.NoError(t, err)
blockSize, err := bs.GetSize(block.Cid())
blockSize, err := bs.GetSize(ctx, block.Cid())
require.NoError(t, err)
require.Len(t, block.RawData(), blockSize)
err = bs.Put(emptyBlock)
err = bs.Put(ctx, emptyBlock)
require.NoError(t, err)
emptySize, err := bs.GetSize(emptyBlock.Cid())
emptySize, err := bs.GetSize(ctx, emptyBlock.Cid())
require.NoError(t, err)
require.Zero(t, emptySize)
missingSize, err := bs.GetSize(missingBlock.Cid())
require.Equal(t, blockstore.ErrNotFound, err)
missingCid := missingBlock.Cid()
missingSize, err := bs.GetSize(ctx, missingCid)
require.Equal(t, ipld.ErrNotFound{Cid: missingCid}, err)
require.Equal(t, -1, missingSize)
}
func (s *Suite) TestAllKeysSimple(t *testing.T) {
//stm: @SPLITSTORE_BADGER_OPEN_001, @SPLITSTORE_BADGER_CLOSE_001
//stm: @SPLITSTORE_BADGER_PUT_001, @SPLITSTORE_BADGER_POOLED_STORAGE_KEY_001
bs, _ := s.NewBlockstore(t)
if c, ok := bs.(io.Closer); ok {
defer func() { require.NoError(t, c.Close()) }()
@@ -163,6 +189,9 @@ func (s *Suite) TestAllKeysSimple(t *testing.T) {
}
func (s *Suite) TestAllKeysRespectsContext(t *testing.T) {
//stm: @SPLITSTORE_BADGER_OPEN_001, @SPLITSTORE_BADGER_CLOSE_001
//stm: @SPLITSTORE_BADGER_PUT_001, @SPLITSTORE_BADGER_POOLED_STORAGE_KEY_001
//stm: @SPLITSTORE_BADGER_ALL_KEYS_CHAN_001
bs, _ := s.NewBlockstore(t)
if c, ok := bs.(io.Closer); ok {
defer func() { require.NoError(t, c.Close()) }()
@@ -193,6 +222,7 @@ func (s *Suite) TestAllKeysRespectsContext(t *testing.T) {
}
func (s *Suite) TestDoubleClose(t *testing.T) {
//stm: @SPLITSTORE_BADGER_OPEN_001, @SPLITSTORE_BADGER_CLOSE_001
bs, _ := s.NewBlockstore(t)
c, ok := bs.(io.Closer)
if !ok {
@@ -203,6 +233,10 @@ func (s *Suite) TestDoubleClose(t *testing.T) {
}
func (s *Suite) TestReopenPutGet(t *testing.T) {
//stm: @SPLITSTORE_BADGER_OPEN_001, @SPLITSTORE_BADGER_CLOSE_001
//stm: @SPLITSTORE_BADGER_PUT_001, @SPLITSTORE_BADGER_POOLED_STORAGE_KEY_001
//stm: @SPLITSTORE_BADGER_GET_001
ctx := context.Background()
bs, path := s.NewBlockstore(t)
c, ok := bs.(io.Closer)
if !ok {
@@ -210,7 +244,7 @@ func (s *Suite) TestReopenPutGet(t *testing.T) {
}
orig := blocks.NewBlock([]byte("some data"))
err := bs.Put(orig)
err := bs.Put(ctx, orig)
require.NoError(t, err)
err = c.Close()
@@ -219,7 +253,7 @@ func (s *Suite) TestReopenPutGet(t *testing.T) {
bs, err = s.OpenBlockstore(t, path)
require.NoError(t, err)
fetched, err := bs.Get(orig.Cid())
fetched, err := bs.Get(ctx, orig.Cid())
require.NoError(t, err)
require.Equal(t, orig.RawData(), fetched.RawData())
@@ -228,6 +262,11 @@ func (s *Suite) TestReopenPutGet(t *testing.T) {
}
func (s *Suite) TestPutMany(t *testing.T) {
//stm: @SPLITSTORE_BADGER_OPEN_001, @SPLITSTORE_BADGER_CLOSE_001
//stm: @SPLITSTORE_BADGER_HAS_001, @SPLITSTORE_BADGER_POOLED_STORAGE_KEY_001
//stm: @SPLITSTORE_BADGER_GET_001, @SPLITSTORE_BADGER_PUT_MANY_001
//stm: @SPLITSTORE_BADGER_ALL_KEYS_CHAN_001
ctx := context.Background()
bs, _ := s.NewBlockstore(t)
if c, ok := bs.(io.Closer); ok {
defer func() { require.NoError(t, c.Close()) }()
@@ -238,15 +277,15 @@ func (s *Suite) TestPutMany(t *testing.T) {
blocks.NewBlock([]byte("foo2")),
blocks.NewBlock([]byte("foo3")),
}
err := bs.PutMany(blks)
err := bs.PutMany(ctx, blks)
require.NoError(t, err)
for _, blk := range blks {
fetched, err := bs.Get(blk.Cid())
fetched, err := bs.Get(ctx, blk.Cid())
require.NoError(t, err)
require.Equal(t, blk.RawData(), fetched.RawData())
ok, err := bs.Has(blk.Cid())
ok, err := bs.Has(ctx, blk.Cid())
require.NoError(t, err)
require.True(t, ok)
}
@@ -259,6 +298,12 @@ func (s *Suite) TestPutMany(t *testing.T) {
}
func (s *Suite) TestDelete(t *testing.T) {
//stm: @SPLITSTORE_BADGER_PUT_001, @SPLITSTORE_BADGER_POOLED_STORAGE_KEY_001
//stm: @SPLITSTORE_BADGER_DELETE_001, @SPLITSTORE_BADGER_POOLED_STORAGE_HAS_001
//stm: @SPLITSTORE_BADGER_ALL_KEYS_CHAN_001, @SPLITSTORE_BADGER_HAS_001
//stm: @SPLITSTORE_BADGER_PUT_MANY_001
ctx := context.Background()
bs, _ := s.NewBlockstore(t)
if c, ok := bs.(io.Closer); ok {
defer func() { require.NoError(t, c.Close()) }()
@@ -269,10 +314,10 @@ func (s *Suite) TestDelete(t *testing.T) {
blocks.NewBlock([]byte("foo2")),
blocks.NewBlock([]byte("foo3")),
}
err := bs.PutMany(blks)
err := bs.PutMany(ctx, blks)
require.NoError(t, err)
err = bs.DeleteBlock(blks[1].Cid())
err = bs.DeleteBlock(ctx, blks[1].Cid())
require.NoError(t, err)
ch, err := bs.AllKeysChan(context.Background())
@@ -285,17 +330,17 @@ func (s *Suite) TestDelete(t *testing.T) {
cid.NewCidV1(cid.Raw, blks[2].Cid().Hash()),
})
has, err := bs.Has(blks[1].Cid())
has, err := bs.Has(ctx, blks[1].Cid())
require.NoError(t, err)
require.False(t, has)
}
func insertBlocks(t *testing.T, bs blockstore.BasicBlockstore, count int) []cid.Cid {
ctx := context.Background()
keys := make([]cid.Cid, count)
for i := 0; i < count; i++ {
block := blocks.NewBlock([]byte(fmt.Sprintf("some data %d", i)))
err := bs.Put(block)
err := bs.Put(ctx, block)
require.NoError(t, err)
// NewBlock assigns a CIDv0; we convert it to CIDv1 because that's what
// the store returns.
+9 -10
View File
@@ -1,17 +1,16 @@
package blockstore
import (
cid "github.com/ipfs/go-cid"
ds "github.com/ipfs/go-datastore"
logging "github.com/ipfs/go-log/v2"
"context"
"github.com/ipfs/go-cid"
ds "github.com/ipfs/go-datastore"
blockstore "github.com/ipfs/go-ipfs-blockstore"
logging "github.com/ipfs/go-log/v2"
)
var log = logging.Logger("blockstore")
var ErrNotFound = blockstore.ErrNotFound
// Blockstore is the blockstore interface used by Lotus. It is the union
// of the basic go-ipfs blockstore, with other capabilities required by Lotus,
// e.g. View or Sync.
@@ -27,7 +26,7 @@ type BasicBlockstore = blockstore.Blockstore
type Viewer = blockstore.Viewer
type BatchDeleter interface {
DeleteMany(cids []cid.Cid) error
DeleteMany(ctx context.Context, cids []cid.Cid) error
}
// BlockstoreIterator is a trait for efficient iteration
@@ -93,17 +92,17 @@ type adaptedBlockstore struct {
var _ Blockstore = (*adaptedBlockstore)(nil)
func (a *adaptedBlockstore) View(cid cid.Cid, callback func([]byte) error) error {
blk, err := a.Get(cid)
func (a *adaptedBlockstore) View(ctx context.Context, cid cid.Cid, callback func([]byte) error) error {
blk, err := a.Get(ctx, cid)
if err != nil {
return err
}
return callback(blk.RawData())
}
func (a *adaptedBlockstore) DeleteMany(cids []cid.Cid) error {
func (a *adaptedBlockstore) DeleteMany(ctx context.Context, cids []cid.Cid) error {
for _, cid := range cids {
err := a.DeleteBlock(cid)
err := a.DeleteBlock(ctx, cid)
if err != nil {
return err
}
+26 -25
View File
@@ -6,6 +6,7 @@ import (
block "github.com/ipfs/go-block-format"
"github.com/ipfs/go-cid"
ipld "github.com/ipfs/go-ipld-format"
)
// buflog is a logger for the buffered blockstore. It is subscoped from the
@@ -88,55 +89,55 @@ func (bs *BufferedBlockstore) AllKeysChan(ctx context.Context) (<-chan cid.Cid,
return out, nil
}
func (bs *BufferedBlockstore) DeleteBlock(c cid.Cid) error {
if err := bs.read.DeleteBlock(c); err != nil {
func (bs *BufferedBlockstore) DeleteBlock(ctx context.Context, c cid.Cid) error {
if err := bs.read.DeleteBlock(ctx, c); err != nil {
return err
}
return bs.write.DeleteBlock(c)
return bs.write.DeleteBlock(ctx, c)
}
func (bs *BufferedBlockstore) DeleteMany(cids []cid.Cid) error {
if err := bs.read.DeleteMany(cids); err != nil {
func (bs *BufferedBlockstore) DeleteMany(ctx context.Context, cids []cid.Cid) error {
if err := bs.read.DeleteMany(ctx, cids); err != nil {
return err
}
return bs.write.DeleteMany(cids)
return bs.write.DeleteMany(ctx, cids)
}
func (bs *BufferedBlockstore) View(c cid.Cid, callback func([]byte) error) error {
func (bs *BufferedBlockstore) View(ctx context.Context, c cid.Cid, callback func([]byte) error) error {
// both stores are viewable.
if err := bs.write.View(c, callback); err == ErrNotFound {
if err := bs.write.View(ctx, c, callback); ipld.IsNotFound(err) {
// not found in write blockstore; fall through.
} else {
return err // propagate errors, or nil, i.e. found.
}
return bs.read.View(c, callback)
return bs.read.View(ctx, c, callback)
}
func (bs *BufferedBlockstore) Get(c cid.Cid) (block.Block, error) {
if out, err := bs.write.Get(c); err != nil {
if err != ErrNotFound {
func (bs *BufferedBlockstore) Get(ctx context.Context, c cid.Cid) (block.Block, error) {
if out, err := bs.write.Get(ctx, c); err != nil {
if !ipld.IsNotFound(err) {
return nil, err
}
} else {
return out, nil
}
return bs.read.Get(c)
return bs.read.Get(ctx, c)
}
func (bs *BufferedBlockstore) GetSize(c cid.Cid) (int, error) {
s, err := bs.read.GetSize(c)
if err == ErrNotFound || s == 0 {
return bs.write.GetSize(c)
func (bs *BufferedBlockstore) GetSize(ctx context.Context, c cid.Cid) (int, error) {
s, err := bs.read.GetSize(ctx, c)
if ipld.IsNotFound(err) || s == 0 {
return bs.write.GetSize(ctx, c)
}
return s, err
}
func (bs *BufferedBlockstore) Put(blk block.Block) error {
has, err := bs.read.Has(blk.Cid()) // TODO: consider dropping this check
func (bs *BufferedBlockstore) Put(ctx context.Context, blk block.Block) error {
has, err := bs.read.Has(ctx, blk.Cid()) // TODO: consider dropping this check
if err != nil {
return err
}
@@ -145,11 +146,11 @@ func (bs *BufferedBlockstore) Put(blk block.Block) error {
return nil
}
return bs.write.Put(blk)
return bs.write.Put(ctx, blk)
}
func (bs *BufferedBlockstore) Has(c cid.Cid) (bool, error) {
has, err := bs.write.Has(c)
func (bs *BufferedBlockstore) Has(ctx context.Context, c cid.Cid) (bool, error) {
has, err := bs.write.Has(ctx, c)
if err != nil {
return false, err
}
@@ -157,7 +158,7 @@ func (bs *BufferedBlockstore) Has(c cid.Cid) (bool, error) {
return true, nil
}
return bs.read.Has(c)
return bs.read.Has(ctx, c)
}
func (bs *BufferedBlockstore) HashOnRead(hor bool) {
@@ -165,8 +166,8 @@ func (bs *BufferedBlockstore) HashOnRead(hor bool) {
bs.write.HashOnRead(hor)
}
func (bs *BufferedBlockstore) PutMany(blks []block.Block) error {
return bs.write.PutMany(blks)
func (bs *BufferedBlockstore) PutMany(ctx context.Context, blks []block.Block) error {
return bs.write.PutMany(ctx, blks)
}
func (bs *BufferedBlockstore) Read() Blockstore {
+21
View File
@@ -0,0 +1,21 @@
package blockstore
import (
"context"
)
type hotViewKey struct{}
var hotView = hotViewKey{}
// WithHotView constructs a new context with an option that provides a hint to the blockstore
// (e.g. the splitstore) that the object (and its ipld references) should be kept hot.
func WithHotView(ctx context.Context) context.Context {
return context.WithValue(ctx, hotView, struct{}{})
}
// IsHotView returns true if the hot view option is set in the context
func IsHotView(ctx context.Context) bool {
v := ctx.Value(hotView)
return v != nil
}
+13 -13
View File
@@ -5,7 +5,7 @@ import (
"io"
blocks "github.com/ipfs/go-block-format"
cid "github.com/ipfs/go-cid"
"github.com/ipfs/go-cid"
)
var _ Blockstore = (*discardstore)(nil)
@@ -18,39 +18,39 @@ func NewDiscardStore(bs Blockstore) Blockstore {
return &discardstore{bs: bs}
}
func (b *discardstore) Has(cid cid.Cid) (bool, error) {
return b.bs.Has(cid)
func (b *discardstore) Has(ctx context.Context, cid cid.Cid) (bool, error) {
return b.bs.Has(ctx, cid)
}
func (b *discardstore) HashOnRead(hor bool) {
b.bs.HashOnRead(hor)
}
func (b *discardstore) Get(cid cid.Cid) (blocks.Block, error) {
return b.bs.Get(cid)
func (b *discardstore) Get(ctx context.Context, cid cid.Cid) (blocks.Block, error) {
return b.bs.Get(ctx, cid)
}
func (b *discardstore) GetSize(cid cid.Cid) (int, error) {
return b.bs.GetSize(cid)
func (b *discardstore) GetSize(ctx context.Context, cid cid.Cid) (int, error) {
return b.bs.GetSize(ctx, cid)
}
func (b *discardstore) View(cid cid.Cid, f func([]byte) error) error {
return b.bs.View(cid, f)
func (b *discardstore) View(ctx context.Context, cid cid.Cid, f func([]byte) error) error {
return b.bs.View(ctx, cid, f)
}
func (b *discardstore) Put(blk blocks.Block) error {
func (b *discardstore) Put(ctx context.Context, blk blocks.Block) error {
return nil
}
func (b *discardstore) PutMany(blks []blocks.Block) error {
func (b *discardstore) PutMany(ctx context.Context, blks []blocks.Block) error {
return nil
}
func (b *discardstore) DeleteBlock(cid cid.Cid) error {
func (b *discardstore) DeleteBlock(ctx context.Context, cid cid.Cid) error {
return nil
}
func (b *discardstore) DeleteMany(cids []cid.Cid) error {
func (b *discardstore) DeleteMany(ctx context.Context, cids []cid.Cid) error {
return nil
}
+14 -14
View File
@@ -5,10 +5,10 @@ import (
"sync"
"time"
"golang.org/x/xerrors"
blocks "github.com/ipfs/go-block-format"
"github.com/ipfs/go-cid"
ipld "github.com/ipfs/go-ipld-format"
"golang.org/x/xerrors"
)
// UnwrapFallbackStore takes a blockstore, and returns the underlying blockstore
@@ -56,7 +56,7 @@ func (fbs *FallbackStore) getFallback(c cid.Cid) (blocks.Block, error) {
if fbs.missFn == nil {
log.Errorw("fallbackstore: missFn not configured yet")
return nil, ErrNotFound
return nil, ipld.ErrNotFound{Cid: c}
}
}
@@ -71,30 +71,30 @@ func (fbs *FallbackStore) getFallback(c cid.Cid) (blocks.Block, error) {
// chain bitswap puts blocks in temp blockstore which is cleaned up
// every few min (to drop any messages we fetched but don't want)
// in this case we want to keep this block around
if err := fbs.Put(b); err != nil {
if err := fbs.Put(ctx, b); err != nil {
return nil, xerrors.Errorf("persisting fallback-fetched block: %w", err)
}
return b, nil
}
func (fbs *FallbackStore) Get(c cid.Cid) (blocks.Block, error) {
b, err := fbs.Blockstore.Get(c)
switch err {
case nil:
func (fbs *FallbackStore) Get(ctx context.Context, c cid.Cid) (blocks.Block, error) {
b, err := fbs.Blockstore.Get(ctx, c)
switch {
case err == nil:
return b, nil
case ErrNotFound:
case ipld.IsNotFound(err):
return fbs.getFallback(c)
default:
return b, err
}
}
func (fbs *FallbackStore) GetSize(c cid.Cid) (int, error) {
sz, err := fbs.Blockstore.GetSize(c)
switch err {
case nil:
func (fbs *FallbackStore) GetSize(ctx context.Context, c cid.Cid) (int, error) {
sz, err := fbs.Blockstore.GetSize(ctx, c)
switch {
case err == nil:
return sz, nil
case ErrNotFound:
case ipld.IsNotFound(err):
b, err := fbs.getFallback(c)
if err != nil {
return 0, err
+26 -19
View File
@@ -4,11 +4,10 @@ import (
"context"
"io"
"golang.org/x/xerrors"
blocks "github.com/ipfs/go-block-format"
cid "github.com/ipfs/go-cid"
"github.com/ipfs/go-cid"
mh "github.com/multiformats/go-multihash"
"golang.org/x/xerrors"
)
var _ Blockstore = (*idstore)(nil)
@@ -38,7 +37,7 @@ func decodeCid(cid cid.Cid) (inline bool, data []byte, err error) {
return false, nil, err
}
func (b *idstore) Has(cid cid.Cid) (bool, error) {
func (b *idstore) Has(ctx context.Context, cid cid.Cid) (bool, error) {
inline, _, err := decodeCid(cid)
if err != nil {
return false, xerrors.Errorf("error decoding Cid: %w", err)
@@ -48,10 +47,10 @@ func (b *idstore) Has(cid cid.Cid) (bool, error) {
return true, nil
}
return b.bs.Has(cid)
return b.bs.Has(ctx, cid)
}
func (b *idstore) Get(cid cid.Cid) (blocks.Block, error) {
func (b *idstore) Get(ctx context.Context, cid cid.Cid) (blocks.Block, error) {
inline, data, err := decodeCid(cid)
if err != nil {
return nil, xerrors.Errorf("error decoding Cid: %w", err)
@@ -61,10 +60,10 @@ func (b *idstore) Get(cid cid.Cid) (blocks.Block, error) {
return blocks.NewBlockWithCid(data, cid)
}
return b.bs.Get(cid)
return b.bs.Get(ctx, cid)
}
func (b *idstore) GetSize(cid cid.Cid) (int, error) {
func (b *idstore) GetSize(ctx context.Context, cid cid.Cid) (int, error) {
inline, data, err := decodeCid(cid)
if err != nil {
return 0, xerrors.Errorf("error decoding Cid: %w", err)
@@ -74,10 +73,10 @@ func (b *idstore) GetSize(cid cid.Cid) (int, error) {
return len(data), err
}
return b.bs.GetSize(cid)
return b.bs.GetSize(ctx, cid)
}
func (b *idstore) View(cid cid.Cid, cb func([]byte) error) error {
func (b *idstore) View(ctx context.Context, cid cid.Cid, cb func([]byte) error) error {
inline, data, err := decodeCid(cid)
if err != nil {
return xerrors.Errorf("error decoding Cid: %w", err)
@@ -87,10 +86,10 @@ func (b *idstore) View(cid cid.Cid, cb func([]byte) error) error {
return cb(data)
}
return b.bs.View(cid, cb)
return b.bs.View(ctx, cid, cb)
}
func (b *idstore) Put(blk blocks.Block) error {
func (b *idstore) Put(ctx context.Context, blk blocks.Block) error {
inline, _, err := decodeCid(blk.Cid())
if err != nil {
return xerrors.Errorf("error decoding Cid: %w", err)
@@ -100,10 +99,18 @@ func (b *idstore) Put(blk blocks.Block) error {
return nil
}
return b.bs.Put(blk)
return b.bs.Put(ctx, blk)
}
func (b *idstore) PutMany(blks []blocks.Block) error {
func (b *idstore) ForEachKey(f func(cid.Cid) error) error {
iterBstore, ok := b.bs.(BlockstoreIterator)
if !ok {
return xerrors.Errorf("underlying blockstore (type %T) doesn't support fast iteration", b.bs)
}
return iterBstore.ForEachKey(f)
}
func (b *idstore) PutMany(ctx context.Context, blks []blocks.Block) error {
toPut := make([]blocks.Block, 0, len(blks))
for _, blk := range blks {
inline, _, err := decodeCid(blk.Cid())
@@ -118,13 +125,13 @@ func (b *idstore) PutMany(blks []blocks.Block) error {
}
if len(toPut) > 0 {
return b.bs.PutMany(toPut)
return b.bs.PutMany(ctx, toPut)
}
return nil
}
func (b *idstore) DeleteBlock(cid cid.Cid) error {
func (b *idstore) DeleteBlock(ctx context.Context, cid cid.Cid) error {
inline, _, err := decodeCid(cid)
if err != nil {
return xerrors.Errorf("error decoding Cid: %w", err)
@@ -134,10 +141,10 @@ func (b *idstore) DeleteBlock(cid cid.Cid) error {
return nil
}
return b.bs.DeleteBlock(cid)
return b.bs.DeleteBlock(ctx, cid)
}
func (b *idstore) DeleteMany(cids []cid.Cid) error {
func (b *idstore) DeleteMany(ctx context.Context, cids []cid.Cid) error {
toDelete := make([]cid.Cid, 0, len(cids))
for _, cid := range cids {
inline, _, err := decodeCid(cid)
@@ -152,7 +159,7 @@ func (b *idstore) DeleteMany(cids []cid.Cid) error {
}
if len(toDelete) > 0 {
return b.bs.DeleteMany(toDelete)
return b.bs.DeleteMany(ctx, toDelete)
}
return nil
+15 -17
View File
@@ -5,17 +5,15 @@ import (
"context"
"io/ioutil"
"golang.org/x/xerrors"
"github.com/multiformats/go-multiaddr"
"github.com/multiformats/go-multihash"
blocks "github.com/ipfs/go-block-format"
"github.com/ipfs/go-cid"
httpapi "github.com/ipfs/go-ipfs-http-client"
iface "github.com/ipfs/interface-go-ipfs-core"
"github.com/ipfs/interface-go-ipfs-core/options"
"github.com/ipfs/interface-go-ipfs-core/path"
"github.com/multiformats/go-multiaddr"
"github.com/multiformats/go-multihash"
"golang.org/x/xerrors"
)
type IPFSBlockstore struct {
@@ -79,12 +77,12 @@ func NewRemoteIPFSBlockstore(ctx context.Context, maddr multiaddr.Multiaddr, onl
return Adapt(bs), nil
}
func (i *IPFSBlockstore) DeleteBlock(cid cid.Cid) error {
func (i *IPFSBlockstore) DeleteBlock(ctx context.Context, cid cid.Cid) error {
return xerrors.Errorf("not supported")
}
func (i *IPFSBlockstore) Has(cid cid.Cid) (bool, error) {
_, err := i.offlineAPI.Block().Stat(i.ctx, path.IpldPath(cid))
func (i *IPFSBlockstore) Has(ctx context.Context, cid cid.Cid) (bool, error) {
_, err := i.offlineAPI.Block().Stat(ctx, path.IpldPath(cid))
if err != nil {
// The underlying client is running in Offline mode.
// Stat() will fail with an err if the block isn't in the
@@ -99,8 +97,8 @@ func (i *IPFSBlockstore) Has(cid cid.Cid) (bool, error) {
return true, nil
}
func (i *IPFSBlockstore) Get(cid cid.Cid) (blocks.Block, error) {
rd, err := i.api.Block().Get(i.ctx, path.IpldPath(cid))
func (i *IPFSBlockstore) Get(ctx context.Context, cid cid.Cid) (blocks.Block, error) {
rd, err := i.api.Block().Get(ctx, path.IpldPath(cid))
if err != nil {
return nil, xerrors.Errorf("getting ipfs block: %w", err)
}
@@ -113,8 +111,8 @@ func (i *IPFSBlockstore) Get(cid cid.Cid) (blocks.Block, error) {
return blocks.NewBlockWithCid(data, cid)
}
func (i *IPFSBlockstore) GetSize(cid cid.Cid) (int, error) {
st, err := i.api.Block().Stat(i.ctx, path.IpldPath(cid))
func (i *IPFSBlockstore) GetSize(ctx context.Context, cid cid.Cid) (int, error) {
st, err := i.api.Block().Stat(ctx, path.IpldPath(cid))
if err != nil {
return 0, xerrors.Errorf("getting ipfs block: %w", err)
}
@@ -122,23 +120,23 @@ func (i *IPFSBlockstore) GetSize(cid cid.Cid) (int, error) {
return st.Size(), nil
}
func (i *IPFSBlockstore) Put(block blocks.Block) error {
func (i *IPFSBlockstore) Put(ctx context.Context, block blocks.Block) error {
mhd, err := multihash.Decode(block.Cid().Hash())
if err != nil {
return err
}
_, err = i.api.Block().Put(i.ctx, bytes.NewReader(block.RawData()),
_, err = i.api.Block().Put(ctx, bytes.NewReader(block.RawData()),
options.Block.Hash(mhd.Code, mhd.Length),
options.Block.Format(cid.CodecToStr[block.Cid().Type()]))
options.Block.Format(multihash.Codes[block.Cid().Type()]))
return err
}
func (i *IPFSBlockstore) PutMany(blocks []blocks.Block) error {
func (i *IPFSBlockstore) PutMany(ctx context.Context, blocks []blocks.Block) error {
// TODO: could be done in parallel
for _, block := range blocks {
if err := i.Put(block); err != nil {
if err := i.Put(ctx, block); err != nil {
return err
}
}
+25 -23
View File
@@ -5,6 +5,7 @@ import (
blocks "github.com/ipfs/go-block-format"
"github.com/ipfs/go-cid"
ipld "github.com/ipfs/go-ipld-format"
)
// NewMemory returns a temporary memory-backed blockstore.
@@ -13,55 +14,56 @@ func NewMemory() MemBlockstore {
}
// MemBlockstore is a terminal blockstore that keeps blocks in memory.
type MemBlockstore map[cid.Cid]blocks.Block
// To match behavior of badger blockstore we index by multihash only.
type MemBlockstore map[string]blocks.Block
func (m MemBlockstore) DeleteBlock(k cid.Cid) error {
delete(m, k)
func (m MemBlockstore) DeleteBlock(ctx context.Context, k cid.Cid) error {
delete(m, string(k.Hash()))
return nil
}
func (m MemBlockstore) DeleteMany(ks []cid.Cid) error {
func (m MemBlockstore) DeleteMany(ctx context.Context, ks []cid.Cid) error {
for _, k := range ks {
delete(m, k)
delete(m, string(k.Hash()))
}
return nil
}
func (m MemBlockstore) Has(k cid.Cid) (bool, error) {
_, ok := m[k]
func (m MemBlockstore) Has(ctx context.Context, k cid.Cid) (bool, error) {
_, ok := m[string(k.Hash())]
return ok, nil
}
func (m MemBlockstore) View(k cid.Cid, callback func([]byte) error) error {
b, ok := m[k]
func (m MemBlockstore) View(ctx context.Context, k cid.Cid, callback func([]byte) error) error {
b, ok := m[string(k.Hash())]
if !ok {
return ErrNotFound
return ipld.ErrNotFound{Cid: k}
}
return callback(b.RawData())
}
func (m MemBlockstore) Get(k cid.Cid) (blocks.Block, error) {
b, ok := m[k]
func (m MemBlockstore) Get(ctx context.Context, k cid.Cid) (blocks.Block, error) {
b, ok := m[string(k.Hash())]
if !ok {
return nil, ErrNotFound
return nil, ipld.ErrNotFound{Cid: k}
}
return b, nil
}
// GetSize returns the CIDs mapped BlockSize
func (m MemBlockstore) GetSize(k cid.Cid) (int, error) {
b, ok := m[k]
func (m MemBlockstore) GetSize(ctx context.Context, k cid.Cid) (int, error) {
b, ok := m[string(k.Hash())]
if !ok {
return 0, ErrNotFound
return 0, ipld.ErrNotFound{Cid: k}
}
return len(b.RawData()), nil
}
// Put puts a given block to the underlying datastore
func (m MemBlockstore) Put(b blocks.Block) error {
func (m MemBlockstore) Put(ctx context.Context, b blocks.Block) error {
// Convert to a basic block for safety, but try to reuse the existing
// block if it's already a basic block.
k := b.Cid()
k := string(b.Cid().Hash())
if _, ok := b.(*blocks.BasicBlock); !ok {
// If we already have the block, abort.
if _, ok := m[k]; ok {
@@ -70,15 +72,15 @@ func (m MemBlockstore) Put(b blocks.Block) error {
// the error is only for debugging.
b, _ = blocks.NewBlockWithCid(b.RawData(), b.Cid())
}
m[b.Cid()] = b
m[k] = b
return nil
}
// PutMany puts a slice of blocks at the same time using batching
// capabilities of the underlying datastore whenever possible.
func (m MemBlockstore) PutMany(bs []blocks.Block) error {
func (m MemBlockstore) PutMany(ctx context.Context, bs []blocks.Block) error {
for _, b := range bs {
_ = m.Put(b) // can't fail
_ = m.Put(ctx, b) // can't fail
}
return nil
}
@@ -88,8 +90,8 @@ func (m MemBlockstore) PutMany(bs []blocks.Block) error {
// the given context, closing the channel if it becomes Done.
func (m MemBlockstore) AllKeysChan(ctx context.Context) (<-chan cid.Cid, error) {
ch := make(chan cid.Cid, len(m))
for k := range m {
ch <- k
for _, b := range m {
ch <- b.Cid()
}
close(ch)
return ch, nil
+12 -4
View File
@@ -49,10 +49,11 @@ These are options in the `[Chainstore.Splitstore]` section of the configuration:
blockstore and discards writes; this is necessary to support syncing from a snapshot.
- `MarkSetType` -- specifies the type of markset to use during compaction.
The markset is the data structure used by compaction/gc to track live objects.
The default value is `"map"`, which will use an in-memory map; if you are limited
in memory (or indeed see compaction run out of memory), you can also specify
`"badger"` which will use an disk backed markset, using badger. This will use
much less memory, but will also make compaction slower.
The default value is "badger", which will use a disk backed markset using badger.
If you have a lot of memory (48G or more) you can also use "map", which will use
an in memory markset, speeding up compaction at the cost of higher memory usage.
Note: If you are using a VPS with a network volume, you need to provision at least
3000 IOPs with the badger markset.
- `HotStoreMessageRetention` -- specifies how many finalities, beyond the 4
finalities maintained by default, to maintain messages and message receipts in the
hotstore. This is useful for assistive nodes that want to support syncing for other
@@ -105,6 +106,12 @@ Compaction works transactionally with the following algorithm:
- We delete in small batches taking a lock; each batch is checked again for marks, from the concurrent transactional mark, so as to never delete anything live
- We then end the transaction and compact/gc the hotstore.
As of [#8008](https://github.com/filecoin-project/lotus/pull/8008) the compaction algorithm has been
modified to eliminate sorting and maintain the cold object set on disk. This drastically reduces
memory usage; in fact, when using badger as the markset compaction uses very little memory, and
it should be now possible to run splitstore with 32GB of RAM or less without danger of running out of
memory during compaction.
## Garbage Collection
TBD -- see [#6577](https://github.com/filecoin-project/lotus/issues/6577)
@@ -119,6 +126,7 @@ TBD -- see [#6577](https://github.com/filecoin-project/lotus/issues/6577)
It can also optionally compact/gc the coldstore after the copy (with the `--gc-coldstore` flag)
and automatically rewrite the lotus config to disable splitstore (with the `--rewrite-config` flag).
Note: the node *must be stopped* before running this command.
- `clear` -- clears a splitstore installation for restart from snapshot.
- `check` -- asynchronously runs a basic healthcheck on the splitstore.
The results are appended to `<lotus-repo>/datastore/splitstore/check.txt`.
- `info` -- prints some basic information about the splitstore.
+117
View File
@@ -0,0 +1,117 @@
package splitstore
import (
"bufio"
"io"
"os"
"github.com/ipfs/go-cid"
mh "github.com/multiformats/go-multihash"
"golang.org/x/xerrors"
)
type Checkpoint struct {
file *os.File
buf *bufio.Writer
}
func NewCheckpoint(path string) (*Checkpoint, error) {
file, err := os.OpenFile(path, os.O_CREATE|os.O_TRUNC|os.O_WRONLY|os.O_SYNC, 0644)
if err != nil {
return nil, xerrors.Errorf("error creating checkpoint: %w", err)
}
buf := bufio.NewWriter(file)
return &Checkpoint{
file: file,
buf: buf,
}, nil
}
func OpenCheckpoint(path string) (*Checkpoint, cid.Cid, error) {
filein, err := os.Open(path)
if err != nil {
return nil, cid.Undef, xerrors.Errorf("error opening checkpoint for reading: %w", err)
}
defer filein.Close() //nolint:errcheck
bufin := bufio.NewReader(filein)
start, err := readRawCid(bufin, nil)
if err != nil && err != io.EOF {
return nil, cid.Undef, xerrors.Errorf("error reading cid from checkpoint: %w", err)
}
fileout, err := os.OpenFile(path, os.O_WRONLY|os.O_SYNC, 0644)
if err != nil {
return nil, cid.Undef, xerrors.Errorf("error opening checkpoint for writing: %w", err)
}
bufout := bufio.NewWriter(fileout)
return &Checkpoint{
file: fileout,
buf: bufout,
}, start, nil
}
func (cp *Checkpoint) Set(c cid.Cid) error {
if _, err := cp.file.Seek(0, io.SeekStart); err != nil {
return xerrors.Errorf("error seeking beginning of checkpoint: %w", err)
}
if err := writeRawCid(cp.buf, c, true); err != nil {
return xerrors.Errorf("error writing cid to checkpoint: %w", err)
}
return nil
}
func (cp *Checkpoint) Close() error {
if cp.file == nil {
return nil
}
err := cp.file.Close()
cp.file = nil
cp.buf = nil
return err
}
func readRawCid(buf *bufio.Reader, hbuf []byte) (cid.Cid, error) {
sz, err := buf.ReadByte()
if err != nil {
return cid.Undef, err // don't wrap EOF as it is not an error here
}
if hbuf == nil {
hbuf = make([]byte, int(sz))
} else {
hbuf = hbuf[:int(sz)]
}
if _, err := io.ReadFull(buf, hbuf); err != nil {
return cid.Undef, xerrors.Errorf("error reading hash: %w", err) // wrap EOF, it's corrupt
}
hash, err := mh.Cast(hbuf)
if err != nil {
return cid.Undef, xerrors.Errorf("error casting multihash: %w", err)
}
return cid.NewCidV1(cid.Raw, hash), nil
}
func writeRawCid(buf *bufio.Writer, c cid.Cid, flush bool) error {
hash := c.Hash()
if err := buf.WriteByte(byte(len(hash))); err != nil {
return err
}
if _, err := buf.Write(hash); err != nil {
return err
}
if flush {
return buf.Flush()
}
return nil
}
+138
View File
@@ -0,0 +1,138 @@
package splitstore
import (
"path/filepath"
"testing"
"github.com/ipfs/go-cid"
"github.com/multiformats/go-multihash"
)
func TestCheckpoint(t *testing.T) {
dir := t.TempDir()
path := filepath.Join(dir, "checkpoint")
makeCid := func(key string) cid.Cid {
h, err := multihash.Sum([]byte(key), multihash.SHA2_256, -1)
if err != nil {
t.Fatal(err)
}
return cid.NewCidV1(cid.Raw, h)
}
k1 := makeCid("a")
k2 := makeCid("b")
k3 := makeCid("c")
k4 := makeCid("d")
cp, err := NewCheckpoint(path)
if err != nil {
t.Fatal(err)
}
if err := cp.Set(k1); err != nil {
t.Fatal(err)
}
if err := cp.Set(k2); err != nil {
t.Fatal(err)
}
if err := cp.Close(); err != nil {
t.Fatal(err)
}
cp, start, err := OpenCheckpoint(path)
if err != nil {
t.Fatal(err)
}
if !start.Equals(k2) {
t.Fatalf("expected start to be %s; got %s", k2, start)
}
if err := cp.Set(k3); err != nil {
t.Fatal(err)
}
if err := cp.Set(k4); err != nil {
t.Fatal(err)
}
if err := cp.Close(); err != nil {
t.Fatal(err)
}
cp, start, err = OpenCheckpoint(path)
if err != nil {
t.Fatal(err)
}
if !start.Equals(k4) {
t.Fatalf("expected start to be %s; got %s", k4, start)
}
if err := cp.Close(); err != nil {
t.Fatal(err)
}
// also test correct operation with an empty checkpoint
cp, err = NewCheckpoint(path)
if err != nil {
t.Fatal(err)
}
if err := cp.Close(); err != nil {
t.Fatal(err)
}
cp, start, err = OpenCheckpoint(path)
if err != nil {
t.Fatal(err)
}
if start.Defined() {
t.Fatal("expected start to be undefined")
}
if err := cp.Set(k1); err != nil {
t.Fatal(err)
}
if err := cp.Set(k2); err != nil {
t.Fatal(err)
}
if err := cp.Close(); err != nil {
t.Fatal(err)
}
cp, start, err = OpenCheckpoint(path)
if err != nil {
t.Fatal(err)
}
if !start.Equals(k2) {
t.Fatalf("expected start to be %s; got %s", k2, start)
}
if err := cp.Set(k3); err != nil {
t.Fatal(err)
}
if err := cp.Set(k4); err != nil {
t.Fatal(err)
}
if err := cp.Close(); err != nil {
t.Fatal(err)
}
cp, start, err = OpenCheckpoint(path)
if err != nil {
t.Fatal(err)
}
if !start.Equals(k4) {
t.Fatalf("expected start to be %s; got %s", k4, start)
}
if err := cp.Close(); err != nil {
t.Fatal(err)
}
}
+101
View File
@@ -0,0 +1,101 @@
package splitstore
import (
"bufio"
"io"
"os"
"github.com/ipfs/go-cid"
"golang.org/x/xerrors"
)
type ColdSetWriter struct {
file *os.File
buf *bufio.Writer
}
type ColdSetReader struct {
file *os.File
buf *bufio.Reader
}
func NewColdSetWriter(path string) (*ColdSetWriter, error) {
file, err := os.OpenFile(path, os.O_CREATE|os.O_TRUNC|os.O_WRONLY, 0644)
if err != nil {
return nil, xerrors.Errorf("error creating coldset: %w", err)
}
buf := bufio.NewWriter(file)
return &ColdSetWriter{
file: file,
buf: buf,
}, nil
}
func NewColdSetReader(path string) (*ColdSetReader, error) {
file, err := os.Open(path)
if err != nil {
return nil, xerrors.Errorf("error opening coldset: %w", err)
}
buf := bufio.NewReader(file)
return &ColdSetReader{
file: file,
buf: buf,
}, nil
}
func (s *ColdSetWriter) Write(c cid.Cid) error {
return writeRawCid(s.buf, c, false)
}
func (s *ColdSetWriter) Close() error {
if s.file == nil {
return nil
}
err1 := s.buf.Flush()
err2 := s.file.Close()
s.buf = nil
s.file = nil
if err1 != nil {
return err1
}
return err2
}
func (s *ColdSetReader) ForEach(f func(cid.Cid) error) error {
hbuf := make([]byte, 256)
for {
next, err := readRawCid(s.buf, hbuf)
if err != nil {
if err == io.EOF {
return nil
}
return xerrors.Errorf("error reading coldset: %w", err)
}
if err := f(next); err != nil {
return err
}
}
}
func (s *ColdSetReader) Reset() error {
_, err := s.file.Seek(0, io.SeekStart)
return err
}
func (s *ColdSetReader) Close() error {
if s.file == nil {
return nil
}
err := s.file.Close()
s.file = nil
s.buf = nil
return err
}
+90
View File
@@ -0,0 +1,90 @@
package splitstore
import (
"fmt"
"path/filepath"
"testing"
"github.com/ipfs/go-cid"
"github.com/multiformats/go-multihash"
)
func TestColdSet(t *testing.T) {
dir := t.TempDir()
path := filepath.Join(dir, "coldset")
makeCid := func(i int) cid.Cid {
h, err := multihash.Sum([]byte(fmt.Sprintf("cid.%d", i)), multihash.SHA2_256, -1)
if err != nil {
t.Fatal(err)
}
return cid.NewCidV1(cid.Raw, h)
}
const count = 1000
cids := make([]cid.Cid, 0, count)
for i := 0; i < count; i++ {
cids = append(cids, makeCid(i))
}
cw, err := NewColdSetWriter(path)
if err != nil {
t.Fatal(err)
}
for _, c := range cids {
if err := cw.Write(c); err != nil {
t.Fatal(err)
}
}
if err := cw.Close(); err != nil {
t.Fatal(err)
}
cr, err := NewColdSetReader(path)
if err != nil {
t.Fatal(err)
}
index := 0
err = cr.ForEach(func(c cid.Cid) error {
if index >= count {
t.Fatal("too many cids")
}
if !c.Equals(cids[index]) {
t.Fatalf("wrong cid %d; expected %s but got %s", index, cids[index], c)
}
index++
return nil
})
if err != nil {
t.Fatal(err)
}
if err := cr.Reset(); err != nil {
t.Fatal(err)
}
index = 0
err = cr.ForEach(func(c cid.Cid) error {
if index >= count {
t.Fatal("too many cids")
}
if !c.Equals(cids[index]) {
t.Fatalf("wrong cid; expected %s but got %s", cids[index], c)
}
index++
return nil
})
if err != nil {
t.Fatal(err)
}
}
+2 -3
View File
@@ -12,11 +12,10 @@ import (
"sync"
"time"
blocks "github.com/ipfs/go-block-format"
"github.com/ipfs/go-cid"
"go.uber.org/multierr"
"golang.org/x/xerrors"
blocks "github.com/ipfs/go-block-format"
cid "github.com/ipfs/go-cid"
)
type debugLog struct {
+18 -11
View File
@@ -3,35 +3,42 @@ package splitstore
import (
"errors"
"github.com/ipfs/go-cid"
"golang.org/x/xerrors"
cid "github.com/ipfs/go-cid"
)
var errMarkSetClosed = errors.New("markset closed")
// MarkSet is a utility to keep track of seen CID, and later query for them.
//
// * If the expected dataset is large, it can be backed by a datastore (e.g. bbolt).
// * If a probabilistic result is acceptable, it can be backed by a bloom filter
// MarkSet is an interface for tracking CIDs during chain and object walks
type MarkSet interface {
ObjectVisitor
Mark(cid.Cid) error
MarkMany([]cid.Cid) error
Has(cid.Cid) (bool, error)
Close() error
SetConcurrent()
// BeginCriticalSection ensures that the markset is persisted to disk for recovery in case
// of abnormal termination during the critical section span.
BeginCriticalSection() error
// EndCriticalSection ends the critical section span.
EndCriticalSection()
}
type MarkSetEnv interface {
Create(name string, sizeHint int64) (MarkSet, error)
// New creates a new markset within the environment.
// name is a unique name for this markset, mapped to the filesystem for on-disk persistence.
// sizeHint is a hint about the expected size of the markset
New(name string, sizeHint int64) (MarkSet, error)
// Recover recovers an existing markset persisted on-disk.
Recover(name string) (MarkSet, error)
// Close closes the markset
Close() error
}
func OpenMarkSetEnv(path string, mtype string) (MarkSetEnv, error) {
switch mtype {
case "bloom":
return NewBloomMarkSetEnv()
case "map":
return NewMapMarkSetEnv()
return NewMapMarkSetEnv(path)
case "badger":
return NewBadgerMarkSetEnv(path)
default:
+302 -83
View File
@@ -3,15 +3,14 @@ package splitstore
import (
"os"
"path/filepath"
"runtime"
"sync"
"golang.org/x/xerrors"
"github.com/dgraph-io/badger/v2"
"github.com/dgraph-io/badger/v2/options"
"github.com/ipfs/go-cid"
"go.uber.org/zap"
cid "github.com/ipfs/go-cid"
"golang.org/x/xerrors"
)
type BadgerMarkSetEnv struct {
@@ -27,6 +26,8 @@ type BadgerMarkSet struct {
writing map[int]map[string]struct{}
writers int
seqno int
version int
persist bool
db *badger.DB
path string
@@ -46,39 +47,12 @@ func NewBadgerMarkSetEnv(path string) (MarkSetEnv, error) {
return &BadgerMarkSetEnv{path: msPath}, nil
}
func (e *BadgerMarkSetEnv) Create(name string, sizeHint int64) (MarkSet, error) {
func (e *BadgerMarkSetEnv) New(name string, sizeHint int64) (MarkSet, error) {
path := filepath.Join(e.path, name)
// clean up first
err := os.RemoveAll(path)
db, err := openBadgerDB(path, false)
if err != nil {
return nil, xerrors.Errorf("error clearing markset directory: %w", err)
}
err = os.MkdirAll(path, 0755) //nolint:gosec
if err != nil {
return nil, xerrors.Errorf("error creating markset directory: %w", err)
}
opts := badger.DefaultOptions(path)
opts.SyncWrites = false
opts.CompactL0OnClose = false
opts.Compression = options.None
// Note: We use FileIO for loading modes to avoid memory thrashing and interference
// between the system blockstore and the markset.
// It was observed that using the default memory mapped option resulted in
// significant interference and unacceptably high block validation times once the markset
// exceeded 1GB in size.
opts.TableLoadingMode = options.FileIO
opts.ValueLogLoadingMode = options.FileIO
opts.Logger = &badgerLogger{
SugaredLogger: log.Desugar().WithOptions(zap.AddCallerSkip(1)).Sugar(),
skip2: log.Desugar().WithOptions(zap.AddCallerSkip(2)).Sugar(),
}
db, err := badger.Open(opts)
if err != nil {
return nil, xerrors.Errorf("error creating badger markset: %w", err)
return nil, xerrors.Errorf("error creating badger db: %w", err)
}
ms := &BadgerMarkSet{
@@ -92,58 +66,103 @@ func (e *BadgerMarkSetEnv) Create(name string, sizeHint int64) (MarkSet, error)
return ms, nil
}
func (e *BadgerMarkSetEnv) Recover(name string) (MarkSet, error) {
path := filepath.Join(e.path, name)
if _, err := os.Stat(path); err != nil {
return nil, xerrors.Errorf("error stating badger db path: %w", err)
}
db, err := openBadgerDB(path, true)
if err != nil {
return nil, xerrors.Errorf("error creating badger db: %w", err)
}
ms := &BadgerMarkSet{
pend: make(map[string]struct{}),
writing: make(map[int]map[string]struct{}),
db: db,
path: path,
persist: true,
}
ms.cond.L = &ms.mx
return ms, nil
}
func (e *BadgerMarkSetEnv) Close() error {
return os.RemoveAll(e.path)
return nil
}
func (s *BadgerMarkSet) BeginCriticalSection() error {
s.mx.Lock()
if s.persist {
s.mx.Unlock()
return nil
}
var write bool
var seqno int
if len(s.pend) > 0 {
write = true
seqno = s.nextBatch()
}
s.persist = true
s.mx.Unlock()
if write {
// all writes sync once perist is true
return s.write(seqno)
}
// wait for any pending writes and sync
s.mx.Lock()
for s.writers > 0 {
s.cond.Wait()
}
s.mx.Unlock()
return s.db.Sync()
}
func (s *BadgerMarkSet) EndCriticalSection() {
s.mx.Lock()
defer s.mx.Unlock()
s.persist = false
}
func (s *BadgerMarkSet) Mark(c cid.Cid) error {
s.mx.Lock()
if s.pend == nil {
s.mx.Unlock()
return errMarkSetClosed
}
s.pend[string(c.Hash())] = struct{}{}
if len(s.pend) < badgerMarkSetBatchSize {
s.mx.Unlock()
return nil
}
pend := s.pend
seqno := s.seqno
s.seqno++
s.writing[seqno] = pend
s.pend = make(map[string]struct{})
s.writers++
write, seqno := s.put(string(c.Hash()))
s.mx.Unlock()
defer func() {
s.mx.Lock()
defer s.mx.Unlock()
delete(s.writing, seqno)
s.writers--
if s.writers == 0 {
s.cond.Broadcast()
}
}()
empty := []byte{} // not nil
batch := s.db.NewWriteBatch()
defer batch.Cancel()
for k := range pend {
if err := batch.Set([]byte(k), empty); err != nil {
return err
}
if write {
return s.write(seqno)
}
err := batch.Flush()
if err != nil {
return xerrors.Errorf("error flushing batch to badger markset: %w", err)
return nil
}
func (s *BadgerMarkSet) MarkMany(batch []cid.Cid) error {
s.mx.Lock()
if s.pend == nil {
s.mx.Unlock()
return errMarkSetClosed
}
write, seqno := s.putMany(batch)
s.mx.Unlock()
if write {
return s.write(seqno)
}
return nil
@@ -153,25 +172,88 @@ func (s *BadgerMarkSet) Has(c cid.Cid) (bool, error) {
s.mx.RLock()
defer s.mx.RUnlock()
key := c.Hash()
pendKey := string(key)
has, err := s.tryPending(pendKey)
if has || err != nil {
return has, err
}
return s.tryDB(key)
}
func (s *BadgerMarkSet) Visit(c cid.Cid) (bool, error) {
key := c.Hash()
pendKey := string(key)
s.mx.RLock()
has, err := s.tryPending(pendKey)
if has || err != nil {
s.mx.RUnlock()
return false, err
}
has, err = s.tryDB(key)
if has || err != nil {
s.mx.RUnlock()
return false, err
}
// we need to upgrade the lock to exclusive in order to write; take the version count to see
// if there was another write while we were upgrading
version := s.version
s.mx.RUnlock()
s.mx.Lock()
// we have to do the check dance again
has, err = s.tryPending(pendKey)
if has || err != nil {
s.mx.Unlock()
return false, err
}
if version != s.version {
// something was written to the db, we need to check it
has, err = s.tryDB(key)
if has || err != nil {
s.mx.Unlock()
return false, err
}
}
write, seqno := s.put(pendKey)
s.mx.Unlock()
if write {
err = s.write(seqno)
}
return true, err
}
// reader holds the (r)lock
func (s *BadgerMarkSet) tryPending(key string) (has bool, err error) {
if s.pend == nil {
return false, errMarkSetClosed
}
key := c.Hash()
pendKey := string(key)
_, ok := s.pend[pendKey]
if ok {
if _, ok := s.pend[key]; ok {
return true, nil
}
for _, wr := range s.writing {
_, ok := wr[pendKey]
if ok {
if _, ok := wr[key]; ok {
return true, nil
}
}
err := s.db.View(func(txn *badger.Txn) error {
return false, nil
}
func (s *BadgerMarkSet) tryDB(key []byte) (has bool, err error) {
err = s.db.View(func(txn *badger.Txn) error {
_, err := txn.Get(key)
return err
})
@@ -184,10 +266,96 @@ func (s *BadgerMarkSet) Has(c cid.Cid) (bool, error) {
return false, nil
default:
return false, xerrors.Errorf("error checking badger markset: %w", err)
return false, err
}
}
// writer holds the exclusive lock
func (s *BadgerMarkSet) put(key string) (write bool, seqno int) {
s.pend[key] = struct{}{}
if !s.persist && len(s.pend) < badgerMarkSetBatchSize {
return false, 0
}
seqno = s.nextBatch()
return true, seqno
}
func (s *BadgerMarkSet) putMany(batch []cid.Cid) (write bool, seqno int) {
for _, c := range batch {
key := string(c.Hash())
s.pend[key] = struct{}{}
}
if !s.persist && len(s.pend) < badgerMarkSetBatchSize {
return false, 0
}
seqno = s.nextBatch()
return true, seqno
}
func (s *BadgerMarkSet) nextBatch() int {
seqno := s.seqno
s.seqno++
s.writing[seqno] = s.pend
s.pend = make(map[string]struct{})
return seqno
}
func (s *BadgerMarkSet) write(seqno int) (err error) {
s.mx.Lock()
if s.pend == nil {
s.mx.Unlock()
return errMarkSetClosed
}
pend := s.writing[seqno]
s.writers++
s.mx.Unlock()
defer func() {
s.mx.Lock()
defer s.mx.Unlock()
if err == nil {
delete(s.writing, seqno)
s.version++
}
s.writers--
if s.writers == 0 {
s.cond.Broadcast()
}
}()
empty := []byte{} // not nil
batch := s.db.NewWriteBatch()
defer batch.Cancel()
for k := range pend {
if err = batch.Set([]byte(k), empty); err != nil {
return xerrors.Errorf("error setting batch: %w", err)
}
}
err = batch.Flush()
if err != nil {
return xerrors.Errorf("error flushing batch to badger markset: %w", err)
}
s.mx.RLock()
persist := s.persist
s.mx.RUnlock()
if persist {
return s.db.Sync()
}
return nil
}
func (s *BadgerMarkSet) Close() error {
s.mx.Lock()
defer s.mx.Unlock()
@@ -204,12 +372,65 @@ func (s *BadgerMarkSet) Close() error {
db := s.db
s.db = nil
return closeBadgerDB(db, s.path, s.persist)
}
func openBadgerDB(path string, recover bool) (*badger.DB, error) {
// if it is not a recovery, clean up first
if !recover {
err := os.RemoveAll(path)
if err != nil {
return nil, xerrors.Errorf("error clearing markset directory: %w", err)
}
err = os.MkdirAll(path, 0755) //nolint:gosec
if err != nil {
return nil, xerrors.Errorf("error creating markset directory: %w", err)
}
}
opts := badger.DefaultOptions(path)
// we manually sync when we are in critical section
opts.SyncWrites = false
// no need to do that
opts.CompactL0OnClose = false
// we store hashes, not much to gain by compression
opts.Compression = options.None
// Note: We use FileIO for loading modes to avoid memory thrashing and interference
// between the system blockstore and the markset.
// It was observed that using the default memory mapped option resulted in
// significant interference and unacceptably high block validation times once the markset
// exceeded 1GB in size.
opts.TableLoadingMode = options.FileIO
opts.ValueLogLoadingMode = options.FileIO
// We increase the number of L0 tables before compaction to make it unlikely to
// be necessary.
opts.NumLevelZeroTables = 20 // default is 5
opts.NumLevelZeroTablesStall = 30 // default is 10
// increase the number of compactors from default 2 so that if we ever have to
// compact, it is fast
if runtime.NumCPU()/2 > opts.NumCompactors {
opts.NumCompactors = runtime.NumCPU() / 2
}
opts.Logger = &badgerLogger{
SugaredLogger: log.Desugar().WithOptions(zap.AddCallerSkip(1)).Sugar(),
skip2: log.Desugar().WithOptions(zap.AddCallerSkip(2)).Sugar(),
}
return badger.Open(opts)
}
func closeBadgerDB(db *badger.DB, path string, persist bool) error {
err := db.Close()
if err != nil {
return xerrors.Errorf("error closing badger markset: %w", err)
}
err = os.RemoveAll(s.path)
if persist {
return nil
}
err = os.RemoveAll(path)
if err != nil {
return xerrors.Errorf("error deleting badger markset: %w", err)
}
@@ -217,8 +438,6 @@ func (s *BadgerMarkSet) Close() error {
return nil
}
func (s *BadgerMarkSet) SetConcurrent() {}
// badger logging through go-log
type badgerLogger struct {
*zap.SugaredLogger
-107
View File
@@ -1,107 +0,0 @@
package splitstore
import (
"crypto/rand"
"crypto/sha256"
"sync"
"golang.org/x/xerrors"
bbloom "github.com/ipfs/bbloom"
cid "github.com/ipfs/go-cid"
)
const (
BloomFilterMinSize = 10_000_000
BloomFilterProbability = 0.01
)
type BloomMarkSetEnv struct{}
var _ MarkSetEnv = (*BloomMarkSetEnv)(nil)
type BloomMarkSet struct {
salt []byte
mx sync.RWMutex
bf *bbloom.Bloom
ts bool
}
var _ MarkSet = (*BloomMarkSet)(nil)
func NewBloomMarkSetEnv() (*BloomMarkSetEnv, error) {
return &BloomMarkSetEnv{}, nil
}
func (e *BloomMarkSetEnv) Create(name string, sizeHint int64) (MarkSet, error) {
size := int64(BloomFilterMinSize)
for size < sizeHint {
size += BloomFilterMinSize
}
salt := make([]byte, 4)
_, err := rand.Read(salt)
if err != nil {
return nil, xerrors.Errorf("error reading salt: %w", err)
}
bf, err := bbloom.New(float64(size), BloomFilterProbability)
if err != nil {
return nil, xerrors.Errorf("error creating bloom filter: %w", err)
}
return &BloomMarkSet{salt: salt, bf: bf}, nil
}
func (e *BloomMarkSetEnv) Close() error {
return nil
}
func (s *BloomMarkSet) saltedKey(cid cid.Cid) []byte {
hash := cid.Hash()
key := make([]byte, len(s.salt)+len(hash))
n := copy(key, s.salt)
copy(key[n:], hash)
rehash := sha256.Sum256(key)
return rehash[:]
}
func (s *BloomMarkSet) Mark(cid cid.Cid) error {
if s.ts {
s.mx.Lock()
defer s.mx.Unlock()
}
if s.bf == nil {
return errMarkSetClosed
}
s.bf.Add(s.saltedKey(cid))
return nil
}
func (s *BloomMarkSet) Has(cid cid.Cid) (bool, error) {
if s.ts {
s.mx.RLock()
defer s.mx.RUnlock()
}
if s.bf == nil {
return false, errMarkSetClosed
}
return s.bf.Has(s.saltedKey(cid)), nil
}
func (s *BloomMarkSet) Close() error {
if s.ts {
s.mx.Lock()
defer s.mx.Unlock()
}
s.bf = nil
return nil
}
func (s *BloomMarkSet) SetConcurrent() {
s.ts = true
}
+236 -23
View File
@@ -1,12 +1,19 @@
package splitstore
import (
"bufio"
"io"
"os"
"path/filepath"
"sync"
cid "github.com/ipfs/go-cid"
"github.com/ipfs/go-cid"
"golang.org/x/xerrors"
)
type MapMarkSetEnv struct{}
type MapMarkSetEnv struct {
path string
}
var _ MarkSetEnv = (*MapMarkSetEnv)(nil)
@@ -14,44 +21,194 @@ type MapMarkSet struct {
mx sync.RWMutex
set map[string]struct{}
ts bool
persist bool
file *os.File
buf *bufio.Writer
path string
}
var _ MarkSet = (*MapMarkSet)(nil)
func NewMapMarkSetEnv() (*MapMarkSetEnv, error) {
return &MapMarkSetEnv{}, nil
func NewMapMarkSetEnv(path string) (*MapMarkSetEnv, error) {
msPath := filepath.Join(path, "markset.map")
err := os.MkdirAll(msPath, 0755) //nolint:gosec
if err != nil {
return nil, xerrors.Errorf("error creating markset directory: %w", err)
}
return &MapMarkSetEnv{path: msPath}, nil
}
func (e *MapMarkSetEnv) Create(name string, sizeHint int64) (MarkSet, error) {
func (e *MapMarkSetEnv) New(name string, sizeHint int64) (MarkSet, error) {
path := filepath.Join(e.path, name)
return &MapMarkSet{
set: make(map[string]struct{}, sizeHint),
set: make(map[string]struct{}, sizeHint),
path: path,
}, nil
}
func (e *MapMarkSetEnv) Recover(name string) (MarkSet, error) {
path := filepath.Join(e.path, name)
s := &MapMarkSet{
set: make(map[string]struct{}),
path: path,
}
in, err := os.Open(path)
if err != nil {
return nil, xerrors.Errorf("error opening markset file for read: %w", err)
}
defer in.Close() //nolint:errcheck
// wrap a buffered reader to make this faster
buf := bufio.NewReader(in)
for {
var sz byte
if sz, err = buf.ReadByte(); err != nil {
break
}
key := make([]byte, int(sz))
if _, err = io.ReadFull(buf, key); err != nil {
break
}
s.set[string(key)] = struct{}{}
}
if err != io.EOF {
return nil, xerrors.Errorf("error reading markset file: %w", err)
}
file, err := os.OpenFile(s.path, os.O_WRONLY|os.O_APPEND, 0)
if err != nil {
return nil, xerrors.Errorf("error opening markset file for write: %w", err)
}
s.persist = true
s.file = file
s.buf = bufio.NewWriter(file)
return s, nil
}
func (e *MapMarkSetEnv) Close() error {
return nil
}
func (s *MapMarkSet) Mark(cid cid.Cid) error {
if s.ts {
s.mx.Lock()
defer s.mx.Unlock()
}
func (s *MapMarkSet) BeginCriticalSection() error {
s.mx.Lock()
defer s.mx.Unlock()
if s.set == nil {
return errMarkSetClosed
}
s.set[string(cid.Hash())] = struct{}{}
if s.persist {
return nil
}
file, err := os.OpenFile(s.path, os.O_CREATE|os.O_TRUNC|os.O_WRONLY, 0644)
if err != nil {
return xerrors.Errorf("error opening markset file: %w", err)
}
// wrap a buffered writer to make this faster
s.buf = bufio.NewWriter(file)
for key := range s.set {
if err := s.writeKey([]byte(key), false); err != nil {
_ = file.Close()
s.buf = nil
return err
}
}
if err := s.buf.Flush(); err != nil {
_ = file.Close()
s.buf = nil
return xerrors.Errorf("error flushing markset file buffer: %w", err)
}
s.file = file
s.persist = true
return nil
}
func (s *MapMarkSet) EndCriticalSection() {
s.mx.Lock()
defer s.mx.Unlock()
if !s.persist {
return
}
_ = s.file.Close()
_ = os.Remove(s.path)
s.file = nil
s.buf = nil
s.persist = false
}
func (s *MapMarkSet) Mark(c cid.Cid) error {
s.mx.Lock()
defer s.mx.Unlock()
if s.set == nil {
return errMarkSetClosed
}
hash := c.Hash()
s.set[string(hash)] = struct{}{}
if s.persist {
if err := s.writeKey(hash, true); err != nil {
return err
}
if err := s.file.Sync(); err != nil {
return xerrors.Errorf("error syncing markset: %w", err)
}
}
return nil
}
func (s *MapMarkSet) MarkMany(batch []cid.Cid) error {
s.mx.Lock()
defer s.mx.Unlock()
if s.set == nil {
return errMarkSetClosed
}
for _, c := range batch {
hash := c.Hash()
s.set[string(hash)] = struct{}{}
if s.persist {
if err := s.writeKey(hash, false); err != nil {
return err
}
}
}
if s.persist {
if err := s.buf.Flush(); err != nil {
return xerrors.Errorf("error flushing markset buffer to disk: %w", err)
}
if err := s.file.Sync(); err != nil {
return xerrors.Errorf("error syncing markset: %w", err)
}
}
return nil
}
func (s *MapMarkSet) Has(cid cid.Cid) (bool, error) {
if s.ts {
s.mx.RLock()
defer s.mx.RUnlock()
}
s.mx.RLock()
defer s.mx.RUnlock()
if s.set == nil {
return false, errMarkSetClosed
@@ -61,15 +218,71 @@ func (s *MapMarkSet) Has(cid cid.Cid) (bool, error) {
return ok, nil
}
func (s *MapMarkSet) Close() error {
if s.ts {
s.mx.Lock()
defer s.mx.Unlock()
func (s *MapMarkSet) Visit(c cid.Cid) (bool, error) {
s.mx.Lock()
defer s.mx.Unlock()
if s.set == nil {
return false, errMarkSetClosed
}
hash := c.Hash()
key := string(hash)
if _, ok := s.set[key]; ok {
return false, nil
}
s.set[key] = struct{}{}
if s.persist {
if err := s.writeKey(hash, true); err != nil {
return false, err
}
if err := s.file.Sync(); err != nil {
return false, xerrors.Errorf("error syncing markset: %w", err)
}
}
return true, nil
}
func (s *MapMarkSet) Close() error {
s.mx.Lock()
defer s.mx.Unlock()
if s.set == nil {
return nil
}
s.set = nil
if s.file != nil {
if err := s.file.Close(); err != nil {
log.Warnf("error closing markset file: %s", err)
}
if !s.persist {
if err := os.Remove(s.path); err != nil {
log.Warnf("error removing markset file: %s", err)
}
}
}
return nil
}
func (s *MapMarkSet) SetConcurrent() {
s.ts = true
func (s *MapMarkSet) writeKey(k []byte, flush bool) error {
if err := s.buf.WriteByte(byte(len(k))); err != nil {
return xerrors.Errorf("error writing markset key length to disk: %w", err)
}
if _, err := s.buf.Write(k); err != nil {
return xerrors.Errorf("error writing markset key to disk: %w", err)
}
if flush {
if err := s.buf.Flush(); err != nil {
return xerrors.Errorf("error flushing markset buffer to disk: %w", err)
}
}
return nil
}
+386 -16
View File
@@ -1,37 +1,40 @@
// stm: #unit
package splitstore
import (
"io/ioutil"
"testing"
cid "github.com/ipfs/go-cid"
"github.com/ipfs/go-cid"
"github.com/multiformats/go-multihash"
)
func TestMapMarkSet(t *testing.T) {
//stm: @SPLITSTORE_MARKSET_CREATE_001, @SPLITSTORE_MARKSET_HAS_001, @@SPLITSTORE_MARKSET_MARK_001
//stm: @SPLITSTORE_MARKSET_CLOSE_001, @SPLITSTORE_MARKSET_CREATE_VISITOR_001
testMarkSet(t, "map")
}
func TestBloomMarkSet(t *testing.T) {
testMarkSet(t, "bloom")
testMarkSetRecovery(t, "map")
testMarkSetMarkMany(t, "map")
testMarkSetVisitor(t, "map")
testMarkSetVisitorRecovery(t, "map")
}
func TestBadgerMarkSet(t *testing.T) {
//stm: @SPLITSTORE_MARKSET_CREATE_001, @SPLITSTORE_MARKSET_HAS_001, @@SPLITSTORE_MARKSET_MARK_001
//stm: @SPLITSTORE_MARKSET_CLOSE_001, @SPLITSTORE_MARKSET_CREATE_VISITOR_001
bs := badgerMarkSetBatchSize
badgerMarkSetBatchSize = 1
t.Cleanup(func() {
badgerMarkSetBatchSize = bs
})
testMarkSet(t, "badger")
testMarkSetRecovery(t, "badger")
testMarkSetMarkMany(t, "badger")
testMarkSetVisitor(t, "badger")
testMarkSetVisitorRecovery(t, "badger")
}
func testMarkSet(t *testing.T, lsType string) {
t.Helper()
path, err := ioutil.TempDir("", "sweep-test.*")
if err != nil {
t.Fatal(err)
}
path := t.TempDir()
env, err := OpenMarkSetEnv(path, lsType)
if err != nil {
@@ -39,12 +42,13 @@ func testMarkSet(t *testing.T, lsType string) {
}
defer env.Close() //nolint:errcheck
hotSet, err := env.Create("hot", 0)
// stm: @SPLITSTORE_MARKSET_CREATE_001
hotSet, err := env.New("hot", 0)
if err != nil {
t.Fatal(err)
}
coldSet, err := env.Create("cold", 0)
coldSet, err := env.New("cold", 0)
if err != nil {
t.Fatal(err)
}
@@ -58,7 +62,9 @@ func testMarkSet(t *testing.T, lsType string) {
return cid.NewCidV1(cid.Raw, h)
}
// stm: @SPLITSTORE_MARKSET_HAS_001
mustHave := func(s MarkSet, cid cid.Cid) {
t.Helper()
has, err := s.Has(cid)
if err != nil {
t.Fatal(err)
@@ -70,6 +76,7 @@ func testMarkSet(t *testing.T, lsType string) {
}
mustNotHave := func(s MarkSet, cid cid.Cid) {
t.Helper()
has, err := s.Has(cid)
if err != nil {
t.Fatal(err)
@@ -85,6 +92,7 @@ func testMarkSet(t *testing.T, lsType string) {
k3 := makeCid("c")
k4 := makeCid("d")
// stm: @SPLITSTORE_MARKSET_MARK_001
hotSet.Mark(k1) //nolint
hotSet.Mark(k2) //nolint
coldSet.Mark(k3) //nolint
@@ -111,12 +119,12 @@ func testMarkSet(t *testing.T, lsType string) {
t.Fatal(err)
}
hotSet, err = env.Create("hot", 0)
hotSet, err = env.New("hot", 0)
if err != nil {
t.Fatal(err)
}
coldSet, err = env.Create("cold", 0)
coldSet, err = env.New("cold", 0)
if err != nil {
t.Fatal(err)
}
@@ -135,6 +143,7 @@ func testMarkSet(t *testing.T, lsType string) {
mustNotHave(coldSet, k3)
mustNotHave(coldSet, k4)
//stm: @SPLITSTORE_MARKSET_CLOSE_001
err = hotSet.Close()
if err != nil {
t.Fatal(err)
@@ -145,3 +154,364 @@ func testMarkSet(t *testing.T, lsType string) {
t.Fatal(err)
}
}
func testMarkSetVisitor(t *testing.T, lsType string) {
path := t.TempDir()
env, err := OpenMarkSetEnv(path, lsType)
if err != nil {
t.Fatal(err)
}
defer env.Close() //nolint:errcheck
//stm: @SPLITSTORE_MARKSET_CREATE_VISITOR_001
visitor, err := env.New("test", 0)
if err != nil {
t.Fatal(err)
}
defer visitor.Close() //nolint:errcheck
makeCid := func(key string) cid.Cid {
h, err := multihash.Sum([]byte(key), multihash.SHA2_256, -1)
if err != nil {
t.Fatal(err)
}
return cid.NewCidV1(cid.Raw, h)
}
mustVisit := func(v ObjectVisitor, cid cid.Cid) {
visit, err := v.Visit(cid)
if err != nil {
t.Fatal(err)
}
if !visit {
t.Fatal("object should be visited")
}
}
mustNotVisit := func(v ObjectVisitor, cid cid.Cid) {
visit, err := v.Visit(cid)
if err != nil {
t.Fatal(err)
}
if visit {
t.Fatal("unexpected visit")
}
}
k1 := makeCid("a")
k2 := makeCid("b")
k3 := makeCid("c")
k4 := makeCid("d")
mustVisit(visitor, k1)
mustVisit(visitor, k2)
mustVisit(visitor, k3)
mustVisit(visitor, k4)
mustNotVisit(visitor, k1)
mustNotVisit(visitor, k2)
mustNotVisit(visitor, k3)
mustNotVisit(visitor, k4)
}
func testMarkSetVisitorRecovery(t *testing.T, lsType string) {
path := t.TempDir()
env, err := OpenMarkSetEnv(path, lsType)
if err != nil {
t.Fatal(err)
}
defer env.Close() //nolint:errcheck
visitor, err := env.New("test", 0)
if err != nil {
t.Fatal(err)
}
defer visitor.Close() //nolint:errcheck
makeCid := func(key string) cid.Cid {
h, err := multihash.Sum([]byte(key), multihash.SHA2_256, -1)
if err != nil {
t.Fatal(err)
}
return cid.NewCidV1(cid.Raw, h)
}
mustVisit := func(v ObjectVisitor, cid cid.Cid) {
visit, err := v.Visit(cid)
if err != nil {
t.Fatal(err)
}
if !visit {
t.Fatal("object should be visited")
}
}
mustNotVisit := func(v ObjectVisitor, cid cid.Cid) {
visit, err := v.Visit(cid)
if err != nil {
t.Fatal(err)
}
if visit {
t.Fatal("unexpected visit")
}
}
k1 := makeCid("a")
k2 := makeCid("b")
k3 := makeCid("c")
k4 := makeCid("d")
mustVisit(visitor, k1)
mustVisit(visitor, k2)
if err := visitor.BeginCriticalSection(); err != nil {
t.Fatal(err)
}
mustVisit(visitor, k3)
mustVisit(visitor, k4)
mustNotVisit(visitor, k1)
mustNotVisit(visitor, k2)
mustNotVisit(visitor, k3)
mustNotVisit(visitor, k4)
if err := visitor.Close(); err != nil {
t.Fatal(err)
}
visitor, err = env.Recover("test")
if err != nil {
t.Fatal(err)
}
mustNotVisit(visitor, k1)
mustNotVisit(visitor, k2)
mustNotVisit(visitor, k3)
mustNotVisit(visitor, k4)
visitor.EndCriticalSection()
if err := visitor.Close(); err != nil {
t.Fatal(err)
}
_, err = env.Recover("test")
if err == nil {
t.Fatal("expected recovery to fail")
}
}
func testMarkSetRecovery(t *testing.T, lsType string) {
path := t.TempDir()
env, err := OpenMarkSetEnv(path, lsType)
if err != nil {
t.Fatal(err)
}
defer env.Close() //nolint:errcheck
markSet, err := env.New("test", 0)
if err != nil {
t.Fatal(err)
}
makeCid := func(key string) cid.Cid {
h, err := multihash.Sum([]byte(key), multihash.SHA2_256, -1)
if err != nil {
t.Fatal(err)
}
return cid.NewCidV1(cid.Raw, h)
}
mustHave := func(s MarkSet, cid cid.Cid) {
t.Helper()
has, err := s.Has(cid)
if err != nil {
t.Fatal(err)
}
if !has {
t.Fatal("mark not found")
}
}
mustNotHave := func(s MarkSet, cid cid.Cid) {
t.Helper()
has, err := s.Has(cid)
if err != nil {
t.Fatal(err)
}
if has {
t.Fatal("unexpected mark")
}
}
k1 := makeCid("a")
k2 := makeCid("b")
k3 := makeCid("c")
k4 := makeCid("d")
if err := markSet.Mark(k1); err != nil {
t.Fatal(err)
}
if err := markSet.Mark(k2); err != nil {
t.Fatal(err)
}
mustHave(markSet, k1)
mustHave(markSet, k2)
mustNotHave(markSet, k3)
mustNotHave(markSet, k4)
if err := markSet.BeginCriticalSection(); err != nil {
t.Fatal(err)
}
if err := markSet.Mark(k3); err != nil {
t.Fatal(err)
}
if err := markSet.Mark(k4); err != nil {
t.Fatal(err)
}
mustHave(markSet, k1)
mustHave(markSet, k2)
mustHave(markSet, k3)
mustHave(markSet, k4)
if err := markSet.Close(); err != nil {
t.Fatal(err)
}
markSet, err = env.Recover("test")
if err != nil {
t.Fatal(err)
}
mustHave(markSet, k1)
mustHave(markSet, k2)
mustHave(markSet, k3)
mustHave(markSet, k4)
markSet.EndCriticalSection()
if err := markSet.Close(); err != nil {
t.Fatal(err)
}
_, err = env.Recover("test")
if err == nil {
t.Fatal("expected recovery to fail")
}
}
func testMarkSetMarkMany(t *testing.T, lsType string) {
path := t.TempDir()
env, err := OpenMarkSetEnv(path, lsType)
if err != nil {
t.Fatal(err)
}
defer env.Close() //nolint:errcheck
markSet, err := env.New("test", 0)
if err != nil {
t.Fatal(err)
}
makeCid := func(key string) cid.Cid {
h, err := multihash.Sum([]byte(key), multihash.SHA2_256, -1)
if err != nil {
t.Fatal(err)
}
return cid.NewCidV1(cid.Raw, h)
}
mustHave := func(s MarkSet, cid cid.Cid) {
t.Helper()
has, err := s.Has(cid)
if err != nil {
t.Fatal(err)
}
if !has {
t.Fatal("mark not found")
}
}
mustNotHave := func(s MarkSet, cid cid.Cid) {
t.Helper()
has, err := s.Has(cid)
if err != nil {
t.Fatal(err)
}
if has {
t.Fatal("unexpected mark")
}
}
k1 := makeCid("a")
k2 := makeCid("b")
k3 := makeCid("c")
k4 := makeCid("d")
if err := markSet.MarkMany([]cid.Cid{k1, k2}); err != nil {
t.Fatal(err)
}
mustHave(markSet, k1)
mustHave(markSet, k2)
mustNotHave(markSet, k3)
mustNotHave(markSet, k4)
if err := markSet.BeginCriticalSection(); err != nil {
t.Fatal(err)
}
if err := markSet.MarkMany([]cid.Cid{k3, k4}); err != nil {
t.Fatal(err)
}
mustHave(markSet, k1)
mustHave(markSet, k2)
mustHave(markSet, k3)
mustHave(markSet, k4)
if err := markSet.Close(); err != nil {
t.Fatal(err)
}
markSet, err = env.Recover("test")
if err != nil {
t.Fatal(err)
}
mustHave(markSet, k1)
mustHave(markSet, k2)
mustHave(markSet, k3)
mustHave(markSet, k4)
markSet.EndCriticalSection()
if err := markSet.Close(); err != nil {
t.Fatal(err)
}
_, err = env.Recover("test")
if err == nil {
t.Fatal("expected recovery to fail")
}
}
+288 -50
View File
@@ -8,20 +8,22 @@ import (
"sync/atomic"
"time"
blocks "github.com/ipfs/go-block-format"
"github.com/ipfs/go-cid"
dstore "github.com/ipfs/go-datastore"
ipld "github.com/ipfs/go-ipld-format"
logging "github.com/ipfs/go-log/v2"
"go.opencensus.io/stats"
"go.uber.org/multierr"
"golang.org/x/xerrors"
blocks "github.com/ipfs/go-block-format"
cid "github.com/ipfs/go-cid"
dstore "github.com/ipfs/go-datastore"
logging "github.com/ipfs/go-log/v2"
"github.com/filecoin-project/go-state-types/abi"
bstore "github.com/filecoin-project/lotus/blockstore"
"github.com/filecoin-project/lotus/build"
"github.com/filecoin-project/lotus/chain/stmgr"
"github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/metrics"
"go.opencensus.io/stats"
)
var (
@@ -41,12 +43,33 @@ var (
// compactionIndexKey stores the compaction index (serial number)
compactionIndexKey = dstore.NewKey("/splitstore/compactionIndex")
// stores the prune index (serial number)
pruneIndexKey = dstore.NewKey("/splitstore/pruneIndex")
// stores the base epoch of last prune in the metadata store
pruneEpochKey = dstore.NewKey("/splitstore/pruneEpoch")
log = logging.Logger("splitstore")
errClosing = errors.New("splitstore is closing")
// set this to true if you are debugging the splitstore to enable debug logging
enableDebugLog = false
// set this to true if you want to track origin stack traces in the write log
enableDebugLogWriteTraces = false
// upgradeBoundary is the boundary before and after an upgrade where we suppress compaction
upgradeBoundary = build.Finality
)
type CompactType int
const (
none CompactType = iota
warmup
hot
cold
check
)
func init() {
@@ -88,6 +111,21 @@ type Config struct {
// A positive value is the number of compactions before a full GC is performed;
// a value of 1 will perform full GC in every compaction.
HotStoreFullGCFrequency uint64
// EnableColdStoreAutoPrune turns on compaction of the cold store i.e. pruning
// where hotstore compaction occurs every finality epochs pruning happens every 3 finalities
// Default is false
EnableColdStoreAutoPrune bool
// ColdStoreFullGCFrequency specifies how often to performa a full (moving) GC on the coldstore.
// Only applies if auto prune is enabled. A value of 0 disables while a value of 1 will do
// full GC in every prune.
// Default is 7 (about once every a week)
ColdStoreFullGCFrequency uint64
// ColdStoreRetention specifies the retention policy for data reachable from the chain, in
// finalities beyond the compaction boundary, default is 0, -1 retains everything
ColdStoreRetention int64
}
// ChainAccessor allows the Splitstore to access the chain. It will most likely
@@ -98,6 +136,12 @@ type ChainAccessor interface {
SubscribeHeadChanges(change func(revert []*types.TipSet, apply []*types.TipSet) error)
}
// upgradeRange is a precomputed epoch range during which we shouldn't compact so as to not
// interfere with an upgrade
type upgradeRange struct {
start, end abi.ChainEpoch
}
// hotstore is the interface that must be satisfied by the hot blockstore; it is an extension
// of the Blockstore interface with the traits we need for compaction.
type hotstore interface {
@@ -106,8 +150,9 @@ type hotstore interface {
}
type SplitStore struct {
compacting int32 // compaction/prune/warmup in progress
closing int32 // the splitstore is closing
compacting int32 // flag for when compaction is in progress
compactType CompactType // compaction type, protected by compacting atomic, only meaningful when compacting == 1
closing int32 // the splitstore is closing
cfg *Config
path string
@@ -115,20 +160,22 @@ type SplitStore struct {
mx sync.Mutex
warmupEpoch abi.ChainEpoch // protected by mx
baseEpoch abi.ChainEpoch // protected by compaction lock
pruneEpoch abi.ChainEpoch // protected by compaction lock
headChangeMx sync.Mutex
coldPurgeSize int
chain ChainAccessor
ds dstore.Datastore
cold bstore.Blockstore
hot hotstore
upgrades []upgradeRange
markSetEnv MarkSetEnv
markSetSize int64
compactionIndex int64
pruneIndex int64
ctx context.Context
cancel func()
@@ -142,10 +189,20 @@ type SplitStore struct {
txnViews int
txnViewsWaiting bool
txnActive bool
txnProtect MarkSet
txnRefsMx sync.Mutex
txnRefs map[cid.Cid]struct{}
txnMissing map[cid.Cid]struct{}
txnMarkSet MarkSet
txnSyncMx sync.Mutex
txnSyncCond sync.Cond
txnSync bool
// background cold object reification
reifyWorkers sync.WaitGroup
reifyMx sync.Mutex
reifyCond sync.Cond
reifyPend map[cid.Cid]struct{}
reifyInProgress map[cid.Cid]struct{}
// registered protectors
protectors []func(func(cid.Cid) error) error
@@ -182,13 +239,16 @@ func Open(path string, ds dstore.Datastore, hot, cold bstore.Blockstore, cfg *Co
cold: cold,
hot: hots,
markSetEnv: markSetEnv,
coldPurgeSize: defaultColdPurgeSize,
}
ss.txnViewsCond.L = &ss.txnViewsMx
ss.txnSyncCond.L = &ss.txnSyncMx
ss.ctx, ss.cancel = context.WithCancel(context.Background())
ss.reifyCond.L = &ss.reifyMx
ss.reifyPend = make(map[cid.Cid]struct{})
ss.reifyInProgress = make(map[cid.Cid]struct{})
if enableDebugLog {
ss.debug, err = openDebugLog(path)
if err != nil {
@@ -196,21 +256,36 @@ func Open(path string, ds dstore.Datastore, hot, cold bstore.Blockstore, cfg *Co
}
}
if ss.checkpointExists() {
log.Info("found compaction checkpoint; resuming compaction")
if err := ss.completeCompaction(); err != nil {
markSetEnv.Close() //nolint:errcheck
return nil, xerrors.Errorf("error resuming compaction: %w", err)
}
}
if ss.pruneCheckpointExists() {
log.Info("found prune checkpoint; resuming prune")
if err := ss.completePrune(); err != nil {
markSetEnv.Close() //nolint:errcheck
return nil, xerrors.Errorf("error resuming prune: %w", err)
}
}
return ss, nil
}
// Blockstore interface
func (s *SplitStore) DeleteBlock(_ cid.Cid) error {
func (s *SplitStore) DeleteBlock(_ context.Context, _ cid.Cid) error {
// afaict we don't seem to be using this method, so it's not implemented
return errors.New("DeleteBlock not implemented on SplitStore; don't do this Luke!") //nolint
}
func (s *SplitStore) DeleteMany(_ []cid.Cid) error {
func (s *SplitStore) DeleteMany(_ context.Context, _ []cid.Cid) error {
// afaict we don't seem to be using this method, so it's not implemented
return errors.New("DeleteMany not implemented on SplitStore; don't do this Luke!") //nolint
}
func (s *SplitStore) Has(cid cid.Cid) (bool, error) {
func (s *SplitStore) Has(ctx context.Context, cid cid.Cid) (bool, error) {
if isIdentiyCid(cid) {
return true, nil
}
@@ -218,7 +293,27 @@ func (s *SplitStore) Has(cid cid.Cid) (bool, error) {
s.txnLk.RLock()
defer s.txnLk.RUnlock()
has, err := s.hot.Has(cid)
// critical section
if s.txnMarkSet != nil {
has, err := s.txnMarkSet.Has(cid)
if err != nil {
return false, err
}
if has {
return s.has(cid)
}
switch s.compactType {
case hot:
return s.cold.Has(ctx, cid)
case cold:
return s.hot.Has(ctx, cid)
default:
return false, xerrors.Errorf("invalid compaction type %d, only hot and cold allowed for critical section", s.compactType)
}
}
has, err := s.hot.Has(ctx, cid)
if err != nil {
return has, err
@@ -229,10 +324,19 @@ func (s *SplitStore) Has(cid cid.Cid) (bool, error) {
return true, nil
}
return s.cold.Has(cid)
has, err = s.cold.Has(ctx, cid)
if has {
s.trackTxnRef(cid)
if bstore.IsHotView(ctx) {
s.reifyColdObject(cid)
}
}
return has, err
}
func (s *SplitStore) Get(cid cid.Cid) (blocks.Block, error) {
func (s *SplitStore) Get(ctx context.Context, cid cid.Cid) (blocks.Block, error) {
if isIdentiyCid(cid) {
data, err := decodeIdentityCid(cid)
if err != nil {
@@ -245,22 +349,46 @@ func (s *SplitStore) Get(cid cid.Cid) (blocks.Block, error) {
s.txnLk.RLock()
defer s.txnLk.RUnlock()
blk, err := s.hot.Get(cid)
// critical section
if s.txnMarkSet != nil {
has, err := s.txnMarkSet.Has(cid)
if err != nil {
return nil, err
}
switch err {
case nil:
if has {
return s.get(cid)
}
switch s.compactType {
case hot:
return s.cold.Get(ctx, cid)
case cold:
return s.hot.Get(ctx, cid)
default:
return nil, xerrors.Errorf("invalid compaction type %d, only hot and cold allowed for critical section", s.compactType)
}
}
blk, err := s.hot.Get(ctx, cid)
switch {
case err == nil:
s.trackTxnRef(cid)
return blk, nil
case bstore.ErrNotFound:
case ipld.IsNotFound(err):
if s.isWarm() {
s.debug.LogReadMiss(cid)
}
blk, err = s.cold.Get(cid)
blk, err = s.cold.Get(ctx, cid)
if err == nil {
stats.Record(s.ctx, metrics.SplitstoreMiss.M(1))
s.trackTxnRef(cid)
if bstore.IsHotView(ctx) {
s.reifyColdObject(cid)
}
stats.Record(s.ctx, metrics.SplitstoreMiss.M(1))
}
return blk, err
@@ -269,7 +397,7 @@ func (s *SplitStore) Get(cid cid.Cid) (blocks.Block, error) {
}
}
func (s *SplitStore) GetSize(cid cid.Cid) (int, error) {
func (s *SplitStore) GetSize(ctx context.Context, cid cid.Cid) (int, error) {
if isIdentiyCid(cid) {
data, err := decodeIdentityCid(cid)
if err != nil {
@@ -282,20 +410,45 @@ func (s *SplitStore) GetSize(cid cid.Cid) (int, error) {
s.txnLk.RLock()
defer s.txnLk.RUnlock()
size, err := s.hot.GetSize(cid)
// critical section
if s.txnMarkSet != nil {
has, err := s.txnMarkSet.Has(cid)
if err != nil {
return 0, err
}
switch err {
case nil:
if has {
return s.getSize(cid)
}
switch s.compactType {
case hot:
return s.cold.GetSize(ctx, cid)
case cold:
return s.hot.GetSize(ctx, cid)
default:
return 0, xerrors.Errorf("invalid compaction type %d, only hot and cold allowed for critical section", s.compactType)
}
}
size, err := s.hot.GetSize(ctx, cid)
switch {
case err == nil:
s.trackTxnRef(cid)
return size, nil
case bstore.ErrNotFound:
case ipld.IsNotFound(err):
if s.isWarm() {
s.debug.LogReadMiss(cid)
}
size, err = s.cold.GetSize(cid)
size, err = s.cold.GetSize(ctx, cid)
if err == nil {
s.trackTxnRef(cid)
if bstore.IsHotView(ctx) {
s.reifyColdObject(cid)
}
stats.Record(s.ctx, metrics.SplitstoreMiss.M(1))
}
return size, err
@@ -305,7 +458,7 @@ func (s *SplitStore) GetSize(cid cid.Cid) (int, error) {
}
}
func (s *SplitStore) Put(blk blocks.Block) error {
func (s *SplitStore) Put(ctx context.Context, blk blocks.Block) error {
if isIdentiyCid(blk.Cid()) {
return nil
}
@@ -313,18 +466,24 @@ func (s *SplitStore) Put(blk blocks.Block) error {
s.txnLk.RLock()
defer s.txnLk.RUnlock()
err := s.hot.Put(blk)
err := s.hot.Put(ctx, blk)
if err != nil {
return err
}
s.debug.LogWrite(blk)
// critical section
if s.txnMarkSet != nil && s.compactType == hot { // puts only touch hot store
s.markLiveRefs([]cid.Cid{blk.Cid()})
return nil
}
s.trackTxnRef(blk.Cid())
return nil
}
func (s *SplitStore) PutMany(blks []blocks.Block) error {
func (s *SplitStore) PutMany(ctx context.Context, blks []blocks.Block) error {
// filter identites
idcids := 0
for _, blk := range blks {
@@ -358,14 +517,20 @@ func (s *SplitStore) PutMany(blks []blocks.Block) error {
s.txnLk.RLock()
defer s.txnLk.RUnlock()
err := s.hot.PutMany(blks)
err := s.hot.PutMany(ctx, blks)
if err != nil {
return err
}
s.debug.LogWriteMany(blks)
// critical section
if s.txnMarkSet != nil && s.compactType == hot { // puts only touch hot store
s.markLiveRefs(batch)
return nil
}
s.trackTxnRefMany(batch)
return nil
}
@@ -414,7 +579,7 @@ func (s *SplitStore) HashOnRead(enabled bool) {
s.cold.HashOnRead(enabled)
}
func (s *SplitStore) View(cid cid.Cid, cb func([]byte) error) error {
func (s *SplitStore) View(ctx context.Context, cid cid.Cid, cb func([]byte) error) error {
if isIdentiyCid(cid) {
data, err := decodeIdentityCid(cid)
if err != nil {
@@ -424,6 +589,29 @@ func (s *SplitStore) View(cid cid.Cid, cb func([]byte) error) error {
return cb(data)
}
// critical section
s.txnLk.RLock() // the lock is released in protectView if we are not in critical section
if s.txnMarkSet != nil {
has, err := s.txnMarkSet.Has(cid)
s.txnLk.RUnlock()
if err != nil {
return err
}
if has {
return s.view(cid, cb)
}
switch s.compactType {
case hot:
return s.cold.View(ctx, cid, cb)
case cold:
return s.hot.View(ctx, cid, cb)
default:
return xerrors.Errorf("invalid compaction type %d, only hot and cold allowed for critical section", s.compactType)
}
}
// views are (optimistically) protected two-fold:
// - if there is an active transaction, then the reference is protected.
// - if there is no active transaction, active views are tracked in a
@@ -435,22 +623,23 @@ func (s *SplitStore) View(cid cid.Cid, cb func([]byte) error) error {
s.protectView(cid)
defer s.viewDone()
err := s.hot.View(cid, cb)
switch err {
case bstore.ErrNotFound:
err := s.hot.View(ctx, cid, cb)
if ipld.IsNotFound(err) {
if s.isWarm() {
s.debug.LogReadMiss(cid)
}
err = s.cold.View(cid, cb)
err = s.cold.View(ctx, cid, cb)
if err == nil {
if bstore.IsHotView(ctx) {
s.reifyColdObject(cid)
}
stats.Record(s.ctx, metrics.SplitstoreMiss.M(1))
}
return err
default:
return err
}
return err
}
func (s *SplitStore) isWarm() bool {
@@ -460,16 +649,33 @@ func (s *SplitStore) isWarm() bool {
}
// State tracking
func (s *SplitStore) Start(chain ChainAccessor) error {
func (s *SplitStore) Start(chain ChainAccessor, us stmgr.UpgradeSchedule) error {
s.chain = chain
curTs := chain.GetHeaviestTipSet()
// precompute the upgrade boundaries
s.upgrades = make([]upgradeRange, 0, len(us))
for _, upgrade := range us {
boundary := upgrade.Height
for _, pre := range upgrade.PreMigrations {
preMigrationBoundary := upgrade.Height - pre.StartWithin
if preMigrationBoundary < boundary {
boundary = preMigrationBoundary
}
}
upgradeStart := boundary - upgradeBoundary
upgradeEnd := upgrade.Height + upgradeBoundary
s.upgrades = append(s.upgrades, upgradeRange{start: upgradeStart, end: upgradeEnd})
}
// should we warmup
warmup := false
// load base epoch from metadata ds
// if none, then use current epoch because it's a fresh start
bs, err := s.ds.Get(baseEpochKey)
bs, err := s.ds.Get(s.ctx, baseEpochKey)
switch err {
case nil:
s.baseEpoch = bytesToEpoch(bs)
@@ -489,8 +695,25 @@ func (s *SplitStore) Start(chain ChainAccessor) error {
return xerrors.Errorf("error loading base epoch: %w", err)
}
// load prune epoch from metadata ds
bs, err = s.ds.Get(s.ctx, pruneEpochKey)
switch err {
case nil:
s.pruneEpoch = bytesToEpoch(bs)
case dstore.ErrNotFound:
if curTs == nil {
//this can happen in some tests
break
}
if err := s.setPruneEpoch(curTs.Height()); err != nil {
return xerrors.Errorf("error saving prune epoch: %w", err)
}
default:
return xerrors.Errorf("error loading prune epoch: %w", err)
}
// load warmup epoch from metadata ds
bs, err = s.ds.Get(warmupEpochKey)
bs, err = s.ds.Get(s.ctx, warmupEpochKey)
switch err {
case nil:
s.warmupEpoch = bytesToEpoch(bs)
@@ -503,7 +726,7 @@ func (s *SplitStore) Start(chain ChainAccessor) error {
}
// load markSetSize from metadata ds to provide a size hint for marksets
bs, err = s.ds.Get(markSetSizeKey)
bs, err = s.ds.Get(s.ctx, markSetSizeKey)
switch err {
case nil:
s.markSetSize = bytesToInt64(bs)
@@ -514,7 +737,7 @@ func (s *SplitStore) Start(chain ChainAccessor) error {
}
// load compactionIndex from metadata ds to provide a hint as to when to perform moving gc
bs, err = s.ds.Get(compactionIndexKey)
bs, err = s.ds.Get(s.ctx, compactionIndexKey)
switch err {
case nil:
s.compactionIndex = bytesToInt64(bs)
@@ -536,6 +759,9 @@ func (s *SplitStore) Start(chain ChainAccessor) error {
}
}
// spawn the reifier
go s.reifyOrchestrator()
// watch the chain
chain.SubscribeHeadChanges(s.HeadChange)
@@ -556,12 +782,19 @@ func (s *SplitStore) Close() error {
}
if atomic.LoadInt32(&s.compacting) == 1 {
s.txnSyncMx.Lock()
s.txnSync = true
s.txnSyncCond.Broadcast()
s.txnSyncMx.Unlock()
log.Warn("close with ongoing compaction in progress; waiting for it to finish...")
for atomic.LoadInt32(&s.compacting) == 1 {
time.Sleep(time.Second)
}
}
s.reifyCond.Broadcast()
s.reifyWorkers.Wait()
s.cancel()
return multierr.Combine(s.markSetEnv.Close(), s.debug.Close())
}
@@ -576,5 +809,10 @@ func (s *SplitStore) checkClosing() error {
func (s *SplitStore) setBaseEpoch(epoch abi.ChainEpoch) error {
s.baseEpoch = epoch
return s.ds.Put(baseEpochKey, epochToBytes(epoch))
return s.ds.Put(s.ctx, baseEpochKey, epochToBytes(epoch))
}
func (s *SplitStore) setPruneEpoch(epoch abi.ChainEpoch) error {
s.pruneEpoch = epoch
return s.ds.Put(s.ctx, pruneEpochKey, epochToBytes(epoch))
}
+24 -10
View File
@@ -4,13 +4,13 @@ import (
"fmt"
"os"
"path/filepath"
"sync"
"sync/atomic"
"time"
"github.com/ipfs/go-cid"
"golang.org/x/xerrors"
cid "github.com/ipfs/go-cid"
bstore "github.com/filecoin-project/lotus/blockstore"
"github.com/filecoin-project/lotus/chain/types"
)
@@ -25,6 +25,7 @@ func (s *SplitStore) Check() error {
if !atomic.CompareAndSwapInt32(&s.compacting, 0, 1) {
return xerrors.Errorf("can't acquire compaction lock; compacting operation in progress")
}
s.compactType = check
if s.compactionIndex == 0 {
atomic.StoreInt32(&s.compacting, 0)
@@ -67,7 +68,10 @@ func (s *SplitStore) doCheck(curTs *types.TipSet) error {
}
defer output.Close() //nolint:errcheck
var mx sync.Mutex
write := func(format string, args ...interface{}) {
mx.Lock()
defer mx.Unlock()
_, err := fmt.Fprintf(output, format+"\n", args...)
if err != nil {
log.Warnf("error writing check output: %s", err)
@@ -82,14 +86,22 @@ func (s *SplitStore) doCheck(curTs *types.TipSet) error {
write("compaction index: %d", s.compactionIndex)
write("--")
var coldCnt, missingCnt int64
err = s.walkChain(curTs, boundaryEpoch, boundaryEpoch,
coldCnt := new(int64)
missingCnt := new(int64)
visitor, err := s.markSetEnv.New("check", 0)
if err != nil {
return xerrors.Errorf("error creating visitor: %w", err)
}
defer visitor.Close() //nolint
err = s.walkChain(curTs, boundaryEpoch, boundaryEpoch, visitor,
func(c cid.Cid) error {
if isUnitaryObject(c) {
return errStopWalk
}
has, err := s.hot.Has(c)
has, err := s.hot.Has(s.ctx, c)
if err != nil {
return xerrors.Errorf("error checking hotstore: %w", err)
}
@@ -98,16 +110,16 @@ func (s *SplitStore) doCheck(curTs *types.TipSet) error {
return nil
}
has, err = s.cold.Has(c)
has, err = s.cold.Has(s.ctx, c)
if err != nil {
return xerrors.Errorf("error checking coldstore: %w", err)
}
if has {
coldCnt++
atomic.AddInt64(coldCnt, 1)
write("cold object reference: %s", c)
} else {
missingCnt++
atomic.AddInt64(missingCnt, 1)
write("missing object reference: %s", c)
return errStopWalk
}
@@ -121,9 +133,9 @@ func (s *SplitStore) doCheck(curTs *types.TipSet) error {
return err
}
log.Infow("check done", "cold", coldCnt, "missing", missingCnt)
log.Infow("check done", "cold", *coldCnt, "missing", *missingCnt)
write("--")
write("cold: %d missing: %d", coldCnt, missingCnt)
write("cold: %d missing: %d", *coldCnt, *missingCnt)
write("DONE")
return nil
@@ -135,6 +147,8 @@ func (s *SplitStore) Info() map[string]interface{} {
info["base epoch"] = s.baseEpoch
info["warmup epoch"] = s.warmupEpoch
info["compactions"] = s.compactionIndex
info["prunes"] = s.pruneIndex
info["compacting"] = s.compacting == 1
sizer, ok := s.hot.(bstore.BlockstoreSize)
if ok {
File diff suppressed because it is too large Load Diff
+28 -32
View File
@@ -5,7 +5,8 @@ import (
"errors"
blocks "github.com/ipfs/go-block-format"
cid "github.com/ipfs/go-cid"
"github.com/ipfs/go-cid"
ipld "github.com/ipfs/go-ipld-format"
bstore "github.com/filecoin-project/lotus/blockstore"
)
@@ -20,28 +21,29 @@ func (s *SplitStore) Expose() bstore.Blockstore {
return &exposedSplitStore{s: s}
}
func (es *exposedSplitStore) DeleteBlock(_ cid.Cid) error {
func (es *exposedSplitStore) DeleteBlock(_ context.Context, _ cid.Cid) error {
return errors.New("DeleteBlock: operation not supported")
}
func (es *exposedSplitStore) DeleteMany(_ []cid.Cid) error {
func (es *exposedSplitStore) DeleteMany(_ context.Context, _ []cid.Cid) error {
return errors.New("DeleteMany: operation not supported")
}
func (es *exposedSplitStore) Has(c cid.Cid) (bool, error) {
func (es *exposedSplitStore) Has(ctx context.Context, c cid.Cid) (bool, error) {
if isIdentiyCid(c) {
return true, nil
}
has, err := es.s.hot.Has(c)
has, err := es.s.hot.Has(ctx, c)
if has || err != nil {
return has, err
}
return es.s.cold.Has(c)
return es.s.cold.Has(ctx, c)
}
func (es *exposedSplitStore) Get(c cid.Cid) (blocks.Block, error) {
func (es *exposedSplitStore) Get(ctx context.Context, c cid.Cid) (blocks.Block, error) {
if isIdentiyCid(c) {
data, err := decodeIdentityCid(c)
if err != nil {
@@ -51,16 +53,14 @@ func (es *exposedSplitStore) Get(c cid.Cid) (blocks.Block, error) {
return blocks.NewBlockWithCid(data, c)
}
blk, err := es.s.hot.Get(c)
switch err {
case bstore.ErrNotFound:
return es.s.cold.Get(c)
default:
return blk, err
blk, err := es.s.hot.Get(ctx, c)
if ipld.IsNotFound(err) {
return es.s.cold.Get(ctx, c)
}
return blk, err
}
func (es *exposedSplitStore) GetSize(c cid.Cid) (int, error) {
func (es *exposedSplitStore) GetSize(ctx context.Context, c cid.Cid) (int, error) {
if isIdentiyCid(c) {
data, err := decodeIdentityCid(c)
if err != nil {
@@ -70,21 +70,19 @@ func (es *exposedSplitStore) GetSize(c cid.Cid) (int, error) {
return len(data), nil
}
size, err := es.s.hot.GetSize(c)
switch err {
case bstore.ErrNotFound:
return es.s.cold.GetSize(c)
default:
return size, err
size, err := es.s.hot.GetSize(ctx, c)
if ipld.IsNotFound(err) {
return es.s.cold.GetSize(ctx, c)
}
return size, err
}
func (es *exposedSplitStore) Put(blk blocks.Block) error {
return es.s.Put(blk)
func (es *exposedSplitStore) Put(ctx context.Context, blk blocks.Block) error {
return es.s.Put(ctx, blk)
}
func (es *exposedSplitStore) PutMany(blks []blocks.Block) error {
return es.s.PutMany(blks)
func (es *exposedSplitStore) PutMany(ctx context.Context, blks []blocks.Block) error {
return es.s.PutMany(ctx, blks)
}
func (es *exposedSplitStore) AllKeysChan(ctx context.Context) (<-chan cid.Cid, error) {
@@ -93,7 +91,7 @@ func (es *exposedSplitStore) AllKeysChan(ctx context.Context) (<-chan cid.Cid, e
func (es *exposedSplitStore) HashOnRead(enabled bool) {}
func (es *exposedSplitStore) View(c cid.Cid, f func([]byte) error) error {
func (es *exposedSplitStore) View(ctx context.Context, c cid.Cid, f func([]byte) error) error {
if isIdentiyCid(c) {
data, err := decodeIdentityCid(c)
if err != nil {
@@ -103,12 +101,10 @@ func (es *exposedSplitStore) View(c cid.Cid, f func([]byte) error) error {
return f(data)
}
err := es.s.hot.View(c, f)
switch err {
case bstore.ErrNotFound:
return es.s.cold.View(c, f)
default:
return err
err := es.s.hot.View(ctx, c, f)
if ipld.IsNotFound(err) {
return es.s.cold.View(ctx, c, f)
}
return err
}
+1 -1
View File
@@ -27,7 +27,7 @@ func (s *SplitStore) gcBlockstore(b bstore.Blockstore, opts []bstore.BlockstoreG
return err
}
log.Infow("garbage collecting hotstore done", "took", time.Since(startGC))
log.Infow("garbage collecting blockstore done", "took", time.Since(startGC))
return nil
}
+574
View File
@@ -0,0 +1,574 @@
package splitstore
import (
"bytes"
"os"
"runtime"
"sync"
"sync/atomic"
"time"
cid "github.com/ipfs/go-cid"
ipld "github.com/ipfs/go-ipld-format"
cbg "github.com/whyrusleeping/cbor-gen"
"go.opencensus.io/stats"
"golang.org/x/xerrors"
"github.com/filecoin-project/lotus/api"
bstore "github.com/filecoin-project/lotus/blockstore"
"github.com/filecoin-project/lotus/build"
"github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/metrics"
)
var (
// PruneOnline is a prune option that instructs PruneChain to use online gc for reclaiming space;
// there is no value associated with this option.
PruneOnlineGC = "splitstore.PruneOnlineGC"
// PruneMoving is a prune option that instructs PruneChain to use moving gc for reclaiming space;
// the value associated with this option is the path of the new coldstore.
PruneMovingGC = "splitstore.PruneMovingGC"
// PruneRetainState is a prune option that instructs PruneChain as to how many finalities worth
// of state to retain in the coldstore.
// The value is an integer:
// - if it is -1 then all state objects reachable from the chain will be retained in the coldstore.
// this is useful for garbage collecting side-chains and other garbage in archival nodes.
// This is the (safe) default.
// - if it is 0 then no state objects that are unreachable within the compaction boundary will
// be retained in the coldstore.
// - if it is a positive integer, then it's the number of finalities past the compaction boundary
// for which chain-reachable state objects are retained.
PruneRetainState = "splitstore.PruneRetainState"
// PruneThreshold is the number of epochs that need to have elapsed
// from the previously pruned epoch to trigger a new prune
PruneThreshold = 7 * build.Finality
)
// PruneChain instructs the SplitStore to prune chain state in the coldstore, according to the
// options specified.
func (s *SplitStore) PruneChain(opts api.PruneOpts) error {
retainState := opts.RetainState
var gcOpts []bstore.BlockstoreGCOption
if opts.MovingGC {
gcOpts = append(gcOpts, bstore.WithFullGC(true))
}
doGC := func() error { return s.gcBlockstore(s.cold, gcOpts) }
var retainStateP func(int64) bool
switch {
case retainState > 0:
retainStateP = func(depth int64) bool {
return depth <= int64(CompactionBoundary)+retainState*int64(build.Finality)
}
case retainState < 0:
retainStateP = func(_ int64) bool { return true }
default:
retainStateP = func(depth int64) bool {
return depth <= int64(CompactionBoundary)
}
}
if _, ok := s.cold.(bstore.BlockstoreIterator); !ok {
return xerrors.Errorf("coldstore does not support efficient iteration")
}
return s.pruneChain(retainStateP, doGC)
}
func (s *SplitStore) pruneChain(retainStateP func(int64) bool, doGC func() error) error {
// inhibit compaction while we are setting up
s.headChangeMx.Lock()
defer s.headChangeMx.Unlock()
// take the compaction lock; fail if there is a compaction in progress
if !atomic.CompareAndSwapInt32(&s.compacting, 0, 1) {
return xerrors.Errorf("compaction, prune or warmup in progress")
}
// check if we are actually closing first
if atomic.LoadInt32(&s.closing) == 1 {
atomic.StoreInt32(&s.compacting, 0)
return errClosing
}
// ensure that we have compacted at least once
if s.compactionIndex == 0 {
atomic.StoreInt32(&s.compacting, 0)
return xerrors.Errorf("splitstore has not compacted yet")
}
// get the current tipset
curTs := s.chain.GetHeaviestTipSet()
// begin the transaction and go
s.beginTxnProtect()
s.compactType = cold
go func() {
defer atomic.StoreInt32(&s.compacting, 0)
defer s.endTxnProtect()
log.Info("pruning splitstore")
start := time.Now()
s.prune(curTs, retainStateP, doGC)
log.Infow("prune done", "took", time.Since(start))
}()
return nil
}
func (s *SplitStore) prune(curTs *types.TipSet, retainStateP func(int64) bool, doGC func() error) {
log.Debug("waiting for active views to complete")
start := time.Now()
s.viewWait()
log.Debugw("waiting for active views done", "took", time.Since(start))
err := s.doPrune(curTs, retainStateP, doGC)
if err != nil {
log.Errorf("PRUNE ERROR: %s", err)
}
}
func (s *SplitStore) doPrune(curTs *types.TipSet, retainStateP func(int64) bool, doGC func() error) error {
currentEpoch := curTs.Height()
boundaryEpoch := currentEpoch - CompactionBoundary
log.Infow("running prune", "currentEpoch", currentEpoch, "pruneEpoch", s.pruneEpoch)
markSet, err := s.markSetEnv.New("live", s.markSetSize)
if err != nil {
return xerrors.Errorf("error creating mark set: %w", err)
}
defer markSet.Close() //nolint:errcheck
defer s.debug.Flush()
if err := s.checkClosing(); err != nil {
return err
}
// 0. track all protected references at beginning of compaction; anything added later should
// be transactionally protected by the write
log.Info("protecting references with registered protectors")
err = s.applyProtectors()
if err != nil {
return err
}
// 1. mark reachable objects by walking the chain from the current epoch; we keep all messages
// and chain headers; state and reciepts are retained only if it is within retention policy scope
log.Info("marking reachable objects")
startMark := time.Now()
count := new(int64)
err = s.walkChainDeep(curTs, retainStateP,
func(c cid.Cid) error {
if isUnitaryObject(c) {
return errStopWalk
}
mark, err := markSet.Has(c)
if err != nil {
return xerrors.Errorf("error checking markset: %w", err)
}
if mark {
return errStopWalk
}
atomic.AddInt64(count, 1)
return markSet.Mark(c)
})
if err != nil {
return xerrors.Errorf("error marking: %w", err)
}
log.Infow("marking done", "took", time.Since(startMark), "marked", count)
if err := s.checkClosing(); err != nil {
return err
}
// 1.1 protect transactional refs
err = s.protectTxnRefs(markSet)
if err != nil {
return xerrors.Errorf("error protecting transactional refs: %w", err)
}
if err := s.checkClosing(); err != nil {
return err
}
// 2. iterate through the coldstore to collect dead objects
log.Info("collecting dead objects")
startCollect := time.Now()
deadw, err := NewColdSetWriter(s.deadSetPath())
if err != nil {
return xerrors.Errorf("error creating coldset: %w", err)
}
defer deadw.Close() //nolint:errcheck
// some stats for logging
var liveCnt, deadCnt int
err = s.cold.(bstore.BlockstoreIterator).ForEachKey(func(c cid.Cid) error {
// was it marked?
mark, err := markSet.Has(c)
if err != nil {
return xerrors.Errorf("error checking mark set for %s: %w", c, err)
}
if mark {
liveCnt++
return nil
}
// Note: a possible optimization here is to also purge objects that are in the hotstore
// but this needs special care not to purge genesis state, so we don't bother (yet)
// it's dead in the coldstore, mark it as candidate for purge
if err := deadw.Write(c); err != nil {
return xerrors.Errorf("error writing cid to coldstore: %w", err)
}
deadCnt++
return nil
})
if err != nil {
return xerrors.Errorf("error dead objects: %w", err)
}
if err := deadw.Close(); err != nil {
return xerrors.Errorf("error closing deadset: %w", err)
}
stats.Record(s.ctx, metrics.SplitstoreCompactionDead.M(int64(deadCnt)))
log.Infow("dead collection done", "took", time.Since(startCollect))
log.Infow("prune stats", "live", liveCnt, "dead", deadCnt)
if err := s.checkClosing(); err != nil {
return err
}
// now that we have collected dead objects, check for missing references from transactional i/o
// this is carried over from hot compaction for completeness
s.waitForMissingRefs(markSet)
if err := s.checkClosing(); err != nil {
return err
}
deadr, err := NewColdSetReader(s.deadSetPath())
if err != nil {
return xerrors.Errorf("error opening deadset: %w", err)
}
defer deadr.Close() //nolint:errcheck
// 3. Purge dead objects with checkpointing for recovery.
// This is the critical section of prune, whereby any dead object not in the markSet is
// considered already deleted.
// We delete dead objects in batches, holding the transaction lock, where we check the markSet
// again for new references created by the caller.
// After each batch we write a checkpoint to disk; if the process is interrupted before completion
// the process will continue from the checkpoint in the next recovery.
if err := s.beginCriticalSection(markSet); err != nil {
return xerrors.Errorf("error beginning critical section: %w", err)
}
if err := s.checkClosing(); err != nil {
return err
}
checkpoint, err := NewCheckpoint(s.pruneCheckpointPath())
if err != nil {
return xerrors.Errorf("error creating checkpoint: %w", err)
}
defer checkpoint.Close() //nolint:errcheck
log.Info("purging dead objects from the coldstore")
startPurge := time.Now()
err = s.purge(deadr, checkpoint, markSet)
if err != nil {
return xerrors.Errorf("error purging dead objects: %w", err)
}
log.Infow("purging dead objects from coldstore done", "took", time.Since(startPurge))
s.endCriticalSection()
if err := checkpoint.Close(); err != nil {
log.Warnf("error closing checkpoint: %s", err)
}
if err := os.Remove(s.pruneCheckpointPath()); err != nil {
log.Warnf("error removing checkpoint: %s", err)
}
if err := deadr.Close(); err != nil {
log.Warnf("error closing deadset: %s", err)
}
if err := os.Remove(s.deadSetPath()); err != nil {
log.Warnf("error removing deadset: %s", err)
}
// we are done; do some housekeeping
s.endTxnProtect()
err = doGC()
if err != nil {
log.Warnf("error garbage collecting cold store: %s", err)
}
if err := s.setPruneEpoch(boundaryEpoch); err != nil {
return xerrors.Errorf("error saving prune base epoch: %w", err)
}
s.pruneIndex++
err = s.ds.Put(s.ctx, pruneIndexKey, int64ToBytes(s.compactionIndex))
if err != nil {
return xerrors.Errorf("error saving compaction index: %w", err)
}
return nil
}
func (s *SplitStore) completePrune() error {
checkpoint, last, err := OpenCheckpoint(s.pruneCheckpointPath())
if err != nil {
return xerrors.Errorf("error opening checkpoint: %w", err)
}
defer checkpoint.Close() //nolint:errcheck
deadr, err := NewColdSetReader(s.deadSetPath())
if err != nil {
return xerrors.Errorf("error opening deadset: %w", err)
}
defer deadr.Close() //nolint:errcheck
markSet, err := s.markSetEnv.Recover("live")
if err != nil {
return xerrors.Errorf("error recovering markset: %w", err)
}
defer markSet.Close() //nolint:errcheck
// PURGE!
s.compactType = cold
log.Info("purging dead objects from the coldstore")
startPurge := time.Now()
err = s.completePurge(deadr, checkpoint, last, markSet)
if err != nil {
return xerrors.Errorf("error purgin dead objects: %w", err)
}
log.Infow("purging dead objects from the coldstore done", "took", time.Since(startPurge))
markSet.EndCriticalSection()
s.compactType = none
if err := checkpoint.Close(); err != nil {
log.Warnf("error closing checkpoint: %s", err)
}
if err := os.Remove(s.pruneCheckpointPath()); err != nil {
log.Warnf("error removing checkpoint: %s", err)
}
if err := deadr.Close(); err != nil {
log.Warnf("error closing deadset: %s", err)
}
if err := os.Remove(s.deadSetPath()); err != nil {
log.Warnf("error removing deadset: %s", err)
}
return nil
}
// like walkChain but peforms a deep walk, using parallel walking with walkObjectLax,
// whereby all extant messages are retained and state roots are retained if they satisfy
// the given predicate.
// missing references are ignored, as we expect to have plenty for snapshot syncs.
func (s *SplitStore) walkChainDeep(ts *types.TipSet, retainStateP func(int64) bool,
f func(cid.Cid) error) error {
visited := cid.NewSet()
toWalk := ts.Cids()
walkCnt := 0
workers := runtime.NumCPU() / 2
if workers < 2 {
workers = 2
}
var wg sync.WaitGroup
workch := make(chan cid.Cid, 16*workers)
errch := make(chan error, workers)
var once sync.Once
defer once.Do(func() { close(workch) })
push := func(c cid.Cid) error {
if !visited.Visit(c) {
return nil
}
select {
case workch <- c:
return nil
case err := <-errch:
return err
}
}
worker := func() {
defer wg.Done()
for c := range workch {
err := s.walkObjectLax(c, f)
if err != nil {
errch <- xerrors.Errorf("error walking object (cid: %s): %w", c, err)
return
}
}
}
for i := 0; i < workers; i++ {
wg.Add(1)
go worker()
}
baseEpoch := ts.Height()
minEpoch := baseEpoch // for progress report
log.Infof("walking at epoch %d", minEpoch)
walkBlock := func(c cid.Cid) error {
if !visited.Visit(c) {
return nil
}
walkCnt++
if err := f(c); err != nil {
return err
}
var hdr types.BlockHeader
err := s.view(c, func(data []byte) error {
return hdr.UnmarshalCBOR(bytes.NewBuffer(data))
})
if err != nil {
return xerrors.Errorf("error unmarshaling block header (cid: %s): %w", c, err)
}
if hdr.Height < minEpoch {
minEpoch = hdr.Height
if minEpoch%10_000 == 0 {
log.Infof("walking at epoch %d (walked: %d)", minEpoch, walkCnt)
}
}
depth := int64(baseEpoch - hdr.Height)
retainState := retainStateP(depth)
if hdr.Height > 0 {
if err := push(hdr.Messages); err != nil {
return err
}
if retainState {
if err := push(hdr.ParentMessageReceipts); err != nil {
return err
}
}
}
if retainState || hdr.Height == 0 {
if err := push(hdr.ParentStateRoot); err != nil {
return err
}
}
if hdr.Height > 0 {
toWalk = append(toWalk, hdr.Parents...)
}
return nil
}
for len(toWalk) > 0 {
// walking can take a while, so check this with every opportunity
if err := s.checkClosing(); err != nil {
return err
}
select {
case err := <-errch:
return err
default:
}
walking := toWalk
toWalk = nil
for _, c := range walking {
if err := walkBlock(c); err != nil {
return xerrors.Errorf("error walking block (cid: %s): %w", c, err)
}
}
}
once.Do(func() { close(workch) })
wg.Wait()
select {
case err := <-errch:
return err
default:
}
log.Infow("chain walk done", "walked", walkCnt)
return nil
}
// like walkObject but treats missing references laxly; faster version of walkObjectIncomplete
// without an occurs check.
func (s *SplitStore) walkObjectLax(c cid.Cid, f func(cid.Cid) error) error {
if err := f(c); err != nil {
if err == errStopWalk {
return nil
}
return err
}
if c.Prefix().Codec != cid.DagCBOR {
return nil
}
// check this before recursing
if err := s.checkClosing(); err != nil {
return err
}
var links []cid.Cid
err := s.view(c, func(data []byte) error {
return cbg.ScanForLinks(bytes.NewReader(data), func(c cid.Cid) {
links = append(links, c)
})
})
if err != nil {
if ipld.IsNotFound(err) { // not a problem for deep walks
return nil
}
return xerrors.Errorf("error scanning linked block (cid: %s): %w", c, err)
}
for _, c := range links {
err := s.walkObjectLax(c, f)
if err != nil {
return xerrors.Errorf("error walking link (cid: %s): %w", c, err)
}
}
return nil
}
+181
View File
@@ -0,0 +1,181 @@
package splitstore
import (
"errors"
"runtime"
"sync/atomic"
blocks "github.com/ipfs/go-block-format"
"github.com/ipfs/go-cid"
"golang.org/x/xerrors"
)
var (
errReifyLimit = errors.New("reification limit reached")
ReifyLimit = 16384
)
func (s *SplitStore) reifyColdObject(c cid.Cid) {
if !s.isWarm() {
return
}
if isUnitaryObject(c) {
return
}
s.reifyMx.Lock()
defer s.reifyMx.Unlock()
_, ok := s.reifyInProgress[c]
if ok {
return
}
s.reifyPend[c] = struct{}{}
s.reifyCond.Broadcast()
}
func (s *SplitStore) reifyOrchestrator() {
workers := runtime.NumCPU() / 4
if workers < 2 {
workers = 2
}
workch := make(chan cid.Cid, workers)
defer close(workch)
for i := 0; i < workers; i++ {
s.reifyWorkers.Add(1)
go s.reifyWorker(workch)
}
for {
s.reifyMx.Lock()
for len(s.reifyPend) == 0 && atomic.LoadInt32(&s.closing) == 0 {
s.reifyCond.Wait()
}
if atomic.LoadInt32(&s.closing) != 0 {
s.reifyMx.Unlock()
return
}
reifyPend := s.reifyPend
s.reifyPend = make(map[cid.Cid]struct{})
s.reifyMx.Unlock()
for c := range reifyPend {
select {
case workch <- c:
case <-s.ctx.Done():
return
}
}
}
}
func (s *SplitStore) reifyWorker(workch chan cid.Cid) {
defer s.reifyWorkers.Done()
for c := range workch {
s.doReify(c)
}
}
func (s *SplitStore) doReify(c cid.Cid) {
var toreify, toforget []cid.Cid
defer func() {
s.reifyMx.Lock()
defer s.reifyMx.Unlock()
for _, c := range toreify {
delete(s.reifyInProgress, c)
}
for _, c := range toforget {
delete(s.reifyInProgress, c)
}
}()
s.txnLk.RLock()
defer s.txnLk.RUnlock()
count := 0
err := s.walkObjectIncomplete(c, newTmpVisitor(),
func(c cid.Cid) error {
if isUnitaryObject(c) {
return errStopWalk
}
count++
if count > ReifyLimit {
return errReifyLimit
}
s.reifyMx.Lock()
_, inProgress := s.reifyInProgress[c]
if !inProgress {
s.reifyInProgress[c] = struct{}{}
}
s.reifyMx.Unlock()
if inProgress {
return errStopWalk
}
has, err := s.hot.Has(s.ctx, c)
if err != nil {
return xerrors.Errorf("error checking hotstore: %w", err)
}
// All reified blocks are tracked at reification start
if has {
toforget = append(toforget, c)
return errStopWalk
}
toreify = append(toreify, c)
return nil
},
func(missing cid.Cid) error {
log.Warnf("missing reference while reifying %s: %s", c, missing)
return errStopWalk
})
if err != nil {
if errors.Is(err, errReifyLimit) {
log.Debug("reification aborted; reify limit reached")
return
}
log.Warnf("error walking cold object for reification (cid: %s): %s", c, err)
return
}
log.Debugf("reifying %d objects rooted at %s", len(toreify), c)
// this should not get too big, maybe some 100s of objects.
batch := make([]blocks.Block, 0, len(toreify))
for _, c := range toreify {
blk, err := s.cold.Get(s.ctx, c)
if err != nil {
log.Warnf("error retrieving cold object for reification (cid: %s): %s", c, err)
continue
}
if err := s.checkClosing(); err != nil {
return
}
batch = append(batch, blk)
}
if len(batch) > 0 {
err = s.hot.PutMany(s.ctx, batch)
if err != nil {
log.Warnf("error reifying cold object (cid: %s): %s", c, err)
return
}
}
}
+424 -37
View File
@@ -1,34 +1,42 @@
// stm: #unit
package splitstore
import (
"context"
"errors"
"fmt"
"math/rand"
"sync"
"sync/atomic"
"testing"
"time"
blocks "github.com/ipfs/go-block-format"
"github.com/ipfs/go-cid"
"github.com/ipfs/go-datastore"
dssync "github.com/ipfs/go-datastore/sync"
ipld "github.com/ipfs/go-ipld-format"
logging "github.com/ipfs/go-log/v2"
mh "github.com/multiformats/go-multihash"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/lotus/blockstore"
"github.com/filecoin-project/lotus/chain/stmgr"
"github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/chain/types/mock"
blocks "github.com/ipfs/go-block-format"
cid "github.com/ipfs/go-cid"
datastore "github.com/ipfs/go-datastore"
dssync "github.com/ipfs/go-datastore/sync"
logging "github.com/ipfs/go-log/v2"
)
func init() {
CompactionThreshold = 5
CompactionBoundary = 2
WarmupBoundary = 0
SyncWaitTime = time.Millisecond
logging.SetLogLevel("splitstore", "DEBUG")
}
func testSplitStore(t *testing.T, cfg *Config) {
ctx := context.Background()
chain := &mockChain{t: t}
// the myriads of stores
@@ -38,7 +46,7 @@ func testSplitStore(t *testing.T, cfg *Config) {
// this is necessary to avoid the garbage mock puts in the blocks
garbage := blocks.NewBlock([]byte{1, 2, 3})
err := cold.Put(garbage)
err := cold.Put(ctx, garbage)
if err != nil {
t.Fatal(err)
}
@@ -59,27 +67,29 @@ func testSplitStore(t *testing.T, cfg *Config) {
t.Fatal(err)
}
err = cold.Put(blk)
err = cold.Put(ctx, blk)
if err != nil {
t.Fatal(err)
}
// create a garbage block that is protected with a rgistered protector
protected := blocks.NewBlock([]byte("protected!"))
err = hot.Put(protected)
err = hot.Put(ctx, protected)
if err != nil {
t.Fatal(err)
}
// and another one that is not protected
unprotected := blocks.NewBlock([]byte("unprotected!"))
err = hot.Put(unprotected)
err = hot.Put(ctx, unprotected)
if err != nil {
t.Fatal(err)
}
path := t.TempDir()
// open the splitstore
ss, err := Open("", ds, hot, cold, cfg)
ss, err := Open(path, ds, hot, cold, cfg)
if err != nil {
t.Fatal(err)
}
@@ -90,7 +100,7 @@ func testSplitStore(t *testing.T, cfg *Config) {
return protect(protected.Cid())
})
err = ss.Start(chain)
err = ss.Start(chain, nil)
if err != nil {
t.Fatal(err)
}
@@ -108,11 +118,11 @@ func testSplitStore(t *testing.T, cfg *Config) {
if err != nil {
t.Fatal(err)
}
err = ss.Put(stateRoot)
err = ss.Put(ctx, stateRoot)
if err != nil {
t.Fatal(err)
}
err = ss.Put(sblk)
err = ss.Put(ctx, sblk)
if err != nil {
t.Fatal(err)
}
@@ -123,6 +133,10 @@ func testSplitStore(t *testing.T, cfg *Config) {
}
waitForCompaction := func() {
ss.txnSyncMx.Lock()
ss.txnSync = true
ss.txnSyncCond.Broadcast()
ss.txnSyncMx.Unlock()
for atomic.LoadInt32(&ss.compacting) == 1 {
time.Sleep(100 * time.Millisecond)
}
@@ -175,7 +189,7 @@ func testSplitStore(t *testing.T, cfg *Config) {
}
// ensure our protected block is still there
has, err := hot.Has(protected.Cid())
has, err := hot.Has(ctx, protected.Cid())
if err != nil {
t.Fatal(err)
}
@@ -185,7 +199,7 @@ func testSplitStore(t *testing.T, cfg *Config) {
}
// ensure our unprotected block is in the coldstore now
has, err = hot.Has(unprotected.Cid())
has, err = hot.Has(ctx, unprotected.Cid())
if err != nil {
t.Fatal(err)
}
@@ -194,7 +208,7 @@ func testSplitStore(t *testing.T, cfg *Config) {
t.Fatal("unprotected block is still in hotstore")
}
has, err = cold.Has(unprotected.Cid())
has, err = cold.Has(ctx, unprotected.Cid())
if err != nil {
t.Fatal(err)
}
@@ -208,10 +222,16 @@ func testSplitStore(t *testing.T, cfg *Config) {
}
func TestSplitStoreCompaction(t *testing.T) {
//stm: @SPLITSTORE_SPLITSTORE_OPEN_001, @SPLITSTORE_SPLITSTORE_CLOSE_001
//stm: @SPLITSTORE_SPLITSTORE_PUT_001, @SPLITSTORE_SPLITSTORE_ADD_PROTECTOR_001
//stm: @SPLITSTORE_SPLITSTORE_CLOSE_001
testSplitStore(t, &Config{MarkSetType: "map"})
}
func TestSplitStoreCompactionWithBadger(t *testing.T) {
//stm: @SPLITSTORE_SPLITSTORE_OPEN_001, @SPLITSTORE_SPLITSTORE_CLOSE_001
//stm: @SPLITSTORE_SPLITSTORE_PUT_001, @SPLITSTORE_SPLITSTORE_ADD_PROTECTOR_001
//stm: @SPLITSTORE_SPLITSTORE_CLOSE_001
bs := badgerMarkSetBatchSize
badgerMarkSetBatchSize = 1
t.Cleanup(func() {
@@ -220,6 +240,365 @@ func TestSplitStoreCompactionWithBadger(t *testing.T) {
testSplitStore(t, &Config{MarkSetType: "badger"})
}
func TestSplitStoreSuppressCompactionNearUpgrade(t *testing.T) {
//stm: @SPLITSTORE_SPLITSTORE_OPEN_001, @SPLITSTORE_SPLITSTORE_CLOSE_001
//stm: @SPLITSTORE_SPLITSTORE_PUT_001, @SPLITSTORE_SPLITSTORE_ADD_PROTECTOR_001
//stm: @SPLITSTORE_SPLITSTORE_CLOSE_001
ctx := context.Background()
chain := &mockChain{t: t}
// the myriads of stores
ds := dssync.MutexWrap(datastore.NewMapDatastore())
hot := newMockStore()
cold := newMockStore()
// this is necessary to avoid the garbage mock puts in the blocks
garbage := blocks.NewBlock([]byte{1, 2, 3})
err := cold.Put(ctx, garbage)
if err != nil {
t.Fatal(err)
}
// genesis
genBlock := mock.MkBlock(nil, 0, 0)
genBlock.Messages = garbage.Cid()
genBlock.ParentMessageReceipts = garbage.Cid()
genBlock.ParentStateRoot = garbage.Cid()
genBlock.Timestamp = uint64(time.Now().Unix())
genTs := mock.TipSet(genBlock)
chain.push(genTs)
// put the genesis block to cold store
blk, err := genBlock.ToStorageBlock()
if err != nil {
t.Fatal(err)
}
err = cold.Put(ctx, blk)
if err != nil {
t.Fatal(err)
}
path := t.TempDir()
// open the splitstore
ss, err := Open(path, ds, hot, cold, &Config{MarkSetType: "map"})
if err != nil {
t.Fatal(err)
}
defer ss.Close() //nolint
// create an upgrade schedule that will suppress compaction during the test
upgradeBoundary = 0
upgrade := stmgr.Upgrade{
Height: 10,
PreMigrations: []stmgr.PreMigration{{StartWithin: 10}},
}
err = ss.Start(chain, []stmgr.Upgrade{upgrade})
if err != nil {
t.Fatal(err)
}
mkBlock := func(curTs *types.TipSet, i int, stateRoot blocks.Block) *types.TipSet {
blk := mock.MkBlock(curTs, uint64(i), uint64(i))
blk.Messages = garbage.Cid()
blk.ParentMessageReceipts = garbage.Cid()
blk.ParentStateRoot = stateRoot.Cid()
blk.Timestamp = uint64(time.Now().Unix())
sblk, err := blk.ToStorageBlock()
if err != nil {
t.Fatal(err)
}
err = ss.Put(ctx, stateRoot)
if err != nil {
t.Fatal(err)
}
err = ss.Put(ctx, sblk)
if err != nil {
t.Fatal(err)
}
ts := mock.TipSet(blk)
chain.push(ts)
return ts
}
waitForCompaction := func() {
ss.txnSyncMx.Lock()
ss.txnSync = true
ss.txnSyncCond.Broadcast()
ss.txnSyncMx.Unlock()
for atomic.LoadInt32(&ss.compacting) == 1 {
time.Sleep(100 * time.Millisecond)
}
}
curTs := genTs
for i := 1; i < 10; i++ {
stateRoot := blocks.NewBlock([]byte{byte(i), 3, 3, 7})
curTs = mkBlock(curTs, i, stateRoot)
waitForCompaction()
}
countBlocks := func(bs blockstore.Blockstore) int {
count := 0
_ = bs.(blockstore.BlockstoreIterator).ForEachKey(func(_ cid.Cid) error {
count++
return nil
})
return count
}
// we should not have compacted due to suppression and everything should still be hot
hotCnt := countBlocks(hot)
coldCnt := countBlocks(cold)
if hotCnt != 20 {
t.Errorf("expected %d blocks, but got %d", 20, hotCnt)
}
if coldCnt != 2 {
t.Errorf("expected %d blocks, but got %d", 2, coldCnt)
}
// put some more blocks, now we should compact
for i := 10; i < 20; i++ {
stateRoot := blocks.NewBlock([]byte{byte(i), 3, 3, 7})
curTs = mkBlock(curTs, i, stateRoot)
waitForCompaction()
}
hotCnt = countBlocks(hot)
coldCnt = countBlocks(cold)
if hotCnt != 24 {
t.Errorf("expected %d blocks, but got %d", 24, hotCnt)
}
if coldCnt != 18 {
t.Errorf("expected %d blocks, but got %d", 18, coldCnt)
}
}
func testSplitStoreReification(t *testing.T, f func(context.Context, blockstore.Blockstore, cid.Cid) error) {
ds := dssync.MutexWrap(datastore.NewMapDatastore())
hot := newMockStore()
cold := newMockStore()
mkRandomBlock := func() blocks.Block {
data := make([]byte, 128)
_, err := rand.Read(data)
if err != nil {
t.Fatal(err)
}
return blocks.NewBlock(data)
}
block1 := mkRandomBlock()
block2 := mkRandomBlock()
block3 := mkRandomBlock()
hdr := mock.MkBlock(nil, 0, 0)
hdr.Messages = block1.Cid()
hdr.ParentMessageReceipts = block2.Cid()
hdr.ParentStateRoot = block3.Cid()
block4, err := hdr.ToStorageBlock()
if err != nil {
t.Fatal(err)
}
allBlocks := []blocks.Block{block1, block2, block3, block4}
for _, blk := range allBlocks {
err := cold.Put(context.Background(), blk)
if err != nil {
t.Fatal(err)
}
}
path := t.TempDir()
ss, err := Open(path, ds, hot, cold, &Config{MarkSetType: "map"})
if err != nil {
t.Fatal(err)
}
defer ss.Close() //nolint
ss.warmupEpoch = 1
go ss.reifyOrchestrator()
waitForReification := func() {
for {
ss.reifyMx.Lock()
ready := len(ss.reifyPend) == 0 && len(ss.reifyInProgress) == 0
ss.reifyMx.Unlock()
if ready {
return
}
time.Sleep(time.Millisecond)
}
}
// first access using the standard view
err = f(context.Background(), ss, block4.Cid())
if err != nil {
t.Fatal(err)
}
// nothing should be reified
waitForReification()
for _, blk := range allBlocks {
has, err := hot.Has(context.Background(), blk.Cid())
if err != nil {
t.Fatal(err)
}
if has {
t.Fatal("block unexpectedly reified")
}
}
// now make the hot/reifying view and ensure access reifies
err = f(blockstore.WithHotView(context.Background()), ss, block4.Cid())
if err != nil {
t.Fatal(err)
}
// everything should be reified
waitForReification()
for i, blk := range allBlocks {
has, err := hot.Has(context.Background(), blk.Cid())
if err != nil {
t.Fatal(err)
}
if !has {
t.Fatalf("block%d was not reified", i+1)
}
}
}
func testSplitStoreReificationLimit(t *testing.T, f func(context.Context, blockstore.Blockstore, cid.Cid) error) {
ds := dssync.MutexWrap(datastore.NewMapDatastore())
hot := newMockStore()
cold := newMockStore()
mkRandomBlock := func() blocks.Block {
data := make([]byte, 128)
_, err := rand.Read(data)
if err != nil {
t.Fatal(err)
}
return blocks.NewBlock(data)
}
block1 := mkRandomBlock()
block2 := mkRandomBlock()
block3 := mkRandomBlock()
hdr := mock.MkBlock(nil, 0, 0)
hdr.Messages = block1.Cid()
hdr.ParentMessageReceipts = block2.Cid()
hdr.ParentStateRoot = block3.Cid()
block4, err := hdr.ToStorageBlock()
if err != nil {
t.Fatal(err)
}
allBlocks := []blocks.Block{block1, block2, block3, block4}
for _, blk := range allBlocks {
err := cold.Put(context.Background(), blk)
if err != nil {
t.Fatal(err)
}
}
path := t.TempDir()
ss, err := Open(path, ds, hot, cold, &Config{MarkSetType: "map"})
if err != nil {
t.Fatal(err)
}
defer ss.Close() //nolint
ss.warmupEpoch = 1
go ss.reifyOrchestrator()
waitForReification := func() {
for {
ss.reifyMx.Lock()
ready := len(ss.reifyPend) == 0 && len(ss.reifyInProgress) == 0
ss.reifyMx.Unlock()
if ready {
return
}
time.Sleep(time.Millisecond)
}
}
// do a hot access -- nothing should be reified as the limit should be exceeded
oldReifyLimit := ReifyLimit
ReifyLimit = 2
t.Cleanup(func() {
ReifyLimit = oldReifyLimit
})
err = f(blockstore.WithHotView(context.Background()), ss, block4.Cid())
if err != nil {
t.Fatal(err)
}
waitForReification()
for _, blk := range allBlocks {
has, err := hot.Has(context.Background(), blk.Cid())
if err != nil {
t.Fatal(err)
}
if has {
t.Fatal("block unexpectedly reified")
}
}
}
func TestSplitStoreReification(t *testing.T) {
t.Log("test reification with Has")
testSplitStoreReification(t, func(ctx context.Context, s blockstore.Blockstore, c cid.Cid) error {
_, err := s.Has(ctx, c)
return err
})
t.Log("test reification with Get")
testSplitStoreReification(t, func(ctx context.Context, s blockstore.Blockstore, c cid.Cid) error {
_, err := s.Get(ctx, c)
return err
})
t.Log("test reification with GetSize")
testSplitStoreReification(t, func(ctx context.Context, s blockstore.Blockstore, c cid.Cid) error {
_, err := s.GetSize(ctx, c)
return err
})
t.Log("test reification with View")
testSplitStoreReification(t, func(ctx context.Context, s blockstore.Blockstore, c cid.Cid) error {
return s.View(ctx, c, func(_ []byte) error { return nil })
})
t.Log("test reification limit")
testSplitStoreReificationLimit(t, func(ctx context.Context, s blockstore.Blockstore, c cid.Cid) error {
_, err := s.Has(ctx, c)
return err
})
}
type mockChain struct {
t testing.TB
@@ -289,35 +668,43 @@ func (c *mockChain) SubscribeHeadChanges(change func(revert []*types.TipSet, app
type mockStore struct {
mx sync.Mutex
set map[cid.Cid]blocks.Block
set map[string]blocks.Block
}
func newMockStore() *mockStore {
return &mockStore{set: make(map[cid.Cid]blocks.Block)}
return &mockStore{set: make(map[string]blocks.Block)}
}
func (b *mockStore) Has(cid cid.Cid) (bool, error) {
func (b *mockStore) keyOf(c cid.Cid) string {
return string(c.Hash())
}
func (b *mockStore) cidOf(k string) cid.Cid {
return cid.NewCidV1(cid.Raw, mh.Multihash([]byte(k)))
}
func (b *mockStore) Has(_ context.Context, cid cid.Cid) (bool, error) {
b.mx.Lock()
defer b.mx.Unlock()
_, ok := b.set[cid]
_, ok := b.set[b.keyOf(cid)]
return ok, nil
}
func (b *mockStore) HashOnRead(hor bool) {}
func (b *mockStore) Get(cid cid.Cid) (blocks.Block, error) {
func (b *mockStore) Get(_ context.Context, cid cid.Cid) (blocks.Block, error) {
b.mx.Lock()
defer b.mx.Unlock()
blk, ok := b.set[cid]
blk, ok := b.set[b.keyOf(cid)]
if !ok {
return nil, blockstore.ErrNotFound
return nil, ipld.ErrNotFound{Cid: cid}
}
return blk, nil
}
func (b *mockStore) GetSize(cid cid.Cid) (int, error) {
blk, err := b.Get(cid)
func (b *mockStore) GetSize(ctx context.Context, cid cid.Cid) (int, error) {
blk, err := b.Get(ctx, cid)
if err != nil {
return 0, err
}
@@ -325,46 +712,46 @@ func (b *mockStore) GetSize(cid cid.Cid) (int, error) {
return len(blk.RawData()), nil
}
func (b *mockStore) View(cid cid.Cid, f func([]byte) error) error {
blk, err := b.Get(cid)
func (b *mockStore) View(ctx context.Context, cid cid.Cid, f func([]byte) error) error {
blk, err := b.Get(ctx, cid)
if err != nil {
return err
}
return f(blk.RawData())
}
func (b *mockStore) Put(blk blocks.Block) error {
func (b *mockStore) Put(_ context.Context, blk blocks.Block) error {
b.mx.Lock()
defer b.mx.Unlock()
b.set[blk.Cid()] = blk
b.set[b.keyOf(blk.Cid())] = blk
return nil
}
func (b *mockStore) PutMany(blks []blocks.Block) error {
func (b *mockStore) PutMany(_ context.Context, blks []blocks.Block) error {
b.mx.Lock()
defer b.mx.Unlock()
for _, blk := range blks {
b.set[blk.Cid()] = blk
b.set[b.keyOf(blk.Cid())] = blk
}
return nil
}
func (b *mockStore) DeleteBlock(cid cid.Cid) error {
func (b *mockStore) DeleteBlock(_ context.Context, cid cid.Cid) error {
b.mx.Lock()
defer b.mx.Unlock()
delete(b.set, cid)
delete(b.set, b.keyOf(cid))
return nil
}
func (b *mockStore) DeleteMany(cids []cid.Cid) error {
func (b *mockStore) DeleteMany(_ context.Context, cids []cid.Cid) error {
b.mx.Lock()
defer b.mx.Unlock()
for _, c := range cids {
delete(b.set, c)
delete(b.set, b.keyOf(c))
}
return nil
}
@@ -378,7 +765,7 @@ func (b *mockStore) ForEachKey(f func(cid.Cid) error) error {
defer b.mx.Unlock()
for c := range b.set {
err := f(c)
err := f(b.cidOf(c))
if err != nil {
return err
}
+2 -3
View File
@@ -3,10 +3,9 @@ package splitstore
import (
"encoding/binary"
"golang.org/x/xerrors"
cid "github.com/ipfs/go-cid"
"github.com/ipfs/go-cid"
mh "github.com/multiformats/go-multihash"
"golang.org/x/xerrors"
"github.com/filecoin-project/go-state-types/abi"
)
+36 -23
View File
@@ -1,16 +1,17 @@
package splitstore
import (
"sync"
"sync/atomic"
"time"
blocks "github.com/ipfs/go-block-format"
"github.com/ipfs/go-cid"
ipld "github.com/ipfs/go-ipld-format"
"golang.org/x/xerrors"
blocks "github.com/ipfs/go-block-format"
cid "github.com/ipfs/go-cid"
"github.com/filecoin-project/go-state-types/abi"
bstore "github.com/filecoin-project/lotus/blockstore"
"github.com/filecoin-project/lotus/build"
"github.com/filecoin-project/lotus/chain/types"
)
@@ -20,14 +21,14 @@ var (
WarmupBoundary = build.Finality
)
// warmup acuiqres the compaction lock and spawns a goroutine to warm up the hotstore;
// warmup acquires the compaction lock and spawns a goroutine to warm up the hotstore;
// this is necessary when we sync from a snapshot or when we enable the splitstore
// on top of an existing blockstore (which becomes the coldstore).
func (s *SplitStore) warmup(curTs *types.TipSet) error {
if !atomic.CompareAndSwapInt32(&s.compacting, 0, 1) {
return xerrors.Errorf("error locking compaction")
}
s.compactType = warmup
go func() {
defer atomic.StoreInt32(&s.compacting, 0)
@@ -55,19 +56,28 @@ func (s *SplitStore) doWarmup(curTs *types.TipSet) error {
if WarmupBoundary < epoch {
boundaryEpoch = epoch - WarmupBoundary
}
var mx sync.Mutex
batchHot := make([]blocks.Block, 0, batchSize)
count := int64(0)
xcount := int64(0)
missing := int64(0)
err := s.walkChain(curTs, boundaryEpoch, epoch+1, // we don't load messages/receipts in warmup
count := new(int64)
xcount := new(int64)
missing := new(int64)
visitor, err := s.markSetEnv.New("warmup", 0)
if err != nil {
return xerrors.Errorf("error creating visitor: %w", err)
}
defer visitor.Close() //nolint
err = s.walkChain(curTs, boundaryEpoch, epoch+1, // we don't load messages/receipts in warmup
visitor,
func(c cid.Cid) error {
if isUnitaryObject(c) {
return errStopWalk
}
count++
atomic.AddInt64(count, 1)
has, err := s.hot.Has(c)
has, err := s.hot.Has(s.ctx, c)
if err != nil {
return err
}
@@ -76,25 +86,28 @@ func (s *SplitStore) doWarmup(curTs *types.TipSet) error {
return nil
}
blk, err := s.cold.Get(c)
blk, err := s.cold.Get(s.ctx, c)
if err != nil {
if err == bstore.ErrNotFound {
missing++
if ipld.IsNotFound(err) {
atomic.AddInt64(missing, 1)
return errStopWalk
}
return err
}
xcount++
atomic.AddInt64(xcount, 1)
mx.Lock()
batchHot = append(batchHot, blk)
if len(batchHot) == batchSize {
err = s.hot.PutMany(batchHot)
err = s.hot.PutMany(s.ctx, batchHot)
if err != nil {
mx.Unlock()
return err
}
batchHot = batchHot[:0]
}
mx.Unlock()
return nil
})
@@ -104,22 +117,22 @@ func (s *SplitStore) doWarmup(curTs *types.TipSet) error {
}
if len(batchHot) > 0 {
err = s.hot.PutMany(batchHot)
err = s.hot.PutMany(s.ctx, batchHot)
if err != nil {
return err
}
}
log.Infow("warmup stats", "visited", count, "warm", xcount, "missing", missing)
log.Infow("warmup stats", "visited", *count, "warm", *xcount, "missing", *missing)
s.markSetSize = count + count>>2 // overestimate a bit
err = s.ds.Put(markSetSizeKey, int64ToBytes(s.markSetSize))
s.markSetSize = *count + *count>>2 // overestimate a bit
err = s.ds.Put(s.ctx, markSetSizeKey, int64ToBytes(s.markSetSize))
if err != nil {
log.Warnf("error saving mark set size: %s", err)
}
// save the warmup epoch
err = s.ds.Put(warmupEpochKey, epochToBytes(epoch))
err = s.ds.Put(s.ctx, warmupEpochKey, epochToBytes(epoch))
if err != nil {
return xerrors.Errorf("error saving warm up epoch: %w", err)
}
@@ -128,7 +141,7 @@ func (s *SplitStore) doWarmup(curTs *types.TipSet) error {
s.mx.Unlock()
// also save the compactionIndex, as this is used as an indicator of warmup for upgraded nodes
err = s.ds.Put(compactionIndexKey, int64ToBytes(s.compactionIndex))
err = s.ds.Put(s.ctx, compactionIndexKey, int64ToBytes(s.compactionIndex))
if err != nil {
return xerrors.Errorf("error saving compaction index: %w", err)
}
+60
View File
@@ -0,0 +1,60 @@
package splitstore
import (
"sync"
"github.com/ipfs/go-cid"
)
// ObjectVisitor is an interface for deduplicating objects during walks
type ObjectVisitor interface {
Visit(cid.Cid) (bool, error)
}
type noopVisitor struct{}
var _ ObjectVisitor = (*noopVisitor)(nil)
func (v *noopVisitor) Visit(_ cid.Cid) (bool, error) {
return true, nil
}
type tmpVisitor struct {
set *cid.Set
}
var _ ObjectVisitor = (*tmpVisitor)(nil)
func (v *tmpVisitor) Visit(c cid.Cid) (bool, error) {
if isUnitaryObject(c) {
return false, nil
}
return v.set.Visit(c), nil
}
func newTmpVisitor() ObjectVisitor {
return &tmpVisitor{set: cid.NewSet()}
}
type concurrentVisitor struct {
mx sync.Mutex
set *cid.Set
}
var _ ObjectVisitor = (*concurrentVisitor)(nil)
func newConcurrentVisitor() *concurrentVisitor {
return &concurrentVisitor{set: cid.NewSet()}
}
func (v *concurrentVisitor) Visit(c cid.Cid) (bool, error) {
if isUnitaryObject(c) {
return false, nil
}
v.mx.Lock()
defer v.mx.Unlock()
return v.set.Visit(c), nil
}
+16 -16
View File
@@ -20,53 +20,53 @@ type SyncBlockstore struct {
bs MemBlockstore // specifically use a memStore to save indirection overhead.
}
func (m *SyncBlockstore) DeleteBlock(k cid.Cid) error {
func (m *SyncBlockstore) DeleteBlock(ctx context.Context, k cid.Cid) error {
m.mu.Lock()
defer m.mu.Unlock()
return m.bs.DeleteBlock(k)
return m.bs.DeleteBlock(ctx, k)
}
func (m *SyncBlockstore) DeleteMany(ks []cid.Cid) error {
func (m *SyncBlockstore) DeleteMany(ctx context.Context, ks []cid.Cid) error {
m.mu.Lock()
defer m.mu.Unlock()
return m.bs.DeleteMany(ks)
return m.bs.DeleteMany(ctx, ks)
}
func (m *SyncBlockstore) Has(k cid.Cid) (bool, error) {
func (m *SyncBlockstore) Has(ctx context.Context, k cid.Cid) (bool, error) {
m.mu.RLock()
defer m.mu.RUnlock()
return m.bs.Has(k)
return m.bs.Has(ctx, k)
}
func (m *SyncBlockstore) View(k cid.Cid, callback func([]byte) error) error {
func (m *SyncBlockstore) View(ctx context.Context, k cid.Cid, callback func([]byte) error) error {
m.mu.RLock()
defer m.mu.RUnlock()
return m.bs.View(k, callback)
return m.bs.View(ctx, k, callback)
}
func (m *SyncBlockstore) Get(k cid.Cid) (blocks.Block, error) {
func (m *SyncBlockstore) Get(ctx context.Context, k cid.Cid) (blocks.Block, error) {
m.mu.RLock()
defer m.mu.RUnlock()
return m.bs.Get(k)
return m.bs.Get(ctx, k)
}
func (m *SyncBlockstore) GetSize(k cid.Cid) (int, error) {
func (m *SyncBlockstore) GetSize(ctx context.Context, k cid.Cid) (int, error) {
m.mu.RLock()
defer m.mu.RUnlock()
return m.bs.GetSize(k)
return m.bs.GetSize(ctx, k)
}
func (m *SyncBlockstore) Put(b blocks.Block) error {
func (m *SyncBlockstore) Put(ctx context.Context, b blocks.Block) error {
m.mu.Lock()
defer m.mu.Unlock()
return m.bs.Put(b)
return m.bs.Put(ctx, b)
}
func (m *SyncBlockstore) PutMany(bs []blocks.Block) error {
func (m *SyncBlockstore) PutMany(ctx context.Context, bs []blocks.Block) error {
m.mu.Lock()
defer m.mu.Unlock()
return m.bs.PutMany(bs)
return m.bs.PutMany(ctx, bs)
}
func (m *SyncBlockstore) AllKeysChan(ctx context.Context) (<-chan cid.Cid, error) {
+34 -28
View File
@@ -8,6 +8,7 @@ import (
blocks "github.com/ipfs/go-block-format"
"github.com/ipfs/go-cid"
ipld "github.com/ipfs/go-ipld-format"
"github.com/raulk/clock"
"go.uber.org/multierr"
)
@@ -47,8 +48,12 @@ func (t *TimedCacheBlockstore) Start(_ context.Context) error {
return fmt.Errorf("already started")
}
t.closeCh = make(chan struct{})
// Create this timer before starting the goroutine. Otherwise, creating the timer will race
// with adding time to the mock clock, and we could add time _first_, then stall waiting for
// a timer that'll never fire.
ticker := t.clock.Ticker(t.interval)
go func() {
ticker := t.clock.Ticker(t.interval)
defer ticker.Stop()
for {
select {
@@ -88,28 +93,28 @@ func (t *TimedCacheBlockstore) rotate() {
t.mu.Unlock()
}
func (t *TimedCacheBlockstore) Put(b blocks.Block) error {
func (t *TimedCacheBlockstore) Put(ctx context.Context, b blocks.Block) error {
// Don't check the inactive set here. We want to keep this block for at
// least one interval.
t.mu.Lock()
defer t.mu.Unlock()
return t.active.Put(b)
return t.active.Put(ctx, b)
}
func (t *TimedCacheBlockstore) PutMany(bs []blocks.Block) error {
func (t *TimedCacheBlockstore) PutMany(ctx context.Context, bs []blocks.Block) error {
t.mu.Lock()
defer t.mu.Unlock()
return t.active.PutMany(bs)
return t.active.PutMany(ctx, bs)
}
func (t *TimedCacheBlockstore) View(k cid.Cid, callback func([]byte) error) error {
func (t *TimedCacheBlockstore) View(ctx context.Context, k cid.Cid, callback func([]byte) error) error {
// The underlying blockstore is always a "mem" blockstore so there's no difference,
// from a performance perspective, between view & get. So we call Get to avoid
// calling an arbitrary callback while holding a lock.
t.mu.RLock()
block, err := t.active.Get(k)
if err == ErrNotFound {
block, err = t.inactive.Get(k)
block, err := t.active.Get(ctx, k)
if ipld.IsNotFound(err) {
block, err = t.inactive.Get(ctx, k)
}
t.mu.RUnlock()
@@ -119,51 +124,51 @@ func (t *TimedCacheBlockstore) View(k cid.Cid, callback func([]byte) error) erro
return callback(block.RawData())
}
func (t *TimedCacheBlockstore) Get(k cid.Cid) (blocks.Block, error) {
func (t *TimedCacheBlockstore) Get(ctx context.Context, k cid.Cid) (blocks.Block, error) {
t.mu.RLock()
defer t.mu.RUnlock()
b, err := t.active.Get(k)
if err == ErrNotFound {
b, err = t.inactive.Get(k)
b, err := t.active.Get(ctx, k)
if ipld.IsNotFound(err) {
b, err = t.inactive.Get(ctx, k)
}
return b, err
}
func (t *TimedCacheBlockstore) GetSize(k cid.Cid) (int, error) {
func (t *TimedCacheBlockstore) GetSize(ctx context.Context, k cid.Cid) (int, error) {
t.mu.RLock()
defer t.mu.RUnlock()
size, err := t.active.GetSize(k)
if err == ErrNotFound {
size, err = t.inactive.GetSize(k)
size, err := t.active.GetSize(ctx, k)
if ipld.IsNotFound(err) {
size, err = t.inactive.GetSize(ctx, k)
}
return size, err
}
func (t *TimedCacheBlockstore) Has(k cid.Cid) (bool, error) {
func (t *TimedCacheBlockstore) Has(ctx context.Context, k cid.Cid) (bool, error) {
t.mu.RLock()
defer t.mu.RUnlock()
if has, err := t.active.Has(k); err != nil {
if has, err := t.active.Has(ctx, k); err != nil {
return false, err
} else if has {
return true, nil
}
return t.inactive.Has(k)
return t.inactive.Has(ctx, k)
}
func (t *TimedCacheBlockstore) HashOnRead(_ bool) {
// no-op
}
func (t *TimedCacheBlockstore) DeleteBlock(k cid.Cid) error {
func (t *TimedCacheBlockstore) DeleteBlock(ctx context.Context, k cid.Cid) error {
t.mu.Lock()
defer t.mu.Unlock()
return multierr.Combine(t.active.DeleteBlock(k), t.inactive.DeleteBlock(k))
return multierr.Combine(t.active.DeleteBlock(ctx, k), t.inactive.DeleteBlock(ctx, k))
}
func (t *TimedCacheBlockstore) DeleteMany(ks []cid.Cid) error {
func (t *TimedCacheBlockstore) DeleteMany(ctx context.Context, ks []cid.Cid) error {
t.mu.Lock()
defer t.mu.Unlock()
return multierr.Combine(t.active.DeleteMany(ks), t.inactive.DeleteMany(ks))
return multierr.Combine(t.active.DeleteMany(ctx, ks), t.inactive.DeleteMany(ctx, ks))
}
func (t *TimedCacheBlockstore) AllKeysChan(_ context.Context) (<-chan cid.Cid, error) {
@@ -171,11 +176,12 @@ func (t *TimedCacheBlockstore) AllKeysChan(_ context.Context) (<-chan cid.Cid, e
defer t.mu.RUnlock()
ch := make(chan cid.Cid, len(t.active)+len(t.inactive))
for c := range t.active {
ch <- c
for _, b := range t.active {
ch <- b.Cid()
}
for c := range t.inactive {
if _, ok := t.active[c]; ok {
for _, b := range t.inactive {
c := b.Cid()
if _, ok := t.active[string(c.Hash())]; ok {
continue
}
ch <- c
+19 -14
View File
@@ -1,3 +1,4 @@
// stm: #unit
package blockstore
import (
@@ -5,20 +6,24 @@ import (
"testing"
"time"
"github.com/raulk/clock"
"github.com/stretchr/testify/require"
blocks "github.com/ipfs/go-block-format"
"github.com/ipfs/go-cid"
"github.com/raulk/clock"
"github.com/stretchr/testify/require"
)
func TestTimedCacheBlockstoreSimple(t *testing.T) {
//stm: @SPLITSTORE_TIMED_BLOCKSTORE_START_001
//stm: @SPLITSTORE_TIMED_BLOCKSTORE_PUT_001, @SPLITSTORE_TIMED_BLOCKSTORE_HAS_001, @SPLITSTORE_TIMED_BLOCKSTORE_GET_001
//stm: @SPLITSTORE_TIMED_BLOCKSTORE_ALL_KEYS_CHAN_001
tc := NewTimedCacheBlockstore(10 * time.Millisecond)
mClock := clock.NewMock()
mClock.Set(time.Now())
tc.clock = mClock
tc.doneRotatingCh = make(chan struct{})
ctx := context.Background()
_ = tc.Start(context.Background())
mClock.Add(1) // IDK why it is needed but it makes it work
@@ -27,18 +32,18 @@ func TestTimedCacheBlockstoreSimple(t *testing.T) {
}()
b1 := blocks.NewBlock([]byte("foo"))
require.NoError(t, tc.Put(b1))
require.NoError(t, tc.Put(ctx, b1))
b2 := blocks.NewBlock([]byte("bar"))
require.NoError(t, tc.Put(b2))
require.NoError(t, tc.Put(ctx, b2))
b3 := blocks.NewBlock([]byte("baz"))
b1out, err := tc.Get(b1.Cid())
b1out, err := tc.Get(ctx, b1.Cid())
require.NoError(t, err)
require.Equal(t, b1.RawData(), b1out.RawData())
has, err := tc.Has(b1.Cid())
has, err := tc.Has(ctx, b1.Cid())
require.NoError(t, err)
require.True(t, has)
@@ -46,17 +51,17 @@ func TestTimedCacheBlockstoreSimple(t *testing.T) {
<-tc.doneRotatingCh
// We should still have everything.
has, err = tc.Has(b1.Cid())
has, err = tc.Has(ctx, b1.Cid())
require.NoError(t, err)
require.True(t, has)
has, err = tc.Has(b2.Cid())
has, err = tc.Has(ctx, b2.Cid())
require.NoError(t, err)
require.True(t, has)
// extend b2, add b3.
require.NoError(t, tc.Put(b2))
require.NoError(t, tc.Put(b3))
require.NoError(t, tc.Put(ctx, b2))
require.NoError(t, tc.Put(ctx, b3))
// all keys once.
allKeys, err := tc.AllKeysChan(context.Background())
@@ -71,15 +76,15 @@ func TestTimedCacheBlockstoreSimple(t *testing.T) {
<-tc.doneRotatingCh
// should still have b2, and b3, but not b1
has, err = tc.Has(b1.Cid())
has, err = tc.Has(ctx, b1.Cid())
require.NoError(t, err)
require.False(t, has)
has, err = tc.Has(b2.Cid())
has, err = tc.Has(ctx, b2.Cid())
require.NoError(t, err)
require.True(t, has)
has, err = tc.Has(b3.Cid())
has, err = tc.Has(ctx, b3.Cid())
require.NoError(t, err)
require.True(t, has)
}
+20 -20
View File
@@ -5,86 +5,86 @@ import (
blocks "github.com/ipfs/go-block-format"
"github.com/ipfs/go-cid"
ipld "github.com/ipfs/go-ipld-format"
)
type unionBlockstore []Blockstore
// Union returns an unioned blockstore.
//
// * Reads return from the first blockstore that has the value, querying in the
// supplied order.
// * Writes (puts and deltes) are broadcast to all stores.
//
// - Reads return from the first blockstore that has the value, querying in the
// supplied order.
// - Writes (puts and deletes) are broadcast to all stores.
func Union(stores ...Blockstore) Blockstore {
return unionBlockstore(stores)
}
func (m unionBlockstore) Has(cid cid.Cid) (has bool, err error) {
func (m unionBlockstore) Has(ctx context.Context, cid cid.Cid) (has bool, err error) {
for _, bs := range m {
if has, err = bs.Has(cid); has || err != nil {
if has, err = bs.Has(ctx, cid); has || err != nil {
break
}
}
return has, err
}
func (m unionBlockstore) Get(cid cid.Cid) (blk blocks.Block, err error) {
func (m unionBlockstore) Get(ctx context.Context, cid cid.Cid) (blk blocks.Block, err error) {
for _, bs := range m {
if blk, err = bs.Get(cid); err == nil || err != ErrNotFound {
if blk, err = bs.Get(ctx, cid); err == nil || !ipld.IsNotFound(err) {
break
}
}
return blk, err
}
func (m unionBlockstore) View(cid cid.Cid, callback func([]byte) error) (err error) {
func (m unionBlockstore) View(ctx context.Context, cid cid.Cid, callback func([]byte) error) (err error) {
for _, bs := range m {
if err = bs.View(cid, callback); err == nil || err != ErrNotFound {
if err = bs.View(ctx, cid, callback); err == nil || !ipld.IsNotFound(err) {
break
}
}
return err
}
func (m unionBlockstore) GetSize(cid cid.Cid) (size int, err error) {
func (m unionBlockstore) GetSize(ctx context.Context, cid cid.Cid) (size int, err error) {
for _, bs := range m {
if size, err = bs.GetSize(cid); err == nil || err != ErrNotFound {
if size, err = bs.GetSize(ctx, cid); err == nil || !ipld.IsNotFound(err) {
break
}
}
return size, err
}
func (m unionBlockstore) Put(block blocks.Block) (err error) {
func (m unionBlockstore) Put(ctx context.Context, block blocks.Block) (err error) {
for _, bs := range m {
if err = bs.Put(block); err != nil {
if err = bs.Put(ctx, block); err != nil {
break
}
}
return err
}
func (m unionBlockstore) PutMany(blks []blocks.Block) (err error) {
func (m unionBlockstore) PutMany(ctx context.Context, blks []blocks.Block) (err error) {
for _, bs := range m {
if err = bs.PutMany(blks); err != nil {
if err = bs.PutMany(ctx, blks); err != nil {
break
}
}
return err
}
func (m unionBlockstore) DeleteBlock(cid cid.Cid) (err error) {
func (m unionBlockstore) DeleteBlock(ctx context.Context, cid cid.Cid) (err error) {
for _, bs := range m {
if err = bs.DeleteBlock(cid); err != nil {
if err = bs.DeleteBlock(ctx, cid); err != nil {
break
}
}
return err
}
func (m unionBlockstore) DeleteMany(cids []cid.Cid) (err error) {
func (m unionBlockstore) DeleteMany(ctx context.Context, cids []cid.Cid) (err error) {
for _, bs := range m {
if err = bs.DeleteMany(cids); err != nil {
if err = bs.DeleteMany(ctx, cids); err != nil {
break
}
}
+27 -19
View File
@@ -1,3 +1,4 @@
// stm: #unit
package blockstore
import (
@@ -12,82 +13,89 @@ var (
b0 = blocks.NewBlock([]byte("abc"))
b1 = blocks.NewBlock([]byte("foo"))
b2 = blocks.NewBlock([]byte("bar"))
b3 = blocks.NewBlock([]byte("baz"))
)
func TestUnionBlockstore_Get(t *testing.T) {
//stm: @SPLITSTORE_UNION_BLOCKSTORE_GET_001
ctx := context.Background()
m1 := NewMemory()
m2 := NewMemory()
_ = m1.Put(b1)
_ = m2.Put(b2)
_ = m1.Put(ctx, b1)
_ = m2.Put(ctx, b2)
u := Union(m1, m2)
v1, err := u.Get(b1.Cid())
v1, err := u.Get(ctx, b1.Cid())
require.NoError(t, err)
require.Equal(t, b1.RawData(), v1.RawData())
v2, err := u.Get(b2.Cid())
v2, err := u.Get(ctx, b2.Cid())
require.NoError(t, err)
require.Equal(t, b2.RawData(), v2.RawData())
}
func TestUnionBlockstore_Put_PutMany_Delete_AllKeysChan(t *testing.T) {
//stm: @SPLITSTORE_UNION_BLOCKSTORE_PUT_001, @SPLITSTORE_UNION_BLOCKSTORE_HAS_001
//stm: @SPLITSTORE_UNION_BLOCKSTORE_PUT_MANY_001, @SPLITSTORE_UNION_BLOCKSTORE_DELETE_001
//stm: @SPLITSTORE_UNION_BLOCKSTORE_ALL_KEYS_CHAN_001
ctx := context.Background()
m1 := NewMemory()
m2 := NewMemory()
u := Union(m1, m2)
err := u.Put(b0)
err := u.Put(ctx, b0)
require.NoError(t, err)
var has bool
// write was broadcasted to all stores.
has, _ = m1.Has(b0.Cid())
has, _ = m1.Has(ctx, b0.Cid())
require.True(t, has)
has, _ = m2.Has(b0.Cid())
has, _ = m2.Has(ctx, b0.Cid())
require.True(t, has)
has, _ = u.Has(b0.Cid())
has, _ = u.Has(ctx, b0.Cid())
require.True(t, has)
// put many.
err = u.PutMany([]blocks.Block{b1, b2})
err = u.PutMany(ctx, []blocks.Block{b1, b2})
require.NoError(t, err)
// write was broadcasted to all stores.
has, _ = m1.Has(b1.Cid())
has, _ = m1.Has(ctx, b1.Cid())
require.True(t, has)
has, _ = m1.Has(b2.Cid())
has, _ = m1.Has(ctx, b2.Cid())
require.True(t, has)
has, _ = m2.Has(b1.Cid())
has, _ = m2.Has(ctx, b1.Cid())
require.True(t, has)
has, _ = m2.Has(b2.Cid())
has, _ = m2.Has(ctx, b2.Cid())
require.True(t, has)
// also in the union store.
has, _ = u.Has(b1.Cid())
has, _ = u.Has(ctx, b1.Cid())
require.True(t, has)
has, _ = u.Has(b2.Cid())
has, _ = u.Has(ctx, b2.Cid())
require.True(t, has)
// deleted from all stores.
err = u.DeleteBlock(b1.Cid())
err = u.DeleteBlock(ctx, b1.Cid())
require.NoError(t, err)
has, _ = u.Has(b1.Cid())
has, _ = u.Has(ctx, b1.Cid())
require.False(t, has)
has, _ = m1.Has(b1.Cid())
has, _ = m1.Has(ctx, b1.Cid())
require.False(t, has)
has, _ = m2.Has(b1.Cid())
has, _ = m2.Has(ctx, b1.Cid())
require.False(t, has)
// check that AllKeysChan returns b0 and b2, twice (once per backing store)
+26
View File
@@ -0,0 +1,26 @@
# Bundles
This directory includes the actors bundles for each release. Each actor bundle is a zstd compressed
tarfile containing one bundle per network type. These tarfiles are subsequently embedded in the
lotus binary.
## Updating
To update, run the `./pack.sh` script. For example, the following will pack the [builtin actors release](https://github.com/filecoin-project/builtin-actors/releases) `dev/20220602` into the `v8` tarfile.
```bash
./pack.sh v8 dev/20220602
```
This will:
1. Download the actors bundles and pack them into the appropriate tarfile (`$VERSION.tar.zst`).
2. Run `make bundle-gen` in the top-level directory to regenerate the bundle metadata file for _all_ network versions (all `*.tar.zst` files in this directory).
## Overriding
To build a bundle, but specify a different release/tag for a specific network, append `$network=$alternative_release` on the command line. For example:
```bash
./pack.sh v8 dev/20220602 mainnet=v8.0.0 calibrationnet=v8.0.0-rc.1
```
+55
View File
@@ -0,0 +1,55 @@
#!/bin/bash
NETWORKS=(devnet mainnet caterpillarnet butterflynet testing testing-fake-proofs calibrationnet)
set -e
if [[ $# -lt 2 ]]; then
echo "Usage: $0 VERSION RELEASE [NETWORK=RELEASE_OVERRIDE]..." >&2
echo "expected at least two arguments, an actors version (e.g., v8), an actors release, and any number of release overrides." >&2
exit 1
fi
VERSION="$1" # actors version
RELEASE="$2" # actors release name
RELEASE_OVERRIDES=("${@:3}")
echo "Downloading bundles for actors version ${VERSION} release ${RELEASE}"
echo "With release overrides ${RELEASE_OVERRIDES[*]}"
TARGET_FILE="$(pwd)/${VERSION}.tar.zst"
WORKDIR=$(mktemp -d -t "actor-bundles-${VERSION}.XXXXXXXXXX")
trap 'rm -rf -- "$WORKDIR"' EXIT
encode_release() {
jq -rn --arg release "$1" '$release | @uri'
}
pushd "${WORKDIR}"
for network in "${NETWORKS[@]}"; do
release="$RELEASE"
# Ideally, we'd use an associative array (map). But that's not supported on macos.
for override in "${RELEASE_OVERRIDES[@]}"; do
if [[ "${network}" = "${override%%=*}" ]]; then
release="${override#*=}"
break
fi
done
encoded_release="$(encode_release "$release")"
echo "Downloading $release for network $network."
wget "https://github.com/filecoin-project/builtin-actors/releases/download/${encoded_release}/builtin-actors-${network}"{.car,.sha256}
done
echo "Checking the checksums..."
sha256sum -c -- *.sha256
echo "Packing..."
rm -f -- "$TARGET_FILE"
tar -cf "$TARGET_FILE" --use-compress-program "zstd -19" -- *.car
popd
echo "Generating metadata..."
make -C ../../ bundle-gen
Binary file not shown.
Binary file not shown.
+2 -2
View File
@@ -6,9 +6,9 @@ import (
"path"
"strings"
"github.com/filecoin-project/lotus/lib/addrutil"
"github.com/libp2p/go-libp2p/core/peer"
"github.com/libp2p/go-libp2p-core/peer"
"github.com/filecoin-project/lotus/lib/addrutil"
)
//go:embed bootstrap
+2 -2
View File
@@ -1,2 +1,2 @@
/dns4/bootstrap-0.butterfly.fildev.network/tcp/1347/p2p/12D3KooWBbZd7Su9XfLUQ12RynGQ3ZmGY1nGqFntmqop9pLNJE6g
/dns4/bootstrap-1.butterfly.fildev.network/tcp/1347/p2p/12D3KooWGKRzEY4tJFTmAmrYUpa1CVVohmV9YjJbC9v5XWY2gUji
/dns4/bootstrap-0.butterfly.fildev.network/tcp/1347/p2p/12D3KooWKeDMuJbouvypr1nL2qRruhNVXzv4QiLsZRh6gnvLkc7p
/dns4/bootstrap-1.butterfly.fildev.network/tcp/1347/p2p/12D3KooWSsACNHLGoJbPqeitNY7tom19Nxq8x5ag36eTwmgcAeLo
+4 -4
View File
@@ -1,4 +1,4 @@
/dns4/bootstrap-0.calibration.fildev.network/tcp/1347/p2p/12D3KooWJkikQQkxS58spo76BYzFt4fotaT5NpV2zngvrqm4u5ow
/dns4/bootstrap-1.calibration.fildev.network/tcp/1347/p2p/12D3KooWLce5FDHR4EX4CrYavphA5xS3uDsX6aoowXh5tzDUxJav
/dns4/bootstrap-2.calibration.fildev.network/tcp/1347/p2p/12D3KooWA9hFfQG9GjP6bHeuQQbMD3FDtZLdW1NayxKXUT26PQZu
/dns4/bootstrap-3.calibration.fildev.network/tcp/1347/p2p/12D3KooWMHDi3LVTFG8Szqogt7RkNXvonbQYqSazxBx41A5aeuVz
/dns4/bootstrap-0.calibration.fildev.network/tcp/1347/p2p/12D3KooWCi2w8U4DDB9xqrejb5KYHaQv2iA2AJJ6uzG3iQxNLBMy
/dns4/bootstrap-1.calibration.fildev.network/tcp/1347/p2p/12D3KooWDTayrBojBn9jWNNUih4nNQQBGJD7Zo3gQCKgBkUsS6dp
/dns4/bootstrap-2.calibration.fildev.network/tcp/1347/p2p/12D3KooWNRxTHUn8bf7jz1KEUPMc2dMgGfa4f8ZJTsquVSn3vHCG
/dns4/bootstrap-3.calibration.fildev.network/tcp/1347/p2p/12D3KooWFWUqE9jgXvcKHWieYs9nhyp6NF4ftwLGAHm4sCv73jjK
+2 -2
View File
@@ -1,2 +1,2 @@
/dns4/bootstrap-0.interop.fildev.network/tcp/1347/p2p/12D3KooWLGPq9JL1xwL6gHok7HSNxtK1Q5kyfg4Hk69ifRPghn4i
/dns4/bootstrap-1.interop.fildev.network/tcp/1347/p2p/12D3KooWFYS1f31zafv8mqqYu8U3hEqYvaZ6avWzYU3BmZdpyH3h
/dns4/bootstrap-0.interop.fildev.network/tcp/1347/p2p/12D3KooWDpppr8csCNvEPnD2Z83KTPdBTM7iJhL66qK8LK3bB5NU
/dns4/bootstrap-1.interop.fildev.network/tcp/1347/p2p/12D3KooWR3K1sXWoDYcXWqDF26mFEM1o1g7e7fcVR3NYE7rn24Gs
+1
View File
@@ -13,3 +13,4 @@
/dns4/node.glif.io/tcp/1235/p2p/12D3KooWBF8cpp65hp2u9LK5mh19x67ftAam84z9LsfaquTDSBpt
/dns4/bootstrap-0.ipfsmain.cn/tcp/34721/p2p/12D3KooWQnwEGNqcM2nAcPtRR9rAX8Hrg4k9kJLCHoTR5chJfz6d
/dns4/bootstrap-1.ipfsmain.cn/tcp/34723/p2p/12D3KooWMKxMkD5DMpSWsW7dBddKxKT7L2GgbNuckz9otxvkvByP
/dns4/bootstarp-0.1475.io/tcp/61256/p2p/12D3KooWRzCVDwHUkgdK7eRgnoXbjDAELhxPErjHzbRLguSV1aRt
-4
View File
@@ -1,4 +0,0 @@
/dns4/bootstrap-2.nerpa.interplanetary.dev/tcp/1347/p2p/12D3KooWQcL6ReWmR6ASWx4iT7EiAmxKDQpvgq1MKNTQZp5NPnWW
/dns4/bootstrap-0.nerpa.interplanetary.dev/tcp/1347/p2p/12D3KooWGyJCwCm7EfupM15CFPXM4c7zRVHwwwjcuy9umaGeztMX
/dns4/bootstrap-3.nerpa.interplanetary.dev/tcp/1347/p2p/12D3KooWNK9RmfksKXSCQj7ZwAM7L6roqbN4kwJteihq7yPvSgPs
/dns4/bootstrap-1.nerpa.interplanetary.dev/tcp/1347/p2p/12D3KooWCWSaH6iUyXYspYxELjDfzToBsyVGVz3QvC7ysXv7wESo
+265
View File
@@ -0,0 +1,265 @@
package build
import (
"archive/tar"
"context"
"embed"
"fmt"
"io"
"os"
"path"
"sort"
"strconv"
"strings"
"github.com/DataDog/zstd"
"github.com/ipfs/go-cid"
cbor "github.com/ipfs/go-ipld-cbor"
"github.com/ipld/go-car"
"golang.org/x/xerrors"
actorstypes "github.com/filecoin-project/go-state-types/actors"
"github.com/filecoin-project/lotus/blockstore"
"github.com/filecoin-project/lotus/chain/actors"
"github.com/filecoin-project/lotus/chain/actors/adt"
)
//go:embed actors/*.tar.zst
var embeddedBuiltinActorReleases embed.FS
func init() {
if BundleOverrides == nil {
BundleOverrides = make(map[actorstypes.Version]string)
}
for _, av := range actors.Versions {
path := os.Getenv(fmt.Sprintf("LOTUS_BUILTIN_ACTORS_V%d_BUNDLE", av))
if path == "" {
continue
}
BundleOverrides[actorstypes.Version(av)] = path
}
if err := loadManifests(NetworkBundle); err != nil {
panic(err)
}
}
// UseNetworkBundle switches to a different network bundle, by name.
func UseNetworkBundle(netw string) error {
if NetworkBundle == netw {
return nil
}
if err := loadManifests(netw); err != nil {
return err
}
NetworkBundle = netw
return nil
}
func loadManifests(netw string) error {
overridden := make(map[actorstypes.Version]struct{})
var newMetadata []*BuiltinActorsMetadata
// First, prefer overrides.
for av, path := range BundleOverrides {
root, actorCids, err := readBundleManifestFromFile(path)
if err != nil {
return err
}
newMetadata = append(newMetadata, &BuiltinActorsMetadata{
Network: netw,
Version: av,
ManifestCid: root,
Actors: actorCids,
})
overridden[av] = struct{}{}
}
// Then load embedded bundle metadata.
for _, meta := range EmbeddedBuiltinActorsMetadata {
if meta.Network != netw {
continue
}
if _, ok := overridden[meta.Version]; ok {
continue
}
newMetadata = append(newMetadata, meta)
}
actors.ClearManifests()
for _, meta := range newMetadata {
actors.RegisterManifest(meta.Version, meta.ManifestCid, meta.Actors)
}
return nil
}
type BuiltinActorsMetadata struct {
Network string
Version actorstypes.Version
ManifestCid cid.Cid
Actors map[string]cid.Cid
}
// ReadEmbeddedBuiltinActorsMetadata reads the metadata from the embedded built-in actor bundles.
// There should be no need to call this method as the result is cached in the
// `EmbeddedBuiltinActorsMetadata` variable on `make gen`.
func ReadEmbeddedBuiltinActorsMetadata() ([]*BuiltinActorsMetadata, error) {
files, err := embeddedBuiltinActorReleases.ReadDir("actors")
if err != nil {
return nil, xerrors.Errorf("failed to read embedded bundle directory: %s", err)
}
var bundles []*BuiltinActorsMetadata
for _, dirent := range files {
name := dirent.Name()
b, err := readEmbeddedBuiltinActorsMetadata(name)
if err != nil {
return nil, err
}
bundles = append(bundles, b...)
}
// Sort by network, then by bundle.
sort.Slice(bundles, func(i, j int) bool {
if bundles[i].Network == bundles[j].Network {
return bundles[i].Version < bundles[j].Version
}
return bundles[i].Network < bundles[j].Network
})
return bundles, nil
}
func readEmbeddedBuiltinActorsMetadata(bundle string) ([]*BuiltinActorsMetadata, error) {
const (
archiveExt = ".tar.zst"
bundleExt = ".car"
bundlePrefix = "builtin-actors-"
)
if !strings.HasPrefix(bundle, "v") {
return nil, xerrors.Errorf("bundle bundle '%q' doesn't start with a 'v'", bundle)
}
if !strings.HasSuffix(bundle, archiveExt) {
return nil, xerrors.Errorf("bundle bundle '%q' doesn't end with '%s'", bundle, archiveExt)
}
version, err := strconv.ParseInt(bundle[1:len(bundle)-len(archiveExt)], 10, 0)
if err != nil {
return nil, xerrors.Errorf("failed to parse actors version from bundle '%q': %s", bundle, err)
}
fi, err := embeddedBuiltinActorReleases.Open(fmt.Sprintf("actors/%s", bundle))
if err != nil {
return nil, err
}
defer fi.Close() //nolint
uncompressed := zstd.NewReader(fi)
defer uncompressed.Close() //nolint
var bundles []*BuiltinActorsMetadata
tarReader := tar.NewReader(uncompressed)
for {
header, err := tarReader.Next()
switch err {
case io.EOF:
return bundles, nil
case nil:
default:
return nil, err
}
// Read the network name from the bundle name.
name := path.Base(header.Name)
if !strings.HasSuffix(name, bundleExt) {
return nil, xerrors.Errorf("expected bundle to end with .car: %s", name)
}
if !strings.HasPrefix(name, bundlePrefix) {
return nil, xerrors.Errorf("expected bundle to end with .car: %s", name)
}
name = name[len(bundlePrefix) : len(name)-len(bundleExt)]
// Load the bundle.
root, actorCids, err := readBundleManifest(tarReader)
if err != nil {
return nil, xerrors.Errorf("error loading builtin actors bundle: %w", err)
}
bundles = append(bundles, &BuiltinActorsMetadata{
Network: name,
Version: actorstypes.Version(version),
ManifestCid: root,
Actors: actorCids,
})
}
}
func readBundleManifestFromFile(path string) (cid.Cid, map[string]cid.Cid, error) {
fi, err := os.Open(path)
if err != nil {
return cid.Undef, nil, err
}
defer fi.Close() //nolint
return readBundleManifest(fi)
}
func readBundleManifest(r io.Reader) (cid.Cid, map[string]cid.Cid, error) {
// Load the bundle.
bs := blockstore.NewMemory()
hdr, err := car.LoadCar(context.Background(), bs, r)
if err != nil {
return cid.Undef, nil, xerrors.Errorf("error loading builtin actors bundle: %w", err)
}
if len(hdr.Roots) != 1 {
return cid.Undef, nil, xerrors.Errorf("expected one root when loading actors bundle, got %d", len(hdr.Roots))
}
root := hdr.Roots[0]
actorCids, err := actors.ReadManifest(context.Background(), adt.WrapStore(context.Background(), cbor.NewCborStore(bs)), root)
if err != nil {
return cid.Undef, nil, err
}
// Make sure we have all the actors.
for name, c := range actorCids {
if has, err := bs.Has(context.Background(), c); err != nil {
return cid.Undef, nil, xerrors.Errorf("got an error when checking that the bundle has the actor %q: %w", name, err)
} else if !has {
return cid.Undef, nil, xerrors.Errorf("actor %q missing from bundle", name)
}
}
return root, actorCids, nil
}
// GetEmbeddedBuiltinActorsBundle returns the builtin-actors bundle for the given actors version.
func GetEmbeddedBuiltinActorsBundle(version actorstypes.Version) ([]byte, bool) {
fi, err := embeddedBuiltinActorReleases.Open(fmt.Sprintf("actors/v%d.tar.zst", version))
if err != nil {
return nil, false
}
defer fi.Close() //nolint
uncompressed := zstd.NewReader(fi)
defer uncompressed.Close() //nolint
tarReader := tar.NewReader(uncompressed)
targetFileName := fmt.Sprintf("builtin-actors-%s.car", NetworkBundle)
for {
header, err := tarReader.Next()
switch err {
case io.EOF:
return nil, false
case nil:
default:
panic(err)
}
if header.Name != targetFileName {
continue
}
car, err := io.ReadAll(tarReader)
if err != nil {
panic(err)
}
return car, true
}
}

Some files were not shown because too many files have changed in this diff Show More