Commit graph

6076 commits

Author SHA1 Message Date
Tom Harding
7a19efe040 Formatting, spelling, comment fixes. 2014-06-27 16:47:33 -07:00
Tom Harding
9fa53dd3bd Add release notes entry 2014-06-27 08:07:14 -07:00
Tom Harding
9004798e62 Add -respendnotify option and new RPC data
-respendnotify=<cmd> Execute command when a network tx respends wallet
tx input (%s=respend TxID, %t=wallet TxID)

Add respendsobserved array to gettransaction, listtransactions, and
listsinceblock RPCs.  This omits the malleated clones that are included
in the walletconflicts array.

Add RPC help for respendsobserved and walletconflicts (help was missing
for the latter).
2014-06-27 07:54:21 -07:00
Tom Harding
ada5a067c7 UI to alert of respend attempt affecting wallet.
Respend transactions that conflict with transactions already in the
wallet are added to it.  They are not displayed unless they also involve
the wallet, or get into a block.  If they do not involve the wallet,
they continue not to affect balance.

Transactions that involve the wallet, and have conflicting non-equivalent
transactions, are highlighted in red.  When the conflict first occurs, a
modal dialog is thrown.

CWallet::SyncMetaData is changed to sync only to equivalent transactions.

When a conflict is added to the wallet, counter nConflictsReceived is
incremented.  This acts like a change in active block height for the
purpose of triggering UI updates.
2014-06-27 07:54:21 -07:00
Tom Harding
d640a3ceab Relay double-spends, subject to anti-DOS
Allows network wallets and other clients to see transactions that respend
a prevout already spent in an unconfirmed transaction in this node's mempool.

Knowledge of an attempted double-spend is of interest to recipients of the
first spend.  In some cases, it will allow these recipients to withhold
goods or services upon being alerted of a double-spend that deprives them
of payment.

As before, respends are not added to the mempool.

Anti-Denial-of-Service-Attack provisions:
 - Use a bloom filter to relay only one respend per mempool prevout
 - Rate-limit respend relays to a default of 100 thousand bytes/minute
 - Define tx2.IsEquivalentTo(tx1): equality when scriptSigs are not considered
 - Do not relay these equivalent transactions

Remove an unused variable declaration in txmempool.cpp.
2014-06-27 07:54:21 -07:00
Tom Harding
8fbf03995d CBloomFilter::clear() method 2014-06-27 07:54:21 -07:00
Gavin Andresen
6259937388 Merge pull request #4365 from gavinandresen/relax_isstandard
Relax IsStandard rules for pay-to-script-hash transactions
2014-06-27 10:53:24 -04:00
Wladimir J. van der Laan
4684c883bb
Merge pull request #4208
6a5c124 [Qt] don't allow translation of our example btc address (Philip Kaufmann)
2014-06-27 12:46:49 +02:00
Wladimir J. van der Laan
3a9d796eb9
Merge pull request #4426
40a158e minor code format fix in rpc-related files (Philip Kaufmann)
2014-06-27 12:35:57 +02:00
Philip Kaufmann
40a158e100 minor code format fix in rpc-related files 2014-06-27 11:13:25 +02:00
Wladimir J. van der Laan
49d86c7477 rpc-tests: Fix rpcbind_test after 0193fb8
Port number for RPC is no longer static as multiple tests could be
running at once.
2014-06-27 10:06:40 +02:00
Wladimir J. van der Laan
d77f761be9
Merge pull request #4288
ed5769f Move AcceptedConnection class to rpcserver.h. (Jeff Garzik)
854d013 RPC code movement: separate out JSON-RPC execution logic from HTTP server logic (Jeff Garzik)
c912e22 RPC cleanup: Improve HTTP server replies (Jeff Garzik)
2014-06-27 10:03:19 +02:00
Wladimir J. van der Laan
19168c3377
Merge pull request #4424
c598f2a Fixed captitalization in bitcoin-cli-res.rc (Whit J)
2014-06-27 09:34:46 +02:00
Jeff Garzik
ed5769f536 Move AcceptedConnection class to rpcserver.h.
Also, add parens to HTTPReply() to assist readability.
2014-06-27 00:10:53 -04:00
Jeff Garzik
854d013012 RPC code movement: separate out JSON-RPC execution logic from HTTP server logic 2014-06-26 23:32:18 -04:00
Jeff Garzik
c912e22db0 RPC cleanup: Improve HTTP server replies
1) support varying content types
2) support only sending the header
3) properly deliver error message as content, if HTTP error
4) move AcceptedConnection class to header, for wider use
2014-06-26 23:32:18 -04:00
Whit J
c598f2acdb Fixed captitalization in bitcoin-cli-res.rc 2014-06-26 18:31:40 -07:00
Wladimir J. van der Laan
236ae8665e
Merge pull request #3715
e44fea5 Add an option to allow users to disable relaying/mining data carrier transactions (Luke Dashjr)
2014-06-26 17:31:12 +02:00
Wladimir J. van der Laan
eacff4a9c6
Merge pull request #4392
8ae973c Allocate more space if necessary in RandSeedAddPerfMon (Wladimir J. van der Laan)
be873f6 Issue warning if collecting RandSeed data failed (Wladimir J. van der Laan)
fcb0a1b change "char pch[200000]" to "new char[200000]" (daniel)
2014-06-26 17:11:53 +02:00
Luke Dashjr
e44fea55ea Add an option to allow users to disable relaying/mining data carrier transactions 2014-06-26 14:31:06 +00:00
Wladimir J. van der Laan
ffb32acfab
Merge pull request #1583
2a72d45 JSON-RPC method: prioritisetransaction <txid> <priority delta> <priority tx fee> (Luke Dashjr)
2014-06-26 16:20:01 +02:00
Wladimir J. van der Laan
f40d193c18
Merge pull request #4414
a90689f Remove timing-based signature cache unit test (Gavin Andresen)
2014-06-26 15:18:23 +02:00
Wladimir J. van der Laan
8ae973c00c Allocate more space if necessary in RandSeedAddPerfMon
Currently we use a fixed buffer of 250000 bytes to request
HKEY_PERFORMANCE_DATA. In many cases this is not enough, causing the
entropy collection to be skipped.

