Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the package feature configuration to make Optimism support toggleable rather than always enabled, improving modularity and reducing dependencies when OP features aren't needed.
- Made
opa feature flag that conditionally enables Optimism-related dependencies and features - Ensured
serdeandreth-codecfeatures are explicitly enabled where required for proper serialization support - Added conditional dependency on
reth-optimism-primitivesonly when theopfeature is enabled
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| "dep:reth-optimism-primitives", | ||
| "reth-primitives-traits/op", | ||
| "reth-db/op", | ||
| "reth-codecs/op", |
There was a problem hiding this comment.
The feature depends on reth-codecs/op but reth-codecs is only listed in [dev-dependencies], not in [dependencies]. This will cause a build error when the op feature is enabled in non-test builds.
Wiz Scan Summary
To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension. |
emhane
left a comment
There was a problem hiding this comment.
the 'op' feature should actually always be enabled for all optimism crates in order for the InMemorySize implementation to return the correct result. i also opened and issue to move this trait to alloy so that it can be implemented in op-alloy instead of in reth and thereby remove the need for the feature in reth cc @mattsse
|
we could have a toggle, but then it should be a default feature |
|
I think we can close this for now |
Make
opa toggleable feature instead and ensure thatserdeandreth-codecflags are enabled where needed.Depends on paradigmxyz#19005 upstream