Commit Graph

639 Commits

Author SHA1 Message Date
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
Sean Bowe 1744fec274 Update the zkSNARK parameters. 2016-06-03 21:04:07 -06:00
Sean Bowe 6b5d608899 Update proving key and tests that depend on transaction structure changes 2016-05-24 11:09:17 -06:00
Jack Grigg c5d080bb83 Add Zcash Developers to CLI copyright notice 2016-05-20 11:56:19 +12:00
Sean Bowe b8d320df19 Update public zkSNARK parameters for new circuit. 2016-05-12 16:44:49 -06:00
Sean Bowe 2dc3599271 Transplant of libzcash. 2016-05-12 16:44:47 -06:00
Taylor Hornby aaf6495948 Rename bitcoin.conf and bitcoind.pid to zcash.conf and zcashd.pid in qa/ and src/ 2016-05-03 14:01:01 -06:00
Taylor Hornby 9bab3e89a2 Initialize libsodium first. 2016-03-24 13:13:14 -06:00
Sean Bowe 6806256b80 Initialize libsodium and remove openssl headers from util.cpp 2016-03-23 16:26:57 -06:00
Sean Bowe a633044b25 Reorder proving key and verifying key arguments. 2016-03-15 15:59:52 -06:00
Sean Bowe 8f8c4c6c0c Lazily load the proving key at time of first pour. 2016-03-15 14:16:05 -06:00
Sean Bowe 9144ea8c2b Testnet modifications -- just take the parameters from regtest. Also, move loading ZC params to _before_ verification. 2016-01-19 14:36:10 -07:00
Sean Bowe d66877afb3 Added mapSerials consensus rules to prohibit double-spending. 2016-01-19 14:36:09 -07:00
Sean Bowe 4f1c37980e Load proving/verifying keys at startup from the public alpha parameters file. 2016-01-19 14:36:04 -07:00
Alex Morcos dfe55bdc32
Do not allow blockfile pruning during reindex.
Also clarify startup message.

Github-Pull: #6856
Rebased-From: d3b09f6bac738958b6bf5711bcb5291049b7466d
2015-10-23 14:42:05 +02:00
Adam Weiss e6adac7b3f Delay initial pruning until after wallet init
Don't prune until any wallet rescanning has taken place to avoid
potentially pruning blocks that the wallet rescan may need.
2015-09-22 00:43:12 +00:00
Wladimir J. van der Laan e6334f4aad
Revert "Disable partition check for now, it triggers too often (issue #6251)"
Re-enable partition check, it should be safe again after #6256.

This reverts commit 3eada74d6f.
2015-06-21 17:51:01 +02:00
Gavin Andresen fce474c9df
Use best header chain timestamps to detect partitioning
The partition checking code was using chainActive timestamps
to detect partitioning; with headers-first syncing, it should use
(and with this pull request, does use) pIndexBestHeader timestamps.

Fixes issue #6251

Github-Pull: #6256
Rebased-From: 65b94545036ae6e38e79e9c7166a3ba1ddb83f66
2015-06-15 10:34:07 +02:00
Wladimir J. van der Laan 4d9c7fe61d
Add option `-alerts` to opt out of alert system
Make it possible to opt-out of the centralized alert system by providing
an option `-noalerts` or `-alerts=0`. The default remains unchanged.

This is a gentler form of #6260, in which I went a bit overboard by
removing the alert system completely.

I intend to add this to the GUI options in another pull after this.

Github-Pull: #6274
Rebased-From: 02a6702a82a5b00e0e0351041dd3267308b7f319
2015-06-15 09:58:05 +02:00
Wladimir J. van der Laan 94cd7051a3
Remove translation for -help-debug options
Github-Pull: #6264
Rebased-From: 9b5659d1c4c62bc6b80e35ff7573c781835e4187
2015-06-12 15:12:14 +02:00
Adam Weiss 6cb70ca4ee
Prune: Support noncontiguous block files
In some corner cases, it may be possible for recent blocks to end up in
the same block file as much older blocks.  Previously, the pruning code
would stop looking for files to remove upon first encountering a file
containing a block that cannot be pruned, now it will keep looking for
candidate files until the target is met and all other criteria are
satisfied.