Use a loop that grows the buffer as specified in the RegQueryValueEx
documentation:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms724911%28v=vs.85%29.aspx

(as the size of the performance data can differ for every call, the
normal solution of requesting the size then allocating that can't work)
2014-06-26 15:15:17 +02:00
Luke Dashjr
2a72d4591f JSON-RPC method: prioritisetransaction <txid> <priority delta> <priority tx fee>
Accepts the transaction into mined blocks at a higher (or lower) priority
2014-06-26 11:49:46 +00:00
Gavin Andresen
a90689ff98
Remove timing-based signature cache unit test
Two changes:

First removes a unit test that fails in my development environment
(OSX, compiled -g3 with clang).

sipa says that's not terribly surprising; the CMutableTransaction change
makes signing a little more expensive but verification quicker. The unit
test timed sign+verify-uncached versus verify-cached-five-times.

He also says the test will be invalid when libsec256kp1 is integrated
(because validation is super-optimized over signing).

core.h change fixes a compiler warning (clang -Wall : CMutableTransaction defined
as struct, declared as class in script.h).
2014-06-25 14:57:21 -04:00
Wladimir J. van der Laan
343feecf56
Merge pull request #4368
75c82d4 Move coins.cpp and keystore.cpp to libbitcoin_common (Wladimir J. van der Laan)
84ce18c Remove unnecessary dependencies for bitcoin-cli (Wladimir J. van der Laan)
14f888c Move network-time related functions to timedata.cpp/h (Wladimir J. van der Laan)
2014-06-25 17:00:09 +02:00
Wladimir J. van der Laan
75c82d4923 Move coins.cpp and keystore.cpp to libbitcoin_common
Prepare for introduction of `bitcoin-tx` tool.
2014-06-25 10:31:35 +02:00
Wladimir J. van der Laan
84ce18ca93 Remove unnecessary dependencies for bitcoin-cli
This commit removes all the unnecessary dependencies (key, core,
netbase, sync, ...) from bitcoin-cli.

To do this it shards the chain parameters into BaseParams, which
contains just the RPC port and data directory (as used by utils and
bitcoin-cli) and Params, with the rest.
2014-06-25 10:31:35 +02:00
Wladimir J. van der Laan
14f888ca80 Move network-time related functions to timedata.cpp/h
The network time-offset-mangement functions from util.cpp are moved to
timedata.(cpp|h). This breaks the dependency of util on netbase.
2014-06-25 09:24:50 +02:00
Wladimir J. van der Laan
208bf5b9e0
Merge pull request #3839
fd704c7 move pow constants to chainparams (jtimon)
df852d2 Refactor proof of work related functions out of main (jtimon)
2014-06-25 09:14:36 +02:00
Wladimir J. van der Laan
27383b9015
Merge pull request #4390
6dc90ed replace 3 separate calls to WSAGetLastError() with 1 (Philip Kaufmann)
2014-06-25 07:20:42 +02:00
Wladimir J. van der Laan
e6cb20e19a
Merge pull request #4404
e9f2460 Add dependencies for Mac OSX gitian builds (Drak)
2014-06-25 07:13:28 +02:00
Wladimir J. van der Laan
ea37a208de
Merge pull request #4406
b79f59b Update .gitignore (Drak)
2014-06-25 07:07:27 +02:00
Wladimir J. van der Laan
fcbb1a74db
Merge pull request #4408
e3aedba Consistent lettering (Whit J)
2014-06-25 07:07:04 +02:00
Drak
b79f59b995 Update .gitignore
Removing old file ignores so they show up in `git status`
2014-06-25 06:00:22 +01:00
Whit J
e3aedbae9b Consistent lettering 2014-06-24 17:23:05 -07:00
Drak
e9f2460c58 Add dependencies for Mac OSX gitian builds 2014-06-24 18:06:52 +01:00
Wladimir J. van der Laan
6e8472ec7c
Merge pull request #4403
5fbb4c9 [Qt] fix links in about window not opening (Philip Kaufmann)
2014-06-24 18:07:45 +02:00
Wladimir J. van der Laan
0410d11b3a
Merge pull request #4130
1c750db remove -tor compatibility code (only allow -onion) (Philip Kaufmann)
2014-06-24 17:51:32 +02:00
Wladimir J. van der Laan
5dd0bfefcb
Merge pull request #4169
0655fac miner: indentation fixes, remove for (;;) (Philip Kaufmann)
2014-06-24 17:17:13 +02:00
Wladimir J. van der Laan
d4392c8989
Merge pull request #3674
77cbd46 Let -zapwallettxes recover transaction meta data (Cozz Lovan)
2014-06-24 17:04:52 +02:00
Philip Kaufmann
5fbb4c9b58 [Qt] fix links in about window not opening
- closes #4402
2014-06-24 16:36:14 +02:00
Philip Kaufmann
1c750dbd40 remove -tor compatibility code (only allow -onion)
- exit, if -tor option is found and give error to user
2014-06-24 16:07:20 +02:00
Philip Kaufmann
6dc90ed8fa replace 3 separate calls to WSAGetLastError() with 1 2014-06-24 08:46:12 +02:00
jtimon
fd704c7b2c move pow constants to chainparams 2014-06-23 23:10:24 +02:00
jtimon
df852d2bcc Refactor proof of work related functions out of main 2014-06-23 23:10:24 +02:00
Gavin Andresen
7f3b4e9569
Relax IsStandard rules for pay-to-script-hash transactions
Relax the AreInputsStandard() tests for P2SH transactions --
allow any Script in a P2SH transaction to be relayed/mined,
as long as it has 15 or fewer signature operations.

Rationale: https://gist.github.com/gavinandresen/88be40c141bc67acb247

I don't have an easy way to test this, but the code changes are
straightforward and I've updated the AreInputsStandard unit tests.
2014-06-23 15:09:52 -04:00
Wladimir J. van der Laan
36db6633c3
Merge pull request #4395
f3967bc build: fix build weirdness after 54372482. (Cory Fields)
2014-06-23 20:26:12 +02:00
Cory Fields
f3967bcc50 build: fix build weirdness after 54372482.
bitcoin-config.h moved, but the old file is likely to still exist when
reconfiguring or switching branches. This would've caused files to not rebuild
correctly, and other strange problems.

Make the path explicit so that the old one cannot be found.

Core libs use config/bitcoin-config.h.

Libs (like crypto) which don't want access to bitcoin's headers continue
to use -Iconfig and #include bitcoin-config.h.
2014-06-23 14:04:38 -04:00
Gavin Andresen
6d875669aa Merge pull request #4394 from laanwj/2014_06_rpc_tests_connectnode
qa/rpc_tests: Wait for handshake to complete in connect_nodes
2014-06-23 11:54:27 -04:00