feat: add reth db snapshot transactions | receipts commands#5007
feat: add reth db snapshot transactions | receipts commands#5007
reth db snapshot transactions | receipts commands#5007Conversation
Codecov Report
... and 382 files with indirect coverage changes
Flags with carried forward coverage won't be shown. Click here to find out more.
|
reth db snapshot transactions commandreth db snapshot transactions | receipts commands
Co-authored-by: Alexey Shekhirin <a.shekhirin@gmail.com>
Co-authored-by: Alexey Shekhirin <a.shekhirin@gmail.com>
Co-authored-by: Alexey Shekhirin <a.shekhirin@gmail.com>
Co-authored-by: Alexey Shekhirin <a.shekhirin@gmail.com>
Co-authored-by: Alexey Shekhirin <a.shekhirin@gmail.com>
Co-authored-by: Alexey Shekhirin <a.shekhirin@gmail.com>
Co-authored-by: Alexey Shekhirin <a.shekhirin@gmail.com>
mattsse
left a comment
There was a problem hiding this comment.
lgtm,
the comment re parallel hashing can be addressed separately, I wonder, do we use the same logic in the mdbx implementation, if so we also need to revise that
| let tx_range_size = tx_range.clone().count(); | ||
| let tx_walker = tx_cursor.walk_range(tx_range)?; | ||
|
|
||
| let chunk_size = (tx_range_size / rayon::current_num_threads()).max(1); |
There was a problem hiding this comment.
I think this can be problematic, because this can negatively impact everything else.
we're usually calling this on a per-block basis, right?
so in worst case we're spawning num CPU parallel worker threads with >1 txs.
the cutoff should be way higher so that the overhead of using the threadpool is worth it.
do we have benchmarks for this?
let's say we have 200 tx in a block and 16cores results in a chunk size of 12, which I think is a bit too low.
I think we should rather define a minimum txs per thread, maybe go with 32 or something until we have benchmarks, then we also need a variant where we don't even need to spawn a single thread.
but we can do all of this in a followup if we track it
Co-authored-by: Alexey Shekhirin <a.shekhirin@gmail.com>
TxLookupStage( cc @onbjerg @mattsse )SegmentHeaderas aNippyJarheader. Currently holds the block and transaction range of the snapshot.reth db snapshot transactionscommandreth db snapshot receiptscommand