Open emhane opened 1 day ago
- Fixes bug in stages. Bug: writing compact encoded signed transaction instead of the unsigned transaction to db
I believe we've been always writing signed transaction to both static files and database? https://github.com/paradigmxyz/reth/blob/166a2346dcd2a9c8d5fea6995a9fc5e6426c62bb/crates/storage/provider/src/providers/static_file/writer.rs#L543-L547 https://github.com/paradigmxyz/reth/blob/166a2346dcd2a9c8d5fea6995a9fc5e6426c62bb/crates/storage/db/src/tables/mod.rs#L295
- Fixes bug in stages. Bug: writing compact encoded signed transaction instead of the unsigned transaction to db
I believe we've been always writing signed transaction to both static files and database?
TransactionSigned
doesn't impl Compact
though
It does since https://github.com/paradigmxyz/reth/pull/12539
related discussion https://github.com/paradigmxyz/reth/pull/12694#discussion_r1851075736
then it should impl Compact
, but it doesn't. before StaticFileProviderRW::append_transaction
took TransactionSignedNoHash
. @klkvr
then it should impl
Compact
, but it doesn't
It does impl Compact
https://github.com/paradigmxyz/reth/blob/e3702cfc87449294da061f02a571a23061b8ab50/crates/primitives/src/transaction/mod.rs#L1054
before
StaticFileProviderRW::append_transaction
tookTransactionSignedNoHash
yep, but now it takes anything that implements Compact
(should probably change that to N::SignedTx
given that we have primitives on StaticFileProvider
now)
sorry for the confusion with the 2 storage types, I was expecting the TransactionSignedNoHash to be gone by now
ok nvm, switching between a lot of branches to shrink scope, my bad
re-request review @klkvr
Based on https://github.com/paradigmxyz/reth/pull/12647
BlockPrimitives
, which linksNodePrimitives::Block
toNodePrimitives::BlockHeader
,NodePrimitives::BlockBody
andNodePrimitives::SignedTransaction
. This makes the trait bounds necessary on impl bodies much less verbose!NodePrimitives
super trait ofFullNodePrimitives
, as it allows for the transitionFullNodePrimitives
->BlockPrimitives
->NodePrimitives
. NOTE: the reason I didn't do this in the first place is because I copied the pattern ofFullNodeComponents
->RpcNodeCore
used to simplify type definitions, introduced becauseFullNodeComponents
wasn't built from a base trait without trait bounds (and re-writing that would have been a too big change for the task). Here we have the opportunity to have a plain (trait unbound) super trait though since we're writing primitives from scratch.