Commit Graph

12058 Commits

Author SHA1 Message Date
jl777
6ec3d43c5c -print 2018-02-21 16:15:42 +02:00
jl777
877865e3ef -couldnt open printout 2018-02-21 16:13:55 +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
Maxwell Gubler
f70cd24521 Fix syntax examples for z_importwallet and export 2018-02-20 16:46:12 -05:00
Jack Grigg
bdbe8e8591 Extend CWallet::GetFilteredNotes to enable filtering on a set of addresses 2018-02-20 13:19:07 +00:00
Jack Grigg
4553901850 Use v3 transactions with caching for validatelargetx benchmark 2018-02-20 04:22:22 +00:00
Jack Grigg
818b94f94f Make number of inputs configurable in validatelargetx test 2018-02-20 04:22:22 +00:00
Jack Grigg
a3353b4e01 Regenerate SignatureHash tests 2018-02-20 04:22:21 +00:00
Ariel
7245f32835 update SignatureHash according to Overwinter spec
with help from str4d
2018-02-20 04:22:21 +00:00
Ariel
132dc81f7d add blake2b writer 2018-02-20 04:22:21 +00: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
Nicolas DORIER
90285e7b81 Unit test for sighash caching
Zcash: Modified to use P2PKH.
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
Jorge Timón
722d811f89 Mempool: Use Consensus::CheckTxInputs direclty over main::CheckInputs 2018-02-20 04:22:20 +00:00
Jack Grigg
e005ff83ab Remove P2WPKH and P2WSH from signing logic
Separated from the previous commit for ease of review.
2018-02-20 04:22:19 +00:00
Pieter Wuille
157a5d0d9c BIP143: Signing logic 2018-02-20 04:22:19 +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
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
Scott Sadler
85b55ada89 use public github url 2018-02-19 21:13:05 -03:00
Scott Sadler
f5cf215f71 extra tests for failure modes and remove CRYPTOCONDITION_OVERSIZE error state 2018-02-19 18:24:12 -03: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
Scott Sadler
656fa68d13 guard cryptoconditions 2018-02-18 20:40:24 -03:00
Scott Sadler
28b946127b make IsPayToCryptoCondition neat 2018-02-18 19:35:48 -03:00
Scott Sadler
5a7cc8287b Merge remote-tracking branch 'origin/dev' into cryptoconditions 2018-02-18 19:25:52 -03:00
jl777
5be9870f77 A comment 2018-02-19 00:11:38 +02:00
jl777
052f006800 ASSETCHAINS_CC 2018-02-19 00:08:02 +02:00
jl777
253cd526ac MAX_MONEY to handle mining chains 2018-02-18 23:59:52 +02:00
Scott Sadler
5b383ba7f4 enable cryptoconditions spending 2018-02-18 18:49:04 -03:00
jl777
81c5ec4f3c Dukeleto's https://github.com/zcash/zcash/pull/2931 2018-02-18 12:45:22 +02:00
Jonathan "Duke" Leto
c989bc86e3 Read hashReserved from disk instead of assuming 0
Related to https://github.com/zcash/zcash/pull/2931
2018-02-17 20:45:00 -08:00
Scott Sadler
a99ca25a5a cryptocondition transaction is standard too 2018-02-17 02:03:34 -03:00
Simon
fa78211ed7 Add test to check malformed v1 transaction against Overwinter tx parser 2018-02-16 15:42:04 -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
Scott Sadler
a01d0f5672 remove rpc crypto conditions 2018-02-16 14:24:38 -03:00