Improve joinsplit diagnostics
I don't advocate merging this for the hotfix release (to fix#1779) but this PR can be used to diagnose the real issue and should be merged ASAP afterward.
~I still need to add tests for `last()` and `element()` though.~ Done.
Issue #1851 shows that a zaddr->taddr can be rejected from mempools
due to not meeting fee requirements given the size of the transaction.
Fee calculation for joinsplit txs has not yet been agreed upon, so
during this interim period, this patch ensures joinsplit txs using
the default fee are not rejected due to an insufficient fee.
Process verification keys to perform online verification
Checking proofs involves some arithmetic with pairings using components of the proof and the verification key. If you already have some curve points, like those in the verification key, you can amortize the cost of some of the more expensive arithmetic.
This PR adopts libsnark's precomputation of G2 elements in the verification key.
We *currently* call `r1cs_ppzksnark_verifier_strong_IC`:
```c++
template<typename ppT>
bool r1cs_ppzksnark_verifier_strong_IC(const r1cs_ppzksnark_verification_key<ppT> &vk,
const r1cs_ppzksnark_primary_input<ppT> &primary_input,
const r1cs_ppzksnark_proof<ppT> &proof)
{
enter_block("Call to r1cs_ppzksnark_verifier_strong_IC");
r1cs_ppzksnark_processed_verification_key<ppT> pvk = r1cs_ppzksnark_verifier_process_vk<ppT>(vk);
bool result = r1cs_ppzksnark_online_verifier_strong_IC<ppT>(pvk, primary_input, proof);
leave_block("Call to r1cs_ppzksnark_verifier_strong_IC");
return result;
}
```
Notice that this merely performs precomputation of the verification key, and then calls `r1cs_ppzksnark_online_verifier_strong_IC`. This PR merely performs the precomputation during verification key initialization, and calls that function directly.
Closes#1833. Format currency amounts in z_sendmany error message.
Improve coverage of possible error states from z_sendmany.
Refactor qa test for z_sendmany operations.
Fixes#1779 so that sending to multiple zaddrs no longer fails.
Closes#1779
Commit 2eeb6b randomized the order of input and output notes,
but this is now known to prevent the chaining of multiple joinsplits
in a single transaction. The root cause has yet to be determined.
This patch is a temporary fix and disables the shuffling of input
and output notes. It also adds a chained joinsplit test to the
python qa test suite.
Commit 2eeb6b randomized the order of input and output notes,
but this is now known to prevent the chaining of multiple joinsplits
in a single transaction. The root cause has yet to be determined.
This patch is a temporary fix and disables the shuffling of input
and output notes. It also adds a chained joinsplit test to the
python qa test suite.
Running ./zcash-cli setgenerate false would result in a segfault.
The miner thread's boost::signals2::connection was not disconnected
when the miner thread was interrupted and shutdown. Subsequently, when
a new block arrived, the UpdateTip callback would still be invoked on
a now invalid object, resulting in a segfault.
Properly account for JoinSplit value when deciding if a transaction should be placed in a mined block.
Closes#1705.
The transaction selection logic in miner.cpp was not updated to account for JoinSplit value. This caused issues that include, but are not limited to, miners not including pure JoinSplit transactions in their blocks.