lotus/cli
Hector Sanjuan fa93c23813 Chain ranged export: rework and address current shortcomings
This commit moderately refactors the ranged export code. It addresses several
problems:
  * Code does not finish cleanly and things hang on ctrl-c
  * Same block is read multiple times in a row (artificially increasing cached
    blockstore metrics to 50%)
  * It is unclear whether there are additional races (a single worker quits
    when reaching height 0)
  * CARs produced have duplicated blocks (~400k for an 80M-blocks CAR or
    so). Some blocks appear up to 5 times.
  * Using pointers for tasks where it is not necessary.

The changes:

  * Use a FIFO instead of stack: simpler implementation as its own type. This
has not proven to be much more memory-friendly, but it has not made things
worse either.
  * We avoid a probably not small amount of allocations by not using
    unnecessary pointers.
  * Fix duplicated blocks by atomically checking+adding to CID set.
  * Context-termination now works correctly. Worker lifetime is correctly tracked and all channels
  are closed, avoiding any memory leaks and deadlocks.
  * We ensure all work is finished before finishing, something that might have
  been broken in some edge cases previously. In practice, we would not have
  seen this except perhaps in very early snapshots close to genesis.

Initial testing shows the code is currently about 5% faster. Resulting
snapshots do not have duplicates so they are a bit smaller. We have manually
verified that no CID is lost versus previous results, with both old and recent
snapshots.
2023-02-14 21:08:10 +01:00
..
util itests: Fix TestEthSubscribeLogs 2023-01-31 10:28:12 +01:00
auth.go move APIInfoEnvVars, RepoFlags, APIFlags under RepoType 2022-03-03 16:45:11 +01:00
backup.go Update cli/backup.go 2023-02-09 16:50:15 +01:00
chain_test.go Invoker: Use MethodMeta from go-state-types 2022-10-19 15:53:26 -04:00
chain.go Chain ranged export: rework and address current shortcomings 2023-02-14 21:08:10 +01:00
client_retr.go cli: Move ClientExport to cliutil 2022-11-08 09:37:43 +00:00
client.go Merge pull request #10028 from filecoin-project/gstuart/cli-color-cleanup 2023-01-31 09:23:16 +01:00
cmd.go NV18: Filecoin EVM runtime + Actor Events + EthAccount + EAM + f4 addressing (#9998) 2023-01-13 19:11:13 +00:00
disputer.go chore: cli 2023-01-25 13:13:56 +01:00
evm.go feat: eth cli: Strip out empty spaces around contract bytes 2023-02-09 18:49:08 +01:00
filplus.go Add cli command to get a list of claims 2022-12-15 01:07:47 -05:00
helper.go Set notifications for SIGTERM and SIGINT when we start the cli 2022-12-15 12:54:41 -05:00
info.go feat: Add node uptime rpc / output in info command 2022-10-11 10:11:09 +02:00
init_test.go introduce message prototypes 2021-05-07 15:30:05 +02:00
log.go cli for checking alerts 2021-08-26 15:45:17 +02:00
mocks_test.go chore: fix imports 2022-06-14 17:00:51 +02:00
mpool_manage.go chore: remove redundant import prefixes 2022-06-15 12:06:22 +02:00
mpool_test.go fix make gen 2022-08-29 16:25:30 +02:00
mpool.go Add helper function to print usage when wrong number of arguments are supplied 2022-09-14 15:38:15 -04:00
multisig.go Merge branch 'master' into adlrocha/cns-iface-master 2022-11-22 10:28:18 +01:00
net.go fix: ux: specify arg in net ping cmd 2022-10-10 08:31:55 +02:00
params.go chore: cli 2023-01-25 13:13:56 +01:00
paych.go Add helper function to print usage when wrong number of arguments are supplied 2022-09-14 15:38:15 -04:00
pprof.go unexport repo types; use a global var for every repo type 2022-03-03 15:37:23 +01:00
send_test.go fix make gen 2022-08-29 16:25:30 +02:00
send.go Allow f4 address to send to all address types if ID address exists on chain 2023-02-01 11:46:45 -05:00
sending_ui.go chore: remove redundant import prefixes 2022-06-15 12:06:22 +02:00
services_send_test.go fix make gen 2022-08-29 16:25:30 +02:00
services.go parametrized reward function for consensus 2022-10-13 16:30:14 +02:00
servicesmock_test.go run make gen to make ci happy 2022-10-13 16:43:02 +02:00
state.go Merge branch 'release/v1.20.0' into asr/merge-release-into-master 2023-02-07 11:03:01 -05:00
status.go implement NodeStatus API 2021-05-07 15:30:04 +02:00
sync_test.go fix make gen 2022-08-29 16:25:30 +02:00
sync.go chore: remove redundant import prefixes 2022-06-15 12:06:22 +02:00
util.go cli: Move EpochTime to cliutil 2022-11-08 09:37:43 +00:00
version.go miner: Command to dump all miner info 2020-08-04 20:57:48 +02:00
wait.go add timeout flag to wait-api command 2021-11-02 17:28:11 +00:00
wallet_test.go fix make gen 2022-08-29 16:25:30 +02:00
wallet.go less strict ArgsCheck 2023-01-26 10:13:39 +01:00