Skip to content

Remove BLS12-381 from vendor and start to use tezos-rust-libs

Danny Willems requested to merge dannywillems-remove-bls-in-vendor into master

This MR is part of the meta issue #1101 (closed) (JavaScript version of Sapling). Please refer to it to see if it does not depend on other MR's first).

Depends also on a new release of dune (2.8.3) because this patch is required to install implementations of virtual packages in sandboxed opam. The CI will pass, but not local installation. Please see the dune milestone for updates about the release.

Also, blocked by the incompatibility of coq-of-ocaml with dune >= 2.8 as dune stopped generating .merlin files. (cc: @clarus1). @lthms is working on an update to OCaml 4.12, which requires to use dune 2.8 in particular and therefore forces coq-of-ocaml to be compatible with dune >= 2.8. Coq-of-ocaml has been updated and is now compatible with dune 2.8 and OCaml 4.10.

Context

From the release 8.1, Rust dependencies have been vendored in a OPAM repository called tezos-rust-libs. Also, a version of ocaml-bls12-381 (0.3.15) have been published in the public opam repository, making the one in vendor useless. Related to opam-repository!145 (merged).

Following discussions with @pirbo, it has been decided to go from bls12-381.0.3.15 to the latest release bls12-381.0.4.1. The new release uses the concept of virtual packages of dune. The OPAM package bls12-381 is a virtual package that can be used by libraries, like tezos-crypto. It does not contain any implementation for execution, only signatures. When an executable targets UNIX, bls12-381-unix must be added to reference the implementation. The last commit of this MR adds these bits to the dune files when required. When targeting JavaScript, bls12-381-js can be used (this is going to be used later).

About the small changes in the script installing the Sapling parameters, I would recommend to have a look at !2565 (closed) which moves the parameters in an OPAM package, getting rid of the script.

Manually testing the MR

  • Build locally (require to pin dune master, at least opam pin add dune git+https://github.com/ocaml/dune\#3d072830de1915ff2fd7b2df7bd86c4bcd0a3281)
  • CI must pass

Checklist

  • N/A Document the interface of any function added or modified (see the coding guidelines)
  • N/A Provide automatic testing (see the testing guide).
  • N/A Add item in the Development Version section of CHANGES.md (only for new features and bug fixes).

Reviewers

@pirbo

Edited by Danny Willems

Merge request reports