Go to file
Daira Emma Hopwood e2f99f5133 Fix the dust threshold rate to three times 100 zats/1000 bytes.
(We express it that way rather than 300 zats/1000 bytes, because the
threshold is always rounded to an integer and then multiplied by 3.)

Bitcoin Core added the concept of "dust" in bitcoin/bitcoin#2577.
At that point the dust threshold was tied to three times the
minRelayTxFee rate, with the motivation that if you'd pay more than
a third of the minimum relay fee to spend something, it should be
considered dust. This was implemented as a standard rule rejecting
dust outputs.

This motivation will not apply after ZIP 317 block construction
is implemented: at that point the ZIP 317 marginal fee will be
5000 zats per logical action, but the dust threshold rate will
still be three times 100 zats per 1000 bytes. Those costs would
only coincide if the marginal size per logical action were
5000/300 * 1000 ~= 16667 bytes, and in practice the marginal size
for any kind of input is much smaller than that.

However, to avoid interoperability problems (older wallets creating
transactions that newer nodes will reject because they view the
outputs as dust), we will have to coordinate any increase in the
dust threshold carefully.

More history: in Zcash the minRelayTxFee rate was 5000 zats/1000 bytes
at launch, changed to 1000 zats/1000 bytes in zcashd v1.0.3 and to
100 zats/1000 bytes in zcashd v1.0.7-1 (#2141). The relaying problem
for shielded transactions (#1969) that prompted the latter change was
fixed more thoroughly by the addition of `CFeeRate::GetFeeForRelay`
in #4916, ensuring that a transaction paying `DEFAULT_FEE` can always
be relayed. At the same time the default fee was set to 1000 zats,
per ZIP 313.

An earlier commit in this PR changed relaying policy to be more strict
about enforcing minRelayTxFee. The commit just before this one also
allowed `-minrelaytxfee=0`, which we are going to use to avoid some test
breakage. But if the dust threshold rate were still set to three times
the minRelayTxFee rate, then setting `-minrelaytxfee=0` would have the
side effect of setting the dust threshold to zero, which is not intended.

Bitcoin Core took a different approach to disentangling the dust
threshold from the relay threshold, adding a `-dustrelayfee` option
(bitcoin/bitcoin#9380). We don't want to do that because it is likely
that we will change the dust policy again, and adding a user-visible
config option might conflict with that. Also, it isn't a good idea for
the dust threshold rate to be configurable per node; it's a standard
rule parameter and should only be changed with network-wide coordination
(if it is increased then wallets have to change before nodes, and vice
versa if it is decreased). So for now we set it to a constant that
matches the behaviour before this PR.

Since we can no longer modify the dust threshold, we remove a check
from transaction_tests.cpp that relied on doing so.

This change also indirectly fixes a false-positive assertion error that
would occur in `SpendableInputs::LimitToAmount` if we allowed the dust
threshold to be zero.

Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
2023-04-17 18:49:45 +01:00
.cargo Use published `zcash_primitives 0.11` and `zcash_proofs 0.11` 2023-04-15 01:51:29 +00:00
.github Add additional audits. 2023-04-03 16:41:07 -06:00
build-aux/m4
contrib wallet: Remove sendfree 2023-04-17 18:49:45 +01:00
depends depends: `cxx 1.0.94` 2023-04-13 17:01:03 +00:00
doc [rpc] Remove priorityDelta from prioritisetransaction 2023-04-17 18:49:45 +01:00
qa [rpc] Remove priorityDelta from prioritisetransaction 2023-04-17 18:49:45 +01:00
share Remove `git_check_in_repo` from genbuild.sh to fix gitian version string 2022-10-21 14:39:21 -07:00
src Fix the dust threshold rate to three times 100 zats/1000 bytes. 2023-04-17 18:49:45 +01:00
test/lint Appease ShellCheck 2022-12-06 10:46:43 -07:00
zcutil Update release support book page in release process 2023-03-09 03:17:56 +00:00
.editorconfig Correct EditorConfig for Makefiles 2023-04-03 13:30:59 -06:00
.gitattributes
.gitignore
CONTRIBUTING.md
COPYING
Cargo.lock Use published `zcash_primitives 0.11` and `zcash_proofs 0.11` 2023-04-15 01:51:29 +00:00
Cargo.toml Use published `zcash_primitives 0.11` and `zcash_proofs 0.11` 2023-04-15 01:51:29 +00:00
INSTALL Update documentation link 2023-02-21 07:07:17 +01:00
Makefile.am Fix automake warnings when running autogen.sh 2023-03-13 10:11:26 -06:00
README.md
SECURITY.md Fix Horizen Security contact email 2023-02-17 22:16:38 +00:00
autogen.sh Enable ShellCheck rules 2022-08-20 03:13:52 +00:00
code_of_conduct.md
configure.ac
libzcash_script.pc.in
rust-toolchain.toml CI: Remove most usages of `actions-rs` actions 2023-03-16 15:38:15 +00:00

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.