aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2020-06-26doc: Document Span pitfallsPieter Wuille
2020-06-26Merge bitcoin-core/gui#8: Fix regression in TransactionTableModelMarcoFalke
d906aaa117e337fc70575beecc0d6da314f57385 qt: Fix regression in TransactionTableModel (Hennadii Stepanov) Pull request description: Since https://github.com/bitcoin/bitcoin/pull/17993 a crash is possible on exit. Steps to reproduce: - precondition: the old chain - start `bitcoin-qt` - wait until sync - on main window: Menu -> File -> Quit - crash This PR is based on ryanofsky's [suggestion](https://github.com/bitcoin-core/gui/issues/7#issuecomment-646639251). Fixes #7. ACKs for top commit: promag: Code review ACK d906aaa117e337fc70575beecc0d6da314f57385. ryanofsky: Code review ACK d906aaa117e337fc70575beecc0d6da314f57385. Only changes are squashing, adding assert and adding const vasild: ACK d906aaa1 Tree-SHA512: 99a475fd90dff50407a58537fdc6099a2a074018e9078452bf86defc1a4b9e546aa94f916d242355900b21638c6cfef845598a5282661a9343556c4514eb155f
2020-06-26Merge #19366: tests: Provide main(...) function in fuzzer. Allow building ↵MarcoFalke
uninstrumented harnesses with --enable-fuzz. 1087807b2bc56b9c7e7a5471c83f6ecfae79b048 tests: Provide main(...) function in fuzzer (practicalswift) Pull request description: Provide `main(...)` function in fuzzer. Allow building uninstrumented harnesses with only `--enable-fuzz`. This PR restores the behaviour to how things worked prior to #18008. #18008 worked around an macOS specific issue but did it in a way which unnecessarily affected platforms not in need of the workaround :) Before this patch: ``` # Build uninstrumented fuzzing harness (no libFuzzer/AFL/other-fuzzer-instrumentation) $ ./configure --enable-fuzz $ make CXXLD test/fuzz/span /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/Scrt1.o: In function `_start': (.text+0x20): undefined reference to `main' collect2: error: ld returned 1 exit status Makefile:7244: recipe for target 'test/fuzz/span' failed make[2]: *** [test/fuzz/span] Error 1 make[2]: *** Waiting for unfinished jobs.... $ ``` After this patch: ``` # Build uninstrumented fuzzing harness (no libFuzzer/AFL/other-fuzzer-instrumentation) $ ./configure --enable-fuzz $ make $ echo foo | src/test/fuzz/span $ ``` The examples above show the change in non-macOS functionality. macOS functionality is unaffected by this patch. ACKs for top commit: MarcoFalke: ACK 1087807b2bc56b9c7e7a5471c83f6ecfae79b048 Tree-SHA512: 9c16ea32ffd378057c4fae9d9124636d11e3769374d340f68a1b761b9e3e3b8a33579e60425293c96b8911405d8b96ac3ed378e669ea4c47836af06892aca73d
2020-06-25tests: Provide main(...) function in fuzzerpracticalswift
2020-06-25Merge #11413: [wallet] [rpc] sendtoaddress/sendmany: Add explicit feerate optionWladimir J. van der Laan
25dac9fa65243ca8db02df22f484039c08114401 doc: add release notes for explicit fee estimators and bumpfee change (Karl-Johan Alm) 05227a35545d7656450874b3668bf418c73813fb tests for bumpfee / estimate_modes (Karl-Johan Alm) 3404c1b753432c4859a4ca245f01c240610a00cb policy: optional FeeEstimateMode param to CFeeRate::ToString (Karl-Johan Alm) 6fcf4484302d13bd7739b617470d8c8e31974908 rpc/wallet: add two explicit modes to estimate_mode (Karl-Johan Alm) b188d80c2de9ebb114da5ceea78baa46bde7dff6 MOVEONLY: Make FeeEstimateMode available to CFeeRate (Karl-Johan Alm) 5d1a411eb12fc700804ffe5d6e205234d30edd5f fees: add FeeModes doc helper function (Karl-Johan Alm) 91f6d2bc8ff4d4cd1b86daa370ec9d2d9662394d rpc/wallet: add conf_target as alias to confTarget in bumpfee (Karl-Johan Alm) 69158b41fc488e4f220559da17a475eff5923a95 added CURRENCY_ATOM to express minimum indivisible unit (Karl-Johan Alm) Pull request description: This lets users pick their own fees when using `sendtoaddress`/`sendmany` if they prefer this over the estimators. ACKs for top commit: Sjors: re-utACK 25dac9fa65: rebased, more fancy C++, jonatack: ACK 25dac9fa65243ca8db02df2 I think this should be merged after all this time, even though it looks to me like there are needed follow-ups, fixes and test coverage to be added (see further down), which I don't mind helping out with, if wanted. fjahr: Code review ACK 25dac9fa65243ca8db02df22f484039c08114401 Tree-SHA512: f31177e6cabf3187a43cdfe93477144f8e8385c7344613743cbbd16e8490d53ff5144aec7b9de6c9a65eb855b55e0f99d7f164dee4b6bf3cfea4dce51cf11d33
2020-06-25Merge #19378: refactor: Use Mutex type for g_cs_recent_confirmed_transactionsMarcoFalke
13076867981ab36b3549ab4c29583ae8ed12a709 refactor: Use Mutex type for g_cs_recent_confirmed_transactions (Hennadii Stepanov) Pull request description: No need the `RecursiveMutex` type for the `g_cs_recent_confirmed_transactions`. Related to #19303. ACKs for top commit: MarcoFalke: ACK 13076867981ab36b3549ab4c29583ae8ed12a709 vasild: ACK 13076867 Tree-SHA512: 67f1be10c80ec18d0f80b9f5036e5a20986314da9b9364ef4e193ad1d9f3f4c8e4c2e16253ca79d649ff602d5b8c2aff58d7dd1085841afb760479a4875cffbe
2020-06-25Merge #19286: tests: Add fuzzing harness for CHash{160,256}, ↵MarcoFalke
C{HMAC_,}SHA{1,256,512}, CRIPEMD160, CSipHasher, etc. 67bb7be864f38ef5afc731aa427146cb2af500dd tests: Add fuzzing harness for CHash{160,256}, C{HMAC_,}SHA{1,256,512}, CRIPEMD160, CSipHasher, etc. (practicalswift) Pull request description: Add fuzzing harness for `CHash{160,256}`, `C{HMAC_,}SHA{1,256,512}`, `CRIPEMD160`, `CSipHasher`, etc. See [`doc/fuzzing.md`](https://github.com/bitcoin/bitcoin/blob/master/doc/fuzzing.md) for information on how to fuzz Bitcoin Core. Don't forget to contribute any coverage increasing inputs you find to the [Bitcoin Core fuzzing corpus repo](https://github.com/bitcoin-core/qa-assets). Happy fuzzing :) Top commit has no ACKs. Tree-SHA512: 5377b361097211a7d0b90a26ed1c6dadb9ecce11349036d19f8c9ad2818cd98709bbcbf1c2361dd18eae122b8dbce1c71bb5aa2e85660677e235b8974ae33fcc
2020-06-25Merge #19090: refactor: Misc scheduler cleanupsMarcoFalke
fa8337fcdbcab8368d5bf111c4b2e5acf25e6e22 clang-format scheduler (MarcoFalke) fa3d41b5ab8fe62bc2e36c3e1211aace69e6da65 doc: Switch scheduler to doxygen comments (MarcoFalke) fac43f9889f500bcb62d830c030dec42fe791031 scheduler: Replace stop(true) with StopWhenDrained() (MarcoFalke) fa9cca0550f3d0ee8c276146f40007f76fbb97c2 doc: Remove unused documentation about unimplemented features (MarcoFalke) fab2950d703217ec34b27e677e4f33ebbf99ca08 doc: Switch boost::thread to std::thread in scheduler (MarcoFalke) fa9819695aac260be0ba170eb15ecba8cb519843 test: Remove unused scheduler.h include from the common setup (MarcoFalke) fa609c4f76f215c19ea4021e78c102dee2b8c3d1 scheduler: Remove unused REVERSE_LOCK (MarcoFalke) Pull request description: This accumulates a bunch of cleanup that was long overdue, but I haven't yet gotten around to address. Specifically, but not limited to: * Remove unused code, documentation and includes * Upgrade to doxygen documentation Please refer to the individual commits for more details. ACKs for top commit: jnewbery: utACK fa8337fcdbcab8368d5bf111c4b2e5acf25e6e22 Tree-SHA512: 0c825ad9767e2697a3ef1ec1be13fdc2b18eeb7493ad0be5b65cc9f209391e78b17ee66e35e094c5e171c12b0f1624f287a110f6bddaf3024b708877afa8552e
2020-06-25Merge #19237: wallet: Check size after unserializing a pubkeyMarcoFalke
37ae687f95c82f2d64ed880533d158060d4fc3de Add tests for CPubKey serialization/unserialization (Elichai Turkel) 9b8907faded8e4ec312c0dd4b4b15e1793876acd Check size after Unserializing CPubKey (Elichai Turkel) Pull request description: Found by practicalswift, closes #19235 Currently all the public API(except the pointer-like API) in CPubKey that sets/constructs a pubkey goes through `CPubKey::Set` which checks if that the length and size match and if not invalidates the key. This adds the same check to `CPubKey::Unserialize`, sadly I don't see an easy way to just push this to the existing checks in `CPubKey::Set` but it's only a simple condition. The problem with not invalidating is that if you write a pubkey like: `{0x02,0x00}` it will think the actual length is 33(because of `size()`) and will access uninitialized memory if you call any of the functions on CPubKey. ACKs for top commit: practicalswift: re-ACK 37ae687f95c82f2d64ed880533d158060d4fc3de jonatack: Code review re-ACK 37ae687 per `git diff eab8ee3 37ae687` only change since last review at eab8ee3 is passing the `pubkey` param by reference to const instead of by value in `src/test/key_tests.cpp::CmpSerializationPubkey` MarcoFalke: ACK 37ae687f95c82f2d64ed880533d158060d4fc3de Tree-SHA512: 30173755555dfc76d6263fb6a59f41be36049ffae7b4e1b92b922d668f5e5e2331f7374d5fa10d5d59fc53020d2966156905ffcfa8b8129c1f6d0ca062174ff1
2020-06-25refactor: Use Mutex type for g_cs_recent_confirmed_transactionsHennadii Stepanov
2020-06-24Merge #19272: net, test: invalid p2p messages and test framework improvementsMarcoFalke
56010f92564a94b0ca6c008c0e6f74a19fad4a2a test: hoist p2p values to test framework constants (Jon Atack) 75447f0893f9ad9bf83d182b301d139430d8de1c test: improve msg sends and p2p disconnections in p2p_invalid_messages (Jon Atack) 57960192a5362ff1a7b996995332535f4c2a25c3 test: refactor test_large_inv() into 3 tests with common method (Jon Atack) e2b21d8a597c536a8617408d43958bfe9f98a442 test: add p2p_invalid_messages logging (Jon Atack) 9fa494dc0969c61d5ef33708a08923cca19ce091 net: update misbehavior logging for oversized messages (Jon Atack) Pull request description: ...seen while reviewing #19264, #19252, #19304 and #19107: in `net_processing.cpp` - make the debug logging for oversized message size misbehavior the same for `addr`, `getdata`, `headers` and `inv` messages in `p2p_invalid_messages` - add missing logging - improve assertions/message sends, move cleanup disconnections outside the assertion scopes - split a slowish 3-part test into 3 order-independent tests - add a few p2p constants to the test framework ACKs for top commit: troygiorshev: reACK 56010f92564a94b0ca6c008c0e6f74a19fad4a2a MarcoFalke: ACK 56010f9256 🎛 Tree-SHA512: db67b70278f8d4c318907e105af54b54eb3afd15500f9aa0c98034f6fd4bd1cf9ad1663037bd9b237ff4890f3059b37291a6498d8d6ae2cc38efb9f045f73310
2020-06-24refactor: Replace HexStr(o.begin(), o.end()) with HexStr(o)Wladimir J. van der Laan
HexStr can be called with anything that bas `begin()` and `end()` functions, so clean up the redundant calls.
2020-06-24Merge bitcoin-core/gui#11: Remove needless headers from qt/walletview.cppMarcoFalke
4f9d9efb4e9afb1b012fca689ce77eb1d8d34f7d qt: Remove needless headers (Hennadii Stepanov) Pull request description: No symbols from the removed headers are used in the `qt/walletview.cpp`. This is a small followup of https://github.com/bitcoin/bitcoin/pull/18027. Top commit has no ACKs. Tree-SHA512: 986ed5c8f3bac4c0053736ce84d738f8593d3dbf713109af3cb9b7051cd838f23152a39bb3c1e9694a993c4e7accf14e94e5beff5e7881155638cd44fbf7f46f
2020-06-24qt: Remove needless headersHennadii Stepanov
2020-06-24policy: optional FeeEstimateMode param to CFeeRate::ToStringKarl-Johan Alm
2020-06-24rpc/wallet: add two explicit modes to estimate_modeKarl-Johan Alm
2020-06-24MOVEONLY: Make FeeEstimateMode available to CFeeRateKarl-Johan Alm
Can verify move-only with: git log -p -n1 --color-moved This commit is move-only and doesn't change code or affect behavior.
2020-06-24fees: add FeeModes doc helper functionKarl-Johan Alm
2020-06-22qt: Fix regression in TransactionTableModelHennadii Stepanov
Since #17993 a crash is possible on exit. Co-authored-by: Russell Yanofsky <russ@yanofsky.org>
2020-06-22test: add two edge case tests for CSubNetVasil Dimov
2020-06-21doc: Remove -whitelistforcerelay from commentMarcoFalke
Instead, permission flags should be used. For example -whitelist=forcerelay@127.0.0.1
2020-06-21Merge #18027: "PSBT Operations" dialogSamuel Dobson
931dd4760855e036c176a23ec2de367c460e4243 Make lint-spelling.py happy (Glenn Willen) 11a0ffb29d1b4dcc55c8826873f340ab4196af21 [gui] Load PSBT from clipboard (Glenn Willen) a6cb0b0c29d327d01aebb98b0504f317eb19c3dc [gui] PSBT Operations Dialog (sign & broadcast) (Glenn Willen) 5dd0c03ffa3aeaa69d8a3a716f902f450d5eaaec FillPSBT: report number of inputs signed (or would sign) (Glenn Willen) 9e7b23b73387600d175aff8bd5e6624dd51f86e7 Improve TransactionErrorString messages. (Glenn Willen) Pull request description: Add a "PSBT Operations" dialog, reached from the "Load PSBT..." menu item, giving options to sign or broadcast the loaded PSBT as appropriate, as well as copying the result to the clipboard or saving it to a file. This is based on Sjors' #17509, and depends on that PR going in first. (It effectively replaces the small "load PSBT" dialog from that PR with a more feature-rich one.) Some notes: * The way I display status information is maybe unusual (a status bar, rather than messageboxes.) I think it's helpful to have the information in it be persistent rather than transitory. But if people dislike it, I would probably move the "current state of the transaction" info to the top line of the main label, and the "what action just happened, and did it succeed" info into a messagebox. * I don't really know much about the translation/localization stuff. I put tr() in all the places it seemed like it ought to go. I did not attempt to translate the result of TransactionErrorString (which is shared by GUI and non-GUI code); I don't know if that's correct, but it matches the "error messages in logs should be googleable in English" heuristic. I don't know whether there are things I should be doing to reduce translator effort (like minimizing the total number of distinct message strings I use, or something.) * I don't really know how (if?) automated testing is applied to GUI code. I can make a list of PSBTs exercising all the codepaths for manual testing, if that's the right approach. Input appreciated. ACKs for top commit: instagibbs: tested ACK https://github.com/bitcoin/bitcoin/pull/18027/commits/931dd4760855e036c176a23ec2de367c460e4243 Sjors: re-tACK 931dd4760855e036c176a23ec2de367c460e4243 jb55: ACK 931dd4760855e036c176a23ec2de367c460e4243 achow101: ACK 931dd4760855e036c176a23ec2de367c460e4243 Tree-SHA512: ade52471a2242f839a8bd6a1fd231443cc4b43bb9c1de3fb5ace7c5eb59eca99b1f2e9f17dfdb4b08d84d91f5fd65677db1433dd03eef51c7774963ef4e2e74f
2020-06-21Merge #19133: rpc, cli, test: add bitcoin-cli -generate commandSamuel Dobson
22cb303cf099b430d602384bc92706ce01b4f98d rpc: add missing space in JSON parsing error message, update test (Jon Atack) bf53ebef061a563cfc4c5857f5d6bc93fb136282 test: add multiwallet tests for bitcoin-cli -generate (Jon Atack) 4b859cfff9965eb07044f4d104398cb0e7ab127e cli: add multiwallet capability to GetNewAddress and -generate (Jon Atack) 18f93545a12db00180cea369a4b5cce7f10cd362 test: add tests for bitcoin-cli -generate (Jon Atack) 4818124137732540383a29835afa2be41aa55ca8 cli: create bitcoin-cli -generate command (Jon Atack) ff41a3690066081772b172f3c31a63f5fe6ea7ed cli: extract ParseResult() and ParseError() (Jon Atack) f4185b26d9b2ff2e86c99cdfe3ad9be62bb6299a cli: create GenerateToAddressRequestHandler class (Harris) f7c65a33508c4bb8e9ed896e150a4fa529a243e5 cli: create GetNewAddress() (Jon Atack) 9be7fd35c5d631c2cc34d3b4fa63ae0a9d5a68ef rpc: make generatetoaddress locals const (Jon Atack) cb00510dbac99b44f3f2cf6e58bb2e4401c5ef28 rpc: create rpc/mining.h, hoist default max tries values to constant (Jon Atack) Pull request description: This PR continues and completes the work begun in #17700 working on issue #16000 to create a client-side version of RPC `generate`. Basically, `bitcoin-cli -generate` wraps calling `generatenewaddress` followed by `generatetoaddress [nblocks] [maxtries]` and prints the following: ``` $ bitcoin-cli -generate { "address": "bcrt1qn4aszr2y2xvpa70y675a76wsu70wlkwvdyyln6" "blocks": [ "01d2ebcddf663da90b28da7f6805115e2ba7818f16fe747258836646a43a0bb5", ] } $ bitcoin-cli -rpcwallet=wallet-name -generate 3 100 { "address": "bcrt1q4cunfw0gnsj7g7e6mk0v0uuvvau9mwr09dj45l", "blocks": [ "7a6650ca5e0c614992ee64fb148a7e5e022af842e4b6003f81abd8baf1e75136", "01d2ebcddf663da90b28da7f6805115e2ba7818f16fe747258836646a43a0bb5", "3f8795ec40b1ad812b818c177680841be319a3f6753d4e32dc7dfb5bafe5d00e" ] } ``` Help doc: ``` $ bitcoin-cli -h | grep -A5 "\-generate" -generate Generate blocks immediately, equivalent to RPC generatenewaddress followed by RPC generatetoaddress. Optional positional arguments are number of blocks to generate (default: 1) and maximum iterations to try (default: 1000000), equivalent to RPC generatetoaddress nblocks and maxtries arguments. Example: bitcoin-cli -generate 4 1000 ``` Quite a bit of test coverage turned out to be needed to cover the change and the different cases (arguments, multiwallet mode) and error-handling. This PR also improves some things that working on these changes brought to light. Credit to Harris Brakmić for the initial work in #17700. ACKs for top commit: adamjonas: utACK 22cb303cf099b430d602384bc92706ce01b4f98d meshcollider: utACK 22cb303cf099b430d602384bc92706ce01b4f98d Tree-SHA512: 94f67f632fe093d076f614e0ecff09ce7342ac6e424579200d5211a6615260e438d857861767fb788950ec6da0b26ef56dc8268c430012a3b3d4822b24ca6fbf
2020-06-21clang-format schedulerMarcoFalke
Can easily be reviewed with the git options --ignore-all-space --word-diff-regex=. -U0
2020-06-21Merge #19095: [tools] Update clang-format config for multi-line function ↵MarcoFalke
declarations and calls cc29d1e2c46e01c544ef44c79d72b7bcc5d39ba7 [tools] Update clang-format config (John Newbery) Pull request description: In some cases, running clang-format has made code _less_ readable by joining declarations and calls for functions with many arguments into very long lines. For example: ``` - size_t getQueueInfo(std::chrono::system_clock::time_point &first, - std::chrono::system_clock::time_point &last) const; + size_t getQueueInfo(std::chrono::system_clock::time_point& first, std::chrono::system_clock::time_point& last) const; ``` (https://github.com/bitcoin/bitcoin/pull/19090#discussion_r431961148) This change to clang-format would allow arguments/parameters for func declarations/calls to be split over multiple lines, aligned with the opening parens. It does not force args/params to be on new lines (that setting is `BinPackParameters : true`). ACKs for top commit: MarcoFalke: ACK cc29d1e2c46e01c544ef44c79d72b7bcc5d39ba7 fine with me practicalswift: ACK cc29d1e2c46e01c544ef44c79d72b7bcc5d39ba7 Tree-SHA512: a62474925e71aaff41bdce7960fd5ffd64317da810f694d8084080b054708cf71c2ab2ce3111db5a9260d1c1f9e02d59a2ecb5543b1b6172ce085cb42432160a
2020-06-21Merge #19200: rpc: remove deprecated getaddressinfo fieldsSamuel Dobson
bc01f7ae0538d3c647ce8dfbc29f7914d5df3fbb doc: release note for rpc getaddressinfo removals (Jon Atack) 90e989390ee50633fff0e4f210a1ea23ff00e012 rpc: getaddressinfo RPCResult fixup (Jon Atack) a8507c99da10791aa69ca277128e06753942e976 rpc: remove deprecated getaddressinfo `labels: purpose` (Jon Atack) 645a8653c895e4fc7717e9e5ac045612b5deaa60 rpc: remove deprecated getaddressinfo `label` field (Jon Atack) Pull request description: These were deprecated in #17578 and #17585, with expected 0.21 removal notified in the 0.20 release notes. ``` - The `getaddressinfo` RPC has had its `label` field deprecated (re-enable for this release using the configuration parameter `-deprecatedrpc=label`). The `labels` field is altered from returning JSON objects to returning a JSON array of label names (re-enable previous behavior for this release using the configuration parameter `-deprecatedrpc=labelspurpose`). Backwards compatibility using the deprecated configuration parameters is expected to be dropped in the 0.21 release. (#17585, #17578) ``` ACKs for top commit: Sjors: utACK bc01f7a adamjonas: utACK bc01f7a meshcollider: utACK bc01f7ae0538d3c647ce8dfbc29f7914d5df3fbb Tree-SHA512: ae1af381e32c4c3bde8b061a56382838513a9a82c88767843cdeae3a2ab8aa7d8c2e66e106d2b31ea07d74bb80c191a2f842c9aaecc7c5438ad9a9bc66d1b251
2020-06-21Merge #16377: [rpc] don't automatically append inputs in walletcreatefundedpsbtSamuel Dobson
e5327f947c310849e1ddbb24321e4c9f85564549 [rpc] fundrawtransaction: add_inputs option to control automatic input adding (Sjors Provoost) 79804fe24bd00e183382dfbcab9343960d158aa5 [rpc] walletcreatefundedpsbt: don't automatically append inputs (Sjors Provoost) Pull request description: When the user doesn't specificy inputs, it makes sense to automatically select them. But when the user does specify inputs, `walletcreatefundedpsbt` now fails if the amount is insufficient, unless `addInputs` is set to `true`. Similarly for `fundrawtransaction` if the original transaction already specified inputs, we only add more if `addInputs` is set to `true`. This protects against fat finger mistakes in the amount or fee rate (see also #16257). The behavior is also more similar to GUI coin selection. ACKs for top commit: achow101: ACK e5327f947c310849e1ddbb24321e4c9f85564549 meshcollider: utACK e5327f947c310849e1ddbb24321e4c9f85564549 Tree-SHA512: d8653b820914396c7c25b0d0a2b7e92de214aa023bc1aa085feb37d3b20fab361ebea90416a7db989f19bdc37e26cf0adfbcb712c80985c87afa67a9bd44fecb
2020-06-21Merge #17938: Disallow automatic conversion between disparate hash typesSamuel Dobson
4d7369125a82214ea42b808a32b71b315a5c3c72 Disallow automatic conversion between hash types (Ben Woosley) fa9ef2cdbed32438bdb32623af6e06f13ecd35e4 Remove an apparently unnecessary conversion (Ben Woosley) 966a22d859db37b1775e2180e5be032fc4fdf483 Explicitly support conversion between equivalent hash types (Ben Woosley) f32c1e07fd6c174ff3f6406a619550d2f6c19360 Use explicit conversion from WitnessV0KeyHash -> CKeyID (Ben Woosley) 2c54217f913967703b404747133be67cf2f4feac Use explicit conversion from PKHash -> CKeyID (Ben Woosley) a9e451f144480d7b170e49087df162989d31cd20 Convert CPubKey to WitnessV0KeyHash directly (Ben Woosley) 3fcc46812334074d2c77a6233e8a961cd0785872 Prefer explicit CScriptID construction (Ben Woosley) 0a5ea32ce605984094c5552877cb99bc81654f2c Prefer explicit uint160 conversion (Ben Woosley) Pull request description: This bases the script/standard hash types, TxDestination-related and CScriptID on a base template which does not silently convert the underlying `uintN` type. Inspired by and built on #17924. Commits are small and focused to ease review. Note some of these changes may be relative to existing bugs of the same sort as #17924. See particularly "Convert CPubKey to WitnessV0KeyHash directly" and "Remove an apparently unnecessary conversion". ACKs for top commit: achow101: ACK 4d7369125a82214ea42b808a32b71b315a5c3c72 meshcollider: re-utACK 4d7369125a82214ea42b808a32b71b315a5c3c72 Tree-SHA512: f1b3284ddc6fb6c6e726f2c22668b6d732d45eb5418262ed2b9c728f60be7be43dfb414b6ddd9915025c8dcd7f360dc3b46e997a945a2feb95b0e5c4f05d6b54
2020-06-20Merge #19018: docs: fixing description of the field sequence in ↵MarcoFalke
walletcreatefundedpsbt RPC method d0a3feea73e0751f325ef7f1de20fa668f27332e Change docs for walletcreatefundedpsbt RPC method (Ivan Vershigora) Pull request description: `sequence` field in the list of inputs currently marked as "required". Actually it can be omitted and it's value depends on `locktime` and `options.replaceable` fields. Just the same as in `createpsbt` call. ACKs for top commit: achow101: ACK d0a3feea73e0751f325ef7f1de20fa668f27332e Tree-SHA512: 3f429a2c2eea283a47fb5002a99f7e2a5ed6f67df9fd895c1ab938256c48a6497ed6ac2673d8fe8968dfb67b939f4a84570899d9faf52f3abd6ec90c0703d1bd
2020-06-20rpc/wallet: add conf_target as alias to confTarget in bumpfeeKarl-Johan Alm
2020-06-20added CURRENCY_ATOM to express minimum indivisible unitKarl-Johan Alm
also moved CURRENCY_* into feerate.h file to work around MSVC bug
2020-06-19Merge #19054: wallet: Skip hdKeypath of 'm' when determining inactive hd seedsMarcoFalke
951bca61d7376be44fad0775e8abb06ff667e4bf tests: feature_backwards_compatibility.py test 0.16 up/downgrade (Andrew Chow) 3a03a11e8c696e2164b8bb221a4a35a7c3ac4d6d Skip hdKeypath of 'm' (Andrew Chow) Pull request description: Previously the seed was stored with keypath 'm' so we need to skip this as well when determining inactive seeds. Fixes #19051 ACKs for top commit: Sjors: ACK 951bca61d7376be44fad0775e8abb06ff667e4bf instagibbs: re-utACK https://github.com/bitcoin/bitcoin/pull/19054/commits/951bca61d7376be44fad0775e8abb06ff667e4bf ryanofsky: Code review ACK 951bca61d7376be44fad0775e8abb06ff667e4bf. No significant changes since last review, just updated comment and some test tweaks Tree-SHA512: 930f77e7097c9cf4f1012e540bd2b1a72fd279262517f10c1531b2ad48c632ef95e0dd4edea81bcc3b3db306479d34e5e79e5d6c4ed31dfa4b77a4231436436e
2020-06-19Disallow automatic conversion between hash typesBen Woosley
A templated BaseHash does not allow for automatic conversion, thus conversions much be explicitly allowed / whitelisted, which will reduce the risk of unintended conversions.
2020-06-19Remove an apparently unnecessary conversionBen Woosley
CScript -> CScriptID -> ScriptHash is unnecessary because ScriptHash and CScriptID do the same thing.
2020-06-19Explicitly support conversion between equivalent hash typesBen Woosley
ScriptHash <-> CScriptID CKeyID -> PKHash PKHash -> WitnessV0KeyHash
2020-06-19Use explicit conversion from WitnessV0KeyHash -> CKeyIDBen Woosley
These types are equivalent, in data etc, so they need only their data cast across.
2020-06-19Use explicit conversion from PKHash -> CKeyIDBen Woosley
These types are equivalent, in data etc, so they need only their data cast across. Note a function is used rather than a casting operator as CKeyID is defined at a lower level than script/standard
2020-06-19Convert CPubKey to WitnessV0KeyHash directlyBen Woosley
The round-tripping through PKHash has no effect, and is potentially misleading as such.
2020-06-19Prefer explicit CScriptID constructionBen Woosley
2020-06-19Prefer explicit uint160 conversionBen Woosley
2020-06-19Merge #19309: refactor: Fix link error with --enable-debugMarcoFalke
b83cc0fc94df99f0334430e63e8c9fa6ae3790e1 Fix link error with --enable-debug (Hennadii Stepanov) Pull request description: Fixes a link error on master (39bd9ddb8783807b9cde6288233e86ad7c85d61f): ``` $ ./configure --enable-debug $ make ... bitcoin_wallet-bitcoin-wallet.o:(.data.rel.ro+0x0): undefined reference to `InitError(bilingual_str const&)' libbitcoin_wallet_tool.a(libbitcoin_wallet_tool_a-wallettool.o):(.data.rel.ro+0x8): undefined reference to `InitError(bilingual_str const&)' libbitcoin_wallet.a(libbitcoin_wallet_a-salvage.o):(.data.rel.ro+0x8): undefined reference to `InitError(bilingual_str const&)' libbitcoin_wallet.a(libbitcoin_wallet_a-wallet.o):(.data.rel.ro+0x8): undefined reference to `InitError(bilingual_str const&)' libbitcoin_wallet.a(libbitcoin_wallet_a-walletdb.o):(.data.rel.ro+0x8): undefined reference to `InitError(bilingual_str const&)' libbitcoin_wallet.a(libbitcoin_wallet_a-wallet.o):(.data.rel.ro+0x8): more undefined references to `InitError(bilingual_str const&)' follow collect2: error: ld returned 1 exit status ``` See: - https://github.com/bitcoin/bitcoin/pull/19295#issuecomment-645471771 - https://github.com/bitcoin/bitcoin/pull/19295#issuecomment-645487182 ACKs for top commit: achow101: Re-ACK b83cc0fc94df99f0334430e63e8c9fa6ae3790e1 Tree-SHA512: f563d978b6725284049449bb0b3a184d356f32e9b63bcadb0ba71352d3d521af3dbb4a7b4fc0a5a620ed99c357e59f62249c10d0defc0cbe7775f2c06791dabe
2020-06-19net: update misbehavior logging for oversized messagesJon Atack
so that oversized ADDR, GETDATA, HEADERS and INV messages print the same consistent debug logs.
2020-06-19Merge #18863: refactor: Make CScriptVisitor statelessMarcoFalke
3351c91ed402895dcb4f803a29d2cac70ccfa8b4 refactor: Make CScriptVisitor stateless (João Barbosa) Pull request description: `CScriptVisitor` was added in 1025440184ef100a22d07c7bb543ee45cf169d64 (#1357) and the visitor return type was never used. Now `CScriptVisitor` is stateless and `CScript` is the return type. ACKs for top commit: MarcoFalke: ACK 3351c91ed402895dcb4f803a29d2cac70ccfa8b4 🏤 sipa: utACK 3351c91ed402895dcb4f803a29d2cac70ccfa8b4 Tree-SHA512: d158ad2ebe8ea4dc8cc090b943dd66fa5421a84f9443e16ab2d661df38e1a85de16ff13cbaa56924489d8d43cba25fa3cd8b6904bbbcbf356b886ffe8ffba19a
2020-06-19Merge #18937: refactor: s/command/msg_type/ in CNetMsgMaker and ↵MarcoFalke
CSerializedNetMsg 51e9393c1f6c9eaac554f821f5327f63bd09c8cf refactor: s/command/msg_type/ in CNetMsgMaker and CSerializedNetMsg (Sebastian Falbesoner) Pull request description: Follow-up PR for #18533 -- another small step towards getting rid of the confusing "command" terminology. Also see PR #18610 which tackled the functional tests. ACKs for top commit: MarcoFalke: ACK 51e9393c1f6c9eaac554f821f5327f63bd09c8cf Tree-SHA512: bb6f05a7be6823d5c4eab1d05b31fee944e700946827ad9425d59a3957fd879776c88c606319cbe9832d9451b275baedf913b71429ea3e01e4e82bf2d419e819
2020-06-19[gui] Load PSBT from clipboardGlenn Willen
2020-06-19[gui] PSBT Operations Dialog (sign & broadcast)Glenn Willen
Add a "PSBT Operations" dialog, reached from the "Load PSBT..." menu item, giving options to sign or broadcast the loaded PSBT as appropriate, as well as copying the result to the clipboard or saving it to a file.
2020-06-19Merge #19293: net: Avoid redundant and confusing FAILED logfanquake
fa1904e5f0d164fbcf41398f9ebbaafe82c28419 net: Remove dead logging code (MarcoFalke) fac12ebf4f3b77b05112d2b00f8d3f4669621a4c net: Avoid redundant and confusing FAILED log (MarcoFalke) Pull request description: Remove a redundant and confusing "FAILED" log message and gets rid of the unused return type in `ProcessMessage` ACKs for top commit: jnewbery: utACK fa1904e5f0d164fbcf41398f9ebbaafe82c28419 gzhao408: utACK https://github.com/bitcoin/bitcoin/commit/fa1904e5f0d164fbcf41398f9ebbaafe82c28419 troygiorshev: ACK fa1904e5f0d164fbcf41398f9ebbaafe82c28419 naumenkogs: utACK fa1904e Tree-SHA512: bfa553d5efa022727ed17877fb7c08c14849d804fe6d6a7ce172d513857beba35de41ea40b27ff1aedf68b81e2cda7b2a948ac985fcaaf1b6cfb96cce4837c90
2020-06-19Merge #19322: [net] split PushInventory()fanquake
f52d403b81e758e9bc33847560b5740b22d95fff [net] split PushInventory() (John Newbery) Pull request description: PushInventory() is currently called with a CInv object, which can be a MSG_TX or MSG_BLOCK. PushInventory() only uses the type to determine whether to add the hash to setInventoryTxToSend or vInventoryBlockToSend. Since the caller always knows what type of inventory they're pushing, the CInv is wastefully constructed and thrown away, and tx/block relay is being split out, we split the function into PushTxInventory() and PushBlockInventory(). ACKs for top commit: amitiuttarwar: utACK f52d403b81. nice cleanup, this has bothered me :) naumenkogs: utACK f52d403 sipa: utACK f52d403b81e758e9bc33847560b5740b22d95fff Tree-SHA512: 331495199a3b1a2620e6a62beb336e494291b725d8fd64bb44726c02e80807f3974ff4f329bb0f059088e65cd7d41eff276c1065806d2dd6e72c5a9f368e82cd
2020-06-18FillPSBT: report number of inputs signed (or would sign)Glenn Willen
In FillPSBT, optionally report the number of inputs we successfully signed, as an out parameter. If "sign" is false, instead report the number of inputs for which GetSigningProvider does not return nullptr. (This is a potentially overbroad estimate of inputs we could sign.)
2020-06-18Improve TransactionErrorString messages.Glenn Willen