Commit graph

7032 commits

Author SHA1 Message Date
Pieter Wuille
341735eb8f Headers-first synchronization
Many changes:
* Do not use 'getblocks', but 'getheaders', and use it to build a headers tree.
* Blocks are fetched in parallel from all available outbound peers, using a
  limited moving window. When one peer stalls the movement of the window, it is
  disconnected.
* No more orphan blocks. At all. We only ever request a block for which we have
  verified the headers, and store it to disk immediately. This means that a
  disk-fill attack would require PoW.
* Require protocol version 31800 for every peer (released in december 2010).
* No more syncnode (we sync from everyone we can, though limited to 1 during
  initial *headers* sync).
* Introduce some extra named constants, comments and asserts.
2014-10-14 15:42:01 -07:00
Wladimir J. van der Laan
992ab87114
Merge pull request #4942
9406471 Write fee estimate and peers files only when initialized (Wladimir J. van der Laan)
2014-10-14 11:35:17 +02:00
Wladimir J. van der Laan
2e4f6127bf
Merge pull request #5074
005b5af rpc-tests: don't spew non-errors to stdout (Cory Fields)
2014-10-14 10:50:22 +02:00
Pieter Wuille
1f27c310a4
Merge pull request #5080
e21b2e0 Typo in test (Luke)
2014-10-13 12:11:50 -07:00
Luke
e21b2e0d5f Typo in test 2014-10-13 16:57:09 +01:00
Wladimir J. van der Laan
d7e1950483
Merge pull request #4937
ccca27a [Wallet] Watch-only fixes (Cozz Lovan)
2014-10-13 13:57:07 +02:00
Wladimir J. van der Laan
f98bd4eae1
Merge pull request #5073
d5fd094 build: fix qt test build when libprotobuf is in a non-standard path (Cory Fields)
a7d1f03 build: fix dynamic boost check when --with-boost= is used (Cory Fields)
2014-10-11 10:48:35 +02:00
Cory Fields
005b5af6e2 rpc-tests: don't spew non-errors to stdout
There's a brief race here, the process might've already exited and cleaned up
after itself. If that's the case, reading from the pidfile will harmlessly
fail. Keep those quiet.
2014-10-10 13:11:49 -04:00
Cory Fields
d5fd094569 build: fix qt test build when libprotobuf is in a non-standard path 2014-10-10 13:03:28 -04:00
Cory Fields
a7d1f035ae build: fix dynamic boost check when --with-boost= is used 2014-10-10 13:00:50 -04:00
Wladimir J. van der Laan
023690c0f2
Merge pull request #4802
6fd546d Remove CChainParams::NetworkID() (jtimon)
cc97210 Add fTestnetToBeDeprecatedFieldRPC to CChainParams (jtimon)
e11712d Move checkpoint data selection to chainparams (jtimon)
6de50c3 qt: add network-specific style object (Wladimir J. van der Laan)
2014-10-10 11:56:58 +02:00
jtimon
6fd546dd96 Remove CChainParams::NetworkID() 2014-10-10 11:01:00 +02:00
jtimon
cc97210799 Add fTestnetToBeDeprecatedFieldRPC to CChainParams 2014-10-10 11:01:00 +02:00
jtimon
e11712df7e Move checkpoint data selection to chainparams 2014-10-10 11:00:59 +02:00
Wladimir J. van der Laan
6de50c3c9a qt: add network-specific style object
Mainly cleanups: Gets rid of isTestNet everywhere, by keeping track
of network-specific theming in a central place.

Also makes GUI no longer dependent on the network ID enumeration, which
alleviates concerns about #4802.
2014-10-10 11:00:59 +02:00
Wladimir J. van der Laan
11d486d23f
Merge pull request #5072
caecb42 Travis: Descriptive build names (Luke Dashjr)
2014-10-10 08:30:09 +02:00
Luke Dashjr
caecb42b38 Travis: Descriptive build names 2014-10-10 03:36:49 +00:00
Wladimir J. van der Laan
fe36e031cd
Merge pull request #5032
4bd1185 Qt: allow "emergency" shutdown during startup (Philip Kaufmann)
2014-10-09 18:10:29 +02:00
Gavin Andresen
3222802ea1
Merge pull request #5059
dbca89b Trigger -alertnotify if network is upgrading without you (Gavin Andresen)
e01a793 Refactor -alertnotify code (Gavin Andresen)

