ZcashFoundation / zebra

Zcash - Financial Privacy in Rust 🦓
https://zfnd.org/zebra/
Apache License 2.0
404 stars 96 forks source link

Fix the `zebra_scan` crate to work with the last ECC dependencies #8809

Open oxarbitrage opened 2 weeks ago

oxarbitrage commented 2 weeks ago

In https://github.com/ZcashFoundation/zebra/pull/8810 we upgraded the ECC dependencies to the last version, for Nu6. However, we had to make an exception for the zebra-scan crate due to the following building error:

error[E0308]: `?` operator has incompatible types
   --> zebra-scan/src/service/scan_task/scan.rs:552:35
    |
552 |       UnifiedFullViewingKey::parse(&Ufvk::try_from_items(vec![Fvk::try_from((
    |  ___________________________________^
553 | |         2,
554 | |         &dfvk.to_bytes()[..],
555 | |     ))?])?)
    | |__________^ expected `zcash_address::kind::unified::fvk::Ufvk`, found `Ufvk`
    |
    = note: `?` operator cannot convert from `Ufvk` to `zcash_address::kind::unified::fvk::Ufvk`
    = note: `Ufvk` and `zcash_address::kind::unified::fvk::Ufvk` have similar names, but are actually distinct types
note: `Ufvk` is defined in crate `zcash_address`
   --> /home/alfredo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/zcash_address-0.5.0/src/kind/unified/fvk.rs:106:1
    |
106 | pub struct Ufvk(pub(crate) Vec<Fvk>);
    | ^^^^^^^^^^^^^^^
note: `zcash_address::kind::unified::fvk::Ufvk` is defined in crate `zcash_address`
   --> /home/alfredo/.cargo/git/checkouts/librustzcash-0a74bd38a00f78b0/a1047ad/components/zcash_address/src/kind/unified/fvk.rs:106:1
    |
106 | pub struct Ufvk(pub(crate) Vec<Fvk>);
    | ^^^^^^^^^^^^^^^
    = note: perhaps two different versions of crate `zcash_address` are being used?
oxarbitrage commented 2 weeks ago

Additionally, when we fix this, make sure the last 3 warnings are gone:

#18 0.201 warning: /zebra-utils/Cargo.toml: version requirement `0.9.34+deprecated` for dependency `serde_yaml` includes semver metadata which will be ignored, removing the metadata is recommended to avoid confusion
#18 0.201 warning: /zebra-scan/Cargo.toml: unused manifest key: dependencies.zcash_address.commit
#18 0.201 warning: /zebra-scan/Cargo.toml: unused manifest key: dependencies.zcash_client_backend.commit
#18 0.201 warning: /zebra-scan/Cargo.toml: unused manifest key: dependencies.zcash_primitives.commit