Conversation
9bd7808 to
4629f21
Compare
01196a8 to
f101e09
Compare
4629f21 to
6275ac6
Compare
f101e09 to
868f884
Compare
mattsse
left a comment
There was a problem hiding this comment.
some suggestions, but afaict the flow makes sense, in parallelizes as much as possible
|
|
||
| // finally, write the receipts | ||
| provider.write_state(&execution_outcome, OriginalValuesKnown::Yes)?; | ||
| provider.write_state(&execution_outcome, OriginalValuesKnown::Yes, true)?; |
There was a problem hiding this comment.
can we make this a config struct because i assume well add more settings eventually?
| /// Inserts the block into the database, always modifying the following static file segments and | ||
| /// tables: | ||
| /// * [`StaticFileSegment::Headers`] | ||
| /// * [`tables::HeaderNumbers`] | ||
| /// * [`tables::BlockBodyIndices`] | ||
| /// | ||
| /// If there are transactions in the block, the following static file segments and tables will | ||
| /// be modified: | ||
| /// * [`StaticFileSegment::Transactions`] | ||
| /// * [`tables::TransactionBlocks`] | ||
| /// Inserts the block into the database, writing to both static files and MDBX. | ||
| /// | ||
| /// If ommers are not empty, this will modify [`BlockOmmers`](tables::BlockOmmers). | ||
| /// If withdrawals are not empty, this will modify | ||
| /// [`BlockWithdrawals`](tables::BlockWithdrawals). | ||
| /// | ||
| /// If the provider has __not__ configured full sender pruning, this will modify either: | ||
| /// * [`StaticFileSegment::TransactionSenders`] if senders are written to static files | ||
| /// * [`tables::TransactionSenders`] if senders are written to the database | ||
| /// | ||
| /// If the provider has __not__ configured full transaction lookup pruning, this will modify | ||
| /// [`TransactionHashNumbers`](tables::TransactionHashNumbers). |
There was a problem hiding this comment.
is this no longer accurate?
| /// [`TransactionHashNumbers`](tables::TransactionHashNumbers). | ||
| /// This is a convenience method primarily used in tests. For production use, | ||
| /// prefer [`Self::save_blocks`] which handles execution output and trie data. | ||
| fn insert_block( |
There was a problem hiding this comment.
when do we even call this?
separately
appears to be unused?
| /// | ||
| /// If the provider has __not__ configured full transaction lookup pruning, this will modify | ||
| /// [`TransactionHashNumbers`](tables::TransactionHashNumbers). | ||
| /// This is a convenience method primarily used in tests. For production use, |
There was a problem hiding this comment.
ah nvm, I think I understand now
b271a28 to
4fdb472
Compare
8f2cbc4 to
76c93c6
Compare
705619b to
c38dbb8
Compare
pepyakin
left a comment
There was a problem hiding this comment.
I've went through the code and it looks reasonable to me.
| for (i, block) in blocks.iter().enumerate() { | ||
| let recovered_block = block.recovered_block(); | ||
|
|
||
| let start = Instant::now(); |
There was a problem hiding this comment.
should we have the instant::now() outside the loop? right now in this scope we have a couple of this ~5
There was a problem hiding this comment.
this seems fine, I think we want this per block
| for (i, block) in blocks.iter().enumerate() { | ||
| let recovered_block = block.recovered_block(); | ||
|
|
||
| let start = Instant::now(); |
There was a problem hiding this comment.
this seems fine, I think we want this per block
Co-authored-by: Sergei Shulepov <pep@tempo.xyz>
Co-authored-by: Sergei Shulepov <s.pepyakin@gmail.com> Co-authored-by: Sergei Shulepov <pep@tempo.xyz> Co-authored-by: Brian Picciano <me@mediocregopher.com>
Co-authored-by: Sergei Shulepov <s.pepyakin@gmail.com> Co-authored-by: Sergei Shulepov <pep@tempo.xyz> Co-authored-by: Brian Picciano <me@mediocregopher.com>
save_blocksinsert_blocknow callssave_blocksPR Stack
save_blocks#21045rocksdbtosave_blocks#21003save_blocks#21012save_blocks#20993 ◀