Signed-off-by: Gavin Andresen <gavinandresen@gmail.com>
2014-10-09 10:39:29 -04:00
Gavin Andresen
dbca89b74b
Trigger -alertnotify if network is upgrading without you
This adds a -regetest-only undocumented (for regression testing only)
command-line option -blockversion=N to set block.nVersion.

Adds to the "has the rest of the network upgraded to a
block.nVersion we don't understand" code so it calls
-alertnotify when 51 of the last 100 blocks are up-version.
But it only alerts once, not with every subsequent new, upversion
block.

And adds a forknotify.py regression test to make sure it works.

Tested using forknotify.py:

Before adding CAlert::Notify, get:
Assertion failed: -alertnotify did not warn of up-version blocks

Before adding code to only alert once:
Assertion failed: -alertnotify excessive warning of up-version blocks

After final code in this pull:
Tests successful
2014-10-09 10:28:27 -04:00
Gavin Andresen
e01a7939d3
Refactor -alertnotify code
Refactor common -alertnotify code into static CAlert::Notify method.
2014-10-09 10:25:30 -04:00
Pieter Wuille
dec58922d0
Merge pull request #4996
d0c4197 change exit(1) to an assert in CWallet::EncryptWallet (Philip Kaufmann)
870da77 fix possible memory leaks in CWallet::EncryptWallet (Philip Kaufmann)
f606bb9 fix a possible memory leak in CWalletDB::Recover (Philip Kaufmann)
2014-10-08 15:51:32 -07:00
Pieter Wuille
bf7b4fc6d3
Merge pull request #5004
9df9cf5 Make SCRIPT_VERIFY_STRICTENC compatible with BIP62 (Pieter Wuille)
2014-10-08 15:48:57 -07:00
Pieter Wuille
9df9cf5a9f Make SCRIPT_VERIFY_STRICTENC compatible with BIP62
* Delete canonical_tests.cpp, and move the tests to script_tests.cpp.
* Split off SCRIPT_VERIFY_DERSIG from SCRIPT_VERIFY_STRICTENC (the BIP62 part of it).
* Change signature STRICTENC/DERSIG semantics to fail the script entirely rather than the CHECKSIG result (softfork safety, and BIP62 requirement).
* Add many autogenerated tests for several odd cases.
* Mention specific BIP62 rules in the script verification flags.
2014-10-08 15:42:29 -07:00
Pieter Wuille
d4a42334d4
Merge pull request #4834
7c70438 Get rid of the dummy CCoinsViewCache constructor arg (Pieter Wuille)
ed27e53 Add coins_tests with a large randomized CCoinViewCache test. (Pieter Wuille)
058b08c Do not keep fully spent but unwritten CCoins entries cached. (Pieter Wuille)
c9d1a81 Get rid of CCoinsView's SetCoins and SetBestBlock. (Pieter Wuille)
f28aec0 Use ModifyCoins instead of mutable GetCoins. (Pieter Wuille)
2014-10-08 14:58:16 -07:00
Wladimir J. van der Laan
97a34c28d5
Merge pull request #5051
aedc74d contrib: make linearize-data.py cope with out-of-order blocks (Wladimir J. van der Laan)
2014-10-08 09:47:41 +02:00
Wladimir J. van der Laan
6860a55ea0
Merge pull request #4979
de10efd add -timeout default as constant and use them (Philip Kaufmann)
2014-10-08 09:16:19 +02:00
Wladimir J. van der Laan
ad9cd64d3b
Merge pull request #5055
2c930d9 Prettify JSON tests and minimize diffs (Pieter Wuille)
2014-10-08 09:12:39 +02:00
Wladimir J. van der Laan
fb5fa86bb4
Merge pull request #5050
772ab0e contrib: use batched JSON-RPC in linarize-hashes (Wladimir J. van der Laan)
2014-10-08 08:54:18 +02:00
Wladimir J. van der Laan
7c6cbff0e5
Merge pull request #4976
27c3e91 qt: add proxy to options overridden if necessary. (Cory Fields)
2014-10-07 12:33:45 +02:00
Wladimir J. van der Laan
2b5261c636
Merge pull request #5041
1f9be98 Disable App Nap on OSX 10.9+ (Michael Ford)
2014-10-07 10:17:55 +02:00
Wladimir J. van der Laan
3eaa9462f8
Merge pull request #5047
3e61eb9 minor txindex documentation improvement (Cozz Lovan)
2014-10-07 10:17:05 +02:00
Wladimir J. van der Laan
cd3269e38e
contrib: revert changes to github-merge.sh in #5038 2014-10-07 10:00:12 +02:00
Wladimir J. van der Laan
ca067dc937
Merge pull request #5053
27368e7 Homebrew lang fix (Dominyk Tiller)
2014-10-07 09:58:21 +02:00
Pieter Wuille
2c930d932b Prettify JSON tests and minimize diffs 2014-10-07 09:41:33 +02:00
Wladimir J. van der Laan
d4b571a5d3
Merge pull request #5038
0b17964 Bugfix: Replace bashisms with standard sh in tests/tools (Luke Dashjr)
ab72068 Bugfix: Replace bashisms with standard sh in gitian descriptors (Luke Dashjr)
b77b4ed Bugfix: Replace bashisms with standard sh to fix build on non-BASH systems (Luke Dashjr)
d6b0539 travis: add non-default shell testing to travis. (Cory Fields)
2014-10-07 08:53:07 +02:00
Wladimir J. van der Laan
953f16cb4e
Merge pull request #4954
9d7cd4c Don't return an address for invalid pubkeys (Andy Alness)
2014-10-07 08:51:20 +02:00
Andy Alness
9d7cd4c598 Don't return an address for invalid pubkeys 2014-10-06 21:54:34 -04:00
Pieter Wuille
a2a5fe3b72
Merge pull request #5049
4dc5eb0 fix a lock indentation in main.cpp (Philip Kaufmann)
5eed8c2 minor license, header end comment etc. cleanup in /script (Philip Kaufmann)
2014-10-06 23:51:45 +02:00
Dominyk Tiller
27368e7626 Homebrew lang fix
Very small tweak to correct the language on Homebrew's sandboxing process.

