Commit Graph

703 Commits

Author SHA1 Message Date
Philip Kaufmann db954a65ac
use const references where appropriate 2017-03-03 10:57:05 -08:00
Jack Grigg f42cde3c30
Remove reference to -reindex-chainstate
Revert this when bitcoin/bitcoin#7917 is merged.
2017-02-23 12:42:28 +00:00
Pieter Wuille 5d66d0a11e
Do not ask a UI question from bitcoind 2017-02-23 12:40:45 +00:00
zkbot 93baaeee3e Auto merge of #2081 - daira:1955-single-address-mining, r=bitcartel
Address @str4d's comment on #1965 about the case where -gen is not set

https://github.com/zcash/zcash/pull/1965#discussion_r100414069

Note that the case of calling the ``setgenerate true`` RPC with the wallet disabled was already handled correctly.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-02-10 08:58:19 +00:00
Daira Hopwood 3df7c4c8c0 Address @str4d's comment about the case where -gen is not set.
Also avoid shadowing mineToLocalWallet variable.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-02-10 00:15:12 +00:00
Jack Grigg b8eb37757b
Require -experimentalmode for wallet encryption 2017-02-09 22:10:58 +00:00
Jack Grigg 1f015f6afa
Add a flag for enabling experimental features 2017-02-09 22:10:58 +00:00
zkbot 0c78782662 Auto merge of #1965 - str4d:1955-single-address-mining, r=bitcartel
Switch miner to P2PKH, add -mineraddress option

Closes #945 and #1955.
2017-02-09 20:58:00 +00:00
zkbot 253c610783 Auto merge of #2050 - str4d:2020-zmq, r=bitcartel
Add ZeroMQ notifications

Cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#6103
- bitcoin/bitcoin#6684
- bitcoin/bitcoin#6686
- bitcoin/bitcoin#6736
- bitcoin/bitcoin#6739
- bitcoin/bitcoin#6743
- bitcoin/bitcoin#6768
- bitcoin/bitcoin#6779
- bitcoin/bitcoin#6810
- bitcoin/bitcoin#6927
- bitcoin/bitcoin#6980 (only upgrading zeromq)
- bitcoin/bitcoin#6680
- bitcoin/bitcoin#7058
- bitcoin/bitcoin#7621
- bitcoin/bitcoin#7335 (only parts affecting `zmq_test.py`)
- bitcoin/bitcoin#7853 (only parts affecting `zmq_test.py`)
- bitcoin/bitcoin#7762
- bitcoin/bitcoin#7993 (only upgrading zeromq)
- bitcoin/bitcoin#8238
- bitcoin/bitcoin#8701
- bitcoin/bitcoin#6685

Closes #2020.
2017-02-09 20:08:15 +00:00
Daira Hopwood 9bba9b37c8 Better error reporting for the !ENABLE_WALLET && ENABLE_MINING case.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-02-09 19:31:47 +00:00
zkbot 80a32b2845 Auto merge of #1863 - str4d:1795-config-flag-disable-miner, r=bitcartel
Add compile flag to disable compilation of mining code

Closes #1795
2017-02-09 17:43:43 +00:00
Jack Grigg f49bcdf92b
Add -minetolocalwallet flag, enforced on -mineraddress 2017-02-08 23:37:45 +00:00
Daniel Cousens 6550e97224
init: add zmq to debug categories 2017-02-08 22:11:53 +00:00
Daniel Cousens 57c6ef01d9
init: amend ZMQ flag names 2017-02-08 22:10:42 +00:00
João Barbosa 5015d2b27f
Fix ZMQ Notification initialization and shutdown
Moves the call Initialize() from init.cpp to CreateWithArguments() and handles the
return value. Moves the call Shutdown() from init.cpp to destructor.
Changes Initialize() and Shutdown() to protected members.
2017-02-08 22:10:42 +00:00
Jeff Garzik f200002cf3
Add ZeroMQ support. Notify blocks and transactions via ZeroMQ
Continues Johnathan Corgan's work.
Publishing multipart messages

Bugfix: Add missing zmq header includes

Bugfix: Adjust build system to link ZeroMQ code for Qt binaries
2017-02-08 22:10:42 +00:00
Simon 43b6753782 Update zrpc vs zrpcunsafe logging in z_sendmany operation 2017-02-08 10:50:40 -08:00
Simon 3307124a2b Add parameter interaction, where zrpcunsafe implies zrpc 2017-02-06 23:29:07 -08:00
Jack Grigg 78ba3472d2
Update help text for mining options 2017-02-06 11:55:05 +00:00
Jack Grigg 8e8b6d701b
Switch miner to P2PKH, add -mineraddress option
Closes #945 and #1955.
2017-02-06 11:54:58 +00:00
Jack Grigg 2cc0a252ad
Add compile flag to disable compilation of mining code 2017-01-30 21:14:46 +01:00
Jack Grigg 207924a1d5
Remove OpenSSL PRNG reseeding
Per https://download.libsodium.org/doc/generating_random_data/ reseeding the
default libsodium PRNG is not required.
2017-01-23 17:06:54 +01:00
zkbot c2c7998c2e Auto merge of #1979 - str4d:1786-inform-users-to-fetch-params, r=bitcartel
Instruct users to run zcash-fetch-params if network params aren't available

Closes #1786.
2017-01-19 21:47:26 +00:00
zkbot 78674ca79e Auto merge of #2007 - bitcartel:1097_copyright_notice_and_date, r=bitcartel
Closes #1097 so that zcash-cli displays license info like zcashd.

