Commit Graph

7649 Commits

Author SHA1 Message Date
dexX7
c9e022b7ee Initialization: set Boost path locale in main thread
The path locale is lazy initialized and to avoid deinitialization errors
in multithreading environments, it is set explicitly by the main thread.

Conflicts:
	src/util.cpp
Rebased-From: 317e66c741
Github-Pull: #5877
2015-03-24 08:45:24 +01:00
Wladimir J. van der Laan
10c09f98b2
Merge pull request #5926
8752b5c 0.10 fix for crashes on OSX 10.6 (Cory Fields)
2015-03-19 07:57:26 +01:00
Cory Fields
8752b5c882 0.10 fix for crashes on OSX 10.6
strnlen is available at build-time but not at runtime, causing a crash.

0.11 drops support for 10.6, so this is not needed in master.
2015-03-19 00:14:28 -04:00
Wladimir J. van der Laan
601327be8c
bump version to 0.10.1 in preparation of RC1 2015-03-18 13:01:10 +01:00
Pieter Wuille
ca301bf98c
Reduce fingerprinting through timestamps in 'addr' messages.
Suggested by Jonas Nick.

Rebased-From: 9c2737901b
Github-Pull: #5860
2015-03-17 16:39:10 +01:00
Jonas Schnelli
2c0840631d
[QT] some mac specifiy cleanup (memory handling, unnecessary code)
Rebased-From: 8b60808c1e
Github-Pull: #5880
2015-03-16 13:56:34 +01:00
Jonas Schnelli
81145a6ccd
[QT] fix OSX dock icon window reopening
fixes #5878

Rebased-From: 89e70e931d
Github-Pull: #5880
2015-03-16 13:56:13 +01:00
Alex Morcos
11173786ce
add RPC test for InvalidateBlock
Rebased-From: 88f6c8c365
Github-Pull: #5879
2015-03-12 17:51:52 +01:00
Alex Morcos
c91c660e49
fix InvalidateBlock to repopulate setBlockIndexCandidates
Rebased-From: a9af415887
Github-Pull: #5879
2015-03-12 17:51:00 +01:00
Cory Fields
002c8a2411
fix possible block db breakage during re-index
When re-indexing, there are a few cases where garbage data may be skipped in
the block files. In these cases, the indices are correctly written to the index
db, however the pointer to the next position for writing in the current block
file is calculated by adding the sizes of the valid blocks found.

As a result, when the re-index is finished, the index db is correct for all
existing blocks, but the next block will be written to an incorrect offset,
likely overwriting existing blocks.

Rather than using the sum of all valid blocks to determine the next write
position, use the end of the last block written to the file. Don't assume that
the current block is the last one in the file, since they may be read
out-of-order.

Rebased-From: bb6acff079
Github-Pull: #5864
2015-03-11 08:34:43 +01:00
Ivan Pustogarov
200f29363b
Ignore getaddr messages on Outbound connections.
The only time when a client sends a "getaddr" message is when he
esatblishes an Outbound connection (see ProcessMessage() in
src/main.cpp).  Another bitcoin client is expected to receive a
"getaddr" message only on Inbound connection. Ignoring "gettaddr"
requests on Outbound connections can resolve potential privacy issues
(and as was said such request normally do not happen anyway).

Rebased-From: dca799e1db
Github-Pull: #5442
2015-03-09 12:25:20 +01:00
Pieter Wuille
d5d8998028
Limit message sizes before transfer
This introduces a fixed limit for the size of p2p messages, and enforces it
before download.

Rebased-From: ba04c4a780
Github-Pull: #5843
2015-03-09 11:13:35 +01:00
Jonas Schnelli
786cf72c7f [Qt] fix a issue where "command line options"-action overwrite "Preference"-action (on OSX)
- fixes #5800

Conflicts:
	src/qt/bitcoingui.cpp

Rebased-From: 9bbb880be4
Github-Pull: #5858
2015-03-09 11:05:43 +01:00
Pieter Wuille
aeb9279228
Better fingerprinting protection for non-main-chain getdatas.
With headers-first we can compare against the best header timestamp, rather
than using checkpoints which require code updates to maintain.