Discussed in [this commit](9fedafba4b).
2014-10-06 21:36:24 +01:00
Cozz Lovan
3e61eb9c51 minor txindex documentation improvement 2014-10-06 18:52:51 +02:00
Wladimir J. van der Laan
aedc74dfa6 contrib: make linearize-data.py cope with out-of-order blocks
Make it possible to read blocks in any order. This will be required
after headers-first (#4468), so should be merged before that.

- Read block header. For expected blocks, continue, else skip.
- For in-order blocks: copy block contents directly. Write prior
  out-of-order blocks if this connects a consecutive span.
- For out-of-order blocks, store extents of block data for later
  retrieval. Cache out-of-order blocks in memory up to 100MB
  (configurable).
2014-10-06 18:30:12 +02:00
Wladimir J. van der Laan
772ab0ea98 contrib: use batched JSON-RPC in linarize-hashes
Batch up to 10000 requests for a ~30x speedup.
2014-10-06 13:27:13 +02:00
Philip Kaufmann
de10efd154 add -timeout default as constant and use them
- update help message text
- simplify code in init to check for -timeout
2014-10-06 13:13:25 +02:00
Philip Kaufmann
4dc5eb057c fix a lock indentation in main.cpp
- also ensure alphabetical ordering in file header
2014-10-06 13:04:02 +02:00
Philip Kaufmann
5eed8c21c7 minor license, header end comment etc. cleanup in /script
- ensure all licenses are just MIT
- add a missing header end comment
- ensure alphabetical ordering
2014-10-06 13:00:55 +02:00
Wladimir J. van der Laan
5505a1b13f
Merge pull request #5036
eb6b3b2 Update English translation (Wladimir J. van der Laan)
b9b2e3f Don't translate state.Abort() messages (Wladimir J. van der Laan)
2014-10-06 04:42:09 +02:00
Wladimir J. van der Laan
5f1aee066a
Merge pull request #4890
e790c37 Replace SCRIPT_VERIFY_NOCACHE by flag directly to checker (Pieter Wuille)
5c1e798 Make signature cache optional (Pieter Wuille)
c7829ea Abstract out SignatureChecker (Pieter Wuille)
2014-10-06 04:39:17 +02:00
Michael Ford
1f9be984db Disable App Nap on OSX 10.9+ 2014-10-04 19:34:15 +08:00
Wladimir J. van der Laan
5bf029603c
Merge pull request #5035
c9c51cb Make comptool more deterministic (Matt Corallo)
2014-10-04 08:51:56 +02:00