Commit Graph

10323 Commits

Author SHA1 Message Date
Jay Graber d64a2d5a44 Add 1.0.7 release notes and update authors.md 2017-03-03 22:02:32 -08:00
Jay Graber a83f0677b4 Update release to 1.0.7, generate manpages 2017-03-03 21:55:36 -08:00
zkbot a7cf698873 Auto merge of #2100 - str4d:2074-rpc, r=arcalinea
Bitcoin 0.12 RPC PRs 1

Cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#6266
- bitcoin/bitcoin#6257
- bitcoin/bitcoin#6271
- bitcoin/bitcoin#6158
- bitcoin/bitcoin#6307
- bitcoin/bitcoin#6290
- bitcoin/bitcoin#6262
- bitcoin/bitcoin#6088
- bitcoin/bitcoin#6339
- bitcoin/bitcoin#6299 (partial, remainder in #2099)
- bitcoin/bitcoin#6350
- bitcoin/bitcoin#6247
- bitcoin/bitcoin#6362
- bitcoin/bitcoin#5486
- bitcoin/bitcoin#6417
- bitcoin/bitcoin#6398 (partial, remainder was included in #1950)
- bitcoin/bitcoin#6444
- bitcoin/bitcoin#6456 (partial, remainder was included in #2082)
- bitcoin/bitcoin#6380
- bitcoin/bitcoin#6970

Part of #2074.
2017-03-04 02:57:46 +00:00
zkbot dadb1ab74c Auto merge of #2101 - str4d:2074-tests, r=arcalinea
Bitcoin 0.12 test PRs 1

Cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#6337
- bitcoin/bitcoin#6390
- bitcoin/bitcoin#5515
- bitcoin/bitcoin#6287 (partial, remainder included in bitcoin/bitcoin#6703)
- bitcoin/bitcoin#6465

Part of #2074.
2017-03-03 21:25:03 +00:00
zkbot 99c4c6de0c Auto merge of #2099 - str4d:2074-misc, r=arcalinea
Bitcoin 0.12 misc PRs 1

Cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#6198
- bitcoin/bitcoin#6206
- bitcoin/bitcoin#5927
- bitcoin/bitcoin#6213
- bitcoin/bitcoin#6061
- bitcoin/bitcoin#6283 (partial, remainder was pulled in #929)
- bitcoin/bitcoin#6272
- bitcoin/bitcoin#6316
- bitcoin/bitcoin#6133
- bitcoin/bitcoin#6387
- bitcoin/bitcoin#6401
- bitcoin/bitcoin#6434
- bitcoin/bitcoin#6372
- bitcoin/bitcoin#6447
- bitcoin/bitcoin#6149
- bitcoin/bitcoin#6468

Part of #2074.
2017-03-03 20:41:57 +00:00
Casey Rodarmor df8f8095b6
Don't share objects between TestInstances 2017-03-03 11:47:12 -08:00
Cory Fields 72b25b0ffd
locking: add a quick example of GUARDED_BY
This was chosen not because it's necessarily helpful, but because its locking
assumptions were already correct.
2017-03-03 11:47:10 -08:00
Cory Fields 5093299af0
locking: teach Clang's -Wthread-safety to cope with our scoped lock macros
This allows us to use function/variable/class attributes to specify locking
requisites, allowing problems to be detected during static analysis.

This works perfectly with newer Clang versions (tested with 3.3-3.7). For older
versions (tested 3.2), it compiles fine but spews lots of false-positives.
2017-03-03 11:47:08 -08:00
Matt Corallo 8e4bc69d1f
Assert on probable deadlocks if the second lock isnt try_lock 2017-03-03 11:47:02 -08:00
Wladimir J. van der Laan 1eb6654314
tests: Fix bitcoin-tx signing testcase
Fixes wrong scriptPubkey problem, which caused the transaction to
not actually be signed.
2017-03-03 11:47:01 -08:00
Gavin Andresen abb0e8cced
Testing infrastructure: mocktime fixes
New, undocumented-on-purpose -mocktime=timestamp command-line
argument to startup with mocktime set. Needed because
time-related blockchain sanity checks are done on startup, before a
test has a chance to make a setmocktime RPC call.

And changed the setmocktime RPC call so calling it will not result in
currently connected peers being disconnected due to inactivity timeouts.
2017-03-03 11:46:59 -08:00
Jonas Schnelli 4d1d95310f
don't try to decode invalid encoded ext keys 2017-03-03 10:57:27 -08:00
Jonas Schnelli 51878774bf
extend bip32 tests to cover Base58c/CExtKey decode 2017-03-03 10:57:25 -08:00
Jonas Schnelli 53bcf8379a
fix and extend CBitcoinExtKeyBase template
- fix Decode call (req. only one param)
- add constructor for base58c->CExtKey
2017-03-03 10:57:24 -08:00
Adam Weiss 8550bcfeca
Buffer log messages and explicitly open logs
Prevents stomping on debug logs in datadirs that are locked by other
instances and lost parameter interaction messages that can get wiped by
ShrinkDebugFile().

