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.
Any projects which want to use Hush code from now on will need to be licensed as
GPLv3 or we will send the lawyers: https://www.softwarefreedom.org/
Notably, Komodo (KMD) is licensed as GPLv2 and is no longer compatible to receive
code changes, without causing legal issues. MIT projects, such as Zcash, also cannot pull
in changes from the Hush Full Node without permission from The Hush Developers,
which may in some circumstances grant an MIT license on a case-by-case basis.
- Remove adding txfee inputs for gateways claim
- FULLNODE and SUPERLITE macros
- Filter SetCCtxids with txid from oprert
- Fix for nServices of fullnode
- Use SetCCtxids_nSPV for some more CCs
- Fix addnormalinputs and add checking if utxo spent in mempool
The min-difficulty change is a bilateral consensus rule change, and so
must be conditionally enabled in order for the earlier section of the
chain to synchronise.
Technically this could be implemented as a network upgrade, but as this will
never be deployed to mainnet, a targeted fork will suffice.
This introduces a 'minimum chain work' chainparam which is intended
to be the known amount of work in the chain for the network at the
time of software release. If you don't have this much work, you're
not yet caught up.
This is used instead of the count of blocks test from checkpoints.
This criteria is trivial to keep updated as there is no element of
subjectivity, trust, or position dependence to it. It is also a more
reliable metric of sync status than a block count.