Commit Graph

101 Commits

Author SHA1 Message Date
Braydon Fuller 4993804584 mempool: same address and index for an input and output bug
fixes a bug that would happen when an output would match an input with
the same address and index, and would lead to the outputs not appearing
in results.
2018-09-05 13:05:50 -07:00
Braydon Fuller d43d59dca5 mempool: fix bug with mempool address index iteration
fixes a minor bug where iteration would not end when there are matching
hashes for a p2sh and p2pkh address, and would return results for
both addresses
2018-09-05 13:05:50 -07:00
Braydon Fuller 6e50c56edd main: spentindex for the mempool
Zcash: Adapted to older mempool code
2018-09-05 13:05:49 -07:00
Braydon Fuller 2f8d20ba76 main: mempool address index
Zcash: Integrated into older mempool code
2018-09-05 12:56:26 -07:00
Eirik Ogilvie-Wigley 4fc309f0f5 Rename Merkle Trees to include sprout or sapling 2018-08-01 10:31:09 -06:00
Sean Bowe 8c57bbac15 Fix broken error messages. 2018-05-07 14:37:46 -06:00
Sean Bowe 98d2f090ca Evict transactions with obsolete anchors from the mempool 2018-05-07 14:37:46 -06:00
Sean Bowe b4ff707605 Add support for Sapling anchor checks in mempool consistency checks. 2018-05-07 14:37:46 -06:00
Sean Bowe 27616b9a04 Add support for Sapling anchors in coins/txdb. 2018-05-07 14:37:46 -06:00
Sean Bowe 008f4ee8e7 Rename GetAnchorAt to GetSproutAnchorAt. 2018-05-07 13:46:06 -06:00
Sean Bowe 28d20bdb11 Rename NullifierType to ShieldedType. 2018-05-07 13:46:06 -06:00
Jack Grigg 1f9dfbb9f0
Fix -Wstring-plus-int warning on clang 2018-05-01 14:55:47 +01:00
Eirik Ogilvie-Wigley 9669920f75 Rename nullifier caches and maps to indicate sprout nullifiers 2018-04-25 11:26:38 -06:00
Eirik Ogilvie-Wigley cab341e1a8 Add sapling nullifiers to db and mempool 2018-04-24 17:16:43 -06:00
Eirik Ogilvie-Wigley 708c87f16d Add enum for nullifier type 2018-04-24 09:57:14 -06:00
Eirik Ogilvie-Wigley 685e936c31 Add sapling nullifier set 2018-04-24 09:57:14 -06:00
Simon eb13862667 Closes #3084. Log txid when removing expired txs from mempool. 2018-03-16 11:46:39 -07:00
Jay Graber 9bb37bf0d5 Implement transaction expiry for Overwinter 2018-02-23 00:12:03 -08:00
Jorge Timón 722d811f89
Mempool: Use Consensus::CheckTxInputs direclty over main::CheckInputs 2018-02-20 04:22:20 +00:00
21E14 8cb98d9105
Remove obsolete reference to CValidationState from UpdateCoins. 2018-02-20 04:22:18 +00: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 a4b2518068
Track coinbase spends in CTxMemPoolEntry
This allows us to optimize CTxMemPool::removeForReorg.
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
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
Pieter Wuille 6bd1d60c97
Separate core memory usage computation in core_memusage.h 2017-03-14 13:45:05 +13:00
Pieter Wuille bde5c8b0f1
Implement accurate memory accounting for mempool 2017-03-14 13:44:39 +13:00
Luke Dashjr a79c8e24a5
Fix various warnings
Found while building on Debian 7
2017-03-03 10:57:15 -08:00
Simon 805344dcf4 Refactor: replace calls to GetTxid() with GetHash() 2016-09-07 15:12:09 -07:00
Simon 10d2c57c0d Replace calls to GetHash() with GetTxid() for transaction objects.
Where the caller intends to receive a transaction id and not a double
SHA256 hash.
2016-07-26 17:13:03 -07:00
Sean Bowe 22de160219 Fixes for indentation and local variable names. 2016-07-18 10:07:29 -06:00
Sean Bowe b7e4abd6f7 Rename some usage of 'pour'. 2016-07-18 10:06:18 -06:00
Sean Bowe bb64be52fe Rename mapSerials to mapNullifiers. 2016-07-18 10:06:18 -06:00
Sean Bowe 616f8d05af Rename GetSerial to GetNullifier. 2016-07-18 10:06:18 -06:00
Sean Bowe bfeaf0049a Rename JSDescription's `serials` to `nullifiers`. 2016-07-18 10:06:18 -06:00
Sean Bowe 8675d94b63 Rename vpour to vjoinsplit. 2016-07-18 10:06:18 -06:00
Sean Bowe a8c68ffe99 Rename CPourTx to JSDescription. 2016-07-18 10:06:18 -06:00
zkbot 6793168a2e Auto merge of #1017 - ebfull:coinbase-must-be-protected, r=ebfull
Enforce that coinbases must be protected

