Commit Graph

19877 Commits

Author SHA1 Message Date
UdjinM6
0dc8cbc780
Merge pull request #4265 from PastaPastaPasta/auto-label-conflicting
actions: automatically add a "needs rebase" label and comment as relevant
2021-07-17 01:50:35 +03:00
pasta
c13f9ae6ab Ensure pemissions are restrictive 2021-07-16 17:43:32 -05:00
pasta
c79561335a actions: automatically add a "needs rebase" label and comment as relevant 2021-07-16 17:43:32 -05:00
UdjinM6
88da87d202
Merge pull request #4262 from PastaPastaPasta/backport-triv-pr17
Backport triv pr17
2021-07-16 20:30:46 +03:00
UdjinM6
0c2b1be930
Merge pull request #4261 from PastaPastaPasta/backport-triv-pr16
Backport triv pr16
2021-07-16 20:20:26 +03:00
UdjinM6
47317e8fd0
Merge pull request #4254 from UdjinM6/fix_permitsigdata
Merge #14356: fix converttopsbt permitsigdata arg, add basic test
2021-07-16 20:16:33 +03:00
UdjinM6
730a89f8ed
Merge pull request #4246 from kittywhiskers/deboostification
merge bitcoin#13671, #17405, #18786, #18792, #20067: Deboostification
2021-07-16 20:16:04 +03:00
fanquake
9dc2ed4208 Merge #20353: configure: Support -fdebug-prefix-map and -fmacro-prefix-map
7abac98d3e3c1bc8ad66cb5c05184b9c5cc674d5 configure: Support -f{debug,macro}-prefix-map (Anthony Towns)

Pull request description:

  When bitcoin is checked out in two directories (eg via git worktree) object files between the two will differ due to the full path being included in the debug section. `-fdebug-prefix-map` is used to replace this with "." to avoid this unnecessary difference and allow ccache to share objects between worktrees (provided the source and compile options are the same).

  Also provide `-fmacro-prefix-map` if supported so that the working dir is not encoded in `__FILE__` macros.

ACKs for top commit:
  practicalswift:
    cr ACK 7abac98d3e3c1bc8ad66cb5c05184b9c5cc674d5: patch looks correct
  fanquake:
    ACK 7abac98d3e3c1bc8ad66cb5c05184b9c5cc674d5

Tree-SHA512: b6a37c1728ec3b2e552f244da0e66db113c1e7662c7ac502e12ff466f3dbfbfefae12695ca135137c50dbb1c4c5d84059116c0cd09b391a17466dc77b8726679
2021-07-16 10:04:09 -05:00
W. J. van der Laan
44060e39a0 Merge #21615: script: Add trusted key for hebasto
55d85834ccd73aa2f93cf9a81523cb747973346e script: Add trusted key for hebasto (Hennadii Stepanov)

