Commit Graph

23322 Commits

Author SHA1 Message Date
Vasil Dimov 182dbdf0f4
util: Detect posix_fallocate() instead of assuming
Don't assume that `posix_fallocate()` is available on Linux and not
available on other operating systems. At least FreeBSD has it and we
are not using it.

Properly check whether `posix_fallocate()` is present and use it if it
is.
2020-04-14 09:49:45 +02:00
fanquake 7eed413e72
Merge #18398: rpc: fix broken RPCExamples for waitforblock(height)
ef35604c9c rpc: fix broken RPCExamples for waitforblock(height) (Sebastian Falbesoner)

Pull request description:

  This PR fixes several broken RPCExamples from the "blockchain" category:
  - `HelpExampleCli` for `waitforblock` (disturbing comma between arguments)
  - `HelpExampleCli` for `waitforblockheight` (disturbing comma between arguments)
  - `HelpExampleRpc` for `waitforblockheight` (disturbing quotation marks around integer argument)

  Note that the CLI example for `waitforblockheight` would also work with the first argument in quotation marks (in contrast to the RPC example), but I removed them as well as they are not needed.

  Outputs for the non-working examples in the master branch:
  ```
  $ ./bitcoin-cli waitforblock "0000000000079f8ef3d2c688c244eb7a4570b24c9ed7b4a8c619eb02596f8862", 1000
  error code: -8
  error message:
  blockhash must be of length 64 (not 65, for '0000000000079f8ef3d2c688c244eb7a4570b24c9ed7b4a8c619eb02596f8862,')
  ```

  ```
  $ ./bitcoin-cli waitforblockheight "100", 1000
  error: Error parsing JSON:100,
  ```

  ```
  $ curl --user __cookie__ --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "waitforblockheight", "params": ["100", 1000]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  Enter host password for user '__cookie__':
  {"result":null,"error":{"code":-1,"message":"JSON value is not an integer as expected"},"id":"curltest"}
  ```

  Outputs for the fixed examples in the PR branch:
  ```
  $ ./bitcoin-cli waitforblock "0000000000079f8ef3d2c688c244eb7a4570b24c9ed7b4a8c619eb02596f8862" 1000
  {
    "hash": "0000000000000000000910ae4d56120e0ddd55c0552e80ed12dba147abc68080",
    "height": 622416
  }
  ```

  ```
  $ ./bitcoin-cli waitforblockheight 100 1000
  {
    "hash": "0000000000000000000910ae4d56120e0ddd55c0552e80ed12dba147abc68080",
    "height": 622416
  }
  ```

  ```
  $ curl --user __cookie__ --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "waitforblockheight", "params": [100, 1000]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
  Enter host password for user '__cookie__':
  {"result":{"hash":"0000000000000000000910ae4d56120e0ddd55c0552e80ed12dba147abc68080","height":622416},"error":null,"id":"curltest"}
  ```

ACKs for top commit:
  fanquake:
    ACK ef35604c9c

Tree-SHA512: b98c6681d1aa24b3ee3ef4ef450cb630082a9f8695af18f3b6d418e5b0b1e472b787ccf6397cd719b4d5fe0082ea5f1d0ca553c1cc56066ee2d288be34c601e3
2020-03-27 15:24:11 +08:00
Wladimir J. van der Laan b53af72b82
Merge #18416: util: Limit decimal range of numbers ParseScript accepts
9ab14e4d21 Limit decimal range of numbers ParseScript accepts (pierrenn)

Pull request description:

  Following up on this suggestion : https://github.com/bitcoin/bitcoin/pull/18413#issuecomment-602966490, prevent the output of `atoi64` in the `core_read.cpp:ParseScript` helper to send to `CScriptNum::serialize` values wider than 32-bit.

  Since the `ParseScript` helper is only used by the tool defined in `bitcoin-tx.cpp`, this only prevents users to provide too much unrealistic values.

ACKs for top commit:
  laanwj:
    ACK 9ab14e4d21

Tree-SHA512: ee228269d19d04e8fee0aa7c0ae2bb0a2b437b8e574356e8d9b2279318242057d51fcf39a842aa3afe27408d0f2d5276df245d07a3f4828644a366f80587b666
2020-03-27 08:02:51 +01:00
pierrenn 9ab14e4d21 Limit decimal range of numbers ParseScript accepts 2020-03-27 15:51:05 +09:00
fanquake 54646167db
Merge #18388: Make VerifyWitnessProgram use a Span stack
2b0fcff7f2 Make VerifyWitnessProgram use a Span stack (Pieter Wuille)

