Jack Grigg
6e9c7629af
Implement z_mergetoaddress for combining UTXOs and notes
Closes #2493 .
7 years ago
Jack Grigg
bdbe8e8591
Extend CWallet::GetFilteredNotes to enable filtering on a set of addresses
7 years ago
Homu
8487be8360
Auto merge of #2903 - str4d:1408-sighash, r=str4d
Overwinter SignatureHash
Implements ZIP 143.
Includes code cherry-picked from the following upstream PRs:
- bitcoin/bitcoin#7276
- bitcoin/bitcoin#7976
- bitcoin/bitcoin#8118
- bitcoin/bitcoin#8149
- Only amount validation and SignatureHash commits.
- bitcoin/bitcoin#8346
- bitcoin/bitcoin#8524
Part of #2074 and #2254 . Closes #1408 and #2584 .
6 years ago
Jack Grigg
4553901850
Use v3 transactions with caching for validatelargetx benchmark
6 years ago
Jack Grigg
818b94f94f
Make number of inputs configurable in validatelargetx test
6 years ago
Jack Grigg
a3353b4e01
Regenerate SignatureHash tests
6 years ago
Ariel
7245f32835
update SignatureHash according to Overwinter spec
with help from str4d
7 years ago
Ariel
132dc81f7d
add blake2b writer
7 years ago
Jack Grigg
d55e5e778b
Cleanup: Wrap function arguments
6 years ago
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.
6 years ago
Pieter Wuille
6514771a44
Rename to PrecomputedTransactionData
8 years ago
Nicolas DORIER
90285e7b81
Unit test for sighash caching
Zcash: Modified to use P2PKH.
8 years ago
Pieter Wuille
f762d44973
Precompute sighashes
Original version by Nicolas Dorier. Precomputing version by Pieter Wuille.
Edited for Zcash by Ariel Gabizon and Jack Grigg
7 years ago
Jorge Timón
722d811f89
Mempool: Use Consensus::CheckTxInputs direclty over main::CheckInputs
8 years ago
Jack Grigg
e005ff83ab
Remove P2WPKH and P2WSH from signing logic
Separated from the previous commit for ease of review.
6 years ago
Pieter Wuille
157a5d0d9c
BIP143: Signing logic
8 years ago
Pieter Wuille
c86a1cb86e
BIP143: Verification logic
Includes simplifications by Eric Lombrozo.
Edited for Zcash merge by Ariel Gabizon.
7 years ago
Pieter Wuille
2d42e1a993
Refactor script validation to observe amounts
This is a preparation for BIP143 support.
Edited for Zcash merge by Ariel Gabizon.
8 years ago
Jonas Nick
ffda7e01a5
Reduce unnecessary hashing in signrawtransaction
8 years ago
21E14
8cb98d9105
Remove obsolete reference to CValidationState from UpdateCoins.
8 years ago
Pieter Wuille
838e7a29cc
Report non-mandatory script failures correctly
9 years ago
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 .
6 years ago
Jack Grigg
34a64fe0a2
Remove mempool transactions which commit to an unmineable branch ID
6 years ago
Suhas Daftuar
233c9eb635
Fix removeForReorg to use MedianTimePast
9 years ago
Suhas Daftuar
e52ba51bda
Don't call removeForReorg if DisconnectTip fails
9 years ago
Suhas Daftuar
a4b2518068
Track coinbase spends in CTxMemPoolEntry
This allows us to optimize CTxMemPool::removeForReorg.
9 years ago
Matt Corallo
fe5cef0555
removeForReorg calls once-per-disconnect-> once-per-reorg
9 years ago
Matt Corallo
5aa165d557
Make indentation in ActivateBestChainStep readable
9 years ago
Matt Corallo
c944d161fd
Fix comment in removeForReorg
9 years ago
Matt Corallo
f5b35d2305
Fix removal of time-locked transactions during reorg
9 years ago
Matt Corallo
b0f8c83f95
Add failing test checking timelocked-txn removal during reorg
9 years ago
Homu
8da60b127e
Auto merge of #2958 - bitcartel:2906_extra_test, r=str4d
Add test to check malformed v1 transaction against Overwinter tx parser
6 years ago
Simon
fa78211ed7
Add test to check malformed v1 transaction against Overwinter tx parser
6 years ago
Homu
c6ffabb47f
Auto merge of #2925 - bitcartel:2906_overwinter_tx_format, r=str4d
Overwinter transaction format
Implements ZIP 202.
Closes #2906 .
6 years ago
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.
6 years ago
Simon
072099d788
Implementation of Overwinter transaction format ZIP 202.
6 years ago
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.
6 years ago
Alex Morcos
f41775b2c8
Implement helper class for CTxMemPoolEntry constructor
This is only for unit tests.
9 years ago
Pieter Wuille
934fd19744
Support -checkmempool=N, which runs checks on average once every N transactions
9 years ago
Ashley Holman
e328fa32b3
TxMemPool: Change mapTx to a boost::multi_index_container
Indexes on:
- Tx Hash
- Fee Rate (fee-per-kb)
9 years ago
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 .
6 years ago
Jack Grigg
cad27eb77f
Update quote from ZIP 200
6 years ago
Jack Grigg
5009136dc3
Change UI/log status message for block rewinding
6 years ago
Jack Grigg
828940b163
Use a boost::optional for nCachedBranchId
This enables us to distinguish between it being unset vs. being set to zero.
6 years ago
Jack Grigg
149d69e36b
Add method for fetching the next activation height after a given block height
6 years ago
Jack Grigg
548683767c
Add Overwinter to upgrade list
6 years ago
Jack Grigg
9e851450ab
Adjust rewind logic to use the network upgrade mechanism
6 years ago
Pieter Wuille
89f20450c2
Add rewind logic to deal with post-fork software updates
Includes logic for dealing with pruning by Suhas Daftuar.
8 years ago
Jack Grigg
f52da91139
Test network upgrade logic
Also demonstrates how to specify a network upgrade.
7 years ago
Jack Grigg
b174b7e330
Allow changing network upgrade parameters on regtest
Derived from upstream commit 56c87e92110f05d7452f1e85bf755246ffc77206:
Allow changing BIP9 parameters on regtest
6 years ago