Closed idky137 closed 1 month ago
This is an outline of an attempt at upgrading the zingolib and librustzcash deps in zaino, and errors encountered along the way.
subtle
.
... required by package zcash_client_backend v0.13.0 (https://github.com/zingolabs/librustzcash.git?tag=zcash_client_sqlite-0.11.2_plus_zingolabs_changes-1-g7ad60b5d5-2-g121371a08#121371a0)
... which satisfies git dependency zcash_client_backend
of package zingolib v0.2.0 (https://github.com/zingolabs/zingolib.git?tag=zaino_dep_001#b34f0b53)
... which satisfies git dependency zingolib
of package zaino-testutils v0.1.0 (/home/idky137/src/zingo-indexer/zaino-testutils)
... which satisfies path dependency zaino-testutils
(locked to 0.1.0) of package integration-tests v0.1.0 (/home/idky137/src/zingo-indexer/integration-tests)
versions that meet the requirements ^2.2.3
(locked to 2.4.1) are: 2.4.1all possible versions conflict with previously selected packages.
previously selected package subtle v2.5.0
... which satisfies dependency subtle = "~2.5.0"
of package zingolib v0.2.0 (https://github.com/zingolabs/zingolib.git?tag=zaino_dep_001#b34f0b53)
... which satisfies git dependency zingolib
of package zaino-testutils v0.1.0 (/home/idky137/src/zingo-indexer/zaino-testutils)
... which satisfies path dependency zaino-testutils
(locked to 0.1.0) of package integration-tests v0.1.0 (/home/idky137/src/zingo-indexer/integration-tests)
failed to select a version for subtle
which could resolve this conflict
subtle
.
... required by package crypto-mac v0.11.1
... which satisfies dependency crypto-mac = "^0.11"
(locked to 0.11.1) of package hmac v0.11.0
... which satisfies dependency hmac = "^0.11.0"
(locked to 0.11.0) of package sphinx-packet v0.1.0
... which satisfies dependency sphinx-packet = "^0.1.0"
(locked to 0.1.0) of package nym-sphinx-types v0.2.0 (https://github.com/nymtech/nym?branch=master#00d47958)
... which satisfies git dependency nym-sphinx-types
(locked to 0.2.0) of package nym-sphinx-anonymous-replies v0.1.0 (https://github.com/nymtech/nym?branch=master#00d47958)
... which satisfies git dependency nym-sphinx-anonymous-replies
(locked to 0.1.0) of package zaino-serve v0.1.0 (/home/idky137/src/zingo-indexer/zaino-serve)
... which satisfies path dependency zaino-serve
(locked to 0.1.0) of package zainod v0.1.0 (/home/idky137/src/zingo-indexer/zainod)
... which satisfies path dependency zainod
(locked to 0.1.0) of package zaino-testutils v0.1.0 (/home/idky137/src/zingo-indexer/zaino-testutils)
... which satisfies path dependency zaino-testutils
(locked to 0.1.0) of package integration-tests v0.1.0 (/home/idky137/src/zingo-indexer/integration-tests)
versions that meet the requirements =2.4
are: 2.4.1, 2.4.0all possible versions conflict with previously selected packages.
previously selected package subtle v2.5.0
... which satisfies dependency subtle = "~2.5.0"
of package zingolib v0.2.0 (https://github.com/zingolabs/zingolib.git?tag=zaino_dep_001#b34f0b53)
... which satisfies git dependency zingolib
of package zaino-testutils v0.1.0 (/home/idky137/src/zingo-indexer/zaino-testutils)
... which satisfies path dependency zaino-testutils
(locked to 0.1.0) of package integration-tests v0.1.0 (/home/idky137/src/zingo-indexer/integration-tests)
failed to select a version for subtle
which could resolve this conflict
subtle
.
... required by package crypto-mac v0.11.1
... which satisfies dependency crypto-mac = "^0.11"
(locked to 0.11.1) of package hmac v0.11.0
... which satisfies dependency hmac = "^0.11.0"
(locked to 0.11.0) of package sphinx-packet v0.1.0
... which satisfies dependency sphinx-packet = "^0.1.0"
(locked to 0.1.0) of package nym-sphinx-types v0.2.0 (https://github.com/nymtech/nym?branch=master#00d47958)
... which satisfies git dependency nym-sphinx-types
(locked to 0.2.0) of package nym-sphinx-anonymous-replies v0.1.0 (https://github.com/nymtech/nym?branch=master#00d47958)
... which satisfies git dependency nym-sphinx-anonymous-replies
(locked to 0.1.0) of package zaino-serve v0.1.0 (/home/idky137/src/zingo-indexer/zaino-serve)
... which satisfies path dependency zaino-serve
(locked to 0.1.0) of package zainod v0.1.0 (/home/idky137/src/zingo-indexer/zainod)
... which satisfies path dependency zainod
(locked to 0.1.0) of package zaino-testutils v0.1.0 (/home/idky137/src/zingo-indexer/zaino-testutils)
... which satisfies path dependency zaino-testutils
(locked to 0.1.0) of package integration-tests v0.1.0 (/home/idky137/src/zingo-indexer/integration-tests)
versions that meet the requirements =2.4
are: 2.4.1, 2.4.0all possible versions conflict with previously selected packages.
previously selected package subtle v2.5.0
... which satisfies dependency subtle = "~2.5.0"
of package zingolib v0.2.0 (https://github.com/zingolabs/zingolib.git?tag=zaino_dep_001#b34f0b53)
... which satisfies git dependency zingolib
of package zaino-testutils v0.1.0 (/home/idky137/src/zingo-indexer/zaino-testutils)
... which satisfies path dependency zaino-testutils
(locked to 0.1.0) of package integration-tests v0.1.0 (/home/idky137/src/zingo-indexer/integration-tests)
failed to select a version for subtle
which could resolve this conflict
zeroize
.
... required by package rustls v0.23.0
... which satisfies dependency rustls = "^0.23"
of package tokio-rustls v0.26.0
... which satisfies dependency tokio-rustls = "^0.26"
of package tonic v0.12.3
... which satisfies dependency tonic = "^0.12.2"
of package zingolib v0.2.0 (https://github.com/zingolabs/zingolib.git?tag=zaino_dep_001#b34f0b53)
... which satisfies git dependency zingolib
of package zaino-testutils v0.1.0 (/home/idky137/src/zingo-indexer/zaino-testutils)
... which satisfies path dependency zaino-testutils
of package integration-tests v0.1.0 (/home/idky137/src/zingo-indexer/integration-tests)
versions that meet the requirements ^1.7
are: 1.8.1, 1.7.0all possible versions conflict with previously selected packages.
previously selected package zeroize v1.6.0
... which satisfies dependency zeroize = "^1.2"
of package bip0039 v0.11.0
... which satisfies dependency bip0039 = "^0.11"
of package zingolib v0.2.0 (https://github.com/zingolabs/zingolib.git?tag=zaino_dep_001#b34f0b53)
... which satisfies git dependency zingolib
of package zaino-testutils v0.1.0 (/home/idky137/src/zingo-indexer/zaino-testutils)
... which satisfies path dependency zaino-testutils
of package integration-tests v0.1.0 (/home/idky137/src/zingo-indexer/integration-tests)
failed to select a version for zeroize
which could resolve this conflicti
2.2 Restricted bip0039 dep:
2.3 Downgraded subtle dep:
2.4 Downgrade rustls dep:
hyper-rustls = { version = "0.27", features = ["http2"] }
hyper-rustls = { version = "0.24", features = ["http2"] }
tokio-rustls = "0.26"
tokio-rustls = "0.24"
rustls = { version = "0.23.13", features = ["ring"] }
rustls = { version = "0.21.0" } #, features = ["ring"] }
2.5 Downgrade tonic dep:
tonic = {version = "0.12.2", features = ["tls", "tls-roots", "tls-webpki-roots"]}
tonic = {version = "0.10.0", features = ["tls", "tls-roots", "tls-webpki-roots"]}
cargo build:
error[E0433]: failed to resolve: could not find transport in tonic
--> /home/idky137/.cargo/git/checkouts/librustzcash-2a71d81ac8756eb7/121371a/zcash_client_backend/src/proto/service.rs:270:41 |
270 | impl CompactTxStreamerClient |
^^^^^^^^^ could not find transport in tonic |
---|
note: found an item that was configured out --> /home/idky137/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tonic-0.12.2/src/lib.rs:110:9 | 110 | pub mod transport; | ^^^^^^^^^ note: the item is gated here --> /home/idky137/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tonic-0.12.2/src/lib.rs:109:1 |
---|---|---|---|
109 | #[cfg(any(feature = "server", feature = "channel"))] | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
error[E0433]: failed to resolve: could not find transport in tonic
--> /home/idky137/.cargo/git/checkouts/librustzcash-2a71d81ac8756eb7/121371a/zcash_client_backend/src/proto/service.rs:274:31 |
274 | D: TryInto |
^^^^^^^^^ could not find transport in tonic |
---|
note: found an item that was configured out --> /home/idky137/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tonic-0.12.2/src/lib.rs:110:9 | 110 | pub mod transport; | ^^^^^^^^^ note: the item is gated here --> /home/idky137/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tonic-0.12.2/src/lib.rs:109:1 |
---|---|---|---|
109 | #[cfg(any(feature = "server", feature = "channel"))] | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
error[E0433]: failed to resolve: could not find transport in tonic
--> /home/idky137/.cargo/git/checkouts/librustzcash-2a71d81ac8756eb7/121371a/zcash_client_backend/src/proto/service.rs:272:64 |
272 | pub async fn connect |
^^^^^^^^^ could not find transport in tonic |
---|
note: found an item that was configured out --> /home/idky137/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tonic-0.12.2/src/lib.rs:110:9 | 110 | pub mod transport; | ^^^^^^^^^ note: the item is gated here --> /home/idky137/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tonic-0.12.2/src/lib.rs:109:1 |
---|---|---|---|
109 | #[cfg(any(feature = "server", feature = "channel"))] | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
error[E0433]: failed to resolve: could not find transport in tonic
--> /home/idky137/.cargo/git/checkouts/librustzcash-2a71d81ac8756eb7/121371a/zcash_client_backend/src/proto/service.rs:277:31 |
277 | let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; | ^^^^^^^^^ could not find transport in tonic |
---|
note: found an item that was configured out --> /home/idky137/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tonic-0.12.2/src/lib.rs:110:9 | 110 | pub mod transport; | ^^^^^^^^^ note: the item is gated here --> /home/idky137/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tonic-0.12.2/src/lib.rs:109:1 |
---|---|---|---|
109 | #[cfg(any(feature = "server", feature = "channel"))] | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
For more information about this error, try rustc --explain E0433
.
error: could not compile zcash_client_backend
(lib) due to 4 previous errors
2.6 downgrade tonic-build:
tonic-build = "0.12"
tonic-build = "0.10"
cargo build:
Compiling zingo-memo v0.1.0 (/home/idky137/src/zingolib/zingo-memo)
error[E0432]: unresolved import tokio_rustls::rustls::pki_types
--> zingo-netutils/src/lib.rs:14:27
|
14 | use tokio_rustls::rustls::pki_types::{Der, TrustAnchor};
| ^^^^^^^^^ could not find pki_types
in rustls
error[E0599]: no method named extend found for struct RootCertStore in the current scope
--> zingo-netutils/src/lib.rs:98:28 |
98 | root_store.extend(webpki_roots::TLS_SERVER_ROOTS.0.iter().map( | anchor_ref | { | -----------^^^^^^ method not found in RootCertStore |
---|
help: one of the expressions' fields has a method of the same name | 98 | root_store.roots.extend(webpki_roots::TLS_SERVER_ROOTS.0.iter().map(|anchor_ref| { | ++++++
error[E0599]: no method named with_root_certificates found for struct ConfigBuilder<ClientConfig, WantsCipherSuites> in the current scope
--> zingo-netutils/src/lib.rs:110:22 |
109 | let config = ClientConfig::builder() | __- 110 | .with_root_certificates(root_store) | -^^^^^^^^^^^^^^^^^^^^^^ method not found in ConfigBuilder<ClientConfig, WantsCipherSuites> |
_____ | |||
---|---|---|---|---|---|---|---|---|---|
= note: the method was found for
- `ConfigBuilder<ClientConfig, WantsVerifier>`
error[E0277]: the trait bound HttpsConnector<HttpConnector>: hyper_util::client::legacy::connect::Connect is not satisfied
--> zingo-netutils/src/lib.rs:124:52 |
124 | let client = client_from_connector(connector, false); | --------------------- ^^^^^^^^^ the trait tower::Service<http::Uri> is not implemented for HttpsConnector<HttpConnector> , which is required by `HttpsConnector |
---|---|---|---|
required by a bound introduced by this call | |||
= help: the trait `tower::Service<tonic::transport::Uri>` is implemented for `HttpsConnector<T>`
= note: required for `HttpsConnector<HttpConnector>` to implement `hyper_util::client::legacy::connect::Connect`
note: required by a bound in client_from_connector
--> zingo-netutils/src/lib.rs:46:12
|
44 | pub fn client_from_connector<C, B>(connector: C, http2_only: bool) -> Box<Client<C, B>>
| --------------------- required by a bound in this function
45 | where
46 | C: Connect + Clone,
| ^^^^^^^ required by this bound in client_from_connector
error[E0599]: the method boxed_clone exists for struct MapRequest<Box<Client<HttpsConnector<HttpConnector>, _>>, {closure@lib.rs:127:34}> , but its trait bounds were not satisfied
--> zingo-netutils/src/lib.rs:147:53 |
147 | Ok(CompactTxStreamerClient::new(svc.boxed_clone())) | ^^^^^^^^^^^ method cannot be called due to unsatisfied trait bounds |
---|
::: /home/idky137/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tower-0.4.13/src/util/map_request.rs:10:1 | 10 | pub struct MapRequest<S, F> { | --------------------------- doesn't satisfy _: Service<_> or _: ServiceExt<_> |
---|
= note: the following trait bounds were not satisfied:
`MapRequest<Box<hyper_util::client::legacy::Client<HttpsConnector<HttpConnector>, _>>, {closure@zingo-netutils/src/lib.rs:127:34: 127:89}>: tower::Service<_>`
which is required by `MapRequest<Box<hyper_util::client::legacy::Client<HttpsConnector<HttpConnector>, _>>, {closure@zingo-netutils/src/lib.rs:127:34: 127:89}>: ServiceExt<_>`
`&MapRequest<Box<hyper_util::client::legacy::Client<HttpsConnector<HttpConnector>, _>>, {closure@zingo-netutils/src/lib.rs:127:34: 127:89}>: tower::Service<_>`
which is required by `&MapRequest<Box<hyper_util::client::legacy::Client<HttpsConnector<HttpConnector>, _>>, {closure@zingo-netutils/src/lib.rs:127:34: 127:89}>: ServiceExt<_>`
`&mut MapRequest<Box<hyper_util::client::legacy::Client<HttpsConnector<HttpConnector>, _>>, {closure@zingo-netutils/src/lib.rs:127:34: 127:89}>: tower::Service<_>`
which is required by `&mut MapRequest<Box<hyper_util::client::legacy::Client<HttpsConnector<HttpConnector>, _>>, {closure@zingo-netutils/src/lib.rs:127:34: 127:89}>: ServiceExt<_>`
error[E0599]: the method boxed_clone exists for struct MapRequest<Box<Client<HttpConnector, _>>, {closure@lib.rs:153:34}> , but its trait bounds were not satisfied
--> zingo-netutils/src/lib.rs:173:53 |
173 | Ok(CompactTxStreamerClient::new(svc.boxed_clone())) | ^^^^^^^^^^^ method cannot be called due to unsatisfied trait bounds |
---|
::: /home/idky137/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tower-0.4.13/src/util/map_request.rs:10:1 | 10 | pub struct MapRequest<S, F> { | --------------------------- doesn't satisfy _: Service<_> or _: ServiceExt<_> |
---|
= note: the following trait bounds were not satisfied:
`MapRequest<Box<hyper_util::client::legacy::Client<HttpConnector, _>>, {closure@zingo-netutils/src/lib.rs:153:34: 153:89}>: tower::Service<_>`
which is required by `MapRequest<Box<hyper_util::client::legacy::Client<HttpConnector, _>>, {closure@zingo-netutils/src/lib.rs:153:34: 153:89}>: ServiceExt<_>`
`&MapRequest<Box<hyper_util::client::legacy::Client<HttpConnector, _>>, {closure@zingo-netutils/src/lib.rs:153:34: 153:89}>: tower::Service<_>`
which is required by `&MapRequest<Box<hyper_util::client::legacy::Client<HttpConnector, _>>, {closure@zingo-netutils/src/lib.rs:153:34: 153:89}>: ServiceExt<_>`
`&mut MapRequest<Box<hyper_util::client::legacy::Client<HttpConnector, _>>, {closure@zingo-netutils/src/lib.rs:153:34: 153:89}>: tower::Service<_>`
which is required by `&mut MapRequest<Box<hyper_util::client::legacy::Client<HttpConnector, _>>, {closure@zingo-netutils/src/lib.rs:153:34: 153:89}>: ServiceExt<_>`
warning: unused import: tower::ServiceExt
--> zingo-netutils/src/lib.rs:18:5 |
18 | use tower::ServiceExt; | ^^^^^^^^^^^^^^^^^ |
---|
= note: #[warn(unused_imports)]
on by default
Some errors have detailed explanations: E0277, E0432, E0599.
For more information about an error, try rustc --explain E0277
.
warning: zingo-netutils
(lib) generated 1 warning
error: could not compile zingo-netutils
(lib) due to 6 previous errors; 1 warning emitted
warning: build failed, waiting for other jobs to finish...
tonic-build = { version = "0.12", default-features = false }
tonic-build = { version = "0.10", default-features = false }
cargo build:
error: could not compile zcash_client_backend
(lib) due to 300 previous errors...
...
error[E0599]: no associated item named GRPC_STATUS found for struct Status in the current scope
--> /home/idky137/.cargo/git/checkouts/librustzcash-2a71d81ac8756eb7/121371a/zcash_client_backend/src/proto/service.rs:2075:48 |
2075 | ... tonic::Status::GRPC_STATUS, | ^^^^^^^^^^^ associated item not found in Status |
---|
note: if you're trying to build a new Status
consider using one of the following associated functions:
Status::new
Status::ok
Status::cancelled
Status::unknown
and 22 others
--> /home/idky137/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tonic-0.12.2/src/status.rs:162:5
|
162 | pub fn new(code: Code, message: impl Into
For more information about this error, try rustc --explain E0599
.
error: could not compile zcash_client_backend
(lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
https://github.com/idky137/zingolib.git
Updating git repository https://github.com/nymtech/nym
Updating git repository https://github.com/idky137/librustzcash.git
Updating git repository https://github.com/zancas/append-only-vec.git
Updating git repository https://github.com/zingolabs/librustzcash.git
Updating git repository https://github.com/jstuczyn/bls12_381
Updating git repository https://github.com/cosmos/cosmos-rust
error: failed to select a version for reqwest
.
... required by package nym-validator-client v0.1.0 (https://github.com/nymtech/nym?branch=master#c3ec970a)
... which satisfies git dependency nym-validator-client
of package nym-sdk v0.1.0 (https://github.com/nymtech/nym?branch=master#c3ec970a)
... which satisfies git dependency nym-sdk
of package zaino-serve v0.1.0 (/home/idky137/src/zingo-indexer/zaino-serve)
... which satisfies path dependency zaino-serve
of package zainod v0.1.0 (/home/idky137/src/zingo-indexer/zainod)
... which satisfies path dependency zainod
of package zaino-testutils v0.1.0 (/home/idky137/src/zingo-indexer/zaino-testutils)
... which satisfies path dependency zaino-testutils
of package integration-tests v0.1.0 (/home/idky137/src/zingo-indexer/integration-tests)
versions that meet the requirements ^0.12.4
are: 0.12.8, 0.12.7, 0.12.6, 0.12.5, 0.12.4all possible versions conflict with previously selected packages.
previously selected package zaino-testutils v0.1.0 (/home/idky137/src/zingo-indexer/zaino-testutils)
... which satisfies path dependency zaino-testutils
of package integration-tests v0.1.0 (/home/idky137/src/zingo-indexer/integration-tests)
previously selected package reqwest v0.12.4
... which satisfies dependency reqwest = "^0.12.4"
of package nym-socks5-client-core v0.1.0 (https://github.com/nymtech/nym?branch=master#c3ec970a)
... which satisfies git dependency nym-socks5-client-core
of package nym-sdk v0.1.0 (https://github.com/nymtech/nym?branch=master#c3ec970a)
... which satisfies git dependency nym-sdk
of package zaino-serve v0.1.0 (/home/idky137/src/zingo-indexer/zaino-serve)
... which satisfies path dependency zaino-serve
of package zainod v0.1.0 (/home/idky137/src/zingo-indexer/zainod)
... which satisfies path dependency zainod
of package zaino-testutils v0.1.0 (/home/idky137/src/zingo-indexer/zaino-testutils)
... which satisfies path dependency zaino-testutils
of package integration-tests v0.1.0 (/home/idky137/src/zingo-indexer/integration-tests)
failed to select a version for reqwest
which could resolve this conflict
NOTE: Im fairly certain (through other investigations) that this goes back to the coswasm-std dep in nym's code.
This is currently not possible as nym has a pinned library. to stop the Zaino project being held up we are temporarily removing the nym code and will re-introduce it once this conflict has been resolved.
Zaino-testutils needs to be updated for ZIP317 and ZIP320 before integration is possible. The biggest issue is dealing with dependency conflicts between sub-dependencies in zingolib, librustzcash and the nym-sdk. One option would be to remove all nym code but this should be avoided is possible as it will require work now and add considerably more work later.