Pull request description:

  It is assumed that my responsibility will be limited to the [GUI repo](https://github.com/bitcoin-core/gui).

ACKs for top commit:
  laanwj:
    ACK 55d85834ccd73aa2f93cf9a81523cb747973346e
  MarcoFalke:
    matches the key I have locally ACK 55d85834ccd73aa2f93cf9a81523cb747973346e 🍪
  jarolrod:
    ACK 55d85834ccd73aa2f93cf9a81523cb747973346e 🥃

Tree-SHA512: 256d03e108c9a14e251340ac6e91234d076778cb6bd551439182176207051f4efc55d396754867e5a7191c8c698610f92016668e163037c67dde56f4136026b8
2021-07-16 10:04:09 -05:00
fanquake
499fb6c18b Merge #21633: refactor: add [[noreturn]] attribute where applicable
003929c0d55532038d5bf6fc0ff4a20628710fae refactor: add [[noreturn]] attribute where applicable (fanquake)

Pull request description:

  Similar to #10843. We could build with `-Wmissing-noreturn`, however that would also mean modifying something like `--suppress-external-warnings` to suppress warnings for leveldb, which I don't think we want to do. In any case, the functions where this is applicable are only added/removed very rarely.

ACKs for top commit:
  vasild:
    ACK 003929c0d55532038d5bf6fc0ff4a20628710fae

Tree-SHA512: 33dfa6547d6b84f38a941f24d4c2effe8fde7b93dbc0b27a9309716420e4a879fdbe689d789fa5439d65f5f78292f89fd9dc1b61c97acf69316dfed954086705
2021-07-16 10:04:09 -05:00
fanquake
dcadc441aa Merge #21300: script: Add explanatory comment to tc.sh
3a0446fad470595db09929695ff02debe12bd4cd script: Add explanatory comment to tc.sh (dscotese)

Pull request description:

  This is a replacement for #21289

  tc.sh is used to limit bandwidth. I ran it and it is limiting my bandwidth. When I ran it, I got one error. I have not found an explanation anywhere of what the error means, but my best guess is consistent with the result, so I propose the explanatory comment to save others time when they use it and also get the error.

ACKs for top commit:
  laanwj:
    that said, LGTM ACK 3a0446fad470595db09929695ff02debe12bd4cd

Tree-SHA512: 5403a2a0fec3724625c20402a96334c3c7a620324a930c5fd828017da8911d2867aecb7a2ad94a23d1f189009d3eb197a67eb59c8e4531fd215d9b1edb600440
2021-07-16 10:04:09 -05:00
MarcoFalke
a5c84be618 Merge bitcoin-core/gui#254: refactor: Drop redundant setEditTriggers(NoEditTriggers) calls
257f55c119c2c63245f3a84a9cd8f7aaeaf2d129 qt, refactor: Drop redundant setEditTriggers(NoEditTriggers) calls (Hennadii Stepanov)

Pull request description:

  The models of the both views have no `Qt::ItemIsEditable` flag:
  3c87dbe95c/src/qt/peertablemodel.cpp (L218-L224)
  3c87dbe95c/src/qt/bantablemodel.cpp (L148-L154)

ACKs for top commit:
  Talkless:
    utACK 257f55c119c2c63245f3a84a9cd8f7aaeaf2d129, seems reasonable.
  jarolrod:
    ACK 257f55c119c2c63245f3a84a9cd8f7aaeaf2d129, looks correct.

Tree-SHA512: 4356e4d785055935fba452488a5d97ed95995def97b26ab18af43a545835f9e9d4c347e4cad7952aa725179cf6e775a2208c48730feebf40e3b1a7ba5f402af0
2021-07-16 10:04:09 -05:00
fanquake
9c8db95941 Merge #20734: build: Make platform-specific targets available for proper platform builds only
3d31abbaaad599443ec5ffee90ddb6989a625277 build: Make Windows-specific targets available for Windows builds only (Hennadii Stepanov)
92990e25b7e5d02651ffa27f2d57c4c2c190668e build: Make macOS-specific targets available for macOS builds only (Hennadii Stepanov)

Pull request description:

  On master (f1dbf92ff0475a01d20170ea422c1d086acbbc57) it is possible to point `make` to macOS and Windows specific targets even the build system is configured to build for Linux platforms:
  ```
  $ make Bitcoin-Core.dmg
  ...
  $ make bitcoin-21.99.0-win64-setup
  ...
  ```

  Such behavior makes no sense, and it is confused. Fixed in this PR.

ACKs for top commit:
  fanquake:
    ACK 3d31abbaaad599443ec5ffee90ddb6989a625277 - tested that nonsensical targets are no longer available. i.e

Tree-SHA512: bbd8450bf98fbccb0b828df2f753ed0dbbd203defa2f58ce21390ee2ea183c95d8ff585d62d52be870dbf0158e2bb0fbd47eda026b80174ee6fd617473f5ac03
2021-07-16 10:04:09 -05:00
MarcoFalke
e07e289e0a Merge #21111: Improve OpenRC initscript
95f97111dd27f32dfcb461c9dd6890aa8d1355ed contrib/init: (OpenRC) quote some unquoted variables. (parazyd)
737feadff7c026412039774de0d10931fe0c5bcc contrib/init: (OpenRC) Do not fail if both rpcuser and rpcpassword are unset. (parazyd)

Pull request description:

  This pull request improves the available OpenRC initscripts in
  `contrib/init`.

  The first commit (737feadff7c026412039774de0d10931fe0c5bcc) reworks
  `checkconfig()` to not fail if **both** `rpcuser` and `rpcpassword`
  are unset, because this implies that bitcoind shall use the `.cookie`
  file for RPC authentication. Currently, the initscript does not allow
  starting bitcoind without a set `rpcuser` and `rpcpassword`.

  The second commit (95f97111dd27f32dfcb461c9dd6890aa8d1355ed) simply
  quotes some unquoted variables.

ACKs for top commit:
  kristapsk:
    ACK 95f97111dd27f32dfcb461c9dd6890aa8d1355ed

Tree-SHA512: 62bebcd07143c147e349c0cfc17b54ef21bd4684377b444f58c6bd1f509a4d3e1af58746fa7215f18e33021f691bbbc5e42f4df497458322b055e545b7f30d46
2021-07-16 10:04:09 -05:00
Wladimir J. van der Laan
a9c314feba Merge #21123: code style: Add EditorConfig file
7a135d57b2ac17477b25d5046a3bec57eac3ab30 Add EditorConfig file. (Kiminuo)

Pull request description:

  ### Motivation

  Developers are supposed to follow [Coding style](https://github.com/bitcoin/bitcoin/blob/master/doc/developer-notes.md#coding-style-general). However, [from time to time](https://github.com/bitcoin/bitcoin/pull/21075#discussion_r570125634) a PR is created and then its author is asked to change tabs to spaces, for example.

  Introducing an `.editorconfig` file can mitigate these formatting issues.

  ### User story

  A contributor wants to create a new PR. She clones Bitcoin Core repo, opens her editor, the editor loads `.editorconfig` rules and writes her patch with correct formatting rules. Less Coding Style issues is then discovered in the PR review process and thus less CI runs are needed.

  ### What is EditorConfig file?

  https://editorconfig.org provides very well and concise explanation:

  > What is EditorConfig?

  > EditorConfig helps maintain consistent coding styles for multiple developers working on the same project across various editors and IDEs. The EditorConfig project consists of a file format for defining coding styles and a collection of text editor plugins that enable editors to read the file format and adhere to defined styles. EditorConfig files are easily readable and they work nicely with version control systems.

  ### Support

  `.editorconfig` is supported by many IDEs and text editors. Sometimes, the support is out of the box and sometimes a plugin is needed. However, for example, VS Code detects `.editorconfig` presence and automatically offers you to install the missing plugin.

  See https://editorconfig.org/#pre-installed for details on support. To name a few:

  * Visual Studio (out of the box)
  * VS Code (plugin)
  * JetBrains IDEs (IntelliJ IDEA, PyCharm, etc.) (out of the box)
  * Sublime Text (plugin)
  * Emacs (plugin)
  * Vim (plugin)

  Not supported (AFAIK):

  * [mcedit](https://github.com/MidnightCommander/mc)

  ### My editor does not support `.editorconfig`

  Then nothing really changes for you.

  ### `.editorconfig` vs `.clang-format`

  As explained [here](https://devblogs.microsoft.com/cppblog/clangformat-support-in-visual-studio-2017-15-7-preview-1/):

  > Note that Visual Studio also supports EditorConfig, which works in a similar way. ClangFormat, however, has a [much larger variety of style options](https://clang.llvm.org/docs/ClangFormatStyleOptions.html) than EditorConfig, including some very C++ specific rules that can be set, and it is already used by C++ developers today.

  Having both `.editorconfig` and `.clang-format` in a project, may not always work correctly though, I think. As some editors may have a plugin for `.editorconfig` and a plugin for `clang-formatter` which may not work correctly in unison. In VS Code & Visual Studio EditorConfig [takes precedence over other settings](https://github.com/MicrosoftDocs/visualstudio-docs/blob/master/docs/ide/cpp-editorconfig-properties.md#c-editorconfig-formatting-conventions).

  ### Possible issues

  Your editor may change formatting for some 3rd party library if you edit the code. A solution for this would be to make EditorConfig rules more specific (include only certain paths). I'm not sure if it is an issue in practice.

  ### Testing

  Add some trailing whitespace to a Python file and save the file. You should see that the trailing whitespace is removed.

  ### Possible future work

  It would be great to define rules for Makefiles. This would be good start:

  ```
  # Makefiles
  [Makefile,*.am]
  indent_style = tab
  trim_trailing_whitespace = true
  ```

  I don't know makefiles in this project good enough to propose something reasonable. If this PR is well received, it would be great to add it in this PR.

  Also, there are actually many different file extensions and so the proposed `.editorconfig` file can be probably improved very much:

  ```powershell
  Get-ChildItem -Recurse | % {$_.Extension.ToLower()} | sort | unique
  ```

  <details><summary>Click to see the output</summary>

  ```
  .1
  .ac
  .adoc
  .am
  .bash-completion
  .bat
  .bmp
  .c
  .cc
  .cert
  .cfg
  .clang_complete
  .clang-format
  .cmake
  .cmd
  .cnf
  .com
  .conf
  .cpp
  .css
  .csv
  .doxyfile
  .dtd
  .empty
  .exe
  .exp
  .gci
  .gitattributes
  .github
  .gitignore
  .gitmodules
  .guess
  .h
  .hex
  .hpp
  .html
  .icns
  .ico
  .idb
  .ilk
  .in
  .include
  .ini
  .init
  .ipp
  .jam
  .js
  .json
  .lastbuildstate
  .lib
  .list
  .log
  .m
  .m4
  .md
  .mk
  .mm
  .moc
  .obj
  .openrc
  .openrcconf
  .patch
  .pc
  .pdb
  .pl
  .plist
  .png
  .po
  .pro
  .py
  .python-version
  .qbk
  .qm
  .qml
  .qrc
  .raw
  .rb
  .rc
  .recipe
  .res
  .s
  .sage
  .sass
  .scm
  .scss
  .service
  .sgml
  .sh
  .sln
  .spec
  .sub
  .supp
  .svg
  .targets
  .td
  .tlog
  .ts
  .tx
  .txt
  .ui
  .user
  .v2
  .vcxproj
  .verbatim
  .vscode
  .xml
  .xpm
  .xsl
  .y
  .yapf
  .yml
  .yy
  ```

  </details>

  Fixes #21092

ACKs for top commit:
  laanwj:
    Tested re-ACK 7a135d57b2ac17477b25d5046a3bec57eac3ab30
  MarcoFalke:
    Approach ACK 7a135d57b2ac17477b25d5046a3bec57eac3ab30

Tree-SHA512: c36a3424ecc751fbdd66101463b0c470f5c7adcdb4795b1cd267ff718eb345a04615fc1182338adf5b7db724469dca00c64815a9ef77064734a6536fba41a2ba
2021-07-16 10:04:09 -05:00
Wladimir J. van der Laan
cd3bedaf1c Merge #20557: addrman: Fix new table bucketing during unserialization
4676a4fb5be0f6ef0b3f71c1f4361c20f7cb0e0b [addrman] Don't repeat "Bucketing method was updated" log multiple times (John Newbery)
436292367c1d737cf73bd985293539500d1206f5 [addrman] Improve serialization comments (John Newbery)
ac3547eddd8a7d67b4103508f30d5d02a9c1f148 [addrman] Improve variable naming/code style of touched code. (John Newbery)
a5c9b04959f443372400f9a736c6eaf5502284a1 [addrman] Don't rebucket new table entries unnecessarily (John Newbery)
8062d928ce5c495c1b6ecd18e4b30c12da822d90 [addrman] Rename asmap version to asmap checksum (John Newbery)
009b8e0fdf3bfb11668edacced5d8b70726d5d0e [addrman] Improve variable naming/code style of touched code. (John Newbery)
b4c5fda417dd9ff8bf9fe24a87d384a649e3730d [addrman] Fix new table bucketing during unserialization (John Newbery)

Pull request description:

  This fixes three issues in addrman unserialization.

  1. An addrman entry can appear in up to 8 new table buckets. We store this entry->bucket indexing during shutdown so that on restart we can restore the entries to their correct buckets. Commit ec45646de9e62b3d42c85716bfeb06d8f2b507dc broke the deserialization code so that each entry could only be put in up to one new bucket.

  2. Unserialization may result in an entry appearing in a 9th bucket. If the entry already appears in 8 buckets don't try to place it in another bucket.

  3. We unnecessarily rebucket when reading a peers.dat with file version 1. Don't do that.

ACKs for top commit:
  vasild:
    ACK 4676a4fb5be0f6ef0b3f71c1f4361c20f7cb0e0b
  glozow:
    re-ACK 4676a4fb5b, changes were a rename, comments, and removing repeat-logging.
  naumenkogs:
    ACK 4676a4f
  laanwj:
    Code review ACK 4676a4fb5be0f6ef0b3f71c1f4361c20f7cb0e0b
  dhruv:
    ACK 4676a4fb5be0f6ef0b3f71c1f4361c20f7cb0e0b
  ryanofsky:
    Code review ACK 4676a4fb5be0f6ef0b3f71c1f4361c20f7cb0e0b. I'm not previously familiar with this code but all the changes here do make sense and seem like improvements. Left some notes and comments, but they aren't important so feel to ignore.

Tree-SHA512: b228984f6dec5910be23c3740ae20258da33bcf66ceb7edb10e5a53163450f743bab349e47f09808b7e8d40f27143119ec3e0981d7e678aa494d8559a1c99c23
2021-07-16 10:04:09 -05:00
MarcoFalke
12cb360247 Merge #21084: test: fix timeout decrease in feature_assumevalid
0d39b5848a7a341cd2b958336861cdd4098e2616 test: fix timeout decrease in feature_assumevalid (Bruno Garcia)

Pull request description:

  This PR fixes the timeout decrease in assert_blockchain_height function.

ACKs for top commit:
  practicalswift:
    cr ACK 0d39b5848a7a341cd2b958336861cdd4098e2616: patch looks correct
  theStack:
    ACK 0d39b5848a7a341cd2b958336861cdd4098e2616 ⏲️

Tree-SHA512: ae3c83420b4de4ad41f1b20b6e77c3a26a8c5ac4fb136b2645fde119545a413c61312f76a16473141774bc955d30ac4fc86e5ca6cf729f8978a17d0dab520feb
2021-07-16 10:04:09 -05:00
fanquake
f9ae80e2cf Merge #21065: build: make macOS HOST in download-osx generic
f22a3ec1403293f45a06558d105f0da624c5ebed build: make macOS HOST in download-osx generic (fanquake)

Pull request description:

  This was missed in #20419, and the update before that, so just make this non-versioned so that we don't have to worry about it. This is fine, because it's just for downloading sources.

ACKs for top commit:
  RandyMcMillan:
    ACK f22a3ec1403293f45a06558d105f0da624c5ebed
  dongcarl:
    utACK f22a3ec1403293f45a06558d105f0da624c5ebed

Tree-SHA512: 3a6993a69594a793a5185e4ba48858443a1002a37b96ff881d39ca7719c79432b35d709bd9a9379f8046bdbeb716c5e1598f273a7e7e3f3bf528b6a807abe5ec
2021-07-16 10:04:09 -05:00
MarcoFalke
403d2a0917 Merge bitcoin-core/gui#167: raise helpMessageDialog
77114462f2328914b7a918f40776e522a0898e56 raise helpMessageDialog (randymcmillan)

Pull request description:

  the raise() method brings the helpMessageDialog to the top if it is obscured by another window.

ACKs for top commit:
  promag:
    Code review ACK 77114462f2328914b7a918f40776e522a0898e56.
  hebasto:
    ACK 77114462f2328914b7a918f40776e522a0898e56, tested on:

Tree-SHA512: 0d5b107aa9a5ce3891e88ef69f64461c8b23d17476b798691119e84bfc78e16b2491c798adb5d6cc347af3b7f18729593d7924090c336114a3cf34fbee344bfb
2021-07-16 10:04:09 -05:00
MarcoFalke
87ea218fe2 Merge bitcoin-core/gui#173: Follow Qt docs when implementing rowCount and columnCount
195fcb53a09e9b852544778a077727f81d31303e qt: Follow Qt docs when implementing rowCount and columnCount (Hennadii Stepanov)

Pull request description:

  [`QAbstractItemModel::rowCount`](https://doc.qt.io/qt-5/qabstractitemmodel.html#rowCount):
  > **Note:** When implementing a table based model, `rowCount()` should return 0 when the parent is valid.

  [`QAbstractItemModel::columnCount`](https://doc.qt.io/qt-5/qabstractitemmodel.html#columnCount):
  > **Note:** When implementing a table based model, `columnCount()` should return 0 when the parent is valid.

ACKs for top commit:
  jarolrod:
    Tested ACK 195fcb53a09e9b852544778a077727f81d31303e. Compiled and ran on macOS (Big Sur 11.1 and Catalina 10.15.7), Arch Linux, and FreeBSD. visually verified no weird effects with the `Address`, `Ban`, `Peer`, and `Transaction` tables. As already stated, the code change brings us inline with what the QT Docs recommend.

Tree-SHA512: 179a3430e68e77b22cdf642964cd96c023a2286ee256bbeb25b43df3d2eef6f59978c8d92173c6be5071d127fdcd6aa338142f6eaf003ff08e4abd65172d20ca
2021-07-16 10:04:09 -05:00
fanquake
f827bf9d93 Merge #20763: test: Fix comment typo in BitcoinTestFramework
40fdb2a212d0a0e775114e4766d065e6d234c155 test: Fix Comment Typo in BitcoinTestFramework (Joel Klabo)

Pull request description:

  Missing "override" in comment describing use of set_test_params

ACKs for top commit:
  michaelfolkson:
    ACK 40fdb2a212d0a0e775114e4766d065e6d234c155

Tree-SHA512: bf893a0d5f8dc86a3ec2eaf48cd7c0f0f832f3b3d254b3d99953336db7e294571b1d2c8686030bf8a27cbe67b1a85a54e53ebefb2e57d6d8d6ac864a15dce4e7
2021-07-16 10:04:09 -05:00
fanquake
62fab44126 Merge #20673: depends: Use more legible qmake commands in qt package
87fe104537eab5ccd8728321fe1c9ba39f7dda78 depends: Use more legible qmake commands in qt package (Hennadii Stepanov)
bf35a8da6ec2791dedf36f459add69ac67b11ff9 depends: Do not set build_subdir for qt package (Hennadii Stepanov)

Pull request description:

  Rather than using `cd` to jump all over the place, perform all `(q)make` commands from the top level directory.

  Looking at bash like `cd ../../../..` gives me a headache.

  Credits to **fanquake**.

  This PR is an alternative to #20504 that works without any additional [non-trivial hack](https://github.com/bitcoin/bitcoin/pull/20504#issuecomment-734730336).

ACKs for top commit:
  promag:
    Tested ACK 87fe104537eab5ccd8728321fe1c9ba39f7dda78.
  fanquake:
    ACK 87fe104537eab5ccd8728321fe1c9ba39f7dda78

Tree-SHA512: 1d2a13b5358fc7406c5363ddd62fd363dbc0ec5ace68946e4d3e6e8620419afaa64ef2837488aaed226174e01e8897495085540f7126b80f8b2372d21b5b29f9
2021-07-16 10:04:09 -05:00
Jonas Schnelli
0fba9a3ecd Merge #20650: depends: Drop workaround for a fixed bug in Qt build system
267f259c0dfbd348340d49e9a89b8684b994e22a depends: Drop workaround for a fixed bug in Qt build system (Hennadii Stepanov)

Pull request description:

  This PR drops workaround that was [introduced](1dec09b341) for Qt 5.2.1 for a bug in Qt build system that has been fixed in Qt 5.3.0.

  The bug reports:
   - https://bugreports.qt.io/browse/QTBUG-35444
   - https://bugreports.qt.io/browse/QTBUG-32519

  I've noted this change is a part of the #19716, but I think that a separate commit with the documented reason will benefit it.

ACKs for top commit:
  laanwj:
    Code review ACK 267f259c0dfbd348340d49e9a89b8684b994e22a
  jonasschnelli:
    code Review ACK 267f259c0dfbd348340d49e9a89b8684b994e22a
  practicalswift:
    cr ACK 267f259c0dfbd348340d49e9a89b8684b994e22a: patch looks correct

Tree-SHA512: b994f94776b4f8bb2f996095c87c7fef55e74d1e64852a890d664275e3739ec890ee388b10baa15445dd24ec7b971ce57d396cb062dbed933c18b6b69525349f
2021-07-16 10:04:09 -05:00
Wladimir J. van der Laan
5ff3dd1b34 Merge #20616: Check CJDNS address is valid
f7264fff0a098f8b6354c7373b8790791c25dd07 Check if Cjdns address is valid (Lucas Ontivero)

Pull request description:

  CJDNS addresses start with 0xFC and for that reason if a netaddr was unserialized with network type cjdns but its address prefix is not 0xFC then that netaddr should be considered invalid.

ACKs for top commit:
  jonatack:
    ACK f7264fff0a098f8b6354c7373b8790791c25dd07
  practicalswift:
    cr ACK f7264fff0a098f8b6354c7373b8790791c25dd07: patch looks correct
  theStack:
    ACK f7264fff0a098f8b6354c7373b8790791c25dd07 ✔️

Tree-SHA512: 5300df2ffbbd69c40271b6d8df96cca98eb3e1ee76aba62c9c76025d083788ab1f1332775890c63b06e02ca593863a867cd53956bce5962383e8450487898669
2021-07-16 10:04:09 -05:00
Wladimir J. van der Laan
9ff3643bfa Merge #20482: Add depends qt fix for ARM macs
c23f6f84efa2fe7e7168a5d41341f3a7c5598f70 Add depends qt fix for ARM macs (Jonas Schnelli)

Pull request description:

  With this, depends builds fine on macOS 11 on an Apple Silicon Mac (ARM64).

ACKs for top commit:
  laanwj:
    Code review ACK c23f6f84efa2fe7e7168a5d41341f3a7c5598f70

Tree-SHA512: a8354cec99969cff9e7dab150c335050ddb4b3c93a9f12a4db5e8046f02b11ce692ac17c2b96cbbe7f380c1aa110b15b8d6d48d51bc9c560282c702e99fd8a8d
2021-07-16 10:04:09 -05:00
fanquake
53064c4559 Merge #20565: Android : Ensure pic build for bdb
e373959d6fe90cc4507024a6b31a706bfc5bd0c8 Android : Ensure pic build for bdb (Block Mechanic)

Pull request description:

  This pr ensures android builds for the BDB dependency have the pic flag enabled. Android builds were failing to link with reloc errors.

ACKs for top commit:
  laanwj:
    Code review ACK e373959d6fe90cc4507024a6b31a706bfc5bd0c8
  jonasschnelli:
    utACK e373959d6fe90cc4507024a6b31a706bfc5bd0c8

Tree-SHA512: 68319ed7cc0bd295eaa87dd53ba051daeb1456bc3ab9b48ca0c4b831a9c8da1073480478efde73689f0e403e37409a8459229264656f05ba5fef6c257a74f977
2021-07-16 10:04:09 -05:00
Jonas Schnelli
0883abc4c7 Merge #20496: build: Drop unneeded macOS framework dependencies
ec4a46dd9c158e1a0de144e9abb260da941aa702 build: Drop unneeded IOKit framework dependency (Hennadii Stepanov)
65afe4cb69e80278de0f584b6eeb6741f02a31eb build: Drop unneeded ApplicationServices framework dependency (Hennadii Stepanov)

Pull request description:

  Bitcoin Core codebase does not contain direct dependencies on the `ApplicationServices` and `IOKit` frameworks.

ACKs for top commit:
  jonasschnelli:
    utACK ec4a46dd9c158e1a0de144e9abb260da941aa702
  practicalswift:
    cr ACK ec4a46dd9c158e1a0de144e9abb260da941aa702: patch looks correct!
  promag:
    Tested ACK ec4a46dd9c158e1a0de144e9abb260da941aa702 (not depends build).

Tree-SHA512: 47b5ad87d761992850133a921f07d485565c70ba2909a3289050f406e6dbd39ad49e1aeeb6cad79c6914385a72ddffd273dfadd69259a35545a13cd17d0e5043
2021-07-16 10:04:09 -05:00
Kittywhiskers Van Gogh
9af3760ae3 merge #20067: remove use of boost::algorithm::replace_first 2021-07-16 20:21:40 +05:30
Kittywhiskers Van Gogh
db248e82a0 merge #18792: Remove boost from PeriodicFlush
Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2021-07-16 20:21:39 +05:30
Kittywhiskers Van Gogh
9ae5a4c871 merge #18786: Remove boost from ThreadImport 2021-07-16 20:20:19 +05:30
fanquake
f20f872592 merge #17405: wallet: Remove unused boost::this_thread::interruption_point
fad1de66a29bf6bd348a932150dad7d472feb3d0 wallet: Remove unused boost::this_thread::interruption_point (MarcoFalke)

Pull request description:

  `BerkeleyEnvironment::Open` is only called from the main thread (init) or an http rpc thread, neither of which can be interrupted, so remove the useless interruption point.

  `BerkeleyEnvironment{}` is only used in tests, which run in a single process/thread, so remove the useless interruption point.

ACKs for top commit:
  laanwj:
    ACK fad1de66a29bf6bd348a932150dad7d472feb3d0
  fanquake:
    ACK fad1de66a29bf6bd348a932150dad7d472feb3d0

Tree-SHA512: dacd8398e966e4a6ce5cf7d3ed821c9c267eff40b14c0635085441647cdb72d1642807f89355419f1710f814c7963e35a10d102d0b985c7198261dfc736256f8
2021-07-16 20:20:16 +05:30
Kittywhiskers Van Gogh
4619630551 merge #13671: Remove boost/algorithm/string/case_conv.hpp 2021-07-16 20:19:42 +05:30
UdjinM6
9bb7a608a2
Merge pull request #4260 from PastaPastaPasta/backport-triv-pr15
Backport triv pr15
2021-07-16 03:41:39 +03:00
Jonas Schnelli
76b337b35f Merge bitcoin-core/gui#21: Update pruning tooltip, original author BitcoinErrorLog
2fc5efc55c886f1b874ce6cd02c9082b5bb6435a Update pruning tooltip, original author BitcoinErrorLog (Riccardo Spagni)

Pull request description:

  Squashed commits from BitcoinErrorLog at his request, per the original discussion on #15: this tooltip has been adjusted to be more user-friendly and reflect what the net effect of pruning is for the user.

ACKs for top commit:
  harding:
    Untested ACK 2fc5efc55c886f1b874ce6cd02c9082b5bb6435a
  Sjors:
    utACK 2fc5efc55c886f1b874ce6cd02c9082b5bb6435a and welcome to the dark side!
  jonasschnelli:
    ACK 2fc5efc55c886f1b874ce6cd02c9082b5bb6435a

Tree-SHA512: 45d6a7efbf4d34d20b9de439c988a39c739591b854726b6682c4cffcb23dff7d9131afab572fa0c9a8bc033c46c3878efdfbf8a984aafde632e1dfc1caa1cbbb
2021-07-15 19:39:10 -05:00
Wladimir J. van der Laan
7cfcb9a74c Merge #20024: init: Fix incorrect warning "Reducing -maxconnections from N to N-1, because of system limitations"
ea93bbeb26948c0ddba39b589bd166eaecf446c8 init: Fix incorrect warning "Reducing -maxconnections from N to N-1, because of system limitations" (practicalswift)

Pull request description:

  Fix incorrect warning `Reducing -maxconnections from N to N-1, because of system limitations`.

  Before this patch (only the first warning is correct):

  ```
  $ src/bitcoind -maxconnections=10000000 | grep Warning
  2020-09-26T01:23:45Z Warning: Reducing -maxconnections from 10000000 to 1048417, because of system limitations.

  $ src/bitcoind -maxconnections=1000000 | grep Warning
  2020-09-26T01:23:45Z Warning: Reducing -maxconnections from 1000000 to 999999, because of system limitations.

  $ src/bitcoind -maxconnections=100000 | grep Warning
  2020-09-26T01:23:45Z Warning: Reducing -maxconnections from 100000 to 99999, because of system limitations.

  $ src/bitcoind -maxconnections=10000 | grep Warning
  2020-09-26T01:23:45Z Warning: Reducing -maxconnections from 10000 to 9999, because of system limitations.

  $ src/bitcoind -maxconnections=1000 | grep Warning
  2020-09-26T01:23:45Z Warning: Reducing -maxconnections from 1000 to 999, because of system limitations.

  $ src/bitcoind -maxconnections=100 | grep Warning
  [no warning]
  ```

  After this patch (no incorrect warnings):

  ```
  $ src/bitcoind -maxconnections=10000000 | grep Warning
  2020-09-26T01:23:45Z Warning: Reducing -maxconnections from 10000000 to 1048417, because of system limitations.

  $ src/bitcoind -maxconnections=1000000 | grep Warning
  [no warning]

  $ src/bitcoind -maxconnections=100000 | grep Warning
  [no warning]

  $ src/bitcoind -maxconnections=10000 | grep Warning
  [no warning]

  $ src/bitcoind -maxconnections=1000 | grep Warning
  [no warning]

  $ src/bitcoind -maxconnections=100 | grep Warning
  [no warning]
  ```

ACKs for top commit:
  n-thumann:
    tACK ea93bbeb26, Ran on other systems running Debian 10.5 (4.19.0-8-amd64) and Debian bullseye/sid (5.3.0-1-amd64) and was able to reproduce the issue exactly as you described above on both of them. After applying your patch the issue is fixed ✌️
  laanwj:
    Code review ACK ea93bbeb26948c0ddba39b589bd166eaecf446c8
  theStack:
    tACK ea93bbeb26948c0ddba39b589bd166eaecf446c8

Tree-SHA512: 9b0939a1a51fdf991d11024a5d20b4f39cab1a80320b799a1d24d0250aa059666bcb1ae6dd79c941c2f2686f07f59fc0f6618b5746aa8ca6011fdd202828a930
2021-07-15 19:39:10 -05:00
MarcoFalke
8bf157ee80 Merge bitcoin/bitcoin#22080: doc: add maxuploadtarget to bitcoin.conf example
947f9734daab4e47c0abdc6ef7d52812102ecb6b doc: add maxuploadtarget to bitcoin.conf example (apitko)

Pull request description:

  picking up #21499, author has stated they [can't squash](https://github.com/bitcoin/bitcoin/pull/21499#issuecomment-849277632).

  This adds the maxuploadtarget option to the `bitcoin.conf` example file. This is useful for those looking to configure their bandwidth utilization.

  **Changes from Original PR:**
  - squash commits
  - fix typo in commit message + reword commit message to be more appropriate
  - Implement review suggestions ([1](https://github.com/bitcoin/bitcoin/pull/21499#discussion_r615409982), [2](https://github.com/bitcoin/bitcoin/pull/21499#discussion_r615410337), [3](https://github.com/bitcoin/bitcoin/pull/21499#pullrequestreview-659357756))
  - Fix spacing

ACKs for top commit:
  jonatack:
    ACK 947f9734daab4e47c0abdc6ef7d52812102ecb6b
  theStack:
    re-ACK 947f9734daab4e47c0abdc6ef7d52812102ecb6b

Tree-SHA512: 658ce6e1f204cd1c1c6f8977fd46ba1631f417d3f492e6d777b0ca49ffecc2ecfa4fbd86ca0e08c0dd5d6df4e32f0b56693e0a71bd7eafafd019e93bbcf9420f
2021-07-15 19:39:10 -05:00
MarcoFalke
289c8772a8 Merge bitcoin/bitcoin#22204: doc: remove obsolete okSafeMode RPC guideline from developer notes
6780a095d8526a46c3c2b20a14831687e9fc2462 doc: remove obsolete `okSafeMode` RPC guideline from developer notes (Sebastian Falbesoner)

Pull request description:

  Since the flag has been removed from the RPC command table in commit ec6902d0ea (PR #11179), this guideline is not relevant anymore and can be removed.

ACKs for top commit:
  MarcoFalke:
    ACK 6780a095d8526a46c3c2b20a14831687e9fc2462. Also, safe mode was removed completely in commit 2ae705d841

Tree-SHA512: 2a6b002ae302e979ce403171b79a892e32f5083792c3b0b8204edb5eb08c6b24ab77bbeeae0e3bb6d6564a6f1678cfce00eb7b5b82063b7741f89a96b0c0aef3
2021-07-15 19:39:10 -05:00
MarcoFalke
cfd9a89298 Merge #18030: doc: Coin::IsSpent() can also mean never existed
1404c574037da331c233317618b9b90d3329ed33 [doc] Coin: explain that IsSpent() can also mean never existed (Sjors Provoost)

Pull request description:

  This can be especially confusing where `AccessCoin()` is used with logic like this:

  ```c++
      while (iter.n < MAX_OUTPUTS_PER_BLOCK) {
          const Coin& alternate = view.AccessCoin(iter);
          if (!alternate.IsSpent()) return alternate;
  ```

ACKs for top commit:
  practicalswift:
    ACK 1404c574037da331c233317618b9b90d3329ed33
  MarcoFalke:
    ACK 1404c574037da331c233317618b9b90d3329ed33
  jnewbery:
    utACK 1404c574037da331c233317618b9b90d3329ed33

Tree-SHA512: 418618dd7e08bd5cc8360e3501d0f57e34100e5101ad3b8e0a819923fa860f44c7f2fada0f8447a1af3c2601fd72bfe619b91ff2f26f7133ceaeb0c98b017b12
2021-07-15 19:39:10 -05:00
MarcoFalke
9ff78a0644 Merge #21481: doc: Tell howto install clang-format on Debian/Ubuntu
ea76f4ac7d6e8c268d301d7ae6c8d4d8d804d55f Doc: Tell howto install clang-format on Debian/Ubuntu (wodry)

Pull request description:

  Because only macOS wasy mentioned, I was unsure if this would be a macOS specific tool. I guess Linux is more used than Mac, so Linux guide should be there, too.

ACKs for top commit:
  hebasto:
    ACK ea76f4ac7d6e8c268d301d7ae6c8d4d8d804d55f, every system upgrade via clean installation I do the same.

Tree-SHA512: 75c28540e8815cb41f4cf92784b6349978988b679e4deef9ae77ede951f93516ca13ec7b313ab72865b01273e115b49ed2b67cdcd68015af1b643a6186b190dd
2021-07-15 19:39:10 -05:00
fanquake
0dcf7e3579 Merge #21263: doc: Clarify that squashing should happen before review
fa1f3a26a7541ba82a28c2a5fd09401be825c888 doc: Clarify that squashing should happen before review (MarcoFalke)

Pull request description:

  Unlike other repos, in our repo code review happens before merge, ideally.

  Thus, rebases, solving merge conflicts and squashing should happen before review, which again happens before merge.

ACKs for top commit:
  theStack:
    ACK fa1f3a26a7541ba82a28c2a5fd09401be825c888
  fanquake:
    ACK fa1f3a26a7541ba82a28c2a5fd09401be825c888

Tree-SHA512: e9222191a6e9cf9867bd1f29982526dd7b746b70dd2cc94f485256ec98ff2d3941c9b40728935e151d13795239334e334b71ad41044909cb2849f57776811a94
2021-07-15 19:39:10 -05:00
MarcoFalke
5a7e219d81 Merge #20986: docs: update developer notes to discourage very long lines
aa929abf8dc022e900755234c857541faeea8239 [docs] Update developer notes to discourage very long lines (John Newbery)

Pull request description:

  Mandatory rules on line lengths are bad - there will always be cases where a longer line is more readable than the alternative.

  However, very long lines for no good reason _do_ hurt readability. For example, this declaration in validation.h is 274 chars:

  ```c++
      bool ConnectTip(BlockValidationState& state, const CChainParams& chainparams, CBlockIndex* pindexNew, const std::shared_ptr<const CBlock>& pblock, ConnectTrace& connectTrace, DisconnectedBlockTransactions& disconnectpool) EXCLUSIVE_LOCKS_REQUIRED(cs_main, m_mempool.cs);
  ```

  That won't fit on one line without wrapping on my 27" monitor with a comfortable font size. Much easier to read is something like:

  ```c++
      bool ConnectTip(BlockValidationState& state, const CChainParams& chainparams,
                      CBlockIndex* pindexNew, const std::shared_ptr<const CBlock>& pblock,
                      ConnectTrace& connectTrace, DisconnectedBlockTransactions& disconnectpool)
          EXCLUSIVE_LOCKS_REQUIRED(cs_main, m_mempool.cs);
  ```

  Therefore, _discourage_ (don't forbid) line lengths greater than 100 characters in our developer style guide.

  100 chars is somewhat arbitrary. The old standard was 80, but that seems very limiting with modern displays.

ACKs for top commit:
  fanquake:
    ACK aa929abf8dc022e900755234c857541faeea8239 - this is basically just something to point too when a PR has unreasonably long lines for no particularly reason.
  practicalswift:
    ACK aa929abf8dc022e900755234c857541faeea8239
  amitiuttarwar:
    ACK aa929abf8dc022e900755234c857541faeea8239
  theStack:
    ACK aa929abf8dc022e900755234c857541faeea8239
  glozow:
    ACK aa929abf8d

Tree-SHA512: 17f1b11f811137497ede8851ede93fa612dc622922b5ad7ac8f065ea026d9a718db5b92325754b74d24012b4d45c4e2cd5cd439a6a8d34bbabf5da927d783970
2021-07-15 19:39:10 -05:00
MarcoFalke
d40eedbf01 Merge #19050: doc: Add warning for rest interface limitation
5c3eaf9983043db1b61a98c95d692a6958670b86 doc: Add warnings for http interfaces limitations (Fabian Jahr)

Pull request description:

  `libevent`, which is used for our rest interface, can use up all of the available file descriptors in a system if too many connections are opened at once. If a new block is connected at the same time and can not be written to disk because there are no file descriptors available, the node crashes. Based on my investigation so far the issue is best solved upstream which means we have to wait for the next release (2.2). In the meantime it would be good if we would warn users of this limitation.

  See #11368 for more background.

ACKs for top commit:
  MarcoFalke:
    ACK 5c3eaf9983043db1b61a98c95d692a6958670b86

Tree-SHA512: 73914538588477ead19068f5832fdcc8e0eb736e51f73b3aca501c93165e5ad634c2511a3fcffff251adcd3efda23a742b48211ad9d3b2a29cdeac17201d06a1
2021-07-15 19:38:52 -05:00
UdjinM6
84769e128a
Merge pull request #4259 from PastaPastaPasta/backport-triv-pr13
backport: 'trivial' pr14
2021-07-16 03:38:13 +03:00
Wladimir J. van der Laan
a9b5723556 Merge #19968: doc: clarify CRollingBloomFilter size estimate
d9141a0002bb508b2e94e206a1bd28ef8f97ffde doc: clarify CRollingBloomFilter size estimate (Anthony Towns)

Pull request description:

  Based on #19130, this change improves the comment for `CRollingBloomFilter` in `bloom.h`:

  - Give examples to illustrate the heuristic "1.8 bytes per element per factor 0.1 of false positive rate"
  - Add some Python code which can be copy/pasted for convenient filter size calculation (in an interpreter)
  - Reconcile the newly added code with the existing approximation

ACKs for top commit:
  laanwj:
    ACK d9141a0002bb508b2e94e206a1bd28ef8f97ffde

Tree-SHA512: e7138b3c531883a750ead06368975c750863fde7ef6f2633b137eca011079226e9205316217322014399fba05a48f294c788dd700bb7d479c58fe1f23e40419f
2021-07-15 19:37:59 -05:00
fanquake
f2f4a8f085 Merge #20405: p2p: avoid calculating onion address checksum when version is not 3
d355a302d9b7e4aaac04edaa0671ced3b3eaef45 Break circuit earlier (lontivero)

Pull request description:

  Currently when parsing an onion v3 address the pubic key checksum is calculated in order to compare it with the received address checksum. However this step is not necessary if the address version byte is not 3, in which case the method can return with false immediately.

ACKs for top commit:
  jonatack:
    ACK d355a302d9b7e4aaac04edaa0671ced3b3eaef45
  practicalswift:
    ACK d355a302d9b7e4aaac04edaa0671ced3b3eaef45 -- patch looks correct
  hebasto:
    ACK d355a302d9b7e4aaac04edaa0671ced3b3eaef45, I have reviewed the code and it looks OK, I agree it can be merged.
  sipa:
    utACK d355a302d9b7e4aaac04edaa0671ced3b3eaef45

Tree-SHA512: 9e4506793b7f4a62ce8edc41a260a8c125ae81ed2f90cd850eb2a9214d323c446edc7586c7b0590dcbf3aed5be534718b77bb19c45b48f8f52553d32a3663a65
2021-07-15 19:37:59 -05:00
Jonas Schnelli
e8a9c28c82 Merge #20378: wallet: fix potential division by 0 in WalletLogPrintf
440f8d3abe97b96f434dad5216d417a08fc10253 fix potential devision by 0 (Jonas Schnelli)

Pull request description:

  #20344 removed the divide-by-zero sanitizer suppression in `wallet/wallet.cpp` but kept a potential devision by zero in `wallet.cpp`'s fee logging.

  Detected here https://bitcoinbuilds.org/index.php?job=ffb7d59f-379f-4f27-a273-a5595b8c5f07

ACKs for top commit:
  practicalswift:
    ACK 440f8d3abe97b96f434dad5216d417a08fc10253
  laanwj:
    Code review ACK 440f8d3abe97b96f434dad5216d417a08fc10253
  hebasto:
    re-ACK 440f8d3abe97b96f434dad5216d417a08fc10253

Tree-SHA512: 9f7903d1e567497c5f972d39e9629c059151e705dbed0a6b88f7c6650c50ecf820f78e3e0f3e629c661d45a938c5d7659faae7c61e47ca8b3bdb029661bca55a
2021-07-15 19:37:59 -05:00
fanquake
7613d3c433 Merge #20298: macOS deploy: use the new plistlib API
04a69c200e0d18ae63c7e47898f85d1b4cb5c23d macOS deploy: use the new plistlib API (Jonas Schnelli)

Pull request description:

  See https://docs.python.org/3/library/plistlib.html.
  The old API was deprecated in 3.4 and removed in 3.9.

  ~~AFAIK the macdeployplus scripts is only used when calling `make deploy` locally (on macOS). The linux cross compile build (like gitian) are not affected by this PR.~~

ACKs for top commit:
  fanquake:
    ACK 04a69c200e0d18ae63c7e47898f85d1b4cb5c23d - I checked that `make deploy` on macOS currently fails when building master and using Python 3.9. This PR fixes that, and it's fine to use (and backport) these changes as they only require Python 3.4. Related note: I think we could just about drop our native_biplist dependency entirely given some changes upstream.
  practicalswift:
    ACK 04a69c200e0d18ae63c7e47898f85d1b4cb5c23d: patch looks correct

Tree-SHA512: c5bb60c5157b371d680c82e0978470a488f3edc58cd09e1be635fed59420f227dd113e901c28e15a463da6fe81dc64d08a701b1fdfeb4502f418785707dbebbc
2021-07-15 19:37:59 -05:00
UdjinM6
85b8a05690
Merge pull request #4263 from UdjinM6/bp11911
Merge #11911: Free BerkeleyEnvironment instances when not in use
2021-07-16 03:37:08 +03:00
MarcoFalke
b682ce2a79 Merge #20101: rpc: change no wallet loaded message to be clearer
907f142fc7e1d35f443be076367739faf11cc2cc rpc: change no wallet loaded message to be clearer (Andrew Chow)

Pull request description:

  Changes the no wallet is loaded rpc error message to be clearer that no wallet is loaded and how the user can load or create a wallet. Also changes the error code from METHOD_NOT_FOUND to RPC_WALLET_NOT_FOUND as that makes more sense.

ACKs for top commit:
  MarcoFalke:
    review ACK 907f142fc7e1d35f443be076367739faf11cc2cc
  kristapsk:
    ACK 907f142fc7e1d35f443be076367739faf11cc2cc. In addition to standard tests, just in case tested that this doesn't break anything with JoinMarket.
  meshcollider:
    utACK 907f142fc7e1d35f443be076367739faf11cc2cc

Tree-SHA512: 4b413e6ab5430ec75a79de9db6583f2f3f38ccdf71aa373d8386a56e64f07f92200c8107c8c82c92c7c431d739615977c208b771a24c5960fa8676789b5497a2
2021-07-15 19:30:07 -05:00
fanquake
788e3d31b4 Merge #19870: doc: update PyZMQ install instructions, fix zmq_sub.py file permissions
062e6699c4ac48c3d46516190ec411dec3680a0d script: fix zmq_sub.py file permissions (Jon Atack)
36f8e0cce700576865e61035626e08c5e845a38a doc: update PyZMQ installation instructions, ZeroMQ link (Jon Atack)

Pull request description:

  Seen while reviewing #19572.

ACKs for top commit:
  theStack:
    ACK 062e6699c4ac48c3d46516190ec411dec3680a0d 🧷
  fanquake:
    ACK 062e6699c4ac48c3d46516190ec411dec3680a0d

Tree-SHA512: 2210d92385377d066984d0a83882c3ece9f0f41c901b7eb375af9cdb57296f50f227c68193ccf35926073c2b788d58976442791a9fce2fc0f76452804d5cee6a
2021-07-15 19:30:07 -05:00