Commit graph

6690 commits

Author SHA1 Message Date
Alex Morcos 1f09287c66 Make accessing mempool parents and children public 2015-12-01 10:10:25 -05:00
Alex Morcos 7230187b1d Add TxPriority class and comparator 2015-12-01 10:10:25 -05:00
Alex Morcos f3fe83673e Add a score index to the mempool.
The score index is meant to represent the order of priority for being included in a block for miners.  Initially this is set to the transactions modified (by any feeDelta) fee rate.  Index improvements and unit tests by sdaftuar.
2015-12-01 10:10:25 -05:00
Alex Morcos c49d5bc9e6 Store the total sig op count of a tx.
Store sum of legacy and P2SH sig op counts.  This is calculated in AcceptToMemory pool and storing it saves redoing the expensive calculation in block template creation.
2015-12-01 10:10:25 -05:00
Wladimir J. van der Laan 8f0d79e3c8 test: Disable scheduler test manythreads
It causes occasional deadlocks, resulting in false negatives in Travis.

Disable the test for now.
Works around #6540.
2015-12-01 14:43:38 +01:00
Wladimir J. van der Laan bc1f427570
qt: periodic translations update 2015-12-01 13:26:50 +01:00
Wladimir J. van der Laan c0c08c7c68
Merge pull request #7141
aabc897 rpc: Don't translate warning messages (Wladimir J. van der Laan)
2015-12-01 13:21:16 +01:00
Wladimir J. van der Laan a60538bc45
Merge pull request #7143
6da12df qt: use QMetaObject::invokeMethod for cross-thread signaling in clientmodel (Wladimir J. van der Laan)
2015-12-01 13:20:34 +01:00
Wladimir J. van der Laan 2ef5ffa59a
Merge pull request #6915
2d8860e Fix removeForReorg to use MedianTimePast (Suhas Daftuar)
b7fa4aa Don't call removeForReorg if DisconnectTip fails (Suhas Daftuar)
7e49f5f Track coinbase spends in CTxMemPoolEntry (Suhas Daftuar)
bb8ea1f removeForReorg calls once-per-disconnect-> once-per-reorg (Matt Corallo)
474b84a Make indentation in ActivateBestChainStep readable (Matt Corallo)
b0a064c Fix comment in removeForReorg (Matt Corallo)
9b060e5 Fix removal of time-locked transactions during reorg (Matt Corallo)
0c9959a Add failing test checking timelocked-txn removal during reorg (Matt Corallo)
2015-12-01 13:17:34 +01:00
Wladimir J. van der Laan 9afbd96919
Merge pull request #7022
50947ef Change default block priority size to 0 (Alex Morcos)
2015-12-01 12:39:34 +01:00
Wladimir J. van der Laan 6da12dff28 qt: use QMetaObject::invokeMethod for cross-thread signaling in clientmodel
It's surprising to me that Q_EMIT even worked for this.

But it doesn't build in Qt4, so switch back to
`QMetaObject::invokeMethod`. Fixes #7138.
2015-12-01 11:55:10 +01:00
Pavel Janík b212f94dd9 Describe maxmempool and mempoolminfee in the getmempoolinfo RPC help. 2015-12-01 11:26:32 +01:00
Luke Dashjr 02354c93be Constrain rpcport default values to a single location in code 2015-12-01 10:18:18 +00:00
Wladimir J. van der Laan 8f761e87c3
Merge pull request #7136
fa19a58 HelpMessage: Don't hide -mintxfee behind showDebug (MarcoFalke)
faffc17 rpcwallet: Clarify what settxfee does (MarcoFalke)
9999cb0 Fix url in .travis.yml (MarcoFalke)
fa22a10 contrib: Del. gitian downloader config and update gitian README (MarcoFalke)
fad3035 [doc] Minor markdown fixes (MarcoFalke)
2015-12-01 10:23:05 +01:00
Wladimir J. van der Laan 327291af02
Merge pull request #6914
114b581 Prevector type (Pieter Wuille)
2015-12-01 10:22:14 +01:00
Wladimir J. van der Laan aabc897801 rpc: Don't translate warning messages
But keep translating them in the GUI.
This - necessarily - requires duplication of a few messages.
Alternative take on #7134, that keeps the translations from being wiped.

Also document GetWarnings() input argument.

