Commit Graph

11429 Commits

Author SHA1 Message Date
Greg Pfeil 993dc0c279
Have z_shieldcoinbase use WalletTxBuilder
Co-authored-by: Kris Nuttycombe <kris@nutty.land>
2023-04-17 03:47:11 -06:00
Daira Emma Hopwood 7c7e8645bc Change ZIP 401 mempool limiting to use constants decided in zcash/zips#565.
fixes #6518

In a ZIP sync meeting we decided that:

* The minimum cost should be changed to 10000, in order to avoid
  penalizing Orchard-using transactions too much relative to other
  transactions.
* `low_fee_penalty` should be changed to 40000. This preserves the
  property that a transaction paying less than the ZIP 317 conventional
  fee is deprioritized relative to a min-cost, conventional-fee
  transaction by a factor of 5, as in the original design.
* The recommended default for `mempooltxcostlimit` should remain at
  80000000. Rationale: 80000000 was chosen so that the worst-case size
  of the mempool would be equal to the worst-case size of 40 blocks,
  which is the current default transaction expiry delta. That reasoning
  still holds even with the above changes.
* `eviction_memory_entries` remains at 40000. It could have been lowered
  given that there will now be at most 80000000/10000 = 8000 transactions
  "in-flight", but it doesn't need to be because the rationale that
  "40000 [RecentlyEvicted queue] entries can be stored in ~1.6 MB,
  which is small compared to other node memory usage" still holds.

Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-04-16 23:04:57 +01:00
Daira Emma Hopwood 31c0dcf790 Change ZIP 401 mempool limiting to use conventional fee.
Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-04-16 11:41:40 +01:00
Kris Nuttycombe 0a901b06eb
Merge pull request #6559 from sellout/conventional-fee-sentinel
Use null as the ZIP 317 fee sentinel instead of -1
2023-04-15 22:24:09 -06:00
Greg Pfeil 7770d9d647
Add z_sendmany RPC examples with fee field 2023-04-15 16:21:50 -06:00
Greg Pfeil 2e80bd74cf
Use null as the ZIP 317 fee sentinel instead of -1
Fixes #6556
2023-04-15 16:12:42 -06:00
Greg Pfeil 14c11c385a
Fix zcash-cli crash when printing help message
When a `zcash-cli` command fails, it attempts to print the help message for the command. However,
making the `help` call can also fail, and there was a bug in this check, so that we tried to display
the help message when the `help` call failed, and tried to display the error when the `help` call
succeeded – both leading to an assertion failure.

This also makes some minor changes to the output formatting.

Fixes #6561
2023-04-15 16:07:33 -06:00
Kris Nuttycombe 6ad60e7340
Merge pull request #6524 from sellout/zip317-wallet-support
Support ZIP 317 fees in the zcashd wallet
2023-04-14 14:14:11 -06:00
Greg Pfeil d78cee9680
Address more ZIP 317 fee feedback 2023-04-14 12:58:28 -06:00
Daira Hopwood 6ae7c532ce
Change spelling of prioritisation in an error message
For consistency with the `prioritisetransaction` RPC method.
2023-04-14 19:49:58 +01:00
Kris Nuttycombe 6854c25415
Merge pull request #5993 from str4d/5716-cxx-ed25519
rust: Migrate Ed25519 FFI to `cxx`
2023-04-14 09:37:30 -06:00
Greg Pfeil 0b9b5c8dc1
Address review feedback for ZIP 317 fees in wallet 2023-04-13 19:20:10 -06:00
Greg Pfeil c54c4ee987
Adjust wallet absurd fee check for ZIP 317
It now happens async (in `PrepareTransaction`) and ensures that the fee doesn’t
exceed the maximum useful value for a transaction.
2023-04-13 19:16:09 -06:00
Kris Nuttycombe 0b9126a846
Merge pull request #6448 from sellout/zcash-cli-conversion
Improve zcash-cli argument handling
2023-04-13 14:37:18 -06:00
Greg Pfeil 5a7c36c868
Rename Arg* to Param
Some of these are newly-introduced names in this PR, others are ones that I had
renamed from param -> arg in an earlier commit.

