Commit Graph

19301 Commits

Author SHA1 Message Date
MarcoFalke
5c44138f18
Merge #13165: doc: Mention good first issue list in CONTRIBUTING.md
a508091c59 doc: Mention good first issue list in CONTRIBUTING.md (fanquake)

Pull request description:

Tree-SHA512: a954cda62d6dc8ab78809565be392a1c9f55c543e8d5c1a5a8588c0062e1a11bd4968991646e4aa5bd9b9761b1765fde4ceab8fea7a973148122ff249d728b92
2021-05-25 14:09:36 +03:00
Wladimir J. van der Laan
dcd6c1df3c
Merge #12639: Reduce cs_main lock in listunspent
a59dac3 refactor: Avoid extra lookups of mapAddressBook in listunspent RPC (João Barbosa)
d76962e rpc: Reduce cs_main lock in listunspent (João Barbosa)

Pull request description:

  On my system, where the wallet has 10000 unspents, the `cs_main` lock duration changed from 191ms to 36ms. The loop that generates the response takes around 155ms. So, the lock duration is reduced to around 20%.

Tree-SHA512: ddaae591f39da59a9d1a8e9ffe773d857687789476f566ca273d310ad531da6dacff80cac69f3334c601c251ac7c5ed4136656c725aa3d611c6bbf734111946e
2021-05-25 14:09:36 +03:00
Wladimir J. van der Laan
a03d649a48
Merge #13148: logging: Fix potential use-after-free in LogPrintStr(...)
0bd4cd3 logging: remove unused return value from LogPrintStr (practicalswift)
76f344d logging: Fix potential use-after-free in LogPrintStr(...) (practicalswift)

Pull request description:

  Fix potential use-after-free in `LogPrintStr(...)`.

  `freopen(…)` frees `m_fileout`.

Tree-SHA512: ceee1f659c10a21525aa648377afeea0a37016339f5269dea54850ba3b475aa316f4931081655717b65f981598fdc9d79a1e79e55f7084c242eeb7bf372bc4b6
2021-05-25 14:09:36 +03:00
Wladimir J. van der Laan
6423395e2e
Merge #12928: qt: Initialize non-static class members that were previously neither initialized where defined nor in constructor
3fdc5fe Make sure initialization occurs in the constructor (practicalswift)
1e7813e Remove redundant initializations from the constructor (practicalswift)
f131872 Initialize non-static class members where they are defined (practicalswift)
73bc1b7 Initialize editStatus and autoCompleter. Previously not initialized where defined or in constructor. (practicalswift)

Pull request description:

  Initialize variables previously neither defined where defined nor in constructor:
  * `editStatus`
  * `autoCompleter`

  Also; initialize non-static class members where they are defined in accordance with developer notes.

Tree-SHA512: 84f0cb87ec8394ed7641bfa0731be2ec72e6a920e00ae206ff89e2e7c960358f603c52878311b24601a33aa7cba6ea4f9a78a8ade88112dea0f41efb08e84e25
2021-05-25 14:09:35 +03:00
MarcoFalke
f1ec546b35
Merge #13136: [tests] Fix flake8 warnings in several wallet functional tests
a533834d50 [tests] Fix flake8 warnings in several wallet functional tests (John Newbery)