Fixes #5895.
2015-12-01 10:07:22 +01:00
Wladimir J. van der Laan 9490bd71bd
Merge pull request #7096
ff723da [Qt] improve minimum absolute fee option - Only display the minimum absolute fee control if CoinControl is enabled (Jonas Schnelli)
31b508a [Qt] make use of the nMinimumTotalFee (absolute) in coincontrols fee calculation (Jonas Schnelli)
80462dd [Qt] use ASYMP_UTF8 (≈) whenever we show a fee that is not absolute (Jonas Schnelli)
ecc7c82 Move fPayAtLeastCustomFee function to CC (Pieter Wuille)
2015-12-01 09:59:03 +01:00
Wladimir J. van der Laan 30c2d8c635
Merge pull request #7105
9ac63d6 Keep track of explicit wallet conflicts instead of using mempool (Pieter Wuille)
2015-12-01 09:22:08 +01:00
Wladimir J. van der Laan 1b5118bfa0
Merge pull request #7079
ebb25f4 Limit setAskFor and retire requested entries only when a getdata returns. (Gregory Maxwell)
5029698 prevent peer flooding request queue for an inv (kazcw)
2015-12-01 09:02:33 +01:00
Gregory Maxwell c143c499c8
Merge pull request #7072
996d311 [RPC] Add transaction size to JSON output (Nick)
2015-11-30 22:58:43 -08:00
Alex Morcos 50947ef23f Change default block priority size to 0
Make RPC tests have a default block priority size of 50000 (the old default) so we can still use free transactions in RPC tests.  When priority is eliminated, we will have to make a different change if we want to continue allowing free txs.
2015-11-30 16:16:24 -05:00
Gregory Maxwell 438ee59839
Merge pull request #7044
d52fbf0 Added additional config option for multiple RPC users. (Gregory Sanders)
2015-11-30 12:25:28 -08:00
Suhas Daftuar 2d8860e820 Fix removeForReorg to use MedianTimePast 2015-11-30 14:35:17 -05:00
Suhas Daftuar b7fa4aa387 Don't call removeForReorg if DisconnectTip fails 2015-11-30 13:12:55 -05:00
Suhas Daftuar 7e49f5f8b4 Track coinbase spends in CTxMemPoolEntry
This allows us to optimize CTxMemPool::removeForReorg.
2015-11-30 13:12:53 -05:00
Matt Corallo bb8ea1f630 removeForReorg calls once-per-disconnect-> once-per-reorg 2015-11-30 13:03:57 -05:00
Matt Corallo 474b84a741 Make indentation in ActivateBestChainStep readable 2015-11-30 13:03:56 -05:00
Matt Corallo b0a064c4b8 Fix comment in removeForReorg 2015-11-30 13:02:05 -05:00
Matt Corallo 9b060e5cfb Fix removal of time-locked transactions during reorg 2015-11-30 13:02:04 -05:00
MarcoFalke fa19a588b9 HelpMessage: Don't hide -mintxfee behind showDebug 2015-11-30 18:02:12 +01:00
MarcoFalke faffc172ec rpcwallet: Clarify what settxfee does 2015-11-30 18:01:43 +01:00
Wladimir J. van der Laan 34e02e0147
Merge pull request #7094
1bb289f Assert now > 0 in GetTime GetTimeMillis GetTimeMicros (Patick Strateman)
2015-11-30 14:49:57 +01:00
Wladimir J. van der Laan eb7741605b
Merge pull request #7008
c035306 Change GetPriority calculation. (Alex Morcos)
71f1d9f Modify variable names for entry height and priority (Alex Morcos)
5945819 Remove default arguments for CTxMemPoolEntry() (Alex Morcos)
2015-11-30 14:37:05 +01:00
Wladimir J. van der Laan 9b8fc6c89a
Merge pull request #7035
4531fc4 torcontrol: only output disconnect if -debug=tor (Daniel Cousens)
2015-11-30 14:20:22 +01:00
Jonas Schnelli ff723da6f6
[Qt] improve minimum absolute fee option
- Only display the minimum absolute fee control if CoinControl is enabled
2015-11-30 14:18:57 +01:00
Jonas Schnelli 31b508a18b
[Qt] make use of the nMinimumTotalFee (absolute) in coincontrols fee calculation 2015-11-30 14:09:05 +01:00
Jonas Schnelli 80462dda0a
[Qt] use ASYMP_UTF8 (≈) whenever we show a fee that is not absolute 2015-11-30 14:09:04 +01:00
Pieter Wuille ecc7c82361
Move fPayAtLeastCustomFee function to CC 2015-11-30 14:09:04 +01:00
Wladimir J. van der Laan 96b802510d
Merge pull request #7112
9af5f9c Move uiInterface.NotifyBlockTip signal above the core/wallet signal - This will keep getbestblockhash more in sync with blocknotify callbacks (Jonas Schnelli)
4082e46 [Qt] call GuessVerificationProgress synchronous during core signal, pass double over UI signal (Jonas Schnelli)
947d20b [Qt] reduce cs_main in getVerificationProgress() (Jonas Schnelli)
e6d50fc [Qt] update block tip (height and date) without locking cs_main, update always (each block) (Jonas Schnelli)
012fc91 NotifyBlockTip signal: switch from hash (uint256) to CBlockIndex* - also adds a boolean for indication if the tip update was happening during initial sync - emit notification also during initial sync (Jonas Schnelli)
2015-11-30 13:04:29 +01:00
Gregory Maxwell d41e44c9ac Actually only use filterInventoryKnown with MSG_TX inventory messages.
Previously this logic could erroneously filter a MSG_BLOCK inventory message.
2015-11-30 12:53:48 +01:00
Patick Strateman b6a0da45db Only use filterInventoryKnown with MSG_TX inventory messages.
Previously this logic could erroneously filter a MSG_BLOCK inventory message.
2015-11-30 12:53:48 +01:00
Patick Strateman 6b849350ab Rename setInventoryKnown filterInventoryKnown 2015-11-30 12:53:48 +01:00
Gregory Maxwell e20672479e Remove mruset as it is no longer used. 2015-11-30 12:53:48 +01:00
Gregory Maxwell ec73ef37ec Replace setInventoryKnown with a rolling bloom filter.
Mruset setInventoryKnown was reduced to a remarkably small 1000
 entries as a side effect of sendbuffer size reductions in 2012.