Also restores `strMethod` where it had been changed to `method`.
2023-04-13 13:28:28 -06:00
Greg Pfeil 2596b4920b
Fix edge case revealed by #6409
Without `AllowRevealedRecipients`, we can’t send transparent change, but previously we asserted if
we couldn’t get a transparent change address. Now it returns a new `TransparentChangeNotAllowed`
failure, which is just a more specific `TransparentRecipientNotAllowed` to avoid confusion when
there are no explicit unshielded recipients.
2023-04-13 12:47:52 -06:00
Greg Pfeil 0fca843a5b
Simplify some vector initialization
Also simplify some calls to use `tl::make_unexpected`.
2023-04-12 14:20:37 -06:00
Greg Pfeil 8d6dabd46a
Use examine instead of std::visit 2023-04-12 12:11:49 -06:00
Greg Pfeil 1c00591699
Fix accidental reversion of #6409
Rearranging some code caused a partial reversion.
2023-04-12 10:32:30 -06:00
Greg Pfeil 2ab17586d6
Better messages on client-side zcash-cli errors
The other changes in this PR push more errors to the client side, where error messages have been
minimal. Also if a request made it to the server _then_ errored, it would return the help text, but
not specific failure information.

Now, client-side errors make a help RPC call for the method, resulting in a message with both the
specific failure plus the help text, whereas previously we only ever received one or the other.
2023-04-12 10:11:56 -06:00
Greg Pfeil 2435b974ee
Enrich zcash-cli arg conversion
Instead of storing the indices of args to convert from string, store two
`vector<bool>` (per operation), the first containing an entry for each required
parameter (`true` if we should convert it), and the second containing an entry
for each optional parameter.

This allows us to check a few more things on the client side:
- does the operation exist
- have enough arguments been passed
- have too many arguments been passed

This is ostensibly a fix for `zcash-cli` to be able to use `asOfHeight` where
available, but it also caught a few bugs in the old implementation:
- `submitblock` didn’t convert its optional (but ignored) second arg;
- `z_getpaymentdisclosure` docs claimed all the args were strings, but two are
  actually ints;`
- `listreceivedbyaddress` didn’t convert the optional `includeImmatureCodebase`;
- `listsinceblock` didn’t convert the optional `includeRemoved` and
  `includeChange`;`
- `gettransaction` didn’t convert `verbose`;
- `listunspent` didn’t convert `includeUnsafe` or `queryOptions`;
- `z_getbalanceforviewingkey` didn’t convert minconf; and
- a minor non-bug – `z_getbalanceforaddress` had a handler even though the
  operation has been removed.

`getblockdeltas` also incorrectly tries to convert its required string argument,
but correcting that would be a breaking API change. Instead, it is deferred to

Fixes #6429.
2023-04-12 10:11:56 -06:00
Greg Pfeil d1ba9c423e
Simplify client.cpp
There was a lot of indirection to build a `set<pair<string, int>>` that should
have been a `map<string, set<int>>` from a `[pair<string, int>]`, when it could
just be initialized directly.
2023-04-12 10:11:56 -06:00
Greg Pfeil c9ffa6e8ae
Eliminate LegacyCompat–ZTXOSelector cycle
This now determines the meaning of “LegacyCompat” in advance, then always has a
known `TransactionStrategy` when we create the `ZTXOSelector`. With the addition
of `TransparentCoinbasePolicy`, there were two different ways that the selector
depended on the strategy, so it became more complicated to manage the cycle. And
the coinbase policy was overly conservative when there were no transparent
recipients or UAs in the tx. So this resolves that as well.

Fixes #6541.
2023-04-12 10:01:39 -06:00
Greg Pfeil c6001268c5
Address review feedback re: ZIP 317 in wallet 2023-04-11 13:21:48 -06:00
Jack Grigg b1dc94249c rust: Migrate Ed25519 FFI to `cxx` 2023-04-11 16:36:26 +00:00
str4d 035e21a610
Merge pull request #6536 from str4d/6397-cxx-orchard-bundle
Use `cxx` bridge for all Orchard bundle inspection and validation
2023-04-11 17:33:23 +01:00
Greg Pfeil dac6c014d4
Correct change handling for ZIP 317 fees 2023-04-10 00:23:22 -06:00
Greg Pfeil fc6eca86e2
Support ZIP 317 fees in the zcashd wallet
- still support explicit fixed fees everywhere – if a caller provides a fee, we
  don’t adjust it
- treat negative fees as signifier for use of ZIP 317 fees when a fee needs to
  be provided because of additional positional arguments
