Jeff Garzik
4bd6299efd
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.
2012-06-19 15:36:43 -04:00
Gavin Andresen
fcbeaff8d0
Move signature cache from CKey::Verify to CheckSig in script.cpp
...
More than doubles the speed of verifying already-cached signatures
that use compressed pubkeys:
Before: ~200 microseconds
After: ~80 microseconds
(no caching at all: ~3,300 microseconds per signature)
Also encapsulates the signature cache code in a class
and fixes a signed/unsigned comparison warning.
2012-06-19 15:36:34 -04:00
Jeff Garzik
414e0407df
Define BOOST_SPIRIT_THREADSAFE in all makefiles
...
rather than at each include site.
Fixes #1371
2012-06-19 15:27:54 -04:00
Jeff Garzik
7c1773cf37
Default to DB_TXN_WRITE_NOSYNC for all transactional operations
...
* This is safer than DB_TXN_NOSYNC, and does not appear to impact
performance.
* Applying this to the dbenv is necessary to avoid many fdatasync(2)
calls on db 5.x
* We carefully and thoroughly flush databases upon shutdown and
other important events already.
2012-06-19 15:23:42 -04:00
Gavin Andresen
28a498d5a6
Refactor: GetRandHash() method for util
2012-06-19 15:22:58 -04:00
Gavin Andresen
2d90330d8c
Cache signature verifications
...
Create a maximum-10MB signature verification result cache.
This should almost double the number of transactions that
can be processed on a given CPU, because before this change
ECDSA signatures were verified when transactions were added
to the memory pool and then again when they appeared in
a block.
2012-06-19 15:22:57 -04:00
Gavin Andresen
4d87a33eae
Further DoS prevention: Verify signatures last
...
Loop over all inputs doing inexpensive validity checks first,
and then loop over them a second time doing expensive signature
checks. This helps prevent possible CPU exhaustion attacks
where an attacker tries to make a victim waste time checking
signatures for invalid transactions.
2012-06-19 14:52:50 -04:00
Gavin Andresen
63ee422ab3
Remove invalid dependent orphans from memory
...
Remove orphan transactions from memory once
all of their parent transactions are received
and they're still not valid.
Thanks to Sergio Demian Lerner for suggesting this fix.
2012-06-19 14:52:41 -04:00
Gavin Andresen
469f6da8bc
Optimize orphan transaction handling
...
Changes suggested by Sergio Demian Lerner to
help prevent potential DoS attacks.
2012-06-19 14:52:29 -04:00
Jeff Garzik
87593b9837
Make orphan logging more verbose, displaying mapOrphanTransactions.size()
...
Old log message:
storing orphan tx df2244f6bc
New log message:
storing orphan tx df2244f6bc (mapsz 51)
Also, trim a few trailing whitespace in main.cpp.
2012-06-19 14:49:38 -04:00
Gavin Andresen
4aa8021a96
Refactor: move code from key.h to key.cpp
2012-06-19 14:45:40 -04:00
Gavin Andresen
db4036a829
Bump version numbers to 0.6.3
2012-06-19 14:44:38 -04:00
Gavin Andresen
40fd689eb1
Bump version to 0.6.2.2 for osx-special build
v0.6.2.2
2012-05-11 10:09:45 -04:00
Gavin Andresen
aaff04791d
Merge branch 'semaphores-v0.6.2' of https://github.com/sipa/bitcoin into 0.6.2
2012-05-10 16:39:49 -04:00
Pieter Wuille
f0f1b3775e
Use polling instead of boost's broken semaphore on OSX
2012-05-10 22:34:49 +02:00
Pieter Wuille
ca0816152d
Use semaphores instead of condition variables
2012-05-10 22:34:43 +02:00
Gavin Andresen
91b13a0dff
Revert "Fix 100% cpu usage on osx bug"
...
This reverts commit 8f9123a157 .
2012-05-10 16:14:15 -04:00
Gavin Andresen
8f9123a157
Fix 100% cpu usage on osx bug
v0.6.2.1
2012-05-09 18:58:38 -04:00
Gavin Andresen
8ff1873096
Bump versions for 0.6.2
v0.6.2
2012-05-08 12:58:39 -04:00
Pieter Wuille
5e27f737fa
Bugfix: store source address in addrman
2012-05-06 19:59:42 -04:00
Pieter Wuille
05ff9680ba
Fix addrman crashes
...
A function returned the element to remove from a bucket, instead of its
position in that bucket. This function was only called when a tried
bucket overflowed, which only happens after many outgoing connections
have been made.
Closes : #1065 , #1156
2012-05-06 19:58:22 -04:00
Pieter Wuille
dfdaee9310
Add extra asserts to addrman
2012-05-06 19:58:06 -04:00
Gavin Andresen
397737b913
Bump version numbers for 0.6.1rc2
v0.6.1
2012-05-04 10:22:26 -04:00
Gregory Maxwell
1210aa435f
Merge pull request #1188 from Diapolo/rem_BackupWallet_wallet_h
...
remove obsolete BackupWallet() entry in wallet.h
2012-05-03 06:47:16 -07:00
Philip Kaufmann
e23a121afe
remove obsolete BackupWallet() entry in wallet.h
2012-05-03 11:30:52 +02:00
Wladimir J. van der Laan
e099e1568a
Merge pull request #1179 from Diapolo/project-file
...
add bitcoin-qt.rc to OTHER_FILES (shown in Qt Creator)
2012-05-01 23:57:02 -07:00
Jeff Garzik
ca97bde8ff
Merge pull request #1171 from Diapolo/fix_compiler_warn
...
fix 2 compiler warnings
2012-05-01 15:02:41 -07:00
Philip Kaufmann
8a6329a7ac
add bitcoin-qt.rc to OTHER_FILES (shown in Qt Creator)
2012-05-01 22:26:33 +02:00
Wladimir J. van der Laan
50d710496d
Merge pull request #1176 from Diapolo/project-file
...
fix DEPENDPATH in the project file, as json has no include sub-dir and src was in twice
2012-05-01 12:38:56 -07:00
Jeff Garzik
e19ccfa657
Merge pull request #1177 from laanwj/2012_05_remove_duplicate_securestring
...
remove duplicate definition of SecureString in util.h
2012-05-01 10:05:00 -07:00
Wladimir J. van der Laan
6d25b0e99a
Merge pull request #1172 from Diapolo/serialize_h_rem_typedef
...
remove unused typedef in serialize.h
2012-05-01 09:52:38 -07:00
Wladimir J. van der Laan
3ee5f8aac3
remove duplicate definition of SecureString in util.h
...
SecureString was moved to allocators.h in commit 6cb6d62347
2012-05-01 18:49:50 +02:00
Philip Kaufmann
68103043ce
fix DEPENDPATH in the project file, as json has no include sub-dir and src was in twice
2012-05-01 18:45:10 +02:00
Jeff Garzik
bd51e8ef8a
Merge pull request #1173 from Diapolo/init_cpp_comment_upd
...
remove references to bitcoin-wx from comment in init.cpp
2012-05-01 08:29:10 -07:00
Philip Kaufmann
1c94f88d5e
fix compiler warning "suggest parentheses around assignment used as truth
...
value [-Wparentheses]" in util.cpp
2012-05-01 11:41:04 +02:00
Philip Kaufmann
f8e4d43be7
fix compiler warning "suggest explicit braces to avoid ambiguous "else"
...
[-Wparentheses]" in net.cpp
2012-05-01 11:40:08 +02:00
Philip Kaufmann
00d971e1e7
remove references to bitcoin-wx from comment in init.cpp
2012-05-01 01:59:54 +02:00
Philip Kaufmann
810b4fad7d
remove unused typedef in serialize.h
2012-05-01 01:56:47 +02:00
Gavin Andresen
be8651dde7
Check earlier for blocks with duplicate transactions. Fixes #1167
v0.6.1rc2
2012-04-30 11:08:07 -04:00
Wladimir J. van der Laan
ec4997d48f
Merge pull request #1139 from Diapolo/messagepage
...
change button tooltip on sign message page for copy to clipboard...
2012-04-29 04:35:27 -07:00
Wladimir J. van der Laan
0acb1e715c
Merge pull request #1163 from laanwj/2012_04_uiperformanceissue
...
Fix critical UI performance issue (#1154 )
2012-04-29 04:34:42 -07:00
Wladimir J. van der Laan
6974aff668
Fix critical UI performance issue ( #1154 )
2012-04-29 13:25:05 +02:00
Gavin Andresen
0acbe31cfc
Update openssl version
v0.6.1rc1
2012-04-27 12:45:49 -04:00
Gavin Andresen
cedcec2dec
Bump win32.deps version number for new openssl
2012-04-27 11:53:11 -04:00
Gavin Andresen
2b4d7735b6
Windows build: compile against openssl 1.0.1b
2012-04-27 10:52:14 -04:00
Gavin Andresen
2c31cfc271
Bump version numbers for 0.6.1rc1
2012-04-27 10:14:33 -04:00
Gavin Andresen
dfead66eac
Merge pull request #1151 from freewil/listsinceblock-blockhash
...
listsinceblock: rpc param blockid -> blockhash
2012-04-26 15:37:12 -07:00
Gavin Andresen
27d4b53a5c
Merge pull request #1150 from gavinandresen/NOPCH
...
Remove unused -DNOPCH
2012-04-26 15:36:33 -07:00
Gavin Andresen
b2997dc043
Merge pull request #1152 from freewil/remove-strange-debug
...
remove strange debug message from listsinceblock
2012-04-26 15:36:15 -07:00
Pieter Wuille
287ce61dc2
Merge pull request #1146 from drizztbsd/posix-include
...
We should include netinet/in.h to use sockaddr_in (POSIX.1-2001)
2012-04-26 15:25:56 -07:00