This removes setInventoryKnown filtering from merkleBlock responses
 because false positives there are especially unattractive and
 also because I'm not sure if there aren't race conditions around
 the relay pool that would cause some transactions there to
 be suppressed. (Also, ProcessGetData was accessing
 setInventoryKnown without taking the required lock.)
2015-11-30 12:53:48 +01:00
Daniel Cousens 4531fc4272 torcontrol: only output disconnect if -debug=tor 2015-11-30 22:20:43 +11:00
Wladimir J. van der Laan a7751824ce
Merge pull request #7103
fa506c0 [wallet] Add rpc tests to verify fee calculations (MarcoFalke)
4b89f01 Default fPayAtLeastCustomFee to false (Ryan Havar)
2015-11-30 12:18:20 +01:00
Jonas Schnelli 9af5f9cb87
Move uiInterface.NotifyBlockTip signal above the core/wallet signal
- This will keep getbestblockhash more in sync with blocknotify callbacks
2015-11-30 11:34:09 +01:00
Wladimir J. van der Laan 9ebedc1756
Merge pull request #7126
fa4b627 Move blocksonly parameter interaction to InitParameterInteraction() (MarcoFalke)
2015-11-30 11:34:09 +01:00
Wladimir J. van der Laan 74b5ce24c6
Merge pull request #7116
cb491e7 Trivial: Fix warning introduced by #7053 by casting to uint64_t (Jorge Timón)
2015-11-30 10:18:46 +01:00
Jonas Schnelli fa93174a7c
Merge pull request #7127
a6cbc02 Bugfix: Default -uiplatform is not actually the platform this build was compiled on (Luke Dashjr)
2015-11-30 09:14:42 +01:00
Jonas Schnelli c28d3937b0
Merge pull request #7025
2a8e8c2 [Qt] don't allow to store invalid proxy ports (Jonas Schnelli)
d16d1b7 [Qt] refactor and optimize proxy settings behavior (Jonas Schnelli)
2015-11-30 09:08:29 +01:00
Jonas Schnelli 4082e46603
[Qt] call GuessVerificationProgress synchronous during core signal, pass double over UI signal 2015-11-30 08:53:57 +01:00
Jonas Schnelli 947d20b84a
[Qt] reduce cs_main in getVerificationProgress() 2015-11-30 08:50:59 +01:00
Jonas Schnelli e6d50fcdec
[Qt] update block tip (height and date) without locking cs_main, update always (each block) 2015-11-30 08:50:59 +01:00
Jonas Schnelli 012fc91511
NotifyBlockTip signal: switch from hash (uint256) to CBlockIndex*
- also adds a boolean for indication if the tip update was happening during initial sync
- emit notification also during initial sync
2015-11-30 08:50:59 +01:00
Jorge Timón cb491e7788 Trivial: Fix warning introduced by #7053 by casting to uint64_t 2015-11-29 21:19:37 +01:00
Gregory Sanders d52fbf00e3 Added additional config option for multiple RPC users. 2015-11-29 08:34:20 -05:00
Pieter Wuille 9ac63d6d30 Keep track of explicit wallet conflicts instead of using mempool 2015-11-29 13:24:02 +01:00
Suhas Daftuar 50262d8953 Allow block announcements with headers
This replaces using inv messages to announce new blocks, when a peer requests
(via the new "sendheaders" message) that blocks be announced with headers
instead of inv's.

