Commit Graph

15423 Commits

Author SHA1 Message Date
Jack Grigg dadb54b67b Postpone native_ccache 4.3 2021-06-08 19:30:01 +01:00
Jack Grigg e0cde186b0 Fix Rust dependency name in postponed-updates.txt 2021-06-08 19:28:05 +01:00
Jack Grigg 20c4efe1bc Postpone dependency updates until after 4.4.1 2021-06-08 19:19:20 +01:00
Homu 892d1c1254 Auto merge of #5192 - LarryRuane:4624-ibd-getheaders-2, r=str4d
when rewinding, set pindexBestHeader to the highest-work block index

Further fix for #4624. #4935 eliminated unnecessary, redundant
getheaders P2P requests, but had the side-effect of causing IBD
(syncing) to sometimes stall. This happens because `RewindBlockIndex()`
sets pindexBestHeader to `chainActive.Tip()`, which is the best block we
currently know of, but may be several thousand blocks behind the latest
_header_ in the block index (`mapBlockIndex`).

`RewindBlockIndex()` is called during startup.

By issuing a `getheaders` request from a height several thousand blocks
ago, the `headers` reply will return 160 entries that are already in our
`mapBlockIndex`. Because the maximum number of entries is returned,
and the last entry isn't new to us, we don't issue any further `getheaders`
requests to this peer. The same happens with every peer, causing the
`getheaders` sequences to all stop. The node stops making any progress.

