Commit Graph

19733 Commits

Author SHA1 Message Date
fanquake
f74aea23f1
Merge #18577: doc: Correct scripted-diff example link
478c11dde326e2ff0480c14f76f9f6b52a7bdfd0 Correct scripted-diff example link (Yahia Chiheb)

Pull request description:

ACKs for top commit:
  fanquake:
    ACK 478c11dde326e2ff0480c14f76f9f6b52a7bdfd0

Tree-SHA512: 3bc741a79db9bd7abb17ef11f697b768565ec01303a5823ee6a7d8dfa6e888a99a15e9eda69f97a912abc3fd56a54f698f9a580596511bc9bcf62a6870b273f6
2021-07-14 18:44:45 -05:00
fanquake
8c4a371dfd
Merge #18513: doc: fix git add argument
4928a995e9799c6c7ea84fa1efc4fef5b2ff7683 [doc] fix git add argument (Michael Polzer)

Pull request description:

  [`A`](https://git-scm.com/docs/git-add#Documentation/git-add.txt--A) is the correct flag.

ACKs for top commit:
  fanquake:
    ACK 4928a995e9799c6c7ea84fa1efc4fef5b2ff7683 - checked that [`A`](https://git-scm.com/docs/git-add#Documentation/git-add.txt--A) and not `a` is the correct flag.

Tree-SHA512: 7e656ca9688b04ad2ef577aa1847799a34a377f5e6dfe4fd052a95d3dd98798dc10957e7f54164900ac1271f05e788ec4861026f53b910e369b0845532387cf4
2021-07-14 18:44:44 -05:00
MarcoFalke
c3a80793d1
Merge #18379: doc: Comment fix merkle.cpp
5b59a19731827398aa32754d1f327178247d3199 Update merkle.cpp (4d55397500)

Pull request description:

  Change comment from `The reason is that if the number of hashes in the list at a given time
  is odd`, to ` The reason is that if the number of hashes in the list at a given level
         is odd` (to be a bit more precise: replacing `time` with `level`)

  <!--
  *** Please remove the following help text before submitting: ***

  Pull requests without a rationale and clear improvement may be closed
  immediately.
  -->

  <!--
  Please provide clear motivation for your patch and explain how it improves
  Bitcoin Core user experience or Bitcoin Core developer experience
  significantly:

  * Any test improvements or new tests that improve coverage are always welcome.
  * All other changes should have accompanying unit tests (see `src/test/`) or
    functional tests (see `test/`). Contributors should note which tests cover
    modified code. If no tests exist for a region of modified code, new tests
    should accompany the change.
  * Bug fixes are most welcome when they come with steps to reproduce or an
    explanation of the potential issue as well as reasoning for the way the bug
    was fixed.
  * Features are welcome, but might be rejected due to design or scope issues.
    If a feature is based on a lot of dependencies, contributors should first
    consider building the system outside of Bitcoin Core, if possible.
  * Refactoring changes are only accepted if they are required for a feature or
    bug fix or otherwise improve developer experience significantly. For example,
    most "code style" refactoring changes require a thorough explanation why they
    are useful, what downsides they have and why they *significantly* improve
    developer experience or avoid serious programming bugs. Note that code style
    is often a subjective matter. Unless they are explicitly mentioned to be
    preferred in the [developer notes](/doc/developer-notes.md), stylistic code
    changes are usually rejected.
  -->

  <!--
  Bitcoin Core has a thorough review process and even the most trivial change
  needs to pass a lot of eyes and requires non-zero or even substantial time
  effort to review. There is a huge lack of active reviewers on the project, so
  patches often sit for a long time.
  -->

ACKs for top commit:
  MarcoFalke:
    ACK 5b59a19731827398aa32754d1f327178247d3199
  instagibbs:
    ACK 5b59a19731

Tree-SHA512: 30d29b9855b30de8b54033ca4884cfb5bf8ab9e52cf61da237abba0e15ebff947c65f8ba82175694bc60ee0d54f940a098cadcb0404d3c3bcf577006ab0561a5
2021-07-14 18:44:44 -05:00
Wladimir J. van der Laan
9c6b782196
Merge #18283: doc: Explain rebase policy in CONTRIBUTING.md
fa1244783ccb4798af4906ac6be5a38df241fa38 doc: Explain rebase/squash policy in CONTRIBUTING.md (MarcoFalke)

Pull request description:

ACKs for top commit:
  hebasto:
    re-ACK fa1244783ccb4798af4906ac6be5a38df241fa38, typos fixed.
  laanwj:
    ACK fa1244783ccb4798af4906ac6be5a38df241fa38

Tree-SHA512: b8f790a8ffa4f59f26b64befbea8acd92f3c548e577c35750a60dde94b4340258a540ad0db60a6de650db0156cbff9e1330c589c300db5253531fe6a16cdbcc9
2021-07-14 18:44:43 -05:00
MarcoFalke
545139e5c1
Merge #17159: doc: Add a note about backporting
2a6bce482c13cff37c1af00231265de4656a454b doc: Add a note about backporting (Carnhof Daki)

Pull request description:

  See laanwj's comment in #17158
  https://github.com/bitcoin/bitcoin/pull/17158#issuecomment-542627090

Top commit has no ACKs.

Tree-SHA512: ac5248a796050ce1a5bd0718955f941f6a3c025e192599948f12566eb55296079404b999676b9a2c8fe10616fc8334698dfa415af0fb4db6c98038d52218af1f
2021-07-14 18:44:43 -05:00
Wladimir J. van der Laan
a8a23d8dd6
Merge #17431: Remove unnecessary forward declaration
3d133482b20c0acc03cdbe5f9104ae8dedde8e4d Remove unnecessary forward declaration (Mark Erhardt)

Pull request description:

  This removes an unnecessary forward declaration.

ACKs for top commit:
  jnewbery:
    Tested ACK 3d133482b20c0acc03cdbe5f9104ae8dedde8e4d
  laanwj:
    ACK 3d133482b20c0acc03cdbe5f9104ae8dedde8e4d

Tree-SHA512: 9e5b14e861c2b9fa2d7707ed67c4667540e9812a762e00f5039691eeca82390eb7462d20ad781d4e8c9111517e989da7aef60b112ab33abb774e32d9845b5459
2021-07-14 18:44:42 -05:00
fanquake
ecbaf20937
Merge #17393: doc: Added regtest config for linearize script
582e66b6e75d58033987a7b0474226cfdd724ce0 doc: Added regtest config for linearize script (Gr0kchain)

Pull request description:

  Updated the example-linearize.cfg file to include support for the regtest chain network config which is used by the ./linearize-data.py

  Problem:
  Without the regtest magic, genesis hash and path config, the `linearize-data.py` script cannot generate a bootstrap.dat file.

  Example:

  ./linearize-data.py ./linearize.cfg
  Read 102 hashes
  Genesis block not found in hashlist

  Solution:

  Added netmagic, genesis and input example parameters to file.

  Resolution

  1. Starting bitcoind in regtest mode
  2. bitcoin-cli generatetoaddress 101 $(bitcoin-cli getnewaddress)
  3. ./linearize-hashes.py ./linearize.cfg > ./hashlist.txt
  4. ./linearize-data.py ./linearize.cfg

  ```
  $ ./linearize-data.py ./linearize.cfg
  Read 102 hashes
  Input file /Users/gr0kchain/.bitcoin/regtest/blocks/blk00000.dat
  Output file /Users/gr0kchain/Downloads/bootstrap.dat
  Done (102 blocks written)
  ```

ACKs for top commit:
  fanquake:
    ACK 582e66b6e75d58033987a7b0474226cfdd724ce0

Tree-SHA512: 699e92e740e68e2e5190ba37538efbbe3e4d4e725ebd6af704a0cf5517683b691754f7ea097bf840845d2b53b793c63258d406e9bd37922db810cf58bed053c3
2021-07-14 18:44:42 -05:00
fanquake
1340a51e1b
Merge #18059: build: add missing attributes to Win installer
6c223152238d2e818e38357b03f38a4dbe9de016 build: add additional attributes to Win installer (fanquake)

Pull request description:

  Fixes: #17170.

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

Tree-SHA512: d2ff2006b8df6a34b3a16270d3eb895b03cf6b3ca69404bc39adeb7d5e3b896ddab6ba831566dc966d8bdfba3f57ddf325762cddf3ad76d1427971d1bcc68255
2021-07-14 18:43:56 -05:00
fanquake
573d3a0e02
Merge #17336: scripts: search for first block file for linearize-data with some block files pruned
317fb96de9c6257972f1213b4ef2c3fe87dde99f Add search for first blk file with pruned node (Rjected)

Pull request description:

  <!--
  *** Please remove the following help text before submitting: ***

  Pull requests without a rationale and clear improvement may be closed
  immediately.
  -->

  <!--
  Please provide clear motivation for your patch and explain how it improves
  Bitcoin Core user experience or Bitcoin Core developer experience
  significantly:

  * Any test improvements or new tests that improve coverage are always welcome.
  * All other changes should have accompanying unit tests (see `src/test/`) or
    functional tests (see `test/`). Contributors should note which tests cover
    modified code. If no tests exist for a region of modified code, new tests
    should accompany the change.
  * Bug fixes are most welcome when they come with steps to reproduce or an
    explanation of the potential issue as well as reasoning for the way the bug
    was fixed.
  * Features are welcome, but might be rejected due to design or scope issues.
    If a feature is based on a lot of dependencies, contributors should first
    consider building the system outside of Bitcoin Core, if possible.
  * Refactoring changes are only accepted if they are required for a feature or
    bug fix or otherwise improve developer experience significantly. For example,
    most "code style" refactoring changes require a thorough explanation why they
    are useful, what downsides they have and why they *significantly* improve
    developer experience or avoid serious programming bugs. Note that code style
    is often a subjective matter. Unless they are explicitly mentioned to be
    preferred in the [developer notes](/doc/developer-notes.md), stylistic code
    changes are usually rejected.
  -->
  When bitcoind is running in pruned mode, producing a hashlist with `./linearize-hashes.py linearize.cfg > hashlist.txt` and then executing `linearize-data.py linearize.cfg` will produce:
  ```
  Read 313001 hashes
  Input file /home/dan/.bitcoin/blocks/blk00000.dat
  Premature end of block data
  ```
  This happens because `linearize-data` starts by attempting to process `blk00000.dat` regardless of whether or not `blk00000.dat` actually exists - this may not be the case if working with a pruned node.
  This PR adds a function which finds the first block file that does exist, and calls that function when the `BlockDataCopier` is initialized.

  This is a refactor of #16431.

  <!--
  Bitcoin Core has a thorough review process and even the most trivial change
  needs to pass a lot of eyes and requires non-zero or even substantial time
  effort to review. There is a huge lack of active reviewers on the project, so
  patches often sit for a long time.
  -->

ACKs for top commit:
  darosior:
    ACK 317fb96de9c6257972f1213b4ef2c3fe87dde99f
  laanwj:
    Code review ACK 317fb96de9c6257972f1213b4ef2c3fe87dde99f
  theStack:
    Code review ACK 317fb96de9

Tree-SHA512: fc8014282df6cfe7b267e64db8ce7d82b86b758c302fbfea4a3c39b62d93512f5c2e31a0de4e9c5ec18fc0268c917f011257d37b45afaef6033eec90e4aa585f
2021-07-14 18:43:56 -05:00
fanquake
abd39661e7
Merge #17817: build: Add default configure cache file to .gitignore
0661a3c4a6ac7e9aa24812dcd1c3ca9053248aff build: Add default configure cache to .gitignore (Hennadii Stepanov)

Pull request description:

  Ref: [Autoconf - 7.4.2 Cache Files](https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/autoconf.html#Cache-Files)

ACKs for top commit:
  fanquake:
    ACK 0661a3c4a6ac7e9aa24812dcd1c3ca9053248aff - sure; going to merge this. However lets not start adding every file that might occur from using any autoconf option to our .gitignore..

Tree-SHA512: 8be8fdd7fda35ae190c1613e5b3ac4860d6f9ec08f06b66b1278be26e11a1616ec781e0b88d0761690c99600b4de2306c01dd9798f9143531ddacb373e3fc677
2021-07-14 18:43:55 -05:00
MarcoFalke
693f054f19
Merge #17751: doc: use recommended shebang approach in documentation code block
6094222de7820d235e6e8c66e589aa71db08c077 use preferred shebang approach for documentation (hackerrdave)

Pull request description:

  Documentation update to use recommended shebang approach mentioned in the [developer notes](https://github.com/bitcoin/bitcoin/blob/master/doc/developer-notes.md#shebang)

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

Tree-SHA512: fc58632f0a6fa82c7abdddfac4897f082110d647426d2b468cba6fabf6b34a015fcad47e5b26be98e629b8b0417b8781e8d89da67189e20da228b97b17f1a532
2021-07-14 18:43:55 -05:00
fanquake
112709c153
Merge #17769: build: set AC_PREREQ to 2.69
4f4ae6f97e210fa0a2aa274bcd2a77a226fe6a7e build: set AC_PREREQ to 2.69 (fanquake)

Pull request description:

  We use build macros such as `AX_CHECK_LINK_FLAG`, that require >=2.64, so our configure should also require Autoconf >= 2.64. The build would already blow up if 2.64 wasn't available. i.e:
  ```bash
  configure.ac:320: error: Autoconf version 2.64 or higher is required
  build-aux/m4/ax_check_link_flag.m4:74: AX_CHECK_LINK_FLAG is expanded from...
  ```
  For reference, Autoconf 2.69 was released in [April of 2012](https://lists.gnu.org/archive/html/autoconf/2012-04/msg00041.html).

  See the [Autoconf Versioning docs](https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Versioning.html) for more info on `AC_PREREQ`.

ACKs for top commit:
  hebasto:
    re-ACK 4f4ae6f97e210fa0a2aa274bcd2a77a226fe6a7e, Autoconf 2.69 seems wide available.
  laanwj:
    ACK 4f4ae6f97e210fa0a2aa274bcd2a77a226fe6a7e

Tree-SHA512: b77de9164ae6667513d40edaf9e16c6e7734c100643297b2dbb2ff54072774fdeab7b3b15d52979b99e204c1c4dcca4725ff155d7f6fdab7a867629130e10185
2021-07-14 18:43:55 -05:00
fanquake
b4a31666b3
Merge #17764: doc: Add formatting to the good first issue template
faede70882b4fd54390f5205dbe1dbcf019195c8 doc: Add formatting to the good first issue template (MarcoFalke)

Pull request description:

  Add minor formatting to the good first issue template so that it is easier to see with one glance what the required skills are.

  Preview is here: https://github.com/MarcoFalke/bitcoin-core/issues/new/choose

ACKs for top commit:
  fanquake:
    ACK faede70882b4fd54390f5205dbe1dbcf019195c8

Tree-SHA512: 0b0fcd051166981455061442e69f42c9fa726eaa228856e57434e012f7224781f4f3f12c31ce0a7a322df9999e79a8fbe63bf800b7933bc52c7cdaed90f37598
2021-07-14 18:43:54 -05:00
Wladimir J. van der Laan
4d16717c9c
Merge #17360: gui: Improve "Hide" button tool-tip message
1c26c16065182ca2d2cdbb05fae79cac8c75f17d Improve "Hide" button tool-tip message (Danny-Scott)

Pull request description:

  Cleaned up the tool tip text, it looks as though it just got included back in 2014 when the whole section was added.

  Changed hide button tool tip within transaction fee settings area from "collapse fee-settings" to "Hide transaction fee settings" to be more user friendly and fit with other tool tips.

  ![hide-transaction-fee-tool-tip](https://user-images.githubusercontent.com/17258195/68086415-b7b70680-fe43-11e9-82cb-567b9730c1b9.png)

ACKs for top commit:
  laanwj:
    ACK 1c26c16065182ca2d2cdbb05fae79cac8c75f17d

Tree-SHA512: e2c83271c273f785ac625da9f88e095076043e21a9c59792049c271747837d19483e0cae5466c26ef3231947b6245680c4c136a530ba6f1885f9ddc18f2560d6
2021-07-14 18:43:54 -05:00
fanquake
824107ecfb
Merge #17545: build: remove libanl.so.1 from ALLOWED_LIBRARIES
ec89d2882a591f6af5aad57ab8638250d9dc1add build: remove libanl.so.1 from ALLOWED_LIBRARIES (fanquake)

Pull request description:

  It should no longer be needed after: 10ae7a7b23.

  Symbol checker output for the `0.19.0.1` gitian built Linux binaries:
  ```bash
  aarch64  arm  i686-pc  risvc  symbol-check.py  x86_64
  root@557096f567b5:/test# find aarch64/ -type f -executable | xargs python3 symbol-check.py
  ['libpthread.so.0', 'libm.so.6', 'libgcc_s.so.1', 'libc.so.6', 'ld-linux-aarch64.so.1']
  ['libpthread.so.0', 'libfontconfig.so.1', 'libfreetype.so.6', 'libxcb.so.1', 'libdl.so.2', 'libm.so.6', 'libgcc_s.so.1', 'libc.so.6', 'ld-linux-aarch64.so.1']
  root@557096f567b5:/test# find arm -type f -executable | xargs python3 symbol-check.py
  ['libpthread.so.0', 'librt.so.1', 'libm.so.6', 'libgcc_s.so.1', 'libc.so.6', 'ld-linux-armhf.so.3']
  ['libpthread.so.0', 'librt.so.1', 'libfontconfig.so.1', 'libfreetype.so.6', 'libxcb.so.1', 'libdl.so.2', 'libm.so.6', 'libgcc_s.so.1', 'libc.so.6', 'ld-linux-armhf.so.3']
  root@557096f567b5:/test# find i686-pc -type f -executable | xargs python3 symbol-check.py
  ['libpthread.so.0', 'librt.so.1', 'libm.so.6', 'libgcc_s.so.1', 'libc.so.6', 'ld-linux.so.2']
  ['libpthread.so.0', 'librt.so.1', 'libfontconfig.so.1', 'libfreetype.so.6', 'libxcb.so.1', 'libdl.so.2', 'libm.so.6', 'libgcc_s.so.1', 'libc.so.6', 'ld-linux.so.2']
  root@557096f567b5:/test# find risvc/ -type f -executable | xargs python3 symbol-check.py
  ['libpthread.so.0', 'libm.so.6', 'libgcc_s.so.1', 'libc.so.6', 'ld-linux-riscv64-lp64d.so.1']
  ['libpthread.so.0', 'libfontconfig.so.1', 'libfreetype.so.6', 'libxcb.so.1', 'libdl.so.2', 'libm.so.6', 'libgcc_s.so.1', 'libc.so.6', 'ld-linux-riscv64-lp64d.so.1', 'libatomic.so.1']
  root@557096f567b5:/test# find x86_64/ -type f -executable | xargs python3 symbol-check.py
  ['libpthread.so.0', 'librt.so.1', 'libm.so.6', 'libgcc_s.so.1', 'libc.so.6', 'ld-linux-x86-64.so.2']
  ['libpthread.so.0', 'librt.so.1', 'libfontconfig.so.1', 'libfreetype.so.6', 'libxcb.so.1', 'libdl.so.2', 'libm.so.6', 'libgcc_s.so.1', 'libc.so.6', 'ld-linux-x86-64.so.2']
  ```

ACKs for top commit:
  laanwj:
    ACK, good catch ec89d2882a591f6af5aad57ab8638250d9dc1add

Tree-SHA512: 6bc118da190a5c37d26f0dfad5d4661add2ef15525668efb93425423bddbddabf3d7d8809464e79691f517fbe2aab241678652b3dc55ec3f452cf0dcbc26057c
2021-07-14 18:43:47 -05:00
Wladimir J. van der Laan
5a5cfe514c Merge #17663: build: pass -dead_strip_dylibs to ld on macOS
bd44711e1bb2eee7646f2f8e2e8763d1c216bdb9 build: pass -dead_strip_dylibs to ld on macOS (fanquake)

Pull request description:

  This strips some unused dylibs from bitcoin-qt.

  ```diff
  otool -L src/qt/bitcoin-qt
    /usr/lib/libSystem.B.dylib
  - /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration
    /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
    /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
    /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
    /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
    /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
    /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
  -/System/Library/Frameworks/Security.framework/Versions/A/Security
    /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration
    /System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics
    /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL
  -/System/Library/Frameworks/AGL.framework/Versions/A/AGL
    /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
    /usr/lib/libc++.1.dylib
    /System/Library/Frameworks/CFNetwork.framework/Versions/A/CFNetwork
    /System/Library/Frameworks/CoreText.framework/Versions/A/CoreText
    /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
    /usr/lib/libobjc.A.dylib
  ```

  `AGL` - ObjC wrapper for OpenGL.
  `DiskArbitration` - mount/unmount notifications and events.
  `Security` - low level security operations, authentication services.

  From `man ld`:
  ```
  Remove dylibs that are unreachable by the entry point or exported symbols.
  That is, suppresses the generation of load command commands for dylibs
  which supplied no symbols during the link. This option should not be
  used when linking against a dylib which is required at runtime for
  some indirect reason such as the dylib has an important initializer.
  ```

ACKs for top commit:
  theuni:
    ACK bd44711e1bb2eee7646f2f8e2e8763d1c216bdb9.

Tree-SHA512: 9592ce2966d28cb6c58e01efd401f56a4baa5dc5be5313f4fe8454632b578608be65a23c8602772049cd4655a9cb020fdd40d6622a244c301920d8c3db43f99a
2021-07-13 20:43:16 -05:00
fanquake
5ba4b29671 Merge #17547: build: Fix configure report about qr
651c636f9ed4a60c4cd003e566e3ac6ae6eda3ed build: Fix configure report about qr (Hennadii Stepanov)

Pull request description:

  On master (b7bc9b8330096d1f4f1fa563b855b88da425226e):
  ```
  $ apt list libqrencode-dev
  Listing... Done
  libqrencode-dev/bionic 3.4.4-1build1 amd64
  $ ./configure | grep -i qr
  checking for QR... no
  checking whether to build GUI with support for QR codes... no
      with qr     = auto
  ```

  With this PR:
  ```
  $ apt list libqrencode-dev
  Listing... Done
  libqrencode-dev/bionic 3.4.4-1build1 amd64
  $ ./configure | grep -i qr
  checking for QR... no
  checking whether to build GUI with support for QR codes... no
      with qr     = no
  ```

ACKs for top commit:
  laanwj:
    Concept and light code review ACK 651c636f9ed4a60c4cd003e566e3ac6ae6eda3ed
  fanquake:
    ACK 651c636f9ed4a60c4cd003e566e3ac6ae6eda3ed

Tree-SHA512: 8959b1c7da5b28d06affcdd27ff4e455f1f7d9c8363dbde8ef07aaf79139ec8bc7ce25610b28e1d90c7e168573ee90ac9ab359bf10c667d0254507f8a880a935
2021-07-13 20:43:16 -05:00
Wladimir J. van der Laan
41aba0a27a Merge #17411: doc: Add some better examples for scripted diff
adbe15504713ddba6e9c024c59d977675d49e350 doc: Add some better examples for scripted diff (Wladimir J. van der Laan)

Pull request description:

  The current example isn't too great, for example it uses `find` instead of `git ls-files`. Add a subsection with suggestions and examples.

  Feel free to propose some other great examples to add.

ACKs for top commit:
  hebasto:
    re-ACK adbe15504713ddba6e9c024c59d977675d49e350

Tree-SHA512: 38f03716a122a1791c93abc052ea7572a3d2108b3d0d93dc95d3c4a7eb190c6b639d1cc66e4f74d378c4b11d6951dbd901d0973792f8f13cbeb9d9dcf4f8e037
2021-07-13 20:43:16 -05:00
Wladimir J. van der Laan
1fc1028297 Merge #17339: doc: Add template for good first issues
7b78b8d3a64503d582af8298241a20ebf582a0c5 doc: Add template for good first issues (Michael Folkson)

Pull request description:

  closes #17317

  Attempted to address everyone's suggestions in #17317 without making it too long. The first half is for the benefit of the individual opening the issue and the second half is for the benefit of the new contributor. Ideally we don't want the second half to be deleted by the individual opening the issue but whether they delete the first half or not isn't really a concern

ACKs for top commit:
  MarcoFalke:
    ACK 7b78b8d3a64503d582af8298241a20ebf582a0c5
  jonatack:
    ACK 7b78b8d3a64503d582af8298241a20ebf582a0c5

Tree-SHA512: 5874b244a52f432637600a73aac493972971568f8d8af10aa731b8a6b221566015827dd82c310c60a76fb01140c3bc56a691206c3442018611c820d4b98d104f
2021-07-13 20:43:16 -05:00
Wladimir J. van der Laan
82184afadb Merge #17293: Add assertion to randrange that input is not 0
a35b6824f3a0bdb68c5aef599c0f17562689970e Add assertion to randrange that input is not 0 (Jeremy Rubin)

Pull request description:

  From the comment in randrange, their is an implicit argument that randrange cannot accept an argument of 0. If the argument is 0, then we have to return {}, which is not possible in a uint64_t.

  The current code takes a very interesting approach, which is to return [0..std::numeric_limits<uint64_t>]. This can cause all sorts of fun problems, like allocating a lot of memory, accessing random memory (maybe with your private keys), and crashing the computer entirely.

  This gives us three choices of how to make it "safe":

  1) return Optional<uint64_t>
  2) Change the return type to [0..range]
  3) Return 0 if 0
  4) Assert(range)

  So which solution is best?

  1) seems a bit overkill, as it makes any code using randrange worse.
  2) Changing the return type as in 2 could be acceptable, but it imposes the potential overflow checking on the caller (which is what we want).
  3) An interesting option -- effective makes the return type in {0} U [0..range]. But this is a bad choice, because it leads to code like `vec[randrange(vec.size())]`, which is incorrect for an empty vector. Null set should mean null set.
  4) Assert(range) stands out as the best mitigation for now, with perhaps a future change to solution 2. It prevents the error from propagating at the earliest possible time, so the program crashes cleanly rather than by freezing the computer or accessing random memory.