Since headers-first was introduced, peers send getheaders messages in response
to an inv, which requires generating a block locator that is large compared to
the size of the header being requested, and requires an extra round-trip before
a reorg can be relayed.  Save time by tracking headers that a peer is likely to
know about, and send a headers chain that would connect to a peer's known
headers, unless the chain would be too big, in which case we revert to sending
an inv instead.

Based off of @sipa's commit to announce all blocks in a reorg via inv,
which has been squashed into this commit.

Rebased-by: Pieter Wuille
2015-11-29 11:59:23 +01:00
Gregory Maxwell c894fbbb1d
Merge pull request #7106
a9f3d3d Fix and improve relay from whitelisted peers (Pieter Wuille)
2015-11-28 16:09:40 -08:00
Ryan Havar 4b89f01d72 Default fPayAtLeastCustomFee to false
This allows for much finer control of the transaction fees per kilobyte
as it prevent small transactions using a fee that is more appropriate
for one that is of a kilobyte.

This also allows controlling the fee per kilobyte over rpc such that:

bitcoin-cli settxfee `bitcoin-cli estimatefee 2`

would make sense, while currently it grossly fails often by a factor of x3
2015-11-28 22:51:41 +01:00
Luke Dashjr a6cbc02b6b Bugfix: Default -uiplatform is not actually the platform this build was compiled on 2015-11-28 21:48:17 +00:00
Pieter Wuille 61457c29d7
Merge pull request #6508
eece63f Switch blocks to a constant-space Merkle root/branch algorithm. (Pieter Wuille)
ee60e56 Add merkle.{h,cpp}, generic merkle root/branch algorithm (Pieter Wuille)
2015-11-28 22:27:38 +01:00
MarcoFalke fa4b627269 Move blocksonly parameter interaction to InitParameterInteraction() 2015-11-28 22:26:50 +01:00
MarcoFalke fa41d4c8c6 [qt] Move GUI related HelpMessage() part downstream 2015-11-28 19:01:26 +01:00
MarcoFalke faf93f37fe [trivial] Reuse translation and cleanup DEFAULT_* values
* DEFAULT_DISABLE_SAFEMODE = false
* Use DEFAULT_* constants for extern bools
2015-11-28 19:01:11 +01:00
Pieter Wuille 086ee67d83 Switch to a more efficient rolling Bloom filter
For each 'bit' in the filter we really maintain 2 bits, which store either:
0: not set
1-3: set in generation N

After (nElements / 2) insertions, we switch to a new generation, and wipe
entries which already had the new generation number, effectively switching
from the last 1.5 * nElements set to the last 1.0 * nElements set.

This is 25% more space efficient than the previous implementation, and can
(at peak) store 1.5 times the requested amount of history (though only
1.0 times the requested history is guaranteed).

The existing unit tests should be sufficient.
2015-11-28 18:53:55 +01:00
Luke Dashjr 3307bdb333 Bugfix: Omit wallet-related options from -help when wallet is not supported 2015-11-28 18:47:29 +01:00
Luke Dashjr b966aa836a Constrain constant values to a single location in code 2015-11-28 18:47:29 +01:00
Nick 996d3117c7 [RPC] Add transaction size to JSON output
This may be useful for blockchain explorers.
2015-11-28 17:06:56 +03:00
Pieter Wuille 92aa7311d6
Merge pull request #6942
e482a7f Fix CCoins serialization documentation (Peter Josling)
2015-11-28 14:17:50 +01:00
paveljanik a64d7b4e42 Print correct minimum mempool size in MB 2015-11-27 16:44:30 +01:00
Pieter Wuille eece63fa72 Switch blocks to a constant-space Merkle root/branch algorithm.
This switches the Merkle tree logic for blocks to one that runs in constant (small) space.
The old code is moved to tests, and a new test is added that for various combinations of
block sizes, transaction positions to compute a branch for, and mutations:
 * Verifies that the old code and new code agree for the Merkle root.
 * Verifies that the old code and new code agree for the Merkle branch.
 * Verifies that the computed Merkle branch is valid.
 * Verifies that mutations don't change the Merkle root.
 * Verifies that mutations are correctly detected.