This can result in a noncontiguous set of block files (by number) on
disk, which is fine except for during some reindex corner cases, so
make reindex preparation smarter such that we keep the data we can
actually use and throw away the rest.  This allows pruning to work
correctly while downloading any blocks needed during the reindex.

Rebased-From: c257a8c9a6397eee40734b235a4fdcb8045aec91
Github-Pull: #6221
2015-06-11 18:25:45 +02:00
Wladimir J. van der Laan 3eada74d6f
Disable partition check for now, it triggers too often (issue #6251) 2015-06-08 10:14:44 +02:00
Luke Dashjr c00ae64f77
Remove P2SH coinbase flag, no longer interesting
Github-Pull: #6203
Rebased-From: d449772cf69c01932fc5d72c46054815d6300b3c
2015-06-02 09:13:03 +02:00
Wladimir J. van der Laan c7c9af381c
Merge pull request #5669
da29ecb Consensus: MOVEONLY: Move CValidationState from main consensus/validation (jtimon)
27afcd8 Consensus: Refactor: Decouple CValidationState from main::AbortNode() (Cory Fields)
2015-05-27 15:00:02 +02:00
Wladimir J. van der Laan 0bcf04f046
Merge pull request #6153
8c35b6f Parameter interaction: disable upnp if -proxy set (Wladimir J. van der Laan)
2015-05-27 09:33:01 +02:00
Wladimir J. van der Laan e9af4e65b5
Merge pull request #5947
36cba8f Alert if it is very likely we are getting a bad chain (Gavin Andresen)
2015-05-26 10:41:17 +02:00
Wladimir J. van der Laan e1412d3e96
Merge pull request #6159
ffdda4e Catch errors on datadir lock and pidfile delete (Adam Weiss)
2015-05-24 10:57:22 +02:00
Adam Weiss ffdda4e8a7 Catch errors on datadir lock and pidfile delete
Prevents bad permissions (or other fs related problems) from resulting
in hard crashes with cryptic messages on startup and shutdown.
2015-05-22 14:15:22 -04:00
Wladimir J. van der Laan 8c35b6f3be Parameter interaction: disable upnp if -proxy set
To protect privacy, do not use UPNP when a proxy is set. The user may
still specify -listen=1 to listen locally (for a hidden service), so
don't rely on this happening through -listen.

Fixes #2927.
2015-05-18 11:22:39 +02:00
Wladimir J. van der Laan 77ed59df4d wallet: Introduce constant for `-txconfirmtarget` default 2015-05-18 09:00:24 +02:00
jtimon da29ecbcc6 Consensus: MOVEONLY: Move CValidationState from main consensus/validation 2015-05-15 16:05:28 +02:00
Wladimir J. van der Laan e47c94e64c
Merge pull request #6135
f13dac9 Comment edits and cleanup (BitcoinPRReadingGroup)
ff734e9 Alphabetic order in makefile (Jorge Timón)
5207f33 fix header include groups (Philip Kaufmann)
59b149f remove unneeded incude of wallet/db.h from rpcmining.cpp (Philip Kaufmann)
3703385 remove unused classes from db.h (Philip Kaufmann)
0a7bcb7 fix IDE/compiler warning "extra ';'" in validationinterface.h (Philip Kaufmann)
3b00e7c [Trivial] Update COPYING (sandakersmann)
dd9e688 Trivial: Corrected owner of DNS seeder (ayeowch)
a60bfd8 [init] better message when no wallet support is compiled in (Philip Kaufmann)
78f44b6 Capitalized P2P (sandakersmann)
8e9248d [Trivial] Cryptocurrency is one word (sandakersmann)
803f51e Typo in GetRawMemPool RPC method help: "]" --> "}" (Chris Arnesen)
605a735 addrman: update comments (Pavel Vasin)
2015-05-15 13:59:07 +02:00
Wladimir J. van der Laan 6fb90d8983
Merge pull request #6102
86a5f4b Relocate calls to CheckDiskSpace (Alex Morcos)
67708ac Write block index more frequently than cache flushes (Pieter Wuille)
b3ed423 Cache tweak and logging improvements (Pieter Wuille)
fc684ad Use accurate memory for flushing decisions (Pieter Wuille)
046392d Keep track of memory usage in CCoinsViewCache (Pieter Wuille)
540629c Add memusage.h (Pieter Wuille)
2015-05-15 13:43:02 +02:00
Gavin Andresen 36cba8f118
Alert if it is very likely we are getting a bad chain
Create a monitoring task that counts how many blocks have been found in the last four hours.

If very few or too many have been found, an alert is triggered.

"Very few" and "too many" are set based on a false positive rate of once every fifty years of constant running with constant hashing power, which works out to getting 5 or fewer or 48 or more blocks in four hours (instead of the average of 24).

Only one alert per day is triggered, so if you get disconnected from the network (or are being Sybil'ed) -alertnotify will be triggered after 3.5 hours but you won't get another -alertnotify for 24 hours.

Tested with a new unit test and by running on the main network with -debug=partitioncheck

Run test/test_bitcoin --log_level=message to see the alert messages:
    WARNING: check your network connection, 3 blocks received in the last 4 hours (24 expected)
    WARNING: abnormally high number of blocks generated, 60 blocks received in the last 4 hours (24 expected)

The -debug=partitioncheck debug.log messages look like:
    ThreadPartitionCheck : Found 22 blocks in the last 4 hours
    ThreadPartitionCheck : likelihood: 0.0777702
2015-05-14 14:58:44 -04:00
Gavin Andresen b4c219b622
Merge pull request #5964
9a1dcea Use CScheduler for net's DumpAddresses (Gavin Andresen)
ddd0acd Create a scheduler thread for lightweight tasks (Gavin Andresen)
68d370b CScheduler unit test (Gavin Andresen)
cfefe5b scheduler: fix with boost <= 1.50 (Cory Fields)
ca66717 build: make libboost_chrono mandatory (Cory Fields)
928b950 CScheduler class for lightweight task scheduling (Gavin Andresen)
e656560 [Qt] add defaultConfirmTarget constant to sendcoinsdialog (Philip Kaufmann)
2015-05-14 14:27:07 -04:00
Gavin Andresen 9a1dcea2df
Use CScheduler for net's DumpAddresses
Instead of starting Yet Another Thread to dump addresses,
use CScheduler to do it.
2015-05-14 12:50:42 -04:00
Gavin Andresen ddd0acd3db
Create a scheduler thread for lightweight tasks 2015-05-14 12:50:41 -04:00
Philip Kaufmann a60bfd810f [init] better message when no wallet support is compiled in 2015-05-14 01:02:00 -04:00
Alex Morcos 472b4c5dda Clean up parsing of bool command line args 2015-05-12 16:41:55 -04:00
Pieter Wuille b3ed4236be Cache tweak and logging improvements 2015-05-11 17:58:14 -07:00
Pieter Wuille fc684ad8af Use accurate memory for flushing decisions 2015-05-11 17:57:27 -07:00
Jonas Schnelli a1d0ec44d7 re-add -reindex help message
was suddenly removed with fc44231cb7 (probably not by purpose)
2015-05-08 19:59:01 +02:00
Wladimir J. van der Laan 12f3488253
Merge pull request #6047
a56054b Update key.cpp to use new libsecp256k1 (Pieter Wuille)
a591d98 Squashed 'src/secp256k1/' changes from 1897b8e..22f60a6 (Pieter Wuille)
2015-05-06 12:29:07 +02:00
Wladimir J. van der Laan 00820f921d
Merge pull request #6055
a8cdaf5 checkpoints: move the checkpoints enable boolean into main (Cory Fields)
11982d3 checkpoints: Decouple checkpoints from Params (Cory Fields)
6996823 checkpoints: make checkpoints a member of CChainParams (Cory Fields)
9f13a10 checkpoints: store mapCheckpoints in CCheckpointData rather than a pointer (Cory Fields)
2015-05-06 11:38:39 +02:00