This PR forces miners to place their funds in the private value transfer system, making "transparent coins" opt-in for users, and increasing privacy for all participants on a systemic level.

Closes #101.
2016-06-15 03:06:23 +00:00
Sean Bowe a667caec13 Ensure mempool integrity checks don't trip on chained joinsplits. 2016-06-13 13:02:46 -06:00
Sean Bowe c0dde76d8a Disable coinbase-must-be-protected rule on regtest. 2016-06-13 12:23:55 -06:00
Sean Bowe 10df6fb3df Rename `CheckInputs` to `ContextualCheckInputs` since it relies on a global variable
and assumes calling conditions.
2016-06-13 11:45:41 -06:00
Sean Bowe 434f328446 Integrate new incremental merkle tree implementation into consensus. 2016-04-28 16:07:52 -06:00
Sean Bowe d66877afb3 Added mapSerials consensus rules to prohibit double-spending. 2016-01-19 14:36:09 -07:00
Sean Bowe a8ac403db0 Added mapAnchors consensus rules, finished zcrawpour/zcrawreceive.
Some specifics on consensus changes:
* Transactions must be anchored to a real anchor in the chain.
* Anchors are pushed and popped during ConnectBlock/DisconnectBlock as appropriate.
* DisconnectTip triggers evictions, under some circumstances, of transactions in the
  mempool which are anchored to roots that are no longer valid.
* Commitments append to the tree at the current best root during ConnectBlock.
2016-01-19 14:36:04 -07:00
Wladimir J. van der Laan 7ff9d122e4 Make sure LogPrintf strings are line-terminated
Fix the cases where LogPrint[f] was accidentally called without line
terminator, which resulted in concatenated log lines.

(see e.g. #6492)
2015-09-22 00:43:11 +00:00
jtimon da29ecbcc6 Consensus: MOVEONLY: Move CValidationState from main consensus/validation 2015-05-15 16:05:28 +02:00
Wladimir J. van der Laan 2cc1372190
Merge pull request #5159
b649e03 Create new BlockPolicyEstimator for fee estimates (Alex Morcos)
2015-05-13 17:10:02 +02:00
Alex Morcos b649e03954 Create new BlockPolicyEstimator for fee estimates
This class groups transactions that have been confirmed in blocks into buckets, based on either their fee or their priority.  Then for each bucket, the class calculates what percentage of the transactions were confirmed within various numbers of blocks.  It does this by keeping an exponentially decaying moving history for each bucket and confirm block count of the percentage of transactions in that bucket that were confirmed within that number of blocks.

-Eliminate txs which didn't have all inputs available at entry from fee/pri calcs

-Add dynamic breakpoints and tracking of confirmation delays in mempool transactions

-Remove old CMinerPolicyEstimator and CBlockAverage code

-New smartfees.py

-Pass a flag to the estimation code, using IsInitialBlockDownload as a proxy for when we are still catching up and we shouldn't be counting how many blocks it takes for transactions to be included.

-Add a policyestimator unit test
2015-05-13 10:36:24 -04:00