2015-11-27 15:36:52 +01:00
Pieter Wuille ee60e5625b Add merkle.{h,cpp}, generic merkle root/branch algorithm 2015-11-27 15:31:01 +01:00
Wladimir J. van der Laan 93e0514fd0
Merge pull request #7078
c434940 uint256::GetCheapHash bigendian compatibility (daniel)
2015-11-27 15:24:41 +01:00
Wladimir J. van der Laan f3d0fdd392
Merge pull request #7114
9b63758 util: Don't set strMiscWarning on every exception (Wladimir J. van der Laan)
2015-11-27 15:11:36 +01:00
Wladimir J. van der Laan d6454f6cb2
Merge pull request #7090
cde857f Connect to Tor hidden services by default (Peter Todd)
2015-11-27 15:07:49 +01:00
Wladimir J. van der Laan d8368a07ba
Merge pull request #7095
4ec3561 Replace scriptnum_test's normative ScriptNum implementation (Wladimir J. van der Laan)
2015-11-27 14:16:55 +01:00
Wladimir J. van der Laan 9502b7f634
Merge pull request #7083
faf12bc OpenSSL 1.1.0: Fix text variant of the version number (MarcoFalke)
2015-11-27 14:08:40 +01:00
Wladimir J. van der Laan 2a94cd67e8
Merge pull request #6780
a46f87f Initialize logging before we do parameter interaction (Jonas Schnelli)
df66147 Move -blocksonly parameter interaction to the new ParameterInteraction() function (Jonas Schnelli)
68354e7 [QT] Call inits parameter interaction before we create the options model (Jonas Schnelli)
411b05a Refactor parameter interaction, call it before AppInit2() (Jonas Schnelli)
2015-11-27 13:45:14 +01:00
Wladimir J. van der Laan 9b63758974 util: Don't set strMiscWarning on every exception
Fixes #6809 - run-of-the-mill exceptions should not get into
strMiscWarning (which is reported by `getinfo`).
2015-11-27 13:36:11 +01:00
Wladimir J. van der Laan 5ca149a3db
Merge pull request #7053
2e29e7e Globals: Remove a bunch of Params() calls from main.cpp: (Jorge Timón)
2015-11-27 13:29:54 +01:00
Jonas Schnelli a46f87f0c1
Initialize logging before we do parameter interaction 2015-11-27 13:26:28 +01:00
Jonas Schnelli df66147613
Move -blocksonly parameter interaction to the new ParameterInteraction() function 2015-11-27 13:26:28 +01:00
Jonas Schnelli 68354e75e9
[QT] Call inits parameter interaction before we create the options model 2015-11-27 13:26:01 +01:00
Jonas Schnelli 411b05ac95
Refactor parameter interaction, call it before AppInit2() 2015-11-27 13:26:00 +01:00
Wladimir J. van der Laan 0e935865b9
Merge pull request #6871
63b5840 Fix usage of local python-bitcoinlib (Peter Todd)
16a2f93 Fix incorrect locking of mempool during RBF replacement (Peter Todd)
97203f5 Port test to rpc-test framework (Suhas Daftuar)
20367d8 Add test for max replacement limit (Suhas Daftuar)
73d9040 Improve RBF replacement criteria (Suhas Daftuar)
b272ecf Reject replacements that add new unconfirmed inputs (Peter Todd)
fc8c19a Prevent low feerate txs from (directly) replacing high feerate txs (Peter Todd)
0137e6f Add tests for transaction replacement (Peter Todd)
5891f87 Add opt-in full-RBF to mempool (Peter Todd)
2015-11-27 13:20:39 +01:00
Wladimir J. van der Laan e92377fa7f
Merge pull request #6134
e304432 Pass reference to estimateSmartFee and cleanup whitespace (Suhas Daftuar)
56106a3 Expose RPC calls for estimatesmart functions (Alex Morcos)
e93a236 add estimateSmartFee to the unit test (Alex Morcos)
6303051 EstimateSmart functions consider mempool min fee (Alex Morcos)
f22ac4a Increase success threshold for fee estimation to 95% (Alex Morcos)
4fe2823 Change wallet and GUI code to use new smart fee estimation calls. (Alex Morcos)
22eca7d Add smart fee estimation functions (Alex Morcos)
2015-11-27 12:59:37 +01:00
Wladimir J. van der Laan 05d591839f
Merge pull request #5967
072e2f8 Alter assumptions in CCoinsViewCache::BatchWrite (Alex Morcos)
2015-11-27 12:44:00 +01:00
Wladimir J. van der Laan 9a3e1a59df
Merge pull request #7058
ffacd27 zmq: prepend zmq to debug messages (Daniel Cousens)
14075b1 init: add zmq to debug categories (Daniel Cousens)
cdcd816 init: amend ZMQ flag names (Daniel Cousens)
2015-11-27 10:12:43 +01:00
Pieter Wuille a9f3d3db5c Fix and improve relay from whitelisted peers
This makes sure that retransmits by a whitelisted peer also actually
result in a retransmit.