ACKs for top commit:
  instagibbs:
    Seems reasonable for now, ACK a35b6824f3
  laanwj:
    ACK a35b6824f3a0bdb68c5aef599c0f17562689970e
  promag:
    ACK a35b6824f3a0bdb68c5aef599c0f17562689970e.

Tree-SHA512: 8fc626cde4b04b918100cb7af28753f25ec697bd077ce0e0c640be0357626322aeea233e3c8fd964ba1564b0fda830b7f5188310ebbb119c113513a4b89952dc
2021-07-13 20:43:16 -05:00
MarcoFalke
960ac7194e Merge #17254: test: fix script_p2sh_tests OP_PUSHBACK2/4 missing
5710dadf9b282524fddf42c682351cd8022ed7bf test: fix script_p2sh_tests OP_PUSHBACK2/4 missing (kodslav)

Pull request description:

  Cleans up #15140 which fixes commit 6b25f29a91 where opcodes were lost in translation.

ACKs for top commit:
  laanwj:
    code review ACK 5710dadf9b282524fddf42c682351cd8022ed7bf

Tree-SHA512: 3f7fbcaf0dd199626d9ec9fdf3c5b5c5c2a91c4cfe81fae5b1d5662a48e52cf4bd27c94f8f42ebdfe7a076c5d600ada5661a6902b03eb5dc3dc953f4524345ac
2021-07-13 20:43:16 -05:00
fanquake
2747862848 Merge #17329: linter: Strip trailing / in path for git-subtree-check
60582d6060542c1e3a23141ea825e36818fbbd54 [linter] Strip trailing / in path for git-subtree-check (John Newbery)