The workaround (without this PR's changes) is to restart the node
with the `-optimize-getheaders=0` option.
2021-06-07 22:51:02 +00:00
Homu 75914efc25 Auto merge of #5154 - mdr0id:ci_builder_updates, r=str4d
CI Builder Updates & Refactors

To support existing legacy pinned Docker builder/workers in Buildbot, it is valuable to move these into their own folder.

The new directory structured is intended to simplify development/deployment of Docker Tekton builder/worker images and remove overhead related to potential Buildbot CI depreciation.
2021-06-07 20:24:22 +00:00
Jack Grigg 3d6c1e4426 metrics 0.16 and metrics-exporter-prometheus 0.5
Includes the allowlist logic that we upstreamed.
2021-06-06 00:53:19 +01:00
Jack Grigg 419275c4f5 Migrate to latest zcash_* crates
This includes the ff 0.10 dependency stack.
2021-06-06 00:53:19 +01:00
Jack Grigg 3dad214577 cargo update 2021-06-06 00:53:19 +01:00
str4d 5869a48f0d
Merge pull request #5204 from str4d/win-7
build: Set minimum required Windows version to Windows 7
2021-06-06 00:52:03 +01:00
str4d 8936cfef75
doc: Add removal of 32-bit Windows binaries to release notes 2021-06-05 20:25:36 +01:00
Jack Grigg 997ca6ee9c doc: Add Windows version support change to release notes 2021-06-05 15:40:04 +01:00
Jack Grigg 8943abd937 build: Link to libbcrypt on Windows
This fixes a linker issue now that the minimum Windows version is
Windows 7, and dependencies now try to use BCryptGenRandom.
2021-06-05 15:40:04 +01:00
Luke Dashjr 5bac61119a Move Win32 defines to configure.ac to ensure they are globally defined
common.vcxproj used for MSVC builds

(cherry picked from commit 1ccb9f30c040daf688f89f0d63e9f5e7b131d193)
2021-06-05 15:22:00 +01:00
fanquake 182a9af25e build: pass _WIN32_WINNT=0x0601 when building libevent for Windows
This enables of the use of AI_* definitions in the Windows headers,
specifically AI_ADDRCONFIG, which fixes an issue with libevent and
ipv6 on Windows.

It also aligns with what we define in configure when building Core.

(cherry picked from commit eb6b73540d1ee7ff5a6874dd0e35f9b30b68e3b8)
2021-06-05 15:20:22 +01:00
Luke Dashjr dc0d4bcb53 depends: Patch libevent build to fix IPv6 -rpcbind on Windows
libevent uses getaddrinfo when available, and falls back to gethostbyname
Windows has both, but gethostbyname only supports IPv4
libevent fails to detect Windows's getaddrinfo due to not including the right headers
This patches libevent's configure script to check it correctly

(cherry picked from commit 03e056edcd1a7f7197a29068c52fa33fce12f7d7)
2021-06-05 15:20:22 +01:00
fanquake 7de8682236 build: enforce minimum required Windows version (7)
Instruct the linker to set the major & minor subsystem versions in the PE
header to 6 & 1 (NT 6.1 which corresponds to Windows 7). Similar to
macOS, the binary will now refuse to run on unsupported versions of
Windows.

(cherry picked from commit e8a8cff07c409c7eecd478d3df36c7ba92c59730)
2021-06-05 15:20:22 +01:00
fanquake 865c64a8f8 build: don't pass -w when building for Windows
This has been around since the introduction of autotools. However at
this point I'm not sure we'd every want to suppress all warnings when
performing a build, and given that CXX FLAGS will have been overriden
when cross-compiling for Windows (using depends), this would rarely,
if-ever be used anyways.

From https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html:
-w

    Inhibit all warning messages.

(cherry picked from commit 89fea68ffdbd97394d891177e664f896b3e7d1e6)
2021-06-05 15:20:22 +01:00
fanquake 6ae6c9c90d build: remove --large-address-aware linker flag
This flag was used when building 32-bit Windows executables, which we no-longer
do, and is not accepted by the linker for any of the hosts we currently build
for. i.e:

```bash
checking whether the linker accepts -Wl,--large-address-aware... no
```

--large-address-aware
    If given, the appropriate bit in the "Characteristics" field of the COFF
    header is set to indicate that this executable supports virtual addresses
    greater than 2 gigabytes. This should be used in conjunction with the /3GB
    or /USERVA=value megabytes switch in the "[operating systems]" section of
    the BOOT .INI. Otherwise, this bit has no effect. [This option is specific
    to PE targeted ports of the linker]

You can check that the appropriate bit in the COFF header of our current
Windows binaries is still be set using dumpbin. i.e:

```powershell
dumpbin /headers .\bitcoind.exe

FILE HEADER VALUES
<snip>
26 characteristics
     Executable
     Line numbers stripped
     Application can handle large (>2GB) addresses
```

(cherry picked from commit acd644b83d789a6cdfbeda19732119534d10058e)
2021-06-05 15:19:13 +01:00
fanquake 9a4fb0ed4a build: remove configure checks for win libraries we don't link against
While cross compiling, HOST=x86_64-w64-mingw32, none of these
libs actually seem to be passed to the linker.

(cherry picked from commit 2525c096b002a89d4c561e1474800496ad8ebd7e)
2021-06-05 15:19:13 +01:00
fanquake c77d14d2d7 build: remove WINDOWS_BITS from build system
We no longer build/ship 32 bit windows executables.

(cherry picked from commit abc147de95fb294a2c0a3105695e708517010322)
2021-06-05 15:19:13 +01:00
Chun Kuan Lee 42bdbc2f91 build: Remove WINVER pre define in Makefile.leveldb.inlcude
(cherry picked from commit 0164b0f5cf80cd00a4914d9fea0bcb9508cb7607)
2021-06-05 14:51:20 +01:00
Ben Woosley 89d322abed Drop defunct Windows compat fixes
"The AI_ADDRCONFIG flag is defined on the Windows SDK for Windows Vista
and later. The AI_ADDRCONFIG flag is supported on Windows Vista and
later."
https://docs.microsoft.com/en-us/windows/desktop/api/ws2tcpip/nf-ws2tcpip-getaddrinfo

However, the version of MinGW we use on Travis is not current and does
not carry the relevant definition, as such I defined it in compat.
https://github.com/wine-mirror/wine/blob/master/include/ws2tcpip.h

Testing confirms that the PROTECTION_LEVEL_UNRESTRICTED,
IPV6_PROTECTION_LEVEL, PROCESS_DEP_ENABLE, AI_ADDRCONFIG, are now
supported by the version of Windows that we test against, so can be
removed.
https://travis-ci.org/bitcoin/bitcoin/jobs/483255439
https://travis-ci.org/Empact/bitcoin/jobs/484123087

(cherry picked from commit d0522ec94ebbaa564f5f6b31236d4df032664411)
2021-06-05 14:51:00 +01:00
Chun Kuan Lee abd0471696 windows: Call SetProcessDEPPolicy directly
(cherry picked from commit d8a299206780b38959d732cbe40ba1dd25834f0e)
2021-06-05 14:49:02 +01:00
Chun Kuan Lee 4ea1f9cd66 windows: Set _WIN32_WINNT to 0x0601 (Windows 7)
Also remove all defines in many places and define it in configure stage to keep consistency.

(cherry picked from commit 1bd9ffdd44000b208d29d35451f4dc9f1ac9318f)
2021-06-05 14:47:14 +01:00
Larry Ruane 50a1f63b1b when rewinding, set pindexBestHeader to the highest-work block index 2021-05-26 16:17:55 -06:00
Jack Grigg 7ae5679084 Re-include reading blocks from disk in block connection benchmark
Fixes a regression introduced in zcash/zcash#4427.

Closes zcash/zcash#5164.
2021-05-17 11:40:43 +01:00
mdr0id 50ff89c4b8 add tekton build/worker docker, organize legacy buildbot docker 2021-05-05 12:00:31 -07:00
Homu 8c95ceba46 Auto merge of #5078 - mdr0id:add_docker_debian11_builder, r=str4d
Add Debian 11 CI-Builder

Adding in commands for upcoming builders
2021-04-22 06:01:42 +00:00
mdr0id cb756bf725 clean up ubuntu 18.04 and 20.04 commands 2021-04-21 10:39:45 -07:00
mdr0id 4bb3d492e5 Add Debian 11 ci-builder 2021-04-21 10:35:45 -07:00
Homu 05c0c7c573 Auto merge of #5064 - str4d:5048-mutex-lock-failure, r=str4d
Prevent mutex lock fail even if --enable-debug

Cherry-picked from upstream PR bitcoin/bitcoin#15233.

Closes zcash/zcash#5048.
2021-04-20 07:20:46 +00:00
Akio Nakamura e3ed38d19c Prevent mutex lock fail even if --enable-debug
This PR intends to resolve #15227.

"configure --debug-enabled" enables "#ifdef DEBUG_LOCKORDER".
Then "lockdata" (in sync.cpp) will be initialized same as other
static objects.

But unfortunately, lockdata.push_lock() was called before its
initialization (via initializing signatureCache which is declared
in script/sigcache.cpp) on macOS.

This PR apply the "Construct On First Use Idiom" to "lockdata"
to prevent it.

(cherry picked from commit b09dab0f2de37be3c96f5087ee7bd61d7262aa76)
2021-04-20 15:11:57 +12:00
Homu 0e36226271 Auto merge of #5017 - LarryRuane:upstream-locking-0.16, r=str4d
Bitcoin 0.16 locking PRs

These are locking changes from upstream (bitcoin core) release 0.16 (Aug 14, 2017, to Feb 16, 2018), oldest to newest (when merged to the master branch).

Each commit also includes a reference both to the PR and the upstream commit.

- https://github.com/bitcoin/bitcoin/pull/11126
  - Excludes changes to wallet tests that we don't have.
- https://github.com/bitcoin/bitcoin/pull/10916
  - first commit only; second commit already merged by d9fcc2b558
- https://github.com/bitcoin/bitcoin/pull/11107
  - Only the last commit.
- https://github.com/bitcoin/bitcoin/pull/11593
- https://github.com/bitcoin/bitcoin/pull/11585
- https://github.com/bitcoin/bitcoin/pull/11618
- https://github.com/bitcoin/bitcoin/pull/10286
  - Only the third and last commits.
- https://github.com/bitcoin/bitcoin/pull/11870
- https://github.com/bitcoin/bitcoin/pull/12330
- https://github.com/bitcoin/bitcoin/pull/12366
- https://github.com/bitcoin/bitcoin/pull/12368
- https://github.com/bitcoin/bitcoin/pull/12333
  - Only the first commit.
2021-04-17 03:52:26 +00:00
Homu 78de0cdf46 Auto merge of #5026 - str4d:bloom-filter-backports, r=str4d
Backport bloom filter improvements

Cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#7113
- bitcoin/bitcoin#7818
  - Only the second commit (to resolve conflicts).
- bitcoin/bitcoin#7934
- bitcoin/bitcoin#8655
  - Partial backport to help resolve conflicts.
- bitcoin/bitcoin#9060
- bitcoin/bitcoin#9223
- bitcoin/bitcoin#9644
  - Partial backport to help resolve conflicts.
- bitcoin/bitcoin#9916
- bitcoin/bitcoin#9750
- bitcoin/bitcoin#13176
- bitcoin/bitcoin#13948
- bitcoin/bitcoin#16073
- bitcoin/bitcoin#18670
- bitcoin/bitcoin#18806
  - Reveals upstream's covert fix for CVE-2013-5700.
- bitcoin/bitcoin#19968
2021-04-15 20:40:26 +00:00
Homu 4066324ae5 Auto merge of #5061 - str4d:release-v4.4.0, r=str4d
Release v4.4.0
2021-04-15 07:20:27 +00:00
Jack Grigg ad1c30873d make-release.py: Updated release notes and changelog for 4.4.0. 2021-04-15 16:55:39 +12:00
Jack Grigg a32841d999 make-release.py: Updated manpages for 4.4.0. 2021-04-15 16:55:39 +12:00
Jack Grigg c54fdeed35 make-release.py: Versioning changes for 4.4.0. 2021-04-15 16:42:53 +12:00
Homu 5ccaf89acc Auto merge of #5060 - str4d:book-fix-metrics-example, r=str4d
book: Fix comment in metrics example, and clarify usage
2021-04-15 02:12:29 +00:00
Jack Grigg 0342eb2212 book: Fix comment in metrics example, and clarify usage 2021-04-15 12:41:18 +12:00
Homu 4c60e8d6db Auto merge of #5059 - str4d:postpone-clang-12, r=str4d
Postpone Clang 12

We won't migrate to LLVM 12 until Rust does.
2021-04-15 00:14:05 +00:00
Jack Grigg 3cdda83868 Postpone Clang 12
We won't migrate to LLVM 12 until Rust does.
2021-04-15 12:10:50 +12:00
Homu 7279efdf55 Auto merge of #5058 - str4d:minor-cleanups, r=str4d
Minor cleanups
2021-04-14 03:26:57 +00:00
Jack Grigg f92f7adba6 clean.sh: Remove secp256k1 test log
Closes zcash/zcash#5054.
2021-04-14 13:30:25 +12:00
Jack Grigg c592bf7da0 python: Use UTF-8 encodings for opened files 2021-04-14 13:19:33 +12:00
Jack Grigg 434f32151c Fix include guards 2021-04-14 12:54:12 +12:00
Jack Grigg b2f01b1e4a Remove duplicate / unused includes 2021-04-14 12:53:06 +12:00
Jack Grigg b6162e5b4f scripted-diff: Remove direct usages of boost::filesystem
These were merged in an old PR that was created before we backported
src/fs.h.

-BEGIN VERIFY SCRIPT-
sed -i 's/boost::filesystem/fs/g' ./src/addrdb.*
-END VERIFY SCRIPT-
2021-04-14 12:52:15 +12:00
João Barbosa 5b2f7a6ea7 [wallet] Make CWallet::ListCoins atomic
zcash: Not an actual locking fix; just eliminates unnecessary recursive
zcash: locking (which is a long-term goal).
zcash: cherry picked from commit 1beea7af92994dca83facb11bbef82b24b538400
zcash: https://github.com/bitcoin/bitcoin/pull/12333
2021-04-12 17:15:23 -06:00
Matt Corallo 829e801fd9 Add braces to meet code style on line-after-the-one-changed.
zcash: cherry picked from commit 02fc8863630a20e75230f8bc3ba1051c480ae560
zcash: https://github.com/bitcoin/bitcoin/pull/12368
2021-04-12 17:15:23 -06:00