Commit graph

593 commits

Author SHA1 Message Date
Pieter Wuille fc684ad8af Use accurate memory for flushing decisions 2015-05-11 17:57:27 -07:00
Jonas Schnelli a1d0ec44d7 re-add -reindex help message
was suddenly removed with fc44231cb7 (probably not by purpose)
2015-05-08 19:59:01 +02:00
Wladimir J. van der Laan 12f3488253
Merge pull request #6047
a56054b Update key.cpp to use new libsecp256k1 (Pieter Wuille)
a591d98 Squashed 'src/secp256k1/' changes from 1897b8e..22f60a6 (Pieter Wuille)
2015-05-06 12:29:07 +02:00
Wladimir J. van der Laan 00820f921d
Merge pull request #6055
a8cdaf5 checkpoints: move the checkpoints enable boolean into main (Cory Fields)
11982d3 checkpoints: Decouple checkpoints from Params (Cory Fields)
6996823 checkpoints: make checkpoints a member of CChainParams (Cory Fields)
9f13a10 checkpoints: store mapCheckpoints in CCheckpointData rather than a pointer (Cory Fields)
2015-05-06 11:38:39 +02:00
Wladimir J. van der Laan fc44231cb7
trivial: Merge pruning help message after Transifex comment
The prune help message was broken in nonsensical parts. Merge it into
one, this is easier for translators.

Reported by yahoe.001 on transifex.
2015-05-04 18:48:38 +02:00
Wladimir J. van der Laan 04140457f4 Show an init message while activating best chain
Connecting the chain can take quite a while.
All the while it is still showing `Loading wallet...`.
Add an init message to inform the user what is happening.
2015-05-04 17:39:19 +02:00
Pieter Wuille a56054be65 Update key.cpp to use new libsecp256k1
libsecp256k1's API changed, so update key.cpp to use it.

