Commit graph

6690 commits

Author SHA1 Message Date
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
Alex Morcos 4fe28236c0 Change wallet and GUI code to use new smart fee estimation calls. 2015-11-16 15:33:06 -05:00
Alex Morcos 22eca7da22 Add smart fee estimation functions
These are more useful fee and priority estimation functions. If there is no fee/pri high enough for the target you are aiming for, it will give you the estimate for the lowest target that you can reliably obtain.  This is better than defaulting to the minimum.  It will also pass back the target for which it returned an answer.
2015-11-16 15:33:06 -05:00
Wladimir J. van der Laan e54ebbf600
Merge pull request #6954
6e18268 Switch to libsecp256k1-based validation for ECDSA (Pieter Wuille)
2015-11-16 13:25:18 +01:00
Wladimir J. van der Laan dafefb7924
Merge pull request #7016
aee22bf Avoid a compile error on hosts with libevent too old for EVENT_LOG_WARN. (Gregory Maxwell)
2015-11-16 12:03:19 +01:00
Jonas Schnelli d16d1b72d1
[Qt] refactor and optimize proxy settings behavior 2015-11-16 11:05:26 +01:00
Gregory Maxwell aee22bf288 Avoid a compile error on hosts with libevent too old for EVENT_LOG_WARN.
This uses _EVENT_LOG_WARN instead, which appears to be defined in the
 old versions of libevent that I have on some systems.
