Commit graph

9652 commits

Author SHA1 Message Date
Wladimir J. van der Laan
cd78c2a421
Merge pull request #6424
da894ab Accept any sequence of PUSHDATAs in OP_RETURN outputs (Peter Todd)
5d8709c Add IsPushOnly(const_iterator pc) (Peter Todd)
6a07eb6 Make TX_SCRIPTHASH clear vSolutionsRet first (Peter Todd)
2015-10-01 21:28:45 +02:00
ptschip
5467820be5 Migrated rpc-tests.sh to all python rpc-tests.py
1) created rpc-tests.py
2) deleted rpc-tests.sh
3) travis.yml points to rpc-tests.py
4) Modified Makefile.am
5) Updated README.md
6) Added tests_config.py and deleted tests-config.sh
7) Modified configure.ac with script to set correct path in tests_config.py
2015-10-01 11:28:11 -07:00
Wladimir J. van der Laan
bb24835aed build: disable -Wself-assign
Prevent these warnings in clang 3.6:

    ./serialize.h:96:9: warning: explicitly assigning value of variable of type 'uint64_t' (aka 'unsigned long') to itself [-Wself-assign]
        obj = (obj);
        ~~~ ^  ~~~
2015-10-01 18:38:54 +02:00
Peter Todd
da894ab5da Accept any sequence of PUSHDATAs in OP_RETURN outputs
Previously only one PUSHDATA was allowed, needlessly limiting
applications such as matching OP_RETURN contents with bloom filters that
operate on a per-PUSHDATA level. Now any combination that passes
IsPushOnly() is allowed, so long as the total size of the scriptPubKey
is less than 42 bytes. (unchanged modulo non-minimal PUSHDATA encodings)

Also, this fixes the odd bug where previously the PUSHDATA could be
replaced by any single opcode, even sigops consuming opcodes such as
CHECKMULTISIG. (20 sigops!)
2015-10-01 18:28:13 +02:00
Peter Todd
5d8709c3b7 Add IsPushOnly(const_iterator pc)
Allows IsPushOnly() to be applied to just part of the script for
OP_RETURN outputs.
2015-10-01 18:28:11 +02:00
Peter Todd
6a07eb676a Make TX_SCRIPTHASH clear vSolutionsRet first
Previously unlike other transaction types the TX_SCRIPTHASH would not
clear vSolutionsRet, which means that unlike other transaction types if
it was called twice in a row you would get the result of the previous
invocation as well.
2015-10-01 18:27:22 +02:00
Wladimir J. van der Laan
bb882d04e8
Merge pull request #6732
a3874c7 doc: no longer require use of openssl in OpenBSD build guide (Wladimir J. van der Laan)
5978388 build: remove libressl check (Wladimir J. van der Laan)
2015-10-01 18:12:36 +02:00
Wladimir J. van der Laan
f297042cae
Merge pull request #6637
95acf3c remove $(@F) and subdirs from univalue make (Jonas Schnelli)
9623e93 [Univalue] add univalue over subtree (Jonas Schnelli)
2f9f082 Squashed 'src/univalue/' content from commit 87d9045 (Jonas Schnelli)
0917306 remove univalue, prepare for subtree (Jonas Schnelli)
2015-10-01 16:36:15 +02:00
Wladimir J. van der Laan
17d0e638b6
Merge pull request #6686
745f909 travis: install a recent libzmq and pyzmq for tests (Cory Fields)
a9c27cd [travis] add zmq python module (Jonas Schnelli)
110a1fd enable zmq-test in rpc-tests.sh (Jonas Schnelli)
2015-10-01 16:22:26 +02:00
Cory Fields
745f909925 travis: install a recent libzmq and pyzmq for tests 2015-10-01 15:40:57 +02:00
Wladimir J. van der Laan
a3874c7c3a doc: no longer require use of openssl in OpenBSD build guide 2015-10-01 14:55:57 +02:00
Wladimir J. van der Laan
5978388476 build: remove libressl check
Now that BIP66 passed, OpenSSL is no longer directly part of the
consensus. What matters is that DER signatures are correctly parsed, and
secp256k1 crypto is implemented correctly (as well as the other
functions we use from OpenSSL, such as random number generation)

This means that effectively, using LibreSSL is not a larger risk than
using another version of OpenSSL.

Remove the specific check for LibreSSL.

