Commit Graph

682 Commits

Author SHA1 Message Date
Jack Grigg 2cc0a252ad
Add compile flag to disable compilation of mining code 2017-01-30 21:14:46 +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
Jack Grigg a6df7ab567
Add a persistent screen showing basic node metrics
The screen is implemented using ANSI Escape sequences.

Closes #1331
2016-10-22 15:50:06 -05:00
Daira Hopwood f91bbeedb7 Add help for -equihashsolver= option.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-10-20 21:17:02 +01:00
Sean Bowe 796c7ee52f Update to `beta2` public parameters, remove `regtest`/`testnet3` parameters
subdirectories.
2016-10-03 15:58:02 -06:00
Jack Grigg 1683b1f58b Clear note witness caches on reindex 2016-09-27 15:21:18 +13:00
Simon 008fccfa48 Disable option to allow multiple async rpc workers. 2016-09-08 21:46:13 -07:00
Simon 8d08172d0d Add config option 'rpcasyncthreads' to specify number of async rpc workers. Default is 1. 2016-09-08 21:46:13 -07:00
Simon 805344dcf4 Refactor: replace calls to GetTxid() with GetHash() 2016-09-07 15:12:09 -07:00
Sean Bowe 7ee82c4361 Deallocate the public parameters during Shutdown. 2016-08-26 16:55:43 -06:00
Sean Bowe 393b2b7834 Update proving/verifying keys. 2016-08-22 15:48:43 -06:00
zkbot 365845216b Auto merge of #1268 - ThisIsNotOfficialCodeItsJustForks:t1130-upgrade-libsodium, r=ebfull
Upgrade libsodium for AVX2-detection bugfix.

Upgrades libsodium to bring in an AVX2-detection bugfix (to help with #1130).
2016-08-22 02:34:30 +00:00
Taylor Hornby 2902ac7ce8 Use libsodium's s < L check, instead checking that libsodium checks that. 2016-08-18 16:38:20 -06:00
Patrick Strateman 0560d671ab Remove redundant whiteconnections option 2016-08-15 19:37:27 -06:00
Simon 10d2c57c0d Replace calls to GetHash() with GetTxid() for transaction objects.
Where the caller intends to receive a transaction id and not a double
SHA256 hash.
2016-07-26 17:13:03 -07:00
Sean Bowe 1477fd3f40 Remove the constraint system from the alpha proving key. 2016-07-19 14:01:58 -06:00
zkbot d20d866d89 Auto merge of #1105 - bitcartel:zc.v0.11.2.z6_issue_424, r=ebfull
New private/public key pairs for broadcasting alert messages

Implements #424

Fixes and integrates method of sending alerts as described by upstream here:
- https://gist.github.com/laanwj/0e689cfa37b52bcbbb44

To send an alert:
- Copy private keys into alertkeys.h.
- Modify alert parameters and message found in sendalert.cpp
- Build and run to send the alert e.g. ./zcashd -printtoconsole -sendalert

Tested and verified with local nodes on alpha 6 testnet.
2016-07-18 21:09:46 +00:00
Simon b39e1bdbca Fixes to integrate sendalert.cpp.
Add sendalert.cpp to build process.
Add alertkeys.h as a placeholder for private keys.
2016-07-15 19:57:55 -07:00
Sean Bowe f4091941f5 Reorder initialization routines to ensure verifying key log messages appear in debug.log. 2016-07-10 21:10:02 -06:00
aniemerg dd74e9dd32 Suppress Libsnark Debugging Info
Suppress the Libsnark debugging information displayed on launch
2016-06-19 17:38:44 -04:00
Jack Grigg 3985a40d1f Change default ports 2016-06-17 00:21:58 +12:00
zkbot fe97a405e3 Auto merge of #994 - ebfull:remove-redundant-constraints, r=ebfull
Final changes to the circuit

* Remove [redundant](https://github.com/scipr-lab/libsnark/issues/37) bitness constraints that I pointed out in #908.
* The depth is increased from 20 to 29. I chose 29 because the QAP degree ends up being a power of two, which is probably going to be useful for the FFT in our MPC. (Closes #16)

If we're happy with depth 29 (over 268 million possible joinsplits), this will probably be the final change to the constraint system before 1.0.
2016-06-15 21:39:32 +00:00
Jack Grigg a5150a156e Set -relaypriority default to false
This enables spending of individual coins during mining slow start.

Closes #904.
2016-06-07 21:11:57 +12:00