-
Notifications
You must be signed in to change notification settings - Fork 83
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
Use espresso-types without testing feature #2283
Conversation
In the sequencer repo we don't have a proper `Default` implentation but one that's gated behind the testing feature because it wouldn't actually work. Working on EspressoSystems/espresso-sequencer#2283 it seems that this is one of the pain points for removing the spread of the testing features in the sequencer crates. It looks like we don't need the trait bound anymore in the query service.
We would like to be able to use the types crate in other crates but currently it won't compile without the testing feature enabled. This PR fixes that. - Use `NullStateCatchup` instead of `MockStateCatchup` where we don't need catchup. - Feature gate `MockStateCatchup` behind testing in types crate. - Remove the unused `InstanceState` argument from `from_transactions_sync`.
- `testing` feature enables `testing` feature of types and utils crate. - Running tests enables `testing` feature of crate via dev-dependencies. This allows to run `cargo check` and `cargo check --tests` in the sequencer crate. Previously `cargo check` was broken without the `testing` feature enabled explicitly.
* Remove unused Default bound on InstanceState In the sequencer repo we don't have a proper `Default` implentation but one that's gated behind the testing feature because it wouldn't actually work. Working on EspressoSystems/espresso-sequencer#2283 it seems that this is one of the pain points for removing the spread of the testing features in the sequencer crates. It looks like we don't need the trait bound anymore in the query service. * CI: run on all pull requests
ff008fd
to
9d3b50b
Compare
The libp2p feature was always turned on and the code didn't compile without it. With this change all feature sets checked with `cargo hack check --each-feature` compile successfully.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@@ -488,15 +482,6 @@ pub async fn init_node<P: PersistenceOptions, V: Versions>( | |||
)) | |||
}; | |||
|
|||
// Wait for the CDN network to be ready if we're not using the P2P network |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rob-maron I removed this wait and think that should be fine because we always have the libp2p enabled. Let me know if you see an issue with this.
We would like to be able to use the types crate in other crates but currently it won't compile without the testing feature enabled. This PR fixes that.
NullStateCatchup
instead ofMockStateCatchup
where we don't need catchup.MockStateCatchup
behind testing in types crate.InstanceState
argument fromfrom_transactions_sync
.cargo hack
.After this change I can add the
types
crate as a dependency in a rust project without turning on thetesting
feature and runcargo check
successfully.Closes #1491