Further, this changes the logic to never relay in case we would assign
a DoS score, as we expect to get DoS banned ourselves as a result.
2015-11-26 23:44:57 +01:00
Wladimir J. van der Laan f8a8e27a6a
Merge pull request #7069
fa472f3 [trivial] Fix -maxmempool InitError (MarcoFalke)
2015-11-26 11:18:31 +01:00
Peter Todd cde857f2d9
Connect to Tor hidden services by default
Adds 127.0.0.1:9050 for the .onion proxy if we can succesfully connect
to the control port.

Natural followup to creating hidden services automatically.
2015-11-26 05:14:31 -05:00
Wladimir J. van der Laan be281d8a83
Merge pull request #7087
9cf6688 Document both the peerbloomfilters and enforcenodebloom options. (Patick Strateman)
0f4dc53 Add enforcenodebloom option. (Patick Strateman)
b3caa9b Move bloom filter filtering logic outside of command "switch" (giant if/else). (Patick Strateman)
2015-11-26 08:43:21 +01:00
Wladimir J. van der Laan 4ec3561eb3 Replace scriptnum_test's normative ScriptNum implementation
Compare against the scriptnum from Bitcoin Core 0.10 instead of OpenSSL.
Closes #7086.
2015-11-25 13:59:49 +01:00
Wladimir J. van der Laan 2b2ddc558e
Merge pull request #7088
5ad5463 Squashed 'src/secp256k1/' changes from 2bfb82b..6c527ec (MarcoFalke)
2015-11-25 11:31:59 +01:00
daniel c434940e83 uint256::GetCheapHash bigendian compatibility 2015-11-25 16:19:24 +08:00
Jonas Schnelli 26af1ac7cb
Merge pull request #7006
f71bfef add UI help for -resetguisettings (Jonas Schnelli)
ae98388 [Qt] add startup option to reset Qt settings (Jonas Schnelli)
2015-11-25 09:05:19 +01:00
Patick Strateman 1bb289fe1b Assert now > 0 in GetTime GetTimeMillis GetTimeMicros
Previously all of these functions could return negative values (for different
readons).  Large portions of the codebase currently assume that these
functions return positive values.
2015-11-24 18:39:19 -08:00
Wladimir J. van der Laan b19fe277dd
Merge pull request #7075
4846543 Move time data log print to 'net' category to reduce log noise (tulip)
2015-11-24 16:02:02 +01:00
Suhas Daftuar e30443244a Pass reference to estimateSmartFee and cleanup whitespace 2015-11-24 08:53:14 -05:00
MarcoFalke fa472f330f [trivial] Fix -maxmempool InitError 2015-11-24 12:40:59 +01:00
Patick Strateman 9cf668844e Document both the peerbloomfilters and enforcenodebloom options. 2015-11-24 02:08:00 -08:00
Patick Strateman 0f4dc53fd6 Add enforcenodebloom option.
Previously peers which implement a protocol version less than NO_BLOOM_VERSION
would not be disconnected for sending a filter command, regardless of the
peerbloomfilter option.

Many node operators do not wish to provide expensive bloom filtering for SPV
clients, previously they had to cherry pick the commit which enabled the
disconnect logic.

The default should remain false until a sufficient percent of SPV clients
have updated.
2015-11-24 02:08:00 -08:00
Wladimir J. van der Laan 02a0f348c2
Merge pull request #7066
5c2fd38 Add missing "blocktime" description to listtransactions help, fix formatting. (Pavel Janík)
2015-11-24 10:55:36 +01:00
Patick Strateman b3caa9b7fa Move bloom filter filtering logic outside of command "switch" (giant if/else).
Moving this logic outside of the "switch" makes it far simpler to
enable the forced disconnect by a parameter.
2015-11-24 01:50:53 -08:00
Wladimir J. van der Laan 72dccfc29d
Merge pull request #7045
2aa49ce Bugfix: Use unique autostart filenames on Linux for testnet/regtest (Luke Dashjr)
2015-11-24 09:51:02 +01:00
MarcoFalke fa63e49b35 Merge commit '5ad54630935d1f340666de7bc9ffef9b8a1df296' into HEAD 2015-11-24 09:22:18 +01:00
MarcoFalke faf12bc283 OpenSSL 1.1.0: Fix text variant of the version number 2015-11-24 09:07:26 +01:00
Wladimir J. van der Laan f91e29fd4d
Merge pull request #7065
3522f49 http: add Boost 1.49 compatibility (Wladimir J. van der Laan)
2015-11-24 08:42:29 +01:00
Jorge Timón 2e29e7e247 Globals: Remove a bunch of Params() calls from main.cpp:
1) Chainparams: Explicit CChainParams arg for main:

