zebra icon indicating copy to clipboard operation
zebra copied to clipboard

Remove duplicate `orchard` crates, change dependencies to `zcash/librustzcash`

Open teor2345 opened this issue 1 year ago • 4 comments

Motivation

We're currently compiling 3 different versions of the orchard crates into Zebra:

   Compiling halo2_gadgets v0.1.0                                                              
   Compiling halo2_gadgets v0.2.0                                                              
   Compiling orchard v0.1.0                                                                    
   Compiling orchard v0.2.0                                                                    
   Compiling zcash_primitives v0.6.0                                                                                                                                                           
   Compiling zcash_primitives v0.7.0                                                           
   Compiling zcash_primitives v0.7.0 (https://github.com/ZcashFoundation/librustzcash.git?rev=4567a37ceccbd506a58aaaded39ba14c952c1510#4567a37c)

Since we're having some trouble with slow syncs, we want to be using the latest version of halo2 in all our code.

Tasks

Change dependencies:

  • Change our ZcashFoundation/librustzcash dependency to zcash/librustzcash, either using the main branch, or a release after https://github.com/zcash/librustzcash/pull/459 got merged

Duplicate dependencies:

  • Use cargo tree to find how these duplicates are happening
  • Remove duplicates by fixing dependencies in Cargo.toml
  • Remove any exceptions for these crates in deny.toml

teor2345 avatar Jul 11 '22 02:07 teor2345

@conradoplg I think you were the last person to update these dependencies, did we deliberately allow duplicates?

teor2345 avatar Jul 11 '22 02:07 teor2345

This was blocked by zcashd dependencies being updated, but 5.1.0 was released 3 days ago, we can now update zcash_script and remove these

https://github.com/ZcashFoundation/zebra/blob/c4f89ed2e1942fe9c484d574f8a66df8e49953bb/deny.toml#L34-L38

The last one is caused by our zcash_proofs fork IIRC

conradoplg avatar Jul 11 '22 14:07 conradoplg

This was blocked by zcashd dependencies being updated, but 5.1.0 was released 3 days ago, we can now update zcash_script and remove these

https://github.com/ZcashFoundation/zebra/blob/c4f89ed2e1942fe9c484d574f8a66df8e49953bb/deny.toml#L34-L38

The last one is caused by our zcash_proofs fork IIRC

To make all our dependencies to use the zcash_proofs fork, we need to add the same git dependency to all our crates, and add it as a crates.io patch.

teor2345 avatar Jul 26 '22 04:07 teor2345

Our zcash_proofs fork got merged into librustzcash, so we can just use the zcash/* dependencies now: https://github.com/zcash/librustzcash/pull/459

teor2345 avatar Aug 05 '22 17:08 teor2345