Philip Kaufmann [Tue, 8 May 2012 21:02:48 +0000]
fix an incorrect if-clause in net.cpp
Michael Hendricks [Fri, 2 Mar 2012 19:24:38 +0000]
Serialize access to debug.log stream
Acquire an exclusive, advisory lock before sending output to debug.log
and release it when we're done. This should avoid output from multiple
threads being interspersed in the log file.
We can't use CRITICAL_SECTION machinery for this because the debug log
is written during startup and shutdown when that machinery is not
available.
(Thanks to Gavin for pointing out the CRITICAL_SECTION problems based
on his earlier work in this area)
Jeff Garzik [Thu, 24 May 2012 01:45:26 +0000]
.gitignore: add test_bitcoin
Jeff Garzik [Tue, 22 May 2012 19:23:17 +0000]
Prevent crashes due to missing or corrupted blk????.dat records
Jeff Garzik [Tue, 22 May 2012 19:12:52 +0000]
Prevent crashes due to missing or corrupted database records
Any problems seen during deserialization will throw an uncaught
exception, crashing the entire bitcoin process. Properly return an
error instead, so that we may at least log the error and gracefully
shutdown other portions of the app.
R E Broadley [Tue, 22 May 2012 11:06:08 +0000]
Correct debug.log output to show correct function the debug is coming from.
Fordy [Fri, 18 May 2012 14:02:28 +0000]
Update License in File Headers
I originally created a pull to replace the "COPYING" in crypter.cpp and
crypter.h, but it turned out that COPYING was actually the correct
file.
Philip Kaufmann [Mon, 14 May 2012 05:49:17 +0000]
remove 2 ugly spaces from a message string
(PARTIAL of 966ae00)
Jeff Garzik [Mon, 14 May 2012 05:11:11 +0000]
Always check return values of TxnBegin() and TxnCommit()
PARTIAL, since d68dcf7 isn't backported (yet)
Pieter Wuille [Mon, 7 May 2012 19:36:30 +0000]
Hopefully final fix for the stuck blockchain issue
Immediately issue a "getblocks", instead of a "getdata" (which will
trigger the relevant "inv" to be sent anyway), and only do so when
the previous set of invs led us into a known and attached part of
the block tree.
Luke Dashjr [Tue, 8 May 2012 19:53:29 +0000]
Bump version to 0.4.7
Pieter Wuille [Sat, 5 May 2012 02:04:38 +0000]
Prevent stuck download: correct solution
Pull request #948 introduced a fix for nodes stuck on a long side branch
of the main chain. The fix was non-functional however, as the additional
getdata request was created in a first step of processing, but dropped
in a second step as it was considered redundant. This commits fixes it
by sending the request directly.
Pieter Wuille [Sun, 18 Mar 2012 22:47:26 +0000]
Prevent stuck block download in large reorganisations
In cases of very large reorganisations (hundreds of blocks), a situation
may appear where an 'inv' is sent as response to a 'getblocks', but the
last block mentioned in the inv is already known to the receiver node.
However, the supplying node uses a request for this last block as a
trigger to send the rest of the inv blocks. If it never comes, the block
chain download is stuck.
This commit makes the receiver node always request the last inv'ed block,
even if it is already known, to prevent this problem.
Luke Dashjr [Sun, 6 May 2012 05:27:08 +0000]
Bugfix: %-12I64d is not valid and causes the parameter to be skipped, use %12"PRI64d" instead
Conflicts:
src/walletdb.cpp
Gavin Andresen [Mon, 30 Apr 2012 00:56:55 +0000]
Check earlier for blocks with duplicate transactions. Fixes #1167
Philip Kaufmann [Thu, 3 May 2012 09:30:52 +0000]
remove obsolete BackupWallet() entry in wallet.h
Philip Kaufmann [Mon, 30 Apr 2012 23:46:03 +0000]
fix compiler warning "suggest parentheses around assignment used as truth
value [-Wparentheses]" in util.cpp
Philip Kaufmann [Mon, 30 Apr 2012 23:56:47 +0000]
remove unused typedef in serialize.h
Gavin Andresen [Fri, 27 Apr 2012 14:52:14 +0000]
Windows build: compile against openssl 1.0.1b
Luke Dashjr [Fri, 27 Apr 2012 14:50:24 +0000]
Bump version to 0.4.6
Timothy Redaelli [Wed, 25 Apr 2012 12:07:24 +0000]
We should include netinet/in.h to use sockaddr_in (POSIX.1-2001)
Jeff Garzik [Sun, 22 Apr 2012 17:59:24 +0000]
CBlock::WriteToDisk() properly checks ftell(3) for error return
Rather than storing ftell(3)'s return value -- a long -- in an
unsigned int, we store and check a properly typed temp. Then, assured a
non-negative value, we store in nBlockPosRet.
Timothy Redaelli [Fri, 20 Apr 2012 10:50:57 +0000]
Add missing includes. (Fix bulding under GCC 4.7)
(Note: GCC 4.7 build NOT tested with backports -Luke)
Dwayne C. Litzenberger [Mon, 16 Apr 2012 05:32:55 +0000]
Fix bugs on 'unsigned char' platforms.
In ISO C++, the signedness of 'char' is undefined. On some platforms (e.g.
ARM), 'char' is an unsigned type, but some of the code relies on 'char' being
signed (as it is on x86). This is indicated by compiler warnings like this:
bignum.h: In constructor 'CBigNum::CBigNum(char)':
bignum.h:81:59: warning: comparison is always true due to limited range of data type [-Wtype-limits]
util.cpp: In function 'bool IsHex(const string&)':
util.cpp:427:28: warning: comparison is always false due to limited range of data type [-Wtype-limits]
In particular, IsHex erroneously returned true regardless of the input
characters, as long as the length of the string was a positive multiple of 2.
Note: For testing, it's possible using GCC to force char to be unsigned by
adding the -funsigned-char parameter to xCXXFLAGS.
Dwayne C. Litzenberger [Mon, 16 Apr 2012 05:31:38 +0000]
Fix phexdigits[255] is undefined.
Pieter Wuille [Tue, 17 Apr 2012 16:50:45 +0000]
Fix potential deadlock
Conflict:
* cs_main in ProcessMessages() (before calling ProcessMessages)
* cs_vSend in CNode::BeginMessage
versus:
* cs_vSend in ThreadMessageHandler2 (before calling SendMessages)
* cs_main in SendMessages
Even though cs_vSend is a try_lock, if it succeeds simultaneously with
the locking of cs_main in ProcessMessages(), it could cause a deadlock.
Jeff Garzik [Sun, 15 Apr 2012 21:00:20 +0000]
Fix misc. minor sign-comparison warnings
Jeff Garzik [Sun, 15 Apr 2012 20:59:48 +0000]
CNode's nHeaderStart may be negative, so change its type (PARTIAL)
Jeff Garzik [Sun, 15 Apr 2012 20:52:09 +0000]
Fix loop index var types, fixing many minor sign comparison warnings
foo.size() typically returns an unsigned integral type; make loop variables
match those types' signedness.
Jeff Garzik [Sun, 15 Apr 2012 20:47:24 +0000]
The string class returns string::npos, when find() fails.
Noticed when sign-comparison warnings were enabled.
Jeff Garzik [Tue, 17 Apr 2012 16:30:00 +0000]
AlreadyHave(): only hold lock during mapTransactions access
Jeff Garzik [Fri, 13 Apr 2012 22:24:55 +0000]
Locking fix for AlreadyHave()
Access to mapTransactions[] must be guarded by cs_mapTransactions lock.
Wladimir J. van der Laan [Sun, 15 Apr 2012 11:27:00 +0000]
fix warnings: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses]
Wladimir J. van der Laan [Sun, 15 Apr 2012 10:59:20 +0000]
fix warnings: delete called on 'XX' that has virtual functions but non-virtual destructor [-Wdelete-non-virtual-dtor]
Wladimir J. van der Laan [Sun, 15 Apr 2012 10:22:30 +0000]
fix warnings: array subscript is of type 'char' [-Wchar-subscripts]
Wladimir J. van der Laan [Sun, 15 Apr 2012 09:42:40 +0000]
work around issue in boost::program_options that prevents from compiling in clang
Gavin Andresen [Thu, 5 Apr 2012 00:56:13 +0000]
Bug fix listtransactions from/count handling.
Pieter Wuille [Wed, 4 Apr 2012 23:02:49 +0000]
Verify status of encrypt/decrypt calls to detect failed padding
Matt Corallo [Fri, 16 Dec 2011 20:04:43 +0000]
Add laanwj to gitian download scripts.
Luke Dashjr [Mon, 12 Mar 2012 04:45:08 +0000]
Add Luke-Jr's PGP key to gitian-downloader
Pieter Wuille [Mon, 26 Mar 2012 20:12:25 +0000]
Updated my GPG key
Luke Dashjr [Wed, 4 Apr 2012 13:35:22 +0000]
Vegard Nossum [Sun, 31 Jul 2011 18:00:38 +0000]
Fix testing setup
There were some problems with the existing testing setup:
- Makefile rules for test-file compilation used CFLAGS instead of
CXXFLAGS in makefile.unix
Pieter Wuille [Sat, 25 Feb 2012 18:02:30 +0000]
Do not invoke anti-DoS system for invalid BIP16 transactions
Doing so would allow an attack on old nodes, which would relay a
standard transaction spending a BIP16 output in an invalid way,
until reaching a new node, which will disconnect their peer.
Reported by makomk on IRC.
Pieter Wuille [Thu, 22 Mar 2012 03:59:59 +0000]
Check minversion before loading the rest of the wallet
When a 0.6 wallet with compressed pubkeys is created, it writes a
minversion record to prevent older clients from reading it. If the 0.5
loading it sees a key record before seeing the minversion record however,
it will fail with DB_CORRUPT instead of DB_TOO_NEW.
Alistair Buxton [Sun, 18 Mar 2012 03:03:24 +0000]
When disconnecting a node, clear the received buffer so that we do
not process any already received messages.
The primary reason to do this is if a node spams hundreds of messages
and we ban them, we don't want to continue processing the rest of it.
Pieter Wuille [Wed, 21 Mar 2012 12:15:27 +0000]
More debug output for failed reorganizations
Pieter Wuille [Sun, 19 Feb 2012 18:42:15 +0000]
Report number of (dis)connected blocks in reorganization
Also report old and new best, and fork point.
Gavin Andresen [Tue, 20 Mar 2012 17:45:45 +0000]
Use last checkpoint instead of hard-coded 140,700. Fixes #913.
Luke Dashjr [Wed, 21 Mar 2012 17:30:56 +0000]
Merge branch 'bip16_0.4.x' into 0.4.x
Luke Dashjr [Tue, 13 Mar 2012 21:22:07 +0000]
Minimal support for validating BIP16 pay-to-script-hash transactions
Note this does NOT include accepting them in blocks (making them standard)
Pieter Wuille [Sat, 18 Feb 2012 12:32:25 +0000]
Workaround for BN_bn2mpi reading/writing out of bounds
When OpenSSL's BN_bn2mpi is passed a buffer of size 4, valgrind
reports reading/writing one byte past it. I am unable to find
evidence of this behaviour in BN_bn2mpi's source code, so it may
be a spurious warning. However, this change is harmless, as only
the bignum with value 0 results in an mpi serialization of size 4.
Luke Dashjr [Sun, 11 Mar 2012 22:07:40 +0000]
Print more diagnostic info for the various DB_CORRUPT conditions
Luke Dashjr [Sun, 11 Mar 2012 21:57:44 +0000]
Print wallet load errors (to debug.log)
Gavin Andresen [Thu, 16 Feb 2012 15:22:31 +0000]
Fix issue #848 : broken mining on testnet
Luke Dashjr [Fri, 16 Mar 2012 20:04:26 +0000]
Bump version to 0.4.5
Gavin Andresen [Tue, 20 Dec 2011 00:04:47 +0000]
Code cleanup: use ECDSA_size() instead of fixed 10,000 byte sig buffer, and explicity init static var
Gregory Maxwell [Sat, 10 Mar 2012 21:05:28 +0000]
Resolves issue #922 - "wallet passphrase timeout of several years doesn't work"
2^31 milliseconds is only about 25 days. Also clamps Sleep() to 10 years,
because it currently sleeps for 0 seconds when the sleep time would cross
2^31 seconds since the epoch. Hopefully boost will be fixed by 2028.
Luke Dashjr [Sat, 3 Mar 2012 18:51:10 +0000]
Bugfix: Fix possible buffer overflow (#901)
Upstream commit: 21ae37d (partial)
Luke Dashjr [Sat, 3 Mar 2012 18:44:42 +0000]
Bugfix: Check return value of SHGetSpecialFolderPath in MyGetSpecialFolderPath
Upstream commit: 21ae37d (partial)
Luke Dashjr [Sat, 3 Mar 2012 17:59:09 +0000]
Merge remote branch 'sipa/nooverwritetx_v0.4.0' into 0.4.x
Pieter Wuille [Fri, 17 Feb 2012 16:58:02 +0000]
Do not allow overwriting unspent transactions (BIP 30)
Introduce the following network rule:
* a block is not valid if it contains a transaction whose hash
already exists in the block chain, unless all that transaction's
outputs were already spent before said block.
Warning: this is effectively a network rule change, with potential
risk for forking the block chain. Leaving this unfixed carries the
same risk however, for attackers that can cause a reorganisation
in part of the network.
Thanks to Russell O'Connor and Ben Reeves.
Gavin Andresen [Wed, 29 Feb 2012 15:14:18 +0000]
DoS fix for mapOrphanTransactions
Gavin Andresen [Thu, 23 Feb 2012 18:33:30 +0000]
Checkpoint block 168,000
Pieter Wuille [Sun, 19 Feb 2012 18:12:41 +0000]
Fix #616: remove base_uint::operator&=(uint64 b)
Pieter Wuille [Sun, 19 Feb 2012 18:05:41 +0000]
Fix #626: RecvLine wrong error message
Pieter Wuille [Sun, 19 Feb 2012 17:44:51 +0000]
Fix #650: CKey::SetSecret BIGNUM leak
Pieter Wuille [Sat, 18 Feb 2012 14:36:40 +0000]
Free pwalletdbEncryption after encryping wallet
Fixes a memory leak.
Pieter Wuille [Sat, 11 Feb 2012 17:01:24 +0000]
Extra wallet locking fixes
* Fix sign error in calculation of seconds to sleep
* Do not mix GetTime() (seconds) and Sleep() (milliseconds)
* Do not sleep forever if walletlock() is called
* Do locking within critical section
Pieter Wuille [Sat, 11 Feb 2012 15:35:40 +0000]
Fix wallet locking locking
Pieter Wuille [Sat, 11 Feb 2012 19:02:55 +0000]
Macros for manual critical sections
Pieter Wuille [Wed, 15 Feb 2012 20:17:15 +0000]
Several shutdown-related fixes
* do not let vnThreadsRunning[1] go negative
* do not perform locking operations while vnThreadsRunning[1] is decreased
* check vnThreadsRunning[1] at exit
Pieter Wuille [Wed, 15 Feb 2012 19:56:29 +0000]
Bugfix: do not create CAddress for invalid accepts
Matt Corallo [Fri, 10 Feb 2012 03:41:42 +0000]
Get ext. IP from UPnP, make sure addrMe IsRoutable() in version.
This fixes a potential bug where some NATs may replace the node's
interal IP with its external IP in version messages, causing
incorrect checksums when version messages begin being checksummed
on February 14, 2012.
Pieter Wuille [Sat, 11 Feb 2012 14:25:42 +0000]
Fix #822
Luke Dashjr [Wed, 8 Feb 2012 03:30:21 +0000]
Update copyrights to 2012 for files modified this year
Gregory Maxwell [Sun, 5 Feb 2012 07:30:43 +0000]
Have bitcoind recommend a secure RPC password. Increase invalid password delay.
Help users avoid insecure configurations a bit by recommending a
secure RPC password and increasing the incorrect password delay.
This may open up a RPC DOS for users with exposed RPC ports and
short passwords. Since users shouldn't have exposed RPC ports OR
short passwords, the DOS risk is preferable to the compromise
risk.
Also logs the client IP address for incorrect attempts.
Gavin Andresen [Wed, 18 Jan 2012 18:36:44 +0000]
Only store transactions with missing inputs in the orphan pool.
All previous versions of bitcoin could store some types of
invalid transactions in the orphan-transaction list.
Pieter Wuille [Thu, 26 Jan 2012 18:26:34 +0000]
Full checking of all loaded keys
Pieter Wuille [Wed, 25 Jan 2012 02:05:16 +0000]
Check consistency of private keys
Reported by onlineproof on IRC: Bitcoin does not verify whether private
keys and public keys correspond, when loading a wallet.
Gavin Andresen [Wed, 1 Feb 2012 18:24:15 +0000]
Allow -upnp to override setting in wallet (and simplify logic a bit)
Matt Corallo [Tue, 31 Jan 2012 22:36:25 +0000]
Fix UPnP by reannouncing every 20 minutes.
Gavin Andresen [Mon, 5 Dec 2011 20:50:22 +0000]
Testnet difficulty calculation changes, to take effect Feb 15 2012
Allow mining of min-difficulty blocks if 20 minutes have gone by without mining a regular-difficulty block.
Normal rules apply every 2016 blocks, though, so there may be a very-slow-to-confirm block at the difficulty-adjustment blocks.
Luke Dashjr [Wed, 18 Jan 2012 02:50:08 +0000]
Various updates to the release process
Daniel Folkinshteyn [Thu, 19 Jan 2012 06:54:14 +0000]
Update seednodes, pick long-uptime nodes with version >= 0.4.0
Lars Rasmusson [Sat, 14 Jan 2012 11:14:36 +0000]
Replace tabs with four spaces to comply with coding standard in doc/coding.txt
Luke Dashjr [Tue, 17 Jan 2012 03:17:48 +0000]
Code tidyups, fixing various warnings.
Partial cherry pick of:
Compile with extra warnings turned on. And more makefile/code tidying up.
This turns on most gcc warnings, and removes some unused variables and other code that triggers warnings.
Exceptions are:
-Wno-sign-compare : triggered by lots of comparisons of signed integer to foo.size(), which is unsigned.
-Wno-char-subscripts : triggered by the convert-to-hex functions (I may fix this in a future commit).
Conflicts:
src/makefile.osx
src/makefile.unix
src/netbase.cpp
src/rpc.cpp
Pieter Wuille [Mon, 9 Jan 2012 22:39:26 +0000]
Remove unused definition
Luke Dashjr [Tue, 10 Jan 2012 20:50:37 +0000]
Bump version to 0.4.4
Matt Corallo [Tue, 3 Jan 2012 08:03:07 +0000]
Fix horrific performance found by gmaxwell.
Gavin Andresen [Tue, 3 Jan 2012 16:17:04 +0000]
I broke -testnet with my TOR option-parsing fixes.
Gavin Andresen [Tue, 3 Jan 2012 15:14:22 +0000]
Fix issue #659, and cleanup wallet/command-line argument handling a bit
Conflicts:
src/init.cpp
src/util.cpp
Pieter Wuille [Tue, 3 Jan 2012 00:28:15 +0000]
Fix some address-handling deadlocks
Made three critical blocks for cs_mapAddresses smaller, and moved
writing to the database out of them. This should also improve the
concurrency of the code.
Luke Dashjr [Wed, 14 Dec 2011 06:03:55 +0000]
Bugfix: fForRelay should be false when deciding required fee to include in blocks
During the rushed transition from 0.01 BTC to 0.0005 BTC fees, we took the
approach of dropping the relay and block-inclusion fee to 0.0005 BTC
immediately, and only delayed adjusting the sending fee for the next release.
Afterward, the relay fee was lowered to 0.0001 BTC to avoid having the same
problem in the future. However, the block inclusion code was left setting
fForRelay to true! This fixes that, so the lower 0.0001 BTC allowance is (as
intended) only permitted for real relaying.
Luke Dashjr [Fri, 16 Dec 2011 23:34:47 +0000]
Add my DNS seed domain
Matt Corallo [Fri, 16 Dec 2011 16:30:36 +0000]
Add sipa's new dnsseed.
Luke Dashjr [Fri, 16 Dec 2011 00:25:29 +0000]
Bump version to 0.4.3
Luke Dashjr [Mon, 12 Dec 2011 19:33:47 +0000]
Merge branch 'restore_old_miniupnp_compat' into 0.4.x
Luke Dashjr [Sat, 10 Dec 2011 16:52:50 +0000]
Restore compatibility with miniupnpc 1.5 (without breaking miniupnp 1.6)
Matt Corallo [Mon, 21 Nov 2011 17:25:00 +0000]
Move DNS Seed lookup to a new thread.