Reject ztxs with duplicate zkproofs #327

Merged
duke merged 1 commits from duplicate_proofs into dev 7 months ago
duke commented 7 months ago
Owner

This is a greatly simplified and slightly tweaked version of
af2e3713e2

Their version will detect duplicate zkproofs across transactions while
this code will only detect duplicate zkproofs in a single ztx. If dupes
are found, the tx will be denied entry into the mempool.

This provides most of the benefit (increased CPU cost to attackers) with the
least code change and no annoyance to full node operators. Detecting
duplicate zkproofs across transactions requires a one-time reindex of
all of history, which means significant downtime for nodes.

Since Hush + HSCs have a much more strict policy on number of shielded
outputs and shielded inputs, only detecting duplicate zkproofs in
individual ztxs seems sufficient for now.

No correctly functioning node or wallet will ever create duplicate
zkproofs, so there is no worry of this accidentally affecting normal
users. Currently this is not a consensus rule but it could become one
in the future.

This is a greatly simplified and slightly tweaked version of https://github.com/PirateNetwork/pirate/commit/af2e3713e286d61353edffd0b4c89c931b455cb4 Their version will detect duplicate zkproofs across transactions while this code will only detect duplicate zkproofs in a single ztx. If dupes are found, the tx will be denied entry into the mempool. This provides most of the benefit (increased CPU cost to attackers) with the least code change and no annoyance to full node operators. Detecting duplicate zkproofs across transactions requires a one-time reindex of all of history, which means significant downtime for nodes. Since Hush + HSCs have a much more strict policy on number of shielded outputs and shielded inputs, only detecting duplicate zkproofs in individual ztxs seems sufficient for now. No correctly functioning node or wallet will ever create duplicate zkproofs, so there is no worry of this accidentally affecting normal users. Currently this is not a consensus rule but it could become one in the future.
duke added 1 commit 7 months ago
14d3ae1785 Reject ztxs with duplicate zkproofs
duke merged commit fb5563d06a into dev 7 months ago
duke deleted branch duplicate_proofs 7 months ago
The pull request has been merged as fb5563d06a.
Sign in to join this conversation.
Loading…
There is no content yet.