lotus/node/impl/full
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
..
chain.go Chain ranged export: rework and address current shortcomings 2023-02-14 21:08:10 +01:00
dummy.go implement itest and handle optional params 2023-02-10 13:33:59 -05:00
eth_test.go fix: make gen 2023-02-10 09:32:59 -08:00
eth.go fix: correctly handle ethGetCode edge-cases 2023-02-12 20:38:47 -08:00
gas_test.go fix make gen 2022-08-29 16:25:30 +02:00
gas.go feat: compute a better gas limit for recursive external contract calls 2023-02-03 20:40:18 +00:00
mpool.go NV18: Filecoin EVM runtime + Actor Events + EthAccount + EAM + f4 addressing (#9998) 2023-01-13 19:11:13 +00:00
multisig.go introduce v9 actors and nv17 2022-09-09 21:40:15 -04:00
raft.go Address comments 2022-11-14 15:46:58 -05:00
state.go NV18: Filecoin EVM runtime + Actor Events + EthAccount + EAM + f4 addressing (#9998) 2023-01-13 19:11:13 +00:00
sync.go fix some bugs and address some comments 2022-10-16 22:52:22 -04:00
wallet.go fix: Don't call WalletExport in msg signing flows 2023-02-10 02:37:59 +01:00