Refactor query service types into their own crate#4169
Conversation
Moves query service type definitions into their own crate, which becomes a lighter-weight dependency for downstream crates that want to use the query service but not import the full server backend. In particular, this allows the `light-client` crate to not import `hotshot-query-service`, which in turn will allow (in a future PR) `hotshot-query-service` to import the light client, which it can use to implement a better fetching provider which retrieves and verifies data from a peer.
|
Claude finished @jbearer's task in 3m 42s —— View job Code Review: Refactor query service types into their own crate
SummaryThis is a clean, well-executed crate extraction. The What looks good
Observations1. Workspace The diff reformats many existing dependency lines (wrapping long feature arrays into multi-line format). This is fine style-wise but adds ~60 lines of noise to the diff. Not blocking, just noting it makes the actual changes slightly harder to spot in review. 2. Redundant In pub use hotshot_query_service_types::availability::Error;But line 50 does 3. The new crate defaults to enabling the VerdictThis is a well-structured refactoring PR. No bugs, no security concerns, no correctness issues found. The type extraction is complete and the backward compatibility layer is solid. Looks good to merge. |
There was a problem hiding this comment.
Code Review
This pull request introduces a new crate, hotshot-query-service-types, to house shared type definitions previously located within the hotshot-query-service crate. This refactoring allows client crates, such as light-client, to depend on these types without pulling in the full server-side logic and dependencies of the query service. I have no feedback to provide as the changes are purely structural and improve dependency management.
…t-query-service-types, allowing light-client to import espresso-types without cyclic dependency
This PR:
Moves query service type definitions into their own crate, which becomes a lighter-weight dependency for downstream crates that want to use the query service but not import the full server backend.
In particular, this allows the
light-clientcrate to not importhotshot-query-service, which in turn will allow (in a future PR)hotshot-query-serviceto import the light client, which it can use to implement a better fetching provider which retrieves and verifies data from a peer.