2015-11-16 09:21:54 +00:00
Gregory Maxwell 6876a78b86
Merge pull request #6991
9bd3f03 Clarify 'fee' field in fundrawtransaction help text (Peter Todd)
2015-11-16 00:38:08 -08:00
Jonas Schnelli 814697c556
Merge pull request #7000
773ae46 [Qt] add shortcurts for debug-/console-window (Jonas Schnelli)
2015-11-16 08:39:42 +01:00
Eric Lombrozo 4d29032a64 Fixed integer comparison warning. 2015-11-15 20:13:30 -05:00
Pieter Wuille 6e18268616 Switch to libsecp256k1-based validation for ECDSA 2015-11-15 16:06:57 +01:00
Gregory Maxwell b632145ede
Merge pull request #6993
bbf49da Fix comment for blocksonly parameter interactions (Patick Strateman)
6a4982f Fix fRelayTxs comment (Patick Strateman)
59441a0 Display DEFAULT_WHITELISTALWAYSRELAY in help text (Patick Strateman)
71a2683 Use DEFAULT_BLOCKSONLY and DEFAULT_WHITELISTALWAYSRELAY constants (Patick Strateman)
762b13b Add help text for blocksonly and whitelistalwaysrelay (Patick Strateman)
3a96497 Add whitelistalwaysrelay option (Patick Strateman)
420fa81 Do not process tx inv's in blocksonly mode (Patick Strateman)
4044f07 Add blocksonly mode (Patick Strateman)
2015-11-14 05:23:00 -08:00
Patick Strateman bbf49da408 Fix comment for blocksonly parameter interactions 2015-11-14 05:14:01 -08:00
Patick Strateman 6a4982fb83 Fix fRelayTxs comment 2015-11-14 05:12:31 -08:00
Patick Strateman 59441a0445 Display DEFAULT_WHITELISTALWAYSRELAY in help text 2015-11-14 05:12:05 -08:00
Patick Strateman 71a2683f4b Use DEFAULT_BLOCKSONLY and DEFAULT_WHITELISTALWAYSRELAY constants 2015-11-14 05:10:59 -08:00
Patick Strateman 762b13b4d8 Add help text for blocksonly and whitelistalwaysrelay 2015-11-14 04:54:01 -08:00
Patick Strateman 3a964973fe Add whitelistalwaysrelay option 2015-11-14 04:52:21 -08:00
Patick Strateman 420fa8143a Do not process tx inv's in blocksonly mode 2015-11-14 04:52:21 -08:00
Patick Strateman 4044f07d1c Add blocksonly mode 2015-11-14 04:52:21 -08:00
Gregory Maxwell 9ffc687288
Merge pull request #6984
e495ed5 add documentation for exluding whitelistes peer from maxuploadtarget (Jonas Schnelli)
5760749 [docs] rename reducetraffic.md to reduce-traffic.md (Jonas Schnelli)
d61fcff don't enforce maxuploadtargets disconnect for whitelisted peers (Jonas Schnelli)
2015-11-13 23:54:36 -08:00
Wladimir J. van der Laan 36baa9f475
Merge pull request #7013
b3ae384 Remove LOCK(cs_main) from decodescript (Peter Todd)
2015-11-14 08:24:44 +01:00
Peter Todd b3ae384a8d
Remove LOCK(cs_main) from decodescript
Completely static RPC call that doesn't change or even look at mutable
state anywhere.
2015-11-13 17:19:33 -05:00
Peter Todd 6531f17a78
Add mediantime field to getblock and getblockheader 2015-11-13 16:57:10 -05:00
Peter Todd 7259769d7f Document new mediantime field in getblockchaininfo 2015-11-13 16:49:47 -05:00
Peter Todd c277a63ed7
Clarify nLockTime-by-time comment in CheckFinalTx() 2015-11-13 16:36:54 -05:00
Peter Todd 10953a7d32
Better error message for fundrawtransaction w/ empty vout
Previously this case failed deep in Cwallet::CreateTransaction() with
the error message "Transaction amounts must be positive"
2015-11-13 15:53:46 -05:00
Peter Todd 61e1eb2e1c
Actually use includeWatching value in fundrawtransaction
Previously if you called fundrawtransaction and set includeWatching to
false it'd act as through you set it to true.
2015-11-13 15:45:29 -05:00
Peter Todd 748321eb5b
Add mediantime field to getblockchaininfo RPC call
Useful now that BIP113 is enforced for transactions entering the
mempool. Was previously only (indirectly) available by calling
getblocktemplate, a relatively expensive RPC call.
2015-11-13 15:35:04 -05:00
Jonas Schnelli d61fcff071
don't enforce maxuploadtargets disconnect for whitelisted peers 2015-11-13 21:04:12 +01:00
Gregory Maxwell dbd2c135dd
Merge pull request #6990
a264c32 http: speed up shutdown (Wladimir J. van der Laan)
2015-11-13 11:30:00 -08:00
Wladimir J. van der Laan d3565604e3
Merge pull request #7007
a78e6ea Fix bug in mempool_tests unit test (Alex Morcos)
2015-11-13 18:37:46 +01:00
Pieter Wuille 114b5812f6 Prevector type 2015-11-13 18:15:20 +01:00
Pieter Wuille 4f09b77c7f
Merge pull request #6983
48edf57 Update key.cpp to new secp256k1 API (Pieter Wuille)
1d84107 Squashed 'src/secp256k1/' changes from 22f60a6..2bfb82b (Pieter Wuille)
2015-11-13 16:51:44 +01:00
Alex Morcos a78e6eaf5c Fix bug in mempool_tests unit test 2015-11-13 10:50:49 -05:00
Jonas Schnelli ae98388b22
[Qt] add startup option to reset Qt settings 2015-11-13 16:27:42 +01:00
Wladimir J. van der Laan d2e987aa19
Merge pull request #6958
9c3ee3b [doc] Add -maxuploadtarget release notes (MarcoFalke)
b27e81f [net] Cleanup maxuploadtarget (MarcoFalke)
2015-11-13 13:27:33 +01:00
Wladimir J. van der Laan a264c32e33
http: speed up shutdown
This continues/fixes #6719.

`event_base_loopbreak` was not doing what I expected it to, at least in
libevent 2.0.21.
What I expected was that it sets a timeout, given that no other pending
events it would exit in N seconds. However, what it does was delay the
event loop exit with 10 seconds, even if nothing is pending.

Solve it in a different way: give the event loop thread time to exit
out of itself, and if it doesn't, send loopbreak.

This speeds up the RPC tests a lot, each exit incurred a 10 second
overhead, with this change there should be no shutdown overhead in the
common case and up to two seconds if the event loop is blocking.

