Commit graph

7953 commits

Author SHA1 Message Date
Wladimir J. van der Laan 05998da5a7
Merge #8865: Decouple peer-processing-logic from block-connection-logic
a9aec5c Use BlockChecked signal to send reject messages from mapBlockSource (Matt Corallo)
7565e03 Remove SyncWithWallets wrapper function (Matt Corallo)
12ee1fe Always call UpdatedBlockTip, even if blocks were only disconnected (Matt Corallo)
f5efa28 Remove CConnman parameter from ProcessNewBlock/ActivateBestChain (Matt Corallo)
fef1010 Use CValidationInterface from chain logic to notify peer logic (Matt Corallo)
aefcb7b Move net-processing logic definitions together in main.h (Matt Corallo)
0278fb5 Remove duplicate nBlocksEstimate cmp (we already checked IsIBD()) (Matt Corallo)
87e7d72 Make validationinterface.UpdatedBlockTip more verbose (Matt Corallo)
2016-10-18 22:48:51 +02:00
Wladimir J. van der Laan 74dc388ab5
Merge #8873: Add microbenchmarks to profile more code paths.
18dacf9 Add microbenchmarks to profile more code paths. (Russell Yanofsky)
2016-10-18 22:03:52 +02:00
Russell Yanofsky 18dacf9bd2 Add microbenchmarks to profile more code paths.
The new benchmarks exercise script validation, CCoinsDBView caching,
mempool eviction, and wallet coin selection code.

All of the benchmarks added here are extremely simple and don't
necessarily mirror common real world conditions or interesting
performance edge cases. Details about how specific benchmarks can be
improved are noted in comments.

Github-Issue: #7883
2016-10-18 21:59:05 +02:00
Wladimir J. van der Laan 7f71a3c591
Merge #6996: Add preciousblock RPC
5805ac8 Add preciousblock tests (Pieter Wuille)
5127c4f Add preciousblock RPC (Pieter Wuille)
2016-10-18 21:36:38 +02:00
Wladimir J. van der Laan 0b5a997acf
Merge #8637: Compact Block Tweaks (rebase of #8235)
3ac6de0 Align constant names for maximum compact block / blocktxn depth (Pieter Wuille)
b2e93a3 Add cmpctblock to debug help list (instagibbs)
fe998e9 More agressively filter compact block requests (Matt Corallo)
02a337d Dont remove a "preferred" cmpctblock peer if they provide a block (Matt Corallo)
2016-10-18 21:19:54 +02:00
Wladimir J. van der Laan 744d2652dd
Merge #8223: [c++11] Use std::unique_ptr for block creation.
9fce062 [c++11] Use std::unique_ptr for block creation. (Daniel Kraft)
2016-10-18 21:16:08 +02:00
Wladimir J. van der Laan e10af96cf4
Merge #8287: [wallet] Set fLimitFree = true
fa8b02d [rpc] rawtx: Prepare fLimitFree to make it an option (MarcoFalke)
fa28bfa [wallet] Set fLimitFree = true (MarcoFalke)
2016-10-18 21:05:07 +02:00
Wladimir J. van der Laan cdfb7755a6
Merge #8914: Kill insecure_random and associated global state
5eaaa83 Kill insecure_random and associated global state (Wladimir J. van der Laan)
2016-10-18 15:44:57 +02:00
Wladimir J. van der Laan f628d9a29a
Merge #8925: qt: Display minimum ping in debug window.
1724a40 Display minimum ping in debug window. (R E Broadley)
2016-10-18 15:16:39 +02:00
Wladimir J. van der Laan 6e094e54f7
Merge #8845: Don't return the address of a P2SH of a P2SH
d51f182 Don't return the address of a P2SH of a P2SH. (jnewbery)
2016-10-18 14:33:26 +02:00
Wladimir J. van der Laan dd07c6b2cc
Merge #8921: RPC: Chainparams: Remove Chainparams::fTestnetToBeDeprecatedFieldRPC
b26a7b5 RPC: Chainparams: Remove Chainparams::fTestnetToBeDeprecatedFieldRPC (Jorge Timón)
2016-10-18 13:31:59 +02:00
Jorge Timón b26a7b5377
RPC: Chainparams: Remove Chainparams::fTestnetToBeDeprecatedFieldRPC 2016-10-18 13:17:38 +02:00
Wladimir J. van der Laan 614d522c3e
Merge #8932: Allow bitcoin-tx to create v2 transactions
b0aea80 Sync bitcoin-tx with tx version policy (BtcDrak)
2016-10-18 11:45:07 +02:00
Wladimir J. van der Laan cd761fb85a
Merge #8944: Remove bogus assert on number of oubound connections.
1ab21cf Remove bogus assert on number of oubound connections. (Matt Corallo)
2016-10-18 10:43:52 +02:00
Wladimir J. van der Laan 47ace4240a
Merge #8918: Qt: Add "Copy URI" to payment request context menu
21f5a63 Qt: Add "Copy URI" to payment request context menu (Luke Dashjr)
2016-10-18 10:37:17 +02:00
Matt Corallo 1ab21cf344 Remove bogus assert on number of oubound connections.
This value can be significantly higher if the users uses addnode
2016-10-17 16:29:03 -04:00
Christian Decker 2449e12681 My DNS seed supports filtering
Currently supports filtering by any combination of the 4 least
significant bits.
2016-10-17 13:33:53 -04:00
Matt Corallo ffb4713920 Add x9 service bit support to dnsseed.bluematt.me 2016-10-17 13:33:52 -04:00
Matt Corallo 504c72ad34 Comment that most dnsseeds only support some service bits combos 2016-10-17 13:33:25 -04:00
Wladimir J. van der Laan c6b959efcf
Merge #8937: Define start and end time for segwit deployment
f9c23de Define start and end time for segwit deployment (Pieter Wuille)
2016-10-17 16:49:12 +02:00
Pieter Wuille 3ac6de0a04 Align constant names for maximum compact block / blocktxn depth 2016-10-17 16:46:30 +02:00
instagibbs b2e93a343e Add cmpctblock to debug help list 2016-10-17 16:44:57 +02:00
Matt Corallo fe998e962d More agressively filter compact block requests
Unit test adaptations by Pieter Wuille.
2016-10-17 16:44:57 +02:00
Matt Corallo 02a337defd Dont remove a "preferred" cmpctblock peer if they provide a block 2016-10-17 16:44:57 +02:00
Pieter Wuille f9c23dea97 Define start and end time for segwit deployment 2016-10-17 14:15:57 +02:00
Wladimir J. van der Laan 53133c1c04
Merge #8499: Add several policy limits and disable uncompressed keys for segwit scripts
67d6ee1 remove redundant tests in p2p-segwit.py (Johnson Lau)
9260085 test segwit uncompressed key fixes (Johnson Lau)
248f3a7 Fix ismine and addwitnessaddress: no uncompressed keys in segwit (Pieter Wuille)
b811124 [qa] Add tests for uncompressed pubkeys in segwit (Suhas Daftuar)
9f0397a Make test framework produce lowS signatures (Johnson Lau)
4c0c25a Require compressed keys in segwit as policy and disable signing with uncompressed keys for segwit scripts (Johnson Lau)
3ade2f6 Add standard limits for P2WSH with tests (Johnson Lau)
2016-10-17 13:27:05 +02:00
Wladimir J. van der Laan 5eaaa83ac1 Kill insecure_random and associated global state
There are only a few uses of `insecure_random` outside the tests.
This PR replaces uses of insecure_random (and its accompanying global
state) in the core code with an FastRandomContext that is automatically
seeded on creation.