-AcceptBlock
-AcceptBlockHeader
-ActivateBestChain
-ConnectTip
-InitBlockIndex
-LoadExternalBlockFile
-VerifyDB parametric constructor

2) Also pickup more Params()\. in main.cpp

3) Pass nPruneAfterHeight explicitly to new FindFilesToPrune() in main.cpp
2015-11-23 12:14:40 +01:00
Gregory Maxwell ebb25f4c23 Limit setAskFor and retire requested entries only when a getdata returns.
The setAskFor duplicate elimination was too eager and removed entries
 when we still had no getdata response, allowing the peer to keep
 INVing and not responding.
2015-11-23 01:54:23 +00:00
kazcw 5029698186 prevent peer flooding request queue for an inv
mapAlreadyAskedFor does not keep track of which peer has a request queued for a
particular tx. As a result, a peer can blind a node to a tx indefinitely by
sending many invs for the same tx, and then never replying to getdatas for it.
Each inv received will be placed 2 minutes farther back in mapAlreadyAskedFor,
so a short message containing 10 invs would render that tx unavailable for 20
minutes.

This is fixed by disallowing a peer from having more than one entry for a
particular inv in mapAlreadyAskedFor at a time.
2015-11-23 01:18:54 +00:00
Gregory Maxwell c322652b71
Merge pull request #7046
80ae230 Improve log messages for blocks only violations. (Patick Strateman)
08843ed Add relaytxes status to getpeerinfo (Peter Todd)
d8aaa51 Bail early in processing transactions in blocks only mode. (Patick Strateman)
3587f6a Fix relay mechanism for whitelisted peers under blocks only mode. (Patick Strateman)
2015-11-22 14:01:33 -08:00
tulip 4846543ac5 Move time data log print to 'net' category to reduce log noise 2015-11-22 06:48:25 +00:00
Patick Strateman 80ae230a52 Improve log messages for blocks only violations. 2015-11-21 16:09:52 -08:00
Gregory Maxwell 31de2414c6
Merge pull request #7011
6531f17 Add mediantime field to getblock and getblockheader (Peter Todd)
7259769 Document new mediantime field in getblockchaininfo (Peter Todd)
c277a63 Clarify nLockTime-by-time comment in CheckFinalTx() (Peter Todd)
748321e Add mediantime field to getblockchaininfo RPC call (Peter Todd)
2015-11-21 14:00:55 -08:00
Gregory Maxwell 616d61b20d
Merge pull request #6851
3e7c891 Optimisation: Store transaction list order in memory rather than compute it every need (Luke Dashjr)
2015-11-20 18:52:44 -08:00
Luke Dashjr 3e7c89196c Optimisation: Store transaction list order in memory rather than compute it every need
Huge performance improvement (450%) for zapwallettxes
2015-11-21 01:48:25 +00:00
Peter Todd 08843ed998 Add relaytxes status to getpeerinfo 2015-11-20 16:07:12 -08:00
Patick Strateman d8aaa51bec Bail early in processing transactions in blocks only mode.
Previously unsolicited transactions would be processed as normal.
2015-11-20 16:07:12 -08:00
Patick Strateman 3587f6a024 Fix relay mechanism for whitelisted peers under blocks only mode.
Previously in blocks only mode all inv messages where type!=MSG_BLOCK would be
rejected without regard for whitelisting or whitelistalwaysrelay.

As such whitelisted peers would never send the transaction (which would be
processed).
2015-11-20 16:07:12 -08:00
Wladimir J. van der Laan 776848acef
Merge pull request #6979
c197798 [Qt] simple mempool info in debug window (Jonas Schnelli)
2015-11-20 14:34:11 +01:00
Pavel Janík 5c2fd38d05 Add missing "blocktime" description to listtransactions help, fix formatting. 2015-11-20 12:51:36 +01:00
Wladimir J. van der Laan 3522f49f5a http: add Boost 1.49 compatibility
`try_join_for` was introduced in Boost 1.50:
http://www.boost.org/doc/libs/1_50_0/doc/html/thread/thread_management.html#thread.thread_management.thread.try_join_for

1.49 has `timed_join`, one can accomplish the same with:
http://www.boost.org/doc/libs/1_49_0/doc/html/thread/thread_management.html#thread.thread_management.thread.timed_join

However, `timed_join` was deprecated in 1.50. So a conditional is
necessary.