Includes the still-relevant part of #6729: make sure CHECK_HEADER is
called using the right CXXFLAGS, not CFLAGS (as AC_LANG is c++).
2015-10-01 14:44:27 +02:00
Jonas Schnelli
95acf3cc6d remove $(@F) and subdirs from univalue make 2015-10-01 14:28:44 +02:00
Wladimir J. van der Laan
4899a04c24
Merge pull request #5987
e761d7a Bugfix: Allow mining on top of old tip blocks for testnet (fixes testnet-in-a-box use case) (Luke Dashjr)
2015-10-01 14:11:56 +02:00
Jonas Schnelli
a9c27cdf55 [travis] add zmq python module 2015-10-01 14:02:26 +02:00
Jeff Garzik
8a86d53bd5
Merge pull request #6731 2015-10-01 06:02:14 -04:00
Jeff Garzik
cf9bb11f97
Merge pull request #6588 2015-10-01 05:58:51 -04:00
Wladimir J. van der Laan
12a7712abd
Merge pull request #5924
835c122 Clean up change computation in CreateTransaction. (Daniel Kraft)
2015-10-01 11:20:08 +02:00
Jonas Schnelli
9623e93473 [Univalue] add univalue over subtree
similar to secp256k1 include and compile univalue over a subtree
2015-10-01 10:49:57 +02:00
Jonas Schnelli
2f9f082b5e Squashed 'src/univalue/' content from commit 87d9045
git-subtree-dir: src/univalue
git-subtree-split: 87d90455ff5e87dedc304353aa23ace47ffb6c1c
2015-10-01 10:37:19 +02:00
Jonas Schnelli
6e16a41313 Merge commit '2f9f082b5ef3c495c70598ef23383effef675f9a' as 'src/univalue' 2015-10-01 10:37:19 +02:00
Jonas Schnelli
0917306fdf remove univalue, prepare for subtree 2015-10-01 10:36:50 +02:00
Arne Brutschy
58981d4f7d Changed logging to make -logtimestamps to work also for -printtoconsole 2015-09-30 17:57:28 +02:00
Wladimir J. van der Laan
1119cc3f59
Merge pull request #6741
5424d41 doc: Change #bitcoin-dev IRC channel to #bitcoin-core-dev (Wladimir J. van der Laan)
2015-09-30 17:13:34 +02:00
Wladimir J. van der Laan
5424d416c2 doc: Change #bitcoin-dev IRC channel to #bitcoin-core-dev
Split off Bitcoin Core project development discussion from the general
Bitcoin development channel.
2015-09-30 17:09:35 +02:00
Gavin Andresen
7072c544b5
Support very-fast-running benchmarks
Avoid calling gettimeofday every time through the benchmarking loop, by keeping
track of how long each loop takes and doubling the number of iterations done
between time checks when they take less than 1/16'th of the total elapsed time.
2015-09-30 09:24:42 -04:00
Gavin Andresen
535ed9223d
Simple benchmarking framework
Benchmarking framework, loosely based on google's micro-benchmarking
library (https://github.com/google/benchmark)

Wny not use the Google Benchmark framework? Because adding Even More Dependencies
isn't worth it. If we get a dozen or three benchmarks and need nanosecond-accurate
timings of threaded code then switching to the full-blown Google Benchmark library
should be considered.

The benchmark framework is hard-coded to run each benchmark for one wall-clock second,
and then spits out .csv-format timing information to stdout. It is left as an
exercise for later (or maybe never) to add command-line arguments to specify which
benchmark(s) to run, how long to run them for, how to format results, etc etc etc.
Again, see the Google Benchmark framework for where that might end up.

See src/bench/MilliSleep.cpp for a sanity-test benchmark that just benchmarks
'sleep 100 milliseconds.'

To compile and run benchmarks:
  cd src; make bench

Sample output:

Benchmark,count,min,max,average
Sleep100ms,10,0.101854,0.105059,0.103881
2015-09-30 09:24:42 -04:00
Wladimir J. van der Laan
4f44530bc3
Merge pull request #6680
d76a8ac use CBlockIndex* insted of uint256 for UpdatedBlockTip signal (Jonas Schnelli)
2015-09-30 11:08:30 +02:00
Wladimir J. van der Laan
3f74cd2361
Merge pull request #6740
05b5831 Add PR title prefix for trivial changes [skip ci] (paveljanik)
2015-09-30 10:28:24 +02:00
paveljanik
05b5831aa0 Add PR title prefix for trivial changes [skip ci] 2015-09-30 08:44:51 +02:00
paveljanik
96106f0f30 [Trivial] start the help texts with lowercase 2015-09-30 08:40:20 +02:00
Wladimir J. van der Laan
c138cf9769
Merge pull request #6736
ab0b8be zmq: update and cleanup build-unix, release-notes, and zmq docs (Johnathan Corgan)
6cebd5d zmq: require version 4.x or newer of libzmq (Johnathan Corgan)
2015-09-30 00:55:25 +02:00
Wladimir J. van der Laan
f6ce59cd3c
Merge pull request #6713
43edd51 SanitizeString: Allow hypen char (MarcoFalke)
2015-09-30 00:23:26 +02:00
Luke Dashjr
e761d7a94f Bugfix: Allow mining on top of old tip blocks for testnet (fixes testnet-in-a-box use case) 2015-09-29 19:46:34 +00:00
Johnathan Corgan
ab0b8be857 zmq: update and cleanup build-unix, release-notes, and zmq docs
Signed-off-by: Johnathan Corgan <johnathan@corganlabs.com>
2015-09-29 10:48:45 -07:00
Johnathan Corgan
6cebd5d854 zmq: require version 4.x or newer of libzmq
Signed-off-by: Johnathan Corgan <johnathan@corganlabs.com>
2015-09-29 10:18:07 -07:00
Wladimir J. van der Laan
0bec36f3bb
Merge pull request #6661
551d7ed doc: Fix dead link in gitian-building (unsystemizer)
2015-09-29 14:55:39 +02:00
unsystemizer
551d7edb1b doc: Fix dead link in gitian-building
- Link to Debian 8.1 netinstall ISO is dead, changed to valid 8.2
- Changed checksum to 8.2 netinstall ISO checksum (http://cdimage.debian.org/debian-cd/8.2.0/amd64/iso-cd/SHA256SUMS)
- Verified CD checksum, checksum file's signing key
2015-09-29 14:51:52 +02:00
Wladimir J. van der Laan
cb4d6d0569
Merge pull request #6730
a5b78c2 build: Remove dependency of bitcoin-cli on secp256k1 (Wladimir J. van der Laan)
2015-09-29 14:17:21 +02:00
Wladimir J. van der Laan
a91eea6e3e
qt: periodic translations update 2015-09-29 13:36:33 +02:00
Wladimir J. van der Laan
2b0567b002
Merge pull request #6728
9fea833 timedata: Prevent warning overkill (Wladimir J. van der Laan)
2015-09-29 08:44:15 +02:00
Wladimir J. van der Laan
1a9f19a78d
Merge pull request #6719
ec908d5 http: Force-exit event loop after predefined time (Wladimir J. van der Laan)
de9de2d http: Wait for worker threads to exit (Wladimir J. van der Laan)
5e0c221 Make HTTP server shutdown more graceful (Wladimir J. van der Laan)
2015-09-28 16:03:51 +02:00
Wladimir J. van der Laan
ec908d5f7a http: Force-exit event loop after predefined time
This makes sure that the event loop eventually terminates, even if an
event (like an open timeout, or a hanging connection) happens to be
holding it up.
2015-09-28 15:06:20 +02:00
Wladimir J. van der Laan
de9de2de36 http: Wait for worker threads to exit
Add a WaitExit() call to http's WorkQueue to make it delete the work
queue only when all worker threads stopped.

This fixes a problem that was reproducable by pressing Ctrl-C during
AppInit2:
```
/usr/include/boost/thread/pthread/condition_variable_fwd.hpp:81: boost::condition_variable::~condition_variable(): Assertion `!ret' failed.
/usr/include/boost/thread/pthread/mutex.hpp:108: boost::mutex::~mutex(): Assertion `!posix::pthread_mutex_destroy(&m)' failed.
```

I was assuming that `threadGroup->join_all();` would always have been
called when entering the Shutdown(). However this is not the case in
bitcoind's AppInit2-non-zero-exit case "was left out intentionally
here".
2015-09-28 15:06:20 +02:00
Wladimir J. van der Laan
5e0c221356 Make HTTP server shutdown more graceful
Shutting down the HTTP server currently breaks off all current requests.
This can create a race condition with RPC `stop` command, where the calling
process never receives confirmation.

This change removes the listening sockets on shutdown so that no new
requests can come in, but no longer breaks off requests in progress.

Meant to fix #6717.
2015-09-28 15:06:20 +02:00
Wladimir J. van der Laan
9639eadd93 doc: Add build guide for OpenBSD 5.7
Add a specific build guide for OpenBSD. This is slightly different than
building for Linux due to different dependencies, and a compiler issue.
2015-09-28 13:46:09 +02:00
Wladimir J. van der Laan
a5b78c2fa8 build: Remove dependency of bitcoin-cli on secp256k1
bitcoin-cli (in contrast to bitcoin-tx, which does signing ops)
shouldn't need secp256k1, and indeed it doesn't.
2015-09-28 10:36:33 +02:00
Wladimir J. van der Laan
9fea833a12 timedata: Prevent warning overkill
The "please check your computer's data and time" message when the clock
deviates from the network currently generates an overkill of messages:

    orion@lethe:~/bitcoin$ src/bitcoind
    Warning: Warning: Please check that your computer's date and time are correct! If your clock is wrong Bitcoin Core will not work properly.

In the log:

    2015-09-27 16:24:13 *** Warning: Please check that your computer's date and time are correct! If your clock is wrong Bitcoin Core will not work properly.
    2015-09-27 16:24:13 Warning: Warning: Please check that your computer's date and time are correct! If your clock is wrong Bitcoin Core will not work properly.

Remove one level of 'Warning:' and reduce to one log message.
2015-09-27 16:40:16 +02:00
Wladimir J. van der Laan
ad57b310ba
Merge pull request #6724
023919b Fix debian/copyright list to be non-comma-separated. (Matt Corallo)
71afc68 Update debian/copyright format version to 1.0 (Matt Corallo)
d4ca868 Use standard license names in contrib/debian/copyright (Matt Corallo)
2015-09-26 11:34:14 +02:00
Wladimir J. van der Laan
2fa417f829
Merge pull request #6718
06d92d7 Add CONTRIBUTING.md (BtcDrak)
2015-09-26 10:10:35 +02:00