4a94975268
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. |
||
---|---|---|
.cargo | ||
.github | ||
build-aux/m4 | ||
contrib | ||
depends | ||
doc | ||
qa | ||
share | ||
src | ||
test/lint | ||
zcutil | ||
.editorconfig | ||
.gitattributes | ||
.gitignore | ||
CONTRIBUTING.md | ||
COPYING | ||
Cargo.lock | ||
Cargo.toml | ||
INSTALL | ||
Makefile.am | ||
README.md | ||
SECURITY.md | ||
autogen.sh | ||
code_of_conduct.md | ||
configure.ac | ||
libzcash_script.pc.in | ||
rust-toolchain.toml |
README.md
Zcash 5.4.2
What is Zcash?
Zcash is an implementation of the "Zerocash" protocol. Initially based on Bitcoin's design, Zcash intends to offer a far higher standard of privacy through a sophisticated zero-knowledge proving scheme that preserves confidentiality of transaction metadata. More technical details are available in our Protocol Specification.
The zcashd
Full Node
This repository hosts the zcashd
software, a Zcash consensus node
implementation. It downloads and stores the entire history of Zcash
transactions. Depending on the speed of your computer and network
connection, the synchronization process could take several days.
The zcashd
code is derived from a source fork of
Bitcoin Core. The code was forked
initially from Bitcoin Core v0.11.2, and the two codebases have diverged
substantially.
🔒 Security Warnings
See important security warnings on the Security Information page.
Zcash is experimental and a work in progress. Use it at your own risk.
📒 Deprecation Policy
This release is considered deprecated 16 weeks after the release day. There is an automatic deprecation shutdown feature which will halt the node some time after this 16-week period. The automatic feature is based on block height.
Other Zcash Implementations
The Zebra project offers a different Zcash consensus node implementation, written largely from the ground up.
Getting Started
Please see our user guide for instructions on joining the main Zcash network.
Need Help?
- 📘 See the documentation at the ReadTheDocs for help and more information.
- 📨 Ask for help on the Zcash forum.
- 💬 Join our community on Discord
Participation in the Zcash project is subject to a Code of Conduct.
Building
Build Zcash along with most dependencies from source by running the following command:
./zcutil/build.sh -j$(nproc)
Currently, Zcash is only officially supported on Debian and Ubuntu. See the Debian / Ubuntu build for detailed instructions.
License
For license information see the file COPYING.