reth
reth copied to clipboard
chore(rpc): remove use of extensible transaction type
Ref https://github.com/paradigmxyz/reth/issues/8780. Closes https://github.com/paradigmxyz/reth/issues/8988.
- Removes
optimism
feature fromreth-rpc-types-compat
- Moves
reth-rpc-types-compat
type conversion into new traitsTransactionBuilder
andBlockBuilder
. These are called many times during the program, hence are not used as trait objects. - Adds
EthApiTypes::TransactionBuilder
andEthApiTypes::BlockBuilder
, instead of expecting each AT inalloy_network::Network
to provide its own builder, allowing different networks to use same transaction type but with different builder. This is for example relevant when a field in the type is set based on transaction type, which may vary for different networks. - Adds trait bound
EthApiTypes::NetworkTypes: Network<TransactionResponse = alloy_rpc_types_eth::Transaction>
across node builder down toEthApiFilter
, since some alloy types, have impls only on default type, likealloy_rpc_types_eth::FilterChanges<T = alloy_rpc_types_eth::Transaction>
(extensive list not at hand, will make issue)