The log is now opened explicitly and all emitted messages are buffered
until this open occurs.  The version message and log cut have also been
moved to the earliest possible sensible location.
2017-03-03 10:57:23 -08:00
Pavel Vasin 2af5a65066
remove unused inv from ConnectTip() 2017-03-03 10:57:22 -08:00
Paul Georgiou 0eac70954c
Update Linearize tool to support Windows paths 2017-03-03 10:57:20 -08:00
Gavin Andresen ae1565b52f
configure --enable-debug changes
Three changes to how configure --enable-debug behaves:

1. Preserve user-passed CXXFLAGS/CFLAGS
2. Compile with -DDEBUG_LOCKORDER
3. Add -DDEBUG -DDEBUG_LOCKORDER to CPPFLAGS (since they are preprocessor options)
2017-03-03 10:57:19 -08:00
Florian Schmaus 70b3d9e3ac
Add BITCOIND_SIGTERM_TIMEOUT to OpenRC init scripts
This allows users to specify, e.g. raise, the default timeout of 60
seconds. Some bitcoind instances, especially long running ones on slow
hardware, require a higher timeout for a clean shut down.

Also add a comment to bitcoind.openrc's 'retry=', since it is not
obvious from the variable name what it does.
2017-03-03 10:57:18 -08:00
Jonas Schnelli f061578b8f
[bitcoin-cli] improve error output 2017-03-03 10:57:17 -08:00
Luke Dashjr a79c8e24a5
Fix various warnings
Found while building on Debian 7
2017-03-03 10:57:15 -08:00
Wladimir J. van der Laan 55fca515d8
build: Remove -DBOOST_SPIRIT_THREADSAFE
Now that boost spirit is no longer used, `-DBOOST_SPIRIT_THREADSAFE`
doesn't need to be passed to the compiler anymore.
2017-03-03 10:57:14 -08:00
Wladimir J. van der Laan 7cc6648341
tests: Extend RPC proxy tests
Also test -noonion
2017-03-03 10:57:13 -08:00
Wladimir J. van der Laan 8d9719e0ef
Improve proxy initialization
Simplify and make the code in AppInit2 more clear.

This provides a straightforward flow, gets rid of .count() (which makes
it possible to override an earlier provided proxy option to nothing), as
well as comments the different cases.
2017-03-03 10:57:12 -08:00
Philip Kaufmann da7579184e
make CAddrMan::size() return the correct type of size_t 2017-03-03 10:57:11 -08:00
Jorge Timón e079f010bf
Consensus: Refactor: Separate Consensus::CheckTxInputs and GetSpendHeight in CheckInputs
Zcash:
- Replaces some of the refactoring performed in #1017
- Exposed Consensus::CheckTxInputs for testing
2017-03-03 10:57:09 -08:00
Philip Kaufmann fbbd3cc638
[init] add -blockversion help and extend -upnp help 2017-03-03 10:57:08 -08:00
Pieter Wuille bfa832c7ed
Reduce checkpoints' effect on consensus.
Instead of only checking height to decide whether to disable script checks,
actually check whether a block is an ancestor of a checkpoint, up to which
headers have been validated. This means that we don't have to prevent
accepting a side branch anymore - it will be safe, just less fast to
do.

We still need to prevent being fed a multitude of low-difficulty headers
filling up our memory. The mechanism for that is unchanged for now: once
a checkpoint is reached with headers, no headers chain branching off before
that point are allowed anymore.
2017-03-03 10:57:07 -08:00
Philip Kaufmann db954a65ac
use const references where appropriate 2017-03-03 10:57:05 -08:00
Peter Todd 5e478618e6
Improve comment explaining purpose of MAX_MONEY constant 2017-03-03 10:56:49 -08:00
Jack Grigg 14454a3a82
Fix typo in listbanned RPC keys 2017-03-02 13:26:34 -08:00
Jack Grigg 4acd140eeb
Update default RPC port in help strings 2017-03-02 13:26:34 -08:00
Jack Grigg 3c014397a9
BTC -> ZEC in paytxfee RPC docs
Revert before merging bitcoin/bitcoin#6504.
2017-03-02 13:26:34 -08:00
Jack Grigg 25b8f796ff
Re-encode t-addrs in disablewallet.py with Zcash prefixes 2017-03-02 13:26:34 -08:00
Jack Grigg 5329495fe4
Adjust fundrawtransaction RPC test for Zcash
- Enable wallet encryption
- Correct block reward
2017-03-02 13:26:34 -08:00
Wladimir J. van der Laan 56215c77d8
Fix crash in validateaddress with -disablewallet
Fix a null pointer dereference in validateaddress with -disablewallet. Also add a regression testcase.
2017-03-02 13:26:34 -08:00
Jonas Schnelli c2616abb3c
[QA] add testcases for parsing strings as values 2017-03-02 13:26:34 -08:00
Wladimir J. van der Laan 84d1d5fd6f
rpc: Accept strings in AmountFromValue
Accept strings containing decimal values, in addition to bare values.

