reth icon indicating copy to clipboard operation
reth copied to clipboard

chore(rpc): remove use of extensible transaction type

Open emhane opened this issue 7 months ago • 2 comments

Ref https://github.com/paradigmxyz/reth/issues/8780. Closes https://github.com/paradigmxyz/reth/issues/8988.

  • Removes optimism feature from reth-rpc-types-compat
  • Moves reth-rpc-types-compat type conversion into new traits TransactionBuilder and BlockBuilder. These are called many times during the program, hence are not used as trait objects.
  • Adds EthApiTypes::TransactionBuilder and EthApiTypes::BlockBuilder, instead of expecting each AT in alloy_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 to EthApiFilter, since some alloy types, have impls only on default type, like alloy_rpc_types_eth::FilterChanges<T = alloy_rpc_types_eth::Transaction> (extensive list not at hand, will make issue)

emhane avatar Jul 24 '24 16:07 emhane