aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-09-11tests: rename 'test_getnetworkinginfo' in 'test_getnetworkinfo'darosior
Since it's the name of the RPC call
2019-09-11tests: add a test for the 'servicesnames' RPC fielddarosior
In getpeerinfo and getnetworkinfo
2019-09-10Merge #16413: depends: Bump QT to LTS release 5.9.8Wladimir J. van der Laan
0c6054fc9fd27d8e2ef49419c07c5e8f2485e1f7 depends: Bump QT to LTS release 5.9.8 (THETCR) Pull request description: This update is only a minor version but in contrary to 5.9.7 it's a LTS release. It doesn't add any new functionality to Qt but fixes multiple security issues and bugs. Including some race conditions and annoying bugs on macOS. ACKs for top commit: Sjors: ACK 0c6054fc9fd27d8e2ef49419c07c5e8f2485e1f7. Lightly tested on macOS 10.14.6. Not really sure what difference would matter on macOS. Tree-SHA512: f01d947cc0db6d761e32551071fa00fe8014fb7b2ce707271a159bb61c6d60e062ac8f4da5f36bd8fc4736e1e852368a1353ea3f994f61f1d0c76cc7d1664938
2019-09-10Merge #16680: Preparations for more testchainsMarcoFalke
3bf9d8cac09fc88727ef2f2a2bea33b90b625e50 Testchains: Qt: Simplify network/chain styles (Jorge Timón) 052c54ecb02695e5d2694e8e0cbf5ccc89de86e8 Testchains: Generic selection with -chain=<str> in addition of -testnet and -regtest (Jorge Timón) Pull request description: Separated from #8994 as suggested by MarcoFalke and Sjors in https://github.com/bitcoin/bitcoin/pull/8994#issuecomment-522555390 You can't really test the qt changes on their own, so to test them, use #8994 . ACKs for top commit: MarcoFalke: ACK 3bf9d8cac09fc88727ef2f2a2bea33b90b625e50 Tree-SHA512: 5b5e6083ebc0a44505a507fac633e7af18037c85e5e73f5d1e6f7e730575d3297ba8a31d1c2441df623b273f061c32d8fa324f4aa6bead01d23e88582029b568
2019-09-10Merge #16787: rpc: Human readable network servicesWladimir J. van der Laan
66740f460af5f9d8c61eb5b154863bffb20d94b5 doc: add a release note for the new field in 'getpeerinfo' and 'getnetworkinfo' (darosior) 6564f58c87a84c88d07629e9d86e15f07d0ed837 rpc/net: decode the services flags in a new entry (darosior) Pull request description: This is a reopen of https://github.com/bitcoin/bitcoin/pull/15511#issuecomment-527087370 since there have been concept ACKs from sdaftuar and Sjors. This adds a new entry to `getpeerinfo` and `getnetworkinfo` which decodes the network services flags. Here is a truncated output of `getpeerinfo`: ``` "services": "000000000000040d", "servicesnames": "NODE_NETWORK | NODE_BLOOM | NODE_WITNESS | NODE_NETWORK_LIMITED", "relaytxes": true, ``` And one of `getnetworkinfo`: ``` "localservices": "0000000000000409", "localservicesnames": "NODE_NETWORK | NODE_WITNESS | NODE_NETWORK_LIMITED", "localrelay": true, ``` Fixes #16780. ACKs for top commit: MarcoFalke: unsigned ACK 66740f460af5f9d8c61eb5b154863bffb20d94b5 laanwj: ACK 66740f460af5f9d8c61eb5b154863bffb20d94b5 Tree-SHA512: 0acc37134b283f56004a41243903d7790cb01591ddf0342489bd05f3a2c780563075373ba5fd55180fa15632e8968ffa11a979b8afece75a6a2e891342601440
2019-09-10Merge #16477: build: skip deploying plugins we dont use in macdeployqtplusfanquake
1ac7b7f66bd53d2d719377c7e0ab8b38e970c88f scripts: filter more qt plugins we don't use in macdeployqtplus (fanquake) 57cdd0697d5c8fdae4a4c1da1cfa092916be87e7 scripts: misc cleanups in macdeployqtplus (fanquake) 51729a4dfacb5b8d3945d39fa581eaaa9ac9603d scripts: use format() in macdeployqtplus (fanquake) 1c37e81694efb08fea889d9f5151c91dbb74d025 scripts: add type annotations to macdeployqtplus (fanquake) Pull request description: I frequently run `make deploy` while testing on macOS to get a properly light themed .app. With a brew installed Qt, this currently results in a pretty bloated executable: | branch | .app size | .dmg size | `make deploy` time | | ------- | --------- | --------- | --------------------- | | master (febf3a856bcfb8fef2cb4ddcb8d1e0cab8a22580) | 235mb | 86mb | 38s | | This PR (da98f6d470d236c027b7eb8b5f5552fdca04e803) | 51mb | 21mb | 22s | Similar change to dd367ff8c93c2f9e112a324f5cd737c7fa7a2ffa. ```diff 'QtGui.framework'], 'pluginPath': '/usr/local/opt/qt/plugins', 'qtPath': '/usr/local/opt/qt'} -[('platforminputcontexts', 'libqtvirtualkeyboardplugin.dylib'), - ('geoservices', 'libqtgeoservices_esri.dylib'), - ('geoservices', 'libqtgeoservices_mapboxgl.dylib'), - ('geoservices', 'libqtgeoservices_nokia.dylib'), - ('geoservices', 'libqtgeoservices_itemsoverlay.dylib'), - ('geoservices', 'libqtgeoservices_osm.dylib'), - ('geoservices', 'libqtgeoservices_mapbox.dylib'), - ('sceneparsers', 'libgltfsceneexport.dylib'), - ('sceneparsers', 'libgltfsceneimport.dylib'), - ('platforms', 'libqwebgl.dylib'), +[('platforms', 'libqwebgl.dylib'), ('platforms', 'libqoffscreen.dylib'), ('platforms', 'libqminimal.dylib'), ('platforms', 'libqcocoa.dylib'), ('platformthemes', 'libqxdgdesktopportal.dylib'), - ('printsupport', 'libcocoaprintersupport.dylib'), - ('webview', 'libqtwebview_webengine.dylib'), - ('webview', 'libqtwebview_darwin.dylib'), - ('geometryloaders', 'libdefaultgeometryloader.dylib'), - ('geometryloaders', 'libgltfgeometryloader.dylib'), ('styles', 'libqmacstyle.dylib'), - ('canbus', 'libqttinycanbus.dylib'), - ('canbus', 'libqtpassthrucanbus.dylib'), - ('canbus', 'libqtvirtualcanbus.dylib'), - ('canbus', 'libqtpeakcanbus.dylib'), ('bearer', 'libqgenericbearer.dylib'), - ('imageformats', 'libqgif.dylib'), - ('imageformats', 'libqwbmp.dylib'), - ('imageformats', 'libqwebp.dylib'), - ('imageformats', 'libqico.dylib'), - ('imageformats', 'libqmacheif.dylib'), - ('imageformats', 'libqjpeg.dylib'), - ('imageformats', 'libqtiff.dylib'), - ('imageformats', 'libqicns.dylib'), - ('imageformats', 'libqtga.dylib'), - ('imageformats', 'libqmacjp2.dylib'), - ('texttospeech', 'libqtexttospeech_speechosx.dylib'), - ('generic', 'libqtuiotouchplugin.dylib'), - ('renderplugins', 'libscene2d.dylib'), - ('gamepads', 'libdarwingamepad.dylib'), - ('virtualkeyboard', 'libqtvirtualkeyboard_thai.dylib'), - ('virtualkeyboard', 'libqtvirtualkeyboard_openwnn.dylib'), - ('virtualkeyboard', 'libqtvirtualkeyboard_hangul.dylib'), - ('virtualkeyboard', 'libqtvirtualkeyboard_pinyin.dylib'), - ('virtualkeyboard', 'libqtvirtualkeyboard_tcime.dylib')] + ('generic', 'libqtuiotouchplugin.dylib')] ``` ACKs for top commit: laanwj: ACK 1ac7b7f66bd53d2d719377c7e0ab8b38e970c88f (purely Python code review and the fact that this passes travis, cannot run this on a mac) dongcarl: tested ACK 1ac7b7f66bd53d2d719377c7e0ab8b38e970c88f Tree-SHA512: 5974eeaf7229bb5bde2b283c1331ec57ee87f624db146401f6b77dee4ee5502e0bd669958a46205f10398a371f8e6c91ddacb9f0e1943f9f7d042fb6de7957a8
2019-09-10Merge #16489: log: harmonize bitcoind loggingfanquake
e90478f43e7bf9726ba033fde4a2776f9d5a9af4 log: harmonize bitcoind server logging (Jon Atack) Pull request description: Harmonize the user-facing output of the `bitcoind -daemon`, `bitcoin-cli help stop`, `bitcoin-cli stop`, and `bitcoind -version` commands to be consistent with each other as well as with the "Bitcoin Core is probably already running" messages, e.g. `git grep 'probably already running.")'`. Before: ``` $ bitcoind -regtest -daemon Bitcoin Core daemon starting $ bitcoind -regtest -daemon Error: Bitcoin Core is probably already running. $ bitcoind -regtest -version Bitcoin Core Daemon version v0.18.99.0-e653eeff76-dirty $ bitcoin-cli -regtest help stop stop Stop Bitcoin server. $ bitcoin-cli -regtest stop Bitcoin server stopping ``` these five commands output: "Bitcoin Core daemon" "Bitcoin Core" "Bitcoin Core Daemon" "Bitcoin server" "Bitcoin server" After this commit, they are all "Bitcoin Core". ``` $ bitcoind -regtest -daemon Bitcoin Core starting $ bitcoind -regtest -daemon Error: Bitcoin Core is probably already running. $ bitcoind -regtest -version Bitcoin Core version v0.18.99.0-e90478f43e-dirty $ bitcoin-cli -regtest help stop stop Request a graceful shutdown of Bitcoin Core. $ bitcoin-cli -regtest stop Bitcoin Core stopping ``` ACKs for top commit: practicalswift: ACK e90478f43e7bf9726ba033fde4a2776f9d5a9af4 (read code which looks good) practicalswift: ACK e90478f43e7bf9726ba033fde4a2776f9d5a9af4 -- diff looks correct fjahr: utACK e90478f michaelfolkson: ACK e90478f43e7bf9726ba033fde4a2776f9d5a9af4. Tested command outputs and as described. ariard: Tested ACK e90478f fanquake: ACK e90478f43e7bf9726ba033fde4a2776f9d5a9af4 Tree-SHA512: 9ee584d260b5c224463318a51c2856a7c0e463be039fea072e5d5bab8898f0043b3930cf887a47aafd0f3447adb551b5e47a4e98ebdefc6cdb8e77edde0347b0
2019-09-10Merge #16725: Don't show addresses or P2PK in decoderawtransactionSamuel Dobson
6d803494b59ab5520079b6a72d97790d86d2a015 Don't show addresses or P2PK in decoderawtransaction (nicolas.dorier) Pull request description: I spent significant amount of time explaining to people that satoshi did not had any "bitcoin address", because bitcoin address was not existing at the time. Then I need to explain them that all blockchain explorer are wrong. Then I understood that the source of this widespread mistake come from Bitcoin Core itself. For: ``` bitcoin-cli -regtest decoderawtransaction 01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff4d04ffff001d0104455468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73ffffffff0100f2052a01000000434104678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5fac00000000 ``` Before: ```json { "txid": "4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b", "hash": "4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b", "version": 1, "size": 204, "vsize": 204, "weight": 816, "locktime": 0, "vin": [ { "coinbase": "04ffff001d0104455468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73", "sequence": 4294967295 } ], "vout": [ { "value": 50.00000000, "n": 0, "scriptPubKey": { "asm": "04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f OP_CHECKSIG", "hex": "4104678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5fac", "reqSigs": 1, "type": "pubkey", "addresses": [ "mpXwg4jMtRhuSpVq4xS3HFHmCmWp9NyGKt" ] } } ] } ``` After ```json { "txid": "4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b", "hash": "4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b", "version": 1, "size": 204, "vsize": 204, "weight": 816, "locktime": 0, "vin": [ { "coinbase": "04ffff001d0104455468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73", "sequence": 4294967295 } ], "vout": [ { "value": 50.00000000, "n": 0, "scriptPubKey": { "asm": "04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f OP_CHECKSIG", "hex": "4104678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5fac", "reqSigs": 1, "type": "pubkey", "addresses": [ ] } } ] } ``` This mistake is having widespread impact, as developer thinks P2PK are addresses, they start running into issues when somebody send a P2PK payment to them and then they don't understand why they can't sign it like a P2PKH. ACKs for top commit: Sjors: Code review ACK 6d80349. MarcoFalke: ACK 6d803494b59ab5520079b6a72d97790d86d2a015 meshcollider: utACK 6d803494b59ab5520079b6a72d97790d86d2a015 kristapsk: ACK 6d803494b59ab5520079b6a72d97790d86d2a015 (applied changes except test, ran tests, then applied changes to test also) Tree-SHA512: 6e4990164a6b8df6675f09b2b189b7197fad43f1918fc1a4530ebd98ce71c3c94d9ec54e1b4624210fd7c5200d4f04825ca37f4e42f5fe9b8a9c0f38c50591ef
2019-09-09Merge #16796: wallet: Fix segfault in CreateWalletFromFileSamuel Dobson
fa734603b78ba31ebf0da5d2dbe87386eafff01a wallet: Fix segmentation fault in CreateWalletFromFile (MarcoFalke) fab3c34412379598b812631e3c123e9467cdc485 test: Print both messages on failure in assert_raises_message (MarcoFalke) faa13539d5262bb7a512e9ff82e80083e04315ee wallet: Fix documentation around WalletParameterInteraction (MarcoFalke) Pull request description: Comes with a test to aid review. The test should fail without the fix to bitcoind The following `CreateWalletFromFile` issues are fixed: * `walletFile` refers to freed memory and will thus corrupt the debug.log and/or crash the node if read * `WalletParameterInteraction` was moved to `CreateWalletFromFile` and `WalletInit::ParameterInteraction` without updating the documentation ACKs for top commit: promag: ACK fa734603b78ba31ebf0da5d2dbe87386eafff01a. darosior: ACK fa734603b78ba31ebf0da5d2dbe87386eafff01a meshcollider: LGTM, code-read ACK fa734603b78ba31ebf0da5d2dbe87386eafff01a Tree-SHA512: 2aceb63a3f25b90a840cfa08d37f5874aad4eb3df8c2ebf94e2ed18b55809b185e6920bdb345b988bff1fcea5e68a214fe06c361f7da2c01a3cc29e0cc421cb4
2019-09-09Merge #16806: doc: Add issue templates for bug and feature requestMarcoFalke
fabca7756d6908ad581f3a699f1be6ecc9f62e03 doc: Add issue templates for bug and feature request (MarcoFalke) Pull request description: Fixes #16627 Can be tested via https://github.com/MarcoFalke/bitcoin/issues ACKs for top commit: jb55: ACK fabca7756d6908ad581f3a699f1be6ecc9f62e03 fanquake: ACK fabca7756d6908ad581f3a699f1be6ecc9f62e03 Tree-SHA512: 1ebe58f9c0110a9332adf1d80001cd9ed6fe60208e387c93b8564dc66821f753e34b23cb6f4cae45168024862ee884913976e132820b7a4759fa6391b0d1127c
2019-09-09Merge #16826: Do additional character escaping for wallet names and address ↵fanquake
labels ad52f054f67374dc46e0096d1e2f593d6372a2df Escape ampersands (&) in wallet names in Open Wallet menu (Andrew Chow) 2c530ea2ada71ca23fa17bab5023b855515463ef HTML escape address labels in more dialogs and notifications (Andrew Chow) 1770a972d471d2bdb36195ec370b6fc238649f4d HTML escape the wallet name in more dialogs and notifications (Andrew Chow) Pull request description: Fixes some places where wallet names and address labels which contain valid html or other interpreted characters are displayed incorrectly. In the send coins dialog, if the wallet name or the address label contains valid html, then the html would be shown rather than the literal string for the wallet name or label. This PR fixes that so the true name or label is shown. The Open Wallet menu would incorrectly show wallet names with ampersands (`&`). For some reason, Qt removes the first ampersand in a string. So by replacing the first ampersand with 2 ampersands, the correct number of ampersands will be shown. Fixes the HTML escaping issues in #16820 ACKs for top commit: laanwj: Untested ACK, thanks for adding proper escaping, ad52f054f67374dc46e0096d1e2f593d6372a2df fanquake: ACK ad52f054f67374dc46e0096d1e2f593d6372a2df Tree-SHA512: 264bef28a8061c7f43cc30c3e04b361c614ea78b9915e8763c44553c8967131b066db500977fa6130de1f8874b9bba59e630486c58e1e3c5c165555105a6c254
2019-09-09Merge #16285: rpc: Improve scantxoutset response and help messageWladimir J. van der Laan
bdd6a4fd5da44c2575be9195ecb4213a13e74511 qa: Check scantxoutset result against gettxoutsetinfo (João Barbosa) fc0c410d6e19dd8e3abbc9b0fc13c836e6678750 rpc: Improve scantxoutset response and help message (João Barbosa) Pull request description: The new response keys `height` and `bestblock` allow the client to know at what point the scan took place. The help message now has all the response keys (`result` and `txouts` were missing) and it's improved a bit. Note that `searched_items` key is renamed to `txouts`, considering `scantxoutset` is marked experimental. ACKs for top commit: laanwj: ACK bdd6a4fd5da44c2575be9195ecb4213a13e74511 Tree-SHA512: 6bb7c3464b19857b756b8bc491ab7c58b0d948aad8c005b26ed27c55a1278f5639217e11a315bb505b4f44ebe86f413068c1e539c8a5f7a4007735586cc6443c
2019-09-09qa: Check scantxoutset result against gettxoutsetinfoJoão Barbosa
2019-09-09rpc: Improve scantxoutset response and help messageJoão Barbosa
2019-09-09Merge #16830: refactor: wallet: Cleanup walletinitinterface.hSamuel Dobson
4be3b7680e6324294d9241232a6f1eae36c85a9e refactor: Cleanup walletinitinterface.h (Hennadii Stepanov) Pull request description: Forward declarations of `CScheduler` and `CRPCTable` classes are no longer needed after ea961c3d7256c66146b4976ab1293db4a628c0de (#14437) commit. Including `<string>` is no longer needed after 4d4185a4f0e40c033a587871839a47cb3f89ee93 (#13190) commit. ACKs for top commit: theStack: ACK 4be3b76 promag: ACK 4be3b7680e6324294d9241232a6f1eae36c85a9e. kristapsk: ACK 4be3b7680e6324294d9241232a6f1eae36c85a9e (tested that it builds) Tree-SHA512: 5ed72e3deda3d7c7fb698a1a11db76199727e6c570dfc78422690dbda9a92af32e1913920062dd3c9f618095e7498c219ff9c145a4c151486865ebeaa20a1d3c
2019-09-08Escape ampersands (&) in wallet names in Open Wallet menuAndrew Chow
2019-09-08HTML escape address labels in more dialogs and notificationsAndrew Chow
2019-09-08HTML escape the wallet name in more dialogs and notificationsAndrew Chow
2019-09-08refactor: Cleanup walletinitinterface.hHennadii Stepanov
Forward declarations of CScheduler and CRPCTable classes are no longer needed after ea961c3d7256c66146b4976ab1293db4a628c0de commit. Including <string> is no longer needed after 4d4185a4f0e40c033a587871839a47cb3f89ee93 commit.
2019-09-08doc: Add issue templates for bug and feature requestMarcoFalke
2019-09-08Merge #16735: gui: Remove unused menu items for Windows and LinuxMarcoFalke
f091dc818085c3fa478374ea4378a0c1dd3d87f2 GUI: Remove unused menu items for Windows and Linux (GChuf) Pull request description: Removed "Main Window" and "Restore" menu option for Windows and linux Keep the options for macOS ACKs for top commit: MarcoFalke: unsigned ACK f091dc818085c3fa478374ea4378a0c1dd3d87f2 fanquake: ACK f091dc818085c3fa478374ea4378a0c1dd3d87f2 - tested on macOS, Windows and Linux. MarcoFalke: ACK f091dc818085c3fa478374ea4378a0c1dd3d87f2 kristapsk: ACK f091dc818085c3fa478374ea4378a0c1dd3d87f2 (tested on Linux with Xfce4) Tree-SHA512: a84a9a8bd3b09224f111cad4712076150524a24d6f09910147194c4149222443c453372db61eed8aa82c3450339b63fd216288196feb4ab637b6ea21b0109830
2019-09-07Merge #15759: p2p: Add 2 outbound block-relay-only connectionsfanquake
0ba08020c9791f7caf5986ad6490c16a2b66cd83 Disconnect peers violating blocks-only mode (Suhas Daftuar) 937eba91e1550bc3038dc541c236ac83e0a0e6d5 doc: improve comments relating to block-relay-only peers (Suhas Daftuar) 430f489027f15c1e4948ea4378954df24e3fee88 Don't relay addr messages to block-relay-only peers (Suhas Daftuar) 3a5e885306ea954d7eccdc11502e91a51dab8ec6 Add 2 outbound block-relay-only connections (Suhas Daftuar) b83f51a4bbe29bf130a2b0c0e85e5bffea107f75 Add comment explaining intended use of m_tx_relay (Suhas Daftuar) e75c39cd425f8c4e5b6bbb2beecb9c80034fefe1 Check that tx_relay is initialized before access (Suhas Daftuar) c4aa2ba82211ea5988ed7fe21e1b08bc3367e6d4 [refactor] Change tx_relay structure to be unique_ptr (Suhas Daftuar) 4de0dbac9b286c42a9b10132b7c2d76712f1a319 [refactor] Move tx relay state to separate structure (Suhas Daftuar) 26a93bce29fd813e1402b013f402869c25b656d1 Remove unused variable (Suhas Daftuar) Pull request description: Transaction relay is optimized for a combination of redundancy/robustness as well as bandwidth minimization -- as a result transaction relay leaks information that adversaries can use to infer the network topology. Network topology is better kept private for (at least) two reasons: (a) Knowledge of the network graph can make it easier to find the source IP of a given transaction. (b) Knowledge of the network graph could be used to split a target node or nodes from the honest network (eg by knowing which peers to attack in order to achieve a network split). We can eliminate the risks of (b) by separating block relay from transaction relay; inferring network connectivity from the relay of blocks/block headers is much more expensive for an adversary. After this commit, bitcoind will make 2 additional outbound connections that are only used for block relay. (In the future, we might consider rotating our transaction-relay peers to help limit the effects of (a).) ACKs for top commit: sipa: ACK 0ba08020c9791f7caf5986ad6490c16a2b66cd83 ajtowns: ACK 0ba08020c9791f7caf5986ad6490c16a2b66cd83 -- code review, ran tests. ran it on mainnet for a couple of days with MAX_BLOCKS_ONLY_CONNECTIONS upped from 2 to 16 and didn't observe any unexpected behaviour: it disconnected a couple of peers that tried sending inv's, and it successfully did compact block relay with some block relay peers. TheBlueMatt: re-utACK 0ba08020c9791f7caf5986ad6490c16a2b66cd83. Pointed out that stats.fRelayTxes was sometimes uninitialized for blocksonly peers (though its not a big deal and only effects RPC), which has since been fixed here. Otherwise changes are pretty trivial so looks good. jnewbery: utACK 0ba08020c9791f7caf5986ad6490c16a2b66cd83 jamesob: ACK https://github.com/bitcoin/bitcoin/commit/0ba08020c9791f7caf5986ad6490c16a2b66cd83 Tree-SHA512: 4c3629434472c7dd4125253417b1be41967a508c3cfec8af5a34cad685464fbebbb6558f0f8f5c0d4463e3ffa4fa3aabd58247692cb9ab8395f4993078b9bcdf
2019-09-07Merge #15450: gui: Create wallet menu optionfanquake
613de61a04c210a51af9997e69f66439a17a632a Add Create Wallet menu action (Andrew Chow) 9b41cbb28f603f4f71f5854d6ae2527932bba3cb Expose wallet creation to the GUI via WalletController (Andrew Chow) 78863e290006e61060622dbdbecc5b58c0fefa05 Add CreateWalletDialog to create wallets from the GUI (Andrew Chow) 60adb21c7affb41ec475a62a53fb0a36bea35dfb Optionally allow AskPassphraseDialog to output the passphrase (Andrew Chow) bc6d8a3662f0fb992073e5e80269a90a722d76e0 gui: Refactor OpenWalletActivity (João Barbosa) Pull request description: This PR adds a menu option to create a new wallet. When clicked, a `CreateWalletDialog` will be created and prompt the user to name the wallet and choose whether to disable private keys, make a blank wallet, and encrypt the wallet. If the wallet is encrypted, the wallet will be born encrypted with the wallet first created blank, then encrypted, and then a new HD seed generated and set. To allow the newly created wallets to be encrypted, some changes to how encrypting a wallet works. Instead of encrypting and locking the wallet, the wallet will be encrypted and then unlocked. This is also an extra belt-and-suspenders check to make sure that encryption worked. ACKs for top commit: fanquake: ACK 613de61a04c210a51af9997e69f66439a17a632a - re-reviewed on macOS. I'm going to merge this now. It's had a stack of review, and as mentioned multiple times above, lets get this into `master` so it can get more testing pre `v0.19.0`. Tree-SHA512: 3f22cc20b13703ffc90d366ae9133114832fea77f4f319da7fd85eb454f2f0bd5d7e1e6e20284dea2f370d8574f83b45669dcbbe506b994410d32e8e7a6fa877
2019-09-07Merge #16810: guix: Remove ssp spec file hackfanquake
0065ead5ebdad9f743d89ee2558c93253a597967 contrib: guix: Remove ssp spec file hack (Carl Dong) 0093a5869a30797ccb139d0cb5a0427d3f3c2d94 contrib: guix: More robust search paths, add checks (Carl Dong) Pull request description: See commit messages for more details ACKs for top commit: fanquake: ACK 0065ead5ebdad9f743d89ee2558c93253a597967 Tree-SHA512: fde04005fb31cd4b75b80da4936a7c394f63f0b3bdcc33c20c99e05604a63efd9c850a8d097030ff0bf4b4e83f1a9997fc4621ce291ebcecd8397893447600a7
2019-09-07Merge #16421: Conservatively accept RBF bumps bumping one tx at the package ↵fanquake
limits 5ce822efbe45513ce3517c1ca731ac6d6a0c3b54 Conservatively accept RBF bumps bumping one tx at the package limits (Matt Corallo) Pull request description: Based on #15681, this adds support for some simple cases of RBF inside of large packages. Issue pointed out by sdaftuar in #15681, and this fix (or a broader one) is required ot make #15681 fully useful. Accept RBF bumps of single transactions (ie which evict exactly one transaction) even when that transaction is a member of a package which is currently at the package limit iff the new transaction does not add any additional mempool dependencies from the original. This could be made a bit looser in the future and still be safe, but for now this fixes the case that a transaction which was accepted by the carve-out rule will not be directly RBF'able ACKs for top commit: instagibbs: re-ACK https://github.com/bitcoin/bitcoin/pull/16421/commits/5ce822efbe45513ce3517c1ca731ac6d6a0c3b54 ajtowns: ACK 5ce822efbe45513ce3517c1ca731ac6d6a0c3b54 ; GetSizeWithDescendants is only change and makes sense sipa: Code review ACK 5ce822efbe45513ce3517c1ca731ac6d6a0c3b54. I haven't thought hard about the effect on potential DoS issues this policy change may have. Tree-SHA512: 1cee3bc57393940a30206679eb60c3ec8cb4f4825d27d40d1f062c86bd22542dd5944fa5567601c74c8d9fd425333ed3e686195170925cfc68777e861844bd55
2019-09-07Merge #16798: Refactor rawtransaction_util's SignTransaction to separate ↵fanquake
prevtx parsing 39034f1ee628dae0bc9da5b1b30b8a424e66d968 Refactor rawtransaction_util's SignTransaction to have previous tx parsing be separate (Andrew Chow) Pull request description: Currently the `SignTransaction` function has to handle both the actual signing and parsing of previous transaction data. This PR splits it so that `SignTransaction` only handles the signing itself and adds a `ParsePrevouts` function which handles parsing the prevtx information. This allows for `SignTransaction` to just take any `SigningProvider`. Split from #16341 ACKs for top commit: MarcoFalke: ACK 39034f1ee628dae0bc9da5b1b30b8a424e66d968 instagibbs: utACK https://github.com/bitcoin/bitcoin/pull/16798/commits/39034f1ee628dae0bc9da5b1b30b8a424e66d968 ryanofsky: utACK 39034f1ee628dae0bc9da5b1b30b8a424e66d968. No change since previously reviewed b49bbb939be92a67ff77c3f7bca5bb94dd141906, https://github.com/bitcoin/bitcoin/pull/16341#pullrequestreview-278610269 other than rebase with no conflicts. Tree-SHA512: 09f7733e90691766bfb5cf0f20e913dbf270bd3b51abdcad966b24d110e562ed85fd3d0d1d7bbea61f903340060052ec73c4817b09aee0dc1f3916d781a9e40c
2019-09-06Testchains: Qt: Simplify network/chain stylesJorge Timón
2019-09-06Testchains: Generic selection with -chain=<str> in addition of -testnet and ↵Jorge Timón
-regtest
2019-09-06Merge #16793: refactor: Avoid locking cs_main in ProcessNewBlockHeadersMarcoFalke
3109a1f948f3c8fd500defbdc4e59bfb2953c30b refactor: Avoid locking cs_main in ProcessNewBlockHeaders (João Barbosa) Pull request description: Builds on #16774, this change avoids locking `cs_main` in `ProcessNewBlockHeaders` when the tip has changed - in this case the removed lock was necessary to just log a message. Top commit has no ACKs. Tree-SHA512: 31be6d319fa122804f72fa813cec5ed041dd7e4aef3c1921124a1f03016925c43cd4d9a272d80093e77fa7600e3506ef47b7bb821afcbffe01e6be9bceb6dc00
2019-09-05Add Create Wallet menu actionAndrew Chow
Co-authored-by: João Barbosa <joao.paulo.barbosa@gmail.com>
2019-09-05Expose wallet creation to the GUI via WalletControllerAndrew Chow
Co-authored-by: João Barbosa <joao.paulo.barbosa@gmail.com>
2019-09-05Add CreateWalletDialog to create wallets from the GUIAndrew Chow
Co-authored-by: João Barbosa <joao.paulo.barbosa@gmail.com>
2019-09-05Optionally allow AskPassphraseDialog to output the passphraseAndrew Chow
2019-09-06refactor: Avoid locking cs_main in ProcessNewBlockHeadersJoão Barbosa
2019-09-06gui: Refactor OpenWalletActivityJoão Barbosa
2019-09-05contrib: guix: Remove ssp spec file hackCarl Dong
This hack is no longer needed after fixing our cross-compilation search paths.
2019-09-05contrib: guix: More robust search paths, add checksCarl Dong
- store_path() previously only worked for cross compilation packages, we remove this assumption here - Add CROSS_GCC_LIB variable which points to where gcc libs/headers are located - Add gcc libs/headers to our CROSS_*_PATH environment variables - Check that all directories in CROSS_*_PATH are sane
2019-09-06Merge #16624: wallet: encapsulate transactions stateMeshCollider
442a87cc0ae43ebc9b6654a6165778eecb931f74 Add a test wallet_reorgsrestore (Antoine Riard) 40ede992d97df38282919693dfe851c975c3b1d8 Modify wallet tx status if has been reorged out (Antoine Riard) 7e89994133725125dddbfa8d45484e3b9ed51c6e Remove SyncTransaction for conflicted txn in CWallet::BlockConnected (Antoine Riard) a31be09bfd77eed497a8e251d31358e16e2f2eb1 Encapsulate tx status in a Confirmation struct (Antoine Riard) Pull request description: While working on #15931, I've tried to rationalize tx state management to ease integration of block height tracking per-wallet tx. We currently rely on a combination of `hashBlock` and `nIndex` with magic value to determine tx confirmation, conflicted or abandoned state. It's hard to reason and error-prone. To solve that, we encapsulate these fields in a `TxConfirmation` struct and introduce a `TxState` member that we update accordingly at block connection/disconnection. Following jnewbery [recommendation](https://github.com/bitcoin/bitcoin/pull/15931#discussion_r312576506), I've taken these changes in its own commit, and open a PR to get them first. It would ease review of aforementioned PR, but above all should ease fixing of long-term issues like : * https://github.com/bitcoin/bitcoin/issues/7315 (but maybe we should abandon abandontransaction or relieve it to only free outpoints not track the transaction as abandoned in itself, need its own discussion) * https://github.com/bitcoin/bitcoin/issues/8692 where we should cancel conflicted state of transactions chain smoothly * `MarkConflicted` in `LoadToWallet` is likely useless if we track conflicts rights at block connection Main changes of this PR to get right are tx update in `AddToWallet` and serialization/deserialization logic. ACKs for top commit: meshcollider: Light re-Code Review ACK 442a87cc0ae43ebc9b6654a6165778eecb931f74 ryanofsky: utACK 442a87cc0ae43ebc9b6654a6165778eecb931f74. Changes since last review are switching from `hasChain` to `LockChain` and removing chain lock in `WalletBatch::LoadWallet` that's redundant with the new lock still added in `CWallet::LoadWallet`, and fixing python test race condition. Tree-SHA512: 029209e006de0240436817204e69e548c5665e2b0721b214510e7aba7eba130a5eab441d3a1ad95bd6426114dd27390492c77bf4560a9610009b32cd0a1f72f7
2019-09-05doc: add a release note for the new field in 'getpeerinfo' and 'getnetworkinfo'darosior
2019-09-05rpc/net: decode the services flags in a new entrydarosior
2019-09-05Merge #16792: Assert that the HRP is lowercase in Bech32::EncodeWladimir J. van der Laan
2457aea83c1f9fba708e2335bb197950bf0b6244 Assert that the HRP is lowercase in Bech32::Encode (Samuel Dobson) Pull request description: From BIP-173: > The lowercase form is used when determining a character's value for checksum purposes. > Encoders MUST always output an all lowercase Bech32 string. If an uppercase version of the encoding result is desired, (e.g.- for presentation purposes, or QR code use), then an uppercasing procedure can be performed external to the encoding process. Currently if HRP contains uppercase characters, the checksum will be generated over these uppercase characters resulting in mixed-case output that will always be invalid even if the case is changed manually after encoding. This shouldn't happen because both prefix's `bc` and `tb` are lowercase currently, but we assert this condition anyway. This is consistent also with the [C reference implementation](https://github.com/sipa/bech32/blob/2b0aac650ce560fb2b2a2bebeacaa5c87d7e5938/ref/c/segwit_addr.c#L59) ACKs for top commit: laanwj: ACK 2457aea83c1f9fba708e2335bb197950bf0b6244 Tree-SHA512: 24fcbbc2f315c72c550cc3d82b4332443eea6378fc73d571f98b87492604d023378dd102377c9e05467192cae6049606dee98e4c5688c8d5e4caac50c970284b
2019-09-05Merge #16804: test: Remove unused try-block in assert_debug_logWladimir J. van der Laan
fae91a09c453a9a95c382df765bd71e54698d5b2 test: Remove incorrect and unused try-block in assert_debug_log (MarcoFalke) Pull request description: This try block has accidentally been added by me in fa3e9f7627784ee00980590e5bf044a0e1249999. It was unused all the time, but commit 6011c9d72d1df5c2cd09de6f85c21eb4f7eb1ba8 added a `return` in the finally block, muting all exceptions. This can be tested by adding an `assert False` after any `with ...assert_debug_log...:` line. ACKs for top commit: laanwj: ACK fae91a09c453a9a95c382df765bd71e54698d5b2 ryanofsky: utACK fae91a09c453a9a95c382df765bd71e54698d5b2. I didn't know returning inside a `finally` block would cancel pending exceptions or return values, but I guess this makes sense and is a good thing to be aware of. Tree-SHA512: 47ed0165062060e9af055a3e92f1a529cd41d00476bfad64e3cd141ae084d22f926a343bb1257717e164e15459a59ab66aed198c95d18bf780d8cb0b76aa3298
2019-09-05Assert that the HRP is lowercase in Bech32::EncodeSamuel Dobson
2019-09-05Merge #15257: Scripts and tools: Bump flake8 to 3.7.8MarcoFalke
3d0a82cff8cbb809876e82dbe62d14d2adc07d94 devtools: Accomodate block-style copyright blocks (Ben Woosley) 0ef0e51fe4bb592e67255776b5a0ba04679fb8c4 lint: Bump flake8 to 3.7.8 (Ben Woosley) 838920704ad90a71cf288b700052503db8abb17e lint: Disable flake8 W504 warning (Ben Woosley) b21680baf5391a602b295b9d7d0ef66553661cb9 test/contrib: Fix invalid escapes in regex strings (Ben Woosley) Pull request description: This is a second go at #15221, fixing new lints in: W504 line break after binary operator W605 invalid escape sequence F841 local variable 'e' is assigned to but never used This time around: * One commit per rule, for easier review * I went with the PEP-8 style of breaking before binary operators * I looked into the raw regex newline issue, and found that raw strings with newlines embedded do work appropriately. E.g. run `re.match(r" \n ", " \n ")` to check this for yourself. `re.MULTILINE` exists to modify `^` and `$` in multiline scenarios, but all of these searches are per-line. ACKs for top commit: practicalswift: ACK 3d0a82cff8cbb809876e82dbe62d14d2adc07d94 -- diff looks correct Tree-SHA512: bea0c144cadd72e4adf2e9a4b4ee0535dd91a8e694206924cf8a389dc9253f364a717edfe9abda88108fbb67fda19b9e823f46822d7303c0aaa72e48909a6105
2019-09-05Merge #16768: test: Make lint-includes.sh work from any directoryMarcoFalke
490da639cbd48ce0dc438abbfc89ab796391cb2a Make lint-includes.sh work from any directory (Kristaps Kaupe) Pull request description: Before this change it works from root folder of bitcoin git repo, but if you do `cd test/lint; ./test-includes.sh`, you will have a lot of false positive messages like this: ``` Good job! The circular dependency "chainparamsbase -> util/system -> chainparamsbase" is no longer present. Please remove it from EXPECTED_CIRCULAR_DEPENDENCIES in ./lint-circular-dependencies.sh to make sure this circular dependency is not accidentally reintroduced. Good job! The circular dependency "index/txindex -> validation -> index/txindex" is no longer present. Please remove it from EXPECTED_CIRCULAR_DEPENDENCIES in ./lint-circular-dependencies.sh to make sure this circular dependency is not accidentally reintroduced. ``` Top commit has no ACKs. Tree-SHA512: 07fa69cb2883181dcee922191acac4b242722eeb2916cdffdc7163421302b22f3c9525aaf4c754a9dba1c307032c05285e38191d5c6aabc894321f8a27bbceaa
2019-09-04Conservatively accept RBF bumps bumping one tx at the package limitsMatt Corallo
Accept RBF bumps of single transactions (ie which conflict with one transaction) even when that transaction is a member of a package which is currently at the package limit iff the new transaction does not add any additional mempool dependencies from the original. This could be made a bit looser in the future and still be safe, but for now this fixes the case that a transaction which was accepted by the carve-out rule will not be directly RBF'able.
2019-09-04Make lint-includes.sh work from any directoryKristaps Kaupe
2019-09-04Disconnect peers violating blocks-only modeSuhas Daftuar
If we set fRelay=false in our VERSION message, and a peer sends an INV or TX message anyway, disconnect. Since we use fRelay=false to minimize bandwidth, we should not tolerate remaining connected to a peer violating the protocol.
2019-09-04doc: improve comments relating to block-relay-only peersSuhas Daftuar
2019-09-04Don't relay addr messages to block-relay-only peersSuhas Daftuar
We don't want relay of addr messages to leak information about these network links.