Commit Graph

9999 Commits

Author SHA1 Message Date
zkbot 54218ea05c Auto merge of #1797 - ebfull:improve-joinsplit-diagnostics, r=bitcartel
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.
2016-11-16 01:06:37 +00:00
zkbot 6661d9da6d Auto merge of #1842 - arcalinea:1573_z_sendmany_error_documentation, r=bitcartel
Document z_sendmany error code messages in payment-api.md
2016-11-15 22:16:30 +00:00
Simon de38bfbbed Track the correct change witness across chained joinsplits 2016-11-15 12:39:16 -08:00
Jay Graber b82084fe44 Change format of z_sendmany error code documentation. 2016-11-15 12:33:12 -08:00
Simon 9ddb6ad028 Mempool will accept tx with joinsplits and the default z_sendmany fee.
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.
2016-11-15 11:32:59 -08:00
Sean Bowe 3e2e8b5b42 Add test that `last` and `element` will throw exception when the tree is blank. 2016-11-15 12:17:19 -07:00
Simon ba0625f25d Set default minrelaytxfee to 1000 zatoshis to match upstream.
A txout will be considered dust when it has a value <546 zatoshis.
Helps to address #1719.
2016-11-15 10:48:51 -08:00
zkbot 057ab6b4d1 Auto merge of #1760 - ebfull:vk-preprocess, r=bitcartel
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.
2016-11-15 14:56:22 +00:00
zkbot 4e4ca6d31b Auto merge of #1858 - str4d:1715-wallet-assertion, r=ebfull
Correctly integrate CNoteData::witnessHeight into wallet code

Closes #1715.
2016-11-15 11:16:13 +00:00
zkbot 4e72614fb0 Auto merge of #1847 - bitcartel:1680_rpckeepalive_deadlock, r=ebfull
Closes #1680, temporary fix for rpc deadlock inherited from upstream.
2016-11-15 10:25:24 +00:00
Simon f4404d7b5b Closes #1680, temporary fix for rpc deadlock inherited from upstream. 2016-11-15 00:31:24 -08:00
Jack Grigg a4ef3aa9b5
Clear witnessHeight and nWitnessCacheSize in ClearNoteWitnessCache 2016-11-15 17:53:41 +13:00
Jack Grigg ccfd8aae1d
Add code comments about CNoteData::witnessHeight 2016-11-15 16:42:22 +13:00
Jack Grigg 4a6a48479d
Copy over CNoteData::witnessHeight when updating wallet tx 2016-11-15 14:08:41 +13:00
Jack Grigg 40ef121e6a
Correctly set CNoteData::witnessHeight when decrementing witness caches
Closes #1715
2016-11-15 14:08:35 +13:00
Sean Bowe 78df9f0211 Process verification keys to perform online verification. 2016-11-14 10:24:07 -07:00
Sean Bowe 226a6b3248 Initialize after profiling messages are suppressed. 2016-11-14 10:19:46 -07:00
Sean Bowe d92bea9888 Add tests for witness `element` and tree `last` methods. Strengthen testing by inserting a different commitment into the tree at each step. 2016-11-14 10:13:06 -07:00
zkbot 28d635c8b7 Auto merge of #1838 - bitcartel:1833_z_sendmany_error_message_formatting, r=ebfull
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.
2016-11-13 03:05:30 +00:00
Jay Graber c246c1ea3c Replace bitcoin with zcash in rpcprotocol.cpp 2016-11-11 15:24:36 -08:00
Jay Graber 59ac34e344 s/Bitcoin/Zcash in JSONRPCError 2016-11-11 11:14:18 -08:00
Jay Graber d25e75c512 Document z_sendmany error code messages in payment-api.md 2016-11-10 21:24:43 -08:00
Simon 9384e74c50 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.
2016-11-10 16:57:36 -08:00
zkbot 3a0855e65a Auto merge of #1806 - str4d:1787-enable-tests-flag, r=ebfull
Add --disable-tests flag to zcutils/build.sh

