Commit Graph

17550 Commits

Author SHA1 Message Date
Jack Grigg 5c316e8d50 CI: Remove most usages of `actions-rs` actions
These actions are unmaintained. The only one we continue to use is
`actions-rs/clippy-check` because there is no suitable alternative.
2023-03-16 15:38:15 +00:00
Greg Pfeil ad26296b89
Make RPC test output more deterministic
* sort the result summary (always)
* add a flag, `--deterministic` (`-d`), to enable other output changes
* don’t print progress `.` (with `-d`)
* don’t print durations/runtime (with `-d`)

This isn’t fully deterministic as tests can still complete out of order, but
even there these changes make it easier to diff regions. Adding `--jobs 1`
should make it fully deterministic at the cost of performance.
2023-03-16 01:32:45 -06:00
Kris Nuttycombe b177eeb89e
Merge pull request #6490 from str4d/book-eos-heights-v5.3.3-v5.4.2
book: Add End-of-Support heights for v5.3.3 and v5.4.2
2023-03-15 18:23:42 -06:00
str4d 207c88474f
Improvements to code comments
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2023-03-15 23:52:09 +00:00
str4d 1b7b73b794
Merge pull request #6489 from str4d/ci-checks-fix-head-ref
CI: Use `github.head_ref` instead of `HEAD` for "recent base" check
2023-03-15 17:56:38 +00:00
Jack Grigg 85c3a701f9 book: Add End-of-Support heights for v5.3.3 and v5.4.2 2023-03-15 17:54:41 +00:00
Jack Grigg 41997a5ac3 CI: Use `github.head_ref` instead of `HEAD` for "recent base" check
The `pull_request_target` event causes `actions/checkout` to check out
the target branch (e.g. the main repo's `master` branch) instead of the
PR's branch. This meant that after zcash/zcash#6487 merged, the check
would always pass (because the queried revision is always present in the
history of `master`). `github.head_ref` correctly points to the tip of
the PR's branch, ensuring that `git merge-base --is-ancestor` performs
the expected comparison.
2023-03-15 15:33:05 +00:00
Kris Nuttycombe 219b9c68b0
Merge pull request #6487 from str4d/ci-checks-more-fixes
CI: More fixes to "recent base" check
2023-03-14 21:48:39 -06:00
str4d 38f7ed3ce4
Merge pull request #6466 from nuttycom/cleanup/params_const_correctness
Improve CChainParams const correctness.
2023-03-15 03:02:35 +00:00
Jack Grigg 8a33c66a68 CI: Include explicit `failure()` condition in "recent base" check
This is necessary to override the default `success()` status check, and
allow the narrowing condition to function correctly.
2023-03-15 02:48:55 +00:00
Jack Grigg 08347f40fc CI: Fetch all history for "recent base" check
This ensures that the branch history containing the commit in question
is present.
2023-03-15 02:44:48 +00:00
Kris Nuttycombe b1240282d6 Explicitly provide CChainParams to `EnforceNodeDeprecation`
This is another step in the long process of removing access to global
state.
2023-03-14 16:15:30 -06:00
Kris Nuttycombe da0a9c1313 Improve const-ness of CChainParams retrieval by network ID
This change ensures that we do not return non-const CChainParams
references.
2023-03-14 16:15:30 -06:00
Jack Grigg d154cd760c wallet: Remove recipient-side `SaplingNotePlaintext::decrypt`
All recipient-side decryption now relies on `zcash_note_encryption`.
2023-03-14 21:50:31 +00:00
Jack Grigg f5ed454f87 wallet: Use `zcash_note_encryption` in `CWalletTx::RecoverSaplingNote` 2023-03-14 21:50:31 +00:00
Jack Grigg 2fd287e73b wallet: Use `zcash_note_encryption` in `CWallet::FindMySaplingNotes`
This method is only used in tests (as the main wallet scanning logic
already uses `zcash_note_encryption` via the batch scanner).
2023-03-14 21:50:31 +00:00
Jack Grigg f622549929 wallet: Use `CWalletTx::DecryptSaplingNote` in more places 2023-03-14 21:50:31 +00:00
Jack Grigg 95157cd97c wallet: Use `zcash_note_encryption` in `CWalletTx::DecryptSaplingNote` 2023-03-14 21:50:31 +00:00
Jack Grigg db600d5863 wallet: Consolidate `CWalletTx` Sapling output decryption methods
`CWalletTx::DecryptSaplingNote` and `CWalletTx::RecoverSaplingNote` were
previously unused, and the variants that skipped the plaintext version
check were only used by `z_viewtransaction` to inspect details about
transactions that had already been added to the wallet.

We now merge the two back together, and use the activation height of the
Canopy NU as the checked height. This re-checks the plaintext version in
`z_viewtransaction` but permits either valid version.
2023-03-14 21:45:19 +00:00
Jack Grigg a95cd3db09 Add `CChainParams::RustNetwork`
The `zcashd` impl of `consensus::Parameters` is moved into a new
`params` module. It still uses the `cxx::bridge` in `wallet_scanner`
because `cxx` doesn't support Rust type aliases yet.
2023-03-14 21:42:54 +00:00
Kris Nuttycombe 659030aa46
Merge pull request #6460 from daira/generalize-weighted-map
Refactoring to split the weighted tx tree out of mempool_limit.{cpp,h} and make it more reusable
2023-03-14 13:47:48 -06:00
str4d d8a89dfacb
Merge pull request #6482 from str4d/ci-checks-fix-permissions
CI: Fix permissions for Checks workflow
2023-03-14 15:28:34 +00:00
Jack Grigg e67a0d746c CI: Fix permissions for Checks workflow 2023-03-14 14:14:47 +00:00
Kris Nuttycombe 98391a3a92
Merge pull request #6478 from zcash/fix/distclean_rust_gen
Fix `make distclean` to recursively remove `rust/gen`
2023-03-13 17:02:33 -06:00
str4d 8bc38e620c
Merge pull request #6480 from str4d/ci-checks
CI: Check that the PR branch has a sufficiently recent base for Tekton
2023-03-13 19:11:33 +00:00
str4d 8c26d91b28
Merge pull request #6476 from nuttycom/fix/build_warnings
Fix a couple of longstanding zcashd build warnings
2023-03-13 17:51:38 +00:00
Jack Grigg 07cdc1cb4a CI: Check that the PR branch has a sufficiently recent base for Tekton
This provides an explicit error message to PR authors telling them if
they need to rebase, avoiding the rediscovery of known breaking changes
to Tekton CI compatibility.
2023-03-13 17:42:48 +00:00
str4d d03a507b5a
Merge pull request #6479 from str4d/fix-disable-wallet
Fix builds with `CONFIGURE_FLAGS=--disable-wallet`
2023-03-13 17:04:02 +00:00
Kris Nuttycombe 245f35e034 Fix `make distclean` to recursively remove `rust/gen`
`make distclean` currently fails with:

```
rm -f rust/gen
rm: cannot remove 'rust/gen': Is a directory
make[2]: *** [Makefile:10025: clean-local] Error 1
```
2023-03-13 10:12:01 -06:00
Kris Nuttycombe 228ba99150 Fix a longstanding zcashd build warning
Fixes zcash/zcash#2348
2023-03-13 10:11:26 -06:00
Evan Klitzke 4966b7a221 Fix automake warnings when running autogen.sh
(cherry picked from commit f8c66972ddc2a70f5015497436870e2af6833ecc)
2023-03-13 10:11:26 -06:00
Jack Grigg ce73341951 `s/string/std::string` in `init.cpp`
This was breaking with `--disable-wallet`, likely due to some PR
removing a `using namespace std;` line from a header file that this code
was implicitly depending on.
2023-03-13 15:47:55 +00:00
Jack Grigg f8b3e9489a Move `fEnableAddrTypeField` outside `ENABLE_WALLET`
The deprecated feature was originally only applied to wallet code, but
in zcash/zcash#6282 it was extended to a missing case in non-wallet
code.
2023-03-13 15:46:05 +00:00
Kris Nuttycombe 67b9da19b0
Merge pull request #6477 from nuttycom/hotfix-v5.4.2
Back-merge hotfixes v5.3.3 and v5.4.2 to master
2023-03-13 07:20:44 -06:00
Kris Nuttycombe ec88817b72 zcashd release 5.4.2
Notable changes
 ===============
 
 This hotfix remediates memory exhaustion vulnerabilities that zcashd inherited
 as a fork of bitcoind. These bugs could allow an attacker to use peer-to-peer
 messages to fill the memory of a node, resulting in a crash.
 -----BEGIN PGP SIGNATURE-----
 
 iQGzBAABCgAdFiEEX8Nd8pnYcf0pobEL9FXpuSAjoYsFAmP1DKQACgkQ9FXpuSAj
 oYt2jQv+IurleLqEbtBW2ajDYDIkcMu+asEtHCk3B6GELykKaFMgHYTffFBmuyJ+
 5GdoX685Rn6r8BxK6K1u129A9ztY7K0JpVeDA75tN5WLBj9twLdNaODfCLg5EjlZ
 UtxTNnynQ0MX5Uv7pt1DAM+++OKYujUHypaajgZ9ttqpSHZl3Z2ye0/HFEc4023p
 VH13CvU/3R4JLkFENi49rbS49LFfVuQrhAQoOPlCf3xoWbUYIdmWWZa/HOJV3g0e
 3mqC+rhz97GVylLI4LJrm3v0tLeEUIuu+fdAziWfuWrBlB4jQ5p4L5trDHiQoqWB
 5Qt5tjJKHHLnHHSyLcFFaes12tjPfrn9PBxYDPyfFAHIGf0WEiy36+6G5P7jpjYj
 OXLAmBPBIRBgZf9LJIHrgvqQynfGe9vaWgCArWWgSC8wZ2hWlM7pZRhCe+uw35R1
 e5AfZjvbXj6gR+1631Mhl84e6xkGXe24szzuZDrUCqLBJpTb1JNLRh1OtT8zDN0t
 MfKtnE3W
 =AXAQ
 -----END PGP SIGNATURE-----

Merge tag 'v5.4.2' into hotfix-v5.4.2

zcashd release 5.4.2

Notable changes
===============

This hotfix remediates memory exhaustion vulnerabilities that zcashd inherited
as a fork of bitcoind. These bugs could allow an attacker to use peer-to-peer
messages to fill the memory of a node, resulting in a crash.
2023-03-13 06:19:46 -06:00
Kris Nuttycombe 1b2d994a39 zcashd release v5.3.3
Notable changes
 ===============
 
 This hotfix remediates memory exhaustion vulnerabilities that zcashd inherited
 as a fork of bitcoind. These bugs could allow an attacker to use peer-to-peer
 messages to fill the memory of a node, resulting in a crash.
 -----BEGIN PGP SIGNATURE-----
 
 iQGzBAABCgAdFiEEX8Nd8pnYcf0pobEL9FXpuSAjoYsFAmP1CD8ACgkQ9FXpuSAj
 oYvGXQwAqaa1l5qC3VY/60jkH4xmWoSUEzeCOPUG7lYJrIEyzgXj8Ko0Cjr308jm
 ISXDDTOxKb2hfnCbeqbZqRyFbzGzG5L6AkjHAvmQMiZwx2JlbH2k+jd5fggOZSMv
 shL5KbxWN2YRftc8r+fDraJMbGULbKBWQooKaFyQmupT+bVsRf1Nh+lFIVG4FUwA
 oWZot36wB6Y99Y57wlyN2m22+j1glyk5mKv2ttXYbdwSRTFB5W5L1US6Z8uxXQPb
 Qa7sVO90QtzkHr+GPtMiTn513VuLFr+KArGn+qidU/PvblJI/vXuBf54g7JZw4Ot
 gkKziatgaN3pO30I4rTij78LCgKJZ/WImLE7nwTl/bG2Ki1WfyolNLjS+1pXpcPL
 xlXso5ioKlSIGhnlPouXwoxlaqTpDwRKLp0azNJl5hG/tXEHupToK2M61woi9LlP
 4RB+a75OptFi9NMp/Sx0T8zNRn7OB8iP+3BgRP0+mzcLC1AHfjJk/IRo9CQh5jRZ
 MMe98OrC
 =6QYn
 -----END PGP SIGNATURE-----

Merge tag 'v5.3.3' into hotfix-v5.4.2

zcashd release v5.3.3

Notable changes
===============

This hotfix remediates memory exhaustion vulnerabilities that zcashd inherited
as a fork of bitcoind. These bugs could allow an attacker to use peer-to-peer
messages to fill the memory of a node, resulting in a crash.
2023-03-13 06:18:00 -06:00
Daira Emma Hopwood 9d368ba29b Remove unnecessary #include.
Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-03-11 00:34:41 +00:00
Daira Hopwood efda29a05d
Another minor optimization
Co-authored-by: Kris Nuttycombe <kris@electriccoin.co>
2023-03-10 23:46:43 +00:00
Daira Hopwood 99d5cdd3fc
This PR doesn't bring in any ZIP 317 changes yet
The new comment text matches the wording in https://zips.z.cash/zip-0401#specification .
2023-03-10 21:47:07 +00:00
Daira Hopwood 7b52813c61
Minor optimization to weighted_map::remove
Co-authored-by: str4d <thestr4d@gmail.com>
2023-03-10 21:45:46 +00:00
str4d 2b5b5363c9
Merge pull request #6469 from str4d/rust-audit-import-updates
qa: Update imported `cargo-vet` audit registries
2023-03-10 01:44:22 +00:00
str4d 96b886fc75
Merge pull request #6465 from str4d/rust-1.68
depends: Update Rust to 1.68.0
2023-03-10 00:54:44 +00:00
Jack Grigg a62fcddba2 qa: Import Rust crate audits from ChromeOS 2023-03-10 00:30:13 +00:00
Jack Grigg bf37cd6317 qa: Replace Firefox audits with aggregated Mozilla audits in registry 2023-03-10 00:29:44 +00:00
Greg Pfeil 37ca96e747
Address comments on WalletTxBuilder introduction 2023-03-09 16:29:15 -07:00
Greg Pfeil 4bf618937e
Don’t pass PrivacyPolicy to selector constructor
This reverts to the `bool` that was used previously. The independent change to use
`TransparentCoinbasePolicy as a parameter type eliminates some of the motivation for this, and there
is a better approach to solving the remaining issues in #6457.
2023-03-09 16:29:15 -07:00
Greg Pfeil fd07935259
Assert that we get a change addr for any selector 2023-03-09 16:29:05 -07:00
Greg Pfeil 76bfbd8b9c
Add release notes for (a)sync z_sendmany changes 2023-03-09 13:06:20 -07:00
Greg Pfeil d44facfa41
Improve GetRequiredPrivacyPolicy
- invert the order of the checks, fold them into a single conditional
- add documentation
- improve an error message
2023-03-09 13:04:17 -07:00
Greg Pfeil a420dd20f9
Remove changes that aren’t needed by z_sendmany
These changes will be applied in later PRs.
2023-03-09 13:04:17 -07:00