Useful from JSON-RPC implementations where it's not possible to have
direct control over the text of numbers (e.g. where numbers are always
doubles), and it's still desired to send an exact value.

This would allow users to post JSON content with numbers encoded like
`{"value": "0.00000001"}` instead of `{"value": 0.00000001}` which some
php/python encoders wrap into 1e-8, or worse.
2017-03-02 13:26:34 -08:00
Wladimir J. van der Laan d101d7b8e6
univalue: Avoid unnecessary roundtrip through double for numbers
JSON makes no distinction between numbers and reals, and our code
doesn't need to do so either.

This removes VREAL, as well as its specific post-processing in
`UniValue::write`. Non-monetary amounts do not need to be forcibly
formatted with 8 decimals, so the extra roundtrip was unnecessary
(and potentially loses precision).

Zcash: cherry-picked from commit 7650449a6777710cf818d41862626164da0cd412
Left over from 2aee461930
2017-03-02 13:26:34 -08:00
zathras-crypto a11c4bbd26
Exempt unspendable transaction outputs from dust checks
Since unspendable outputs can't be spent, there is no threshold at which it would be uneconomic to spend them.

This primarily targets transaction outputs with `OP_RETURN`.

---

Initially based on:

commit 9cf0ae26350033d43d5dd3c95054c0d1b1641eda
Author: zathras-crypto <zathrasc@gmail.com>
Date:   Wed Mar 25 02:04:02 2015 -0700

Changes:

- cherry-picked on top of bitcoin:master
- added RPC test for fundrawtransaction
2017-03-02 13:26:34 -08:00
Wladimir J. van der Laan ce83df8fc4
rpc: Remove chain-specific RequireRPCPassword
I've never liked the chain-specific exception to having to set a
password. It gives issues with #6388 which makes it valid to
set no password in every case (as it enables random cookie authentication).

This pull removes the flag, so that all chains are regarded the same.

It also removes the username==password test, which doesn't provide any
substantial extra security.
2017-03-02 13:23:03 -08:00
Jonas Schnelli 5bfd954fc6
[QA] remove rawtransactions.py from the extended test list
rawtransactions.py is already in the standard test list
2017-03-02 13:23:03 -08:00
Jonas Schnelli 897a370c39
[QA] fix possible reorg issue in rawtransaction.py/fundrawtransaction.py RPC test
- added missing mempool sync between block generations
2017-03-02 13:23:03 -08:00
Jonas Schnelli 81eb80d841
[REST] add JSON support for /rest/headers/ 2017-03-02 13:23:03 -08:00
Forrest Voight 483672f772
When processing RPC commands during warmup phase, parse the
request object before returning an error so that id value can
be used in the response.

Prior to this commit, RPC commands sent during Bitcoin's
warmup/startup phase were responded to with a JSON-RPC error
with an id of null, which violated the JSON-RPC 2.0 spec:

id: This member is REQUIRED. It MUST be the same as the value
of the id member in the Request Object. If there was an error
in detecting the id in the Request object (e.g. Parse
error/Invalid Request), it MUST be Null.
2017-03-02 13:23:03 -08:00
Jack Grigg 0352b37bff
Adjust blockheaderToJSON() for Zcash block header 2017-03-02 13:23:03 -08:00
Peter Todd d3d5483eef
Add getblockheader RPC call
Alternative to getblock that works even when the block itself has been
pruned, returning all available information.
2017-03-02 13:23:03 -08:00
mruddy 81ae51c883
add tests for the decodescript rpc. add mention of the rpc regression tests to the testing seciton of the main readme. 2017-03-02 13:23:03 -08:00
Wladimir J. van der Laan bf890b6518
test: Move reindex test to standard tests
This test finishes very quickly, so it should be part of the default set
of tests in rpc-tests.
2017-03-02 13:23:03 -08:00
Jonas Schnelli 5548701eeb
UniValue: don't escape solidus, keep espacing of reverse solidus
Zcash: The UniValue changes are already merged; this updates the test
2017-03-02 13:23:03 -08:00