Commit Graph

21562 Commits

Author SHA1 Message Date
MarcoFalke
ed0f1bd976
Merge #18170: doc: Minor grammatical changes and flow improvements
7ba962276e3e540a15eb0bdbbaaa101958229bd4 doc: Minor grammatical changes and flow improvements (Travin Keith)

Pull request description:

  **Grammar:**

  Line 49: There shouldn't be a period at the end of a phrase.

  Lines 56, 57, 116, 137, and 177: Adding necessary commas

  Lines 103 and 136: Run-on sentence issues fixed.

  Line 176: Fixed punctuation and added necessary conjunction

  Line 178: Singular noun when it should be plural

  **Flow:**

  Line 49: Adding "for" makes it more natural.

  Line 54: Though it's not grammatically incorrect to end a sentence with a preposition in an informal document such as this, the word "followed" is much easier to understand anyway, especially for those who don't have English as their native language.

Top commit has no ACKs.

Tree-SHA512: 17fdb5fc6146e025f160e860dbcbdbfa07b7608b8cb611c3b9d4ed91c426100ef772915251bc1f6bacb3a62df57b72c2003fb72cb2c8542454638545985313da
2022-04-07 07:22:28 +05:30
fanquake
311a64408d
Merge #18382: doc: note the costs of fetching all pull requests
d695eb4c2164fc8777dc014e1a30c014cf04982a doc: note the costs of fetching all pull requests (Vasil Dimov)

Pull request description:

  Also mention that it is possible to fetch just one pull request.

ACKs for top commit:
  MarcoFalke:
    ACK d695eb4c2164fc8777dc014e1a30c014cf04982a
  fanquake:
    ACK d695eb4c2164fc8777dc014e1a30c014cf04982a

Tree-SHA512: afe080fd018b2e773fb974956937e819085831bf0c1c5623f7f12c728639906b80666b785234058ee39fd98115a53a2fad431c54ee0840667e60bb317e4a828d
2022-04-07 07:22:27 +05:30
MarcoFalke
58f232325a
Merge #16947: doc: Doxygen-friendly script/descriptor.h comments
15ac916642f20918f66e32729bb6b0b674e3bc24 doc: Doxygen-friendly descriptor.h comments (Jon Layton)

Pull request description:

  Closes #16942.

  - Make `Descriptor` overview subtext of `Interface for parsed descriptor objects.`
  - Conform to `@param[in, out] argname: Info` in parameter comments. Present in code: feb162d500/src/net_processing.cpp (L1001)
  - Remove redundant argument type, `in` vs `out` mentions
  - Removed unnecessary backticks around `IsSolvable()`, since Doxygen builds a link to the known function's docs
  - Add backticks to refer to `argname`s

  `descriptor.cpp` has more documentation, but Doxygen's output doesn't include anything inside unnamed namespaces for some reason. Tried to access them via searchbar.

Top commit has no ACKs.

Tree-SHA512: 587cc7596de46358a08b0321a7cf08a08785945715dbdce8945d837e1bee0664d1e11b1e47b7be85c4f35262f7ea173fb1f6202efcacc2023e2c6b0bd44133b3
2022-04-07 07:22:21 +05:30
fanquake
27727c7541
Merge #17316: refactor: Replace all uses of boost::optional with our own Optional type
d314e8a818d4c162b1c7201533e6b600dcab2d91 refactor: Replace all uses of boost::optional with our own Optional type (Wladimir J. van der Laan)

Pull request description:

  Replace all uses of boost::optional with our own Optional type. Luckily, there aren't so many.

  After this:

  - `boost::optional` is no longer used directly (only through `Optional` which is an alias for it)
  - `boost/optional.hpp` is only included in one place

ACKs for top commit:
  MarcoFalke:
    ACK d314e8a818d4c162b1c7201533e6b600dcab2d91
  practicalswift:
    ACK d314e8a818d4c162b1c7201533e6b600dcab2d91 -- diff looks correct + satisfying to see incremental progress towards the goal of a Boost free future :)
  jtimon:
    ACK d314e8a818d4c162b1c7201533e6b600dcab2d91
  fanquake:
    ACK d314e8a818d4c162b1c7201533e6b600dcab2d91