Pull request description:

  Here is a follow-up to #18002, again with the goal of simplifying (potential) BIP341 code.

  Instead of passing a begin and end iterator of the initial stack to `ExecuteWitnessScript`, they are turned into a `Span<const valtype>`, representing a span of `valtype`s in memory. This allows `VerifyWitnessProgram` to operate on that span directly, instead of juggling iterators around (which would be exacerbated by #17977 if trying to avoid copying the stack).

ACKs for top commit:
  ajtowns:
    ACK 2b0fcff7f2
  elichai:
    ReACK on the diff 2b0fcff7f2
  instagibbs:
    re-ACK 2b0fcff7f2
  theStack:
    re-ACK 2b0fcff7f2
  Empact:
    ACK 2b0fcff7f2
  jnewbery:
    utACK 2b0fcff7f2

Tree-SHA512: 38eb4ce17f1947674c1c274caa40feb6ea8266bd96134d9cf1bc41e6fbf1114d4dde6c7a9e26e1ca8f3d0155429ef0911cc8ec0c1037d8fe7d6ec7f9e7184e93
2020-03-27 14:49:50 +08:00
MarcoFalke e3154aacf4
Merge #18445: tests: Add fuzzing harnesses for functions/classes in chain.h and protocol.h
7834c3b9ec tests: Add fuzzing harness for functions/classes in chain.h (practicalswift)
d7930c4326 tests: Add fuzzing harness for functions/classes in protocol.h (practicalswift)

Pull request description:

  Add fuzzing harnesses for functions/classes in `chain.h` and `protocol.h`.

Top commit has no ACKs.

Tree-SHA512: ac2d66bc678ebba0ffbbc42e77806eaf3bb07413ff19219c7a83b171ccd4601e0aa8546ee7ffe8018ca4de12d080f79f693d184cc337c234cde641803279f00c
2020-03-26 20:37:48 -04:00
MarcoFalke 0dc6218c79
Merge #18270: util: Fail to parse whitespace-only strings in ParseMoney(...) (instead of parsing as zero)
100213c5c2 util: Fail to parse space-only strings in ParseMoney(...) (instead of parsing as zero) (practicalswift)

Pull request description:

  Fail to parse whitespace-only strings in `ParseMoney(...)` (instead of parsing as `0`).

  This is a follow-up to #18225 ("util: Fail to parse empty string in `ParseMoney`") which made `ParseMoney("")` fail instead of parsing as `0`.

  Context: https://github.com/bitcoin/bitcoin/pull/18225#issuecomment-592994765

  Current non-test call sites:

  ```
  $ git grep ParseMoney ":(exclude)src/test/"
  src/bitcoin-tx.cpp:    if (!ParseMoney(strValue, value))
  src/init.cpp:        if (!ParseMoney(gArgs.GetArg("-incrementalrelayfee", ""), n))
  src/init.cpp:        if (!ParseMoney(gArgs.GetArg("-minrelaytxfee", ""), n)) {
  src/init.cpp:        if (!ParseMoney(gArgs.GetArg("-blockmintxfee", ""), n))
  src/init.cpp:        if (!ParseMoney(gArgs.GetArg("-dustrelayfee", ""), n))
  src/miner.cpp:    if (gArgs.IsArgSet("-blockmintxfee") && ParseMoney(gArgs.GetArg("-blockmintxfee", ""), n)) {
  src/util/moneystr.cpp:bool ParseMoney(const std::string& str, CAmount& nRet)
  src/util/moneystr.h:NODISCARD bool ParseMoney(const std::string& str, CAmount& nRet);
  src/wallet/wallet.cpp:        if (!ParseMoney(gArgs.GetArg("-mintxfee", ""), n) || 0 == n) {
  src/wallet/wallet.cpp:        if (!ParseMoney(gArgs.GetArg("-fallbackfee", ""), nFeePerK)) {
  src/wallet/wallet.cpp:        if (!ParseMoney(gArgs.GetArg("-discardfee", ""), nFeePerK)) {
  src/wallet/wallet.cpp:        if (!ParseMoney(gArgs.GetArg("-paytxfee", ""), nFeePerK)) {
  src/wallet/wallet.cpp:        if (!ParseMoney(gArgs.GetArg("-maxtxfee", ""), nMaxFee)) {
  ```

ACKs for top commit:
  Empact:
    ACK 100213c5c2
  sipa:
    ACK 100213c5c2
  theStack:
    ACK 100213c5c2

Tree-SHA512: cadfb1ac8276cf54736c3444705f2650e7a08023673aedc729fabe751ae80f6c490fc0945ee38dbfd02c95e4d9853d1e4c84f5d3c310f44eaf3585afec8a4c22
2020-03-26 20:25:55 -04:00
practicalswift 7834c3b9ec tests: Add fuzzing harness for functions/classes in chain.h 2020-03-26 21:21:34 +00:00
practicalswift d7930c4326 tests: Add fuzzing harness for functions/classes in protocol.h 2020-03-26 21:21:34 +00:00
MarcoFalke 7f9dedb22d
Merge #18441: ci: Remove misplaced comments from folded block scalar
e41e46cee0 ci: Remove misplaced comments from folded block scalar (Hennadii Stepanov)

Pull request description:

  On master (f3a91ab0ed) the [build log for ARM](https://travis-ci.org/github/bitcoin/bitcoin/jobs/667247758) contains:
  ```
  $ export FILE_ENV="./ci/test/00_setup_env_arm.sh"
  $ export QEMU_USER_CMD=""
  $ export Can=
  $ export run=
  $ export the=
  $ export tests=
  $ export natively=
  $ export without=
  $ export qemu=

  Setting up build cache
  ...
  ```
  and
  ![Screenshot from 2020-03-26 18-58-50](https://user-images.githubusercontent.com/32963518/77674223-e28d2d00-6f93-11ea-82a1-7f805ccb678d.png)

  With this PR:
  ```
  $ export FILE_ENV="./ci/test/00_setup_env_arm.sh"
  $ export QEMU_USER_CMD=""

  Setting up build cache
  ...
  ```

  and
  ![Screenshot from 2020-03-26 19-01-56](https://user-images.githubusercontent.com/32963518/77674456-4d3e6880-6f94-11ea-9c83-546c81f1cdf7.png)

  ---

  Also Travis [build config validation](https://docs.travis-ci.com/user/build-config-validation) added:
  ![Screenshot from 2020-03-26 19-04-19](https://user-images.githubusercontent.com/32963518/77674686-9ee6f300-6f94-11ea-900f-fdef8a673113.png)

Top commit has no ACKs.

Tree-SHA512: a3ea05d543a4d46c65fffd7c67df9bbd4ca8d426fa215c5ce26653de34145edd419a54884da0416608a2c90bf5b421cab3ec32290c8916f10399354b44ddeb99
2020-03-26 14:04:41 -04:00
Hennadii Stepanov e41e46cee0
ci: Remove misplaced comments from folded block scalar
Also Travis build config validation added.
2020-03-26 19:55:29 +02:00
Wladimir J. van der Laan 694f4cbd78
Merge #18312: wallet: remove deprecated fee bumping by totalFee
c3857c5fcb wallet: remove CreateTotalBumpTransaction() (Jon Atack)
4a0b27bb01 wallet: remove totalfee from createBumpTransaction() (Jon Atack)
e347cfa9a7 rpc: remove deprecated totalFee arg from RPC bumpfee (Jon Atack)
bd05f96d79 test: delete wallet_bumpfee_totalfee_deprecation.py (Jon Atack)
a6d1ab8caa test: update bumpfee testing from totalFee to fee_rate (Jon Atack)

Pull request description:

  Since 0.19, fee-bumping using `totalFee` was deprecated in #15996 and replaced by `fee_rate` in #16727. This changeset removes it.

ACKs for top commit:
  laanwj:
    ACK c3857c5fcb

Tree-SHA512: c1bb15d664baf4d2dea06981f36384af02057d125c51fcbc8640b9d5563532187c7b84aa952f7b575255a88ce383ed4d7495bec920a47b05b6fc0d432dce1f00
2020-03-26 18:34:49 +01:00
Jon Atack c3857c5fcb
wallet: remove CreateTotalBumpTransaction() 2020-03-26 17:54:23 +01:00
Jon Atack 4a0b27bb01
wallet: remove totalfee from createBumpTransaction() 2020-03-26 17:54:21 +01:00
Jon Atack e347cfa9a7
rpc: remove deprecated totalFee arg from RPC bumpfee 2020-03-26 17:54:18 +01:00
MarcoFalke 94d3063c93
Merge #18412: script: fix SCRIPT_ERR_SIG_PUSHONLY error string
41ff4992e5 script: fix SCRIPT_ERR_SIG_PUSHONLY error string (Sebastian Falbesoner)

Pull request description:

  Fixes #18411, changing the error message from `"Only non-push operators allowed in signatures"` to `"Only push operators allowed in signatures"`.

ACKs for top commit:
  laanwj:
    ACK 41ff4992e5

Tree-SHA512: 3b75d83e2198d638d599ef6a4a8da986f0158600fe3f89f55b3759554588157acf2b0cba3f6a907164617264e7aee727d6d460b510c8b37ca7728aa79e11ad80
2020-03-26 12:34:27 -04:00
Wladimir J. van der Laan 23991ee53a
Merge #15600: lockedpool: When possible, use madvise to avoid including sensitive information in core dumps
d831831822 lockedpool: When possible, use madvise to avoid including sensitive information in core dumps (Luke Dashjr)

Pull request description:

  If we're mlocking something, it's because it's sensitive information. Therefore, don't include it in core dump files, ~~and unmap it from forked processes~~.

  The return value is not checked because the madvise calls might fail on older kernels as a rule (unsure).

ACKs for top commit:
  practicalswift:
    Code review ACK d831831822 -- patch looks correct
  laanwj:
    ACK d831831822
  jonatack:
    ACK d831831822
  vasild:
    ACK d831831822

Tree-SHA512: 9a6c1fef126a4bbee0698bfed5a01233460fbcc86380d984e80dfbdfbed3744fef74527a8e3439ea226167992cff9d3ffa8f2d4dbd5ae96ebe0c12f3eee0eb9e
2020-03-26 16:56:03 +01:00
MarcoFalke f3a91ab0ed
Merge #18438: ci: Use Homebrew addon on native macOS
25c8b73656 ci: Use Homebrew addon on native macOS (Hennadii Stepanov)
596c627a1e ci: Fix brew in Travis (Hennadii Stepanov)

Pull request description:

  Recently almost every macOS image update on Travis breaks our builds:
  - #17848
  - #18436

  This PR:
  - fixes the error caused by the recent [update](https://changelog.travis-ci.com/xcode-11-3-1-xcode-11-2-1-xcode-11-1-and-xcode11-images-updated-142286) from 10.14.4 (18E226) to 10.14.6 (18G3020) on March 25
  - leverages [Homebrew addon](https://config.travis-ci.com/ref/job/addons/homebrew) to install packages

  Homebrew is not told to install `automake` and `pkg-config` packages, as the [docs](https://docs.travis-ci.com/user/reference/osx/#compilers-and-build-toolchain) states that they are pre-installed:
  >    - automake 1.16.1
  >    - pkg-config 0.29.2

Top commit has no ACKs.

Tree-SHA512: 1a70c06468fbe162503081b03dcf54614d67abf8ff0ce07d118b5bb50bbb92c182a76f769bea586c691aa82b9281a29cdef88091acc16895817a2e7cddafec6e
2020-03-26 09:10:31 -04:00
Hennadii Stepanov 25c8b73656
ci: Use Homebrew addon on native macOS
Also the macOS image has been updated.
2020-03-26 14:57:14 +02:00
Hennadii Stepanov 596c627a1e
ci: Fix brew in Travis 2020-03-26 14:56:43 +02:00
fanquake e99ca783cd
Merge #18429: build: remove double LIBBITCOIN_SERVER from bench-Makefile
1f97b69ba2 build: remove double LIBBITCOIN_SERVER from bench-Makefile (Harris)

Pull request description:

  This PR removes the redundant **LIBBITCOIN_SERVER** linking from bench's Makefile.
  This PR is similar to https://github.com/bitcoin/bitcoin/pull/17910

  Originally, this PR was part of https://github.com/bitcoin/bitcoin/pull/18377, which later got replaced by a better one https://github.com/bitcoin/bitcoin/pull/18397 written by **hebasto**.

ACKs for top commit:
  Empact:
    Code Review ACK 1f97b69ba2
  theStack:
    ACK 1f97b69ba2
  hebasto:
    ACK 1f97b69ba2

Tree-SHA512: e43035262361d4458a7dcfc920445540f19301387814cde1be0539c936fc20da0dcbe49e5ea25385e6d36d9639515b7a4171228223da568d93427e9c32810945
2020-03-26 17:20:28 +08:00
fanquake d8ce27ff9f
Merge #18397: build: Fix libevent linking for bench_bitcoin binary
cd04286825 build: Fix typo in EVENT_CFLAGS variable (Hennadii Stepanov)
f709ad0c90 build: Fix libevent linking for bench_bitcoin binary (Hennadii Stepanov)

Pull request description:

  This change fixes `libevent` linking error for the `bench_bitcoin` binary.

  This PR is an alternative to #18377.
  Fix #18373.

  Also fixed a typo in `EVENT_CFLAGS` variable noted by **brakmic**.

ACKs for top commit:
  fanquake:
    ACK cd04286825

Tree-SHA512: a62f7457e86b11d3a55d603ea5d83f3a413792e2f28a0c72300e54d12591bd6f0acc1d76a4bd4b591e0223bc6d530e7a4b9a8b939fe2fdbf2dddfda5b1b537be
2020-03-26 16:22:24 +08:00
Wladimir J. van der Laan 2e97d80017
Merge #18134: Replace std::to_string with locale-independent alternative
d056df033a Replace std::to_string with locale-independent alternative (Ben Woosley)

Pull request description:

  Addresses #17866 following practicalswift's suggestion:
  https://github.com/bitcoin/bitcoin/issues/17866#issuecomment-584287299

  ~Used ::ToString to avoid aliasing issues. Left uses in QT and test.~

ACKs for top commit:
  practicalswift:
    ACK d056df033a
  laanwj:
    ACK d056df033a

Tree-SHA512: 9e6966a9cdd14f4a1a40d9f0fa7c402aed22b2f1ad8681708e22b050d51a91c5d62220a9ec4c425be2d57acf5c964fca87a5e981b5cbff048bc3b6720dae92b7
2020-03-25 20:11:47 +01:00
MarcoFalke 7c94225026
Merge #18430: ci: Only clone bitcoin-core/qa-assets when fuzzing
fae1e99289 ci: Only clone bitcoin-core/qa-assets when fuzzing (MarcoFalke)

Pull request description:

  Currently the only content of that repo are some seeds, so we can speed up some ci builds

ACKs for top commit:
  laanwj:
    ACK fae1e99289 (provided this passes travis)

Tree-SHA512: ed813738e7f24bb56a2f12aa3b398e414eb4f0ba98379836a33ff3e5602cbf42a28e89aad10e346468191ecddc03e60d5b236097112e27c07cb1c2293533ea58
2020-03-25 13:36:50 -04:00
Wladimir J. van der Laan 60a39a96fc
Merge #18425: releases: Update with new Windows code signing certificate
3e0df92bf2 Update with new Windows code signing certificate (Andrew Chow)

Pull request description:

  The current Windows code signing certificate is about expire (on March 26th 2020). As I have volunteered to take over the Windows code signing duties, I've purchased a new Windows code signing certificate with the same CA and under the same organization (Bitcoin Core Code Signing Association).

  A signature by the old certificate over the new certificate has been provided to me. This signature can be verified using
  ```
  openssl cms -verify -inform pem -purpose any -content path/to/new/win-codesign.cert -CAfile path/to/old/win-codesign.cert -certfile path/to/old/win-codesign.cert
  ```
  The verification should succeed and the new certificate will be printed out. This can be compared to the contents of `win-codesign.cert`.

  ```
  -----BEGIN PKCS7-----
  MIIC3AYJKoZIhvcNAQcCoIICzTCCAskCAQExDzANBglghkgBZQMEAgEFADALBgkq
  hkiG9w0BBwExggKkMIICoAIBATCBkTB8MQswCQYDVQQGEwJHQjEbMBkGA1UECBMS
  R3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHEwdTYWxmb3JkMRgwFgYDVQQKEw9T
  ZWN0aWdvIExpbWl0ZWQxJDAiBgNVBAMTG1NlY3RpZ28gUlNBIENvZGUgU2lnbmlu
  ZyBDQQIRALWcUnSOxv9FQW3xdaMDO6swDQYJYIZIAWUDBAIBBQCggeQwGAYJKoZI
  hvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMjAwMzI0MjA0ODM3
  WjAvBgkqhkiG9w0BCQQxIgQgtLkmnuSQyczDlJSnJeqbi61p3iJ/rpFABrY8JWBO
  o74weQYJKoZIhvcNAQkPMWwwajALBglghkgBZQMEASowCwYJYIZIAWUDBAEWMAsG
  CWCGSAFlAwQBAjAKBggqhkiG9w0DBzAOBggqhkiG9w0DAgICAIAwDQYIKoZIhvcN
  AwICAUAwBwYFKw4DAgcwDQYIKoZIhvcNAwICASgwDQYJKoZIhvcNAQEBBQAEggEA
  XaCl3Q8HwI9VpLCb9OY9eQh0QOPyl1KWEc3TP3UvwZwR4/gXkfPOKKf19UnS8eRB
  48SgUKRMYWoDYfSVUJRMda9BLkbJbQlHG3LFXhSY2alajpPXEHcMto/XPhVAmqzL
  w6aSNY0Gaorow696JHpetpKqAAlL1r2GjeaPYi2aZyIAifuhay/qwA+ig0SqzGOw
  UdgFZWMyS5yanq8/WlLCCql6kKOzT4tEqUaleD7R1q8BTcG2+fmhWR8WwJLpIV6y
  7GAqt0Cocu8sYpTNBNk8iKHxzZ2hMZKJpH9lHZuiJ/9vSercrvDy2R4/MG+KnBWb
  OyiFAt2mC51+63RhLOMJfg==
  -----END PKCS7-----
  ```

ACKs for top commit:
  laanwj:
    ACK 3e0df92bf2
  theuni:
    ACK 3e0df92bf2.

Tree-SHA512: 4210f4db1e805ab11231fbae49ea197257c6f7e44f1f6219685b63831704984d824ac2f9e0a3b1bd2655953af72636a474f077cb859fb35852551f5a9f8fbde3
2020-03-25 17:04:53 +01:00
MarcoFalke fae1e99289
ci: Only clone bitcoin-core/qa-assets when fuzzing 2020-03-25 11:10:18 -04:00
Wladimir J. van der Laan 3e50fdbe4e
Merge #18395: scripts: add PE dylib checking to symbol-check.py
1a0993ae35 scripts: add PE dylib checking to symbol-check.py (fanquake)

Pull request description:

  Uses `objdump -x` and looks for `DLL Name:` lines. i.e:
  ```bash
  objdump -x src/qt/bitcoin-qt.exe | grep "DLL Name:"
  	DLL Name: ADVAPI32.dll
  	DLL Name: dwmapi.dll
  	DLL Name: GDI32.dll
  	DLL Name: IMM32.dll
  	DLL Name: IPHLPAPI.DLL
  	DLL Name: KERNEL32.dll
  	DLL Name: msvcrt.dll
  	DLL Name: ole32.dll
  	DLL Name: OLEAUT32.dll
  	DLL Name: SHELL32.dll
  	DLL Name: SHLWAPI.dll
  	DLL Name: USER32.dll
  	DLL Name: UxTheme.dll
  	DLL Name: VERSION.dll
  	DLL Name: WINMM.dll
  	DLL Name: WS2_32.dll
  ```

ACKs for top commit:
  dongcarl:
    Concept ACK 1a0993ae35
  hebasto:
    ACK 1a0993ae35, tested on Linux Mint 19.3:

Tree-SHA512: 0099a50e2c616d5239a15cafa9a7c483e9c40244af41549e4738be0f5360f27a2afb956eb50b47cf446b242f4cfc6dc9d111306a056fb83789eefbd71eddabd2
2020-03-25 15:35:36 +01:00
Wladimir J. van der Laan 244e88e6b5
Merge #18402: gui: display mapped AS in peers info window
76db4b260e gui: avoid QT Designer/Form Editor re-formatting (Jon Atack)
aae26053f9 gui: display Mapped AS in peers info window (Jon Atack)

Pull request description:

  Continuing the asmap integration of #16702 which added `mapped_as` to the rpc getpeerinfo output, this adds the mapped AS to the Peers detail window in the GUI wallet.

  `$ src/qt/bitcoin-qt -asmap=<path-to-asmap-file>` (asmap on)

  ![Screenshot from 2020-03-22 12-29-56](https://user-images.githubusercontent.com/2415484/77248754-c0ae4600-6c33-11ea-9d27-a06560c180c0.jpg)

  `$ src/qt/bitcoin-qt` (asmap off)

  ![Screenshot from 2020-03-22 12-32-46](https://user-images.githubusercontent.com/2415484/77248749-bdb35580-6c33-11ea-925c-6e19ecc083ab.jpg)

  Added a tooltip and a couple of minor fixups.

ACKs for top commit:
  laanwj:
    ACK 76db4b260e

Tree-SHA512: 5f44c05c247bfabc9c161884d3af47c50a571cd02777b320ce389e61efa47706adbf0ea5e6644ae40423cb579d8bd0bb3c84fc6b618293a7add8e4327f07f63f
2020-03-25 15:11:10 +01:00
Wladimir J. van der Laan baa72cd9a2
Merge #18331: build: Use git archive as source tarball
e4d366788b build: Drop needless EXTRA_DIST content (Hennadii Stepanov)
6c4da59f5b build: Drop SOURCEDIST reordering (Hennadii Stepanov)
5e6b8b3912 build: Use git archive as source tarball (Hennadii Stepanov)

Pull request description:

  This PR:
  - is an alternative to #17104
  - closes #16734
  - closes #6753

  The idea is clear described by some developers:
  - [MarcoFalke](https://github.com/bitcoin/bitcoin/pull/17097#issuecomment-540691850):
  > This whole concept of explicitly listing each and every file manually (or with a fragile wildcard) is an obvious sisyphean task. I'd say all we need to do is run git archive and be done with it forever, see #16734, #6753, #11530 ...

  - [laanwj](https://github.com/bitcoin/bitcoin/pull/17097#issuecomment-540706025):
  > I agree, I've never been a fan of it. I don't think we have any files in the git repository we don't want to ship in the source tarball.

  ---

  The suggested changes have a downside which is pointed by [**luke-jr**](https://github.com/bitcoin/bitcoin/pull/17104#issuecomment-540828045):
  > ... but the distfile needs to include autogen-generated files.

  This means that a user is not able to run `./configure && make` right away. One must run `./autogen.sh` at first.

  Here are opinions about mandatory use of `./autogen.sh`:
  - [ryanofsky](https://github.com/bitcoin/bitcoin/issues/16734#issuecomment-534139356):
  > It's probably ok to require autogen. I think historically configure scripts were supposed to work on obscure unix systems that would just have a generic shell + make tool + c compiler, and not necessarily need gnu packages like m4 which are needed for autogen.

  - [laanwj](https://github.com/bitcoin/bitcoin/issues/16734#issuecomment-540729483):
  > I also think it's fine to require autogen. What is one dependency more, if you're building from source.

  ---

  ~Also this PR provides Windows users with ZIP archives of the sources. Additionally the commit ID is stored in these ZIP files as a file comment:~

  ---

  Note for reviewers: please verify is `git archive` output deterministic?

ACKs for top commit:
  MarcoFalke:
    re-ACK e4d366788b, only change is adding two dots in a the path 🛳
  laanwj:
    ACK e4d366788b

Tree-SHA512: d1153d3ca4a580696019b92be3555ab004d197d9a2146aacff9d3150eb7093b7d40eebd6eea12d861d93ff62d62b68706e04e64dbe5ea796ff6757486e462193
2020-03-25 14:48:44 +01:00
Harris 1f97b69ba2
build: remove double LIBBITCOIN_SERVER from bench-Makefile 2020-03-25 13:33:44 +01:00
MarcoFalke 3f5107d008
Merge #18423: tests: Add fuzzing harness for classes/functions in blockfilter.h. Add integer {de,}serialization fuzzing.
102f3267e9 tests: Add fuzzing harness for classes/functions in blockfilter.h (practicalswift)
87d24e67bb tests: Add integer serialization/deserialization fuzzing harness (practicalswift)

Pull request description:

  Add fuzzing harness for classes/functions in `blockfilter.h`.

  Add integer serialization/deserialization fuzzing harness.

Top commit has no ACKs.

Tree-SHA512: 729e6bc1adf5873a64ca334a0ddc279c6cddf208923ca37cec712e9c73d0216a641045e10084925b055230f9d31fbd85ba61e59e4da3f865a544c5f8afc05e05
2020-03-25 07:35:03 -04:00
fanquake 5b4a9f4bdf
Merge #18342: doc: Add fuzzing quickstart guides for libFuzzer and afl-fuzz
33dd764984 doc: Add fuzzing quickstart guides for libFuzzer and afl-fuzz. Simplify instructions. (practicalswift)

Pull request description:

  Add fuzzing quickstart guide to make it trivial to start fuzzing Bitcoin Core.

  Fuzzing is fun and having more people contributing coverage-increasing inputs to https://github.com/bitcoin-core/qa-assets would be awesome :)

ACKs for top commit:
  MarcoFalke:
    ACK 33dd764984
  fanquake:
    ACK 33dd764984 - ran through the quick start and process message instructions. macOS users might see issues with afl-fuzz.

Tree-SHA512: f3ca972ce6ed0df8bb8177bdbb1e16d8a235941ffe4fa7b95ce9520b6454694ee26d2c545eac0b8b81856a77e26befda0922a9121a445dd936a0e9f9dd034160
2020-03-25 15:40:54 +08:00
practicalswift 102f3267e9 tests: Add fuzzing harness for classes/functions in blockfilter.h 2020-03-24 17:01:54 +00:00
practicalswift 87d24e67bb tests: Add integer serialization/deserialization fuzzing harness 2020-03-24 16:48:28 +00:00
Andrew Chow 3e0df92bf2 Update with new Windows code signing certificate 2020-03-24 12:22:46 -04:00
MarcoFalke 5236b2e267
Merge #18417: tests: Add fuzzing harnesses for functions in addrdb.h, net_permissions.h and timedata.h
4308aa67e3 tests: Add fuzzing harness for functions in net_permissions.h (practicalswift)
43ff0d91f8 tests: Add fuzzing harness for functions in timedata.h (practicalswift)
a8695db785 tests: Add fuzzing harness for functions in addrdb.h (practicalswift)

Pull request description:

  Add fuzzing harnesses for functions in `addrdb.h`, `net_permissions.h` and `timedata.h`.

Top commit has no ACKs.

Tree-SHA512: ea41431e7f1944ecd0c102e6ea04e70d6763dc9b6e3a0949a4f7299897a92fa3e8e7139f9f65b9508ce8d45613ea24ec0fd6d4a8be3cfd7c23136512b17770eb
2020-03-24 11:35:32 -04:00
MarcoFalke 98fbb2a184
Merge #17720: test: add unit test for non-standard "scriptsig-not-pushonly" txs
5aab011805 test: add unit test for non-standard "scriptsig-not-pushonly" txs (Sebastian Falbesoner)

Pull request description:

  Approaches another missing unit test of issue #17394: Checks that the function `IsStandardTx()` returns rejection reason "scriptsig-not-pushonly" if any one of the input's scriptSig consists of any other ops than just PUSHs.

ACKs for top commit:
  MarcoFalke:
    ACK 5aab011805 🍟
  practicalswift:
    ACK 5aab011805 -- patch looks correct

Tree-SHA512: fbe25bcf57e5f0c8d2397eb67e61fe8d9145ba83032789adb2b67d6fcbcd87e6427e9d965e8cd7bbaaea482e39ec2f110f71ef2de079c7d1fba2712848caa9ba
2020-03-24 11:12:33 -04:00
practicalswift 4308aa67e3 tests: Add fuzzing harness for functions in net_permissions.h 2020-03-24 14:39:23 +00:00
practicalswift 43ff0d91f8 tests: Add fuzzing harness for functions in timedata.h 2020-03-24 14:39:23 +00:00
practicalswift a8695db785 tests: Add fuzzing harness for functions in addrdb.h 2020-03-24 14:39:23 +00:00
Jon Atack 76db4b260e
gui: avoid QT Designer/Form Editor re-formatting
Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
2020-03-24 14:04:16 +01:00
Jon Atack aae26053f9
gui: display Mapped AS in peers info window 2020-03-24 14:04:14 +01:00
Pieter Wuille 2b0fcff7f2 Make VerifyWitnessProgram use a Span stack
This allows for very cheap transformations on the range of elements that
are to be passed to ExecuteWitnessScript.
2020-03-23 14:44:58 -07:00
MarcoFalke ac579ada7e
Merge #18278: interfaces: Describe and follow some code conventions
3dc27a1524 doc: Add internal interface conventions to developer notes (Russell Yanofsky)
1dca9dc4c7 refactor: Change createWallet, fillPSBT argument order (Russell Yanofsky)
96dfe5ced6 refactor: Change Chain::broadcastTransaction param order (Russell Yanofsky)
6ceb21909c refactor: Rename Chain::Notifications methods to be consistent with other interfaces methods (Russell Yanofsky)
1c2ab1a6d2 refactor: Rename Node::disconnect methods (Russell Yanofsky)
77e4b06572 refactor: Get rid of Wallet::IsWalletFlagSet method (Russell Yanofsky)

Pull request description:

  This PR is part of the [process separation project](https://github.com/bitcoin/bitcoin/projects/10).

  This PR doesn't change behavior at all, it just cleans up code in [`src/interfaces`](https://github.com/bitcoin/bitcoin/tree/master/src/interfaces) to simplify #10102, and [documents](https://github.com/ryanofsky/bitcoin/blob/pr/ipc-conv/doc/developer-notes.md#internal-interface-guidelines) coding conventions there better

ACKs for top commit:
  hebasto:
    re-ACK 3dc27a1524, the only change since the [previous](https://github.com/bitcoin/bitcoin/pull/18278#pullrequestreview-372582146) review is rebasing.
  MarcoFalke:
    ACK 3dc27a1524 🕍

Tree-SHA512: 62e6a0f2488e3924e559d2074ed460b92e7a0a5d98eab492221cb20d59d04bbe32aef2a8aeba5e4ea9168cfa91acd5bc973dce6677be0180bd7a919354df53ed
2020-03-23 16:37:50 -04:00
Sebastian Falbesoner 41ff4992e5 script: fix SCRIPT_ERR_SIG_PUSHONLY error string 2020-03-23 17:33:48 +01:00
MarcoFalke 97b0687501
Merge #18393: tests: Don't assume presence of __builtin_mul_overflow(…) in MultiplicationOverflow(…) fuzzing harness
7c1ac70c01 tests: Don't assume presence of __builtin_mul_overflow in MultiplicationOverflow(...) fuzzing harness (practicalswift)

Pull request description:

  Don't assume presence of `__builtin_mul_overflow(…)` in `MultiplicationOverflow(…)` fuzzing harness.

  Fixes #18389.

ACKs for top commit:
  naumenkogs:
    ACK 7c1ac70

Tree-SHA512: b6f1040a088088ff7e4f5c038f0f710ca2b515387bac3cd249afe97613641f7f3754f61d73d7233f23b8296115fab5bbf656168624a2cb74909577440a49a359
2020-03-23 07:39:47 -04:00
MarcoFalke d478a737db
Merge #18392: ci: Run feature_block in valgrind
fa92af5af3 ci: Run feature_block and feature_abortnode in valgrind (MarcoFalke)
fa01febeaf test: Remove ci timeout restriction in test_runner (MarcoFalke)

Pull request description:

  Also revert commit 0a4912e46a, because some tests take too long for this to be useful anymore.

Top commit has no ACKs.

Tree-SHA512: 363f14766e1f4a5860ab668a516b41acebc6fbdf11d8defb3a95a772dbf82304ca1f5f14b1dbad97f2029503e03d92e8c69df0466a8872409c20665838f617ed
2020-03-23 07:38:07 -04:00
fanquake 57a8fa9c3b
Merge #18406: test: add executable flag for rpc_estimatefee.py
f0dfac7da3 test: add executable flag for rpc_estimatefee.py (Sebastian Falbesoner)

Pull request description:

  Again a functional test without executable flag set sneaked in (see e.g. https://github.com/bitcoin/bitcoin/pull/17806 and https://github.com/bitcoin/bitcoin/pull/16742 for previous similar PRs, setting the filemode from 644 to 755). Maybe a linter like suggested in https://github.com/bitcoin/bitcoin/pull/17830 would be worth considering to avoid future (trivial) PRs like this?

ACKs for top commit:
  promag:
    ACK f0dfac7da3.
  kristapsk:
    ACK f0dfac7da3

Tree-SHA512: b37c11bdef439aa9d5736c9e0e0bbcc19aff876744f0c4e099ca5c67c9ff1293f1f9140f0d167ea13fee5396ae017aa4a0f1bae4f7aec8fa80b46beb421561c1
2020-03-23 10:46:07 +08:00
Sebastian Falbesoner f0dfac7da3 test: add executable flag for rpc_estimatefee.py 2020-03-22 23:20:35 +01:00
MarcoFalke fa92af5af3
ci: Run feature_block and feature_abortnode in valgrind 2020-03-22 10:12:40 -04:00