As a bonus this breaks dependency on boost::thread_group, as the HTTP
server minds its own offspring.
2015-11-13 11:10:48 +01:00
Pieter Wuille 48edf5746a Update key.cpp to new secp256k1 API 2015-11-13 00:12:53 +01:00
Pieter Wuille 1d84107924 Squashed 'src/secp256k1/' changes from 22f60a6..2bfb82b
2bfb82b Merge pull request #351
06aeea5 Turn secp256k1_ec_pubkey_serialize outlen to in/out
970164d Merge pull request #348
6466625 Improvements for coordinate decompression
e2100ad Merge pull request #347
8e48787 Change secp256k1_ec_pubkey_combine's count argument to size_t.
c69dea0 Clear output in more cases for pubkey_combine, adds tests.
269d422 Comment copyediting.
b4d17da Merge pull request #344
4709265 Merge pull request #345
26abce7 Adds 32 static test vectors for scalar mul, sqr, inv.
5b71a3f Better error case handling for pubkey_create & pubkey_serialize, more tests.
3b7bc69 Merge pull request #343
eed87af Change contrib/laxder from headers-only to files compilable as standalone C
d7eb1ae Merge pull request #342
7914a6e Make lax_der_privatekey_parsing.h not depend on internal code
73f64ff Merge pull request #339
9234391 Overhaul flags handling
1a36898 Make flags more explicit, add runtime checks.
1a3e03a Merge pull request #340
96be204 Add additional tests for eckey and arg-checks.
bb5aa4d Make the tweak function zeroize-output-on-fail behavior consistent.
4a243da Move secp256k1_ec_privkey_import/export to contrib.
1b3efc1 Move secp256k1_ecdsa_sig_recover into the recovery module.
e3cd679 Eliminate all side-effects from VERIFY_CHECK() usage.
b30fc85 Avoid nonce_function_rfc6979 algo16 argument emulation.
70d4640 Make secp256k1_ec_pubkey_create skip processing invalid secret keys.
6c476a8 Minor comment improvements.
131afe5 Merge pull request #334
0c6ab2f Introduce explicit lower-S normalization
fea19e7 Add contrib/lax_der_parsing.h
3bb9c44 Rewrite ECDSA signature parsing code
fa57f1b Use secp256k1_rand_int and secp256k1_rand_bits more
49b3749 Add new tests for the extra testrand functions
f684d7d Faster secp256k1_rand_int implementation
251b1a6 Improve testrand: add extra random functions
31994c8 Merge pull request #338
f79aa88 Bugfix: swap arguments to noncefp
c98df26 Merge pull request #319
67f7da4 Extensive interface and operations tests for secp256k1_ec_pubkey_parse.
ee2cb40 Add ARG_CHECKs to secp256k1_ec_pubkey_parse/secp256k1_ec_pubkey_serialize
7450ef1 Merge pull request #328
68a3c76 Merge pull request #329
98135ee Merge pull request #332
37100d7 improve ECDH header-doc
b13d749 Fix couple of typos in API comments
7c823e3 travis: fixup module configs
cc3141a Merge pull request #325
ee58fae Merge pull request #326
213aa67 Do not force benchmarks to be statically linked.
338fc8b Add API exports to secp256k1_nonce_function_default and secp256k1_nonce_function_rfc6979.
52fd03f Merge pull request #320
9f6993f Remove some dead code.
357f8cd Merge pull request #314
118cd82 Use explicit symbol visibility.
4e64608 Include public module headers when compiling modules.
1f41437 Merge pull request #316
fe0d463 Merge pull request #317
cfe0ed9 Fix miscellaneous style nits that irritate overactive static analysis.
2b199de Use the explicit NULL macro for pointer comparisons.
9e90516 Merge pull request #294
dd891e0 Get rid of _t as it is POSIX reserved
201819b Merge pull request #313
912f203 Eliminate a few unbraced statements that crept into the code.
eeab823 Merge pull request #299
486b9bb Use a flags bitfield for compressed option to secp256k1_ec_pubkey_serialize and secp256k1_ec_privkey_export
05732c5 Callback data: Accept pointers to either const or non-const data
1973c73 Bugfix: Reinitialise buffer lengths that have been used as outputs
788038d Use size_t for lengths (at least in external API)
c9d7c2a secp256k1_context_set_{error,illegal}_callback: Restore default handler by passing NULL as function argument
9aac008 secp256k1_context_destroy: Allow NULL argument as a no-op
64b730b secp256k1_context_create: Use unsigned type for flags bitfield
cb04ab5 Merge pull request #309
a551669 Merge pull request #295
81e45ff Update group_impl.h
85e3a2c Merge pull request #112
b2eb63b Merge pull request #293
dc0ce9f [API BREAK] Change argument order to out/outin/in
6d947ca Merge pull request #298
c822693 Merge pull request #301
6d04350 Merge pull request #303
7ab311c Merge pull request #304
5fb3229 Fixes a bug where bench_sign would fail due to passing in too small a buffer.
263dcbc remove unused assignment
b183b41 bugfix: "ARG_CHECK(ctx != NULL)" makes no sense
6da1446 build: fix parallel build
5eb4356 Merge pull request #291
c996d53 Print success
9f443be Move pubkey recovery code to separate module
d49abbd Separate ECDSA recovery tests
439d34a Separate recoverable and normal signatures
a7b046e Merge pull request #289
f66907f Improve/reformat API documentation secp256k1.h
2f77487 Add context building benchmarks
cc623d5 Merge pull request #287
de7e398 small typo fix
9d96e36 Merge pull request #280
432e1ce Merge pull request #283
14727fd Use correct name in gitignore
356b0e9 Actually test static precomputation in Travis
ff3a5df Merge pull request #284
2587208 Merge pull request #212
a5a66c7 Add support for custom EC-Schnorr-SHA256 signatures
d84a378 Merge pull request #252
72ae443 Improve perf. of cmov-based table lookup
92e53fc Implement endomorphism optimization for secp256k1_ecmult_const
ed35d43 Make `secp256k1_scalar_add_bit` conditional; make `secp256k1_scalar_split_lambda_var` constant time
91c0ce9 Add benchmarks for ECDH and const-time multiplication
0739bbb Add ECDH module which works by hashing the output of ecmult_const
4401500 Add constant-time multiply `secp256k1_ecmult_const` for ECDH
e4ce393 build: fix hard-coded usage of "gen_context"
b8e39ac build: don't use BUILT_SOURCES for the static context header
baa75da tests: add a couple tests
ae4f0c6 Merge pull request #278
995c548 Introduce callback functions for dealing with errors.
c333074 Merge pull request #282
18c329c Remove the internal secp256k1_ecdsa_sig_t type
74a2acd Add a secp256k1_ecdsa_signature_t type
23cfa91 Introduce secp256k1_pubkey_t type
4c63780 Merge pull request #269
3e6f1e2 Change rfc6979 implementation to be a generic PRNG
ed5334a Update configure.ac to make it build on OpenBSD
1b68366 Merge pull request #274
a83bb48 Make ecmult static precomputation default
166b32f Merge pull request #276
c37812f Add gen_context src/ecmult_static_context.h to CLEANFILES to fix distclean.
125c15d Merge pull request #275
76f6769 Fix build with static ecmult altroot and make dist.
5133f78 Merge pull request #254
b0a60e6 Merge pull request #258
733c1e6 Add travis build to test the static context.
fbecc38 Add ability to use a statically generated ecmult context.
4fb174d Merge pull request #263
4ab8990 Merge pull request #270
bdf0e0c Merge pull request #271
31d0c1f Merge pull request #273
eb2c8ff Add missing casts to SECP256K1_FE_CONST_INNER
55399c2 Further performance improvements to _ecmult_wnaf
99fd963 Add secp256k1_ec_pubkey_compress(), with test similar to the related decompress() function.
145cc6e Improve performance of _ecmult_wnaf
36b305a Verify the result of GMP modular inverse using non-GMP code
0cbc860 Merge pull request #266
06ff7fe Merge pull request #267
5a43124 Save 1 _fe_negate since s1 == -s2
a5d796e Update code comments
3f3964e Add specific VERIFY tests for _fe_cmov
7d054cd Refactor to save a _fe_negate
b28d02a Refactor to remove a local var
55e7fc3 Perf. improvement in _gej_add_ge
a0601cd Fix VERIFY calculations in _fe_cmov methods
17f7148 Merge pull request #261
7657420 Add tests for adding P+Q with P.x!=Q.x and P.y=-Q.y
8c5d5f7 tests: Add failing unit test for #257 (bad addition formula)
5de4c5d gej_add_ge: fix degenerate case when computing P + (-lambda)P
bcf2fcf gej_add_ge: rearrange algebra
e2a07c7 Fix compilation with C++
873a453 Merge pull request #250
91eb0da Merge pull request #247
210ffed Use separate in and out pointers in `secp256k1_ec_pubkey_decompress`
a1d5ae1 Tiny optimization
729badf Merge pull request #210
2d5a186 Apply effective-affine trick to precomp
4f9791a Effective affine addition in EC multiplication
2b4cf41 Use pkg-config always when possible, with failover to manual checks for libcrypto

