Pieter Wuille
2d42e1a993
Refactor script validation to observe amounts
...
This is a preparation for BIP143 support.
Edited for Zcash merge by Ariel Gabizon.
2018-02-20 04:22:19 +00:00
Jonas Nick
ffda7e01a5
Reduce unnecessary hashing in signrawtransaction
2018-02-20 04:22:18 +00:00
21E14
8cb98d9105
Remove obsolete reference to CValidationState from UpdateCoins.
2018-02-20 04:22:18 +00:00
Pieter Wuille
838e7a29cc
Report non-mandatory script failures correctly
2018-02-20 04:22:10 +00:00
Homu
49274558c6
Auto merge of #2940 - str4d:nu-activation-mempool-expiry, r=str4d
...
Mempool improvements, branch ID awareness
Whenever the local chain tip is updated, transactions in the mempool which commit to an
unmineable branch ID (for example, just before a network upgrade activates, where the
next block will have a different branch ID) will be removed.
Includes commits cherry-picked from the following upstream PRs:
- bitcoin/bitcoin#6654
- Only the mempool index change.
- bitcoin/bitcoin#6776
- bitcoin/bitcoin#7020
- bitcoin/bitcoin#6915
Part of #2074 .
2018-02-19 19:00:30 -08:00
Jack Grigg
34a64fe0a2
Remove mempool transactions which commit to an unmineable branch ID
2018-02-20 02:57:44 +00:00
Suhas Daftuar
233c9eb635
Fix removeForReorg to use MedianTimePast
2018-02-20 02:57:44 +00:00
Suhas Daftuar
e52ba51bda
Don't call removeForReorg if DisconnectTip fails
2018-02-20 02:57:44 +00:00
Suhas Daftuar
a4b2518068
Track coinbase spends in CTxMemPoolEntry
...
This allows us to optimize CTxMemPool::removeForReorg.
2018-02-20 02:57:44 +00:00
Matt Corallo
fe5cef0555
removeForReorg calls once-per-disconnect-> once-per-reorg
2018-02-20 02:57:44 +00:00
Matt Corallo
5aa165d557
Make indentation in ActivateBestChainStep readable
2018-02-20 02:57:44 +00:00
Matt Corallo
c944d161fd
Fix comment in removeForReorg
2018-02-20 02:57:43 +00:00
Matt Corallo
f5b35d2305
Fix removal of time-locked transactions during reorg
2018-02-20 02:57:43 +00:00
Matt Corallo
b0f8c83f95
Add failing test checking timelocked-txn removal during reorg
2018-02-20 02:57:40 +00:00
rofl0r
36d8b2efbe
fix build error due to usage of obsolete boost_system-mt
...
closes #2304 for real
2018-02-19 21:21:48 +00:00
Jack Grigg
cb580c7241
Add rollback limit to block index rewinding
...
This will prevent users from starting their nodes if they switch between
software versions that implement different network upgrades. It will also
prevent users from using the testnet if they have more than MAX_REORG_LIMIT
post-upgrade blocks, and the upgrade point is shifted in a newer software
version.
2018-02-19 16:32:45 +00:00
Jack Grigg
57e6ecda5a
Implement roll-back limit for reorganisation
...
Closes #713 .
2018-02-19 16:32:42 +00:00
Homu
8da60b127e
Auto merge of #2958 - bitcartel:2906_extra_test, r=str4d
...
Add test to check malformed v1 transaction against Overwinter tx parser
2018-02-17 10:14:31 -08:00
Simon
fa78211ed7
Add test to check malformed v1 transaction against Overwinter tx parser
2018-02-16 15:42:04 -08:00
Homu
c6ffabb47f
Auto merge of #2925 - bitcartel:2906_overwinter_tx_format, r=str4d
...
Overwinter transaction format
Implements ZIP 202.
Closes #2906 .
2018-02-16 11:38:58 -08:00
Jack Grigg
46d3762a90
Update SignatureHash tests for transaction format changes
...
The test uses randomly-generated transactions, some of which fell outside the
actual consensus rules.
2018-02-16 10:10:35 -08:00
Simon
072099d788
Implementation of Overwinter transaction format ZIP 202.
2018-02-16 10:10:15 -08:00
Homu
d527116d46
Auto merge of #2923 - str4d:sighash-tests-env-bug, r=str4d
...
Use JoinSplitTestingSetup for Boost sighash tests
Symptom: When running all tests, the test suite passed. But when running the
sighash tests on their own, the test suite segfaulted.
Cause: The sighash tests depend on the proving parameters being accessible, but
BasicTestingSetup doesn't load them.
2018-02-15 05:41:18 -08: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
jc
15fb13f629
read hashReserved from disk block index
2018-02-04 21:40:14 -05: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
Jack Grigg
35d64c1fde
Use JoinSplitTestingSetup for Boost sighash tests
...
Symptom: When running all tests, the test suite passed. But when running the
sighash tests on their own, the test suite segfaulted.
Cause: The sighash tests depend on the proving parameters being accessible, but
BasicTestingSetup doesn't load them.
2018-01-31 15:31:51 +00: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
b4a20ae5ac
Auto merge of #2897 - str4d:2892-zkey-rpc-bugfix, r=str4d
...
zkey_import_export: Synchronize mempools before mining
Resolves a race condition that caused the RPC test to intermittently fail.
Closes #2892 .
2018-01-22 14:11:50 -08:00
Jack Grigg
9e8f1d09ca
zkey_import_export: Synchronize mempools before mining
...
Resolves a race condition that caused the RPC test to intermittently fail.
Closes #2892 .
2018-01-22 21:10:57 +00: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