Commit graph

22195 commits

Author SHA1 Message Date
fanquake 03f6f408ab
Merge #17545: build: remove libanl.so.1 from ALLOWED_LIBRARIES
ec89d2882a 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 ec89d2882a

Tree-SHA512: 6bc118da190a5c37d26f0dfad5d4661add2ef15525668efb93425423bddbddabf3d7d8809464e79691f517fbe2aab241678652b3dc55ec3f452cf0dcbc26057c
2019-11-22 09:52:58 -05:00
MarcoFalke b983e7e172
Merge #17542: build: Create test utility library from src/test/util/
a2e581de94 build: Create test utility library from src/test/util/ (Harris)

Pull request description:

  This PR creates a static **test utility library** that replaces repetitive compilations of sources from *src/test/util* in **unit**, **gui** and **bench** **tests**.

  The original issue is here: https://github.com/bitcoin/bitcoin/issues/17401

  The changes are:

  * a new *Makefile.test_util.include*
  * a new entry in *Makefile.am* that includes *Makefile.test_util.include* when testing is enabled
  * removal of all *src/test/util* headers & sources from unit, gui and bench Makefiles
  * addition of *libtest_util.a* at LDADD's of every test

ACKs for top commit:
  MarcoFalke:
    ACK a2e581de94 🍞

Tree-SHA512: d172127a26ee70d16625e17d7d94337a65472c57bb97f910c357c52d3dc082ea478ee586ee9074d9ebfeb05b75027e5e15f5bcd2aa35962dadfd9ac6bfd55ab9
2019-11-22 09:21:02 -05:00
Wladimir J. van der Laan a739d207a3
Merge #17519: rpc: Remove unused COINBASE_FLAGS
e9a27cf338 refactor: Remove unused COINBASE_FLAGS (Neha Narula)

Pull request description:

  Commit d449772cf6 stopped setting
  COINBASE_FLAGS, and it looks like it hasn't been used since P2SH.

  Following up on #17489, remove COINBASE_FLAGS which is unused. I verified that removing this did not change the contents of the coinbase's scriptSig.

ACKs for top commit:
  laanwj:
    ACK e9a27cf338
  MarcoFalke:
    ACK e9a27cf338 💻

Tree-SHA512: f9dac124ce7e3edcae974137764bb5039387b1b123b86af44486e398aa4a8d91a9ecf640e207b364ae303acbbaee7cca300d303ea3d6869ba9cae2bf555a6334
2019-11-22 09:37:01 +01:00
Harris a2e581de94
build: Create test utility library from src/test/util/ 2019-11-21 21:13:08 +01:00
Wladimir J. van der Laan 69a6f1ad1f
Merge #17513: refactor, qt: Nuke some circular dependencies
5f50599ae7 refactor: Cleanup headers from walletmodel.h (Hennadii Stepanov)
a53e9895db refactor: Nuke walletmodel circular dependency (Hennadii Stepanov)
49c4211c04 refactor: Nuke walletmodeltransaction circular dep (Hennadii Stepanov)
567cb44eb9 refactor: Nuke guiutil circular dependency (Hennadii Stepanov)
73b5505cfe refactor: Move SendCoinsRecipient in own header (Hennadii Stepanov)

Pull request description:

  This PR gets rid of the following circular dependencies:
  - `qt/guiutil` -> `qt/walletmodel` -> `qt/optionsmodel` -> `qt/guiutil`
  - `qt/walletmodel` -> `qt/walletmodeltransaction` -> `qt/walletmodel`
  - `qt/paymentserver` -> `qt/walletmodel` -> `qt/paymentserver`

ACKs for top commit:
  Sjors:
    ACK 5f50599ae7
  instagibbs:
    code review ACK 5f50599ae7
  practicalswift:
    ACK 5f50599ae7 -- diff looks correct
  promag:
    ACK 5f50599ae7.

Tree-SHA512: 070686ac82b5c68c3ef1b8b4c16b4b916b84d80d1e92e42287fdd9454671bea54779c0d2db4db623750aaaf180beaba212137190d6a427113905e2c4be5c60c5
2019-11-21 19:38:39 +01:00
MarcoFalke ae6943620a
Merge #17407: node: Add reference to mempool in NodeContext
fa538813b1 scripted-diff: Replace ::mempool with m_node.mempool in tests (MarcoFalke)
8888ad02e2 test: Replace recursive lock with locking annotations (MarcoFalke)
fac07f2038 node: Add reference to mempool in NodeContext (MarcoFalke)