Rebased-From: 85da07a5a0
Github-Pull: #5820
2015-02-26 17:14:14 +01:00
Gregory Maxwell
23126a0a09 Sanitize command strings before logging them.
Normally bitcoin core does not display any network originated strings without
 sanitizing or hex encoding.  This wasn't done for strcommand in many places.

This could be used to play havoc with a terminal displaying the logs,
 especially with printtoconsole in use.

Thanks to Evil-Knievel for reporting this issue.

Conflicts:
	src/main.cpp
2015-02-24 08:40:07 +01:00
Suhas Daftuar
d148f62e00
Acquire CCheckQueue's lock to avoid race condition
This fixes a potential race condition in the CCheckQueueControl constructor,
which was looking directly at data in CCheckQueue without acquiring its lock.

Remove the now-unnecessary friendship for CCheckQueueControl

Rebased-From: cf008ac8c3
Github-Pull: #5721
2015-02-23 19:34:24 +01:00
fsb4000
7f502be259
fix crash: createmultisig and addmultisigaddress
Rebased-From: e5d9d77df2
Github-Pull: #5706
2015-02-20 09:53:44 +01:00
Cory Fields
047a898317
gitian: don't add . to tar list
Since permissions and timestamps are changed for the sake of determinism,
. must not be added to the archive. Otherwise, tar may try to modify pwd when
extracting.

Rebased-From: 0c6ab676ee
Github-Pull: #5790
2015-02-13 09:55:11 +01:00
Wladimir J. van der Laan
327d3e8824
Merge pull request #5771
7b6c847 doc/release-notes.md: Explain affect of BIP66 on miners (Luke Dashjr)
2015-02-09 12:28:44 +01:00
Luke Dashjr
7b6c847f67 doc/release-notes.md: Explain affect of BIP66 on miners 2015-02-08 22:40:24 +00:00
Pieter Wuille
e43f25c5b1
Add BIP 66 notice to the 0.10 release notes.
Conflicts:
	doc/release-notes.md

Rebased-From: 04ca082dd9c1d4221af65d945a66b87e66058f92
Github-Pull: #5757
2015-02-05 11:11:05 +01:00
Wladimir J. van der Laan
275400bfcc
Merge pull request #5755
63efb36 Modify release-notes for changes related to free tranactions (Alex Morcos)
2015-02-05 11:05:13 +01:00
Alex Morcos
63efb36672 Modify release-notes for changes related to free tranactions
Add comment about free transactions no longer being the default
Inform about the relay policy change
2015-02-04 21:40:16 -05:00
Gregory Maxwell
1eb14af28f
Increase block download timeout base from 10 to 20 minutes.
This harmonizes the block fetch timeout with the existing ping timeout
 and eliminates a guaranteed eventual failure from congestion collapse
 for a network operating right at its limit.

It's unlikely that we wouldn't suffer other failures if we were really
 anywhere near the network's limit, and a complete avoidance of congestion
 collapse risk requires (I think) an exponential back-off. So this isn't
 a major concern, but I think it's also useful for reducing the complexity
 of understanding out timeouts.

Github-Pull: #5647
Rebased-From: 3ff735c99a
2015-02-03 10:37:30 +01:00
Wladimir J. van der Laan
336f9fbd30
Merge pull request #5714
3916a81 Increase coverage of DERSIG edge cases (Pieter Wuille)
6da2028 Add RPC test for DERSIG BIP switchover logic (Pieter Wuille)
773c30d BIP66 changeover logic (Pieter Wuille)
18695f0 Example unit tests from BIP66 (Pieter Wuille)
abfbeaf Change IsDERSignature to BIP66 implementation (Pieter Wuille)
2015-02-03 10:33:58 +01:00
Alex Morcos
b6347bf813
Fix priority calculation in CreateTransaction
Make this projection of priority in 1 block match the calculation in the low priority reject code.