Pull request description:

  git-subtree-check fails if the directory is given with a trailing slash,
  eg:

  ```
  > test/lint/git-subtree-check.sh src/univalue/
  ERROR: src/univalue/ is not a subtree
  ```

  Shell autocompletes will add the trailing slash when autofilling the
  path name, which will therefore cause the script to fail.

  Just ignore any trailing slash.

ACKs for top commit:
  laanwj:
    ACK 60582d6060542c1e3a23141ea825e36818fbbd54
  dongcarl:
    ACK 60582d6060542c1e3a23141ea825e36818fbbd54
  fanquake:
    ACK 60582d6060542c1e3a23141ea825e36818fbbd54 - tested before and after.

Tree-SHA512: 5a91979b60e1d4b1310fd02a0ccc5465dbff57d9c94bba81e4758442a627cfa32217ab8f973990a17b5d961ecae61fb56b56ccf10f87e61dd03e88a1e0b8f99d
2021-07-13 20:43:16 -05:00
UdjinM6
3004c3498b
Merge pull request #4245 from PastaPastaPasta/backport-triv-pr9
backport: 'trivial' pr9
2021-07-14 02:52:00 +03:00
PastaPastaPasta
e98241da5d
Merge pull request #4186 from kittywhiskers/psbt
merge #13269, #13425,  #13557,  #13721,  #13666, #13723: BIP 174 PSBT Serializations and RPCs
2021-07-13 13:54:34 -05:00
PastaPastaPasta
4f5d4be443
dashification 2021-07-13 13:14:09 -05:00
Wladimir J. van der Laan
9d1bbabbc8
Merge #17302: cli: Add "headers" and "verificationprogress" to -getinfo
31879345ee9a222b12014c8b2359e1737ff0d8c4 cli: Add "headers" and "verificationprogress" to -getinfo (Wladimir J. van der Laan)