This is meant to be used for inner loops. The FastRandomContext
can be in the outer scope, or the class itself, then rand32() is used
inside the loop. Useful e.g. for pushing addresses in CNode or the fee
rounding, or randomization for coin selection.

As a context is created per purpose, thus it gets rid of
cross-thread unprotected shared usage of a single set of globals, this
should also get rid of the potential race conditions.

- I'd say TxMempool::check is not called enough to warrant using a special
  fast random context, this is switched to GetRand() (open for
  discussion...)

- The use of `insecure_rand` in ConnectThroughProxy has been replaced by
  an atomic integer counter. The only goal here is to have a different
  credentials pair for each connection to go on a different Tor circuit,
  it does not need to be random nor unpredictable.

- To avoid having a FastRandomContext on every CNode, the context is
  passed into PushAddress as appropriate.

There remains an insecure_random for test usage in `test_random.h`.
2016-10-17 13:08:35 +02:00
BtcDrak b0aea80579
Sync bitcoin-tx with tx version policy 2016-10-16 23:22:15 +01:00
Johnson Lau 9260085377 test segwit uncompressed key fixes 2016-10-17 00:34:37 +08:00
Pieter Wuille 248f3a76a8 Fix ismine and addwitnessaddress: no uncompressed keys in segwit 2016-10-17 00:34:37 +08:00
Johnson Lau 4c0c25a604 Require compressed keys in segwit as policy and disable signing with uncompressed keys for segwit scripts 2016-10-16 23:53:35 +08:00
Johnson Lau 3ade2f64cf Add standard limits for P2WSH with tests 2016-10-16 23:53:35 +08:00
R E Broadley 1724a405c9 Display minimum ping in debug window. 2016-10-15 20:43:11 +07:00
Wladimir J. van der Laan 49c5910372
Merge #8880: protocol.h: Move MESSAGE_START_SIZE into CMessageHeader
1df3111 protocol.h: Make enums in GetDataMsg concrete values (Wladimir J. van der Laan)
2c09a52 protocol.h: Move MESSAGE_START_SIZE into CMessageHeader (Wladimir J. van der Laan)
f9bd92d version.h: s/shord/short/ in comment (Wladimir J. van der Laan)
2016-10-15 10:27:46 +02:00
Wladimir J. van der Laan 088d1f4413
Merge #8906: [qt] sync-overlay: Don't show progress twice
fafeec3 [qt] sync-overlay: Don't show progress twice (MarcoFalke)
2016-10-15 09:44:20 +02:00
Luke Dashjr 21f5a6364d Qt: Add "Copy URI" to payment request context menu 2016-10-13 23:27:43 +00:00
Wladimir J. van der Laan e2b8c394d6
Merge #8817: update bitcoin-tx to output witness data
4408558 Update bitcoin-tx to output witness data. (jonnynewbs)
2016-10-13 18:56:43 +02:00
Wladimir J. van der Laan 8d46429c83
Merge #8911: qt: Translate all files, even if wallet disabled
8aed5f6 qt: Translate all files, even if wallet disabled (Wladimir J. van der Laan)
2016-10-13 10:30:38 +02:00
Wladimir J. van der Laan 8aed5f6c23 qt: Translate all files, even if wallet disabled
This passes all QT cpp files to the lupdate executable which extracts
translations, no matter what conditional functionality is enabled.
2016-10-11 17:46:46 +02:00
MarcoFalke fafeec3cf2 [qt] sync-overlay: Don't show progress twice
* Don't show integer progress in progress bar. (Already shown in front
  of progress bar)