LicenseInfo is refactored from init.cpp to util.cpp so that the
bitcoin-cli makefile target does not need to be modified.
2017-01-19 00:56:47 +00:00
zkbot 63e0e895a5 Auto merge of #2006 - bitcartel:1497_destination_path_validation_when_exporting, r=bitcartel
Fixes #1497 ZCA-009 by restricting export to a user defined folder and sanitizing filenames
2017-01-18 18:19:50 +00:00
Simon 9064d73bf8 Fixes #1497 ZCA-009 by restricting data exporting to user defined folder.
Previously the RPC interface allowed z_exportwallet, backupwallet and
dumpwallet to write data to an arbitrary filename.  ZCA-009 demonstrates
how this is vulnerable.  The resolution is to only allow data to
written when the -exportdir has been configured.  Also filenames are
restricted to alphanumeric characters.
2017-01-16 10:56:06 -08:00
Simon af02114469 Closes #1097 so zcash-cli now displays license info like zcashd.
LicenseInfo is refactored from init.cpp to util.cpp so that the
bitcoin-cli makefile target does not need to be modified.
2017-01-16 09:38:09 -08:00
Jack Grigg 53e9a6a0e2
Update debug categories
Closes #1954.
2017-01-05 11:56:42 +01:00
Jack Grigg 0b0a48c881
Suggest ./zcutil/fetch-params.sh as well
Once we improve the from-source installation docs to use 'make install', we can
revert this commit.
2017-01-05 11:38:38 +01:00
Jack Grigg bddf4079fd
Instruct users to run zcash-fetch-params if network params aren't available
Closes #1786.
2017-01-04 17:58:07 +01:00
zkbot 9f7bc6cba5 Auto merge of #1904 - str4d:1749-write-witness-cache-with-best-block, r=ebfull
Write witness caches when writing the best block

For steady-state operation, this reduces the average time between wallet disk
writes from once per block to once per hour.

On -rescan, witness caches are only written out at the end along with the best
block, increasing speed while ensuring that on-disk state is kept consistent.

Witness caches are now never recreated during a -reindex, on the assumption that
the blocks themselves are not changing (the chain is just being reconstructed),
and so the witnesses will remain valid.

Part of #1749.
2016-12-09 21:11:15 +00:00
zkbot 07a728300b Auto merge of #1642 - str4d:add-solver-rate-to-getmininginfo, r=str4d
Add getlocalsolps and getnetworksolps RPC calls, show them in getmininginfo
2016-12-09 03:18:23 +00:00
zkbot 400c4f04e6 Auto merge of #1878 - str4d:1875-non-tty-metrics-usability, r=str4d
Improve non-TTY metrics usability

Closes #1875.
2016-12-07 23:19:47 +00:00
Jack Grigg 03f83b9b0d
Write witness caches when writing the best block
For steady-state operation, this reduces the average time between wallet disk
writes from once per block to once per hour.

On -rescan, witness caches are only written out at the end along with the best
block, increasing speed while ensuring that on-disk state is kept consistent.

Witness caches are now never recreated during a -reindex, on the assumption that
the blocks themselves are not changing (the chain is just being reconstructed),
and so the witnesses will remain valid.

Part of #1749.
2016-11-30 14:04:37 +13:00
Jack Grigg 18f656d2af
Clarify that metrics options are only useful without -daemon and -printtoconsole 2016-11-29 18:11:25 +13:00
lpescher ae31e4563f Update help message to match the #4219 change 2016-11-28 13:28:32 -08:00
Jack Grigg 0076a80a8a
Document metrics screen options 2016-11-18 16:49:37 +13:00
Jack Grigg 57724029da
Only show metrics by default if stdout is a TTY 2016-11-18 16:37:10 +13:00
Jack Grigg 000499ae64
Add getlocalsolps and getnetworksolps RPC calls, show them in getmininginfo 2016-11-16 22:02:49 +13: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
Simon f4404d7b5b Closes #1680, temporary fix for rpc deadlock inherited from upstream. 2016-11-15 00:31:24 -08:00
Sean Bowe 226a6b3248 Initialize after profiling messages are suppressed. 2016-11-14 10:19:46 -07:00
ITH4Coinomia df22af008d Update init.cpp
Reformatted Text
2016-11-03 18:34:12 +05:30
Jack Grigg d35172fb67
Disable the metrics screen on regtest 2016-10-27 19:41:10 -07:00
zkbot 278439fbe3 Auto merge of #1623 - ebfull:sprout-params, r=str4d
Zcash zk-SNARK public parameters for 1.0 "Sprout".

Created in the ceremony this weekend! 🎉

We're writing a blog post about this, I'm going to publish the code shortly too.

Closes #1553
2016-10-27 03:08:10 +00:00
Sean Bowe 7662d72bf4 Make more string changes. 2016-10-26 13:57:22 -06:00
Pieter Wuille bf673640e3 Use std::atomic for fRequestShutdown and fReopenDebugLog 2016-10-24 21:55:52 -07:00
Chirag Davé 7a4e0e0932 fReopenDebugLog and fRequestShutdown should be type sig_atomic_t
This allows access as an atomic variable in the presence
of async interrupts.

See issue #7433 for more details
fixes: #7433
2016-10-24 21:54:50 -07:00
Sean Bowe 27e3f362f0 Zcash zk-SNARK public parameters for 1.0 "Sprout". 2016-10-24 11:22:39 -06:00
Jack Grigg 4ace963c80
Show important console messages on metrics screen 2016-10-22 15:50:11 -05:00