Commit Graph

15057 Commits

Author SHA1 Message Date
Jack Grigg a54359eed6 test: Regenerate sighash.json after generator fixes 2021-06-13 07:57:39 +01:00
Jack Grigg 59efe29a78 test: Small fixes to sighash test vector generation
Also tweaks the test that parses them to display errors
2021-06-13 07:57:39 +01:00
Jack Grigg cfa7d6bf73 test: Generate valid Sapling types
The C++ parser only requires the various Sapling components to be 32-byte
arrays. The Rust parser enforces stricter type checks at parse time, and
we now unconditionally parse with the Rust parser for deriving txids.
2021-06-13 07:57:39 +01:00
Jack Grigg 08baaaa492 Fix tests that assume CTxOuts can be "null" 2021-06-13 01:45:17 +01:00
Jack Grigg 29ec54fad6 ZIP 244 hashAuthDataRoot computation 2021-06-12 20:03:53 +01:00
Jack Grigg 0b8a348c2b ZIP 244 signature digests 2021-06-12 20:03:53 +01:00
Jack Grigg bd1fd2eaca ZIP 244 transaction digests 2021-06-12 20:03:53 +01:00
Homu bad7f7eadb Auto merge of #5202 - str4d:5022-tx-v5, r=str4d
v5 transaction format

Includes a new wrapper that enables passing C++ streams across to Rust.

Closes zcash/zcash#5022.
2021-06-12 17:59:44 +00:00
Jack Grigg 1ef818103d CTransaction: Make new ZIP 225 fields non-const and private
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.
2021-06-12 00:21:46 +01:00
Homu 332693f48c Auto merge of #5214 - str4d:streams-data, r=str4d
Add `data()` method to `CDataStream`

Analogous to C++11 `std::vector::data()`.

Cherry-picked from bitcoin/bitcoin#9353 (excluding bench change).
2021-06-11 22:47:48 +00:00
Jack Grigg 36874e7f07 rust: Document read_callback_t and write_callback_t 2021-06-11 23:03:26 +01:00
Jack Grigg 88b3c377d1 Remove early return logic from transaction parsing
This also fixes a bug in `CTransaction::SerializationOp` where
`CTransaction::UpdateHash` was not being called for v5 transactions.
2021-06-11 22:56:01 +01:00
Wladimir J. van der Laan 46bb82f816 wallet: Use CDataStream.data()
(cherry picked from commit 5113474a91b8dcac4de0e4566b9babd5da281f29)
2021-06-11 21:34:43 +01:00
Wladimir J. van der Laan 06768aaed2 dbwrapper: Use new .data() method of CDataStream
(cherry picked from commit adff950faeea95249df5f7536159701ea2202255)
2021-06-11 21:34:43 +01:00
Wladimir J. van der Laan 1fca92ae03 streams: Remove special cases for ancient MSVC
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)
2021-06-11 21:34:43 +01:00
Wladimir J. van der Laan 336d0e3be5 streams: Add data() method to CDataStream
Analogous to c++11 vector data().

(cherry picked from commit af4c44ce59aa643b3e03eaa121ec075f524227a5)
2021-06-11 21:34:43 +01:00
Jack Grigg 66832c1e54 contrib: Add BOSL to contrib/debian/copyright 2021-06-10 22:11:42 +01:00
Jack Grigg bfc77d571e v5 transaction format parser
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.
2021-06-10 22:11:42 +01:00
Jack Grigg e8748f89d3 ZIP 225 tx format constants 2021-06-10 22:11:41 +01:00
Jack Grigg e6dd9550e1 rust: Enable C++ streams to be passed into Rust code 2021-06-10 22:11:41 +01:00
Jack Grigg 22d97339b2 Extract SpendDescriptionV5 and OutputDescriptionV5 classes 2021-06-10 22:11:41 +01:00
Homu 1249659a3b Auto merge of #5213 - str4d:5201-zip-216, r=str4d
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

Closes zcash/zcash#5201.
2021-06-10 20:00:11 +00:00
Jack Grigg 0be07bb70c 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

Closes zcash/zcash#5201.
2021-06-10 11:36:12 +01:00
Homu c6a0ec17fe Auto merge of #5212 - str4d:release-v4.4.1, r=str4d
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.
2021-06-10 00:48:18 +00:00
str4d 0dade79ce7
Fix typo in release notes
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2021-06-10 00:34:43 +01:00
Jack Grigg 41a21cab89 Add bugfix to v4.4.1 release notes 2021-06-09 23:40:32 +01:00
Jack Grigg 5fe7df4c6f make-release.py: Updated release notes and changelog for 4.4.1. 2021-06-09 23:19:49 +01:00
Jack Grigg 07d047d40a make-release.py: Updated manpages for 4.4.1. 2021-06-09 23:19:49 +01:00
Jack Grigg d51c3884bf make-release.py: Versioning changes for 4.4.1. 2021-06-09 23:14:25 +01:00
Homu 8fbabc4740 Auto merge of #5205 - str4d:bump-rust-deps, r=str4d
Migrate to latest Rust dependencies

This brings in the Orchard dependencies, as well as a `metrics` feature we upstreamed.
2021-06-09 15:26:37 +00:00
Homu bd927d0084 Auto merge of #5209 - str4d:release-v4.4.1-rc1, r=str4d
Release v4.4.1-rc1
2021-06-08 23:00:34 +00:00
Jack Grigg 5ef2270b2a make-release.py: Updated release notes and changelog for 4.4.1-rc1. 2021-06-08 22:45:20 +01:00
Jack Grigg 79b497aa80 make-release.py: Updated manpages for 4.4.1-rc1. 2021-06-08 22:45:20 +01:00
Jack Grigg 81ee683c38 make-release.py: Versioning changes for 4.4.1-rc1. 2021-06-08 22:38:24 +01:00
Homu dd903c2544 Auto merge of #5208 - str4d:postpone-deps-4.4.1, r=str4d
Postpone dependency updates until after 4.4.1
2021-06-08 18:31:13 +00:00
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