Commit graph

28305 commits

Author SHA1 Message Date
glozow
8fa74aeb5b [doc] correct comment in chainparams
There are more than 3 networks.
2021-04-01 08:35:34 -07:00
gzhao408
2f8272c2a4 [doc] GetBestBlock() doesn't do nothing
This has tripped people up multiple times because it looks like
GetBestBlock is a const function returning the value of hashBlock.
2021-04-01 08:33:11 -07:00
fanquake
b14462083f
Merge #21486: build: link against -lsocket if required for *ifaddrs
4783115fd4 net: add ifaddrs.h include (fanquake)
879215e665 build: check if -lsocket is required with *ifaddrs (fanquake)
87deac66aa rand: only try and use freeifaddrs if available (fanquake)

Pull request description:

  Fixes #21485 by linking against `-lsocket` when it's required for using `*ifaddrs` functions.

ACKs for top commit:
  laanwj:
    Code review ACK 4783115fd4
  hebasto:
    ACK 4783115fd4, I have reviewed the code and it looks OK, I agree it can be merged.

Tree-SHA512: 4542e036e9b029de970eff8a9230fe45d9204bb22313d075f474295d49bdaf1f1cbb36c0c6e2fa8dbbcdba518d8d3a68a6116ce304b82414315f333baf9af0e4
2021-03-31 14:38:06 +08:00
fanquake
e4a2918238
Merge #21542: ci: Bump macOS VM image to the latest version
b8e76479ce ci: Bump macOS VM image to the latest version (Hennadii Stepanov)

Pull request description:

  On Cirrus CI bump macOS VM from Catalina to Big Sur.

ACKs for top commit:
  fanquake:
    ACK b8e76479ce - I'm always going to question bumping things for the sake of it/when there's no reasoning given. In this case, moving from building on macOS 10.x to 11.x shouldn't really lose us any coverage, and may turn up potential macOS quirks a bit earlier.

Tree-SHA512: ab2daee194683ab0553328020fd2fcb918160f466cd380c542e1a9b44f5bea3664fb40b032f1b611ee0107b0efbe278230e067316e2373c3cb0470b205dd2f9d
2021-03-31 13:10:20 +08:00
fanquake
1a0d1452a0
Merge #21457: build: split libtapi and clang out of native_cctools
765e0be534 build: split native_cctools (fanquake)

Pull request description:

  This splits our native cctools package into two additional packages: `native_clang` and `native_libtapi`. This is in an effort to not only make our mac toolchain more understandable, but also to reduce duplication, and as a nice side-effect, fix the issue mentioned [here](https://github.com/bitcoin/bitcoin/pull/19817#issuecomment-741763289).

  Everything about the current build process should remain the same. For gitian, that is:
  * Download LLVM Clang 8.0.0 binary.
  * Build libtapi using downloaded Clang.
  * Build cctools using downloaded Clang and libtapi.
  * Build the rest of depends..

  For Guix (`FORCE_USE_SYSTEM_CLANG=1`):
  * Build libtapi using using system Clang.
  * Build cctools using system Clang and libtapi.
  * Build the rest of depends..

  After this has been merged, my plan is to combine a modified version of #20454 and #21414 with #19817, and  from what I  understand that will be enough to support Apple Arm cross compilation.

  Builds at 477ed59f49f39ae4272219a1216ee19fb72fdde5:
  Guix:
  ```bash
  find output -type f -name *$(git rev-parse --short HEAD)*.* -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum
  7e57b9e5a2109d1a35f0091d86f975c1b1d73ac70ac2609cefbe1134efbf2c87  output/bitcoin-477ed59f49f3-osx-unsigned.dmg
  dd11e71c2634ac2fa883d1e45cbd6de194fad37624bb56b8b8a6213fd40d6050  output/bitcoin-477ed59f49f3-osx-unsigned.tar.gz
  64384eaa2fd9768992d86a06a1414c9e92e84ba21a875696483df2bb5828e2a2  output/bitcoin-477ed59f49f3-osx64.tar.gz
  8a889e88db952d2c82ef44713c04aba95b777441f578738ff6d8a0d251e51da3  output/src/bitcoin-477ed59f49f3.tar.gz
  ```

  Gitian:
  ```bash
  d0eee8542d5f3d662555ad7218d2dc9f3f862656e65bcb2f01f256bfa0deead2  bitcoin-477ed59f49f3-osx-unsigned.dmg
  ba7bc94897e42e7a037e352c4e4e1730f181c6d76b6d6a2785bbd7bf85614c83  bitcoin-477ed59f49f3-osx-unsigned.tar.gz
  c4426d1d310a2fbffcaf2b7df0da4ec97bd11aab07085006dae68777b03f6372  bitcoin-477ed59f49f3-osx64.tar.gz
  8a889e88db952d2c82ef44713c04aba95b777441f578738ff6d8a0d251e51da3  src/bitcoin-477ed59f49f3.tar.gz
  a746831467dc8ff17ec5df06fc9288a859c1961d8c0b632d97b42f080dbd825d  bitcoin-core-osx-22-res.yml
  ```

ACKs for top commit:
  dongcarl:
    reACK 765e0be534
  hebasto:
    ACK 765e0be534, verified building of the `native_cctools` package step-by-step.

Tree-SHA512: 61cf2b092fb8b9724adda1084e0cac9db889cd5e391914b43592aebc470fae3c1cbabc8b59a0abce6e7bad8c646694fe927f26f4deb18b60d7fd92f374f62feb
2021-03-31 08:27:35 +08:00
MarcoFalke
267b60f800
Merge #21553: fuzz: Misc refactor
fa4926cca6 fuzz: [refactor] Use IsValidFlagCombination in signature_checker fuzz target (MarcoFalke)
eeee8f5be1 fuzz: Removed unused try-catch in coins_view (MarcoFalke)
fa98f3f66e fuzz: [refactor] Use ConsumeScript in signature_checker fuzz target (MarcoFalke)

Pull request description:

  Some small refactors to remove unused and redundant fuzz code

ACKs for top commit:
  practicalswift:
    cr re-ACK fa4926cca6

Tree-SHA512: eb07a2140caad7b31495b76385fc7634cf5b6daa4947f430ebb127eb1375583dc11e541a0a42d0e5d93d430480b8a815b93974450fd5ed897528a2d47c752f86
2021-03-30 20:07:53 +02:00
Wladimir J. van der Laan
f9e86d8966
Merge #21387: p2p: Refactor sock to add I2P fuzz and unit tests
40316a37cb test: add I2P test for a runaway SAM proxy (Vasil Dimov)
2d8ac77970 fuzz: add tests for the I2P Session public interface (Vasil Dimov)
9947e44de0 i2p: use pointers to Sock to accommodate mocking (Vasil Dimov)
82d360b5a8 net: change ConnectSocketDirectly() to take a Sock argument (Vasil Dimov)
b5861100f8 net: add connect() and getsockopt() wrappers to Sock (Vasil Dimov)
5a887d49b2 fuzz: avoid FuzzedSock::Recv() repeated errors with EAGAIN (Vasil Dimov)
3088f83d01 fuzz: extend FuzzedSock::Recv() to support MSG_PEEK (Vasil Dimov)
9b05c49ade fuzz: implement unimplemented FuzzedSock methods (Vasil Dimov)

Pull request description:

  Change the networking code and the I2P code to be fully mockable and use `FuzzedSocket` to fuzz the I2P methods `Listen()`, `Accept()` and `Connect()`.

  Add a mocked `Sock` implementation that returns a predefined data on reads and use it for a regression unit test for the bug fixed in https://github.com/bitcoin/bitcoin/pull/21407.

ACKs for top commit:
  practicalswift:
    Tested ACK 40316a37cb
  MarcoFalke:
    Concept ACK 40316a37cb
  jonatack:
    re-ACK 40316a37cb reviewed `git range-diff 01bb3afb 23c861d 40316a3` and the new unit test commit, debug built, ran unit tests, ran bitcoind with an I2P service and network operation with seven I2P peers (2 in, 5 out) is looking nominal
  laanwj:
    Code review ACK 40316a37cb

Tree-SHA512: 7fc4f129849e16e0c7e16662d9f4d35dfcc369bb31450ee369a2b97bdca95285533bee7787983e881e5a3d248f912afb42b4a2299d5860ace7129b0b19623cc8
2021-03-30 17:41:13 +02:00
Wladimir J. van der Laan
dede9eb924
Merge #20197: p2p: protect onions in AttemptToEvictConnection(), add eviction protection test coverage
0cca08a8ee Add unit test coverage for our onion peer eviction protection (Jon Atack)
caa21f586f Protect onion+localhost peers in ProtectEvictionCandidatesByRatio() (Jon Atack)
8f1a53eb02 Use EraseLastKElements() throughout SelectNodeToEvict() (Jon Atack)
8b1e156143 Add m_inbound_onion to AttemptToEvictConnection() (Jon Atack)
72e30e8e03 Add unit tests for ProtectEvictionCandidatesByRatio() (Jon Atack)
ca63b53ecd Use std::unordered_set instead of std::vector in IsEvicted() (Jon Atack)
41f84d5ecc Move peer eviction tests to a separate test file (Jon Atack)
f126cbd6de Extract ProtectEvictionCandidatesByRatio from SelectNodeToEvict (Jon Atack)

Pull request description:

  Now that #19991 and #20210 have been merged, we can determine inbound onion peers using `CNode::m_inbound_onion` and add it to the localhost peers protection in `AttemptToEvictConnection`, which was added in #19670 to address issue #19500.

  Update 28 February 2021: I've updated this to follow gmaxwell's suggestion in https://github.com/bitcoin/bitcoin/pull/20197#issuecomment-713865992.

  This branch now protects up to 1/4 onion peers (connected via our tor control service), if any, sorted by longest uptime. If any (or all) onion slots remain after that operation, they are then allocated to protect localhost peers, or a minimum of 2 localhost peers in the case that no onion slots remain and 2 or more onion peers were protected, sorted as before by longest uptime.

  This patch also adds test coverage for the longest uptime, localhost, and onion peer eviction protection logic to build on the welcome initial unit testing of #20477.

  Suggest reviewing the commits that move code with `colorMoved = dimmed-zebra` and `colorMovedWs = allow-indentation-change`.

  Closes #11537.

ACKs for top commit:
  laanwj:
    Code review ACK 0cca08a8ee
  vasild:
    ACK 0cca08a8ee

Tree-SHA512: 2f5a63f942acaae7882920fc61f0185dcd51da85e5b736df9d1fc72343726dd17da740e02f30fa5dc5eb3b2d8345707aed96031bec143d48a2497a610aa19abd
2021-03-30 16:20:47 +02:00
MarcoFalke
1999baac30
Merge #20228: addrman: Make addrman a top-level component
3fc06d3d7b [net] remove fUpdateConnectionTime from FinalizeNode (John Newbery)
7c4cc67c0c [net] remove CConnman::AddNewAddresses (John Newbery)
bcd7f30b79 [net] remove CConnman::MarkAddressGood (John Newbery)
8073673dbc [net] remove CConnman::SetServices (John Newbery)
392a95d393 [net_processing] Keep addrman reference in PeerManager (John Newbery)
1c25adf6d2 [net] Construct addrman outside connman (John Newbery)

Pull request description:

  Addrman is currently a member variable of connman. Make it a top-level component with lifetime owned by node.context, and add a reference to addrman in peerman. This allows us to eliminate some functions in connman that are simply forwarding requests to addrman, and simplifies the connman-peerman interface.

  By constructing the addrman in init, we can also add parameters to the ctor, which allows us to test it better. See #20233, where we enable consistency checking for addrman in our functional tests.

ACKs for top commit:
  MarcoFalke:
    re-ACK 3fc06d3d7b only change is squash 🏀
  vasild:
    ACK 3fc06d3d7b

Tree-SHA512: 17662c65cbedcd9bd1c194914bc4bb4216f4e3581a06222de78f026d6796f1da6fe3e0bf28c2d26a102a12ad4fbf13f815944a297f000e3acf46faea42855e07
2021-03-30 12:28:15 +02:00
MarcoFalke
fa4926cca6
fuzz: [refactor] Use IsValidFlagCombination in signature_checker fuzz target
Can be reviewed with --color-moved=dimmed-zebra
2021-03-30 10:42:45 +02:00
MarcoFalke
eeee8f5be1
fuzz: Removed unused try-catch in coins_view 2021-03-30 10:16:22 +02:00
MarcoFalke
fa98f3f66e
fuzz: [refactor] Use ConsumeScript in signature_checker fuzz target 2021-03-30 09:30:43 +02:00
fanquake
765e0be534
build: split native_cctools 2021-03-30 14:54:08 +08:00
fanquake
3ececa76b7
Merge #21543: build: Enable safe warnings for msvc builds
7c543bc27b build: Enable safe warnings for msvc builds (Hennadii Stepanov)

Pull request description:

  Disabling of some specific warnings no longer needed.

ACKs for top commit:
  MarcoFalke:
    ACK 7c543bc27b if green
  practicalswift:
    ACK 7c543bc27b if green: compiler warnings are good, compiler safety warnings are great
  sipsorcery:
    tACK 7c543bc27b.

Tree-SHA512: a8253a5a0ccc22b8622ae66efae77a163c54bbd6dbd7e28b043ad4eb474b2c8e5c7b22d3870b15a2b9b91bade0a5ae5bfc5ee765d132dc32ddbbe690fb0146d9
2021-03-30 08:42:15 +08:00
MarcoFalke
1c7be9ab90
Merge #20286: rpc: deprecate addresses and reqSigs from rpc outputs
90ae3d8ca6 doc: Add release notes for -deprecatedrpc=addresses and bitcoin-tx (Michael Dietz)
085b3a7299 rpc: deprecate `addresses` and `reqSigs` from rpc outputs (Michael Dietz)

Pull request description:

  Considering the limited applicability of `reqSigs` and the confusing output of `1` in all cases except bare multisig, the `addresses` and `reqSigs` outputs are removed for all rpc commands.

  1) add a new sane "address" field (for outputs that have an identifiable address, which doesn't include bare multisig)
  2) with -deprecatedrpc: leave "reqSigs" and "addresses" intact (with all weird/wrong behavior they have now)
  3) without -deprecatedrpc: drop "reqSigs" and "addresses" entirely always.

  Note: Some light refactoring done to allow us to very easily delete a few chunks of code (marked with TODOs) when we remove this deprecated behavior.

  Using `IsDeprecatedRPCEnabled` in core_write.cpp caused some circular dependencies involving core_io

  Circular dependencies were caused by rpc/util unnecessarily importing node/coinstats and node/transaction. Really what rpc/util needs are some fundamental type/helper-function definitions. So this was cleaned up to make more sense.

  This fixes #20102.

ACKs for top commit:
  MarcoFalke:
    re-ACK 90ae3d8ca6 📢

Tree-SHA512: 8ffb617053b5f4a8b055da17c06711fd19632e0037d71c4c8135e50c8cd7a19163989484e4e0f17a6cc48bd597f04ecbfd609aef54b7d1d1e76a784214fcf72a
2021-03-29 15:14:31 +02:00
MarcoFalke
4399dc8142
Merge #21509: p2p: Don't send FEEFILTER in blocksonly mode.
beead33a21 [test] no send feefilters when txrelay is turned off (glozow)
18a9b27dd6 p2p: Don't send FEEFILTER in blocksonly mode (Martin Zumsande)

Pull request description:

  The purpose of FEEFILTER messages (BIP 133) is to inform our peers that we do not want transactions below a specified fee rate.
  In blocksonly mode, we do not want our peer to send us any transactions at all (and will disconnect if a peer still sends a transaction INV or TX). 

  Therefore, I don't think that it makes sense to send FEEFILTER messages every 10 minutes on average in blocksonly mode - this PR disables it.

  Note that on block-relay-only connections, FEEFILTER is already disabled, just not in blocksonly mode.

ACKs for top commit:
  glozow:
    re ACK beead33a21 🙂 thanks for adding the test!
  amitiuttarwar:
    reACK beead33a21
  MarcoFalke:
    review ACK beead33a21
  jnewbery:
    reACK beead33a21

Tree-SHA512: e748cd52fe23d647fa49008b020389956ac508e16ce9fd108d8afb773bff95788298ae229162bd70215d7246fc25c796484966dc05890b0b4ef601f9cd35628b
2021-03-29 11:56:47 +02:00
MarcoFalke
cf11f9c22f
Merge #21531: test: remove qt byteswap compattests
9ac86bcc0d test: remove qt byteswap compattests (fanquake)

Pull request description:

  These were added as part of #9366 when with fixing issues with Protobuf.

  Now that we no-longer use Protobuf, there's no reason to maintain a duplicate set of byteswap tests in the qt tests. Our other set of byteswap tests are here: https://github.com/bitcoin/bitcoin/blob/master/src/test/bswap_tests.cpp.

ACKs for top commit:
  laanwj:
    Code review ACK 9ac86bcc0d

Tree-SHA512: 72ba131a5f8fbd9fdbbc4e1f95baa794496c960b12e0271700c632c6511b7e1b331e8db07a201838b4d56b2aeeb43d4de4e10265ea07ab14241307fa14d3342e
2021-03-29 11:52:58 +02:00
MarcoFalke
3bcd278aa6
Merge bitcoin-core/gui#154: qt: Support macOS Dark mode
dc4551c22c remove incompatibility release note for darkmode on macos (Sylvain Goumy)
303cfc6227 allow darkmode on macos build (Sylvain Goumy)
78f75a2d60 Allow icon colorization on mac os to better support dark mode (Uplab)

Pull request description:

  Allow icons to be colorized on macOS to support native Dark mode color scheme.

  Rendering on macOS Big Sur before PR:
  ![macos-darkmode-before-pr](https://user-images.githubusercontent.com/5577626/102502739-43f3af80-407f-11eb-9263-5bbc27b371c2.png)

  Rendering on macOS Big Sur after PR:
  ![macos-darkmode-after-pr](https://user-images.githubusercontent.com/5577626/102502678-350cfd00-407f-11eb-8b98-e271f2688c36.png)

  Light mode stay visually unchanged.

  <del>Note, that this currently only affect the build from source, as the macos dmg includes an attributes to force light color scheme on macos windows (see https://github.com/bitcoin/bitcoin/pull/14593). </del>
  <del>But once all glitches are fixed, we will be able to remove this temporary fix. </del>
  Edit: this PR is know including the removal of `NSRequiresAquaSystemAppearance` on Info.plist file so that the color fix is apply to every build.

  Linked issues: #68 #136

ACKs for top commit:
  hebasto:
    re-ACK dc4551c22c
  jarolrod:
    ACK dc4551c22c

Tree-SHA512: 1c3a4dec796063e61fcaf80112afc2b15c8669a1cd30ebd537cea96647c20215f8f80289719f905820bb0c490c8c1f94bfae4bb32f9c6d1fdd4e8f199ebb559f
2021-03-29 11:17:19 +02:00
MarcoFalke
11840509fb
Merge #21484: doc: Add release notes for #18335
51eef4a03e doc: Add release notes for #18335 (rpc work queue exceeded error) (Larry Ruane)

Pull request description:

  Follow-on to #18335

ACKs for top commit:
  darosior:
    ACK 51eef4a03e

Tree-SHA512: 863d92cb1c23493d9c8c42ed89b30ebd59092e44f159de4cefbabfe4101e7d7d40f24776ff3fcf39dedf90b45fc25845cf7a2177af38729ce2118d75c3cd779b
2021-03-29 11:09:08 +02:00
Hennadii Stepanov
7c543bc27b
build: Enable safe warnings for msvc builds 2021-03-29 11:01:19 +03:00
MarcoFalke
97e6a7f98c
Merge #21477: test: Add test for CNetAddr::ToString IPv6 address formatting (RFC 5952)
732c7bddeb tests: Add test for CNetAddr::ToString IPv6 address formatting (RFC 5952) (practicalswift)

Pull request description:

  Test that `CNetAddr::ToString` formats IPv6 addresses with zero compression and canonicalisation as described in [RFC 5952 ("A Recommendation for IPv6 Address Text Representation")](https://tools.ietf.org/html/rfc5952).

  Solving #21466 will hopefully be trivial with the ability to check zero compression correctness against these tests.

ACKs for top commit:
  vasild:
    ACK 732c7bddeb

Tree-SHA512: 31a1378aa435ba4171490a2e15d7280a175292270eb001b47d367e010c6ac9b83420b82bbeab22211f8f500c69e21878047c87adf216263b3420b6bb2a5d2bfb
2021-03-29 09:27:05 +02:00
MarcoFalke
ea3c9a92c6
Merge bitcoin-core/gui#251: Improve URI/file handling message
ef3e1d7272 qt: Improve URI/file handling message (Hennadii Stepanov)

Pull request description:

  This PR:
  - fixes missing spaces after full stops
  - makes the translation context much bigger

  The latter is the main motivation for this PR, as I became a translator 🐅

  Screenshots:
  - master (a9d1b40d53)

  ![DeepinScreenshot_select-area_20210317211750](https://user-images.githubusercontent.com/32963518/111527570-bd776880-8768-11eb-9035-96bb08067e74.png)

  - this PR:

  ![Screenshot from 2021-03-17 21-13-36](https://user-images.githubusercontent.com/32963518/111527727-e7308f80-8768-11eb-95c7-e8b802bfed5f.png)

ACKs for top commit:
  jarolrod:
    ACK ef3e1d7272

Tree-SHA512: 8fbd1e3731b75866356fae201b3129126001600ca0197e83c05825e8c5bbbcf0132d6a6b808d7a5cbfbdde75ed1865ecbb651c30017570abd7c5803eff2b9306
2021-03-29 07:39:42 +02:00
fanquake
9ac86bcc0d
test: remove qt byteswap compattests
These were added as part of #9366 to fix issues with Protobuf.

Now that we no-longer use Protobuf, there's no reason to maintain a
duplicate set of byteswap tests for qt.
2021-03-29 11:12:26 +08:00
fanquake
4783115fd4
net: add ifaddrs.h include 2021-03-29 11:09:44 +08:00
fanquake
879215e665
build: check if -lsocket is required with *ifaddrs 2021-03-29 11:09:40 +08:00
fanquake
87deac66aa
rand: only try and use freeifaddrs if available 2021-03-29 11:08:29 +08:00
fanquake
de4d3ba437
Merge #21541: ci: Build depends only once for Android build
fa52d7d3ad cirrus: Add missing depends_sources_cache to Android task (MarcoFalke)
ffff4e7373 cirrus: Only cache releases when needed (MarcoFalke)
fa97a17ac3 ci: Bump Android cross-build to Ubuntu Focal (MarcoFalke)
fac577d423 ci: Build depends only once for Android build (MarcoFalke)
fa908a41f3 ci: Set DEPENDS_DIR when setting BASE_ROOT_DIR (MarcoFalke)

Pull request description:

  Currently the Android task has several issues:

  * It is missing a cache instruction, thus failing the build on Cirrus CI
  * It is running the depends build twice

  Fix those issues

ACKs for top commit:
  ryanofsky:
    Code review ACK fa52d7d3ad. Only change since last review is adding descriptions and changing new RUN_UNIT_TESTS line from true to false. (I assume that change doesn't do anything because even though prior default was true, it's a cross compiled build and enabling unit tests would have no effect.)
  hebasto:
    ACK fa52d7d3ad, I have reviewed the code and it looks OK, I agree it can be merged after passing CI.

Tree-SHA512: ae7c68e357068176a0e58285b83521353321c65862cee4ff56f413c51b00398062f0ee6775bfbbf28fda420cf5a24000a2286fbcf6cc7f3729b7805bc8419726
2021-03-29 11:04:55 +08:00
MarcoFalke
fa52d7d3ad
cirrus: Add missing depends_sources_cache to Android task
This cache entry is required for completeness. The file
src/Makefile.qt.include needs it in this line:
 QT_BASE_PATH = $(shell find ../depends/sources/ -maxdepth 1 -type f -regex ".*qtbase.*\.tar.xz")

This cache entry is tied to the depends_built_cache cache entry. Either
both are present and cached, or neither of them is. Otherwise, the build
will fail.
2021-03-28 20:06:39 +02:00
MarcoFalke
ffff4e7373
cirrus: Only cache releases when needed
This does not change behavior, but removes unneeded and empty cache
instructions for tasks that don't need them.
2021-03-28 20:06:36 +02:00
MarcoFalke
fa97a17ac3
ci: Bump Android cross-build to Ubuntu Focal
This does not change behavior, but bumping to Focal now means it doesn't
have to be done later when Bionic is no longer used and EOL.
2021-03-28 20:05:46 +02:00
MarcoFalke
fac577d423
ci: Build depends only once for Android build
Depends is currently built twice for the Android build. For example, the
same task building it twice:

* https://cirrus-ci.com/task/6673185279049728?logs=ci#L3418 (aarch64-linux-android)
* https://cirrus-ci.com/task/6673185279049728?logs=ci#L3422 (x86_64-pc-linux-gnu, 4 lines later)
2021-03-28 20:05:31 +02:00
MarcoFalke
fa908a41f3
ci: Set DEPENDS_DIR when setting BASE_ROOT_DIR
The depends dir can not be overwritten by a FILE_ENV file. Also, a FILE_ENV file
might depend on the DEPENDS_DIR value. Thus, set it before reading FILE_ENV.

This commit does not change behavior, but is required for later commits.

Can be reviewed with --color-moved=dimmed-zebra
2021-03-28 20:04:24 +02:00
Hennadii Stepanov
b8e76479ce
ci: Bump macOS VM image to the latest version 2021-03-28 20:29:46 +03:00
MarcoFalke
c00852653f
Merge bitcoin-core/gui#254: refactor: Drop redundant setEditTriggers(NoEditTriggers) calls
257f55c119 qt, refactor: Drop redundant setEditTriggers(NoEditTriggers) calls (Hennadii Stepanov)

Pull request description:

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

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

Tree-SHA512: 4356e4d785055935fba452488a5d97ed95995def97b26ab18af43a545835f9e9d4c347e4cad7952aa725179cf6e775a2208c48730feebf40e3b1a7ba5f402af0
2021-03-28 19:21:24 +02:00
fanquake
e658b0e49b
Merge #21505: build: Remove unused header from the build system
0eabb2abed build: Remove unused header from the build system (Hennadii Stepanov)

Pull request description:

  The only `#include <miniupnpc/miniwget.h>` was removed in #16659.

ACKs for top commit:
  practicalswift:
    cr ACK 0eabb2abed
  fanquake:
    ACK 0eabb2abed

Tree-SHA512: 630da03875c851e80286561eae0f966c89624cbb17b90f70e2bec9a69146e79d088fc176e07a4906915770ac1cdb11341a7a431ea7cf6a59d2816e927486f335
2021-03-27 09:06:53 +08:00
MarcoFalke
19e3e65429
Merge bitcoin-core/gui#243: fix issue when disabling the auto-enabled blank wallet checkbox
915e34112b qt: fix issue when disabling the auto-enabled blank wallet checkbox (Jarol Rodriguez)

Pull request description:

  As detailed by #151, On `master` a user can create the confusing scenario where you have a disabled `Encrypt Wallet` checkbox and a selected `Disable Private Keys` checkbox after unselecting the auto-enabled `Blank Wallet` checkbox.

  This commit makes it so that when the `Blank Wallet` checkbox is auto-selected after the user selects `Disable Private keys`, unselecting it will also unselect the `Disable Private Keys` checkbox, which in turn re-enables the `Encrypt Wallet` checkbox.

  Below are screenshots comparing the behavior of selecting `Disable Private Keys` then unselecting the `Blank Wallet` between `master` and this `PR`:

  **Master:**
  | Select `Disable Private Keys` | Unselect `Blank Wallet` |
  | ----------------------------- | ------------------------ |
  | ![Screen Shot 2021-03-09 at 7 57 14 PM](https://user-images.githubusercontent.com/23396902/110560141-77405a80-8113-11eb-9285-5acba6241dcf.png) |   ![Screen Shot 2021-03-09 at 7 57 31 PM](https://user-images.githubusercontent.com/23396902/110560159-81faef80-8113-11eb-9b37-086aa39ecb9f.png)    |

  **PR:**
  | Select `Disable Private Keys` | Unselect `Blank Wallet` |
  | ----------------------------- | ------------------------ |
  | ![Screen Shot 2021-03-09 at 7 34 12 PM](https://user-images.githubusercontent.com/23396902/110560379-e3bb5980-8113-11eb-899a-3a4c6a1bc115.png) | ![Screen Shot 2021-03-09 at 7 34 20 PM](https://user-images.githubusercontent.com/23396902/110560412-f170df00-8113-11eb-8bd0-f7fe6fc0d739.png) |

ACKs for top commit:
  hebasto:
    ACK 915e34112b
  Talkless:
    ACK 915e34112b

Tree-SHA512: ce6ecbc35b94a08cabf0b8a24dbdfc874d82cc8918cc8623dce8172c7fc9c75d63a13b036bae5f7ab2c090f8d020574a542285d1651600813faf5d91e2506a8d
2021-03-26 17:30:21 +01:00
MarcoFalke
9b48b3ac42
Merge #21390: test: Test improvements for UTXO set hash tests
4f2653a890 test: Use deterministic chain in utxo set hash test (Fabian Jahr)
4973c5175c test: Remove wallet dependency of utxo set hash test (Fabian Jahr)
1a27af1d7b rpc: Improve gettxoutsetinfo help (Fabian Jahr)

Pull request description:

  Follow-ups to #19145:
  - Small improvement on the help text of RPC gettxoutsetinfo
  - Using deterministic blockchain in the test `functional/feature_utxo_set_hash.py`
  - Removing wallet dependency in the test `functional/feature_utxo_set_hash.py`

  Split out of #19521.

ACKs for top commit:
  MarcoFalke:
    review ACK 4f2653a890 👲

Tree-SHA512: 92927b3aa22b6324eb4fc9d346755313dec44d973aa69a0ebf80a8569b5f3a7cf3539721ebdba183737534b9e29b3e33f412515890f0d0b819878032a3bba8f9
2021-03-26 08:52:59 +01:00
glozow
beead33a21 [test] no send feefilters when txrelay is turned off 2021-03-25 21:41:56 +01:00
Sylvain Goumy
dc4551c22c remove incompatibility release note for darkmode on macos 2021-03-25 15:28:32 +01:00
MarcoFalke
9217f9fe73
Merge #21522: fuzz: [refactor] Use PickValue where possible
fa818ca202 fuzz: [refactor] Use PickValue where possible (MarcoFalke)

Pull request description:

  `PickValue` is a bit less typing, so I think it should be used where possible

ACKs for top commit:
  practicalswift:
    cr ACK fa818ca202: patch looks correct and `PickValue` is better :)

Tree-SHA512: 49ed030694e3b7676654f1615f033287d26e2f0bc29647e1db56e0d84e14d29080f3e1898f5df8d644d834b8ded3ce713d2425ea86a37c9279d01f86ad03c202
2021-03-25 08:02:11 +01:00
fanquake
8f94c70625
Merge #21495: build, qt: Fix static builds on macOS Big Sur
ec76bad655 build, qt: Fix static builds on macOS Big Sur (Hennadii Stepanov)

Pull request description:

  See details and the patch in https://bugreports.qt.io/browse/QTBUG-87014

  Fixes https://github.com/bitcoin-core/gui/issues/249

ACKs for top commit:
  fanquake:
    ACK ec76bad655

Tree-SHA512: f2fa4a6a1b7dd6d5adc6ef6f5169aedeb3bf45b2b087305e8ab78041755b9f04203d2b0550ee95656042d16775b06da0a17730915b7bff996dd14dd1b6d34ea7
2021-03-25 11:38:30 +08:00
Hennadii Stepanov
ec76bad655
build, qt: Fix static builds on macOS Big Sur
See details and the patch: https://bugreports.qt.io/browse/QTBUG-87014
2021-03-25 03:17:40 +02:00
MarcoFalke
ed49203daa
Merge #21357: test: Unconditionally check for fRelay field in test framework
39a9ec579f Unconditionally check for fRelay field in test framework (Troy Giorshev)

Pull request description:

  picking up #20411 (rebased onto master)

  There is a discrepancy in the implementation of our p2p protocol between
  bitcoind and the testing framework.  The fRelay field is an optional
  field at the end of a version message as of protocol version 70001.
  However, when deserializing a message in bitcoind, we don't check the
  version to see if it should have an fRelay field or not.  Instead, we
  unconditionally attempt to deserialize into the field.

  This commit brings the testing framework in line with the implementation
  in core.

  This matters for a version message with the following fields:

  Version = 60000
  fRelay = 1

  Bitcoind would deserialize this into a version message with
  Version=60000 and fRelay=1, whereas (before this commit) our testing
  framework would deserialize this into a version message with
  Version=60000 and fRelay=0.

ACKs for top commit:
  jnewbery:
    utACK 39a9ec579f

Tree-SHA512: 13a23f1180b7121ba41cb85baa38094b41f4607a7c88b3384775177cb116e76faf5514760624f98a4e8a830767407c46753a7e0285158c33e0c6ce395de8f15c
2021-03-24 19:28:24 +01:00
Wladimir J. van der Laan
23b15601df
Merge #17227: Qt: Add Android packaging support
246774e264 depends: fix Qt precompiled headers bug (Igor Cota)
8e7ad4146d depends: disable Qt Vulkan support on Android (Igor Cota)
ba46adaa1a CI: add Android APK build to cirrus (Igor Cota)
7563720e30 CI: add Android APK build script (Igor Cota)
ebfb10cb75 Qt: add Android packaging support (Igor Cota)

Pull request description:

  ![bitcoin-qt](https://user-images.githubusercontent.com/762502/67396157-62f3d000-f5a7-11e9-8a6f-9425823fcd6c.gif)
  This PR is the third and final piece of the basic Android support puzzle - it depends on https://github.com/bitcoin/bitcoin/pull/16110 and is related to https://github.com/bitcoin/bitcoin/pull/16883. It introduces an `android` directory under `qt` and a simple way to build an Android package of `bitcoin-qt`:

  1. Build depends for Android as described in the [README](https://github.com/bitcoin/bitcoin/blob/master/depends/README.md)
  2. Configure with one of the resulting prefixes
  3. Run `make && make apk` in `src/qt`

  The resulting APK files will be in `android/build/outputs/apk`. You can install them manually or with [adb](https://developer.android.com/studio/command-line/adb). One can also open the `android` directory in Android Studio for that integrated development and debugging experience. `BitcoinQtActivity` is your starting point.

  Under the hood makefile `apk` target:

  1. Renames the `bitcoin-qt` binary to `libbitcoin-qt.so` and copies it over to a folder under `android/libs` depending on which prefix and corresponding [ABI](https://developer.android.com/ndk/guides/abis.html#sa) `bitcoin-qt` was built for
  2. Takes `libc++_shared.so` from the Android NDK and puts in the same place. It [must be included](https://developer.android.com/ndk/guides/cpp-support) in the APK
  3. Extracts Qt for Android Java support files from the `qtbase` archive in `depends/sources` to `android/src`

  There is also just a tiny bit of `ifdef`'d code to make the Qt Widgets menus usable. It's not pretty but it works and is a stepping stone towards https://github.com/bitcoin/bitcoin/pull/16883.

ACKs for top commit:
  MarcoFalke:
    cr ACK 246774e264
  laanwj:
    Code review ACK 246774e264

Tree-SHA512: ba30a746576a167545223c35a51ae60bb0838818779fc152c210f5af1413961b2a6ab6af520ff92cbc8dcd5dcb663e81ca960f021218430c1f76397ed4cead6c
2021-03-24 19:02:01 +01:00
MarcoFalke
b1281b5d8f
Merge #21516: remove unnecessary newline from initWarning() argument
804ac10631 remove unnecessary newline from initWarning() argument (Larry Ruane)

Pull request description:

  Run: `src/bitcoind -wallet=nosuchfile`

  Without this patch, `debug.log` contains:
  ```
  2021-03-23T21:19:16Z init message: Verifying wallet(s)...
  2021-03-23T21:19:16Z Warning: Skipping -wallet path that doesn't exist. Failed to load database path '/home/larry/.bitcoin/wallets/nosuchfile'. Path does not exist.

  2021-03-23T21:19:16Z init message: Loading banlist...
  ```
  With this patch, the empty line isn't present. This PR fixes a similar problem with `src/bitcoind -conf=nosuchfile`

ACKs for top commit:
  practicalswift:
    cr ACK 804ac10631: patch looks correct!
  jarolrod:
    tACK 804ac10631, nice catch!
  theStack:
    Code-review ACK 804ac10631

Tree-SHA512: dfcbaaa72ca24ac40233ac56840cfba8827853711d3df6e229ce940686f2ebf8bf0560bafcaa73a4d82d179a5050af0d3cabdc47b3b1dfd6aaadf718a6635f11
2021-03-24 18:50:51 +01:00
Larry Ruane
804ac10631 remove unnecessary newline from initWarning() argument 2021-03-24 04:31:48 -06:00
fanquake
f67b5dca57
Merge #20734: build: Make platform-specific targets available for proper platform builds only
3d31abbaaa build: Make Windows-specific targets available for Windows builds only (Hennadii Stepanov)
92990e25b7 build: Make macOS-specific targets available for macOS builds only (Hennadii Stepanov)

Pull request description:

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

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

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

Tree-SHA512: bbd8450bf98fbccb0b828df2f753ed0dbbd203defa2f58ce21390ee2ea183c95d8ff585d62d52be870dbf0158e2bb0fbd47eda026b80174ee6fd617473f5ac03
2021-03-24 16:52:17 +08:00
MarcoFalke
7ce7ce5716
Merge #21338: test: add functional test for anchors.dat
581791c620 test: add functional test for anchors.dat (bruno)

Pull request description:

  This PR adds a functional test for anchors.dat.

  It creates a node and adds 2 outbound block-relay-only connections and 5 inbound connections.
  When the node is down, anchors.dat should contain the 2 addresses from the outbound block-relay-only connections.

ACKs for top commit:
  MarcoFalke:
    Concept ACK 581791c620
  hebasto:
    ACK 581791c620

Tree-SHA512: 77038b09e36ee5ae473a26d6f566c0ed283af258c34df8486706a24f72b05abab621a293ac886d03849bc45bc28be7336137252225b25aff393baa6b5238688c
2021-03-24 08:27:03 +01:00
fanquake
f95071a3f5
Merge #21489: fuzz: cleanups for versionbits fuzzer
aa7f418fe3 fuzz: cleanups for versionbits fuzzer (Anthony Towns)

Pull request description:

  Followups for #21380, shouldn't change coverage. Marking as draft to avoid introducing conflicts for the speedy trial PRs.

ACKs for top commit:
  MarcoFalke:
    cr ACK aa7f418fe3
  practicalswift:
    Tested ACK aa7f418fe3

Tree-SHA512: 6792364e3bb036cc903b4a5f5805d00afceeae475ce84660da962d28335bd98e59d5f45e68718657d3aa526123e351edadda39e99e49f1c6cfab629e98df35ed
2021-03-24 14:15:35 +08:00
MarcoFalke
fa818ca202
fuzz: [refactor] Use PickValue where possible 2021-03-24 06:57:55 +01:00