2023-04-10 00:20:29 -06:00
Greg Pfeil 7f0592a664
Simplify canResolveOrchard logic
When deciding whether we can pay Orchard receivers, rather than checking
whether we have “sufficient non-Sprout funds”, we can just check whether the
selector selects Sprout – if it doesn’t then we can select Orchard receivers
regardless, and we’ll catch insufficient funds later.

This is also helpful for ZIP 317, because in that case we don’t even know the
total non-Sprout funds necessary until after we decide which receivers to pay.
2023-04-10 00:19:39 -06:00
Kris Nuttycombe 6d06ddd84d
Merge pull request #6409 from sellout/wallet_tx_builder/restrict-transparent-change
Require `AllowRevealedRecipients` for transparent change
2023-04-09 22:35:11 -06:00
ANISH M 777d346e19
Update src/metrics.cpp by removing v prefix.
Co-authored-by: str4d <thestr4d@gmail.com>
2023-04-07 20:59:16 +05:30
ANISH M 835c6a2745
report the git-derived version in metrics screen
An attempt to fix issue #5639 by using version derived from git "build" field of getinfo.
2023-04-07 20:07:25 +05:30
Jack Grigg ccbda94b30 gtest: Minor improvements to `CoinsTests`
These were implemented while debugging the previous commit.
2023-04-07 12:17:00 +00:00
Jack Grigg 19fed267e3 Use `cxx` bridge for all Orchard bundle inspection and validation
zcash/zcash#5987 added a bridge to `orchard::Bundle<Authorized, Amount>`
for `getrawtransaction`. This commit expands it to also cover the
consensus rules, by migrating over missing functionality from the
hand-written FFI methods, and exposing the Orchard `BatchValidator` type
directly (as with Sapling) instead of via the C++ `AuthValidator`
intermediary.

Part of zcash/zcash#6397.
2023-04-07 12:16:28 +00:00
Jack Grigg c301e321e4 Migrate `OrchardMerkleFrontier` to use new `CppStream` APIs 2023-04-06 21:30:38 +00:00
Jack Grigg 7b005aaa7a Expand `CppStream` to cover all `Stream`-like C++ types
In its existing usage, `CppStream` was only used in a context where the
C++ `READWRITE` macro was being called with a `CDataStream`. However, in
other contexts the macro can be called with various other types with a
stream-like interface. Since we can't expose C++ templates across the
`cxx` bridge (or FFI generally), we instead turn `CppStream` into an
enum that covers all of the stream-like types we may want to use.
2023-04-06 21:30:38 +00:00
Jack Grigg 33367709f7 Merge most `cxx::bridge` definitions into a single bridge
This enables us to use Rust types across more bridged APIs, which we
can't do with multiple bridge definitions until `cxx` adds support.
2023-04-05 10:50:35 +00:00
Kris Nuttycombe 1feec6a3b4
Merge pull request #6494 from daira/examine
Improve code readability using `examine` macro
2023-04-04 16:32:04 -06:00
Kris Nuttycombe b3dbfb1ddd
Merge pull request #6527 from daira/zip317-computations
ZIP 317 preparation: fix bitrotted miner tests and add conventional fee computations
2023-04-04 16:30:51 -06:00
Daira Emma Hopwood 3adf580dc0 Refactor that avoids using exceptions for local flow control and is simpler.
Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-04-04 22:03:27 +01:00
Kris Nuttycombe 1afd532ba8
Merge pull request #6526 from sellout/split-cxxbridge
Split C++ generated from Rust into own lib
2023-04-04 14:58:48 -06:00
Daira Emma Hopwood ac3e345689 Refactoring to avoid an unnecessary temporary.
Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-04-04 21:26:52 +01:00
Daira Emma Hopwood 32e1d2eeeb Refactoring to avoid duplicated code.
Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-04-04 21:26:52 +01:00
Daira Emma Hopwood 6bb8c60f41 Use the new `examine` macro to replace all instances of
`std::visit(match {...}, specimen)`, improving code readability.

For ease of review, this commit includes only obviously correct
transformations that all follow the same pattern.

Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-04-04 21:26:39 +01:00
Daira Emma Hopwood 60755efaf1 Add `examine`, a wrapper around `std::visit` that reverses the arguments.
Co-authored-by: Greg Pfeil <greg@electriccoin.co>
Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-04-04 21:20:10 +01:00
Greg Pfeil 1aac7c0c32
Split C++ generated from Rust into own lib
This allows us to compile it with different flags. In particular, there are
warnings we can’t easily fix in the generated code.
2023-04-03 18:09:30 -06:00
Daira Emma Hopwood 4fd3493291 Implement ZIP 317 computations.
Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-04-03 23:05:50 +01:00
DeckerSU 78804dd438
InsertBlockIndex: pass const reference on hash, instead of hash
InsertBlockIndex should take a const reference to a uint256 instead of
just a uint256.

