Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(rpc): move EthApi trait into own crate #8847

Closed
wants to merge 17 commits into from

Conversation

emhane
Copy link
Member

@emhane emhane commented Jun 14, 2024

Moves EthApi trait, and building-block traits, into own crate. This makes it possible to impl EthApiServer for a generic type that impl the building-block traits.

This way, small parts of the EthApiServer impl, can be customised, by overriding the default impl of any of the building-block traits.

@emhane emhane added C-debt Refactor of code section that is hard to understand or maintain A-rpc Related to the RPC implementation A-op-reth Related to Optimism and op-reth labels Jun 14, 2024
@emhane emhane marked this pull request as draft June 14, 2024 16:58
@emhane emhane changed the base branch from main to matt/scaffold-ethapi June 14, 2024 16:58
Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

supportive

I want to keep changes in other crates minimal and I think we can prevent this by doing re-exports from reth-rpc

@@ -1,6 +1,6 @@
use crate::primitives::U256;
use clap::Args;
use reth_rpc::eth::gas_oracle::GasPriceOracleConfig;
use reth_rpc_eth_api::GasPriceOracleConfig;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to avoid these changes, instead this should be re-exported from reth-rpc

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eth is the only reth-rpc module used in reth-node-core builder, hence why I went with updating the dep here

@emhane emhane marked this pull request as ready for review June 17, 2024 08:51
@emhane emhane requested a review from onbjerg as a code owner June 17, 2024 08:51
@emhane emhane force-pushed the emhane/move-ethapi branch from 27ae884 to c5f6c5a Compare June 17, 2024 11:07
@emhane emhane force-pushed the emhane/move-ethapi branch from 4c923b0 to 9ecf026 Compare June 17, 2024 11:55
@emhane emhane requested a review from mattsse June 17, 2024 12:16
@emhane
Copy link
Member Author

emhane commented Jun 27, 2024

incremental progress committed in #8887

@emhane emhane closed this Jun 27, 2024
@emhane emhane deleted the emhane/move-ethapi branch June 27, 2024 12:53
@emhane emhane restored the emhane/move-ethapi branch July 8, 2024 15:25
@emhane emhane deleted the emhane/move-ethapi branch August 24, 2024 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-op-reth Related to Optimism and op-reth A-rpc Related to the RPC implementation C-debt Refactor of code section that is hard to understand or maintain
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants