Commit graph

22443 commits

Author SHA1 Message Date
Gregory Sanders 38516f9078 Fix input size assertion in wallet_bumpfee.py 2019-11-15 13:58:51 -05:00
MarcoFalke fa538813b1
scripted-diff: Replace ::mempool with m_node.mempool in tests
-BEGIN VERIFY SCRIPT-
 # tx pool member access (mempool followed by dot)
 sed --regexp-extended -i -e 's/(::)?\<mempool\>\.([a-zA-Z])/m_node.mempool->\2/g' $(git grep -l mempool ./src/test)
 # plain global (mempool not preceeded by dot, but followed by comma)
 sed --regexp-extended -i -e 's/([^\.])(::)?\<mempool\>,/\1*m_node.mempool,/g'     $(git grep -l mempool ./src/test)
-END VERIFY SCRIPT-
2019-11-15 13:40:14 -05:00
MarcoFalke 8888ad02e2
test: Replace recursive lock with locking annotations
Also, use m_node.mempool instead of the global
2019-11-15 13:40:08 -05:00
MarcoFalke fac07f2038
node: Add reference to mempool in NodeContext
Currently it is an alias to the global ::mempool and should be used as
follows.

* Node code (validation and transaction relay) can use either ::mempool
  or node.mempool, whichever seems a better fit.
* RPC code should use the added convenience getter EnsureMempool, which
  makes sure the mempool exists before use. This prepares the RPC code
  to a future where the mempool might be disabled at runtime or compile
  time.
* Test code should use m_node.mempool directly, as the mempool is always
  initialized for tests.
2019-11-15 13:40:00 -05:00
MarcoFalke c7709cbf4c
Merge #17469: test: Remove fragile assert_memory_usage_stable
fac942ca57 test: Remove fragile assert_memory_usage_stable (MarcoFalke)

Pull request description:

  This test fails on arm64 and a fuzz tests seems inappropriate for the functional test suite anyway, so remove it.

  Example failures:

  * https://travis-ci.org/bitcoin/bitcoin/jobs/611497963#L14517
  * https://travis-ci.org/MarcoFalke/bitcoin-core/jobs/611029104#L3876

ACKs for top commit:
  jamesob:
    ACK fac942ca57

Tree-SHA512: 3577e7ce5891d221cb798454589ba796ed0c06621a26351bb919c23bc6bb46aafcd0b11cb02bbfde64b74d67cb2950da44959a7ecdc436491a34e8b045c1ccf4
2019-11-15 12:46:51 -05:00
Sjors Provoost 18b18f8e81
[build] ./configure --enable-werror: add unused-variable
Turn corresponding warning on by default (not always covered by -Wall).
2019-11-15 17:35:59 +01:00
fanquake 21ee676dd6
Merge #17449: fix uninitialized variable nMinerConfirmationWindow
edb6b768a4 fix uninitialized variable nMinerConfirmationWindow (NullFunctor)

Pull request description:

  It is used for the computation of `BIP9WarningHeight`, and by that time it isn't initialized.

ACKs for top commit:
  jnewbery:
    utACK edb6b768a
  promag:
    ACK edb6b768a4, commit description could be cleaned up though.
  MarcoFalke:
    ACK edb6b768a4, used python3 to do the addition locally 📍
  practicalswift:
    ACK edb6b768a4, used `clang++ -O2` on the previous version^W^W^W^W^W^W`bc` to verify the addition locally 🏓
  Sjors:
    Code review ACK  edb6b76. Nit: commit description has duplicate text.

Tree-SHA512: 6fa0be0ecfbfd5d537f2c5b4a9333c76530c1f3182f777330cc7939b0496e37b75d8f8810cdaf471a9bd3247b425f2e239578300dfa0d5a87cd14a6ccfafa619
2019-11-14 10:53:51 -08:00
Sebastian Falbesoner 5e8a56348b test: add unit test for non-standard txs with too large scriptSig
The function IsStandardTx() returns rejection reason "scriptsig-size" if any
one the inputs' scriptSig is larger than 1650 bytes.
2019-11-14 19:51:50 +01:00
MarcoFalke fa2ec9f451
fuzz: Bump timeout in test_runner to accomodate for slow arm64 CPUs 2019-11-14 13:50:20 -05:00
MarcoFalke fac942ca57
test: Remove fragile assert_memory_usage_stable 2019-11-14 10:56:57 -05:00
Luke Dashjr 4341bffb6e GUI: Refactor formatServicesStr to warn when a ServicesFlag is missing 2019-11-14 05:02:16 +00:00
Luke Dashjr df77de8c21 Bugfix: GUI: Recognise NETWORK_LIMITED in formatServicesStr 2019-11-14 05:01:50 +00:00
MarcoFalke fa6e01b2f3
ci: Use clang-8 for fuzzing to run on aarch64 ci systems 2019-11-13 17:53:04 -05:00
Sjors Provoost c6dd565c88
[gui] watch-only wallet: copy PSBT to clipboard 2019-11-13 20:03:42 +01:00
Carl Dong bc728d12a9
depends: qt: Fix C{,XX} pickup 2019-11-13 13:12:01 -05:00
Sjors Provoost 39465d545d
[wallet] add fillPSBT to interface 2019-11-13 18:54:40 +01:00
Sjors Provoost 848f889208
[gui] send: include watch-only
For wallets with WALLET_FLAG_DISABLE_PRIVATE_KEYS.
2019-11-13 18:54:40 +01:00
Sjors Provoost 40537f0909
[wallet] ListCoins: include watch-only for wallets without private keys
This makes them available in GUI coin selection.
2019-11-13 18:54:39 +01:00
practicalswift d604b4cc8c tests: Update valgrind suppressions 2019-11-13 14:46:09 +00:00
Wladimir J. van der Laan cd6cb9745e
Merge #17409: build: Avoid hardcoded libfaketime dir in gitian
333362991c doc: Explain $LIB in LD_PRELOAD in gitian descriptors (MarcoFalke)
fab9850ef4 scripted-diff: Avoid hardcoded libfaketime dir in gitian (MarcoFalke)

Pull request description:

  Without this gitian prints warnings for me:

  ```
  ERROR: ld.so: object '/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
  ```

  ```
  $ ls /usr/lib/aarch64-linux-gnu/faketime/libfaketime.so.1
  /usr/lib/aarch64-linux-gnu/faketime/libfaketime.so.1
  ```

ACKs for top commit:
  laanwj:
    ACK 333362991c

Tree-SHA512: 3e7c4471b69c2ae38c29d0cc0db8b9eae0912085299d7f5ac67eeb4b6a2fdc7eb23d806eeeae0b0c2da22d6d1ba82513cab23652876b97aada9928b2c7d38e7e
2019-11-13 10:20:30 +01:00
NullFunctor edb6b768a4 fix uninitialized variable nMinerConfirmationWindow
fix uninitialized variable hard code the MinBIP9WarningHeight

fix uninitialized var hard code the MinBIP9WarningHeight instead
2019-11-12 17:59:52 -06:00
Pieter Wuille d1c02775aa Report amount of data gathered from environment 2019-11-12 15:35:26 -08:00
Pieter Wuille 64e1e022ce Use thread-safe atomic in perfmon seeder
Also switch to chrono based types.
2019-11-12 15:35:26 -08:00
Pieter Wuille d61f2bb076 Run background seeding periodically instead of unpredictably
* Instead of calling RandAddSeedSleep anytime the scheduler goes
  idle, call its replacement (RandAddSeedPeriodic) just once per
  minute. This has better guarantees of actually being run, and
  helps limit how frequently the dynamic env data is gathered.
* Since this code runs once per minute regardless now, we no
  longer need to keep track of the last time strengthening was
  run; just do it always.
* Make strengthening time context dependent (100 ms at startup,
  10 ms once per minute afterwards).
2019-11-12 15:35:26 -08:00
Pieter Wuille 483b94292e Add information gathered through getauxval()
Suggested by Wladimir van der Laan.
2019-11-12 15:35:26 -08:00
Pieter Wuille 11793ea22e Feed CPUID data into RNG 2019-11-12 15:35:26 -08:00
Pieter Wuille a81c494b4c Use sysctl for seeding on MacOS/BSD 2019-11-12 15:35:22 -08:00
Pieter Wuille 2554c1b81b Gather additional entropy from the environment
This based on code by Gregory Maxwell.
2019-11-12 15:24:02 -08:00
Pieter Wuille c2a262a78c Seed randomness with process id / thread id / various clocks
This sort of data is also used by OpenSSL.
2019-11-12 14:50:44 -08:00
Pieter Wuille 723c796667 [MOVEONLY] Move cpuid code from random & sha256 to compat/cpuid 2019-11-12 14:50:44 -08:00
Pieter Wuille cea3902015 [MOVEONLY] Move perfmon data gathering to new randomenv module 2019-11-12 14:50:44 -08:00
fanquake b51bae1a5a doc: minor corrections in random.cpp
This should have been part of #17151.
2019-11-12 14:50:44 -08:00
MarcoFalke 8237889e8d
Merge #17435: test: check custom ancestor limit in mempool_packages.py
49997813a4 test: check custom ancestor limit in mempool_packages.py (Sebastian Falbesoner)

Pull request description:

  The functional test `mempool_packages.py` starts one node with default ancestor/descendant limit settings and one with a custom, reduced ancestor limit (currently `-limitancestorcount=5`). The effect of the latter had not been tested yet though. This is approached in this PR by checking on the expected mempool contents of node1 after the node0 ancestor tests are done, via the following three conditions:
  - the # of txs in the node1 mempool is equal to the the limit
  - all txs in node1 mempool are a subset of txs in node0 mempool
  - the node1 mempool txs match the start of the constructed tx-chain

  Note that this still doesn't *fully* check the expected mempool of node1 (e.g. that it isn't influenced by `prioritisetransaction` RPC on node0), hence I add another TODO. In the future it would make sense to also set a custom descendant limit when the second TODO about checking node1's mempool is approached: 89e93135ae/test/functional/mempool_packages.py (L228)

ACKs for top commit:
  MarcoFalke:
    ACK 49997813a4 👲

Tree-SHA512: d3a1d19fb49731238ad08ee7c02e2fa81a227e3b4ef3340d68598de42ddb62be9161134f6b8e08fa76b8c9faa02fecfa01111159642e20e9f358292a757b7608
2019-11-12 14:53:34 -05:00
MarcoFalke 1028882eea
Merge #17437: rpc: Expose block height of wallet transactions
a5e77959c8 rpc: Expose block height of wallet transactions (João Barbosa)

Pull request description:

  Closes #17296.

ACKs for top commit:
  practicalswift:
    ACK a5e77959c8 -- diff looks correct now (good catch @theStack!)
  theStack:
    ACK a5e77959c8
  ryanofsky:
    Code review ACK a5e77959c8. Changes since last review getblockhash python test fixes, and removing the last hardcoded height

Tree-SHA512: 57dcd0e4e7083f34016bf9cf8ef578fbfde49e882b6cd8623dd1c64716e096e62f6177a4c2ed94f5de304e751fe23fb9d11cf107a86fbf0a3c5f539cd2844916
2019-11-12 14:44:13 -05:00
MarcoFalke 333362991c
doc: Explain $LIB in LD_PRELOAD in gitian descriptors 2019-11-12 12:06:34 -05:00
MarcoFalke 6d4b97cb1c
Merge #17450: util: Add missing headers to util/fees.cpp
b131524137 util: Add missing headers to util/fees.cpp (Hennadii Stepanov)

Pull request description:

ACKs for top commit:
  laanwj:
    code review ACK b131524137
  MarcoFalke:
    ACK b131524
  jnewbery:
    ACK b131524137

Tree-SHA512: a1ad36bff12219912c6aaacd7d9dcbeccf0fa3373280fa6e804d7a4d267b485433d6e1c01134cfa6732d2fb30ec1ab4629dff6e4bea2fe4c1976180064a3c6ca
2019-11-12 09:53:04 -05:00
Hennadii Stepanov b131524137
util: Add missing headers to util/fees.cpp 2019-11-12 09:30:52 +02:00
João Barbosa 3c2c439dcd wallet: Make -walletdir network only 2019-11-12 00:16:17 +00:00
João Barbosa a5e77959c8 rpc: Expose block height of wallet transactions 2019-11-11 22:32:44 +00:00
Sebastian Falbesoner 49997813a4 test: check custom ancestor limit in mempool_packages.py
To test the custom ancestor limit on node1 (passed by the argument
-limitancestorcount), we check for three conditions:
    -> the # of txs in the node1 mempool is equal to the the limit
    -> all txs in node1 mempool are a subset of txs in node0 mempool
    -> the node1 mempool txs match the start of the constructed tx-chain
2019-11-11 22:37:00 +01:00
MarcoFalke faffa7f0dc
wallet: Avoid showing GUI popups on RPC errors (take 2) 2019-11-11 13:50:26 -05:00
MarcoFalke 80fdb6fad1
Merge #17442: fix Typo: "merkelRoot" -> "merkleRoot"
eb880f092b fix Typo: "merkelRoot" -> "merkleRoot" (ianliu)

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.
  -->

  <!--
  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:
  practicalswift:
    ACK eb880f092b but please change from `merkleRootofHashes` to `merkleRootOfHashes`

Tree-SHA512: ada9edceee19da5678bf35e1258163e7102fe176dc5cf40acaa1468fa8b2801494f8bf65d5359dcd0054fbc22f07fdc98d6208cfdb54dd9171fd45c89d71e098
2019-11-11 13:20:27 -05:00
ianliu eb880f092b fix Typo: "merkelRoot" -> "merkleRoot" 2019-11-12 00:56:05 +08:00
Hennadii Stepanov cb9d830a00
test: Use proper MAX_SCRIPT_ELEMENT_SIZE 2019-11-11 12:04:48 +02:00
Hennadii Stepanov 402ee706d8
refactor: Use proper MAX_SCRIPT_ELEMENT_SIZE const 2019-11-11 11:51:49 +02:00
MarcoFalke fa7523d3aa
ci: Extend docs 2019-11-10 22:30:13 -05:00
MarcoFalke 9999a79074
travis: Rework CACHE_ERR_MSG 2019-11-10 21:49:32 -05:00
MarcoFalke a6f6333ba2
Merge #17416: Appveyor improvement - text file for vcpkg package list
29eb039252 Moves vcpkg list to a text file and updates the appveyor job and readme to use it. (Aaron Clauson)

Pull request description:

  #17364 attempted to save a couple of minutes by skipping the `vcpkg` steps if the vcpkg install directory was already cached.

  The discussion in #15382 highlights the approach used in #17364 does not accommodate adding a new package.

  ~~This PR improves the approach to individually check whether  each vcpg package is installed rather than checking for the existence of the vcpkg install directory.~~

  This PR moves the list of required vcpkg packages into a separate file and uses changes to that file to invalidate the appveyor cache. Whenever the cache is invalidated the vcpkg sources will be updated, the vcpkg binary built and the required packages installed from the latest port files.

ACKs for top commit:
  MarcoFalke:
    ACK 29eb039252

Tree-SHA512: 0c2a170f4e4b47ca0f9cef14f1e3892001b441a6d84f50bf5fd8a26bc4cdbd9358dfce7ef180d37150262e849650e9857d6b2bcd686964b963c3de6cd708a2f3
2019-11-10 21:42:10 -05:00
TheCharlatan 0ec967164f
Add TheCharlatan's pgp key 2019-11-10 21:43:50 +01:00
Aaron Clauson 29eb039252
Moves vcpkg list to a text file and updates the appveyor job and readme to use it. 2019-11-10 13:49:28 +00:00