Libsecp256k1 now has explicit context objects, which makes it completely thread-safe.
In turn, keep an explicit context object in key.cpp, which is explicitly initialized
destroyed. This is not really pretty now, but it's more efficient than the static
initialized object in key.cpp (which made for example bitcoin-tx slow, as for most of
its calls, libsecp256k1 wasn't actually needed).

This also brings in the new blinding support in libsecp256k1. By passing in a random
seed, temporary variables during the elliptic curve computations are altered, in such
a way that if an attacker does not know the blind, observing the internal operations
leaks less information about the keys used. This was implemented by Greg Maxwell.
2015-05-04 14:45:34 +02:00
Wladimir J. van der Laan 00e76db8c2
Merge pull request #6085
b05a89b Non-grammatical language improvements (Luke Dashjr)
7e6d23b Bugfix: Grammar fixes (Corinne Dashjr)
2015-05-04 08:01:58 +02:00
Corinne Dashjr 7e6d23b171 Bugfix: Grammar fixes 2015-05-01 11:21:27 +00:00
Cory Fields a8cdaf5c96 checkpoints: move the checkpoints enable boolean into main
This pertains to app-state, so it doesn't make sense to handle inside the
checkpoint functions.
2015-04-30 23:14:48 -04:00
Wladimir J. van der Laan 8a10000222
Merge pull request #6022
b74dcb3 Separate CTranslationInterface from CClientUIInterface (Jorge Timón)
2015-04-30 16:37:18 +02:00
mrbandrews f9ec3f0fad Add block pruning functionality
This adds a -prune=N option to bitcoind, which if set to N>0 will enable block
file pruning. When pruning is enabled, block and undo files will be deleted to
try to keep total space used by those files to below the prune target (N, in
MB) specified by the user, subject to some constraints:

- The last 288 blocks on the main chain are always kept (MIN_BLOCKS_TO_KEEP),
- N must be at least 550MB (chosen as a value for the target that could
  reasonably be met, with some assumptions about block sizes, orphan rates,
  etc; see comment in main.h),
- No blocks are pruned until chainActive is at least 100,000 blocks long (on
  mainnet; defined separately for mainnet, testnet, and regtest in chainparams
  as nPruneAfterHeight).

This unsets NODE_NETWORK if pruning is enabled.

Also included is an RPC test for pruning (pruning.py).

Thanks to @rdponticelli for earlier work on this feature; this is based in
part off that work.
2015-04-22 15:53:48 -04:00
Wladimir J. van der Laan b6ea3bcede
Merge pull request #5911
6be3562 rpc-tests: Add proxy test (Wladimir J. van der Laan)
67a7949 privacy: Stream isolation for Tor (Wladimir J. van der Laan)
2015-04-20 16:37:38 +02:00
Wladimir J. van der Laan 9e16cb108e Make 'Default: %u' spacing consistent in help message
Comment by pryds on Transifex.
2015-04-20 13:29:22 +02:00
Michael Ford c069234665 Fix typo in init.cpp interpration/interpretation 2015-04-20 13:29:21 +02:00
Wladimir J. van der Laan 67a7949397 privacy: Stream isolation for Tor
According to Tor's extensions to the SOCKS protocol
(https://gitweb.torproject.org/torspec.git/tree/socks-extensions.txt)
it is possible to perform stream isolation by providing authentication
to the proxy. Each set of credentials will create a new circuit,
which makes it harder to correlate connections.

This patch adds an option, `-proxyrandomize` (on by default) that randomizes
credentials for every outgoing connection, thus creating a new circuit.

    2015-03-16 15:29:59 SOCKS5 Sending proxy authentication 3842137544:3256031132
2015-04-17 13:26:47 +02:00
Jorge Timón b74dcb3b4a Separate CTranslationInterface from CClientUIInterface 2015-04-16 19:58:48 +02:00
Wladimir J. van der Laan ea2b425b00
Merge pull request #5997
4e38217 Chainparams: Refactor: Remove redundant HashGenesisBlock() getter (Jorge Timón)
2015-04-15 12:06:55 +02:00
Jorge Timón 4e382177ed Chainparams: Refactor: Remove redundant HashGenesisBlock() getter 2015-04-12 23:01:30 +02:00
Jonas Schnelli b9fb692d04 Push down RPC reqWallet flag 2015-04-12 19:37:29 +02:00
Wladimir J. van der Laan 7efc9cf672
Merge pull request #5951
77650cc add -walletbroadcast=0 rpc test (Jonas Schnelli)
6f25262 wallet: make it possible to disable transaction broadcast (Wladimir J. van der Laan)
2015-04-08 12:09:21 +02:00
Wladimir J. van der Laan 6f252627b2 wallet: make it possible to disable transaction broadcast
This is an advanced feature which will disable any kind of automatic
transaction broadcasting in the wallet. This gives the user full control
of how the transaction is sent.

For example they can broadcast new transactions through some other
mechanism themselves, after getting the transaction hex through `gettransaction`.

This just adds the option `-walletbroadcast=<0,1>`. Right now these
transactions will get the status

    Status: conflicted, has not been successfully broadcast yet

They shouldn't be shown as conflicted at all (`walletconflicts` is empty). This status
will go away when the transaction is received through the network.
2015-04-01 13:03:39 +02:00
Pieter Wuille 3fcfbc8ac5 Add a consistency check for the block chain data structures
This adds a -checkblockindex (defaulting to true for regtest), which occasionally
does a full consistency check for mapBlockIndex, setBlockIndexCandidates, chainActive, and
mapBlocksUnlinked.
2015-03-27 13:38:48 -07:00
Wladimir J. van der Laan cbb2cf5522
Fix --disable-wallet build after merge of #5681 2015-03-24 22:15:04 +01:00
Jonas Schnelli 2bb1c87700 refactor: move bdb (bitdb) interaction from init.cpp to wallet.cpp
this will remove db.h from init.cpp
2015-03-20 16:23:39 +01:00
Jonas Schnelli 50c72f23ad [Move Only] Move wallet related things to src/wallet/
could once be renamed from /src/wallet to /src/legacywallet.
2015-03-12 14:13:02 +01:00
Luca Venturini f75470794b Fix - bitcoin-qt usage message
. Closes the bug from commit e179eb3d9b
("bitcoin-qt -help" did not show any message)
. Move all the options in init.cpp (there were already some
options related to bitcoin-qt)
2015-03-10 22:07:17 -07:00
Luca Venturini 1fdb9fa3f9 Help messages correctly formatted (79 chars)
Help messages are formatted programmatically with FormatParagraph
in order not to break existing strings in Transifex.

The new format works even if the translation of the strings
modifies the lenght of the message.

Sqashed 6 commits in a single one.
Help messages correctly formatted for SVGA text mode (132 chars)

Help messages are formatted programmatically with FormatParagraph
in order not to break existing strings in Transifex.

The new format should work even if the translation of the strings
modifies the lenght of the message.

Fix - syntax error

Correct formatting for 79 chars

Correctly based on C++ functions

Removed spare spaces from option strings

Fix - syntax error
2015-03-10 22:07:17 -07:00
Wladimir J. van der Laan 87ecfb0f96
Merge pull request #5711
5ebe095 Trim RPC command table (Wladimir J. van der Laan)
4401b2d Removed main.h dependency from rpcserver.cpp (Eric Lombrozo)
2015-02-04 10:23:09 +01:00
Pavel Janík 5262fde0ec Remove whitespaces before double colon in errors and logs 2015-01-31 17:38:28 -05:00
Eric Lombrozo 4401b2d7c5 Removed main.h dependency from rpcserver.cpp
Rebased by @laanwj:

- update for RPC methods added since 84d13ee: setmocktime,
  invalidateblock, reconsiderblock. Only the first, setmocktime, required a change,
  the other two are thread safe.
2015-01-28 07:41:54 +01:00
Wladimir J. van der Laan 2fae1875ea
Merge pull request #5243
ff09e31 sleep-wait on genesis block during init with -reindex (Matt Corallo)
2015-01-26 12:29:15 +01:00
Wladimir J. van der Laan 8204e19abe
Merge pull request #4805
44bc988 [Wallet] Do not flush the wallet in AddToWalletIfInvolvingMe(..) (Cozz Lovan)
2015-01-26 12:19:12 +01:00
Gregory Maxwell 7d2cb48511 Restore RPC HTTP keepalives to default.
This avoids a regression for issues like #334 where high speed
 repeated connections eventually run the HTTP client out of
 sockets because all of theirs end up in time_wait.

Maybe the trade-off here is suboptimal, but if both choices will
 fail then we prefer fewer changes until the root cause is solved.
2015-01-16 05:59:36 -08:00
Gregory Maxwell 16a5c18cea Add a -rpckeepalive and disable RPC use of HTTP persistent connections.
It turns out that some miners have been staying with old versions of
 Bitcoin Core because their software  behaves poorly with persistent
 connections and the Bitcoin Core thread and connection limits.

What happens is that underlying  HTTP libraries leave connections open
 invisibly to their users and then the user runs into the default four
 thread limit.  This looks like Bitcoin Core is unresponsive to RPC.

There are many things that should be improved in Bitcoin Core's behavior
 here, e.g. supporting more concurrent connections, not tying up threads
 for idle connections, disconnecting kept-alive  connections when limits
 are reached, etc. All are fairly big, risky changes.

Disabling keep-alive is a simple workaround. It's often not easy to turn
 off the keep-alive support in the client where it may be buried in some
 platform library.

If you are one of the few who really needs persistent connections you
 probably know that you want them and can find a switch; while if you
 don't and the misbehavior is hitting you it is hard to discover the
 source of your problems is keepalive related.  Given that it is best
 to default to off until they're handled better.
2015-01-14 09:49:57 -08:00
Pieter Wuille 13cdce4336 Catch UTXO set read errors and shutdown 2015-01-08 15:51:15 +01:00
Wladimir J. van der Laan d79adc1ab1
Merge pull request #5535
1c52aad Require sufficent priority for relay of free transactions (Pieter Wuille)
2015-01-07 13:01:56 +01:00
Cory Fields a3241998e1 namespace: remove boost namespace pollution 2015-01-02 15:12:03 -05:00
Pieter Wuille 1c52aad540 Require sufficent priority for relay of free transactions 2014-12-30 02:03:29 +01:00
Wladimir J. van der Laan 0f2308cf7c
Merge pull request #5272
13f9031 init: minor parameter interaction updates (Philip Kaufmann)
2014-12-27 05:41:13 +01:00
Luke Dashjr a15dba5dff en: Avoid ambiguous language regarding when transactions confirm 2014-12-23 22:07:10 +00:00
Wladimir J. van der Laan d01bcc446e
Merge pull request #5485
aa279d6 Enforce minRelayTxFee on wallet created tx and add a maxtxfee option. (Gregory Maxwell)
2014-12-23 12:12:05 +01:00
Jameson Lopp 4bc95c4387 remove max orphan blocks config parameter since it is no longer functional 2014-12-21 09:10:43 -05:00
Matt Corallo ff09e31a51 sleep-wait on genesis block during init with -reindex 2014-12-20 22:11:51 -05:00
Gregory Maxwell aa279d6131 Enforce minRelayTxFee on wallet created tx and add a maxtxfee option.
Previously the minRelayTxFee was only enforced on user specified values.

It was possible for smartfee to produce a fee below minRelayTxFee which
 would just result in the transaction getting stuck because it can't be
 relayed.

This also introduces a maxtxfee option which sets an absolute maximum
 for any fee created by the wallet, with an intention of increasing
 user confidence that the automatic fees won't burn them. This was
 frequently a concern even before smartfees.

If the configured fee policy won't even allow the wallet to meet the relay
 fee the transaction creation may be aborted.
2014-12-19 12:05:10 -08:00
sandakersmann f914f1a746
Added "Core" to copyright headers
Github-Pull: #5494
Rebased-From: 15de949bb9277e442302bdd8dee299a8d6deee60
2014-12-19 19:55:32 +01:00
Philip Kaufmann 27df4123c4 make all catch() arguments const
- I saw this on http://en.cppreference.com/w/cpp/language/try_catch and
  thought it would be a good idea
- also unify used format to better be able to search for exception
  uses in our codebase
2014-12-17 09:39:24 +01:00
Michael Ford c5b390b6b9 Make comments in main an init doxygen compatible
Fix typos where appropriate
Update license/copyright
2014-12-02 15:50:58 +08:00
Pieter Wuille 57be955ba0 Remove -printblock, -printblocktree, and -printblockindex 2014-11-27 09:50:20 +01:00
Jonas Schnelli 5dc713bfc7 [REST] set REST API behind "-rest" option 2014-11-26 13:53:27 +01:00