Pull request description:

  These values are useful to know the current progress of initial sync, or of catching up, which is arguably the use of a quick `-getinfo` command.

ACKs for top commit:
  MarcoFalke:
    unsigned ACK 31879345ee9a222b12014c8b2359e1737ff0d8c4
  jonasschnelli:
    utACK 31879345ee9a222b12014c8b2359e1737ff0d8c4
  jonatack:
    Tested ACK 31879345ee9a222b12014c8b2359e1737ff0d8c4 on Debian 4.19.37-5+deb10u2 (2019-08-08) x86_64 GNU/Linux

Tree-SHA512: 185180ab426b4db5d99eb208ee88d1606f585361875ba3a92b6c28a74fe181d72ed710c8859b969ba49b1ca7d2385695932b79ff621c7a2a7cedd0df717a99ed
2021-07-13 13:14:09 -05:00
fanquake
9b8250c7c6
Merge #16986: doc: Doxygen-friendly CuckooCache comments
7aad3b68e7e1680870ca70d945eee88f790d6454 doc: Doxygen-friendly CuckooCache comments (Jon Layton)

Pull request description:

  Similar theme to #16947.

  - `invalid`, `contains` now appear in Doxygen docs
  - `setup` refers to correct argument name `b`
  - Argument references in `code blocks `
  - Lists markdown conformant, uniform line endings

  Tested with `make docs`

