Commit Graph
3191 Commits
Author SHA1 Message Date
jl777 bbb8ae00ad Fix 2018-02-22 12:17:39 +02:00
jl777 58434c5c34 Revert if 2018-02-22 12:15:36 +02:00
jl777 71b9e59c5a Guard against set generate crash in regtest 2018-02-22 12:00:08 +02:00
Homu d4d2844829 Auto merge of #2463 - str4d:713-rollback-limit, r=str4d
Implement roll-back limit for reorganisation

Part of  #2905. Closes #713.
2018-02-20 15:17:22 -08:00
Jack Grigg d55e5e778b Cleanup: Wrap function arguments 2018-02-20 04:22:21 +00:00
Jack Grigg be12669982 Add consensus branch ID parameter to SignatureHash, remove SigVersion parameter
We do not need to be able to calculate multiple SignatureHash versions for a
single transaction format; instead, we use the transaction format to determine
the SigVersion.

The consensus branch ID *does* need to be passed in from the outside, as only
the caller knows the context in which the SignatureHash is being calculated
(ie. mempool acceptance vs. block validation).

JoinSplit signature verification has been moved into ContextualCheckTransaction,
where the consensus branch ID can be obtained.

The argument to the sign command for zcash-tx has been modified to take a height
in addition to the optional sigtype flags.
2018-02-20 04:22:20 +00:00
Pieter Wuille 6514771a44 Rename to PrecomputedTransactionData 2018-02-20 04:22:20 +00:00
Pieter Wuille f762d44973 Precompute sighashes
Original version by Nicolas Dorier. Precomputing version by Pieter Wuille.

Edited for Zcash by Ariel Gabizon and Jack Grigg
2018-02-20 04:22:20 +00:00
Pieter Wuille c86a1cb86e BIP143: Verification logic
Includes simplifications by Eric Lombrozo.

Edited for Zcash merge by Ariel Gabizon.
2018-02-20 04:22:19 +00:00
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
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 f5b35d2305 Fix removal of time-locked transactions during reorg 2018-02-20 02:57:43 +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
Simon 072099d788 Implementation of Overwinter transaction format ZIP 202. 2018-02-16 10:10:15 -08:00
jl777 fc5bee9e14 -print 2018-02-14 00:57:33 +02:00
jl777 6e94384f91 Test 2018-02-13 21:37:32 +02:00
jl777 53a94b280d Test 2018-02-13 21:34:09 +02:00
jl777 9757c8f97e Test 2018-02-13 21:33:49 +02:00
jl777 8683bd8d11 Debugging 2018-02-13 21:29:42 +02: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 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
Per Grön 39d2e9e0cb Make some globals static that can be
External linkage does not help and just encourages sloppy dependencies
and can lead to weird issues when there are name collisions.
2018-01-22 18:20:47 +01:00
Jack Grigg ad6a36ad02 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.
2017-12-14 22:06:11 +00:00
jl777 7c130297c2 KOMODO_ASSETCHAIN_MAXLEN -> 65 2017-11-10 19:07:36 +02:00
jl777 314350e695 KOMODO_ENDOFERA 2017-11-03 19:22:56 +02:00
jl777 6da8d0d55e Test 2017-10-10 14:15:58 +03:00
jl777 bd901dd742 Reduce print 2017-10-09 18:58:40 +03:00
Simon 06c19063bb Implement RPC shield_coinbase #2448. 2017-09-21 15:04:12 -07:00
jl777 8ab425f8b2 Test 2017-09-18 18:34:43 +02:00
jl777 8dcf7f9449 Test 2017-09-18 17:32:48 +02:00
jl777 164bbe6c3b Test 2017-09-18 17:13:58 +02:00
jl777 4723d6acf5 Test 2017-09-18 16:59:22 +02:00
jl777 336a60cf9b Prevent duplicate headers 2017-09-18 16:57:31 +02:00
jl777 37782e4e3b Remove prints 2017-09-18 16:35:45 +02:00
jl777 1cf907bc75 Test 2017-09-18 16:13:32 +02:00
jl777 5f27c121a9 Test 2017-09-18 16:03:14 +02:00
jl777 e73a3943b3 Test 2017-09-18 15:57:40 +02:00
jl777 c2b0ec2e4e Test 2017-09-18 15:30:30 +02:00
jl777 5323cb13a6 Test 2017-09-18 15:16:49 +02:00
jl777 5fa9e2fe69 Test 2017-09-18 15:15:44 +02:00