-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: decouple deps and remove bls_dkg
-- Change 1: re-export blsttc, blst_ringct -- The idea is to give API consumers the option to use the exported crates without needing explicit Cargo.toml entries. This in turn decouples dependencies and reduces conflicts. See rationale/discussion here: rust-lang/api-guidelines#176 -- Change 2: use deps from within blsttc, blst_ringct -- blsttc and blst_ringct now reexport deps used in their public APIs. So we remove those deps from our Cargo.toml and 'use' the sub-deps in our code. One gross thing remains which is that both crates use rand and they could differ. (although at present they are the same.) This means that sn_dbc APIs that take Rng arg to be passed to blsttc API can potentially be different than those that take an Rng arg to be passed to blst_ringct API. Although the compiler presently let's us pass the same rng to both. It's a footgun! For now, I've created an 'rng' module to make it easy to pass the appropriate rng, and also I updated the test cases, example, bench to use this methodology, to demonstrate best practice. Perhaps/probably a better long-term approach would be to have blst_ringct integrate/depend/use blsttc, so that sn_dbc has only a single dep and is not trying to resolve the matter. -- Change 3: remove bls_dkg dependency/feature -- bls_dkg was only being used for a single function used by test cases. It was simple to replace this function with blsttc calls which simplifies things a lot. Cargo changes: * use publshed quickcheck 1.0.3 * use dan-da/blsttc/reexport_pr * remove rand, rand_core deps * remove xor_name dep * remove bls_dkg dep * remove dkg feature * remove blstrs dep * use single-line format for all deps. (more concise) lib.rs changes: * re-export blst_ringct and blsttc * export additional types used by builder module public API. * add rng module, to simplfy rng usage for callers. * modify bls_dkg_id() to use blsttc directly, without bls_dkg Code changes: * update mint-repl and reissue bench to use updated sn_dbc API. * update tests to separate ringct rng from blsttc rng. * update SimpleSigner From impl now that bls_dks is removed.
- Loading branch information
Showing
13 changed files
with
286 additions
and
242 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.