Fix assertion failure in circuit.merkle_tree_gadget_weirdness test on Windows
zcash-gtest.exe fails
```
[ RUN ] circuit.merkle_tree_gadget_weirdness
Assertion failed!
Program: C:\zcash-gtest.exe
File: ./snark/libsnark/gadgetlib1/gadgets/basic_gadgets.tcc, Line 50
Expression: this->pb.lc_val(packed).as_bigint().num_bits() <= bits.size()
```
The argument type of `__builtin_clzl()` function is unsigned long.
So, we need to replace `__builtin_clzl` with `__builtin_clzll`. (The argument type of `__builtin_clzll()` is unsigned long long (64bit)).
Refactor ContextualCheckBlock tests
This cleans up and condenses our quadratically-scaling transaction format / consensus rule tests. They still technically scale quadratically, but should be much more readable and manageable now - all that remains in the individual test cases is the specific version flag tweaking we're trying to test.
Closes#3187.
Use ZIP 32 for all Sapling spending keys
The wallet now only stores Sapling extended spending keys, and thus can
only be used with keys generated from an HDSeed via ZIP 32. This means
that all Sapling keys and addresses generated by users can be recovered
as long as they have a backup that includes the seed.
Depends on zcash/librustzcash#29
Closes#3380.
Sapling keys generated from the seed are not yet persisted, so we don't
want to persist the seed or chain state either, otherwise the wallet
could end up in an inconsistent state.
Some tests are temporarily disabled because commenting out HDSeed
persistence breaks invariants inside CCryptoKeyStore.
Revert this commit during the PR for #3388.
The wallet now only stores Sapling extended spending keys, and thus can
only be used with keys generated from an HDSeed via ZIP 32.
Note that not all Sapling keys in the wallet will correspond to the
wallet's HDSeed, as a standalone Sapling xsk can be imported via
z_importkey. However, it must have been generated from a seed itself,
and thus is more likely to be backed up elsewhere.
[ci-workers] Add support for MacOSX
Also alters the `unix.yml` script to install all Python modules in a virtualenv, and adds curl and cmake dependencies.
Closes#2469.
Initial cleanup. Reduces duplication of code, especially around
constructing transactions, resetting the activation heights, and setting
up the EXPECT calls for accepting and rejecting tests.
Also adds a bunch of comments explaining the test plan and what
particular parts of the test are doing.