LoadBlockIndexGuts also assume std::function<CBlockIndex*(const uint256&)> insertBlockIndex
as an argument:

2d456afebe/src/txdb.h (L150)
2023-04-02 23:00:08 +02:00
Greg Pfeil 1786c60677
Require `AllowRevealedRecipients` for t-change 2023-04-01 22:58:52 -06:00
Kris Nuttycombe 2d456afebe
Merge pull request #6408 from sellout/wallet_tx_builder/lock-notes
Lock notes (except Orchard) in wallet_tx_builder
2023-03-31 18:05:06 -06:00
Greg Pfeil 69ab52cb3e
Improve Doxygen for note locking 2023-03-30 14:22:34 -06:00
Kris Nuttycombe 564ef2a3ac
Merge pull request #6502 from rex4539/typos
Fix typos
2023-03-29 22:23:33 -06:00
Greg Pfeil 06553d1399
Lock notes (except Orchard) in wallet_tx_builder
This fixes an RPC test failure that tests specifically for this with
z_shieldcoinbase. This also exposed an issue where an overly-high fee resulted
in a negative Payment causing an exception too deep. Added an assert when
creating a Payment and guarded against it for z_shieldcoinbase.

Fixes #2621 and #5654 (but does not handle Orchard locking, which is tracked in
a separate issue).
2023-03-29 16:59:43 -06:00
Kris Nuttycombe f60d2c71e7
Refactor RPC privacyPolicy handling
Extracted from z_sendmany to be used across multiple transaction
operations. Previously, it also checked a `bool` to decide what “LegacyCompat”
means, but bools are too easy to concoct, so it now expects the sender and
recipients to be checked internally. Also, z_sendmany was generating the bool
only from the sender, illustrating how easy it is to miss something when you try
to precompute.
2023-03-29 16:56:20 -06:00
Dimitris Apostolou fdae3213ac Fix typos 2023-03-29 13:40:48 -06:00
Kris Nuttycombe 4892bf327d
Merge pull request #6470 from sellout/error-on-tmemos
Improve taddr no-memo check.
2023-03-29 09:17:23 -06:00
Daira Emma Hopwood dd246587a3 Fix bit-rotted code in miner tests.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2023-03-29 00:05:51 +01:00
Greg Pfeil 7bf5f598ee
Update src/wallet/rpcwallet.cpp
Co-authored-by: Kris Nuttycombe <kris@nutty.land>
2023-03-28 16:30:47 -06:00
Greg Pfeil af2526d755
Improve taddr no-memo check
Do the check deeper, preventing test_bitcoin from being able to bypass it. This
also moves it out of z_sendmany-specific code, which will be helpful when we add
other operations, like sendfromaccount.
2023-03-28 16:28:16 -06:00
Greg Pfeil effbc33276
Remove CWallet member from WalletTxBuilder
This resolves a conflict where most usage is `const`, but some modifies the
wallet. Previously it held a const member and then used `pwalletMain` directly
for the mutating calls. This now passes `CWallet` explicitly where necessary,
using `const` when possible.