git-subtree-dir: src/secp256k1
git-subtree-split: 2bfb82b10edf0f0b0e366a12f94c8b21a914159d
2015-11-13 00:12:43 +01:00
Pieter Wuille 9e475d5a4d Update libsecp256k1 2015-11-13 00:12:43 +01:00
Jeff Garzik 38ed190eef
Merge #6771 from branch 'lowerLimits' of git://github.com/morcos/bitcoin 2015-11-12 15:38:59 -05:00
MarcoFalke b27e81f115 [net] Cleanup maxuploadtarget
* log: nMaxOutboundLimit is in bytes
* log: Hide misleading -maxuploadtarget=0 warning
* qa : Minor cleanup to maxuploadtarget rpc tests
* net: Use DEFAULT_MAX_UPLOAD_TARGET = 0
2015-11-12 20:45:57 +01:00
Wladimir J. van der Laan bd629d77ed
Merge pull request #6639
58ef0ff doc: update docs for Tor listening (Wladimir J. van der Laan)
68ccdc4 doc: Mention Tor listening in release notes (Wladimir J. van der Laan)
09c1ae1 torcontrol improvements and fixes (Wladimir J. van der Laan)
2f796e5 Better error message if Tor version too old (Peter Todd)
8f4e67f net: Automatically create hidden service, listen on Tor (Wladimir J. van der Laan)
2015-11-12 19:24:59 +01:00
Wladimir J. van der Laan 09c1ae1c01 torcontrol improvements and fixes
- Force AUTHCOOKIE size to be 32 bytes: This provides protection against
  an attack where a process pretends to be Tor and uses the cookie
  authentication method to nab arbitrary files such as the
  wallet
