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

Rework OpEthApi type #9868

Closed
emhane opened this issue Jul 29, 2024 · 4 comments · Fixed by #9879
Closed

Rework OpEthApi type #9868

emhane opened this issue Jul 29, 2024 · 4 comments · Fixed by #9879
Labels
A-op-reth Related to Optimism and op-reth C-debt Refactor of code section that is hard to understand or maintain

Comments

@emhane
Copy link
Member

emhane commented Jul 29, 2024

Describe the feature

OpEthApi should wrap EthApiInner<...>, just like EthApi struct does, instead of the generic Eth. Calling Eth::some_trait_method in implementation of EthApiServer helper traits is bug prone, since any default trait method overrides for OpEthApi, won't be considered if called inside scope of Eth::some_trait_method.

Additional context

No response

@emhane emhane added C-debt Refactor of code section that is hard to understand or maintain A-op-reth Related to Optimism and op-reth labels Jul 29, 2024
@mvares
Copy link
Contributor

mvares commented Jul 29, 2024

@emhane, OpEthApi would need to add generics to all that implement it.

@emhane
Copy link
Member Author

emhane commented Jul 29, 2024

yeah that's right @mvares

@emhane
Copy link
Member Author

emhane commented Jul 29, 2024

for OP I can use FullNodeComponents though to unify the generics Provider, Pool, Evm, we just didn't make that change for EthApi because it would require a lot of work fixing existing tests

@mvares
Copy link
Contributor

mvares commented Jul 29, 2024

right… thanks for explanation

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 C-debt Refactor of code section that is hard to understand or maintain
Projects
Archived in project
2 participants