Pull request description:

  This is the first step toward making the mempool a global that is not initialized before main.

  #### Motivation

  Currently the mempool is a global that is initialized before the `main` function. This is confusing and easy to get wrong. E.g. the mempool constructor queries state that has not been initialized, like randomness (fixed), or command line arguments (not an issue last time I checked). Also without having the chainstate (chain tip) initialized first, it doesn't make conceptually sense to have a mempool, since the mempool builds txs on top of the utxo set (chain tip).

  Finally, in the future someone might want to run a consensus-only full node (`-nowallet -noblockfilter -no... -nomempool` command line options) that only verifies blocks and updates the utxo set.

  This is conceptually the same change that has already been done for the connection manager `CConnman`.

ACKs for top commit:
  jnewbery:
    utACK fa538813b1
  ariard:
    Tested ACK fa53881.

Tree-SHA512: 2c446a8a51476354aad7126c2b833500d36b24490caa94f847b2bdc622054de0dae28980f23e3d91b1b492dc32931656d98dbd019af9e4e58f2f8c5375aac694
2019-11-21 10:18:02 -05:00
MarcoFalke 5ff798c39b
Merge #17439: refactor: Use proper MAX_SCRIPT_ELEMENT_SIZE constants consistently
cb9d830a00 test: Use proper MAX_SCRIPT_ELEMENT_SIZE (Hennadii Stepanov)
402ee706d8 refactor: Use proper MAX_SCRIPT_ELEMENT_SIZE const (Hennadii Stepanov)

Pull request description:

  This PR replaces well-known "magic" numbers with proper `MAX_SCRIPT_ELEMENT_SIZE` constants.

ACKs for top commit:
  practicalswift:
    ACK cb9d830a00 -- diff looks correct and change appears to be complete
  instagibbs:
    utACK cb9d830a00

Tree-SHA512: 5fa033275d6df7e35962c38bfdf09a7b5cd7ef2ccdd5e30a39ba47d0c21ac779a5559c23f5ef5bfd4293be0fc639e836a308bbedf0e34717e1eead983b389bbd
2019-11-21 10:11:06 -05:00
Neha Narula e9a27cf338 refactor: Remove unused COINBASE_FLAGS
Commit d449772cf6 stopped setting
COINBASE_FLAGS, and it looks like it hasn't been used since P2SH.
Update the help string to remove "flags", which is not specified in
BIP 22.
2019-11-20 19:06:52 -05:00
MarcoFalke b7bc9b8330
Merge #17444: wallet: Avoid showing GUI popups on RPC errors (take 2)
faffa7f0dc wallet: Avoid showing GUI popups on RPC errors (take 2) (MarcoFalke)

Pull request description:

  Commit 8b0d82bb42 claims "This commit does not change behavior." However, it re-introduced the bug I tried to fix in #17070

ACKs for top commit:
  ryanofsky:
    Code review ACK faffa7f0dc

Tree-SHA512: 99987f80c76414dca40c7d76b2fe4ea853debbe3c49e7acdeab2596c726a2935c468f4484d49212e65ecc9c8b0d861c0c2b83c1ddfc07670540699199dbfecb0
2019-11-20 16:53:18 -05:00
MarcoFalke 41162c0ba0
Merge #17423: ci: Make ci system read-only on the git work tree
fa7523d3aa ci: Extend docs (MarcoFalke)
fa493ef088 ci: Make ci system read-only on the git work tree (MarcoFalke)
fab1333292 ci: Remove git from required packages on host (MarcoFalke)
fa00393bce ci: Make all filesystem operations inside docker (MarcoFalke)

Pull request description:

  Running the ci completely in a docker, without leaving any traces on the host system is not possible right now because the ccache and depends dir needs to be propagated back and picked up by the host for caching.

  Fixes #17372

ACKs for top commit:
  JeremyRubin:
    tested ACK fa7523d3aa