Rebased-From: 2d9b0b7f03
Github-Pull: #5675
2015-02-03 09:04:20 +01:00
Pieter Wuille
2448d34298
Avoid storing a reference passed to SignatureChecker constructors
Rebased-From: 9fddceda44
Github-Pull: #5719
2015-02-03 08:52:13 +01:00
Pieter Wuille
1bbad80bf4
Use separate SignatureChecker for CMutableTransaction
Conflicts:
	src/main.cpp
	src/script/bitcoinconsensus.cpp

Rebased-From: 858809a33e
Github-Pull: #5719
2015-02-03 08:48:04 +01:00
Wladimir J. van der Laan
b788c5561a
Merge pull request #5740
fd7350d doc/release-notes.md: Add summary of mining enhancements (Luke Dashjr)
2015-02-03 07:49:48 +01:00
Luke Dashjr
fd7350d22e doc/release-notes.md: Add summary of mining enhancements 2015-02-02 23:51:07 +00:00
Pieter Wuille
3916a81a27 Increase coverage of DERSIG edge cases 2015-02-01 17:57:44 -04:00
Pieter Wuille
6da2028b55 Add RPC test for DERSIG BIP switchover logic 2015-02-01 17:57:44 -04:00
Pieter Wuille
773c30d756 BIP66 changeover logic 2015-02-01 17:57:38 -04:00
Pieter Wuille
18695f08ef Example unit tests from BIP66 2015-02-01 17:56:06 -04:00
Pieter Wuille
abfbeafe84 Change IsDERSignature to BIP66 implementation 2015-02-01 17:56:06 -04:00
Philip Kaufmann
6a02ef8bdb
[Qt] don't allow amount changes when AmountSpinBox is read-only
- before it was possible to use the steps to change e.g. amouns of
  authenticated or unauthenticated payment requests (AmountSpinBox is
  already set to read-only here) - this is now fixed
- also move the reimplemented stepEnabled() function to the
  protected section of our class, where it belongs (see Qt doc)

Github-Pull: #5637
Rebased-From: 0fd9e2bf43
2015-01-30 15:12:05 +01:00
fsb4000
b61940b3a1
Change Coin Control first column label
Github-Pull: #5720
Rebased-From: 55eade9d46
2015-01-29 11:21:05 +01:00
Matt Corallo
c5044bc169
sleep-wait on genesis block during init with -reindex
Rebased-From: ff09e31a51
Github-Pull: #5243
2015-01-26 12:29:56 +01:00
Peter Todd
b24ff47c64
Make empty byte arrays pass CheckSignatureEncoding()
Makes it possible to compactly provide a delibrately invalid signature
for use with CHECK(MULTI)SIG. For instance with BIP19 if m != n invalid
signatures need to be provided in the scriptSig; prior to this change
those invalid signatures would need to be large DER-encoded signatures.

Note that we may want to further expand on this change in the future by
saying that only OP_0 is a "valid" invalid signature; BIP19 even with
this change is inherently malleable as the invalid signatures can be any
validly encoded DER signature.

Rebased-From: 2fa9a8ec86
Github-Pull: #5627
2015-01-26 12:10:29 +01:00
fsb4000
ed4206acb1
fix crash: CoinControl "space" bug
Just like baf80c26a2

Github-Pull: #5700
Rebased-From: 944c256741
2015-01-23 16:23:54 +01:00
Cory Fields
58259ad1ed
qt: fix broken unicode chars on osx 10.10
- qt: avoid hard-coding font names

They may not contain all necessary characters for a language

- qt: fix broken unicode chars on osx 10.10

The default font changed again.

The real fix is to compile qt against a >= 10.8 sdk, but this is simple enough
to backport to 0.10 to avoid having to do that there.

Note: NSAppKitVersionNumber is a double and there's no official value for
NSAppKitVersionNumber10_10. Since == isn't reliable for doubles, use Apple's
guidelines for testing versions here:
https://developer.apple.com/library/mac/releasenotes/AppKit/RN-AppKit/

Chinese and Japanese fonts have been hard-coded as well, otherwise they fail to
show up at all.

