Commit Graph

7393 Commits

Author SHA1 Message Date
Matt Corallo
f5b35d2305 Fix removal of time-locked transactions during reorg 2018-02-20 02:57:43 +00:00
Alex Morcos
f41775b2c8 Implement helper class for CTxMemPoolEntry constructor
This is only for unit tests.
2018-02-09 18:35:25 +00:00
Pieter Wuille
934fd19744 Support -checkmempool=N, which runs checks on average once every N transactions 2018-02-09 18:35:25 +00:00
Ashley Holman
e328fa32b3 TxMemPool: Change mapTx to a boost::multi_index_container
Indexes on:
- Tx Hash
- Fee Rate (fee-per-kb)
2018-02-09 18:35:25 +00:00
Homu
e6850571dd Auto merge of #2898 - str4d:2286-nu-activation-mechanism, r=str4d
Network upgrade activation mechanism

Implements ZIP 200.

Integration with `CChainParams` inspired by https://github.com/bitcoin/bitcoin/pull/7575.

Includes block index rewinding logic cherry-picked from https://github.com/bitcoin/bitcoin/pull/8149.

Closes #2286. Part of #2905.
2018-02-07 02:33:42 -08:00
Jack Grigg
cad27eb77f Update quote from ZIP 200 2018-02-06 23:18:56 +00:00
Jack Grigg
5009136dc3 Change UI/log status message for block rewinding 2018-02-06 22:49:08 +00:00
Jack Grigg
828940b163 Use a boost::optional for nCachedBranchId
This enables us to distinguish between it being unset vs. being set to zero.
2018-02-06 22:42:18 +00:00
Jack Grigg
149d69e36b Add method for fetching the next activation height after a given block height 2018-02-04 22:58:42 +00:00
Jack Grigg
548683767c Add Overwinter to upgrade list 2018-02-04 22:58:42 +00:00
Jack Grigg
9e851450ab Adjust rewind logic to use the network upgrade mechanism 2018-02-04 22:58:42 +00:00
Pieter Wuille
89f20450c2 Add rewind logic to deal with post-fork software updates
Includes logic for dealing with pruning by Suhas Daftuar.
2018-02-04 22:58:42 +00:00
Jack Grigg
f52da91139 Test network upgrade logic
Also demonstrates how to specify a network upgrade.
2018-02-04 22:58:39 +00:00
Jack Grigg
b174b7e330 Allow changing network upgrade parameters on regtest
Derived from upstream commit 56c87e92110f05d7452f1e85bf755246ffc77206:
    Allow changing BIP9 parameters on regtest
2018-02-04 22:57:59 +00:00
Jack Grigg
780f526bc9 Network upgrade activation mechanism 2018-02-04 22:57:56 +00:00
Homu
a0a010c85c Auto merge of #2839 - arcalinea:add_deprecation_alert, r=bitcartel
Add getdeprecationinfo RPC method to return deprecation block height

Closes #2828

Returns:
```
{
  "version": xxxxx,                      (numeric) the server version
  "subversion": "/MagicBean:x.y.z[-v]/",     (string) the server subversion string
  "deprecationheight": xxxxx,            (numeric) the deprecation block height
}
```
2018-02-02 10:23:37 -08:00
Jay Graber
df46562f26 Make applicable only on mainnet 2018-01-29 12:19:19 -08:00
Homu
70109a74e9 Auto merge of #2902 - bitcartel:2901_remove_unused_noblks_constants, r=daira
Remove unused NOBLKS_VERSION_{START,END} constants from version.h

Closes #2901. Backport from upstream PR https://github.com/bitcoin/bitcoin/pull/7662.
2018-01-25 04:37:33 -08:00
Pavel Vasin
20bfa355a0 remove unused NOBLKS_VERSION_{START,END} constants 2018-01-23 15:44:35 -08:00
Homu
a4a020de7b Auto merge of #2217 - str4d:2074-chainparams, r=str4d
Bitcoin 0.12 chainparams cleanups

Cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#6222
- bitcoin/bitcoin#6381
- bitcoin/bitcoin#6473
- bitcoin/bitcoin#6242

Part of #2074.
2018-01-22 15:22:24 -08:00
Homu
d11230be73 Auto merge of #2886 - bitcartel:2885_cleanup_node_getutxo, r=str4d
Remove redundant service flag NODE_GETUTXO meant for Bitcoin XT.

For #2885. This frees up a service bit.  Zcash has never used this flag
and upstream Bitcoin Core does not support this flag, although
it did reserve it for compatibility with Bitcoin XT.
2018-01-22 08:38:49 -08:00
Jack Grigg
40ebf08ff8 Add viewing key prefix to regtest parameters 2018-01-22 15:32:52 +00:00
Jack Grigg
ff145dfe32 Add missing namespace for boost::get 2018-01-22 10:30:41 -05:00
Cory Fields
91690d6e84 chainparams: don't use std namespace 2018-01-22 10:30:41 -05:00
Cory Fields
47b71cec5d chainparams: move CCheckpointData into chainparams.h
This unties CChainParams from its dependency on checkpoints. Instead, now it
only depends on the raw checkpoint data.
2018-01-22 10:30:41 -05:00
Daniel Kraft
a97308c5d4 Clean up chainparams some more.
Clean up the code in chainparams a bit more after the recent
refactorings.  In particular, make sure the structure of the "RegTest"
params matches the structure of the other classes.  This makes the code
clearer to read.