Tree-SHA512: b43e0017af81b07b5851377cd09624f114510ac5b9018d037664b58ad0fc8e893e30946b61f8f5e21e39125925bf9998a81f2226b468aab2df653ee57ed3213d
2022-04-07 07:22:08 +05:30
Odysseas Gabrielides
6313374bbd
Show penalty score in masternode rpc (#4751)
* Show penalty score in masternode rpc

* Added documentation
2022-04-06 16:50:21 -05:00
Kittywhiskers Van Gogh
3412cefb4f merge bitcoin#16366: Use InitError for all errors in bitcoind/qt 2022-04-06 13:51:39 +05:30
Kittywhiskers Van Gogh
c8530f57d6 merge bitcoin#16620: Move ResolveErrMsg to util/error 2022-04-06 13:51:39 +05:30
Kittywhiskers Van Gogh
9427becdb1 merge bitcoin#17280: Change occurences of c_str() used with size() to data() 2022-04-06 13:51:39 +05:30
Kittywhiskers Van Gogh
8b11e135f7 merge bitcoin#17279: Remove redundant c_str() calls in formatting 2022-04-06 13:51:39 +05:30
Kittywhiskers Van Gogh
2222a003e1 merge bitcoin#17070: Avoid showing GUI popups on RPC errors 2022-04-06 13:51:35 +05:30
Kittywhiskers Van Gogh
0f90ea72d3 merge bitcoin#15450: Create wallet menu option 2022-04-06 13:49:58 +05:30
fanquake
e711f02684 Merge bitcoin/bitcoin#21890: fuzz: Limit ParseISO8601DateTime fuzzing to 32-bit
fa1aa6c571f406a2c40282664487aca4aff9dc9d fuzz: Limit ParseISO8601DateTime fuzzing to 32-bit (MarcoFalke)

Pull request description:

  2038 is more than 10 years in the future, so no need for us to waste time fuzzing a 3rd party lib that will be EOL by then.

  Hopefully fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=34092

ACKs for top commit:
  theStack:
    Concept and code review ACK fa1aa6c571f406a2c40282664487aca4aff9dc9d

Tree-SHA512: fdd2fbc7b5c7ce33ad23b2e5431bb97eaf6ae8c2d2a55990a3ab73be79282c584b704dcd1471ba288de75283732970c70c9a03ddad059b97b66ba8b3de39effe
2022-04-05 23:10:05 -05:00
W. J. van der Laan
6525ca37a7 Merge bitcoin/bitcoin#21709: doc: update reduce-memory.md and bitcoin.conf -maxconnections info
300234ab6698277fb261a87be72f89ef94d3697a doc: update bitcoin.conf maxconnections info (Jon Atack)
926827065ffa56b75e9261f63d49b924d4bced0f doc: update reduce-memory.md peer connections info (Jon Atack)

Pull request description:

  This patch updates the documentation in `doc/reduce-memory.md` and `share/examples/bitcoin.conf` regarding the peer connections limits and `-maxconnections`

ACKs for top commit:
  jarolrod:
    re-ACK 300234ab6698277fb261a87be72f89ef94d3697a
  laanwj:
    ACK 300234ab6698277fb261a87be72f89ef94d3697a
  prayank23:
    ACK 300234ab66

Tree-SHA512: 90f53626124afb50706e6a3b644bc7bb800bb7cf41ae7062c20c17b3d9bdf4a8d73b4cf188faec9113d772596f7e4bc36a4a69481cacb92cc55d5956181d0c31
2022-04-05 23:10:05 -05:00
fanquake
3b76f34edc Merge #21243: ci: Avoid invoking curl on the host
fa330d8fed5a02349440be170af3b443c1321b4b ci: Avoid invoking curl on the host (MarcoFalke)

Pull request description:

  The only requirement for the ci system are the programs `docker.io` and `bash`. However, the mac cross build invokes `curl` on the host. Fix that.

  Before:

  ```
  $ FILE_ENV="./ci/test/00_setup_env_mac.sh" ./ci/test_run_all.sh
  ...
  ./ci/test/05_before_script.sh: line 22: curl: command not found
  ```

  After:

  ```
  ... (command passes)

ACKs for top commit:
  promag:
    ACK fa330d8fed5a02349440be170af3b443c1321b4b.

Tree-SHA512: 49120fd671a48a6599dd6c34f6d3502a6e9f84b4476061cab06f55cba374d8188f53b9b41363e90f5fafb0074767b581f30bd2545c0b6934580a7eccfa1ef5c4
2022-04-05 23:10:05 -05:00
MarcoFalke
353dc403f5 Merge #21080: fuzz: Configure check for main function (take 2)
fac4be30482c21ac330e09ef8756c49e37faa6fa fuzz: Configure check for main function (take 2) (MarcoFalke)

Pull request description:

  Actually fix https://github.com/google/honggfuzz/issues/336#issuecomment-702972138

  Follow-up to #20065

  Steps to test: `honggfuzz` section in doc/fuzzing.md

ACKs for top commit:
  practicalswift:
    cr ACK fac4be30482c21ac330e09ef8756c49e37faa6fa: patch looks correct!

Tree-SHA512: 893768c80439fe5d90b883ade89dc02f5bb80e27637916cf5575b6a9ed0b1c04942ff851342f5bbabb8666e6696715427feeb98f5301ad23c7b87b09e5872f97
2022-04-05 23:10:05 -05:00
Odysseas Gabrielides
d7bf68d02d
Override of nPowTargetSpacing (devnet only) (#4750)
* Override of nPowTargetSpacing (devnet only)

* Pass by copy
2022-04-06 00:50:13 +03:00
PastaPastaPasta
3c0ffa5c73
refactor: fixup changes related to PR#4713 (#4747) 2022-04-06 00:39:13 +03:00
Kittywhiskers Van Gogh
6fbedf7740 merge bitcoin#16399: Improve wallet creation 2022-04-06 00:08:01 +05:30
Kittywhiskers Van Gogh
a0bf4338a1 merge bitcoin#16244: Move wallet creation out of the createwallet rpc into its own function 2022-04-06 00:08:01 +05:30
Kittywhiskers Van Gogh
c25b668125 merge bitcoin#16362: Add bilingual_str type 2022-04-06 00:08:01 +05:30
fanquake
0b090daac2 Merge bitcoin/bitcoin#23594: build: don't set PORT=no in config.site
05cdceb19dcc21822fe39a987ce43fe54bdc8634 build: don't set PORT=no in config.site (fanquake)

Pull request description:

  This should have been a part of dropping macports support in #15175.

ACKs for top commit:
  hebasto:
    ACK 05cdceb19dcc21822fe39a987ce43fe54bdc8634, I have reviewed the code and it looks OK, I agree it can be merged.

Tree-SHA512: 278b2f308e55aad5524530e654ac08462714676b71e01d31e5f152f69e02f916afc553510ac8352ed0bb0184f7fdb2ee7038ab5ac2de6923f366829859e0b6ee
2022-04-03 18:48:15 -05:00
fanquake
c841e6e66f Merge bitcoin/bitcoin#23598: contrib: Specify wb mode when creating mac sdk
655d52a0cd6b3df738dc9843e25a95b8930b4628 contrib: Specify wb mode when creating mac sdk (João Barbosa)

Pull request description:

  Fix the warning:
  ```
  ./contrib/macdeploy/gen-sdk:84: FutureWarning: GzipFile was opened for writing, but this will change in future Python releases.  Specify the mode argument for opening it for writing.
  ```

ACKs for top commit:
  fanquake:
    Tested ACK 655d52a0cd6b3df738dc9843e25a95b8930b4628 with Python 3.10.

Tree-SHA512: 095cd301f211531a8b8f50e7915fe13c7ab0b278fb23dc50a03625cfae9e2fd7a0d8c315fced4af3011552e3e455ce562b7f717a0ed096c4433ddcf24f22b2c9
2022-04-03 18:48:15 -05:00
MarcoFalke
d8c975ebc1 Merge bitcoin/bitcoin#23153: Add an argparse abbreviated mode to --failfast
2198f79e87b3a8bfcda59e51225ab4cb789ccc53 Add an argparse abbreviated mode to --failfast (katesalazar)

Pull request description:

  Happy Hacktoberfest, Bitcoin!

  (this PR doesn't really pursue Hacktoberfest)

ACKs for top commit:
  theStack:
    Tested ACK 2198f79e87b3a8bfcda59e51225ab4cb789ccc53

Tree-SHA512: 9b21b2044107685514dc298b52850206faed7306a714c007f500733b632f3f8e0e64e4785313a0c305e5908ccfc87ad27cda7554ea11630acfeaf658956eeab8
2022-04-03 18:46:47 -05:00
W. J. van der Laan
a02ea7ec07 Merge bitcoin/bitcoin#23414: wallet: Fix comment grammar in bdb.h
bd9c6ade46c8c29bea3fd5df62a35efadb77ac89 wallet: Fixed Grammatical error in bdb.h (zealsham)

Pull request description:

  A comment in bdb.h file in the wallet directory contains a grammatical error that makes the underlying code harder to reason about .
  The comment which says `/** Indicate the a new database user has began using the database. */` should actually be
  `/** indicate that a new database user has began using the database. */`. The former is quite confusing , and leaves you wondering what "the a new database user " is refering to . This pull request thus provides value to the bitcoin codebase by improving readability .

Top commit has no ACKs.

Tree-SHA512: db07cda39f89ac344be3497c884a8c6e4b48276afae18e931a9a8e5732c58eed20645ccd18d6b1212c763f64b1300477c1de26a00b5b3b24e6141ffae3658ca7
2022-04-03 18:46:47 -05:00
fanquake
8bcfec2167 Merge bitcoin/bitcoin#23466: doc: Suggest keys.openpgp.org as keyserver in SECURITY.md
90f1f849e9f5a0c1855b72824af38b9aa24d5287 doc: Suggest `keys.openpgp.org` as keyserver in SECURITY.md (Tim Ruffing)

Pull request description:

  `--recv-keys` without a `--keyserver` arg simply failed for me on a fresh Arch Linux installation, so I think it's a good idea to suggest a keyserver. OpenPGP ecosystem is broken in a number of ways, so the right way to approach this issue has some potential for bikeshedding. But the only thing that this PR does is to keep `SECURITY.md` in line with the instructions for builder keys, where there was agreement on switching to `keys.openpgp.org` (#22688).

ACKs for top commit:
  MarcoFalke:
    review ACK 90f1f849e9f5a0c1855b72824af38b9aa24d5287
  laanwj:
    Review ACK 90f1f849e9f5a0c1855b72824af38b9aa24d5287
  hebasto:
    ACK 90f1f849e9f5a0c1855b72824af38b9aa24d5287, agree with arguments above.
  Zero-1729:
    ACK 90f1f849e9f5a0c1855b72824af38b9aa24d5287

Tree-SHA512: 1ab20c837cd952aa32b57473772cbfd33411a08db6e88b951bce38f76a3c509c0e91d6944ec0ca5eac8d5eb4d98a5489276d55691328f2e2556b2640f8e7c108
2022-04-03 18:46:47 -05:00
MarcoFalke
694264427f Merge bitcoin/bitcoin#23335: refactor: include a missing <limits> header in fs.cpp
077a875d94b51e3c87381133657be98989c8643e refactor: include a missing <limits> header in fs.cpp (Joan Karadimov)

Pull request description:

  I get this compilation error on versions `0.21.1` and `22.0`:

  ```
  fs.cpp: In member function 'bool fsbridge::FileLock::TryLock()':
  fs.cpp:123:89: error: 'numeric_limits' is not a member of 'std'
    123 |     if (!LockFileEx(hFile, LOCKFILE_EXCLUSIVE_LOCK | LOCKFILE_FAIL_IMMEDIATELY, 0, std::numeric_limits<DWORD>::max(), std::numeric_limits<DWORD>::max(), &overlapped)) {
        |                                                                                         ^~~~~~~~~~~~~~
  fs.cpp:123:109: error: expected primary-expression before '>' token
    123 |     if (!LockFileEx(hFile, LOCKFILE_EXCLUSIVE_LOCK | LOCKFILE_FAIL_IMMEDIATELY, 0, std::numeric_limits<DWORD>::max(), std::numeric_limits<DWORD>::max(), &overlapped)) {
        |                                                                                                             ^
  fs.cpp:123:112: error: '::max' has not been declared; did you mean 'std::max'?
    123 |     if (!LockFileEx(hFile, LOCKFILE_EXCLUSIVE_LOCK | LOCKFILE_FAIL_IMMEDIATELY, 0, std::numeric_limits<DWORD>::max(), std::numeric_limits<DWORD>::max(), &overlapped)) {
        |                                                                                                                ^~~
        |                                                                                                                std::max
  In file included from C:/dev/msys64/mingw64/include/c++/11.2.0/bits/char_traits.h:39,
                   from C:/dev/msys64/mingw64/include/c++/11.2.0/string:40,
                   from ./fs.h:9,
                   from fs.cpp:5:
  C:/dev/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h:300:5: note: 'std::max' declared here
    300 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
        |     ^~~
  fs.cpp:123:124: error: 'numeric_limits' is not a member of 'std'
    123 |     if (!LockFileEx(hFile, LOCKFILE_EXCLUSIVE_LOCK | LOCKFILE_FAIL_IMMEDIATELY, 0, std::numeric_limits<DWORD>::max(), std::numeric_limits<DWORD>::max(), &overlapped)) {
        |                                                                                                                            ^~~~~~~~~~~~~~
  fs.cpp:123:144: error: expected primary-expression before '>' token
    123 |     if (!LockFileEx(hFile, LOCKFILE_EXCLUSIVE_LOCK | LOCKFILE_FAIL_IMMEDIATELY, 0, std::numeric_limits<DWORD>::max(), std::numeric_limits<DWORD>::max(), &overlapped)) {
        |                                                                                                                                                ^
  fs.cpp:123:147: error: '::max' has not been declared; did you mean 'std::max'?
    123 |     if (!LockFileEx(hFile, LOCKFILE_EXCLUSIVE_LOCK | LOCKFILE_FAIL_IMMEDIATELY, 0, std::numeric_limits<DWORD>::max(), std::numeric_limits<DWORD>::max(), &overlapped)) {
        |                                                                                                                                                   ^~~
        |                                                                                                                                                   std::max
  In file included from C:/dev/msys64/mingw64/include/c++/11.2.0/bits/char_traits.h:39,
                   from C:/dev/msys64/mingw64/include/c++/11.2.0/string:40,
                   from ./fs.h:9,
                   from fs.cpp:5:
  C:/dev/msys64/mingw64/include/c++/11.2.0/bits/stl_algobase.h:300:5: note: 'std::max' declared here
    300 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
        |     ^~~
  ```

  It appears that `std::numeric_limits<T>::max` is used without the `limits` header being included. Probably on other STL implementations it's included transitively, but not in the one in MinGW. Including it fixes the compilation problem.

  Environment:
  OS: Windows 10
  Compiler: gcc 11.2.0
  Qt: 5.15.2 (included in msys2)
  Using the latest mingw w64 shipped with msys2.

ACKs for top commit:
  fanquake:
    ACK 077a875d94b51e3c87381133657be98989c8643e - Thanks.
  hebasto:
    ACK 077a875d94b51e3c87381133657be98989c8643e

Tree-SHA512: 2289cb72fa3a28470f4250833be66079482d1392189b1e4679330dad109a8ae67b1d6d51cb635dbc1947c00c6c4cfbc4d7c9ae02269b932cfa1475583adaf73d
2022-04-03 18:46:47 -05:00
MarcoFalke
62ec84d21a Merge bitcoin/bitcoin#23331: test: Replace log with assert_equal in wallet_abandonconflict
fa6c62f34b50818102ad58f2ffd152189f54d973 test: Replace log with assert_equal in wallet_abandonconflict (MarcoFalke)

Pull request description:

  This will make the test fail as soon as the bug is fixed, forcing it to
  be updated. Otherwise, the bug might be fixed (or made worse)
  accidentally, leaving the test in an inconsistent state.

ACKs for top commit:
  theStack:
    Concept and code-review ACK fa6c62f34b50818102ad58f2ffd152189f54d973
  brunoerg:
    tACK fa6c62f34b50818102ad58f2ffd152189f54d973

Tree-SHA512: 416f72380164bf3f93332a5cfa81a8e61d8ada3714ef6815889ed3cf2d16c09411760dee4acf19629227e565b765b3dea491a0b23efd38eb370254cfadf7c441
2022-04-03 18:46:47 -05:00
fanquake
dd3739543d Merge bitcoin/bitcoin#23282: build: remove build stubs for external leveldb
17ae2601c786e6863cee1bd62297d79521219295 build: remove build stubs for external leveldb (Cory Fields)

Pull request description:

  Presumably these stubs indicate to packagers that external leveldb is meant to be supported in some way. It is not. Remove the stubs to avoid sending any mixed messages.

  For context, this was reported on IRC:

  > \<Talkless> bitcoind fails to start with undefined symbol: _ZTIN7leveldb6LoggerE in Debian Sid after leveldb upgraded from 1.22 to 1.23: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=996486

ACKs for top commit:
  fanquake:
    ACK 17ae2601c786e6863cee1bd62297d79521219295
  hebasto:
    ACK 17ae2601c786e6863cee1bd62297d79521219295. I have reviewed the code and it looks OK, I agree it can be merged.

Tree-SHA512: 2f1ac2cb30dac64791933a245a2b66ce237bde3955e6f4a6b7ec181248f77a9b1b10597d865d3e2c2b6def696af70de40e905ec274e4ae7cccd1daf461473957
2022-04-03 18:46:47 -05:00
fanquake
d70909a14a Merge bitcoin/bitcoin#23080: test: check abandoned tx in listsinceblock
bda620aecd690004c52e550ad7de187ce0eb655d test: check abandoned tx in listsinceblock (brunoerg)

Pull request description:

  This PR tests if the abandoned transaction is correct in listsinceblock return (wallet_abandonconflict.py).

ACKs for top commit:
  jonatack:
    ACK bda620aecd690004c52e550ad7de187ce0eb655d
  theStack:
    ACK bda620aecd690004c52e550ad7de187ce0eb655d
  stratospher:
    Tested ACK bda620a. This PR verifies whether the transaction txAB1 has been abandoned in listsinceblock and is a nice addition to the test!

Tree-SHA512: e4dce344cf621de7a8b5bd8660d252419772a293080fc881f6f448b6df85c6b1c8f0df619e855a40b6393f53c836f0d7fadbd3916c20cccd3a95830b8b502991
2022-04-03 18:41:33 -05:00
fanquake
87caa91a99 Merge bitcoin/bitcoin#22409: configure: keep relative paths in debug info
0bc666b053b8f4883c3f5de43959e2bbd91b95c5 doc: add info for debugging with relative paths (S3RK)
a8b515c317f0b5560f62c72a8f4eb6560d8f1c75 configure: keep relative paths in debug info (S3RK)

Pull request description:

  This is a follow-up for #20353 that fixes #21885

  It also adds a small section to assist debugging without absolute paths in debug info.

ACKs for top commit:
  kallewoof:
    Tested ACK 0bc666b053b8f4883c3f5de43959e2bbd91b95c5
  Zero-1729:
    Light crACK 0bc666b053b8f4883c3f5de43959e2bbd91b95c5

Tree-SHA512: d4b75183c3d3a0f59fe786841fb230581de87f6fe04cf7224e4b89c520d45513ba729d4ad8c0e62dd1dbaaa7a25741f04d036bc047f92842e76c9cc31ea47fb2
2022-04-03 18:41:33 -05:00
MarcoFalke
bcb9cb546c Merge bitcoin/bitcoin#23146: Test transactions conflicted by double spend in listtransactions
502f50da12694dd0193744427f0f89238e612f54 Test transactions conflicted by double spend in listtransactions (Jon Atack)

Pull request description:

  Test the properties of transactions conflicted by a double spend as returned by RPC listtransactions in the abandoned, confirmations, trusted and walletconflicts fields. These fields are also returned by RPCs listsinceblock and gettransactions.

ACKs for top commit:
  brunoerg:
    tACK 502f50da12694dd0193744427f0f89238e612f54
  rajarshimaitra:
    Concept + tACK 502f50da12

Tree-SHA512: 28968f4a5f1960ea45b2e6f5b20fe25c1b51f66944062dcddea52ea970ad21c74d583793d091b84e8a5e506d6aecc1f0435c5b918213975b22c38e02bba19aa1
2022-04-03 18:41:33 -05:00
MarcoFalke
f40055446b Merge bitcoin/bitcoin#21930: doc: update enumerator naming in developer notes
77f37f58ad2f349cecb2eda28b415267d3d7d76e doc: update enum naming in developer notes (Jon Atack)

Pull request description:

  Per our current doc, the general rule is we follow the C++ Core Guidelines, which for enumerator naming stipulate:

  https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Renum-caps
  ```
  Don’t use ALL_CAPS for enumerators
  Reason: Avoid clashes with macros.
  ```

  but our examples (and often, codebase) are contradictory to it (and perhaps to common usage), which can be confusing when a contributor needs to choose a style to use. This patch:

  - updates the enumerator examples to snake_case per CPP Core Guidelines
  - clarifies for contributors that in this project enumerators may be snake_case, PascalCase or ALL_CAPS, and to use what seems appropriate.

ACKs for top commit:
  practicalswift:
    cr ACK 77f37f58ad2f349cecb2eda28b415267d3d7d76e
  ryanofsky:
    ACK 77f37f58ad2f349cecb2eda28b415267d3d7d76e. I think this is good because it modernizes the example and clarifies current conventions.
  promag:
    ACK 77f37f58ad2f349cecb2eda28b415267d3d7d76e.

Tree-SHA512: 7facc607fe5e1abab0f635864340143f13c2e4bb074eb17eac7d829dcd0cf244c5c617fc49d35e8774e8af1fa1205eeebe0cca81f538a2a61f6a7ba200878bc6
2022-04-03 18:41:05 -05:00
MarcoFalke
c2c35795c5 Merge #20740: fuzz: Update FuzzedDataProvider.h from upstream (LLVM)
e3d2ba7c70b13a2165020e45abf02373a1e953f7 fuzz: Update FuzzedDataProvider.h from upstream (LLVM) (practicalswift)

Pull request description:

  Update `FuzzedDataProvider.h` from upstream (LLVM).

  Upstream revision: 6d0488f75b/compiler-rt/include/fuzzer/FuzzedDataProvider.h

  Changes since last update:
  * [[compiler-rt] FuzzedDataProvider: add ConsumeData and method.](20a604d3f5)
  * [[compiler-rt] Fix a typo in a comment in FuzzedDataProvider.h.](5517d3b80b)
  * [[compiler-rt] Add ConsumeRandomLengthString() version without arguments.](2136d17d8d)
  * [[compiler-rt] Refactor FuzzedDataProvider for better readability.](1262db1b6a)
  * [[compiler-rt] FuzzedDataProvider: make linter happy.](1e65209e04)
  * [[compiler-rt] Mark FDP non-template methods inline to avoid ODR violations.](6d0488f75b)

ACKs for top commit:
  MarcoFalke:
    ACK e3d2ba7c70b13a2165020e45abf02373a1e953f7 🌛

Tree-SHA512: 62cb27906f08fd07983f4a8fbbd381c12ed185617a58f1ebc8564c87e638086f952417f4f6481fbd91b9a313aff00e944215393734566c219c074512991f8057
2022-04-03 18:09:30 -05:00
MarcoFalke
c4567ce9d4 Merge #20065: fuzz: Configure check for main function
fae7a1c18803675e70b9bf66575e1e0a6e01f6f6 fuzz: Configure check for main function (MarcoFalke)

Pull request description:

  Instead of the PP jungle, use a proper configure check

  Fixes https://github.com/google/honggfuzz/issues/336#issuecomment-702972138

ACKs for top commit:
  practicalswift:
    ACK fae7a1c18803675e70b9bf66575e1e0a6e01f6f6

Tree-SHA512: 2e55457d01f9ac598bb1e119d8b49dca55a28f88ec164cee6b5f071c29e9791f5a46cc8ee2b801b3a3faf906348da964ce32e7254da981c1104b9210a3508100
2022-04-03 18:09:19 -05:00
fanquake
ca5cb456dd Merge #18649: tests: Add std::locale::global to list of locale dependent functions in lint-locale-dependence.sh
54b5eb2b149a1f2a4a1dbdb9e0648c5a390d8e22 tests: Add std::locale::global to list of locale dependent functions in lint-locale-dependence.sh (practicalswift)

Pull request description:

  Add `std::locale::global` to list of locale dependent functions in `lint-locale-dependence.sh`.

  We currently flag `setlocale(...)` as locale dependent, but prior to this commit we didn't flag
  `std::locale::global(...)` as such.

  In addition to setting the global C++ locale `std::locale::global(...)` also does the equivalent of `std::setlocale(LC_ALL, ...);`.

  Thus the functionality of `std::locale::global(...)` is a superset of `setlocale(...)` :)

ACKs for top commit:
  MarcoFalke:
    ACK 54b5eb2b149a1f2a4a1dbdb9e0648c5a390d8e22, fine with me

Tree-SHA512: bcf2f1c765add6ed09c3debca968b75eeea81602503f109c0f76ec98635911d453f4834a39e741703c3d470f123178e8952191a9b1a3429394b99c07765dcf1f
2022-04-03 18:09:07 -05:00
Wladimir J. van der Laan
a61b615218 Merge #19367: doc: Span pitfalls
fab57e2b9bc4577fcfcd9fbddbc35d96046c5d88 doc: Mention Span in developer-notes.md (Pieter Wuille)
3502a60418858a8281ddf2f9cd59daa8f01d2fa8 doc: Document Span pitfalls (Pieter Wuille)

Pull request description:

  This is an attempt to document pitfalls with the use of `Span`, following up on comments like https://github.com/bitcoin/bitcoin/pull/18468#issuecomment-622846597 and https://github.com/bitcoin/bitcoin/pull/18468#discussion_r442998211

ACKs for top commit:
  laanwj:
    ACK fab57e2b9bc4577fcfcd9fbddbc35d96046c5d88

Tree-SHA512: 8f6f277d6d88921852334853c2b7ced97e83d3222ce40c9fe12dfef508945f26269b90ae091439ebffddf03f939797cb28126b2387f77959069ef8909c25ab53
2022-04-03 18:09:07 -05:00
MarcoFalke
50d20fe788 Merge #19366: tests: Provide main(...) function in fuzzer. Allow building 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
2022-04-03 18:09:07 -05:00
MarcoFalke
bd85d875f3 Merge #18798: ci: Fix default retry script usage
45615de26caa4c8ffeacc558143aaf6887cbb314 ci: Fix default retry script usage (Hennadii Stepanov)

Pull request description:

  On master (5352d14b3796d9e672a20ada8f7613a70fe448f4) `CI_RETRY_EXE=${CI_RETRY_EXE:retry}` works as a [Substring Expansion](https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html), and that is wrong.
  If `CI_RETRY_EXE` variable was unset initially, its new value becomes an empty string, but not "retry" as one could expect. Consequently, the `${CI_RETRY_EXE} ...` command does _not_ use `ci/retry/retry` script.

  This PR makes for `CI_RETRY_EXE` variable a usual parameter expansion, i.e., `${parameter:-word}`.

  Reference: https://github.com/bitcoin/bitcoin/pull/18735#issuecomment-620095489

Top commit has no ACKs.

Tree-SHA512: 108173f6b2677979b9ddf2f9b9df4a6c56f5efa81c36543a1816bb3b984e42984bf3c83fe413ea3a5ca1e2317c4efb02fea7180a6b44863af7cfe6202e9cf94d
2022-04-03 18:08:59 -05:00
MarcoFalke
27a96eedb1 Merge #18508: RPC: Fix more formatting nits
f32ab443a98e622afa601372454310aef1f380be Bugfix: RPC: JSON null is not "None" (Luke Dashjr)
26dcf3958187cbdc9ffc9438a5eebfcaf607f7e9 Bugfix: RPC: Don't use a continuation elipsis after an elision elipsis (Luke Dashjr)
eca65caadcddf43b2dace111bd7e4b0a2a9556c2 Bugfix: RPC: Add missing commas and correct indentation of explicit ELISION (Luke Dashjr)

Pull request description:

  1. listsinceblock had a double ellipsis (elision + continuation); this looks ugly, just one is needed.
  2. Elision ellipsis wasn't getting a comma, so was truncated to `".."` by comma-removal code.
  3. Elision ellipsis was indented incorrectly (as if it was a subitem).
  4. Similarly, type "none" would get truncated to `"Non"`, when it should really be `"null"` anyway.

ACKs for top commit:
  MarcoFalke:
    ACK f32ab443a98e622afa601372454310aef1f380be 🐰

Tree-SHA512: 34e1c72673790ed11cdee838d64ea5e0ac498de19258df99d54b5322e003060123c65ad27ac2fd4729a1dfe52066a0629602a132b1ef85d4154affd99a065a3f
2022-04-03 18:08:53 -05:00
MarcoFalke
68cecee558 Merge #18464: doc: block-relay-only vs blocksonly
fa6e01f2a163511a735088895ab02232b150801b doc: block-relay-only is not blocksonly (MarcoFalke)

Pull request description:

  Those are different concepts, see https://github.com/bitcoin/bitcoin/blob/master/doc/release-notes/release-notes-0.19.0.1.md#p2p-changes for the block-relay-only nodes.

ACKs for top commit:
  jonatack:
    ACK fa6e01f
  hebasto:
    ACK fa6e01f2a163511a735088895ab02232b150801b

Tree-SHA512: 6de2c81201b62ed59e504a3a6f164068600182e1bbf63eda7f9db3160507bdba091c13882ee0e75e713f0832bfaf5973a86eba3b94588d5b72196f05ae0a9c9a
2022-04-03 18:08:53 -05:00
MarcoFalke
2388159c5b Merge #18109: tests: Avoid hitting some known minor tinyformat issues when fuzzing strprintf(...)
470e2ac602ed2d6e62e5c80f27cd0a60c7cf6bce tests: Avoid hitting some known minor tinyformat issues when fuzzing strprintf(...) (practicalswift)

Pull request description:

  Avoid hitting some known minor tinyformat issues when fuzzing `strprintf(...)`. These can be removed when the issues have been resolved upstreams :)

  Note to reviewers: The `%c` and `%*` issues are also present for `%<some junk>c` and `%<some junk>*`. That is why simply matching on `"%c"` or `"%*"` is not enough. Note that the intentionally trivial skipping logic overshoots somewhat (`c[…]%` is filtered in addition to `%[…]c`).

Top commit has no ACKs.

Tree-SHA512: 2b002981e8b3f2ee021c3013f1260654ac7e158699313849c9e9660462bb8cd521544935799bb8daa74925959dc04d63440e647495e0b008cfe1b8a8b2202d40
2022-04-03 18:08:50 -05:00
fanquake
0e898ee80d Merge #18008: test: only declare a main() when fuzzing with AFL
b35567fe0ba3e6f8d8f9525088eb8ee62065ad01 test: only declare a main() when fuzzing with AFL (fanquake)

Pull request description:

  This fixes fuzzing using [libFuzzer](https://llvm.org/docs/LibFuzzer.html) on macOS, which caused a few issues during the recent review club. macOS users could only fuzz using afl, or inside a VM.

  It seems that the `__attribute__((weak))` marking is not quite enough to properly mark `main()` as weak on macOS. See Apples docs on [Frameworks and Weak Linking](https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPFrameworks/Concepts/WeakLinking.html#//apple_ref/doc/uid/20002378-107262-CJBJAEID).

  Have tested fuzzing using libFuzzer and AFL with this patch.

ACKs for top commit:
  MarcoFalke:
    ACK b35567fe0ba3e6f8d8f9525088eb8ee62065ad01
  fjahr:
    ACK b35567f

Tree-SHA512: b881fdd98c7e1587fcf44debd31f5e7a52df938059ab91c41d0785077b3329b793e051a2bf2eee64488b9f6029d9288c911052ec23ab3ab8c0561a2be1682dae
2022-04-03 18:08:47 -05:00
MarcoFalke
3f4b5f9fa1 Merge #17591: ci: Add big endian platform - s390x
da1f153e5e260f1744ee1bf4f24ca3a74ffea465 Add s390x tests to travis (Elichai Turkel)
2fa65e0de94f01d502e8ace89be3c5dc963dd764 Add ci script to install on s390x (Elichai Turkel)

Pull request description:

  Discovered this as part of #17402 and a conversation with gmaxwell.

  You can see here that the platform is indeed BE: https://travis-ci.org/elichai/bitcoin/jobs/616656410#L36

  This closes https://github.com/bitcoin/bitcoin/issues/6466

ACKs for top commit:
  MarcoFalke:
    ACK da1f153e5e260f1744ee1bf4f24ca3a74ffea465

Tree-SHA512: e7e94e54e220257d91b24fddc79eab2bcaaadf0b2d1e7e6872d9757808ab2541728f00b1f3ab7e343305c0e7d91bb48a17a3f9621f6fff6c9fe6cde6682de408
2022-04-03 18:08:43 -05:00
MarcoFalke
baecb5f73d Merge #17503: doc: Remove bitness from bitcoin-qt help message and manpage
e161bc74d24a381c313aecb950d3b8411e0ed19d doc: Remove bitness from bitcoin-qt help message and manpage (Wladimir J. van der Laan)

Pull request description:

  Remove the `(64-bit)` from the bitcoin-qt help message.

  Since removing the Windows 32-bit builds, it is no longer information that is often useful for troubleshooting. This never worked for other architectures than x86, and the only 32-bit x86 build left is the Linux one. Linux users tend to know what architecture they are using.

  It also accidentally ends up in the bitcoin-qt manpage (if you happen to be generating them on a x86 machine), which gets checked in. See for example 1bc9988993 (diff-e4b84be382c8ea33b83203ceb8c85296)

ACKs for top commit:
  practicalswift:
    ACK e161bc74d24a381c313aecb950d3b8411e0ed19d -- rationale makes sense and diff looks correct :)
  MarcoFalke:
    Tested ACK e161bc74d24a381c313aecb950d3b8411e0ed19d 🔮

Tree-SHA512: d38754903252896dc86fac6c12ad6615d322c2744db7c02b18574a08c69e8876b2c905e1f09b324002236b111ee93479f89769c562e7b3b2e6eb2992d76464ef
2022-04-03 18:08:42 -05:00
MarcoFalke
8f5d07ec82 Merge #17284: build: update retry to current version
58d0393bec7680933702b76cd3f1d1e33030ed16 build: update retry to current version (randymcmillann)

Pull request description:

  This commit eliminates spelling and white space
  errors that are flagged in the linting process

ACKs for top commit:
  practicalswift:
    ACK 58d0393bec7680933702b76cd3f1d1e33030ed16

Tree-SHA512: c241ed0775026c890dd29d1f7231c5540e9c9285867a99844605753a3007d08f0bd4f7a59f078e4c65b741301ff7fa8a871e2e3c64b9a9fe47b3ea74c4228498
2022-04-03 18:08:40 -05:00
PastaPastaPasta
e84bf45cef
Merge pull request #4744 from vijaydasmp/bp2003
Merge #17119,1683,17102,17134,17691,17992,18170,18382,16975,18472, 18486,17633,7833
2022-04-03 17:44:16 -05:00
PastaPastaPasta
279686f9ba
Merge pull request #4742 from vijaydasmp/bp2002
Merge #17154,16569,17351,13716,17084,18391,16821,17140
2022-04-03 17:33:44 -05:00
Vijay Manikpuri
77e84287e9
Merge #16226: Move ismine to the wallet module (#4640)
e61de6306fd89fe9aae90253062e7b1b20343f8a Change ismine to take a CWallet instead of CKeyStore (Andrew Chow)
7c611e20007bf5face34d33dffa26c8db67e29ec Move ismine to wallet module (Andrew Chow)

Pull request description:

  `IsMine` isn't used outside of the wallet except for the tests. It also doesn't make sense to be outside of the wallet. This PR moves `IsMine` into the wallet module and for it to take a `CWallet` instead of `CKeyStore`. The test that used `IsMine` is also moved to the wallet tests.

  This is first [prerequisites](https://github.com/bitcoin-core/bitcoin-devwiki/wiki/Wallet-Class-Structure-Changes#ismine) for the wallet structure changes.

ACKs for commit e61de6:
  MarcoFalke:
    re-ACK e61de6306f (only change is rebase with git auto-merge)
  meshcollider:
    Very light code review ACK e61de6306f

Tree-SHA512: 1cb4ad12652aef7922ab7460c6d413e8b9d1855dca78c0a286ae49d5c0765bc7996c55f262c742001d434eb9bd4215dc2cc7aae1b371ee1a82d46b32c17e6341

Co-authored-by: MeshCollider <dobsonsa68@gmail.com>
2022-04-03 17:26:52 -05:00
strophy
1fddc53f53
ci: build on-demand docker images for testing on devnets (#4667)
* ci: build alpha action

* ci: use self-hosted runner

* ci: build faster

* ci: multicore dash build

* chore: copy build, dockerize and push

* chore: dockerize build

* chore: remove unnecessary cachedir and checkout steps

* chore: disable qemu

* chore: remove buildx steps now included in AMI

* chore: move binaries in to place for second stage copy

* fix: runner using incorrect build driver

* chore: debug builder info

* chore: more detailed debug

* chore: install qemu and buildx in actions

* fix: indentation

* fix: remove debug code

* feat: multi-arch cross-compiling dockerfile

* chore: remove unnecessary docker layers

* chore: add debug output

* chore: dump context

* fix: use event inputs tag for docker_meta

* chore: dump context again

* fix: context reference syntax

* feat: attempt to use gitian builder

* chore: ff changes from other branches

* chore: disable macOS build

* Revert "chore: ff changes from other branches"

This reverts commit daece1c505.

* chore: restore GHA changes to fix incorrect merge

* chore: remove duplicate code

* chore: bump buildx version to latest

* chore: try to build without signing

* chore: setup tmate to find build

* chore: run tmate on failure

* fix: invalid path to binaries on copy

* chore: remove unnecessary GPG steps

* chore: replace strophy with dashpay

* fix: gha cache not providing speedup

* Update .github/workflows/release_alpha.yml

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2022-04-03 17:24:06 -05:00
MarcoFalke
106dedb2fd
Merge #17140: test: Fix bug in blockfilter_index_tests
f59bbb61af5055844c16939a4f8e58c4f73843c1 test: Fix bug in blockfilter_index_tests. (Jim Posen)

Pull request description:

  The test case tests a chain reorganization, however the two chains were generated in the same manner and thus produced the same blocks.

  This issue was [pointed out](https://github.com/bitcoin/bitcoin/pull/14121#discussion_r334282663) by MarcoFalke.

ACKs for top commit:
  MarcoFalke:
    Thanks! ACK f59bbb61af5055844c16939a4f8e58c4f73843c1 (looked at the diff on GitHub, didn't compile, nor run tests)

Tree-SHA512: a2f063ae9312051ffc2a3fcc1116a6a8ac09beeef261bc40aa3ff7270ff4de22a790eb19fec6b15ba1eb46e78f1f317bfd91472d8581b95bb9441a56b102554e
2022-04-03 13:04:44 +05:30