- torcontrol logging
- fix cookie auth
- add HASHEDPASSWORD auth, fix fd leak when fwrite() fails
- better error reporting when cookie file is not ok
- better init/shutdown flow
- stop advertizing service when disconnected from tor control port
- COOKIE->SAFECOOKIE auth
2015-11-12 17:58:15 +01:00
Wladimir J. van der Laan eb6172a8ca
Merge pull request #6918
69d373f Don't wipe the sigcache in TestBlockValidity (Pieter Wuille)
0b9e9dc Evict sigcache entries that are seen in a block (Pieter Wuille)
830e3f3 Make sigcache faster and more efficient (Pieter Wuille)
2015-11-12 17:37:52 +01:00
Alex Morcos 1cf3dd80a6 Add unit test for UpdateCoins 2015-11-12 09:55:12 -05:00
Jonas Schnelli f6d9d5ee75
add (max)uploadtarget infos to getnettotals RPC help 2015-11-12 15:01:30 +01:00
Pieter Wuille 54e8bfec83
Merge pull request #6931
33c90cf Make skipping BIP30 check chain agnostic (Alex Morcos)
06d81ad Skip BIP30 check after BIP34 activation (Alex Morcos)
2015-11-12 14:37:10 +01:00
Jonas Schnelli 773ae4654e
[Qt] add shortcurts for debug-/console-window 2015-11-12 13:54:06 +01:00
Alex Morcos 03c82826f9 Make CCoinsViewTest behave like CCoinsViewDB 2015-11-11 21:19:19 -05:00
Peter Todd 9bd3f035f0
Clarify 'fee' field in fundrawtransaction help text
Previous text could be interpreted as the the _additional_ fee paid by
the result on top of the fee the original version paid, rather than the
correct interpretation: the absolute fee the resulting tx pays.
2015-11-11 13:52:03 -05:00
Wladimir J. van der Laan 2f71b07d5e
Merge pull request #6974
40b77d4 Always allow getheaders from whitelisted peers (Wladimir J. van der Laan)
2015-11-11 18:30:17 +01:00
Jorge Timón 6bc9e4056b Chainparams: Explicit CChainParams arg for miner:
-BitcoinMiner
-CreateNewBlock
-GenerateBitcoins
-ProcessBlockFound
2015-11-11 13:21:17 +01:00
Jorge Timón 598e494587 Chainparams: Explicit CChainParams arg for main (pre miner):
-ProcessNewBlock
-TestBlockValidity
2015-11-11 13:21:17 +01:00
Wladimir J. van der Laan 3ac7060934
Merge pull request #6978
69d0513 build: Use fPIC rather than fPIE for qt objects. (Cory Fields)
17c4d9d build: Split hardening/fPIE options out (Cory Fields)
2015-11-11 12:54:57 +01:00
Wladimir J. van der Laan cb841e7513
Merge pull request #6982
7267843 Globals: Make AcceptBlockHeader static (Fix #6163) (Jorge Timón)
2015-11-11 12:23:33 +01:00
Jorge Timón 7267843745 Globals: Make AcceptBlockHeader static (Fix #6163)
..and at the same time prevent AcceptBlockHeader() from calling global function Params()
2015-11-11 01:33:39 +01:00
Peter Todd 16a2f93629
Fix incorrect locking of mempool during RBF replacement
Previously RemoveStaged() was called without pool.cs held.
2015-11-10 18:00:24 -05:00
Suhas Daftuar 73d904009d Improve RBF replacement criteria
Fix the calculation of conflicting size/conflicting fees.
2015-11-10 14:14:07 -05:00
Peter Todd b272ecfdb3 Reject replacements that add new unconfirmed inputs 2015-11-10 14:14:07 -05:00
Peter Todd fc8c19a07c Prevent low feerate txs from (directly) replacing high feerate txs
Previously all conflicting transactions were evaluated as a whole to
determine if the feerate was being increased. This meant that low
feerate children pulled the feerate down, potentially allowing a high
transaction with a high feerate to be replaced by one with a lower
feerate.
2015-11-10 14:14:07 -05:00
Peter Todd 5891f870d6 Add opt-in full-RBF to mempool
Replaces transactions already in the mempool if a new transaction seen
with a higher fee, specifically both a higher fee per KB and a higher
absolute fee. Children are evaluateed for replacement as well, using the
mempool package tracking to calculate replaced fees/size. Transactions
can opt-out of transaction replacement by setting nSequence >= maxint-1
on all inputs. (which all wallets do already)
2015-11-10 14:14:06 -05:00
Wladimir J. van der Laan de7d4591a7
Merge pull request #6965
77f1f59 Benchmark sanity checks and fork checks in ConnectBlock (Matt Corallo)
2015-11-10 19:18:51 +01:00
Peter Todd 2f796e5fe7 Better error message if Tor version too old 2015-11-10 17:29:56 +01:00
Wladimir J. van der Laan 8f4e67f152 net: Automatically create hidden service, listen on Tor
Starting with Tor version 0.2.7.1 it is possible, through Tor's control socket
API, to create and destroy 'ephemeral' hidden services programmatically.
https://stem.torproject.org/api/control.html#stem.control.Controller.create_ephemeral_hidden_service

This means that if Tor is running (and proper authorization is available),
bitcoin automatically creates a hidden service to listen on, without user
manual configuration. This will positively affect the number of available
.onion nodes.

- When the node is started, connect to Tor through control socket
- Send `ADD_ONION` command
- First time:
    - Make it create a hidden service key
    - Save the key in the data directory for later usage
- Make it redirect port 8333 to the local port 8333 (or whatever port we're listening on).
- Keep control socket connection open for as long node is running. The hidden service will
  (by default) automatically go away when the connection is closed.
2015-11-10 17:29:56 +01:00
Wladimir J. van der Laan b56953e9bb
qt: Periodic translations update 2015-11-10 16:44:53 +01:00
Wladimir J. van der Laan 32d8b1570c
Merge pull request #6940
7ca73dc Improving labels for Sent / Received "Bytes" (Jonathan Cross)
2015-11-10 16:39:12 +01:00
Wladimir J. van der Laan 9fa54a1b0c
Merge pull request #6822
e20d924 [trivial] init: Use defaults MIN_RELAY_TX_FEE & TRANSACTION_MAXFEE (MarcoFalke)
536766c [trivial] New DEFAULT_MIN_RELAY_TX_FEE = 1000 (MarcoFalke)
5f46a7d transaction_tests: Be more strict checking dust (MarcoFalke)
2015-11-10 15:58:00 +01:00
Wladimir J. van der Laan 755b4ba848
Merge pull request #5574
fd55571 wallet: Expose GUI labels in RPC (Luke Dashjr)
2015-11-10 15:48:23 +01:00
Wladimir J. van der Laan 77beab70de
Merge pull request #6163
87cbdb8 Globals: Explicit Consensus::Params arg for main: (Jorge Timón)
2015-11-10 15:32:03 +01:00
Cory Fields 69d0513436 build: Use fPIC rather than fPIE for qt objects.
But only if qt was built with reduced relocations.
2015-11-09 22:50:31 -05:00
Cory Fields 17c4d9d164 build: Split hardening/fPIE options out
This allows for fPIE to be used selectively.
2015-11-09 22:50:31 -05:00
MarcoFalke e20d9245e5 [trivial] init: Use defaults MIN_RELAY_TX_FEE & TRANSACTION_MAXFEE 2015-11-09 21:12:55 +01:00
MarcoFalke 536766c903 [trivial] New DEFAULT_MIN_RELAY_TX_FEE = 1000 2015-11-09 21:00:16 +01:00
MarcoFalke 5f46a7d068 transaction_tests: Be more strict checking dust
* Don't allow off-by-one or more
* Make clear dust is coupled with minRelayTxFee
* Check rounding for odd values
2015-11-09 21:00:16 +01:00
Wladimir J. van der Laan 40b77d450d Always allow getheaders from whitelisted peers
Process `getheaders` messages from whitelisted peers even if we are in
initial block download. Whitelisted peers can always use a node as a
block source.

Also log a debug message when the request is ignored, for
troubleshooting.

Fixes #6971.
2015-11-09 14:28:49 +01:00
Wladimir J. van der Laan f24880b132
Merge pull request #6908
c53d48a BIP70: Chainparams: DRY: Make qt/guiutil.cpp fit BIP70 chain name strings (Jorge Timón)
2015-11-09 14:19:05 +01:00
Wladimir J. van der Laan 6176e9bf3d
Merge pull request #6962
6dd3a44 translations: Don't translate markdown or force English grammar (MarcoFalke)
2015-11-09 12:09:33 +01:00
MarcoFalke 6dd3a44ce2 translations: Don't translate markdown or force English grammar 2015-11-09 11:40:52 +01:00
Wladimir J. van der Laan 2980a18572 Fix crash in validateaddress with -disablewallet
Fix a null pointer dereference in validateaddress with -disablewallet. Also add a regression testcase.
2015-11-09 08:44:19 +01:00
Matt Corallo 77f1f59d12 Benchmark sanity checks and fork checks in ConnectBlock 2015-11-06 15:21:14 -08:00
Wladimir J. van der Laan 4ee149a6db
Merge pull request #6955
e167af2 [doc] Remove excessive white space (MarcoFalke)
e0eeb67 [trivial] clang-format: Set AlignAfterOpenBracket: false (MarcoFalke)
0af8fe4 devtools: Update README.md (MarcoFalke)
2015-11-05 23:39:48 +01:00
MarcoFalke e0eeb672f2 [trivial] clang-format: Set AlignAfterOpenBracket: false 2015-11-05 23:28:02 +01:00
Wladimir J. van der Laan 849a7e6453
Merge pull request #6948
22e7807 Always flush block and undo when switching to new file (Pieter Wuille)
2015-11-05 23:06:34 +01:00
MarcoFalke 513686dd43 [qt] Use maxTxFee instead of 10000000 2015-11-05 19:16:29 +01:00
Wladimir J. van der Laan 3038eb63e8
Merge pull request #6934
d1c3762 Revert "Revert "Enable policy enforcing GetMedianTimePast as the end point of lock-time constraints"" (Gregory Maxwell)
e4e5334 Restore MedianTimePast for locktime. (Gregory Maxwell)
2015-11-05 12:13:04 +01:00
Wladimir J. van der Laan 3694b74fa9
Merge pull request #6887
53238ff Clarify what minrelaytxfee does (MarcoFalke)
abd8b76 [qt] Properly display required fee instead of minTxFee (MarcoFalke)
2015-11-05 12:11:11 +01:00
Pieter Wuille 22e780737d Always flush block and undo when switching to new file
Previously, the undo weren't being flushed during a reindex because
fKnown was set to true in FindBlockPos. That is the correct behaviour
for block files as they aren't being touched, but undo files are
touched.

This changes the behaviour to always flush when switching to a new file
(even for block files, though that isn't really necessary).
2015-11-05 00:43:49 +01:00
Pieter Wuille f0343e9370 Update LevelDB 2015-11-04 23:46:47 +01:00
Peter Josling e482a7fe6b Fix CCoins serialization documentation
The docs talk about bits 2 and 4 instead of 2 and 3, and bits are being
indexed from both 1 (describing nCode) and 0 (in second example).
Changed to use zero-indexing for all.
2015-11-04 20:15:54 +00:00
Jonathan Cross 7ca73dcf6b Improving labels for Sent / Received "Bytes"
The labels for Sent & Received data in the "Peers" debug panel should not be defined as "Bytes" because the units (B, KB, MB) appear after the number.  I decided to simply use "Sent" and "Received" (rather than "Data Sent" and "Data Received") because we already have translations for the former:
https://www.transifex.com/bitcoin/bitcoin/viewstrings/#ja/qt-translation-011x/47533089?q=sent
https://www.transifex.com/bitcoin/bitcoin/viewstrings/#ja/qt-translation-011x/47533089?q=received

Demo of changes:

Current UI:
    Bytes Sent      12 KB
    Bytes Received  26 MB

With this pull request:
    Sent       12 KB
    Received   26 MB
2015-11-04 20:14:16 +01:00
Jorge Timón c53d48a6b3 BIP70: Chainparams: DRY: Make qt/guiutil.cpp fit BIP70 chain name strings
As a side effect, the qt user will see "test" instead of "testnet"
2015-11-04 14:02:10 +01:00
Wladimir J. van der Laan c702521a85
Merge pull request #6864
268b79e [qt] rpcconsole: Scale monospace font to 95% (MarcoFalke)
28313b8 [qt] Use fixed pitch font for the rpc console (MarcoFalke)
2015-11-04 13:06:14 +01:00
Wladimir J. van der Laan 8a95a18562
Merge pull request #6669
6342a48 Init: Use DEFAULT_TRANSACTION_MINFEE in help message (MarcoFalke)
a9c73a1 [wallet] Add comments for doxygen (MarcoFalke)
6b0e622 [wallet] Refactor to use new MIN_CHANGE (MarcoFalke)
2015-11-04 12:30:50 +01:00
Wladimir J. van der Laan aa03fb35c4
Merge pull request #6927
de0499d Fix ZMQ Notification initialization and shutdown (João Barbosa)
2015-11-04 12:10:46 +01:00
Wladimir J. van der Laan aca0c00ae1
Merge pull request #6905
a6efc01 Bugfix: Omit wallet-related options from -help when wallet is disabled (Luke Dashjr)
5f9260f Bugfix: If genproclimit is omitted to RPC setgenerate, don't change it; also show correct default in getmininginfo (Luke Dashjr)
420a82f Bugfix: Describe dblogsize option correctly (it refers to the wallet database, not memory pool) (Luke Dashjr)
caa3d42 Bugfix: RPC: blockchain: Display correct defaults in help for verifychain method (Luke Dashjr)
2015-11-04 11:45:33 +01:00
João Barbosa de0499d3b8 Fix ZMQ Notification initialization and shutdown
Moves the call Initialize() from init.cpp to CreateWithArguments() and handles the
return value. Moves the call Shutdown() from init.cpp to destructor.
Changes Initialize() and Shutdown() to protected members.
2015-11-04 10:36:00 +00:00
Gregory Maxwell d1c3762ae8 Revert "Revert "Enable policy enforcing GetMedianTimePast as the end point of lock-time constraints""
This reverts commit 8537ecdfc4.
2015-11-03 17:14:09 +00:00
Gregory Maxwell e4e5334ef8 Restore MedianTimePast for locktime.
Revert "Revert "Add rules--presently disabled--for using GetMedianTimePast as endpoint for lock-time calculations""
This reverts commit 40cd32e835.

After careful analysis it was determined that the change was, in fact, safe and several people were suffering
momentary confusion about locktime semantics.
2015-11-03 17:12:36 +00:00
MarcoFalke 268b79ef0c [qt] rpcconsole: Scale monospace font to 95% 2015-11-03 12:34:51 +01:00