ACKs for top commit:
  laanwj:
    ACK 7aad3b68e7e1680870ca70d945eee88f790d6454
  practicalswift:
    ACK 7aad3b68e7e1680870ca70d945eee88f790d6454

Tree-SHA512: 70b38c10e534bad9c6ffcd88cc7a4797644afba5956d47a6c7cc655fcd5857a91f315d6da60e28ce9678d420ed4a51e22267eb8b89e26002b99cad63373dd349
2021-07-13 13:14:08 -05:00
Wladimir J. van der Laan
6a980d92d9
Merge #17226: gui: Fix payAmount tooltip in SendCoinsEntry
0fc81a1e8724547a226e5fae5c32fc32d8dfb733 gui: Fix payAmount tooltip in SendCoinsEntry (João Barbosa)

Pull request description:

  Before the tooltip shows in wrong places:

  ![Screenshot 2019-10-23 at 11 33 49](https://user-images.githubusercontent.com/3534524/67384904-f6b6a380-f589-11e9-832c-ec1643014b96.png)
  ![Screenshot 2019-10-23 at 11 33 23](https://user-images.githubusercontent.com/3534524/67384905-f74f3a00-f589-11e9-9944-a52fee097e02.png)

  Now only shows in the amount field:

  ![Screenshot 2019-10-23 at 11 35 30](https://user-images.githubusercontent.com/3534524/67384919-ff0ede80-f589-11e9-8ce4-c122e11fe885.png)

ACKs for top commit:
  laanwj:
    ACK 0fc81a1e8724547a226e5fae5c32fc32d8dfb733

Tree-SHA512: 0857e568c21d380a68c81e9be3212b1745d7d3199a1d5fdef9afc8feed0272f215726fa98bbf8a3fb332389c5454f2316bc1581f1a2ccd76cef46a0e3ac6f99f
2021-07-13 13:14:08 -05:00
MarcoFalke
432f329f83
Merge #17206: test: Add testcase to simulate bitcoin schema in leveldb
4896bacc00549c14f3284f5a2b61fb848ac31be0 Add testcase to simulate bitcoin schema in leveldb (MapleLaker)

Pull request description:

  Resurrecting #14125 with updates based on comments of closed PR

ACKs for top commit:
  laanwj:
    ACK 4896bacc00549c14f3284f5a2b61fb848ac31be0
  dongcarl:
    ACK 4896bacc00549c14f3284f5a2b61fb848ac31be0

Tree-SHA512: 3290ea7e1e998901d5ee8921d1d76cec399cae30ac1911a45b86826afed47cee1acf92bd6438f1fa11ed785a3b17abdcb1c169bc0419945eda9fe4c089d0b6eb
2021-07-13 13:14:08 -05:00
Wladimir J. van der Laan
44e79f0740
Merge #17180: gui: Improved tooltip for send amount field
088a730fe6f893d43b55ec52e6b5080fd445dd9e static tooltip (JeremyCrookshank)

Pull request description:

  I noticed that on Bitcoin sends the tooltip wasn't very clear for new users and I hope my PR is more concise. If it needs changing more will happily change too 👍
  ![IMG_20191017_192739](https://user-images.githubusercontent.com/46864828/67036925-75d45380-f114-11e9-88bf-bab58161f80a.jpg)

ACKs for top commit:
  laanwj:
    ACK 088a730fe6f893d43b55ec52e6b5080fd445dd9e

Tree-SHA512: 2b1103ac934d8f68d22333af3c0f5d4228b665b1e507378d4ae5b83cc2b6d6aeb46a3d68298cca93feb839db5caa560322c8df5261dc2f7db5abeed9f0dd9c69
2021-07-13 13:14:07 -05:00
fanquake
5857a5d5b4
Merge #17157: doc: Added instructions for how to add an upsteam to forked repo
f09ba060cacd42e4cb9a242c1d731deb1f6623c6 doc: Added instructions for how to add an upsteam to forked repo (dannmat)

Pull request description:

  As a first time git developer, I struggled to understand whether to create a new fork for each pull request or not.

  After asking the IRC chat, I have added this to the documentation to further help new developers using git.

ACKs for top commit:
  fanquake:
    ACK f09ba060cacd42e4cb9a242c1d731deb1f6623c6 - For such a simple change, I think we've bike-shed this enough already. The `bitcoin/bitcoin` repo isn't really where anyone should be learning how to use `git` etc, but I think linking out here is ok.

Tree-SHA512: e0e9d655d0725e0128673afedb81dc5ba9387968fcbb681de7e50155a2cfa1a7f39fad040b596f4de9ad6727a1a8a90fd3d36eaa5242bc12186c3b82abd23fb2
2021-07-13 13:14:07 -05:00
fanquake
062e61dc4a
Merge #17186: gui: Add placeholder text to the sign message field
7005d6ab8f4393545ec27f528d8c03fc4516ddab gui: Add placeholder text to the sign message field (Danny-Scott)

Pull request description:

  When using the sign message functionality I noticed the "message" field had no label or placeholder text to highlight what it's for.

  I've added the placeholder text to match the tool tip to help it be more user friendly.

ACKs for top commit:
  hebasto:
    Re-ACK 7005d6ab8f4393545ec27f528d8c03fc4516ddab
  fanquake:
    ACK 7005d6ab8f4393545ec27f528d8c03fc4516ddab

Tree-SHA512: 17fe51c134f6373d8d5f9ca98b15bd936da4e61aa5258ceb5d318575d49b43cbfde6f4c3f720eb5928206902e6ba52811ba08737a03c95224e45dabc947d9d11
2021-07-13 13:14:07 -05:00
fanquake
b485210d68
Merge #17162: chain: Remove CBlockIndex::SetNull helper
fa0467326ff004a0a20c6af9c8f6adcc74a0c8af chain: Set all CBlockIndex members to null, remove SetNull helper (MarcoFalke)

Pull request description:

  The first commit removes the `SetNull` helper and inlines the member initialization (C++11). See https://github.com/bitcoin/bitcoin/blob/master/doc/developer-notes.md#c-data-structures for rationale.

  <strike>The second commit adds the `cs_main` lock annotation to `RaiseValidity`. See also #17161.</strike>

ACKs for top commit:
  promag:
    Code review ACK fa0467326ff004a0a20c6af9c8f6adcc74a0c8af.
  practicalswift:
    ACK fa0467326ff004a0a20c6af9c8f6adcc74a0c8af -- diff still looks correct :)
  laanwj:
    ACK fa0467326ff004a0a20c6af9c8f6adcc74a0c8af, this makes it easy to see that all fields are initialized.

Tree-SHA512: 1b2b9fb0951c03c75b9cce322b89d4ecc9a364ae78b94d91b0b4669437824394dfada820ab6f74dfac3193f602899abfdc244ae2d9351ad293f555488f03470e
2021-07-13 13:14:06 -05:00
Wladimir J. van der Laan
bd18cd8e07
Merge #17131: rpc: fix -rpcclienttimeout 0 option
b3b26e149c34fee9c7ae8548c6e547ec6254b441 rpc: fix -rpcclienttimeout 0 option (Fabian Jahr)

Pull request description:

  fixes #17117

  I understood the bug as the help string being wrong, rather than that this feature is missing and should be added. Let me know if it should be the other way around.

  It is notable that if 0 is given as an argument, the fallback that is being used is the libevent default of 50 seconds, rather than `DEFAULT_HTTP_CLIENT_TIMEOUT` (900 seconds). This is not intuitive for the user. I could handle this in this PR but I am unsure which would be the better solution then: Actually adding the feature as described in the help string or falling back to `DEFAULT_HTTP_CLIENT_TIMEOUT`? Happy to hear opinions.

ACKs for top commit:
  MarcoFalke:
    unsigned ACK b3b26e149c34fee9c7ae8548c6e547ec6254b441

Tree-SHA512: 65e526a652c0adcdb4f895e8d78d60c7caa5904c9915b165a3ae95725c87d13af1f916359f80302452a2fcac1a80f4c58cd805ec8c28720fa4b91b3c8baa4155
2021-07-13 13:14:06 -05:00
fanquake
4c5e542c46
Merge #17125: gui: Add toolTip and placeholderText to sign message fields
610d9384de7f4de861d94c9b1af4fddc8aa57ad9 gui: Added label & tooltip for Verify Message labels (dannmat)

Pull request description:

  When using the Verify Message functionality, I found the input boxes to be rather confusing as they had no guidance for their purpose.

  I have added tooltips and labels to aid users when verifying messages in future

ACKs for top commit:
  promag:
    Code review ACK 610d9384de7f4de861d94c9b1af4fddc8aa57ad9. Nit, commit and title are a little weird. Suggestion: "gui: Add toolTip and placeholderText to sign message fields"
  MarcoFalke:
    ACK 610d9384de7f4de861d94c9b1af4fddc8aa57ad9 (looks good, didn't compile or tested the changes)
  fanquake:
    ACK - 610d9384de7f4de861d94c9b1af4fddc8aa57ad9

Tree-SHA512: d6a1bc872ad270dce440e96a163ce72cdd4708913d87a0fea749fc8cf2d8163b791cbb96a82030e0cb7d239920ceb0e3f05e0eec113f45a1a8e1309fbd92b4b0
2021-07-13 13:14:06 -05:00
Wladimir J. van der Laan
a5d5bc5ecf
Merge #17033: Disable _FORTIFY_SOURCE when enable-debug
44f7a8d7a774f82417106c452d793e6f091bc23e Disable _FORTIFY_SOURCE when enable-debug (Andrew Chow)

Pull request description:

  The `_FORTIFY_SOURCE` macro is enabled by default when hardening is enabled, but it requires optimization in order to be used. Since we disable all optimization with `--enable-debug`, this macro doesn't actually do anything and instead just causes a lot of warnings to be printed. This PR explicitly disables `_FORTIFY_SOURCE` so that these useless warnings aren't printed.

ACKs for top commit:
  laanwj:
    Thanks. ACK 44f7a8d7a774f82417106c452d793e6f091bc23e

Tree-SHA512: e9302aef794dfd9ca9d0d032179ecc51d3212a9a0204454419f410011343b27c32e6be05f385051b5b594c607b91b8e0e588f644584d6684429a649a413077d9
2021-07-13 13:14:05 -05:00
Wladimir J. van der Laan
e4457ce2ef
Merge #17085: init: Change fallback locale to C.UTF-8
facb9a1315f97489a20eb0e969fdb14b5128ed2f init: Change fallback locale to C.UTF-8 (Wladimir J. van der Laan)

Pull request description:

  Much of our code assumes file system UTF-8 support, and this is a more realistic guess for modern systems anyway than the default character set (which would be ASCII only). So change the assumed fallback locale (if no locale is defined by the user or OS) to `C.UTF-8`.

  related: https://github.com/bitcoin/bitcoin/issues/14948#issuecomment-488385462

ACKs for top commit:
  MarcoFalke:
    ACK facb9a1315f97489a20eb0e969fdb14b5128ed2f

Tree-SHA512: 5075f9fe6791572d76ec38c58cd56f04ed8086c06a7d7f446d062dffc313c62466ba81f1a7d6b8c7e95791fcff82e4f76871c3534478fbfe5beb456dd8eea340
2021-07-13 13:14:05 -05:00
fanquake
c79a03ec93
Merge #17087: build: Add variable printing target to Makefiles
181989f6c9427fc266dbdcc84cb60ac03e67cdb2 build: Add variable printing target to Makefiles (Carl Dong)

Pull request description:

  ```
  I kept finding myself needing these to debug our build system, since
  they are innocuous and are very helpful they probably belong in the
  codebase.

  Source: John Graham-Cumming
  https://www.cmcrossroads.com/article/printing-value-makefile-variable
  ```

ACKs for top commit:
  MarcoFalke:
    ACK 181989f6c9427fc266dbdcc84cb60ac03e67cdb2
  fanquake:
    ACK 181989f6c9427fc266dbdcc84cb60ac03e67cdb2 - concise amount of useful code. Tested on macOS. Did not visit the link.

Tree-SHA512: 2139621e68a499c7347663ca9dc04e166ea6280e05986c27858df0156016ef2f9461262464d70c601419384f43a4ae3bcc67dfc0a05dbeef64f08386ab429cd8
2021-07-13 13:14:05 -05:00
Wladimir J. van der Laan
22111c88f6
Merge #17066: build: Remove workaround for ancient libtool
30fc1a3f5470cb347eb4aed281242f120510466f build: Remove workaround for ancient libtool (Hennadii Stepanov)
6ca01b9a104ebadbe7e180cb2b9d390f7c09b4ab build: Ensure a minimal version of libtool (Hennadii Stepanov)

Pull request description:

  Since libtool 1.5.2, on Linux libtool no longer sets RPATH for any directories in the dynamic linker search path, so there is no longer an issue.

  This commit reverts a98356fee8.

  Refs:
  - https://wiki.debian.org/RpathIssue
  - [Debian jessie has libtool 2.4.2](https://packages.debian.org/jessie/libtool)

ACKs for top commit:
  laanwj:
    ACK 30fc1a3f5470cb347eb4aed281242f120510466f

Tree-SHA512: fab56265d4d2c96216a353cc076c6f510e15748d8134f97bae2f67b6d8c0b6a1a9f362d2ab23b19ccc3a8bba8eac3bb1668fc3e42037590f63a7ab4819c9ee15
2021-07-13 13:14:04 -05:00
Wladimir J. van der Laan
3d8cb7b430
Merge #17030: test: Fix Python Docstring to include all Args.
8acd58927a614e006641384f61f8e7fca1cc68fc Fix Python Docstring to include all Args. (John Bampton)

Pull request description:

  Found a Python function that had incorrect and missing arguments in its Docstring.

ACKs for top commit:
  laanwj:
    ACK 8acd58927a614e006641384f61f8e7fca1cc68fc

Tree-SHA512: 936f275f29a700d630bb479b5283e47b66f2df76d8b8c053f594e6aedf783cc98a29c924c3a46613f112dfc884acb50f21a0b18f96d939e887b12b921ef2e10f
2021-07-13 13:14:04 -05:00
fanquake
d96e363a3f
Merge #17031: gui: Prevent processing duplicate payment requests
3f89e1eb237efcbd6415ca2cd0acddb6596153d7 Prevent processing duplicate payment requests (João Barbosa)

Pull request description:

  Considering the following from Qt [src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm#L267](13e0a36626/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm (L267))

  ```cpp
  - (void)application:(NSApplication *)sender openFiles:(NSArray *)filenames
  {
      Q_UNUSED(filenames);
      Q_UNUSED(sender);

      for (NSString *fileName in filenames) {
          QString qtFileName = QString::fromNSString(fileName);
          if (inLaunch) {
              // We need to be careful because Cocoa will be nice enough to take
              // command line arguments and send them to us as events. Given the history
              // of Qt Applications, this will result in behavior people don't want, as
              // they might be doing the opening themselves with the command line parsing.
              if (qApp->arguments().contains(qtFileName))
                  continue;
          }
          QWindowSystemInterface::handleFileOpenEvent(qtFileName);
      }
  ```

  And that a2714a5c69f0b0506689af04c3e785f71ee0915d was merged, now Qt isn't able to filter out the above notifications, and then a [QFileOpenEvent](https://doc.qt.io/qt-5/qfileopenevent.html) event is delivered to `PaymentServer::eventFilter`, which in turn (re)adds the payment request.

  This change fixes #17025, but makes sense regardless of the issue.

ACKs for top commit:
  laanwj:
    Nah, this seems fine, utACK 3f89e1eb237efcbd6415ca2cd0acddb6596153d7
  Sjors:
    ACK 3f89e1e on macOS 10.14.6
  achow101:
    Code review ACK 3f89e1eb237efcbd6415ca2cd0acddb6596153d7

Tree-SHA512: dd1e0c73fd84953418173ca71f6f5a67ad74a5dc7e3b1d54915ef0545f513df6a24f27242a77bb094e2833a478e2f3bf30ecd50251f3c55b65e780097cb8ab4d
2021-07-13 13:14:04 -05:00
MarcoFalke
f46f16772d
Merge #16964: gui: Change sendcoins dialogue Yes to Send
a649cc6a17b8d8d602c6b67037b0c926960f9cdb Change sendcoins dialogue Yes to Send (Gregory Sanders)

Pull request description:

  It's more self-explanatory, matches "cancel" better, and makes future extensions such as https://github.com/bitcoin/bitcoin/pull/16944 more directly understandable to the user.

ACKs for top commit:
  Sjors:
    Trivial code review ACK a649cc6. I also used Send in #16966 (`ui - make send a wizard`)
  laanwj:
    ACK a649cc6a17b8d8d602c6b67037b0c926960f9cdb
  jonatack:
    Code review ACK a649cc6a17b8d8d602c6b67037b0c926960f9cdb

Tree-SHA512: fe4993bc7ac653d28f3d399ade046bcfd405511aec06ff041bb5aef47e0736faf3e3112a6db660cd761af56392dc6b97f2c2341ed3eff4490079c5eb8a0d465a
2021-07-13 13:14:03 -05:00
Wladimir J. van der Laan
ecf642bb8a
Merge #16952: gui: make sure to update the UI when deleting a transaction
addaf8af8268d918973883a304025d40af5a33c1 make sure to update the UI when deleting a transaction (Jonas Schnelli)

Pull request description:

  `CWallet::ZapSelectTx` removes transactions from the internal model, but leaves the UI in the dark.
  Adding a `NotifyTransactionChanged()` should avoid having invalid transactions in the GUI.

  Fixes #16950

ACKs for top commit:
  fanquake:
    ACK addaf8af8268d918973883a304025d40af5a33c1 - tested that this fixes #16950
  Sjors:
    tACK addaf8a: tested with an unpruned wallet by calling `removeprunedfunds` on an RBF-replaced transaction. It neatly disappears from the UI.
  kristapsk:
    ACK addaf8af8268d918973883a304025d40af5a33c1 (tested both with and without this change)

Tree-SHA512: 65e8c690847f7499e82c9fef67b60d9aaa63c853732fe7fa7281da33054fcdcd9d24f5b86de71b0827728c25bac8efb7db445863f990304ebfee6fc450620c47
2021-07-13 13:14:03 -05:00
Wladimir J. van der Laan
732b4bcc63
Merge #16931: test: add unittests for CheckProofOfWork
0cc7dd74e0af735dddf7e786f4ed136c382a4ad5 test: add unittests for CheckProofOfWork (soroosh-sdi)

Pull request description:

  following situations are covered:
  - negative target
  - overflow target
  - target easier then powLimit
  - invalid hash (hash > target)

  Signed-off-by: soroosh-sdi <soroosh.sardari@gmail.com>

ACKs for top commit:
  promag:
    ACK 0cc7dd74e0af735dddf7e786f4ed136c382a4ad5, just read the code.
  laanwj:
    ACK 0cc7dd74e0af735dddf7e786f4ed136c382a4ad5

Tree-SHA512: 9f9ee952ebb211202939450aa3d61b3c2fae992dcfcab085e877507d78e02ea39a51ccacfc4852a0555f3cba07504ee132abd5cbfed75489553bee45c760bc7e
2021-07-13 13:14:03 -05:00
Wladimir J. van der Laan
d181c0126e
Merge #16971: qt: Change default size of intro frame
8cf9898b53d74bd474cc5188e07e671e24a3791f qt: Change default size of intro frame (Emil Engler)

Pull request description:

  Because of the new pruning feature in the intro frame, the size of the intro frame is too small.
  Like you see, some text is not visible completely.

  ### Before
  ![Before](https://i.imgur.com/ppZ3Gf9.png)
  ### After
  ![After](https://i.imgur.com/wcElqLA.png)

  Update: I changed it so it adjusts the size dynamically

ACKs for top commit:
  fanquake:
    ACK 8cf9898b53d74bd474cc5188e07e671e24a3791f - Before and after macOS screens below. Given that most users will only ever see this screen once, I think Qts best effort to dynamically size it is fine.
  jonasschnelli:
    utACK 8cf9898b53d74bd474cc5188e07e671e24a3791f
  Sjors:
    Tested ACK 8cf9898 on macOS. English already fit, so to reproduce the issue, launch in German with `-resetguisettings -lang=de`.
  laanwj:
    ACK 8cf9898b53d74bd474cc5188e07e671e24a3791f

Tree-SHA512: 568b0ae0d5feeda603c0ccf67b5bb3857becea8f22fb98695e1901e662cb1e76377589e39ec743258154d7f6c4a5e544bb003fcc73597400dd427db047392638
2021-07-13 13:14:02 -05:00
Wladimir J. van der Laan
68810e8e57
Merge #16962: doc: Put PR template in comments
203a67d21f566634165531a7a75c3f8c9f9c9d6a doc: Put PR template in comments (Wladimir J. van der Laan)

Pull request description:

  This prevents the common annoyance of the text being included into PRs
  accidentally.

ACKs for top commit:
  sdaftuar:
    utACK 203a67d21f566634165531a7a75c3f8c9f9c9d6a
  fanquake:
    ACK 203a67d21f566634165531a7a75c3f8c9f9c9d6a - I make an effort to remove it whenever I see it in a PR.

Tree-SHA512: 3514d285488b7930d7f3d7f8823198d7325d8b7de57a6d8f13e559c0c23b30d58916b15782cbbdc347a375b418e9d0f7a5b99b34d26f3b957d7d5a03a3d83dfd
2021-07-13 13:14:02 -05:00
Wladimir J. van der Laan
bca013ddd6
Merge #16957: 9% less memory: make SaltedOutpointHasher noexcept
67d99900b0d770038c9c5708553143137b124a6c make SaltedOutpointHasher noexcept (Martin Ankerl)

Pull request description:

  If the hash is not `noexcept`, `unorderd_map` has to assume that it can throw an exception. Thus when rehashing care needs to be taken. libstdc++ solves this by simply caching the hash value, which increases memory of each node by 8 bytes. Adding `noexcept` prevents this caching. In my experiments with `-reindex-chainstate -stopatheight=594000`, memory usage (maximum resident set size) has decreased by 9.4% while runtime has increased by 1.6% due to additional hashing. Additionally, memusage::DynamicUsage() is now more accurate and does not underestimate.

  |                                       | runtime h:mm:ss | max RSS kbyte |
  |---------------------------------------|-----------------|--------------|
  | master                                |         4:13:59 |      7696728 |
  | 2019-09-SaltedOutpointHasher-noexcept |         4:18:11 |      6971412 |
  | change                                |          +1.65% |       -9,42% |

  Comparison of progress masters vs. 2019-09-SaltedOutpointHasher-noexcept
  ![out](https://user-images.githubusercontent.com/14386/65541887-69424e00-df0e-11e9-8644-b3a068ed8c3f.png)

ACKs for top commit:
  jamesob:
    Tested ACK 67d99900b0

Tree-SHA512: 9c44e3cca993b5a564dd61ebd2926b9c4a238609ea4d283514c018236f977d935e35a384dd4696486fd3d78781dd2ba190bb72596e20a5e931042fa465872a0b
2021-07-13 13:03:30 -05:00
Wladimir J. van der Laan
a597c1bb8e
Merge #16577: util: CBufferedFile fixes and unit test
efd2474d17098c754367b844ec646ebececc7c74 util: CBufferedFile fixes (Larry Ruane)

Pull request description:

  The `CBufferedFile` object guarantees its user is able to "rewind" the data stream (that's being read from a file) up to a certain number of bytes, as specified by the user in the constructor. This guarantee is not honored due to a bug in the `SetPos` method.

  Such rewinding is done in `LoadExternalBlockFile()` (currently the only user of this object), which deserializes a series of `CBlock` objects. If that function encounters something unexpected in the data stream, which is coming from a `blocks/blk00???.dat` file, it "rewinds" to an earlier position in the stream to try to get in sync again. The `CBufferedFile` object does not actually rewind its file offset; it simply repositions its internal offset, `nReadPos`, to an earlier position within the object's private buffer; this is why there's a limit to how far the user may rewind.

  If `LoadExternalBlockFile()` needs to rewind (call `blkdat.SetPos()`), the stream may not be positioned as it should be, causing errors in deserialization. This need to rewind is probably rare, which is likely why this bug hasn't been noticed already. But if this object is used elsewhere in the future, this could be a serious problem, especially as, due to the nature of the bug, the `SetPos()` _sometimes_ works.

  This PR adds a unit test for `CBufferedFile` that fails due to this bug. (Until now it has had no unit tests.) The unit test provides good documentation and examples for developers trying to understand `LoadExternalBlockFile()` and for future users of this object.

  This PR also adds code to throw an exception from the constructor if the rewind argument is not less than the buffer size (since that doesn't make any sense).

  Finally, I discovered that the object is too restrictive in one respect: When the deserialization methods call this object's `read` method, a check ensures that the number of bytes being requested is less than the size of the buffer (adjusting for the rewind size), else it throws an exception. This restriction is unnecessary; the object being deserialized can be larger than the buffer because multiple reads from disk can satisfy the request.

ACKs for top commit:
  laanwj:
    ACK ~after squash.~ efd2474d17098c754367b844ec646ebececc7c74
  mzumsande:
    I had intended to follow up earlier on my last comment, ACK efd2474d17098c754367b844ec646ebececc7c74. I reviewed the code, ran tests and did a successful reindex on testnet with this branch.

Tree-SHA512: 695529e0af38bae2af4e0cc2895dda56a71b9059c3de04d32e09c0165a50f6aacee499f2042156ab5eaa6f0349bab6bcca4ef9f6f9ded4e60d4483beab7e4554
2021-07-13 13:03:30 -05:00
UdjinM6
90e990e1ac
Merge pull request #4244 from PastaPastaPasta/backport-triv-pr8
backport: 'trivial' pr8
2021-07-13 20:53:57 +03:00
UdjinM6
6aea99094b
Merge pull request #4243 from Munkybooty/backports-0.18-pr7.1
Merge bitcoin#13877: utils: Make fs::path::string() always return utf-8 string on Windows
2021-07-13 20:53:30 +03:00