Compare commits

...
2267 Commits
Author SHA1 Message Date
Łukasz Magiera fce453a2d1 feat: config: Move MakeNewSectorForDeals config into the Sealing sectoin 2022-03-26 16:46:37 -04:00
Łukasz Magiera 9d813d8385 fix: worker: Fix default value handling 2022-03-26 16:46:00 -04:00
Łukasz Magiera e4f04f198d feat: miner cli: Separate proving workers command 2022-03-26 16:43:27 -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 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
Aayush 694c45cd65 FVM: log when fvm is used 2022-03-23 13:19:28 -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
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
Ł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
Ł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
Ł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
Aayush Rajasekaran 97c95a4e82 Update FFI 2022-03-16 17:30:47 -04: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
Ł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
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
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
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
Ł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
Ł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
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
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
Ł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
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
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
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
823 changed files with 67152 additions and 21623 deletions
+108 -49
View File
@@ -44,13 +44,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:
@@ -92,6 +92,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:
@@ -282,21 +285,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 +318,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,15 +328,11 @@ 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
macos:
xcode: "10.0.0"
xcode: "12.5.0"
working_directory: ~/go/src/github.com/filecoin-project/lotus
steps:
- prepare:
@@ -367,11 +351,6 @@ jobs:
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: |
@@ -388,6 +367,9 @@ jobs:
- run:
command: make build
no_output_timeout: 30m
- run:
name: check tag and version output match
command: ./scripts/version-check.sh ./lotus
- store_artifacts:
path: lotus
- store_artifacts:
@@ -408,7 +390,7 @@ jobs:
build-appimage:
machine:
image: ubuntu-2004:202104-01
image: ubuntu-2004:202111-02
steps:
- checkout
- attach_workspace:
@@ -416,6 +398,16 @@ jobs:
- 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
@@ -636,6 +628,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 +672,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>>
@@ -723,8 +721,8 @@ jobs:
- 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.
publish-packer-snap:
description: build packer image with snap. mainnet only.
executor:
name: packer/default
packer-version: 1.6.6
@@ -733,8 +731,7 @@ jobs:
- 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"
template: tools/packer/lotus-snap.pkr.hcl
publish-dockerhub:
description: publish to dockerhub
machine:
@@ -810,11 +807,26 @@ workflows:
suite: itest-deadlines
target: "./itests/deadlines_test.go"
- test:
name: test-itest-deals_512mb
suite: itest-deals_512mb
target: "./itests/deals_512mb_test.go"
- test:
name: test-itest-deals_anycid
suite: itest-deals_anycid
target: "./itests/deals_anycid_test.go"
- test:
name: test-itest-deals_concurrent
suite: itest-deals_concurrent
target: "./itests/deals_concurrent_test.go"
- test:
name: test-itest-deals_max_staging_deals
suite: itest-deals_max_staging_deals
target: "./itests/deals_max_staging_deals_test.go"
- test:
name: test-itest-deals_offline
suite: itest-deals_offline
@@ -825,6 +837,16 @@ workflows:
suite: itest-deals_padding
target: "./itests/deals_padding_test.go"
- test:
name: test-itest-deals_partial_retrieval_dm-level
suite: itest-deals_partial_retrieval_dm-level
target: "./itests/deals_partial_retrieval_dm-level_test.go"
- test:
name: test-itest-deals_partial_retrieval
suite: itest-deals_partial_retrieval
target: "./itests/deals_partial_retrieval_test.go"
- test:
name: test-itest-deals_power
suite: itest-deals_power
@@ -840,6 +862,11 @@ workflows:
suite: itest-deals_publish
target: "./itests/deals_publish_test.go"
- test:
name: test-itest-deals_retry_deal_no_funds
suite: itest-deals_retry_deal_no_funds
target: "./itests/deals_retry_deal_no_funds_test.go"
- test:
name: test-itest-deals
suite: itest-deals
@@ -855,6 +882,11 @@ workflows:
suite: itest-get_messages_in_ts
target: "./itests/get_messages_in_ts_test.go"
- test:
name: test-itest-mempool
suite: itest-mempool
target: "./itests/mempool_test.go"
- test:
name: test-itest-multisig
suite: itest-multisig
@@ -885,6 +917,11 @@ workflows:
suite: itest-sector_finalize_early
target: "./itests/sector_finalize_early_test.go"
- test:
name: test-itest-sector_make_cc_avail
suite: itest-sector_make_cc_avail
target: "./itests/sector_make_cc_avail_test.go"
- test:
name: test-itest-sector_miner_collateral
suite: itest-sector_miner_collateral
@@ -895,11 +932,26 @@ workflows:
suite: itest-sector_pledge
target: "./itests/sector_pledge_test.go"
- test:
name: test-itest-sector_prefer_no_upgrade
suite: itest-sector_prefer_no_upgrade
target: "./itests/sector_prefer_no_upgrade_test.go"
- test:
name: test-itest-sector_revert_available
suite: itest-sector_revert_available
target: "./itests/sector_revert_available_test.go"
- test:
name: test-itest-sector_terminate
suite: itest-sector_terminate
target: "./itests/sector_terminate_test.go"
- test:
name: test-itest-self_sent_txn
suite: itest-self_sent_txn
target: "./itests/self_sent_txn_test.go"
- test:
name: test-itest-tape
suite: itest-tape
@@ -920,6 +972,11 @@ workflows:
suite: itest-wdpost
target: "./itests/wdpost_test.go"
- test:
name: test-itest-worker
suite: itest-worker
target: "./itests/worker_test.go"
- test:
name: test-unit-cli
suite: utest-unit-cli
@@ -950,7 +1007,7 @@ workflows:
codecov-upload: false
suite: conformance-bleeding-edge
target: "./conformance"
vectors-branch: master
vectors-branch: specs-actors-v7
- trigger-testplans:
filters:
branches:
@@ -972,11 +1029,6 @@ 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:
filters:
@@ -1011,6 +1063,13 @@ workflows:
path: .
repo: lotus-dev
tag: '${CIRCLE_SHA1:0:8}'
target: lotus-all-in-one
- build-and-push-image:
dockerfile: Dockerfile.lotus
path: .
repo: lotus-test
tag: '${CIRCLE_SHA1:0:8}'
target: lotus-test
- publish-packer-mainnet:
requires:
- build-all
@@ -1041,16 +1100,6 @@ workflows:
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+)?$/
- publish-snapcraft:
name: publish-snapcraft-stable
channel: stable
@@ -1087,3 +1136,13 @@ workflows:
- publish-dockerhub:
name: publish-dockerhub-nightly
tag: nightly
monthly:
triggers:
- schedule:
cron: "0 0 1 * *"
filters:
branches:
only:
- master
jobs:
- publish-packer-snap
+48 -49
View File
@@ -44,13 +44,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:
@@ -92,6 +92,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:
@@ -282,21 +285,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 +318,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,15 +328,11 @@ 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
macos:
xcode: "10.0.0"
xcode: "12.5.0"
working_directory: ~/go/src/github.com/filecoin-project/lotus
steps:
- prepare:
@@ -367,11 +351,6 @@ jobs:
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: |
@@ -388,6 +367,9 @@ jobs:
- run:
command: make build
no_output_timeout: 30m
- run:
name: check tag and version output match
command: ./scripts/version-check.sh ./lotus
- store_artifacts:
path: lotus
- store_artifacts:
@@ -408,7 +390,7 @@ jobs:
build-appimage:
machine:
image: ubuntu-2004:202104-01
image: ubuntu-2004:202111-02
steps:
- checkout
- attach_workspace:
@@ -416,6 +398,16 @@ jobs:
- 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
@@ -636,6 +628,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 +672,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>>
@@ -723,8 +721,8 @@ jobs:
- 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.
publish-packer-snap:
description: build packer image with snap. mainnet only.
executor:
name: packer/default
packer-version: 1.6.6
@@ -733,8 +731,7 @@ jobs:
- 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"
template: tools/packer/lotus-snap.pkr.hcl
publish-dockerhub:
description: publish to dockerhub
machine:
@@ -815,7 +812,7 @@ workflows:
codecov-upload: false
suite: conformance-bleeding-edge
target: "./conformance"
vectors-branch: master
vectors-branch: specs-actors-v7
- trigger-testplans:
filters:
branches:
@@ -837,11 +834,6 @@ 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:
filters:
@@ -876,6 +868,13 @@ workflows:
path: .
repo: lotus-dev
tag: '${CIRCLE_SHA1:0:8}'
target: lotus-all-in-one
- build-and-push-image:
dockerfile: Dockerfile.lotus
path: .
repo: lotus-test
tag: '${CIRCLE_SHA1:0:8}'
target: lotus-test
- publish-packer-mainnet:
requires:
- build-all
@@ -906,16 +905,6 @@ workflows:
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+)?$/
- publish-snapcraft:
name: publish-snapcraft-stable
channel: stable
@@ -952,3 +941,13 @@ workflows:
- publish-dockerhub:
name: publish-dockerhub-nightly
tag: nightly
monthly:
triggers:
- schedule:
cron: "0 0 1 * *"
filters:
branches:
only:
- master
jobs:
- publish-packer-snap
+72 -18
View File
@@ -1,19 +1,73 @@
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
# Auto generated
- "^.*_gen.go$"
- "^.*/mock_full.go$"
# Old actors.
- "^chain/actors/builtin/[^/]*/(message|state|v)[0-4]\\.go$" # We test the latest version only.
# Tests
- "api/test/**"
- "conformance/**"
# Generators
- "gen/**"
- "chain/actors/agen/**"
# Non-critical utilities
- "api/docgen/**"
- "api/docgen-openrpc/**"
coverage:
status:
patch: off
project:
tools-and-tests:
target: auto
threshold: 1%
informational: true
paths:
- "testplans"
- "tools"
- "system"
- "snap"
- "lotuspond"
- "conformance"
- "scripts"
- "gen"
- "build"
markets:
target: auto
threshold: 1%
informational: false
paths:
- "markets"
- "paychmgr"
miner:
target: auto
threshold: 1.5%
informational: false
paths:
- "miner"
- "storage"
chain:
target: auto
threshold: 1%
informational: false
paths:
- "chain"
node:
target: auto
threshold: 1%
informational: false
paths:
- "node"
- "blockstore"
- "metrics"
- "lib"
- "genesis"
- "gateway"
- "api"
- "journal"
cli:
target: auto
threshold: 1%
informational: true
paths:
- "cli"
- "cmd"
+27 -19
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-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
@@ -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
View File
@@ -40,6 +40,7 @@ build/paramfetch.sh
/bundle
/darwin
/linux
*.snap
*-fuzz.zip
/chain/types/work_msg/
+5 -5
View File
@@ -49,23 +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
+971 -139
View File
File diff suppressed because it is too large Load Diff
+50 -23
View File
@@ -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,44 @@ 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
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
###
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
+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.
+40 -71
View File
@@ -5,7 +5,9 @@ all: build
unexport GOFLAGS
GOVERSION:=$(shell go version | cut -d' ' -f 3 | sed 's/^go//' | awk -F. '{printf "%d%03d%03d", $$1, $$2, $$3}')
GOCC?=go
GOVERSION:=$(shell $(GOCC) version | tr ' ' '\n' | grep go1 | sed 's/^go//' | awk -F. '{printf "%d%03d%03d", $$1, $$2, $$3}')
ifeq ($(shell expr $(GOVERSION) \< 1016000), 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)
@@ -74,9 +76,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 +84,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
@@ -138,19 +137,19 @@ install-app:
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
$(GOCC) build -o lotus-pond ./lotuspond
.PHONY: lotus-pond
BINS+=lotus-pond
@@ -161,85 +160,64 @@ 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
go build $(GOFLAGS) -o lotus-fountain ./cmd/lotus-fountain
go 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 -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 -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 +239,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 +257,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 +283,26 @@ 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)
(cd ./lotuspond/front/src/chain && $(GOCC) run ./methodgen.go)
actors-gen:
go run ./chain/actors/agen
go fmt ./...
$(GOCC) run ./gen/inline-gen . gen/inlinegen-data.json
$(GOCC) run ./chain/actors/agen
$(GOCC) 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
@@ -351,9 +316,9 @@ appimage: lotus
docsgen: docsgen-md docsgen-openrpc
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
@@ -377,9 +342,11 @@ docsgen-openrpc-worker: docsgen-openrpc-bin
.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"
@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 +354,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
-1
View File
@@ -123,7 +123,6 @@ 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
```
+5
View File
@@ -5,6 +5,7 @@ import (
"fmt"
apitypes "github.com/filecoin-project/lotus/api/types"
"github.com/filecoin-project/lotus/journal/alerting"
"github.com/google/uuid"
@@ -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
+76 -31
View File
@@ -12,14 +12,14 @@ import (
"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/crypto"
"github.com/filecoin-project/go-state-types/dline"
"github.com/filecoin-project/go-fil-markets/retrievalmarket"
"github.com/filecoin-project/go-fil-markets/storagemarket"
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"
@@ -27,8 +27,8 @@ import (
"github.com/filecoin-project/lotus/chain/actors/builtin/paych"
"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
@@ -71,12 +71,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 +107,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
@@ -290,7 +289,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 +330,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,10 +350,11 @@ 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
@@ -428,6 +428,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
@@ -583,6 +585,11 @@ type FullNode interface {
// StateNetworkVersion returns the network version at the given tipset
StateNetworkVersion(context.Context, types.TipSetKey) (apitypes.NetworkVersion, 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
// MethodGroup: Msig
// The Msig methods are used to interact with multisig wallets on the
// filecoin network
@@ -622,10 +629,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 +689,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
@@ -723,16 +744,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 +838,10 @@ const (
PCHOutbound
)
type PaychGetOpts struct {
OffChain bool
}
type PaychStatus struct {
ControlAddr address.Address
Direction PCHDir
@@ -822,16 +859,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 +921,7 @@ type QueryOffer struct {
Size uint64
MinPrice types.BigInt
UnsealPrice types.BigInt
PricePerByte abi.TokenAmount
PaymentInterval uint64
PaymentIntervalIncrease uint64
Miner address.Address
@@ -910,14 +955,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 +1105,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
+7 -1
View File
@@ -31,17 +31,23 @@ import (
type Gateway interface {
ChainHasObj(context.Context, cid.Cid) (bool, 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)
+11
View File
@@ -2,6 +2,7 @@ package api
import (
"context"
"time"
metrics "github.com/libp2p/go-libp2p-core/metrics"
"github.com/libp2p/go-libp2p-core/network"
@@ -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
}
+147 -45
View File
@@ -13,16 +13,17 @@ import (
"github.com/filecoin-project/go-address"
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-state-types/abi"
abinetwork "github.com/filecoin-project/go-state-types/network"
"github.com/filecoin-project/specs-actors/v2/actors/builtin/market"
"github.com/filecoin-project/specs-storage/storage"
"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/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"
)
@@ -90,7 +91,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 +100,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 +111,9 @@ 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
// WorkerConnect tells the node to connect to workers RPC
WorkerConnect(context.Context, string) error //perm:admin retry:true
@@ -117,36 +121,42 @@ 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
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
ReturnReplicaUpdate(ctx context.Context, callID storiface.CallID, out storage.ReplicaUpdateOut, err *storiface.CallError) error //perm:admin retry:true
ReturnProveReplicaUpdate1(ctx context.Context, callID storiface.CallID, vanillaProofs storage.ReplicaVanillaProofs, err *storiface.CallError) error //perm:admin retry:true
ReturnProveReplicaUpdate2(ctx context.Context, callID storiface.CallID, proof storage.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
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
//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
// SectorIndex
StorageAttach(context.Context, storiface.StorageInfo, fsutil.FsStat) 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(ctx context.Context, sector abi.SectorID, ft storiface.SectorFileType, ssize abi.SectorSize, allowFetch bool) ([]storiface.SectorStorageInfo, error) //perm:admin
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
MarketImportDealData(ctx context.Context, propcid cid.Cid, path string) error //perm:write
MarketListDeals(ctx context.Context) ([]MarketDeal, error) //perm:read
@@ -159,12 +169,67 @@ 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
// 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.
@@ -202,11 +267,10 @@ type StorageMiner interface {
CheckProvable(ctx context.Context, pp abi.RegisteredPoStProof, sectors []storage.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
}
var _ storiface.WorkerReturn = *new(StorageMiner)
var _ stores.SectorIndex = *new(StorageMiner)
type SealRes struct {
Err string
@@ -224,19 +288,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 +407,34 @@ 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
}
+6 -1
View File
@@ -1,3 +1,4 @@
//stm: #unit
package api
import (
@@ -26,6 +27,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 +40,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 +53,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 +80,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,6 +119,7 @@ func TestReturnTypes(t *testing.T) {
}
func TestPermTags(t *testing.T) {
//stm: @OTHER_IMPLEMENTATION_PERM_TAGS_001
_ = PermissionedFullAPI(&FullNodeStruct{})
_ = PermissionedStorMinerAPI(&StorageMinerStruct{})
_ = PermissionedWorkerAPI(&WorkerStruct{})
+11 -2
View File
@@ -7,8 +7,9 @@ import (
"github.com/ipfs/go-cid"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/specs-actors/v5/actors/runtime/proof"
"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"
)
@@ -29,7 +30,7 @@ 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
@@ -39,11 +40,19 @@ type Worker interface {
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
FinalizeReplicaUpdate(ctx context.Context, sector storage.SectorRef, keepUnsealed []storage.Range) (storiface.CallID, error) //perm:admin
ReplicaUpdate(ctx context.Context, sector storage.SectorRef, pieces []abi.PieceInfo) (storiface.CallID, error) //perm:admin
ProveReplicaUpdate1(ctx context.Context, sector storage.SectorRef, sectorKey, newSealed, newUnsealed cid.Cid) (storiface.CallID, error) //perm:admin
ProveReplicaUpdate2(ctx context.Context, sector storage.SectorRef, sectorKey, newSealed, newUnsealed cid.Cid, vanillaProofs storage.ReplicaVanillaProofs) (storiface.CallID, error) //perm:admin
GenerateSectorKeyFromData(ctx context.Context, sector storage.SectorRef, commD cid.Cid) (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
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
+2
View File
@@ -5,6 +5,7 @@ package api
import (
"fmt"
"io"
"math"
"sort"
abi "github.com/filecoin-project/go-state-types/abi"
@@ -17,6 +18,7 @@ import (
var _ = xerrors.Errorf
var _ = cid.Undef
var _ = math.E
var _ = sort.Sort
func (t *PaymentInfo) MarshalCBOR(w io.Writer) error {
+72 -16
View File
@@ -1,6 +1,7 @@
package docgen
import (
"encoding/json"
"fmt"
"go/ast"
"go/parser"
@@ -15,7 +16,7 @@ import (
"github.com/filecoin-project/go-bitfield"
"github.com/google/uuid"
"github.com/ipfs/go-cid"
"github.com/ipfs/go-filestore"
"github.com/ipfs/go-graphsync"
"github.com/libp2p/go-libp2p-core/metrics"
"github.com/libp2p/go-libp2p-core/network"
"github.com/libp2p/go-libp2p-core/peer"
@@ -24,10 +25,10 @@ import (
"github.com/multiformats/go-multiaddr"
datatransfer "github.com/filecoin-project/go-data-transfer"
filestore2 "github.com/filecoin-project/go-fil-markets/filestore"
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"
textselector "github.com/ipld/go-ipld-selector-text-lite"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/crypto"
@@ -39,10 +40,10 @@ import (
"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"
)
var ExampleValues = map[reflect.Type]interface{}{
@@ -89,7 +90,10 @@ 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
addExample(bitfield.NewFromSet([]uint64{5}))
addExample(abi.RegisteredSealProof_StackedDrg32GiBV1_1)
@@ -108,7 +112,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,12 +121,17 @@ 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(map[string]int{"name": 42})
@@ -175,8 +183,8 @@ 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))
@@ -190,10 +198,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 +209,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 +233,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 +252,18 @@ 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},
},
})
// worker specific
addExample(storiface.AcquireMove)
@@ -271,6 +289,44 @@ 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,
})
}
func GetAPIType(name, pkg string) (i interface{}, t reflect.Type, permStruct []reflect.Type) {
@@ -321,7 +377,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)
+250 -57
View File
@@ -6,7 +6,9 @@ package mocks
import (
context "context"
json "encoding/json"
reflect "reflect"
time "time"
address "github.com/filecoin-project/go-address"
bitfield "github.com/filecoin-project/go-bitfield"
@@ -14,7 +16,6 @@ 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"
crypto "github.com/filecoin-project/go-state-types/crypto"
@@ -24,8 +25,9 @@ import (
apitypes "github.com/filecoin-project/lotus/api/types"
miner "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"
imports "github.com/filecoin-project/lotus/node/repo/imports"
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"
@@ -298,36 +300,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 +315,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()
@@ -550,6 +537,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()
@@ -760,7 +761,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 +789,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 +817,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 +980,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 +1442,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 +1812,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 +1857,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 +1930,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 +2034,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.
@@ -2229,6 +2377,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 +2407,36 @@ func (mr *MockFullNodeMockRecorder) StateGetActor(arg0, arg1, arg2 interface{})
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateGetActor", reflect.TypeOf((*MockFullNode)(nil).StateGetActor), arg0, arg1, arg2)
}
// 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()
+680 -106
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
+93 -2
View File
@@ -5,12 +5,14 @@ import (
"fmt"
"time"
"github.com/filecoin-project/go-fil-markets/retrievalmarket"
"github.com/filecoin-project/lotus/chain/types"
"github.com/libp2p/go-libp2p-core/network"
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/lotus/chain/types"
"github.com/ipfs/go-cid"
"github.com/ipfs/go-graphsync"
"github.com/libp2p/go-libp2p-core/peer"
pubsub "github.com/libp2p/go-libp2p-pubsub"
@@ -54,6 +56,30 @@ type MessageSendSpec struct {
MaxFee abi.TokenAmount
}
// 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 {
TransferID datatransfer.TransferID
Status datatransfer.Status
@@ -99,6 +125,28 @@ 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 {
Dynamic bool `json:",omitempty"`
// set if Dynamic is false
Memory int64 `json:",omitempty"`
// set if Dynamic is true
MemoryFraction float64 `json:",omitempty"`
MinMemory int64 `json:",omitempty"`
MaxMemory int64 `json:",omitempty"`
Streams, StreamsInbound, StreamsOutbound int
Conns, ConnsInbound, ConnsOutbound int
FD int
}
type NetBlockList struct {
Peers []peer.ID
IPAddrs []string
@@ -194,4 +242,47 @@ 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
}
+44 -4
View File
@@ -8,11 +8,11 @@ import (
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/crypto"
"github.com/filecoin-project/go-state-types/dline"
"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/lotus/api"
@@ -22,6 +22,7 @@ import (
"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
@@ -305,7 +306,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 +326,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
@@ -598,6 +599,11 @@ type FullNode interface {
// StateNetworkVersion returns the network version at the given tipset
StateNetworkVersion(context.Context, types.TipSetKey) (apitypes.NetworkVersion, 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
// MethodGroup: Msig
// The Msig methods are used to interact with multisig wallets on the
// filecoin network
@@ -709,3 +715,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
}
+2 -2
View File
@@ -8,7 +8,7 @@ import (
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/abi"
"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"
@@ -57,7 +57,7 @@ type Gateway interface {
StateMinerInfo(ctx context.Context, actor address.Address, tsk types.TipSetKey) (miner.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)
+42 -16
View File
@@ -10,11 +10,10 @@ import (
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/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"
@@ -22,6 +21,7 @@ import (
"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"
"github.com/ipfs/go-cid"
"github.com/libp2p/go-libp2p-core/peer"
"golang.org/x/xerrors"
@@ -121,15 +121,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"`
@@ -267,6 +267,10 @@ type FullNodeStruct struct {
StateGetActor func(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (*types.Actor, 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"`
@@ -447,7 +451,7 @@ type GatewayStruct struct {
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) ``
@@ -939,14 +943,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 +965,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 +987,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
}
@@ -1742,6 +1746,28 @@ func (s *FullNodeStub) StateGetActor(p0 context.Context, p1 address.Address, p2
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
@@ -2677,15 +2703,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) {
+154 -4
View File
@@ -7,6 +7,7 @@ package v0mocks
import (
context "context"
reflect "reflect"
time "time"
address "github.com/filecoin-project/go-address"
bitfield "github.com/filecoin-project/go-bitfield"
@@ -14,7 +15,6 @@ 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"
crypto "github.com/filecoin-project/go-state-types/crypto"
@@ -22,10 +22,13 @@ import (
network "github.com/filecoin-project/go-state-types/network"
api "github.com/filecoin-project/lotus/api"
apitypes "github.com/filecoin-project/lotus/api/types"
v0api "github.com/filecoin-project/lotus/api/v0api"
miner "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"
imports "github.com/filecoin-project/lotus/node/repo/imports"
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"
@@ -731,7 +734,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 +762,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 +790,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 +953,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 +1725,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 +1770,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 +1843,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()
@@ -2155,6 +2275,36 @@ func (mr *MockFullNodeMockRecorder) StateGetActor(arg0, arg1, arg2 interface{})
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateGetActor", reflect.TypeOf((*MockFullNode)(nil).StateGetActor), arg0, arg1, arg2)
}
// 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()
+158 -1
View File
@@ -3,6 +3,11 @@ package v0api
import (
"context"
"github.com/filecoin-project/go-fil-markets/retrievalmarket"
"github.com/filecoin-project/go-state-types/big"
"github.com/filecoin-project/go-state-types/crypto"
marketevents "github.com/filecoin-project/lotus/markets/loggers"
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/lotus/chain/types"
"golang.org/x/xerrors"
@@ -106,7 +111,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 +189,156 @@ 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)
}
var _ FullNode = &WrapperV1Full{}
+4 -4
View File
@@ -54,11 +54,11 @@ func VersionForType(nodeType NodeType) (Version, error) {
// semver versions of the rpc api exposed
var (
FullAPIVersion0 = newVer(1, 3, 0)
FullAPIVersion1 = newVer(2, 1, 0)
FullAPIVersion0 = newVer(1, 5, 0)
FullAPIVersion1 = newVer(2, 2, 0)
MinerAPIVersion0 = newVer(1, 2, 0)
WorkerAPIVersion0 = newVer(1, 1, 0)
MinerAPIVersion0 = newVer(1, 5, 0)
WorkerAPIVersion0 = newVer(1, 6, 0)
)
//nolint:varcheck,deadcode
+9 -9
View File
@@ -25,35 +25,35 @@ 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 {
func (a *apiBlockstore) Put(context.Context, blocks.Block) error {
return xerrors.New("not supported")
}
func (a *apiBlockstore) PutMany([]blocks.Block) error {
func (a *apiBlockstore) PutMany(context.Context, []blocks.Block) error {
return xerrors.New("not supported")
}
+262
View File
@@ -0,0 +1,262 @@
package blockstore
import (
"context"
"sync"
"time"
"golang.org/x/xerrors"
block "github.com/ipfs/go-block-format"
"github.com/ipfs/go-cid"
)
// 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 err != ErrNotFound {
return blk, err
}
bs.stateLock.Lock()
defer bs.stateLock.Unlock()
v, ok := bs.flushingBatch.blockMap[c]
if ok {
return v, nil
}
v, ok = bs.bufferedBatch.blockMap[c]
if ok {
return v, nil
}
return bs.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 err == ErrNotFound {
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())
}
+34
View File
@@ -0,0 +1,34 @@
package blockstore
import (
"context"
"testing"
"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())
require.NoError(t, ab.Flush(ctx))
require.NoError(t, ab.Shutdown(ctx))
}
+8 -8
View File
@@ -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
}
@@ -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,7 +582,7 @@ 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
}
@@ -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
}
@@ -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
}
+21 -23
View File
@@ -1,9 +1,10 @@
//stm: #unit
package badgerbs
import (
"bytes"
"context"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"strings"
@@ -19,6 +20,8 @@ import (
)
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 +40,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 +77,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 +96,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 +114,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 +124,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 +137,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 +157,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 +166,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 +177,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 +255,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/"
+68 -24
View File
@@ -1,3 +1,4 @@
//stm: #unit
package badgerbs
import (
@@ -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)
}
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)
_, err := bs.Get(ctx, cid.Undef)
require.Equal(t, blockstore.ErrNotFound, 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,28 @@ 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())
missingSize, err := bs.GetSize(ctx, missingBlock.Cid())
require.Equal(t, blockstore.ErrNotFound, 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 +188,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 +221,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 +232,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 +243,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 +252,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 +261,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 +276,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 +297,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 +313,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 +329,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.
+7 -5
View File
@@ -1,6 +1,8 @@
package blockstore
import (
"context"
cid "github.com/ipfs/go-cid"
ds "github.com/ipfs/go-datastore"
logging "github.com/ipfs/go-log/v2"
@@ -27,7 +29,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 +95,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
}
+23 -23
View File
@@ -88,34 +88,34 @@ 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); err == ErrNotFound {
// 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 {
func (bs *BufferedBlockstore) Get(ctx context.Context, c cid.Cid) (block.Block, error) {
if out, err := bs.write.Get(ctx, c); err != nil {
if err != ErrNotFound {
return nil, err
}
@@ -123,20 +123,20 @@ func (bs *BufferedBlockstore) Get(c cid.Cid) (block.Block, error) {
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)
func (bs *BufferedBlockstore) GetSize(ctx context.Context, c cid.Cid) (int, error) {
s, err := bs.read.GetSize(ctx, c)
if err == ErrNotFound || s == 0 {
return bs.write.GetSize(c)
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 +145,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 +157,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 +165,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
}
+12 -12
View File
@@ -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
}
+5 -5
View File
@@ -71,14 +71,14 @@ 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)
func (fbs *FallbackStore) Get(ctx context.Context, c cid.Cid) (blocks.Block, error) {
b, err := fbs.Blockstore.Get(ctx, c)
switch err {
case nil:
return b, nil
@@ -89,8 +89,8 @@ func (fbs *FallbackStore) Get(c cid.Cid) (blocks.Block, error) {
}
}
func (fbs *FallbackStore) GetSize(c cid.Cid) (int, error) {
sz, err := fbs.Blockstore.GetSize(c)
func (fbs *FallbackStore) GetSize(ctx context.Context, c cid.Cid) (int, error) {
sz, err := fbs.Blockstore.GetSize(ctx, c)
switch err {
case nil:
return sz, nil
+16 -16
View File
@@ -38,7 +38,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 +48,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 +61,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 +74,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 +87,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 +100,10 @@ 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) 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 +118,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 +134,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 +152,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
+11 -11
View File
@@ -79,12 +79,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 +99,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 +113,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 +122,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()]))
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
}
}
+9 -9
View File
@@ -15,24 +15,24 @@ func NewMemory() MemBlockstore {
// MemBlockstore is a terminal blockstore that keeps blocks in memory.
type MemBlockstore map[cid.Cid]blocks.Block
func (m MemBlockstore) DeleteBlock(k cid.Cid) error {
func (m MemBlockstore) DeleteBlock(ctx context.Context, k cid.Cid) error {
delete(m, k)
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)
}
return nil
}
func (m MemBlockstore) Has(k cid.Cid) (bool, error) {
func (m MemBlockstore) Has(ctx context.Context, k cid.Cid) (bool, error) {
_, ok := m[k]
return ok, nil
}
func (m MemBlockstore) View(k cid.Cid, callback func([]byte) error) error {
func (m MemBlockstore) View(ctx context.Context, k cid.Cid, callback func([]byte) error) error {
b, ok := m[k]
if !ok {
return ErrNotFound
@@ -40,7 +40,7 @@ func (m MemBlockstore) View(k cid.Cid, callback func([]byte) error) error {
return callback(b.RawData())
}
func (m MemBlockstore) Get(k cid.Cid) (blocks.Block, error) {
func (m MemBlockstore) Get(ctx context.Context, k cid.Cid) (blocks.Block, error) {
b, ok := m[k]
if !ok {
return nil, ErrNotFound
@@ -49,7 +49,7 @@ func (m MemBlockstore) Get(k cid.Cid) (blocks.Block, error) {
}
// GetSize returns the CIDs mapped BlockSize
func (m MemBlockstore) GetSize(k cid.Cid) (int, error) {
func (m MemBlockstore) GetSize(ctx context.Context, k cid.Cid) (int, error) {
b, ok := m[k]
if !ok {
return 0, ErrNotFound
@@ -58,7 +58,7 @@ func (m MemBlockstore) GetSize(k cid.Cid) (int, error) {
}
// 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()
@@ -76,9 +76,9 @@ func (m MemBlockstore) Put(b blocks.Block) error {
// 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
}
+11 -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)
+118
View File
@@ -0,0 +1,118 @@
package splitstore
import (
"bufio"
"io"
"os"
"golang.org/x/xerrors"
cid "github.com/ipfs/go-cid"
mh "github.com/multiformats/go-multihash"
)
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)
}
}
+102
View File
@@ -0,0 +1,102 @@
package splitstore
import (
"bufio"
"io"
"os"
"golang.org/x/xerrors"
cid "github.com/ipfs/go-cid"
)
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)
}
}
+17 -9
View File
@@ -10,28 +10,36 @@ import (
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:
+300 -79
View File
@@ -3,6 +3,7 @@ package splitstore
import (
"os"
"path/filepath"
"runtime"
"sync"
"golang.org/x/xerrors"
@@ -27,6 +28,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 +49,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 +68,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 +174,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 +268,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 +374,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 +440,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 -22
View File
@@ -1,12 +1,20 @@
package splitstore
import (
"bufio"
"io"
"os"
"path/filepath"
"sync"
"golang.org/x/xerrors"
cid "github.com/ipfs/go-cid"
)
type MapMarkSetEnv struct{}
type MapMarkSetEnv struct {
path string
}
var _ MarkSetEnv = (*MapMarkSetEnv)(nil)
@@ -14,44 +22,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 +219,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
}
+385 -15
View File
@@ -1,7 +1,7 @@
//stm: #unit
package splitstore
import (
"io/ioutil"
"testing"
cid "github.com/ipfs/go-cid"
@@ -9,29 +9,32 @@ import (
)
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")
}
}
+177 -30
View File
@@ -18,6 +18,8 @@ import (
"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"
@@ -47,6 +49,9 @@ var (
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
)
func init() {
@@ -98,6 +103,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 {
@@ -118,13 +129,13 @@ type SplitStore struct {
headChangeMx sync.Mutex
coldPurgeSize int
chain ChainAccessor
ds dstore.Datastore
cold bstore.Blockstore
hot hotstore
upgrades []upgradeRange
markSetEnv MarkSetEnv
markSetSize int64
@@ -142,10 +153,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 +203,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 +220,29 @@ 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)
}
}
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 +250,21 @@ 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)
}
return s.cold.Has(ctx, cid)
}
has, err := s.hot.Has(ctx, cid)
if err != nil {
return has, err
@@ -229,10 +275,16 @@ 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 && 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,7 +297,21 @@ 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
}
if has {
return s.get(cid)
}
return s.cold.Get(ctx, cid)
}
blk, err := s.hot.Get(ctx, cid)
switch err {
case nil:
@@ -257,10 +323,13 @@ func (s *SplitStore) Get(cid cid.Cid) (blocks.Block, error) {
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))
if bstore.IsHotView(ctx) {
s.reifyColdObject(cid)
}
stats.Record(s.ctx, metrics.SplitstoreMiss.M(1))
}
return blk, err
@@ -269,7 +338,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,7 +351,21 @@ 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
}
if has {
return s.getSize(cid)
}
return s.cold.GetSize(ctx, cid)
}
size, err := s.hot.GetSize(ctx, cid)
switch err {
case nil:
@@ -294,8 +377,12 @@ func (s *SplitStore) GetSize(cid cid.Cid) (int, error) {
s.debug.LogReadMiss(cid)
}
size, err = s.cold.GetSize(cid)
size, err = s.cold.GetSize(ctx, cid)
if err == nil {
if bstore.IsHotView(ctx) {
s.reifyColdObject(cid)
}
stats.Record(s.ctx, metrics.SplitstoreMiss.M(1))
}
return size, err
@@ -305,7 +392,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 +400,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.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,13 +451,19 @@ 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.markLiveRefs(batch)
return nil
}
s.trackTxnRefMany(batch)
return nil
}
@@ -414,7 +513,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 +523,23 @@ 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)
}
return s.cold.View(ctx, cid, cb)
}
// 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,15 +551,19 @@ func (s *SplitStore) View(cid cid.Cid, cb func([]byte) error) error {
s.protectView(cid)
defer s.viewDone()
err := s.hot.View(cid, cb)
err := s.hot.View(ctx, cid, cb)
switch err {
case bstore.ErrNotFound:
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
@@ -460,16 +580,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)
@@ -490,7 +627,7 @@ func (s *SplitStore) Start(chain ChainAccessor) error {
}
// 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 +640,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 +651,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 +673,9 @@ func (s *SplitStore) Start(chain ChainAccessor) error {
}
}
// spawn the reifier
go s.reifyOrchestrator()
// watch the chain
chain.SubscribeHeadChanges(s.HeadChange)
@@ -556,12 +696,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 +723,5 @@ 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))
}
+20 -8
View File
@@ -4,6 +4,7 @@ import (
"fmt"
"os"
"path/filepath"
"sync"
"sync/atomic"
"time"
@@ -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
File diff suppressed because it is too large Load Diff
+18 -18
View File
@@ -20,28 +20,28 @@ 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 +51,16 @@ func (es *exposedSplitStore) Get(c cid.Cid) (blocks.Block, error) {
return blocks.NewBlockWithCid(data, c)
}
blk, err := es.s.hot.Get(c)
blk, err := es.s.hot.Get(ctx, c)
switch err {
case bstore.ErrNotFound:
return es.s.cold.Get(c)
return es.s.cold.Get(ctx, c)
default:
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,21 @@ func (es *exposedSplitStore) GetSize(c cid.Cid) (int, error) {
return len(data), nil
}
size, err := es.s.hot.GetSize(c)
size, err := es.s.hot.GetSize(ctx, c)
switch err {
case bstore.ErrNotFound:
return es.s.cold.GetSize(c)
return es.s.cold.GetSize(ctx, c)
default:
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 +93,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,10 +103,10 @@ func (es *exposedSplitStore) View(c cid.Cid, f func([]byte) error) error {
return f(data)
}
err := es.s.hot.View(c, f)
err := es.s.hot.View(ctx, c, f)
switch err {
case bstore.ErrNotFound:
return es.s.cold.View(c, f)
return es.s.cold.View(ctx, c, f)
default:
return err
+214
View File
@@ -0,0 +1,214 @@
package splitstore
import (
"errors"
"runtime"
"sync/atomic"
"golang.org/x/xerrors"
blocks "github.com/ipfs/go-block-format"
cid "github.com/ipfs/go-cid"
)
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, totrack, toforget []cid.Cid
defer func() {
s.reifyMx.Lock()
defer s.reifyMx.Unlock()
for _, c := range toreify {
delete(s.reifyInProgress, c)
}
for _, c := range totrack {
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)
}
if has {
if s.txnMarkSet != nil {
hasMark, err := s.txnMarkSet.Has(c)
if err != nil {
log.Warnf("error checking markset: %s", err)
} else if hasMark {
toforget = append(toforget, c)
return errStopWalk
}
} else {
totrack = append(totrack, 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 xerrors.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
}
}
if s.txnMarkSet != nil {
if len(toreify) > 0 {
if err := s.txnMarkSet.MarkMany(toreify); err != nil {
log.Warnf("error marking reified objects: %s", err)
}
}
if len(totrack) > 0 {
if err := s.txnMarkSet.MarkMany(totrack); err != nil {
log.Warnf("error marking tracked objects: %s", err)
}
}
} else {
// if txnActive is false these are noops
if len(toreify) > 0 {
s.trackTxnRefMany(toreify)
}
if len(totrack) > 0 {
s.trackTxnRefMany(totrack)
}
}
}
+415 -30
View File
@@ -1,9 +1,11 @@
//stm: #unit
package splitstore
import (
"context"
"errors"
"fmt"
"math/rand"
"sync"
"sync/atomic"
"testing"
@@ -11,6 +13,7 @@ import (
"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"
@@ -19,16 +22,19 @@ import (
datastore "github.com/ipfs/go-datastore"
dssync "github.com/ipfs/go-datastore/sync"
logging "github.com/ipfs/go-log/v2"
mh "github.com/multiformats/go-multihash"
)
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 +44,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 +65,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 +98,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 +116,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 +131,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 +187,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 +197,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 +206,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 +220,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 +238,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 +666,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 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 +710,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 +763,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
}
+29 -16
View File
@@ -1,6 +1,7 @@
package splitstore
import (
"sync"
"sync/atomic"
"time"
@@ -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++
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"
cid "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) {
+25 -21
View File
@@ -47,8 +47,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 +92,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)
block, err := t.active.Get(ctx, k)
if err == ErrNotFound {
block, err = t.inactive.Get(k)
block, err = t.inactive.Get(ctx, k)
}
t.mu.RUnlock()
@@ -119,51 +123,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)
b, err := t.active.Get(ctx, k)
if err == ErrNotFound {
b, err = t.inactive.Get(k)
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)
size, err := t.active.GetSize(ctx, k)
if err == ErrNotFound {
size, err = t.inactive.GetSize(k)
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) {
+17 -11
View File
@@ -1,3 +1,4 @@
//stm: #unit
package blockstore
import (
@@ -13,12 +14,17 @@ import (
)
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 +33,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 +52,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 +77,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)
}
+16 -16
View File
@@ -19,72 +19,72 @@ 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 || err != ErrNotFound {
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 || err != ErrNotFound {
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 || err != ErrNotFound {
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
}
}
+26 -19
View File
@@ -1,3 +1,4 @@
//stm: #unit
package blockstore
import (
@@ -15,79 +16,85 @@ var (
)
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)
+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/12D3KooWFHDtFx7CVTy4xoCDutVo1cScvSnQjDeaM8UzwVS1qwkh
/dns4/bootstrap-1.butterfly.fildev.network/tcp/1347/p2p/12D3KooWKt8cwpkiumkT8x32c3YFxsPRwhV5J8hCYPn9mhUmcAXt
+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/12D3KooWPfaWdJjpPTQp5kSqsqvauJaM4cFz5NWja7qyjx7vVfjL
/dns4/bootstrap-1.interop.fildev.network/tcp/1347/p2p/12D3KooWS5tjcL6s4hHZ1HVRTgGKaXpKkiHfbBSJdjbzgejgJpEh
-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
Binary file not shown.
Binary file not shown.
Binary file not shown.
+6
View File
@@ -0,0 +1,6 @@
package build
var (
DefaultFDLimit uint64 = 16 << 10
MinerFDLimit uint64 = 100_000
)
Binary file not shown.
Binary file not shown.
Binary file not shown.
+2
View File
@@ -1,3 +1,4 @@
//stm: #unit
package build
import (
@@ -7,6 +8,7 @@ import (
)
func TestOpenRPCDiscoverJSON_Version(t *testing.T) {
//stm: @OTHER_IMPLEMENTATION_OPENRPC_VERSION_001
// openRPCDocVersion is the current OpenRPC version of the API docs.
openRPCDocVersion := "1.2.6"
+183
View File
@@ -0,0 +1,183 @@
package build
import (
"fmt"
"io"
"os"
"path/filepath"
"runtime/debug"
"runtime/pprof"
"strconv"
"strings"
"time"
"github.com/icza/backscanner"
logging "github.com/ipfs/go-log/v2"
)
var (
panicLog = logging.Logger("panic-reporter")
defaultJournalTail = 500
)
// PanicReportingPath is the name of the subdir created within the repoPath
// path provided to GeneratePanicReport
var PanicReportingPath = "panic-reports"
// PanicReportJournalTail is the number of lines captured from the end of
// the lotus journal to be included in the panic report.
var PanicReportJournalTail = defaultJournalTail
// GeneratePanicReport produces a timestamped dump of the application state
// for inspection and debugging purposes. Call this function from any place
// where a panic or severe error needs to be examined. `persistPath` is the
// path where the reports should be saved. `repoPath` is the path where the
// journal should be read from. `label` is an optional string to include
// next to the report timestamp.
func GeneratePanicReport(persistPath, repoPath, label string) {
// make sure we always dump the latest logs on the way out
// especially since we're probably panicking
defer panicLog.Sync() //nolint:errcheck
if persistPath == "" && repoPath == "" {
panicLog.Warn("missing persist and repo paths, aborting panic report creation")
return
}
reportPath := filepath.Join(repoPath, PanicReportingPath, generateReportName(label))
if persistPath != "" {
reportPath = filepath.Join(persistPath, generateReportName(label))
}
panicLog.Warnf("generating panic report at %s", reportPath)
tl := os.Getenv("LOTUS_PANIC_JOURNAL_LOOKBACK")
if tl != "" && PanicReportJournalTail == defaultJournalTail {
i, err := strconv.Atoi(tl)
if err == nil {
PanicReportJournalTail = i
}
}
err := os.MkdirAll(reportPath, 0755)
if err != nil {
panicLog.Error(err.Error())
return
}
writeAppVersion(filepath.Join(reportPath, "version"))
writeStackTrace(filepath.Join(reportPath, "stacktrace.dump"))
writeProfile("goroutines", filepath.Join(reportPath, "goroutines.pprof.gz"))
writeProfile("heap", filepath.Join(reportPath, "heap.pprof.gz"))
writeJournalTail(PanicReportJournalTail, repoPath, filepath.Join(reportPath, "journal.ndjson"))
}
func writeAppVersion(file string) {
f, err := os.Create(file)
if err != nil {
panicLog.Error(err.Error())
}
defer f.Close() //nolint:errcheck
versionString := []byte(BuildVersion + BuildTypeString() + CurrentCommit + "\n")
if _, err := f.Write(versionString); err != nil {
panicLog.Error(err.Error())
}
}
func writeStackTrace(file string) {
f, err := os.Create(file)
if err != nil {
panicLog.Error(err.Error())
}
defer f.Close() //nolint:errcheck
if _, err := f.Write(debug.Stack()); err != nil {
panicLog.Error(err.Error())
}
}
func writeProfile(profileType string, file string) {
p := pprof.Lookup(profileType)
if p == nil {
panicLog.Warnf("%s profile not available", profileType)
return
}
f, err := os.Create(file)
if err != nil {
panicLog.Error(err.Error())
return
}
defer f.Close() //nolint:errcheck
if err := p.WriteTo(f, 0); err != nil {
panicLog.Error(err.Error())
}
}
func writeJournalTail(tailLen int, repoPath, file string) {
if repoPath == "" {
panicLog.Warn("repo path is empty, aborting copy of journal log")
return
}
f, err := os.Create(file)
if err != nil {
panicLog.Error(err.Error())
return
}
defer f.Close() //nolint:errcheck
jPath, err := getLatestJournalFilePath(repoPath)
if err != nil {
panicLog.Warnf("failed getting latest journal: %s", err.Error())
return
}
j, err := os.OpenFile(jPath, os.O_RDONLY, 0400)
if err != nil {
panicLog.Error(err.Error())
return
}
js, err := j.Stat()
if err != nil {
panicLog.Error(err.Error())
return
}
jScan := backscanner.New(j, int(js.Size()))
linesWritten := 0
for {
if linesWritten > tailLen {
break
}
line, _, err := jScan.LineBytes()
if err != nil {
if err != io.EOF {
panicLog.Error(err.Error())
}
break
}
if _, err := f.Write(line); err != nil {
panicLog.Error(err.Error())
break
}
if _, err := f.Write([]byte("\n")); err != nil {
panicLog.Error(err.Error())
break
}
linesWritten++
}
}
func getLatestJournalFilePath(repoPath string) (string, error) {
journalPath := filepath.Join(repoPath, "journal")
entries, err := os.ReadDir(journalPath)
if err != nil {
return "", err
}
return filepath.Join(journalPath, entries[len(entries)-1].Name()), nil
}
func generateReportName(label string) string {
label = strings.ReplaceAll(label, " ", "")
return fmt.Sprintf("report_%s_%s", label, time.Now().Format("2006-01-02T150405"))
}
+11
View File
@@ -1,3 +1,4 @@
//go:build debug || 2k
// +build debug 2k
package build
@@ -9,12 +10,15 @@ import (
"github.com/ipfs/go-cid"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/network"
"github.com/filecoin-project/lotus/chain/actors/policy"
)
const BootstrappersFile = ""
const GenesisFile = ""
const GenesisNetworkVersion = network.Version15
var UpgradeBreezeHeight = abi.ChainEpoch(-1)
const BreezeGasTampingDuration = 0
@@ -41,6 +45,10 @@ var UpgradeTurboHeight = abi.ChainEpoch(-15)
var UpgradeHyperdriveHeight = abi.ChainEpoch(-16)
var UpgradeChocolateHeight = abi.ChainEpoch(-17)
var UpgradeOhSnapHeight = abi.ChainEpoch(-18)
var DrandSchedule = map[abi.ChainEpoch]DrandEnum{
0: DrandMainnet,
}
@@ -81,8 +89,11 @@ func init() {
UpgradeNorwegianHeight = getUpgradeHeight("LOTUS_NORWEGIAN_HEIGHT", UpgradeNorwegianHeight)
UpgradeTurboHeight = getUpgradeHeight("LOTUS_ACTORSV4_HEIGHT", UpgradeTurboHeight)
UpgradeHyperdriveHeight = getUpgradeHeight("LOTUS_HYPERDRIVE_HEIGHT", UpgradeHyperdriveHeight)
UpgradeChocolateHeight = getUpgradeHeight("LOTUS_CHOCOLATE_HEIGHT", UpgradeChocolateHeight)
UpgradeOhSnapHeight = getUpgradeHeight("LOTUS_OHSNAP_HEIGHT", UpgradeOhSnapHeight)
BuildType |= Build2k
}
const BlockDelaySecs = uint64(4)
+23 -12
View File
@@ -1,3 +1,4 @@
//go:build butterflynet
// +build butterflynet
package build
@@ -5,6 +6,7 @@ package build
import (
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/network"
"github.com/filecoin-project/lotus/chain/actors/policy"
builtin2 "github.com/filecoin-project/specs-actors/v2/actors/builtin"
"github.com/ipfs/go-cid"
@@ -14,6 +16,8 @@ var DrandSchedule = map[abi.ChainEpoch]DrandEnum{
0: DrandMainnet,
}
const GenesisNetworkVersion = network.Version14
const BootstrappersFile = "butterflynet.pi"
const GenesisFile = "butterflynet.car"
@@ -23,29 +27,36 @@ const UpgradeSmokeHeight = -2
const UpgradeIgnitionHeight = -3
const UpgradeRefuelHeight = -4
var UpgradeAssemblyHeight = abi.ChainEpoch(30)
var UpgradeAssemblyHeight = abi.ChainEpoch(-5)
const UpgradeTapeHeight = 60
const UpgradeLiftoffHeight = -5
const UpgradeKumquatHeight = 90
const UpgradeCalicoHeight = 120
const UpgradePersianHeight = 150
const UpgradeClausHeight = 180
const UpgradeOrangeHeight = 210
const UpgradeTrustHeight = 240
const UpgradeNorwegianHeight = UpgradeTrustHeight + (builtin2.EpochsInHour * 12)
const UpgradeTurboHeight = 8922
const UpgradeHyperdriveHeight = 9999999
const UpgradeTapeHeight = -6
const UpgradeLiftoffHeight = -7
const UpgradeKumquatHeight = -8
const UpgradeCalicoHeight = -9
const UpgradePersianHeight = -10
const UpgradeClausHeight = -11
const UpgradeOrangeHeight = -12
const UpgradeTrustHeight = -13
const UpgradeNorwegianHeight = -14
const UpgradeTurboHeight = -15
const UpgradeHyperdriveHeight = -16
const UpgradeChocolateHeight = -17
const UpgradeOhSnapHeight = 240
func init() {
policy.SetConsensusMinerMinPower(abi.NewStoragePower(2 << 30))
policy.SetSupportedProofTypes(
abi.RegisteredSealProof_StackedDrg512MiBV1,
abi.RegisteredSealProof_StackedDrg32GiBV1,
abi.RegisteredSealProof_StackedDrg64GiBV1,
)
SetAddressNetwork(address.Testnet)
Devnet = true
BuildType = BuildButterflynet
}
const BlockDelaySecs = uint64(builtin2.EpochDurationSeconds)
+10
View File
@@ -1,3 +1,4 @@
//go:build calibnet
// +build calibnet
package build
@@ -5,6 +6,7 @@ package build
import (
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/network"
"github.com/filecoin-project/lotus/chain/actors/policy"
builtin2 "github.com/filecoin-project/specs-actors/v2/actors/builtin"
"github.com/ipfs/go-cid"
@@ -14,6 +16,8 @@ var DrandSchedule = map[abi.ChainEpoch]DrandEnum{
0: DrandMainnet,
}
const GenesisNetworkVersion = network.Version0
const BootstrappersFile = "calibnet.pi"
const GenesisFile = "calibnet.car"
@@ -48,6 +52,11 @@ const UpgradeTurboHeight = 390
const UpgradeHyperdriveHeight = 420
const UpgradeChocolateHeight = 312746
// 2022-02-10T19:23:00Z
const UpgradeOhSnapHeight = 682006
func init() {
policy.SetConsensusMinerMinPower(abi.NewStoragePower(32 << 30))
policy.SetSupportedProofTypes(
@@ -60,6 +69,7 @@ func init() {
Devnet = true
BuildType = BuildCalibnet
}
const BlockDelaySecs = uint64(builtin2.EpochDurationSeconds)
+1
View File
@@ -1,3 +1,4 @@
//go:build debug
// +build debug
package build
+20 -10
View File
@@ -1,3 +1,4 @@
//go:build interopnet
// +build interopnet
package build
@@ -10,14 +11,15 @@ import (
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/abi"
builtin2 "github.com/filecoin-project/specs-actors/v2/actors/builtin"
"github.com/filecoin-project/go-state-types/network"
"github.com/filecoin-project/lotus/chain/actors/policy"
)
const BootstrappersFile = "interopnet.pi"
const GenesisFile = "interopnet.car"
const GenesisNetworkVersion = network.Version15
var UpgradeBreezeHeight = abi.ChainEpoch(-1)
const BreezeGasTampingDuration = 0
@@ -43,21 +45,26 @@ var UpgradeNorwegianHeight = abi.ChainEpoch(-14)
var UpgradeTurboHeight = abi.ChainEpoch(-15)
var UpgradeHyperdriveHeight = abi.ChainEpoch(-16)
var UpgradeChocolateHeight = abi.ChainEpoch(-17)
var UpgradeOhSnapHeight = abi.ChainEpoch(-18)
var DrandSchedule = map[abi.ChainEpoch]DrandEnum{
0: DrandMainnet,
}
func init() {
policy.SetSupportedProofTypes(
abi.RegisteredSealProof_StackedDrg2KiBV1,
abi.RegisteredSealProof_StackedDrg8MiBV1,
abi.RegisteredSealProof_StackedDrg512MiBV1,
)
policy.SetConsensusMinerMinPower(abi.NewStoragePower(2048))
policy.SetMinVerifiedDealSize(abi.NewStoragePower(256))
policy.SetPreCommitChallengeDelay(abi.ChainEpoch(10))
InsecurePoStValidation = true
policy.SetConsensusMinerMinPower(abi.NewStoragePower(2 << 30))
policy.SetSupportedProofTypes(
abi.RegisteredSealProof_StackedDrg512MiBV1,
abi.RegisteredSealProof_StackedDrg32GiBV1,
abi.RegisteredSealProof_StackedDrg64GiBV1,
)
getUpgradeHeight := func(ev string, def abi.ChainEpoch) abi.ChainEpoch {
hs, found := os.LookupEnv(ev)
if found {
@@ -88,15 +95,18 @@ func init() {
UpgradeNorwegianHeight = getUpgradeHeight("LOTUS_NORWEGIAN_HEIGHT", UpgradeNorwegianHeight)
UpgradeTurboHeight = getUpgradeHeight("LOTUS_ACTORSV4_HEIGHT", UpgradeTurboHeight)
UpgradeHyperdriveHeight = getUpgradeHeight("LOTUS_HYPERDRIVE_HEIGHT", UpgradeHyperdriveHeight)
UpgradeChocolateHeight = getUpgradeHeight("LOTUS_CHOCOLATE_HEIGHT", UpgradeChocolateHeight)
UpgradeOhSnapHeight = getUpgradeHeight("LOTUS_OHSNAP_HEIGHT", UpgradeOhSnapHeight)
BuildType |= BuildInteropnet
SetAddressNetwork(address.Testnet)
Devnet = true
}
const BlockDelaySecs = uint64(builtin2.EpochDurationSeconds)
const BlockDelaySecs = uint64(5)
const PropagationDelaySecs = uint64(6)
const PropagationDelaySecs = uint64(1)
// BootstrapPeerThreshold is the minimum number peers we need to track for a sync worker to start
const BootstrapPeerThreshold = 2
+15 -10
View File
@@ -1,10 +1,5 @@
// +build !debug
// +build !2k
// +build !testground
// +build !calibnet
// +build !nerpanet
// +build !butterflynet
// +build !interopnet
//go:build !debug && !2k && !testground && !calibnet && !nerpanet && !butterflynet && !interopnet
// +build !debug,!2k,!testground,!calibnet,!nerpanet,!butterflynet,!interopnet
package build
@@ -12,6 +7,8 @@ import (
"math"
"os"
"github.com/filecoin-project/go-state-types/network"
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/abi"
builtin2 "github.com/filecoin-project/specs-actors/v2/actors/builtin"
@@ -22,6 +19,8 @@ var DrandSchedule = map[abi.ChainEpoch]DrandEnum{
UpgradeSmokeHeight: DrandMainnet,
}
const GenesisNetworkVersion = network.Version0
const BootstrappersFile = "mainnet.pi"
const GenesisFile = "mainnet.car"
@@ -63,15 +62,21 @@ const UpgradeNorwegianHeight = 665280
const UpgradeTurboHeight = 712320
// 2021-06-30T22:00:00Z
var UpgradeHyperdriveHeight = abi.ChainEpoch(892800)
const UpgradeHyperdriveHeight = 892800
// 2021-10-26T13:30:00Z
const UpgradeChocolateHeight = 1231620
// 2022-03-01T15:00:00Z
var UpgradeOhSnapHeight = abi.ChainEpoch(1594680)
func init() {
if os.Getenv("LOTUS_USE_TEST_ADDRESSES") != "1" {
SetAddressNetwork(address.Mainnet)
}
if os.Getenv("LOTUS_DISABLE_HYPERDRIVE") == "1" {
UpgradeHyperdriveHeight = math.MaxInt64
if os.Getenv("LOTUS_DISABLE_SNAPDEALS") == "1" {
UpgradeOhSnapHeight = math.MaxInt64
}
Devnet = false
+9
View File
@@ -1,9 +1,11 @@
//go:build nerpanet
// +build nerpanet
package build
import (
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/network"
"github.com/filecoin-project/lotus/chain/actors/policy"
"github.com/ipfs/go-cid"
@@ -14,6 +16,8 @@ var DrandSchedule = map[abi.ChainEpoch]DrandEnum{
0: DrandMainnet,
}
const GenesisNetworkVersion = network.Version0
const BootstrappersFile = "nerpanet.pi"
const GenesisFile = "nerpanet.car"
@@ -44,6 +48,8 @@ const UpgradeNorwegianHeight = 201000
const UpgradeTurboHeight = 203000
const UpgradeHyperdriveHeight = 379178
const UpgradeChocolateHeight = 999999999
func init() {
// Minimum block production power is set to 4 TiB
// Rationale is to discourage small-scale miners from trying to take over the network
@@ -66,6 +72,9 @@ func init() {
//miner.WPoStChallengeLookback = abi.ChainEpoch(2)
Devnet = false
BuildType = BuildNerpanet
}
const BlockDelaySecs = uint64(builtin2.EpochDurationSeconds)
+11
View File
@@ -13,6 +13,17 @@ import (
func BlocksTopic(netName dtypes.NetworkName) string { return "/fil/blocks/" + string(netName) }
func MessagesTopic(netName dtypes.NetworkName) string { return "/fil/msgs/" + string(netName) }
func IndexerIngestTopic(netName dtypes.NetworkName) string {
nn := string(netName)
// The network name testnetnet is here for historical reasons.
// Going forward we aim to use the name `mainnet` where possible.
if nn == "testnetnet" {
nn = "mainnet"
}
return "/indexer/ingest/" + nn
}
func DhtProtocolName(netName dtypes.NetworkName) protocol.ID {
return protocol.ID("/fil/kad/" + string(netName))
}
+12 -2
View File
@@ -1,3 +1,4 @@
//go:build !testground
// +build !testground
package build
@@ -25,8 +26,17 @@ const UnixfsLinksPerLevel = 1024
// Consensus / Network
const AllowableClockDriftSecs = uint64(1)
const NewestNetworkVersion = network.Version13
const ActorUpgradeNetworkVersion = network.Version4
// TODO: This is still terrible...What's the impact of updating this before mainnet actually upgrades
/* inline-gen template
const NewestNetworkVersion = network.Version{{.latestNetworkVersion}}
/* inline-gen start */
const NewestNetworkVersion = network.Version15
/* inline-gen end */
// Epochs
const ForkLengthThreshold = Finality
+7 -2
View File
@@ -1,3 +1,4 @@
//go:build testground
// +build testground
// This file makes hardcoded parameters (const) configurable as vars.
@@ -97,13 +98,17 @@ var (
UpgradeNorwegianHeight abi.ChainEpoch = -13
UpgradeTurboHeight abi.ChainEpoch = -14
UpgradeHyperdriveHeight abi.ChainEpoch = -15
UpgradeChocolateHeight abi.ChainEpoch = -16
UpgradeOhSnapHeight abi.ChainEpoch = -17
DrandSchedule = map[abi.ChainEpoch]DrandEnum{
0: DrandMainnet,
}
NewestNetworkVersion = network.Version11
ActorUpgradeNetworkVersion = network.Version4
GenesisNetworkVersion = network.Version0
NewestNetworkVersion = network.Version15
ActorUpgradeNetworkVersion = network.Version15
Devnet = true
ZeroAddress = MustParseAddress("f3yaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaby2smx7a")
+50
View File
@@ -1,4 +1,54 @@
{
"v28-empty-sector-update-merkletree-poseidon_hasher-8-0-0-61fa69f38b9cc771ba27b670124714b4ea77fbeae05e377fb859c4a43b73a30c.params": {
"cid": "Qma5WL6abSqYg9uUQAZ3EHS286bsNsha7oAGsJBD48Bq2q",
"digest": "c3ad7bb549470b82ad52ed070aebb4f4",
"sector_size": 536870912
},
"v28-empty-sector-update-merkletree-poseidon_hasher-8-0-0-61fa69f38b9cc771ba27b670124714b4ea77fbeae05e377fb859c4a43b73a30c.vk": {
"cid": "QmUa7f9JtJMsqJJ3s3ZXk6WyF4xJLE8FiqYskZGgk8GCDv",
"digest": "994c5b7d450ca9da348c910689f2dc7f",
"sector_size": 536870912
},
"v28-empty-sector-update-merkletree-poseidon_hasher-8-0-0-92180959e1918d26350b8e6cfe217bbdd0a2d8de51ebec269078b364b715ad63.params": {
"cid": "QmQiT4qBGodrVNEgVTDXxBNDdPbaD8Ag7Sx3ZTq1zHX79S",
"digest": "5aedd2cf3e5c0a15623d56a1b43110ad",
"sector_size": 8388608
},
"v28-empty-sector-update-merkletree-poseidon_hasher-8-0-0-92180959e1918d26350b8e6cfe217bbdd0a2d8de51ebec269078b364b715ad63.vk": {
"cid": "QmdcpKUQvHM8RFRVKbk1yHfEqMcBzhtFWKRp9SNEmWq37i",
"digest": "abd80269054d391a734febdac0d2e687",
"sector_size": 8388608
},
"v28-empty-sector-update-merkletree-poseidon_hasher-8-0-0-fb9e095bebdd77511c0269b967b4d87ba8b8a525edaa0e165de23ba454510194.params": {
"cid": "QmYM6Hg7mjmvA3ZHTsqkss1fkdyDju5dDmLiBZGJ5pz9y9",
"digest": "311f92a3e75036ced01b1c0025f1fa0c",
"sector_size": 2048
},
"v28-empty-sector-update-merkletree-poseidon_hasher-8-0-0-fb9e095bebdd77511c0269b967b4d87ba8b8a525edaa0e165de23ba454510194.vk": {
"cid": "QmaQsTLL3nc5dw6wAvaioJSBfd1jhQrA2o6ucFf7XeV74P",
"digest": "eadad9784969890d30f2749708c79771",
"sector_size": 2048
},
"v28-empty-sector-update-merkletree-poseidon_hasher-8-8-0-3b7f44a9362e3985369454947bc94022e118211e49fd672d52bec1cbfd599d18.params": {
"cid": "QmNPc75iEfcahCwNKdqnWLtxnjspUGGR4iscjiz3wP3RtS",
"digest": "1b3cfd761a961543f9eb273e435a06a2",
"sector_size": 34359738368
},
"v28-empty-sector-update-merkletree-poseidon_hasher-8-8-0-3b7f44a9362e3985369454947bc94022e118211e49fd672d52bec1cbfd599d18.vk": {
"cid": "QmdFFUe1gcz9MMHc6YW8aoV48w4ckvcERjt7PkydQAMfCN",
"digest": "3a6941983754737fde880d29c7094905",
"sector_size": 34359738368
},
"v28-empty-sector-update-merkletree-poseidon_hasher-8-8-2-102e1444a7e9a97ebf1e3d6855dcc77e66c011ea66f936d9b2c508f87f2f83a7.params": {
"cid": "QmUB6xTVjzBQGuDNeyJMrrJ1byk58vhPm8eY2Lv9pgwanp",
"digest": "1a392e7b759fb18e036c7559b5ece816",
"sector_size": 68719476736
},
"v28-empty-sector-update-merkletree-poseidon_hasher-8-8-2-102e1444a7e9a97ebf1e3d6855dcc77e66c011ea66f936d9b2c508f87f2f83a7.vk": {
"cid": "Qmd794Jty7k26XJ8Eg4NDEks65Qk8G4GVfGkwqvymv8HAg",
"digest": "80e366df2f1011953c2d01c7b7c9ee8e",
"sector_size": 68719476736
},
"v28-proof-of-spacetime-fallback-merkletree-poseidon_hasher-8-0-0-0170db1f394b35d995252228ee359194b13199d259380541dc529fb0099096b0.params": {
"cid": "QmVxjFRyhmyQaZEtCh7nk2abc7LhFkzhnRX4rcHqCCpikR",
"digest": "7610b9f82bfc88405b7a832b651ce2f6",
+2 -1
View File
@@ -1,4 +1,5 @@
//+build tools
//go:build tools
// +build tools
package build
+12 -9
View File
@@ -6,15 +6,16 @@ var CurrentCommit string
var BuildType int
const (
BuildDefault = 0
BuildMainnet = 0x1
Build2k = 0x2
BuildDebug = 0x3
BuildCalibnet = 0x4
BuildInteropnet = 0x5
BuildDefault = 0
BuildMainnet = 0x1
Build2k = 0x2
BuildDebug = 0x3
BuildCalibnet = 0x4
BuildInteropnet = 0x5
BuildButterflynet = 0x7
)
func buildType() string {
func BuildTypeString() string {
switch BuildType {
case BuildDefault:
return ""
@@ -28,18 +29,20 @@ func buildType() string {
return "+calibnet"
case BuildInteropnet:
return "+interopnet"
case BuildButterflynet:
return "+butterflynet"
default:
return "+huh?"
}
}
// BuildVersion is the local build version
const BuildVersion = "1.11.1"
const BuildVersion = "1.15.2-dev"
func UserVersion() string {
if os.Getenv("LOTUS_VERSION_IGNORE_COMMIT") == "1" {
return BuildVersion
}
return BuildVersion + buildType() + CurrentCommit
return BuildVersion + BuildTypeString() + CurrentCommit
}
+3
View File
@@ -1,3 +1,4 @@
//stm: #unit
package adt
import (
@@ -44,6 +45,7 @@ func TestDiffAdtArray(t *testing.T) {
changes := new(TestDiffArray)
//stm: @CHAIN_ADT_ARRAY_DIFF_001
assert.NoError(t, DiffAdtArray(arrA, arrB, changes))
assert.NotNil(t, changes)
@@ -98,6 +100,7 @@ func TestDiffAdtMap(t *testing.T) {
changes := new(TestDiffMap)
//stm: @CHAIN_ADT_MAP_DIFF_001
assert.NoError(t, DiffAdtMap(mapA, mapB, changes))
assert.NotNil(t, changes)

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