Tree-SHA512: 4bce1a0f883bcbdb34abf409bdbc80d420c5da2045d2f9c5536ac433f9e5b490f23df084546c8c049f688b487572bbfc4f9c4029e9e672f4d9279739d066ed2e
2019-11-20 16:41:55 -05:00
fanquake ec89d2882a
build: remove libanl.so.1 from ALLOWED_LIBRARIES 2019-11-20 15:05:35 -05:00
MarcoFalke a8d9f7dfa7
Merge #17420: travis: Rework CACHE_ERR_MSG
9999a79074 travis: Rework CACHE_ERR_MSG (MarcoFalke)

Pull request description:

  This should fix the misconception that we can fix build problems in forked repos. See https://github.com/bitcoin/bitcoin/pull/17418#issuecomment-551917920

Top commit has no ACKs.

Tree-SHA512: e0c86f6613fa38f4d4984420fa1fdc999829407c71024c3b92fd1d35afa98f4b5073af72656c83f607d5f6fab15f9ea629ca8be0b4e892c2fb65a226036c470a
2019-11-20 12:47:27 -05:00
fanquake 3671c5721d
Merge #17532: test: add functional test for non-standard txs with too large scriptSig
8f2d7737cc test: add functional test for non-standard txs with too large scriptSig (Sebastian Falbesoner)

Pull request description:

  Approaches another missing functional test of issue #17394 (counterpart to unit test in PR #17480, Commit 5e8a56348b): A transaction is rejected by the mempool with reason `"scriptsig-size"` if any of the inputs' scriptSig is larger than 1650 bytes.

ACKs for top commit:
  MarcoFalke:
    ACK 8f2d7737cc
  instagibbs:
    ACK 8f2d7737cc

Tree-SHA512: 7a45b8a4181158be3e3b91756783ddf032f132ca8780dc35fac91b2df2149268f784d28ac56005135c4d86a357c57805c5a54b8155f0d049932844b18dc03992
2019-11-20 11:29:27 -05:00
fanquake 76e777df83
Merge #16161: util: Fix compilation errors in support/lockedpool.cpp
30fb598737 Fix segfault in allocator_tests/arena_tests (Jeffrey Czyz)
15c84f53f4 Define ARENA_DEBUG in Travis test runs (Jeffrey Czyz)
ad71548822 Fix compilation errors in support/lockedpool.cpp (Jeffrey Czyz)

Pull request description:

  Changes in #12048 cause a compilation error in Arena::walk() when
  ARENA_DEBUG is defined. Specifically, Arena's chunks_free map was
  changed to have a different value type.

  Additionally, missing includes cause other compilation errors when
  ARENA_DEBUG is defined.

  Reproduced with:

  make CPPFLAGS=-DARENA_DEBUG

ACKs for top commit:
  laanwj:
    ACK 30fb598737
  fanquake:
    ACK 30fb598737 - thanks for following up jkczyz.

Tree-SHA512: 4eec368a4e9c67e4e2a27bc05608a807c2892d50c60d06ed21490cd274c0369f9671bc05b3006acc2a193316caf4896454c9c299603bfed29bd488f1987ec446
2019-11-20 09:54:31 -05:00
Wladimir J. van der Laan 26744ae189
Merge #17446: gui: Changed tooltip for 'Label' & 'Message' text fields to be more clear
8944c1d340 Changed tooltips of receive form to highlight difference between Label and Message (dannmat)

