Commit Graph

2680 Commits

Author SHA1 Message Date
Kris Nuttycombe 7c1a4c898d Fix wasm32 CI runner.
The `halo2_proofs/multicore` flag must be disabled when running wasm
builds; this ensures that we do not accidentally include it as a
transitive dependency when building with `--no-default-features`.
2023-03-20 14:39:07 -06:00
Kris Nuttycombe 77fbd8cb4f Update dependencies to reflect changes in ff 0.13 2023-03-20 14:35:45 -06:00
str4d 0cff3c67ed
Merge pull request #794 from zcash/temporary-zcashd-notecommitment-derive
Temporarily re-expose Sapling `NoteCommitment` derivation
2023-03-17 00:05:20 +00:00
Jack Grigg 2530eb3a9d Temporarily re-expose Sapling `NoteCommitment` derivation 2023-03-16 23:27:01 +00:00
Kris Nuttycombe e934316db9
Merge pull request #784 from zcash/temporary-zcashd-bundle-from-parts
Temporarily re-expose ability to construct invalid Sapling bundles
2023-03-08 09:02:06 -07:00
Jack Grigg a8003c8ff5 Temporarily re-expose ability to construct invalid Sapling bundles
Until zcash/zcash#6397 is closed, this ability is needed by `zcashd` for
crossing the FFI.
2023-03-08 03:45:01 +00:00
Kris Nuttycombe 8bf5effb71
Merge pull request #779 from nuttycom/pin_inferno
Pin the `inferno` transitive dependency to avoid MSRV errors.
2023-02-16 11:54:59 -07:00
Kris Nuttycombe 9c56b21de7 Pin the `inferno` transitive dependency to avoid MSRV errors. 2023-02-16 11:06:24 -07:00
Kris Nuttycombe d456697fa6
Merge pull request #769 from zcash/dependabot/github_actions/actions/cache-3.2.4
Bump actions/cache from 3.2.2 to 3.2.4
2023-02-02 11:15:08 -07:00
Kris Nuttycombe 64b380c525
Merge pull request #775 from zcash/ci-replace-toolchain-actions
CI: Replace `actions-rs/toolchain` with `dtolnay/rust-toolchain`
2023-02-02 11:13:08 -07:00
Jack Grigg aca56b5d5a CI: Replace `actions-rs/toolchain` with `dtolnay/rust-toolchain`
Now that dtolnay/rust-toolchain#53 has been closed, we can migrate
away from the unmaintained actions-rs/toolchain.
2023-02-02 17:07:39 +00:00
Kris Nuttycombe 6027f52e8e
Merge pull request #773 from zcash/ci-replace-unmaintained-actions
CI: Replace most unmaintained `actions-rs/*` actions
2023-02-01 14:21:14 -07:00
Jack Grigg a4d7254406 CI: Replace most unmaintained `actions-rs/*` actions
The actions-rs/* actions are unmaintained. See actions-rs/toolchain#216
for more information.

- actions-rs/toolchain is replaced by rust-toolchain.toml.
- actions-rs/cargo is replaced by direct cargo usage.
- actions-rs/tarpaulin is replaced by the cargo-tarpaulin container.

We currently retain a few usages due to a current lack of alternatives:

- actions-rs/toolchain to enable beta (for Clippy warnings) and nightly
  (for building the book).
- actions-rs/clippy-check so Clippy results are published as annotations
  on PRs.

We also now require via rust-toolchain.toml that people building from
the repo have the clippy and rustfmt components installed. This is fine
because they will need to ensure these pass when making PRs.
2023-02-01 17:18:24 +00:00
str4d 847c187beb
Merge pull request #772 from zcash/release-0.10
`zcash_primitives 0.10.0`, `zcash_proofs 0.10.0`, `zcash_client_backend 0.7.0`, `zcash_client_sqlite 0.5.0`
2023-02-01 02:55:44 +00:00
Jack Grigg 5f7cae1762 zcash_client_sqlite 0.5.0 2023-02-01 02:12:47 +00:00
Jack Grigg d8cb20e091 zcash_client_backend 0.7.0 2023-02-01 02:11:56 +00:00
Jack Grigg 24b5e04c8d zcash_proofs 0.10.0 2023-02-01 02:10:42 +00:00
Jack Grigg 9852c31970 zcash_primitives 0.10.0 2023-02-01 02:10:42 +00:00
Jack Grigg 5b00699d66 Update changelogs 2023-02-01 01:58:45 +00:00
str4d b6f7ff06ed
Merge pull request #761 from nuttycom/wallet/expose_transaction_propose
Factor out a transaction proposal API from `spend`.
2023-02-01 00:51:31 +00:00
Kris Nuttycombe 4fafd14d17 Factor out a transaction proposal API from `spend`.
This change makes it possible for wallets using the
`zcash_client_backend::data_api::wallet` module to perform transaction
preparation, including input selection and fee calculation, as an
independent step prior to creating proofs and signatures. This can be
used to improve user experience by making it possible to report the
proposed effects of the transaction to the wallet user (including
privacy implications) prior to authorizing the transaction.
2023-02-01 00:15:33 +00:00
str4d 756f388e00
Merge pull request #706 from zcash/add_limit_validate_chain
Adds `limit` parameter to `validate_chain()`
2023-01-31 21:01:47 +00:00
Francisco Gindre 444591705c Rephrase documentation for `validate_chain()` at data_api/chain.rs
Delete documentation no longer being accurate for `validate_chain()`
2023-01-31 13:14:07 -07:00
Kris Nuttycombe 636bac7154 Make block height argument to `BlockSource::with_blocks` optional.
Previously, if a caller wanted to use a block source to perform
scanning from the first available block, they would have to guess
at the block height to start from. Changing this to an optional
argument makes this explicit.
2023-01-31 13:14:07 -07:00
Francisco Gindre bf73ed3a00 Adds `limit` parameter to `validate_chain()`
This allows callers to validate smaller intervals of the given
`BlockSourceT` shortening processing times of the function call at the
expense of obtaining a partial result on a given section of interest of
the block source.

`params: &ParamsT` has been removed from the arguments since they were
only needed to fall back to `sapling_activation_height` when `None` as
passed as the `validate_from` argument. Passing `None` as validation
start point on a pre-populated `block_source` would result in an error
`ChainError::block_height_discontinuity(sapling_activation_height - 1, current_height)`

With this new API callers must specify a concrete `validate_from`
argument and assume that `validate_chain` will not take any default
fallbacks to chain `ParamsT`.

The addition of a `limit` to the chain validation function changes the
meaning of its successful output, being now a `BlockHeight, BlockHash)`
tuple indicating the block height and block hash up to which the chain
as been validated on its continuity of heights and hashes. Callers
providing a `limit` aregument are responsible of subsequent calls to
`validate_chain()` to complete validating the remaining blocks stored on
the `block_source`.

Closes zcash/librustzcash#705
2023-01-31 13:14:04 -07:00
Francisco Gindre 8ca83c14be
Merge pull request #770 from zcash/remove_remove_tx
Remove unstable function `WalletWrite::remove_unmined_tx`
2023-01-31 17:10:06 -03:00
Francisco Gindre e9eb5f8c0f Remove unstable function `WalletWrite::remove_unmined_tx`
Closes #622

Used PR https://github.com/zcash/librustzcash/pull/621 as reference to
know what had been added and remove it.
2023-01-31 15:21:46 -03:00
dependabot[bot] 056f2f0a73
Bump actions/cache from 3.2.2 to 3.2.4
Bumps [actions/cache](https://github.com/actions/cache) from 3.2.2 to 3.2.4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3.2.2...v3.2.4)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-31 05:02:23 +00:00
Kris Nuttycombe 7599fbd3c3
Merge pull request #767 from nuttycom/fix/fsblockdb_for_path_doc
Add a note about metadata database initialization to `FsBlockDb::for_path`
2023-01-27 14:05:44 -07:00
Kris Nuttycombe bf85a28ec1 Add a note about metadata database initialization to `FsBlockDb::for_path`
Fixes #748
2023-01-26 14:34:27 -07:00
Kris Nuttycombe a6f2a6c41b
Merge pull request #763 from zcash/fsblockdb-find-block
zcash_client_sqlite: Add `FsBlockDb::find_block`
2023-01-25 09:44:17 -07:00
Jack Grigg f00257faad zcash_client_sqlite: Add `FsBlockDb` API test 2023-01-25 15:39:38 +00:00
Jack Grigg 9226c98dd5 zcash_client_sqlite: `impl {Clone, Copy, Debug, PartialEq, Eq} for BlockMeta` 2023-01-25 15:33:02 +00:00
Jack Grigg e37f458a70 zcash_client_sqlite: Add `FsBlockDb::find_block` 2023-01-25 15:33:01 +00:00
Kris Nuttycombe 5d62b68d70
Merge pull request #756 from zcash/blockmeta_rewind_to_height
[#751] add support for rewind_to_height to FsBlockDb
2023-01-24 20:19:22 -07:00
Daira Hopwood 1b5b8d73e6
Merge pull request #755 from zcash/sapling-api-changes
Sapling API changes
2023-01-24 21:53:50 +00:00
Jack Grigg 7f970bb82f Use `EphemeralSecretKey, EphemeralPublicKey, SharedSecret` types in APIs 2023-01-24 15:02:49 +00:00
Jack Grigg bc99cd2634 Move prepared key types into `sapling::keys`
We re-export them under `sapling::note_encryption` for now to make the
API changes smaller.
2023-01-24 15:02:43 +00:00
Jack Grigg ded14adbb3 Add `sapling::keys::DiversifiedTransmissionKey` 2023-01-24 15:02:38 +00:00
Jack Grigg 06ba399d80 Clean up the `sapling::Note` API 2023-01-24 15:02:32 +00:00
Jack Grigg 87d0bd7db1 Refactor `sapling::Note`
Its internals are now private, and it stores a `PaymentAddress` (and by
extension the diversifier) instead of `g_d`.
2023-01-24 15:02:27 +00:00
Jack Grigg dff21222fb Require `PaymentAddress` to contain a valid diversifier 2023-01-24 14:51:13 +00:00
Jack Grigg 42c332a7a8 Use `sapling::note::ExtractedNoteCommitment` type in APIs 2023-01-24 14:37:11 +00:00
Francisco Gindre 22351f46ee
Merge branch 'main' into blockmeta_rewind_to_height 2023-01-23 06:23:24 -03:00
Jack Grigg 0a26c812e0 Split `sapling::Authorization::Proof` type into Spend and Output types
While the Groth16 proofs have identical encodings, they are technically
for different circuits, and we need the ability to differentiate them
during bundle building.
2023-01-20 11:12:49 +00:00
Kris Nuttycombe 79f3f10714
Merge pull request #760 from zcash/759-msrv-1.60
Bump MSRV for `zcash_primitives` and dependents to 1.60
2023-01-19 19:33:15 -07:00
str4d 362e9aa0ad
Merge pull request #753 from zcash/sapling-refactor
Sapling refactor
2023-01-20 02:00:19 +00:00
Jack Grigg 809427f6bd criterion 0.4 2023-01-20 00:03:10 +00:00
Jack Grigg 49b1cb3e69 Bump MSRV for `zcash_primitives` and dependents to 1.60
The MSRVs of the component crates are left as-is, partly because our
dependencies don't require us to bump them, and partly because those
crates have no pending changes and are relatively stable. We also plan
to split the component crates out into a separate repository, where it
will be easier to have a separate MSRV.

Closes zcash/librustzcash#759.
2023-01-19 23:48:24 +00:00
Francisco Gindre 7306b9d2a9 [#751] add support for rewind_to_height to FsBlockDb
Closes #751

Ran `cargo fmt`

return the result as an error rather than unwrap

Co-authored-by: Kris Nuttycombe <kris@nutty.land>
2023-01-17 14:43:33 -03:00