Closes #1787
2016-11-09 17:33:56 +00:00
ayleph 48f9c65b55 Correct spelling error in z_sendmany error output
Change "alllowed" -> "allowed."
2016-11-08 13:13:48 -08:00
Sean Bowe 996fccf267 1.0.2 release. 2016-11-07 19:03:20 -07:00
Simon 3920292b43 Add transaction size and zaddr output limit checks to z_sendmany. 2016-11-07 09:29:56 -08:00
Jack Grigg 7a810efa08
Add --disable-tests flag to zcutils/build.sh
Closes #1787
2016-11-06 12:35:55 -08:00
zkbot fbc69d3d33 Auto merge of #1790 - bitcartel:1779_send_multiple_zaddrs_logic_error, r=bitcartel
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.
2016-11-06 05:20:45 +00:00
zkbot 2648902a11 Auto merge of #1778 - bitcartel:1762_segfault_miner, r=str4d
Fixes #1762 segfault when miner is interrupted.

Closes #1762
2016-11-05 22:22:22 +00:00
Simon 38276c6ba2 Add GenIdentity, an identity function for MappedShuffle.
We use this function in z_sendmany as part of the fix for #1779.
2016-11-05 14:17:19 -07:00
Sean Bowe 5f0a73ce11 Improve accuracy of constraint system violation diagnostics. 2016-11-05 11:27:23 -06:00
Sean Bowe b55744e1ad Regression test for constraint system violation. 2016-11-05 11:15:16 -06:00
Simon 7c463780cf Fixes #1779 so that sending to multiple zaddrs no longer fails.
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.
2016-11-04 23:23:48 -07:00
zkbot ce71cd0984 Auto merge of #1765 - ITH4Coinomia:patch-2, r=ebfull
Update init.cpp

Reformatted Text
2016-11-04 18:19:54 +00:00
zkbot 3b8f74abb2 Auto merge of #1763 - ITH4Coinomia:patch-1, r=ebfull
Update security-warnings.md

Linked Bitcoin URL
2016-11-04 17:40:09 +00:00
zkbot c73122db7b Auto merge of #1399 - ebfull:write-r1cs, r=ebfull
Write R1CS output to file in GenerateParams.

Not urgent. This is how the constraint system is communicated to the MPC.
2016-11-04 16:57:43 +00:00
S. Matthew English de9ca8e9a4 enforcing consistency 'tor' to 'Tor'
There was only one instance of 'tor', changed it to 'Tor' to better reflect all other references
2016-11-04 13:11:33 +01:00
Simon 5e9b555fed Fixes #1762 segfault when miner is interrupted.
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.
2016-11-03 21:53:56 -07:00
Sean Bowe eb2e2b7043 1.0.1 release. 2016-11-03 22:26:15 -06:00
zkbot 9752e57739 Auto merge of #1772 - str4d:temporary-gtest-bug-workaround, r=ebfull
Temporary gtest bug workaround

Replaces the previous partial fix from #1771 with a temporary workaround that prevents all issues.
2016-11-03 23:19:51 +00:00
Jack Grigg b7f3640dda
Change execution order of gtests to avoid bug
This is only a workaround; we still need to isolate and fix the root cause.
2016-11-03 18:09:34 -05:00
Jack Grigg d873bd1d58
Revert "Initialise walletdb system in a temp dir for all gtests"
This reverts commit 74372eaa4c.
2016-11-03 18:04:28 -05:00
zkbot 231d2ccaf9 Auto merge of #1759 - ageis:more-fetch-params-stuff, r=ebfull
Improves usability of fetch-params.sh

Remove the lockfile at the end (fixes #1731)
Makes it clearer what happens in the script output if params already exist.
2016-11-03 21:44:23 +00:00
Jack Grigg 74372eaa4c
Initialise walletdb system in a temp dir for all gtests 2016-11-03 15:42:44 -05:00
zkbot a2d8669f84 Auto merge of #1758 - str4d:1728-install-and-dist-scripts, r=str4d
Add build scripts and fetch-params.sh to "make install" and "make dist"

Closes #1728
2016-11-03 17:07:33 +00:00
zkbot 11c9be9eff Auto merge of #1735 - str4d:metrics-screen-improvements, r=str4d
Metrics screen improvements

Closes #1656, #1685, #1688 and #1716
2016-11-03 14:55:04 +00:00
ITH4Coinomia df22af008d Update init.cpp
Reformatted Text
2016-11-03 18:34:12 +05:30
ITH4Coinomia c6ad4f2245 Update security-warnings.md
Linked Bitcoin URL
2016-11-03 16:51:41 +05:30
zkbot 9eb852edd0 Auto merge of #1718 - ebfull:valid-fee-selection, r=nathan-at-least
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.
2016-11-03 04:38:54 +00:00