- qt: fonts: allow SubstituteFonts to filter based on user's language

SubstituteFonts() has been moved to after app identification so that QSettings
are accessible.

Github-Pull: #5671
Rebased-From: 73cd4edb4f 52954e6efd f5ad78b34a
2015-01-19 12:37:41 +01:00
Gregory Maxwell
186a517692
Restore RPC HTTP keepalives to default.
This avoids a regression for issues like #334 where high speed
 repeated connections eventually run the HTTP client out of
 sockets because all of theirs end up in time_wait.

Maybe the trade-off here is suboptimal, but if both choices will
 fail then we prefer fewer changes until the root cause is solved.

Rebased-From: 1a25a7edf8 7d2cb48511
Github-Pull: #5674
2015-01-19 12:16:17 +01:00
Gregory Maxwell
aaf55d25c6
Add a -rpckeepalive and disable RPC use of HTTP persistent connections.
It turns out that some miners have been staying with old versions of
 Bitcoin Core because their software  behaves poorly with persistent
 connections and the Bitcoin Core thread and connection limits.

What happens is that underlying  HTTP libraries leave connections open
 invisibly to their users and then the user runs into the default four
 thread limit.  This looks like Bitcoin Core is unresponsive to RPC.

There are many things that should be improved in Bitcoin Core's behavior
 here, e.g. supporting more concurrent connections, not tying up threads
 for idle connections, disconnecting kept-alive  connections when limits
 are reached, etc. All are fairly big, risky changes.

Disabling keep-alive is a simple workaround. It's often not easy to turn
 off the keep-alive support in the client where it may be buried in some
 platform library.

If you are one of the few who really needs persistent connections you
 probably know that you want them and can find a switch; while if you
 don't and the misbehavior is hitting you it is hard to discover the
 source of your problems is keepalive related.  Given that it is best
 to default to off until they're handled better.

Github-Merge: #5655
Rebased-From: 16a5c18cea 56c1093dae 1dd8ee72af
2015-01-15 09:38:24 +01:00
Wladimir J. van der Laan
249bf0e049
Merge pull request #5644
af35bdc Update 0.10 release notes as of 0.10.0rc2 (Micha)
2015-01-12 16:10:50 +01:00
Wladimir J. van der Laan
c3200bcd1e
depends: remove embedded OpenSSL timestamp for determinism 2015-01-12 15:29:51 +01:00
Micha
af35bdc6b0
Update 0.10 release notes as of 0.10.0rc2
Also add 0.9.4's release notes to the archive.
Added commits based on
http://sourceforge.net/p/bitcoin/mailman/message/33225960/
[skip ci]
2015-01-12 15:38:13 +02:00
Pieter Wuille
4e7c219122
Catch UTXO set read errors and shutdown
Github-Pull: #5619
Rebased-From: 13cdce4336
2015-01-12 11:28:39 +01:00
Pieter Wuille
a3a73170a9
Introduce 10 minute block download timeout
This will disconnect peers that do not transfer a block in 10 minutes, plus
5 minutes for every previously queued block with validated headers
(accomodating downstream bandwidth down to a few kilobytes per second - below
that the node would have trouble staying synchronized anyway).

Github-Pull: #5608
Rebased-From: 916130348c
2015-01-12 11:28:23 +01:00
Wladimir J. van der Laan
12b7c444f0
Improve robustness of DER recoding code
Add some defensive programming on top of #5634.

This copies the respective OpenSSL code in ECDSA_verify in
OpenSSL pre-1.0.1k (e.g. https://github.com/openssl/openssl/blob/OpenSSL_1_0_1j/crypto/ecdsa/ecs_vrf.c#L89)
more closely.

As reported by @sergiodemianlerner.

Github-Pull: #5640
Rebased-From: c6b7b29f23
2015-01-12 09:12:12 +01:00
Cory Fields
76ce5c8de3
fail immediately on an empty signature
Github-Pull: #5634
Rebased-From: 8dccba6a45
2015-01-10 08:10:38 +01:00