Also remove redundant values of the genesis block in always-specified
optional arguments and mark variable/argument as "const".
2018-01-22 10:30:41 -05:00
Jorge Timón
54ab3b3183 Chainparams: CTestNetParams and CRegTestParams extend directly from CChainParams
...instead of CMainParams and CTestNetParams respectively

Do the same for CBaseChainParams.
The inheritance was only reducing readibility in this case
2018-01-22 10:30:41 -05:00
Jorge Timón
90b6ee6ce5 Chainparams: Introduce CreateGenesisBlock() static function 2018-01-22 10:30:41 -05:00
Mark Friedenbach
fe53749dc9 Explicitly set tx.nVersion for the genesis block and mining tests
If/when CTransaction::CURRENT_VERSION is incremented, this will break CChainParams and the miner tests. This fix sets the transaction version explicitly where we depend on the hash value (genesis block, proof of work checks).
2018-01-22 10:30:41 -05:00
Simon
03a61ed87c Remove redundant service flag NODE_GETUTXO meant for Bitcoin XT.
This frees up a service bit.  Zcash has never used this flag
and upstream Bitcoin Core does not support this flag, although
it did reserve it for compatibility with Bitcoin XT.
2018-01-19 17:22:54 -08:00
Simon
5befbed4bc Fixes #2793. Backport commit f33afd3 to increase dbcache default. 2018-01-15 23:17:34 -08:00
Homu
b2a114a8c9 Auto merge of #2771 - syd0:fix-snark-dep-build, r=str4d
Fix libsnark dependency build.

This changes libsnark to build in-place, instead of copying first to
a build directory. Previously, modifications made to the original
sources wouldn't get rebuilt without a 'make clean' because users
would be pointing to the copies.

This closes #2689.
2018-01-04 17:06:33 -08:00
Homu
8dbe11451a Auto merge of #2770 - syd0:remove-some-cruft, r=str4d
Remove OSX and Windows files from Makefile + share directory.

These are stale holdovers from bitcoin.

This closes #2169.
2018-01-04 16:02:27 -08:00
syd
b6a990def0 Remove OSX and Windows files from Makefile + share directory.
These are stale holdovers from bitcoin.

This closes #2169.
2018-01-04 22:50:17 +00:00
Homu
db9f6f0485 Auto merge of #2821 - str4d:2335-scope-ecdsa-constants, r=str4d
Scope the ECDSA constant sizes to CPubKey / CKey classes

Cherry-picked from https://github.com/bitcoin/bitcoin/pull/10657, upstreaming our patches from #2335.
2018-01-04 14:47:50 -08:00
Jack Grigg
2091cf23ae make-release.py: Versioning changes for 1.0.14. 2018-01-03 23:44:51 +01:00
Jay Graber
9d2974ed5b Add getdeprecationinfo rpc call to return current version and deprecation block height. 2018-01-02 11:38:39 -08:00
Jack Grigg
275f21ad4b make-release.py: Versioning changes for 1.0.14-rc1. 2017-12-22 09:59:01 +00:00
Homu
1683c2d5bf Auto merge of #2143 - str4d:1997-viewing-keys, r=str4d
Implement incoming viewing keys

Closes #1997.
2017-12-20 14:11:05 -08:00
Jack Grigg
c4c7c6630b Scope the ECDSA constant sizes to CPubKey / CKey classes 2017-12-20 17:28:13 +00:00
Jack Grigg
2bbfe6c4e8 Add cautions to z_getbalance and z_gettotalbalance help text about viewing keys 2017-12-20 11:24:51 +00:00
Jack Grigg
bec2235148 Cleanup: Add braces for clarity 2017-12-20 11:18:59 +00:00
Jack Grigg
7b8d4f87ec Modify zcrawkeygen RPC method to set "zcviewingkey" to the viewing key
The "zcviewingkey" field has never been documented before, and the method itself
is deprecated; this just ensures it is consistent with the rest of the RPC.
2017-12-20 00:46:41 +00:00
Jack Grigg
44e37656bf Add watch-only support to Zcash RPC methods
Balance totals do not include spends linked to viewing key addresses, as
nullifiers cannot be calculated and therefore spends cannot be detected.
2017-12-20 00:46:37 +00:00
Jack Grigg
9a2b8ae57f Update wallet logic to account for viewing keys
The wallet code previously assumed that an unlocked wallet would always
have a spending key associated with a note decryptor. Viewing keys break
this assumption.
2017-12-20 00:46:37 +00:00
Jack Grigg
e85b33a52e Add RPC methods for exporting/importing viewing keys 2017-12-20 00:46:37 +00:00
Jack Grigg
167cd33374 Implement viewing key storage in the wallet 2017-12-20 00:46:37 +00:00
Jack Grigg
49cf707d2c Add Base58 encoding of viewing keys 2017-12-20 00:46:33 +00:00
syd
a55c186a74 Fix libsnark dependency build.
This changes libsnark to build in-place, instead of copying first to
a build directory. Previously, modifications made to the original
sources wouldn't get rebuilt without a 'make clean' because users
would be pointing to the copies.

This closes #2689.
2017-12-16 15:52:08 -05:00
Homu
7888624f74 Auto merge of #2795 - str4d:2351-sprout-circuit-value, r=str4d
Track net value entering and exiting the Sprout circuit

Delta values will be stored for new blocks; old blocks can be filled in by
re-indexing. The net value currently in the Sprout circuit is only calculated
when delta values for all previous blocks are present.

Part of #2351.
2017-12-16 02:09:40 -08:00