Using `const_cast` to serialize into an otherwise-constant field is
undefined behaviour:
https://github.com/zcash/zcash/issues/967#issuecomment-225467855
Instead, we should make CTransaction's members non-const and private,
and provide accessors. It's not practical to make this change everywhere
yet, but we can start by only introducing new fields in this way. We
will need to provide accessors for orchardBundle's properties in any
case, since we need to call across the Rust FFI.
Quite sure that we haven't supported MSVC 6.0 for ages (MSC_VER 1300 is
>= MSVC++ 7.0) but with the C++11 switch we can be sure.
(cherry picked from commit a2141e415aed26bab756220d8707b5fb33e6fef8)
The majority of the parser is in C++, but Orchard bundles are parsed
exclusively by Rust.
The ZIP 244 test vectors are brought in here so we can start by testing
round-trip serialization.
Implement ZIP 216 consensus rules
In addition to the specified consensus rules, we unconditionally enable
ZIP 216 in the following situations:
- Wallet code
- Transaction building
- Nullifiers for wallet notes
- Tests
- Benchmarks
Closeszcash/zcash#5201.
In addition to the specified consensus rules, we unconditionally enable
ZIP 216 in the following situations:
- Wallet code
- Transaction building
- Nullifiers for wallet notes
- Tests
- Benchmarks
Closeszcash/zcash#5201.
Release v4.4.1
Due to Homu merge confusion, the release commit for this release is
0dade79ce7 (the final commit in the
release branch), not the merge commit.
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.
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.
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)
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)
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)
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)
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)