* Also, use non-static method to get current msecs
2016-10-10 17:07:43 +02:00
Jonas Schnelli bf8e68aba6
Merge #8821: [qt] sync-overlay: Don't block during reindex
fa85e86 [qt] sync-overlay: Don't show estimated number of headers left (MarcoFalke)
faa4de2 [qt] sync-overlay: Don't block during reindex (MarcoFalke)
2016-10-10 16:52:44 +02:00
Pieter Wuille 6429cfa8a7
Merge #8393: Support for compact blocks together with segwit
27acfc1 [qa] Update p2p-compactblocks.py for compactblocks v2 (Suhas Daftuar)
422fac6 [qa] Add support for compactblocks v2 to mininode (Suhas Daftuar)
f5b9b8f [qa] Fix bug in mininode witness deserialization (Suhas Daftuar)
6aa28ab Use cmpctblock type 2 for segwit-enabled transfer (Pieter Wuille)
be7555f Fix overly-prescriptive p2p-segwit test for new fetch logic (Matt Corallo)
06128da Make GetFetchFlags always request witness objects from witness peers (Matt Corallo)
2016-10-10 13:16:40 +02:00
MarcoFalke e66cc1d58e
Merge #8881: Add some verbose logging to bitcoin-util-test.py
621441a add verbose mode to bitcoin-util-test.py (jnewbery)
2016-10-08 21:23:42 +02:00
Jonas Schnelli b2fec4e9a1
Merge #8885: gui: fix ban from qt console
cb78c60 gui: fix ban from qt console (Cory Fields)
2016-10-08 16:43:15 +02:00
jnewbery 621441a7a7 add verbose mode to bitcoin-util-test.py 2016-10-05 09:16:08 -04:00
jonnynewbs 4408558843 Update bitcoin-tx to output witness data. 2016-10-05 09:00:34 -04:00
jnewbery d51f182461 Don't return the address of a P2SH of a P2SH. 2016-10-05 08:58:18 -04:00
Wladimir J. van der Laan 223f4c2dd5
Merge #8884: Bugfix: Trivial: RPC: getblockchaininfo help: pruneheight is the lowest, not highest, block
a78e542 Bugfix: Trivial: RPC: getblockchaininfo help: pruneheight is the lowest, not highest, block (Luke Dashjr)
2016-10-05 14:44:07 +02:00
Wladimir J. van der Laan 1df311118d protocol.h: Make enums in GetDataMsg concrete values
This concretizes the numbers and adds a comment to make it clear that
these numbers are fixed by the protocol, and may avoid people forgetting
to claim numbers in the future (e.g. issue #8500).

Also gets rid of a weird unused `MSG_TYPE_MAX` in the middle of the
enumeration (thanks @paveljanik for noticing).
2016-10-05 13:32:20 +02:00
Wladimir J. van der Laan f92805025d
Merge #8879: [doc] Rework docs
eeeebdd [doc] Rework docs (MarcoFalke)
2016-10-05 05:07:19 +02:00