This also benefits a follow-up PR (#6408) that introduces locking, which also
mutates the wallet.
2023-03-28 16:24:08 -06:00
Jack Grigg 4a94975268 Use `RandomInvalidOutputDescription()` everywhere it makes sense
As a pre-check inside `z_sendmany` we estimate the size of the
transaction that would be created, to confirm it won't exceed any
limits. We do this by creating a fake transaction with fake outputs and
measuring its size. In the case of Sapling recipients, we'd push an
empty `OutputDescription`.

In zcash/zcash#6459 we pulled in changes that improved type safety in
the Rust types. One of these changes was that the `cv` field in a
Sapling Output Description is now enforced at parsing time to be not
small order (where previously we enforced this at proof verification
time).

The two above paragraphs collide because when measuring the size of the
fake transaction, we convert a `CMutableTransaction` into a
`CTransaction`; this calls `UpdateHash` to pin its txid, and that causes
the transaction to be serialized and then parsed across the FFI. This
causes the null `OutputDescription` to reach the Rust parser which
treats it as invalid.

There are two solutions to this, which are used in various contexts:

- Avoid pushing a null `OutputDescription` into a `CMutableTransaction`.
  This is the fix implemented in this PR for `z_sendmany`: we now call
  `RandomInvalidOutputDescription()` which gives us a consensus-invalid
  but parser-valid `OutputDescription`, suitable for estimating tx size.

- Use `UNSAFE_CTransaction` to avoid having `UpdateHash` be called on
  construction. This type is used in tests where we explicitly want to
  construct an invalid type in C++, for consensus checking purposes. One
  of the `OutputDescription()` uses was in a test, but didn't trigger
  the issue because the test was checking a different part of the
  transaction being invalid. Technically no change is needed here;
  however we now also call `RandomInvalidOutputDescription()` here for
  uniformity.

Part of zcash/zcash#6509.
2023-03-27 22:33:45 +00:00
Greg Pfeil 666a8d1b37
Merge pull request #6377 from sellout/wallet_tx_builder/z_sendmany
Extract common transaction logic from z_sendmany
2023-03-22 11:24:33 -06:00
Greg Pfeil 10a1beb7c5
Have GetRecipientPools return a copy
Previously returned a const reference to a non-const object, which could then be
modified under the caller’s feet.
2023-03-21 11:07:18 -06:00
Greg Pfeil 8ebb22c67f
Simplify SelectOVKs
This inverts the structure, dispatching on the selector pattern first, then only checking
`SpendableInputs` if the selector is multi-pool. This shortens the code, eliminates some failure
cases, and caught a bug where `SaplingExtendedFullViewingKey` selectors were not
supported (previously hidden by `match { ..., [](const auto&) … }`).
2023-03-20 18:22:53 -06:00
Greg Pfeil 5236f447c7
Apply suggestions for WalletTxBuilder from code review
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2023-03-20 16:20:50 -06:00
Greg Pfeil af2c7e7e49
Address WalletTxBuilder review feedback 2023-03-20 14:23:18 -06:00
Greg Pfeil 1f72b42b81
Additional z_sendmany test cases
Also improve error messages.
2023-03-20 11:24:50 -06:00
Greg Pfeil 62ae44a131
Ensure that a WalletTxBuilder tx balances
This also removes the code that stops adding spends if they ever go
`>= targetAmount`. The included note limiting and change calculation should
ensure that it’s always `==` at the end, and we don’t want paper over a mistake
in those earlier calculations.

There are existing tests that fail if either
- the newly-added Orchard increment is missing or
- the assertion is applied when there’s Sprout change.
2023-03-20 09:40:42 -06:00
Greg Pfeil 5081a8e8fd
Address WalletTxBuilder PR feedback 2023-03-17 16:11:40 -06:00
str4d 0e7d61d6dc
Adjust documentation
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2023-03-17 17:16:33 +00:00
Daira Emma Hopwood 1da8a545d8 Adjust indentation to be consistent without changing existing code.
Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-03-17 16:55:51 +00:00
Greg Pfeil 77a26692bb
Don’t permit user-provided “internal” payments
The `Payment` type had an `isInternal` field, but it is (and should always be) `false`.
`ResolvedPayment` is the corresponding type internal to the transaction builder that can be either
internal (for change) or external (for user-requested payments).
2023-03-16 19:49:38 -06:00
Jack Grigg 7f35a0da5c Migrate to `zcash_primitives 0.10`
Closes zcash/zcash#6398.
2023-03-17 00:09:45 +00:00
str4d e9e160c7e2
Merge pull request #6474 from str4d/wallet-zcash_note_encryption
Migrate in-wallet Sapling output decryption to `zcash_note_encryption`
2023-03-16 23:19:27 +00:00
Greg Pfeil d90ca22be7
Clarify `AddressResolutionError`
- document and rename the enum cases,
- rewrite some of the exception messages, and
- restructure the UA recipient case.
2023-03-16 17:18:47 -06:00
Greg Pfeil 9f84ce2858
Update WalletTxBuilder based on review
Some of the more significant changes are
- remove release note entry for already-released feature;
- rephrase some error messages and comments;
- add a missing case to `EstimateTxSize`;
- don’t return a selector when we don’t have a UFVK for a UA, which allows some
  simplifications (and elimination of a failure case) to happen; and
- remove a redundant `InsufficientFundsError`.
2023-03-16 13:57:57 -06:00
str4d 207c88474f
Improvements to code comments
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2023-03-15 23:52:09 +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
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 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
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 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