Commit Graph

269 Commits

Author SHA1 Message Date
hattizai 2244e0ff77 remove duplicate words 2024-07-03 11:01:40 +08:00
Daira-Emma Hopwood 6f4a3b107e Address a review comment concerning `Vector::serialized_size`.
Signed-off-by: Daira-Emma Hopwood <daira@jacaranda.org>
2024-06-18 21:06:42 +01:00
Daira-Emma Hopwood 9881861228 Add `zcash_encoding::{CompactSize, Vector}::serialized_size` and
`zcash_primitives::legacy::Script::serialized_size`. Use the latter in
`zcash_primitives::transaction::fees::transparent::OutputView::serialized_size`.

Signed-off-by: Daira-Emma Hopwood <daira@jacaranda.org>
2024-06-18 21:06:39 +01:00
Daira-Emma Hopwood 6c90219817 Prefer the `PoolType::{SAPLING, ORCHARD, TRANSPARENT}` constants to
`PoolType::{Shielded(_), Transparent}`.

Signed-off-by: Daira-Emma Hopwood <daira@jacaranda.org>
2024-06-18 21:03:22 +01:00
Daira-Emma Hopwood 4cd96f30a1 Fix clippy lints exposed by the MSRV bump to 1.70.0.
Signed-off-by: Daira-Emma Hopwood <daira@jacaranda.org>
2024-06-12 14:51:29 +01:00
Jack Grigg bffe6a4a10 Bump MSRV to 1.70 2024-06-12 10:58:17 +00:00
str4d 851e20347f
Fix changelogs to reflect actual MSRVs 2024-05-24 15:46:40 +01:00
Daira-Emma Hopwood aa77be8830 Update dependencies (including to avoid a vulnerability warning for atty), bump MSRV to 1.66,
and fix new clippy lints for MSRV 1.66.

* tonic 0.10 -> 0.11
* tonic-build 0.10 -> 0.11
* cargo update
* cargo update -p home@0.5.9 --precise 0.5.5
* cargo update -p prost-build@0.12.4 --precise 0.12.3
* cargo update -p prost-types@0.12.4 --precise 0.12.3
* cargo update -p prost@0.12.4 --precise 0.12.3
* cargo update -p prost-derive@0.12.5 --precise 0.12.3
* cargo update -p half@2.4.1 --precise 2.2.1

(The precise updates avoid a further MSRV bump to 1.70.)

Remaining duplicates are currently unavoidable.

Signed-off-by: Daira-Emma Hopwood <daira@jacaranda.org>
2024-05-20 13:35:27 +01:00
str4d 5c6a6a4c86
Merge pull request #1143 from nuttycom/crate_zip321
Extract `zip321` crate from `zcash_client_backend`
2024-04-22 22:46:09 +01:00
Kris Nuttycombe d2aa6cfc7f Apply suggestions from code review
Co-authored-by: str4d <thestr4d@gmail.com>
2024-04-22 14:41:50 -06:00
Kris Nuttycombe aeac544aed Address comments from code review. 2024-04-22 10:55:25 -06:00
Jack Grigg d4b405f03f equihash: Move helper methods for minimal reprs into a submodule 2024-04-18 23:19:35 +00:00
Jack Grigg cc1bcb8a4a equihash: Move `Params` into an internal submodule 2024-04-18 21:07:24 +00:00
Daira-Emma Hopwood ea82dbeb64
Apply straightforward suggestions from code review 2024-04-18 01:12:13 +01:00
Kris Nuttycombe b60600a4c3 zcash_client_sqlite: Use `ZcashAddress` for persistence of sent note addresses
Prior to this change, the recipient of a sent transaction would always
be shown as the protocol-level address, instead of any unified address
intended as the recipient. Now, instead of reencoding the recipient
address, we use the original `ZcashAddress` value from the payment
request.
2024-04-05 16:48:13 -06:00
Kris Nuttycombe 86e1181259 zip321: Make `Payment` fields private. 2024-04-05 16:30:31 -06:00
Kris Nuttycombe 3ea7d84183 zcash_client_backend: Update to use extracted `zip321` crate 2024-04-05 16:25:21 -06:00
Kris Nuttycombe d982d7826a zip321: Replace dependencies on `zcash_keys` types with `zcash_address` 2024-04-05 16:10:22 -06:00
Kris Nuttycombe fdf86ad740 Move `zcash_client_backend::zip321` to the `zip321` crate. 2024-04-03 12:14:20 -06:00
Kris Nuttycombe 07d5aa4a79 zip321: Remove stub lib.rs 2024-04-03 12:14:18 -06:00
Kris Nuttycombe bbb8d1090a Add placeholder for a zip321 crate. 2024-04-03 12:13:47 -06:00
Kris Nuttycombe 5f042c4657 zcash_protocol release version 0.1.1 2024-03-24 19:29:59 -06:00
Jack Grigg 6898dbf094 Replace `unstable-nu6` and `zfuture` feature flags with cfg flags
Neither of these should have been feature flags, as they gate breaking
changes to the Zcash consensus rules (and in some ways are incompatible
with each other), while feature flags should be additive.
2024-03-10 18:42:39 +00:00
Kris Nuttycombe cb4b9f80bc zcash_protocol: Add `TryFrom<&MemoBytes>` for `Memo` 2024-03-08 13:48:30 -07:00
Jack Grigg d539f04f2e zcash_address 0.3.2 2024-03-06 15:07:51 +00:00
Jack Grigg d0673c9bc3 zcash_protocol 0.1.0 2024-03-06 15:07:11 +00:00
Kris Nuttycombe cef9e7641d `zcash_address`: Add support for ZIP 320, TEX addresses. 2024-03-06 14:59:16 +00:00
Kris Nuttycombe eaabc0f514 Apply suggestions from code review
Co-authored-by: Daira-Emma Hopwood <daira@jacaranda.org>
2024-03-05 20:03:46 -07:00
Kris Nuttycombe 8955cfc559 Add missing CHANGELOG entries. 2024-03-05 14:37:26 -07:00
Kris Nuttycombe 5675a76f0d zcash_protocol: Use `BalanceError` instead of `()` for monetary range violations. 2024-03-05 13:59:26 -07:00
Kris Nuttycombe 51d4464472 Remove `network_type` calls that are obviated by the blanket impl. 2024-03-05 13:36:15 -07:00
Kris Nuttycombe b8aa5132c2 Apply suggestions from code review
Co-authored-by: str4d <thestr4d@gmail.com>
Co-authored-by: Daira-Emma Hopwood <daira@jacaranda.org>
2024-03-05 13:36:15 -07:00
Kris Nuttycombe 04fdac7931 zcash_primitives: Move the `memo` module to the `zcash_protocol` crate. 2024-03-05 13:36:15 -07:00
Kris Nuttycombe 4b18426fcd zcash_address: Use `zcash_protocol::consensus::NetworkType`
This inverts the dependency relationship between `zcash_protocol` and
`zcash_address`, permitting the network constants (primarily the HRPs)
defined in `zcash_protocol` to be used directly in `zcash_address`
instead of being duplicated.
2024-03-05 13:36:15 -07:00
Kris Nuttycombe 64454100c5 zcash_client_backend: Move the `ShieldedProtocol` and `PoolType` types to `zcash_protocol` 2024-03-05 09:46:03 -07:00
Kris Nuttycombe a35ccfc10b Fix broken intra-doc links after `zcash_protocol` crate extraction. 2024-03-05 09:45:24 -07:00
Kris Nuttycombe 85d1ca251a zcash_primitives: Move the `local-consensus` module to the `zcash_protocol` crate. 2024-03-05 09:45:24 -07:00
Kris Nuttycombe eb3c7b479e zcash_protocol: Modify `Zatoshis` to directly wrap a u64 2024-03-05 09:45:24 -07:00
Kris Nuttycombe 7188482225 zcash_protocol: Rename value amounts to `Zatoshis` and `ZatBalance` 2024-03-05 09:45:24 -07:00
Kris Nuttycombe 5e4d9abbce Move `Amount` and `NonNegativeAmount` types to the `zcash_protocol` crate. 2024-03-05 09:45:24 -07:00
Kris Nuttycombe bacfe3cb9d Move `zcash_primitives::{consensus, constants}` to the `zcash_protocol` crate 2024-03-05 09:45:24 -07:00
Kris Nuttycombe 66c6bba84e Add stub for a `zcash_protocol` crate. 2024-03-05 09:45:24 -07:00
Jack Grigg 29dc5d1d5c zcash_address 0.3.1 2024-01-12 04:53:39 +00:00
Jack Grigg 22271145a7 zcash_address: Improve documentation 2024-01-12 04:53:39 +00:00
Jack Grigg 6570116384 zcash_address: Show feature flags in documentation 2024-01-12 02:45:22 +00:00
Jack Grigg 3f006bffac zcash_address: Remove private type aliases for raw data sizes
These served no type safety purpose; they were just to make developing
the crate easier. However, while docs.rs correctly shows these in trait
APIs as their plain `[u8; N]` form, editor LSPs like `rust-analyzer`
assume the crate-private types are public and auto-create stubs that
reference them, which is not good UX for downstream developers.
2024-01-12 00:15:55 +00:00
Kris Nuttycombe 374882b7bc Move `zcash_note_encryption` component to https://github.com/zcash/zcash_note_encryption
The `zcash_note_encryption` component crate has been factored out to
its own repository, to avoid circular crate dependencies involving
https://github.com/zcash/librustzcash and the
https://github.com/zcash/orchard and
https://github.com/zcash/sapling-crypto repositories.
2023-11-17 20:39:14 -07:00
Jack Grigg c8e2d81f58 Render byte slices as hex more often in `Debug` impls
This is more generally useful for debugging purposes than the default
`Debug` impl for `&[u8]`.

We also provide an alternate `Debug` impl for `legacy::Script` that
parses and renders known opcodes. Note that we only parse a subset of
the full opcode set.
2023-08-30 20:41:27 +00:00
Kris Nuttycombe 60ac1070c5 Release zcash_address version 0.3.0 2023-06-06 15:53:16 -06:00
Kris Nuttycombe 75e529eea6 Upgrade to `bs58 0.5` 2023-06-06 15:53:14 -06:00