Pull request description:

  Fixes flake8 warnings in several wallet functional tests.

  Several wallet functional tests need rewrite to remove the accounts API (#13075). To prepare for that, I fixed all the flake8 warnings in those tests.

  #13075 is blocked on a bitcoind bug. This PR is just the flake8 fixes so we're not completely blocked.

Tree-SHA512: 2dc1d589b2f8f4318083a681e487532d0f8f3d57e8bc8f37b660b728ffc33329b88e9251eb223104aea89f293c3f4074ca700fe690e645617326b859da3e93c3
2021-05-25 14:09:35 +03:00
Pieter Wuille
671f1f8943
Merge #12954: util: Refactor logging code into a global object
8c2d695c4a util: Store debug log file path in BCLog::Logger member. (Jim Posen)
8e7b961388 scripted-diff: Rename BCLog::Logger member variables. (Jim Posen)
1eac317f25 util: Refactor GetLogCategory. (Jim Posen)
3316a9ebb6 util: Encapsulate logCategories within BCLog::Logger. (Jim Posen)
6a6d764ca5 util: Move debug file management functions into Logger. (Jim Posen)
f55f4fcf05 util: Establish global logger object. (Jim Posen)

Pull request description:

  This is purely a refactor with no behavior changes.

  This creates a new class `BCLog::Logger` to encapsulate all global logging configuration and state.

Tree-SHA512: b34811f54a53b7375d7b6f84925453c6f2419d21179379ee28b3843d0f4ff8e22020de84a5e783453ea927e9074e32de8ecd05a6fa50d7bb05502001aaed8e53
2021-05-25 14:09:35 +03:00
Wladimir J. van der Laan
9a6855a050
Merge #13109: [rpc] nit: fix typo for entry description string
f7c414d nit: fix typo for entry description string (mryandao)

Pull request description:

  #12240

Tree-SHA512: 2940c383069912b04d6fdbc1f0834970cae8ed725beb606916ee27501d8f6e1b3938647babb26137440166de3a9ac745048e306696d13817775eb406adb31f4a
2021-05-25 14:09:35 +03:00
Wladimir J. van der Laan
eac133cea4
Merge #13031: Fix for utiltime to compile with msvc.
abd58a2 Fix for utiltime to compile with msvc. (Aaron Clauson)

Pull request description:

  This PR allows utiltime.cpp to compile with msvc after the changes introduced in #12973.

Tree-SHA512: 7233b1c23400bf19aef2fcb6168009ef58b9e7f8e49c46d8cf9d04394091f370e39496d24ca00b294c4164bcfc04514e329bf6bb05169406c34ce7cd8c382565
2021-05-25 14:03:12 +03:00
Pieter Wuille
7ff6515c88
Merge #13033: Build txindex in parallel with validation
9b2704777c [doc] Include txindex changes in the release notes. (Jim Posen)
ed77dd6b30 [test] Simple unit test for TxIndex. (Jim Posen)
6d772a3d44 [rpc] Public interfaces to GetTransaction block until synced. (Jim Posen)
a03f804f2a [index] Move disk IO logic from GetTransaction to TxIndex::FindTx. (Jim Posen)
e0a3b80033 [validation] Replace tx index code in validation code with TxIndex. (Jim Posen)
8181db88f6 [init] Initialize and start TxIndex in init code. (Jim Posen)
f90c3a62f5 [index] TxIndex method to wait until caught up. (Jim Posen)
70d510d93c [index] Allow TxIndex sync thread to be interrupted. (Jim Posen)
94b4f8bbb9 [index] TxIndex initial sync thread. (Jim Posen)
34d68bf3a3 [index] Create new TxIndex class. (Jim Posen)
c88bcec93f [db] Migration for txindex data to new, separate database. (Jim Posen)
0cb8303241 [db] Create separate database for txindex. (Jim Posen)

Pull request description:

  I'm re-opening #11857 as a new pull request because the last one stopped loading for people

  -------------------------------

  This refactors the tx index code to be in it's own class and get built concurrently with validation code. The main benefit is decoupling and moving the txindex into a separate DB. The primary motivation is to lay the groundwork for other indexers that might be desired (such as the [compact filters](https://github.com/bitcoin/bips/pull/636)). The basic idea is that the TxIndex spins up its own thread, which first syncs the txindex to the current block index, then once in sync the BlockConnected ValidationInterface hook writes new blocks.

  ### DB changes

  At the suggestion of some other developers, the txindex has been split out into a separate database. A data migration runs at startup on any nodes with a legacy txindex. Currently the migration blocks node initialization until complete.

  ### Open questions

  - Should the migration of txindex data from the old DB to the new DB block in init or should it happen in a background thread? The downside to backgrounding it is that `getrawtransaction` would return an error message saying the txindex is syncing while the migration is running.

  ### Impact

  In a sample size n=1 test where I synced nodes from scratch, the average time [Index writing](https://github.com/bitcoin/bitcoin/blob/master/src/validation.cpp#L1903) was 3.36ms in master and 1.72ms in this branch. The average time between `UpdateTip` log lines for sequential blocks between 400,000 and IBD end on mainnet was 0.297204s in master and 0.286134s in this branch. Most likely this is just variance in IBD times, but I can try with some more trials if people want.

Tree-SHA512: 451fd7d95df89dfafceaa723cdf0f7b137615b531cf5c5035cfb54e9ccc2026cec5ac85edbcf71b7f4e2f102e36e9202b8b3a667e1504a9e1a9976ab1f0079c4
2021-05-25 13:48:04 +03:00
PastaPastaPasta
9310daca98
Merge pull request #4173 from UdjinM6/backports-0.17-pr29
Backports 0.17 pr29
2021-05-24 21:13:09 -05:00
dustinface
fb23e53fdd
depends: Undefine BLSALLOC_SODIUM in bls-dash.mk (#4176) 2021-05-24 21:09:48 -05:00
PastaPastaPasta
f7676c802d
Merge pull request #4177 from UdjinM6/bp14416
Merge #14416: Fix OSX dmg issue (10.12 to 10.14)
2021-05-24 20:22:46 -05:00
UdjinM6
64815896f4
80%+: ar, bg, de, es, fr, it, ja, ko, nl, pl, pt, ro, sk, th, tr, vi, zh_CN, zh_TW (#4169) 2021-05-25 00:45:15 +02:00
UdjinM6
77a892e2ec
rpc: Fix upgradetohd help text (#4170) 2021-05-25 00:43:09 +02:00
Wladimir J. van der Laan
afad6f1931
Merge #14416: Fix OSX dmg issue (10.12 to 10.14)
43719e0a3411e6a08e04908332cb44adfa00c6a2 [macOS] Remove DS_Store WindowBounds bytes object (Jonas Schnelli)

Pull request description:

  This seems to fix the macOS 10.12+ DMG issue in conjunction with Gitian on Bionic

Tree-SHA512: 3cdad7aaebed2eb320015e2053954444b28802a60505225d7f6affdd83c523de8738ecb53a48ba8c30266315716e3782c681208e6e547e94adcac39797139247
2021-05-25 01:05:41 +03:00
UdjinM6
9da75e49b9
qt: Add QFont::Normal as a supported font weight when no other font weights were found (#4175) 2021-05-24 19:15:20 +03:00
UdjinM6
7d44272ca3
instantsend: Actually relay islock inv when a tx is received later (#4167)
Extends 19145eba58 idea
2021-05-24 19:15:03 +03:00
UdjinM6
4c23b612f6
Merge pull request #4165 from UdjinM6/merge_master_0.17.0.2
Merge master 0.17.0.2 back into develop
2021-05-24 19:14:37 +03:00
PastaPastaPasta
41a8349d4d
Merge pull request #4166 from kittywhiskers/encodespan
Merge #19628, #19687: change CNetAddr::ip to have flexible size
2021-05-23 12:26:33 -05:00
Kittywhiskers Van Gogh
065cc46b91 Merge #19687: make EncodeBase{32,64} consume Spans 2021-05-23 10:38:05 +05:30
Kittywhiskers Van Gogh
337c15ae25 Merge #19628: change CNetAddr::ip to have flexible size 2021-05-23 10:38:01 +05:30
Wladimir J. van der Laan
dddd5c7f06
Merge #12830: [qt] [tests] Clarify address book error messages, add tests
5109fc4 [tests] [qt] Add tests for address book manipulation via EditAddressDialog (James O'Beirne)
9c01be1 [tests] [qt] Introduce qt/test/util with a generalized ConfirmMessage (James O'Beirne)
8cdcaee [qt] Display more helpful message when adding a send address has failed (James O'Beirne)
c5b2770 Add purpose arg to Wallet::getAddress (James O'Beirne)

Pull request description:

  Addresses https://github.com/bitcoin/bitcoin/issues/12796.

  When a user attempts to add to the address book a sending address which is already present as a receiving address, they're presented with a confusing error indicating the address is already present in the book, despite the fact that this row is currently invisible.

  ![selection_011](https://user-images.githubusercontent.com/73197/38096704-8a2948d2-3341-11e8-9632-7d563201f28c.jpg)

  This change adds a more specific error message indicating its existence as a receiving address (as discussed in the linked issue).

  ![selection_016](https://user-images.githubusercontent.com/73197/38198467-fa26164e-365a-11e8-8fc5-ddab9caf2fbd.jpg)

  This change also adds some tests exercising use of the address book via QT. Adding so much test code for such a trivial change may seem weird, but it's my hope that this will make further test-writing for address book usage (and other QT features) more approachable.

Tree-SHA512: fbdd5564f7a9a2380bbe437f3378e8d4d5fd9201efff4879b72bc23f2cc1c2eecaf2b811994c25070ee052422e48e47901787c2e62cc584774a997fe6a2a327a
2021-05-23 01:24:26 +03:00
Wladimir J. van der Laan
4aca43e24a
Merge #12909: wallet: Make fee settings to be non-static members
fac0db0 wallet: Make fee settings non-static members (MarcoFalke)

Pull request description:

  The wallet header defined some globals (they were called "settings"), that should be class members instead.

  This commit is hopefully only refactoring, apart from a multiwallet bugfix: Calling the rpc `settxfee` for one wallet, would set (and change) the fee rate for all loaded wallets. (See added test case)

Tree-SHA512: 4ab6ec2f5c714742396ded5e451ec3b1ceb771e3696492de29889d866de4365b3fbe4a2784d085c8b8bd11b1ebb8a1fec99ab2c62eee716791cfc67c0cf29e1b
2021-05-23 01:19:33 +03:00
MarcoFalke
716d0cd696
Merge #13047: [trivial] Tidy blocktools.py
4d355bfb2b [tests] tidy up blocktools.py (John Newbery)
cab8be5adf [tests] Fix flake8 warnings in blocktools.py (John Newbery)
b184127db2 [doc][trivial] no retargeting in regtest mode (Jesse Cohen)

Pull request description:

  Tidies up the blocktools.py module:

  - fixes flake8 warnings
  - changes function-level comments to docstrings.

  Takes in @skeees's commit b184127db2

Tree-SHA512: 0f4c59ac8ccc9057492ec1996381e73380d65e85240f2ba9607174c0743d3a1853c4ed35a9e1bc704b2b6d6d823ac77aa7e81bd150cf5033de79293c24b791b0
2021-05-23 01:19:33 +03:00
MarcoFalke
add77dd7b1
Merge #12917: qa: Windows fixups for functional tests
fab9095d40 qa: Windows fixups for functional tests (MarcoFalke)

Pull request description:

  Just two minor fixups to have less errors when the tests run on native windows.
  * Strip whitespace from lines when reading from a notification file
  * Instead of clumsily creating a file with weird permissions, just create a folder for the same effect in `mempool_persist.py`

Tree-SHA512: 48a8b439f14ab9b44c5cd228cd03105e8613e703e3c2951cdf724931bc95172a9ad9bfe69fc23e73dd91b058c1352263c0ac6e8de2ceb0ebf804c8ff52bba394
2021-05-23 01:19:32 +03:00
Wladimir J. van der Laan
e0eea2db3c
Merge #12856: Tests: Add Metaclass for BitcoinTestFramework
c9cce0a Tests: Add Metaclass for BitcoinTestFramework (Will Ayd)

Pull request description:

  BitcoinTestFramework instructs developers in its docstring to override
  `set_test_params` and `run_test` in subclasses while being sure NOT to
  override `__init__` and `main` . This change adds a metaclass to ensure
  that developers adhere to that protocol, raising a ``TypeError`` in
  instances where they have not.

  closes #12835

Tree-SHA512: 5a47a7ead1f18361138cad4374747c4a8f29d25506f7b2c2a8c1c966a0b65e5ccf7317f9a078df8680fdab5d3fb71fee46a159c9f381878a3683c1e9f874abbe
2021-05-23 01:19:32 +03:00
Wladimir J. van der Laan
546c263eab
Merge #12860: Add testmempoolaccept to release-notes, Add missing const
fafcad3 doc: Add testmempoolaccept to release-notes (MarcoFalke)

Pull request description:

  Some fixups for #11742:

  * Add release notes for the new rpc
  * Fix a typo in the original pull
  * Make the mempool reference passed to `CheckInputsFromMempoolAndCache` const, since that function is called before we return from ATMP and we must not modify the mempool.

Tree-SHA512: 72c459ba69f7698a69c91d2592f10f7fb1864846c7d8c525050d48286f92ba5ec5fe554c54235b52fbd9a8f00226c526ad84584641ec39084e1a1310a261510d
2021-05-23 01:19:32 +03:00
Wladimir J. van der Laan
213e509f30
Merge #12766: [Tests] Tidy up REST interface functional tests
55efc1f [tests] simplify binary and hex response parsing in interface_rest.py (Roman Zeyde)
ade5964 [tests] only use 2 nodes in interface_rest.py (John Newbery)
ad00fbe [tests] refactor interface_rest.py to avoid code repetition (John Newbery)
7a3181a [tests] Make json request building more consistent in interface_rest.py (John Newbery)
3fd4490 [tests] improve logging and documentation in interface_rest.py (John Newbery)
abf190e [tests] fix flake8 warnings in interface_rest.py test (John Newbery)

Pull request description:

  Following the comment at https://github.com/bitcoin/bitcoin/pull/12717#pullrequestreview-106189117.

Tree-SHA512: b55560f0d8f3069584f5a2398285483a0a23514b2b2bd2c1ced2db1cb30dc24f60f720d0fa4de30259f7918d3178d94680ae9321649544d1d04d687a2e672559
2021-05-23 01:19:32 +03:00
MarcoFalke
778d749e16
Merge #12853: qa: Match full plain text by default
faace13868 qa: Match full plain text by default (MarcoFalke)

Pull request description:

  Instead of escaping all full plain text error strings, just compare their strings by default.

Tree-SHA512: 42e28f55105eb947ac6af6ce4056f0ec0f701d85f1c2a38b35ab777bbdf2296bdb79639c345621b8adc03a98b28c7630ded9a67b8b04a48e2c3a49d598ecdcd7
2021-05-23 01:19:32 +03:00
MarcoFalke
376457d129
Merge #12846: [moveonly] Extract HelpRequested to dry up the help options testing
b386970d07 [moveonly] Extract HelpRequested to dry up the help options testing (Ben Woosley)

Pull request description:

  This ensures consistency across interfaces and makes the version handling more clear.

Tree-SHA512: d3f46d34dae6cf98902b0bbb279ada65c3215a25f69e5ff98b88e68f37a6b027ded265d15c12303998e31b390aa30fdb689455c61c983ab4b7527cbce8f4ec61
2021-05-23 01:19:32 +03:00
MarcoFalke
31e0fb550f
Merge #14819: Bugfix: test/functional/mempool_accept: Ensure oversize transaction is actually oversize
29aeed1734 Bugfix: test/functional/mempool_accept: Ensure oversize transaction is actually oversize (Luke Dashjr)

Pull request description:

  Simply integer dividing results in an acceptable size if the limit isn't an exact multiple of the input size.
  Use math.ceil to ensure the transaction is always oversize.

  (This issue can be triggered by changing the address style used.)

Tree-SHA512: e45062b0e8a3e9cb08e9dac5275b68d86e4377b460f1b3b995944090a055b0542a6986826312ec0e223369838094e42e20d8614b5c2bab9975b9a6f749295b21
2021-05-23 01:19:32 +03:00
Wladimir J. van der Laan
50607de7b2
Merge #11742: rpc: Add testmempoolaccept
b55555d rpc: Add testmempoolaccept (MarcoFalke)

Pull request description:

  To check if a single raw transaction makes it into the current transaction pool, one had to call `sendrawtransaction`. However, on success, this adds the transaction to the mempool with no easy way to undo.

  The call `testmempoolaccept` is introduced to provide a way to solely check the result without changing the mempool state.

Tree-SHA512: 5afd9311190135cee8fc1f229c7d39bf893f1028f29e28d34f70df820198ff97b4bf86b41cbbd6e6c36a5c30073cefa92d541c74a4939c7a2a6fa283dfd41b63
2021-05-23 01:19:31 +03:00
PastaPastaPasta
b76e7fec1f
Merge pull request #4164 from kittywhiskers/auxprs
Merge #19660, #19373, #19841, #13862, #13866, #17280, #17682 and partial #19326, #14978: Auxiliary Backports
2021-05-21 14:25:27 -05:00
Kittywhiskers Van Gogh
170551bb94 Merge #17682: Update tinyformat to upstream 2021-05-20 10:15:17 +05:30
Kittywhiskers Van Gogh
6a73b70131 Merge #17280: Change occurences of c_str() used with size() to data() 2021-05-20 10:15:17 +05:30
Kittywhiskers Van Gogh
abffb58b5e Merge #13866: Use _wfopen and _wfreopen on Windows 2021-05-20 10:15:17 +05:30
Kittywhiskers Van Gogh
96eaef33ee Merge #13862: drop boost::interprocess::file_lock 2021-05-20 10:15:17 +05:30
Kittywhiskers Van Gogh
e3443643f3 Partial #14978: Factor out PSBT utilities from RPCs for use in GUI code; related refactoring
Only contains 162ffefd2f562169725559906601c25c579aa91c
2021-05-20 10:15:17 +05:30
Kittywhiskers Van Gogh
41eaee235e Merge #19841: Implement Keccak and SHA3_256 2021-05-20 10:15:17 +05:30
Kittywhiskers Van Gogh
56f1b2d01c Partial #19326: Simplify hash.h interface using Spans 2021-05-20 10:15:17 +05:30
Kittywhiskers Van Gogh
01272b159d Merge #19373: Replace HexStr(o.begin(), o.end()) with HexStr(o) 2021-05-20 10:15:17 +05:30
Kittywhiskers Van Gogh
bc2f11f230 Partial #19660: Make HexStr take a span
Comment from 6f7b52ac63a71d2706022ca58d69a1a622e0fa37: "The fix for CPubKey is a part of `#13557: BIP 174 PSBT Serializations and RPCs` which wasn't backported yet"
2021-05-20 10:15:17 +05:30
PastaPastaPasta
2f555f87d1
Merge pull request #4028 from kittywhiskers/asmap
merge #17812, #16702, #16730, #18023: supplying and using asmap to improve IP bucketing in addrman
2021-05-19 18:18:44 -05:00
UdjinM6
8cfd2fc514
Merge branch 'master' into merge_master_0.17.0.2 2021-05-20 00:08:34 +03:00
Kittywhiskers Van Gogh
f3819c4eef Merge #18023: Fix some asmap issues 2021-05-20 00:05:12 +05:30
Kittywhiskers Van Gogh
401098283e Merge #17812: asmap feature refinements and functional tests 2021-05-20 00:05:12 +05:30
Kittywhiskers Van Gogh
4b2b5f78d4 Merge #16702: supplying and using asmap to improve IP bucketing 2021-05-20 00:05:09 +05:30
UdjinM6
79a1b1aa47
Merge pull request #4163 from xdustinface/backport-bls-1.1.0
[v0.17.x] Backport #4162 and bump to v0.17.0.2
2021-05-19 05:00:56 +03:00
xdustinface
139b87f865 doc: Update man page 2021-05-19 03:39:35 +02:00
xdustinface
17b7ab1b63 Bump version to 0.17.0.2 2021-05-19 03:39:35 +02:00