This solution was tested in #7031.
2015-11-20 10:14:21 +01:00
Jonas Schnelli c197798d1b
[Qt] simple mempool info in debug window 2015-11-20 08:40:43 +01:00
Alex Morcos c0353064dd Change GetPriority calculation.
Compute the value of inputs that already are in the chain at time of mempool entry and only increase priority due to aging for those inputs.  This effectively changes the CTxMemPoolEntry's GetPriority calculation from an upper bound to a lower bound.
2015-11-19 21:44:35 -05:00
Alex Morcos 71f1d9fd4a Modify variable names for entry height and priority 2015-11-19 21:28:01 -05:00
Alex Morcos 5945819717 Remove default arguments for CTxMemPoolEntry() 2015-11-19 21:28:01 -05:00
Wladimir J. van der Laan 52c563710d
qt: Periodic translations update 2015-11-19 12:58:09 +01:00
Wladimir J. van der Laan a1907772f0
Merge pull request #7051
b4f3e9c ui: Add "Copy raw transaction data" to transaction list context menu (Wladimir J. van der Laan)
2015-11-19 12:52:27 +01:00
Wladimir J. van der Laan b4f3e9c09e ui: Add "Copy raw transaction data" to transaction list context menu
Add a way to quickly copy transaction hex.

Primarily useful when manually submitting transactions,
e.g. `-walletbroadcast=0` is set.
2015-11-19 11:08:29 +01:00
Daniel Cousens ffacd27def zmq: prepend zmq to debug messages 2015-11-19 13:32:14 +11:00
Daniel Cousens 14075b189d init: add zmq to debug categories 2015-11-19 13:17:36 +11:00
Daniel Cousens cdcd816a1b init: amend ZMQ flag names 2015-11-19 12:34:19 +11:00
Jonas Schnelli f71bfefcb0
add UI help for -resetguisettings 2015-11-18 21:50:32 +01:00
Alex Morcos 072e2f8644 Alter assumptions in CCoinsViewCache::BatchWrite
Previously it would break if you flushed a parent cache while there was a child cache referring to it.  This change will allow the flushing of parent caches.
2015-11-18 12:03:50 -05:00
Wladimir J. van der Laan 73fa5e6043
Merge pull request #6932
1cf3dd8 Add unit test for UpdateCoins (Alex Morcos)
03c8282 Make CCoinsViewTest behave like CCoinsViewDB (Alex Morcos)
14470f9 ModifyNewCoins saves database lookups (Alex Morcos)
2015-11-18 17:37:58 +01:00
Jonas Schnelli 03403d8c0f
Merge pull request #6951
513686d [qt] Use maxTxFee instead of 10000000 (MarcoFalke)
2015-11-18 14:28:21 +01:00
Jonas Schnelli 2a8e8c2e37
[Qt] don't allow to store invalid proxy ports 2015-11-18 14:02:14 +01:00
Alex Morcos e855b0152f Fix debug log message for block files 2015-11-17 22:23:39 -05:00
Luke Dashjr 2aa49ce9fe Bugfix: Use unique autostart filenames on Linux for testnet/regtest 2015-11-17 20:31:00 +00:00
Alex Morcos e587bc3fd9 Implement helper class for CTxMemPoolEntry constructor
This is only for unit tests.
2015-11-16 20:41:32 -05:00
Gregory Maxwell 87ee0e2dbc
Merge pull request #6986
6bc9e40 Chainparams: Explicit CChainParams arg for miner: (Jorge Timón)
598e494 Chainparams: Explicit CChainParams arg for main (pre miner): (Jorge Timón)
2015-11-16 17:00:11 -08:00
Gregory Maxwell 972bf9c529
Merge pull request #6999
f6d9d5e add (max)uploadtarget infos to getnettotals RPC help (Jonas Schnelli)
2015-11-16 16:39:33 -08:00
Gregory Maxwell 0a547d2d55
Merge pull request #7023
4d29032 Fixed integer comparison warning. (Eric Lombrozo)
2015-11-16 16:34:51 -08:00
Alex Morcos 56106a3300 Expose RPC calls for estimatesmart functions
Also add testing for estimatesmartfee in smartfees.py
2015-11-16 15:42:31 -05:00
Alex Morcos e93a236d7a add estimateSmartFee to the unit test 2015-11-16 15:33:06 -05:00
Alex Morcos 6303051470 EstimateSmart functions consider mempool min fee 2015-11-16 15:33:06 -05:00
Alex Morcos f22ac4a22c Increase success threshold for fee estimation to 95%
This provides more conservative estimates and reacts more quickly to a backlog.
Unfortunately the unit test for fee estimation depends on the success threshold (and the decay) chosen; also modify the unit test for the new default success thresholds.
2015-11-16 15:33:06 -05:00