Pull request description:

  I have changed the tooltips for 'Label' & 'Message' text fields to be more clear, stating the difference between the two (#17173)

ACKs for top commit:
  MarcoFalke:
    ACK 8944c1d340
  laanwj:
    ACK 8944c1d340

Tree-SHA512: 7fbea4d3c4416264ae6c146d51d29958c418a278bdd6744133db0b684ad7a9413178c005592aa21a81d127f3f3a8583fc5de00078239db08e6f101f657a5dd3a
2019-11-20 14:25:43 +01:00
Wladimir J. van der Laan 36191a8bb5
Merge #12461: scripted-diff: Rename key size consts to be relative to their class
0580f86bb4 Fixup whitespace (Ben Woosley)
47101bbb27 scripted-diff: Rename CPubKey and CKey::*_KEY_SIZE and COMPRESSED_*_KEY_SIZE (Ben Woosley)

Pull request description:

  ~~And introduce CPubKeySig to host code relative to key sigs.~~

ACKs for top commit:
  meshcollider:
    utACK 0580f86bb4

Tree-SHA512: 29aa0be54912358b138e391b9db78639786f56580493e590ec9f773c0e1b421740133d05a79be247c7ee57e71c9c9e41b9cb54088cb3c0e3f813f74f0895287b
2019-11-20 12:43:55 +01:00
Wladimir J. van der Laan 6496bb87af
Merge #17008: build: bump libevent to 2.1.11 in depends
02ac445b2f bump libevent to 2.1.11 in depends (stefanwouldgo)

Pull request description:

  this doesn't need patches on Android anymore like 2.1.8 did.

ACKs for top commit:
  laanwj:
    ACK 02ac445b2f

Tree-SHA512: 1fbfe342ee15fa4c5cb417979bd6c443f7c7aa40a489accf8ccd7c919e5b08e859b3da6edeee3de484f6f156b35dd4e97c7e2c7971b59fc31029865585ccb296
2019-11-20 12:27:10 +01:00
Sebastian Falbesoner 8f2d7737cc test: add functional test for non-standard txs with too large scriptSig
A transaction is rejected by the mempool with reason "scriptsig-size" if any of
the inputs' scriptSig is larger than 1650 bytes.
2019-11-20 11:01:27 +01:00
fanquake b4a1da9ef8
Merge #17515: Remove straggling OpenSSL references from doc and build
ea3c7e585c test: Remove libssl-dev packages from CI scripts (Wladimir J. van der Laan)
7ea55264b9 test: remove lsan suppression for libcrypto (Wladimir J. van der Laan)
2d7066527a build: remove libcrypto as internal dependency in libbitcoinconsensus.pc (Wladimir J. van der Laan)
278751ea11 doc: Remove ssl as a required dependency from build-unix (Wladimir J. van der Laan)

Pull request description:

  Some doc and build cleanups following #17265.

  I intentionally left the libssl-dev install in `gitian-win-signer.yml`, as it's necessary for the ossl signer.

ACKs for top commit:
  MarcoFalke:
    ACK ea3c7e585c 🗯
  jamesob:
    ACK ea3c7e585c
  practicalswift:
    ACK ea3c7e585c - nice!
  fanquake:
    ACK ea3c7e585c - thanks.

Tree-SHA512: 67ea35bdd6d6e512d69e6734713534c88cae033a2ed695677ea15c3e3d5ff570374e342775c88e60877fa43a19047853e7b2a433e2c9a4349a5c423726a7457e
2019-11-19 11:38:06 -05:00
MarcoFalke e1df922132
Merge #17497: test: skip tests when utils haven't been compiled
a67352161c test: skip tool_wallet test when bitcoin-wallet isn't compiled (fanquake)
e9277baed6 test: skip wallet_listreceivedby test when the cli isn't compiled (fanquake)
621d398750 test: skip bitcoin_cli test when the cli isn't compiled (fanquake)

Pull request description:

  Don't try and run the `interface_bitcoin_cli.py` test when `bitcoin-cli` isn't available.

  ```bash
  stdout:
  2019-11-17T01:51:41.623000Z TestFramework (INFO): Initializing test directory /var/folders/z2/cn877pxd3czdfh47mfkmbwgm0000gn/T/test_runner_₿_🏃_20191116_205141/interface_bitcoin_cli_0
  2019-11-17T01:51:41.890000Z TestFramework (ERROR): Unexpected exception caught during testing
  Traceback (most recent call last):
    File "/Users/michael/github/bitcoin/test/functional/test_framework/test_framework.py", line 111, in main
      self.run_test()
    File "/Users/michael/github/bitcoin/test/functional/interface_bitcoin_cli.py", line 18, in run_test
      cli_response = self.nodes[0].cli("-version").send_cli()
    File "/Users/michael/github/bitcoin/test/functional/test_framework/test_node.py", line 528, in send_cli
      process = subprocess.Popen(p_args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True)
    File "/Users/michael/.pyenv/versions/3.5.6/lib/python3.5/subprocess.py", line 676, in __init__
      restore_signals, start_new_session)
    File "/Users/michael/.pyenv/versions/3.5.6/lib/python3.5/subprocess.py", line 1289, in _execute_child
      raise child_exception_type(errno_num, err_msg)
  FileNotFoundError: [Errno 2] No such file or directory: '/Users/michael/github/bitcoin/src/bitcoin-cli'
  ```

Top commit has no ACKs.

Tree-SHA512: de27513a615d9d21271a0948e012c3209351e7374efd19bfa1bb9cda77e8fffe15d99e3424e4dbfa8cf826084f8af1670726f4703bd2b6093e7d37df4bea64f0
2019-11-19 10:11:49 -05:00
Hennadii Stepanov 5f50599ae7
refactor: Cleanup headers from walletmodel.h 2019-11-19 17:05:35 +02:00
Hennadii Stepanov a53e9895db
refactor: Nuke walletmodel circular dependency 2019-11-19 17:05:35 +02:00
Hennadii Stepanov 49c4211c04
refactor: Nuke walletmodeltransaction circular dep 2019-11-19 17:05:35 +02:00
Hennadii Stepanov 567cb44eb9
refactor: Nuke guiutil circular dependency
Co-authored-by: Gregory Sanders <gsanders87@gmail.com>
2019-11-19 17:07:18 +02:00
Hennadii Stepanov 73b5505cfe
refactor: Move SendCoinsRecipient in own header
Co-authored-by: Gregory Sanders <gsanders87@gmail.com>
2019-11-19 17:05:35 +02:00
Wladimir J. van der Laan 92db280817
Merge #17411: doc: Add some better examples for scripted diff
adbe155047 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 adbe155047

Tree-SHA512: 38f03716a122a1791c93abc052ea7572a3d2108b3d0d93dc95d3c4a7eb190c6b639d1cc66e4f74d378c4b11d6951dbd901d0973792f8f13cbeb9d9dcf4f8e037
2019-11-19 15:21:37 +01:00
Wladimir J. van der Laan adbe155047 doc: Add some better examples for scripted diff
The current example isn't too great, for example it uses `find` instead
of `git ls-files`. Add a subsection with suggestions and examples.
2019-11-19 15:13:57 +01:00
Wladimir J. van der Laan ea3c7e585c test: Remove libssl-dev packages from CI scripts 2019-11-19 15:04:43 +01:00
Wladimir J. van der Laan 7ea55264b9 test: remove lsan suppression for libcrypto 2019-11-19 15:03:44 +01:00
Wladimir J. van der Laan 2d7066527a build: remove libcrypto as internal dependency in libbitcoinconsensus.pc 2019-11-19 15:03:44 +01:00
Wladimir J. van der Laan 278751ea11 doc: Remove ssl as a required dependency from build-unix 2019-11-19 15:03:44 +01:00
Wladimir J. van der Laan 2065ef66ee
Merge #17265: Remove OpenSSL
e5a0bece6e doc: add OpenSSL removal to release-notes.md (fanquake)
397dbae070 ci: remove OpenSSL installation (fanquake)
a4eb839619 doc: remove OpenSSL from build instructions and licensing info (fanquake)
648b2e3c32 depends: remove OpenSSL package (fanquake)
8983ee3e6d build: remove OpenSSL detection and libs (fanquake)
b49b6b0f70 random: Remove remaining OpenSSL calls and locking infrastructure (fanquake)
4fcfcc294e random: stop retrieving random bytes from OpenSSL (fanquake)
5624ab0b4f random: stop feeding RNG output back into OpenSSL (fanquake)

Pull request description:

  Now that #17165 has been merged, removing our remaining OpenSSL usage is possible.

  That remaining usage was a call to [`RAND_bytes`](https://www.openssl.org/docs/manmaster/man3/RAND_bytes.html) during the ::SLOW path of [ProcRand](https://github.com/bitcoin/bitcoin/blob/master/src/random.cpp#L616). As well as feeding output from our RNG back into OpenSSL via [`RAND_add`](https://www.openssl.org/docs/manmaster/man3/RAND_add.html) during the ::SLOW and ::SLEEP paths.

  Optimistically tagged for `0.20.0`. Needs discussion, potentially in an upcoming weekly meeting?

  Closes #12530.

ACKs for top commit:
  MarcoFalke:
    ACK e5a0bece6e
  laanwj:
    ACK e5a0bece6e

Tree-SHA512: 02fce08ec91d20e0da51e9314eec53dcf8699cded02f0a005417d627520c20b826332cb42bdae132af283d4903aa3088a9f613f3aea915d655a51532a4d4796c
2019-11-19 09:26:13 +01:00
fanquake a67352161c
test: skip tool_wallet test when bitcoin-wallet isn't compiled 2019-11-18 16:48:52 -05:00
fanquake e9277baed6
test: skip wallet_listreceivedby test when the cli isn't compiled 2019-11-18 16:47:41 -05:00
fanquake 621d398750
test: skip bitcoin_cli test when the cli isn't compiled 2019-11-18 16:19:15 -05:00
MarcoFalke 30521302f9
Merge #17136: tests: Add fuzzing harness for various PSBT related functions
49f4c7f069 tests: Add fuzzing harness for various PSBT related functions (practicalswift)

Pull request description:

  Add fuzzing harness for various PSBT related functions.

  **Testing this PR**

  Run:

  ```
  $ CC=clang CXX=clang++ ./configure --enable-fuzz \
        --with-sanitizers=address,fuzzer,undefined
  $ make
  $ src/test/fuzz/psbt
  ```

ACKs for top commit:
  MarcoFalke:
    re-ACK 49f4c7f069 🐟

Tree-SHA512: 4cebe62bd8c244ee40a43e829f5bd175ab40e1dfbbab1affb1529374858225820d6c9fa9ba45862bf56c1522845422fd96d620cedbdec52a67ac1449dec4e1b2
2019-11-18 12:17:08 -05:00
practicalswift 49f4c7f069 tests: Add fuzzing harness for various PSBT related functions 2019-11-18 16:52:56 +00:00
MarcoFalke 397c6d32c8
Merge #17503: doc: Remove bitness from bitcoin-qt help message and manpage
e161bc74d2 doc: Remove bitness from bitcoin-qt help message and manpage (Wladimir J. van der Laan)

Pull request description:

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

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

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

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

Tree-SHA512: d38754903252896dc86fac6c12ad6615d322c2744db7c02b18574a08c69e8876b2c905e1f09b324002236b111ee93479f89769c562e7b3b2e6eb2992d76464ef
2019-11-18 09:35:07 -05:00
fanquake e5a0bece6e
doc: add OpenSSL removal to release-notes.md 2019-11-18 09:19:04 -05:00
fanquake 397dbae070
ci: remove OpenSSL installation 2019-11-18 08:56:48 -05:00
fanquake a4eb839619
doc: remove OpenSSL from build instructions and licensing info 2019-11-18 08:56:48 -05:00
fanquake 648b2e3c32
depends: remove OpenSSL package 2019-11-18 08:56:47 -05:00
fanquake 8983ee3e6d
build: remove OpenSSL detection and libs 2019-11-18 08:56:47 -05:00
fanquake b49b6b0f70
random: Remove remaining OpenSSL calls and locking infrastructure 2019-11-18 08:56:47 -05:00
fanquake 4fcfcc294e
random: stop retrieving random bytes from OpenSSL
On the ::SLOW path we would use OpenSSL as an additional source of
random bytes. This commit removes that functionality. Note that this was
always only an additional source, and that we never checked the return
value

RAND_bytes(): https://www.openssl.org/docs/manmaster/man3/RAND_bytes.html

RAND_bytes() puts num cryptographically strong pseudo-random bytes into buf.
2019-11-18 08:56:40 -05:00
fanquake 5624ab0b4f
random: stop feeding RNG output back into OpenSSL
On the ::SLOW or ::SLEEP paths, we would feed our RNG output back into
OpenSSL using RAND_add. This commit removes that functionality.

RAND_add(): https://www.openssl.org/docs/manmaster/man3/RAND_add.html

RAND_add() mixes the num bytes at buf into the internal state of the
random generator. This function will not normally be needed, as
mentioned above. The randomness argument is an estimate of how much
randomness is contained in buf, in bytes, and should be a number
between zero and num.
2019-11-18 08:48:39 -05:00
Wladimir J. van der Laan 6fde676f64
Merge #16669: build: use new fork of osslsigncode for windows gitian signing
feb5075777 build: use osslsigncode 2.0 in gitian (fanquake)

Pull request description:

  The original osslsigncode project, https://sourceforge.net/projects/osslsigncode, has been marked as abandonware:
  > This is now - and has been for a long while - abandonware. Feel free to create your own forks etc.".

  However, a fork has emerged, https://github.com/mtrojnar/osslsigncode, that has incorporated
  theuni's patches ([add the -pem option in extract-signature mode ](36715c1183) & [add the attach-signature command](3be7eb1676)) as well as updated the tool to work with OpenSSL 1.1 and other improvements.

  This commit switches the windows signer descriptor to use this new version of `osslsigncode`.

  I've tested using this new version of `osslsigncode` while doing a 0.18.1 gitian build, and it "seems" to work. However this needs a look over from Cory, to check if the tool is still compatible with his usage in the [`detached-sig-create.sh`](https://github.com/bitcoin/bitcoin/blob/master/contrib/windeploy/detached-sig-create.sh) script, as well as some review of the changes to `osslsigncode` itself. Hence WIP and chasing Concept ACKs / NACKs.

ACKs for top commit:
  MarcoFalke:
    Concept ACK feb5075777 given that this upstream is now used in Ubuntu and Debian
  laanwj:
    ACK feb5075777

Tree-SHA512: c48de6dc32751d96dd04b920bfacca40af47a2883330ba0700371d56c580a7e45cedd8d8a913709d56be036762b63cb1825a98cff7aa77b6d7804fab11220850
2019-11-18 14:39:19 +01:00
Wladimir J. van der Laan ca1eeba0b0
Merge #17488: test: fix "bitcoind already running" warnings on macOS
1c23ea5fe6 test: fix bitcoind already running warnings on macOS (fanquake)

Pull request description:

  On macOS, `pidof` installed via brew returns b'' rather than None.
  Account for this, to remove spurious warnings from the test_runner.

ACKs for top commit:
  laanwj:
    ACK 1c23ea5fe6

Tree-SHA512: 640f4323d4105eac5c7abb52daf80486d5d3b4a074720490ceeb97c3dd8d73a3de9a988d2550f1e2076c620bb10d452b2959d8b723d2ee64f499878909824e31
2019-11-18 14:23:41 +01:00
Wladimir J. van der Laan 63fac52f31
Merge #17328: GuessVerificationProgress: cap the ratio to 1
2f5f7d6b13 GuessVerificationProgress: cap the ratio to 1 (darosior)

Pull request description:

  Noticed `getblockchaininfo` would return a `verificationprogress` > 1, especially while generating. This caps the verification progress to `1`.

  Tried to append a check to functional tests but this would pass even without the patch, so it seems better to not add a superfluous check (but this can easily be reproduced by trying to generate blocks in the background and `watch`ing `getblockchainfo`).

ACKs for top commit:
  laanwj:
    ACK 2f5f7d6b13
  promag:
    ACK 2f5f7d6b13.

Tree-SHA512: fa3aca12acab9c14dab3b2cc94351082f548ea6e6c588987cd86e928a00feb023e8112433658a0e85084e294bfd940eaafa33fb46c4add94146a0901bc1c4f80
2019-11-18 14:14:03 +01:00
Wladimir J. van der Laan 24647a09e7
Merge #17470: ci: Use clang-8 for fuzzing to run on aarch64 ci systems
fa2ec9f451 fuzz: Bump timeout in test_runner to accomodate for slow arm64 CPUs (MarcoFalke)
fa6e01b2f3 ci: Use clang-8 for fuzzing to run on aarch64 ci systems (MarcoFalke)

Pull request description:

  Ubuntu bionic clang is clang version 6, which does not come with libfuzzer. So the ci system breaks down when run on aarch64.

  Fix that by using clang-8

  For reference, the previous error on my ci system was:

  ```
  /usr/bin/ld: cannot find /usr/lib/llvm-6.0/lib/clang/6.0.0/lib/linux/libclang_rt.fuzzer-aarch64.a: No such file or directory

ACKs for top commit:
  laanwj:
    ACK fa2ec9f451

Tree-SHA512: 4954dbc36c444d1ae145290115eea6291753c9810c92003ab8d75433c3fe3bfee439d3a99dc394418275527157a8b89f04038c8b16e08c69ec9ded50fb869e70
2019-11-18 14:02:04 +01:00