Commit Graph

3168 Commits

Author SHA1 Message Date
Duke
2b3f9ed33f Add -ac_clearnet=0 option so an entire chain can disable clearnet connection, instead of -clearnet=0 which only applies to a single node 2025-08-08 16:09:32 -04:00
Duke
e748772fff Validate -ac_minopreturnfee as a consensus rule 2025-05-17 10:23:51 -04:00
Duke
080092a16d -ac_burn=1 requires a z2t tx, -ac_burn=2 does not 2025-05-06 00:31:13 -04:00
Duke
d39503c13b Add HAC option to allow sending funds to the transparent burn address when -ac_private=1 2025-04-29 14:52:25 -04:00
Duke
18e4ca070e Remove more cc stuff 2024-10-01 10:49:13 -04:00
Duke
a00ad8eeb8 Merge branch 'dev' into duke 2024-10-01 08:58:09 -04:00
Duke
93f6514d86 Disable absurd fee checks when adding to the mempool
To protect users who are not using opreturn we prevent any use of z_sendmany
with absurd fees if opreturn is not being used, so this change only affects
users who are adding opreturn data. Since there is no way to currently send
opreturn data via a GUI this still protects all GUI users from absurd fees
while allowing CLI users to decide to use higher fees.
2024-09-26 11:13:07 -04:00
Duke
01f0c34661 We do not support coin imports 2024-09-24 09:35:20 -04:00
Duke
b6bcacad20 We do not support coin imports 2024-09-22 12:16:21 -04:00
Duke
148ea35a98 Remove dead sprout code 2024-09-22 11:56:12 -04:00
Duke
380875906d Remove more CC stuff 2024-09-22 09:40:37 -04:00
Duke
d471af9ef5 IsPegsImport() is always false
Since this function always returns false and is used in many "hot"
code paths, removing it from the code should give us a performance boost.
2024-09-18 12:13:37 -04:00
Duke
ffce5edda3 Remove commented out code 2024-09-18 11:59:00 -04:00
Duke
5e30079fcd IsPegsImport() always returns false 2024-09-18 11:53:40 -04:00
Duke
27f72405b2 Also print address to stderr in hush_isnotaryvout 2024-09-17 13:11:11 -04:00
Duke
f8e7df37a1 Delete commented out code 2024-09-12 12:12:59 -04:00
Duke
ed86f2dd1d Sleep for 200us before each ActivateBestChainStep call
This should lower the main thread's likelihood to immediately reacquire
cs_main after dropping it, which should help ThreadNotifyWallets and the
RPC methods to acquire cs_main more quickly.

Ported from ZEC commit e2cd1b761fe556bc6d61849346902c3611530307
2024-09-12 00:21:56 -04:00
Duke
1e892f23e6 Remove dead nVersion code
This is very old code from the early days of Bitcoin, our mainnets have
never used peer protocol version.

Originally 150ab1d34c
2024-08-07 07:18:08 -07:00
Duke
5273f4be9e Give Hush mainnet a dedicated minimum protocol version #345
Hush and DragonX do not have the same requirements for which nodes they
should talk to because they don't necessarily have consensus changes at
the same time. For instance, 3.10.0 was a consensus change for Hush but
not DragonX. This commit changes things so that Hush nodes will no
longer talk to old nodes that are not consensus compatible but leaves
things the same for DragonX mainnet, which has never had a consensus
change.
2024-05-06 08:46:21 -07:00
onryo
58b65f9670 Update copyrights 2024-02-27 23:59:59 +01:00
Duke
a581f8fc8e Fix compile error and remove some cryptocondition dingleberries 2024-02-15 11:03:05 -05:00
Duke
b9d3c77a4c Merge branch 'duke' into dev 2024-02-15 10:41:50 -05:00
Duke
07b041fd94 Do not apply overwinter/sapling consensus rules to block 0 2024-02-15 10:40:22 -05:00
Duke
8f2350fd84 Merge branch 'dev' into duke 2024-02-15 10:11:52 -05:00
Duke
b14070d15b Overwinter+sapling consensus rules do not apply to height=0 2024-02-15 10:06:37 -05:00
Duke
c94906e011 Do not spam debug.log with 'Received addr' unless -debug 2024-02-12 09:57:52 -05:00
Duke
acee1c8cf5 Do not spam debug.log with 'Received addr' unless -debug 2024-02-12 09:57:09 -05:00
Duke
90d47ecce4 Potentially fix #382 by not checking the genesis block against sapling consensus rules 2024-02-11 06:29:29 -05:00
Duke
27db254d68 Sapling and Overwinter network upgrades are always active
These NU's are always active for Hush Arrakis Chains so this code only serves
to slow down all operations by constantly being checked. So we disable them
which will speed up syncing, mining and creating transactions.
2024-01-21 16:34:53 -05:00
Duke
b0b9565d6a Sapling and Overwinter network upgrades are always active 2024-01-21 15:32:23 -05:00
Duke
3a3c67e0fc Delete many things we do not want or need 2024-01-13 00:06:09 -05:00
Duke
90133dbc0e Also log flush mode in FlushStateToDisk() 2023-12-27 17:56:44 -05:00
Duke
20fdc0e4fe Get rid of deprecation entirely which allows current code to run past block height 5555555 2023-12-27 12:57:35 -05:00
Duke
2a2391f0f9 Log when trimming block solutions 2023-12-27 11:43:53 -05:00
duke
95b4371aa4 Merge pull request 'Reduce memory usage' (#332) from reduce_memory into dev
Reviewed-on: https://git.hush.is/hush/hush3/pulls/332
2023-10-25 15:11:51 +00:00
Duke
4256e7d835 Suppress 'Ignoring nbits' debug 2023-10-16 10:36:57 -04:00
Duke
31a6b72caf Merge branch 'dev' into reduce_memory 2023-10-16 06:04:56 -04:00
Duke
14d3ae1785 Reject ztxs with duplicate zkproofs
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.
2023-10-13 04:31:41 -07:00
Duke
aa5cbee69c Remove dead code 2023-09-18 20:57:47 -04:00
Duke
13612bb1c8 Better error message when hashPrevBlock != view.GetBestBlock 2023-06-13 22:58:36 -04:00
Duke
5f9bb80873 Remove unused function 2023-06-12 19:06:50 -04:00
Duke
487fff149c Remove dead code related to invalid joinsplit sigs 2023-06-12 07:59:53 -07:00
Duke
18f0689695 Avoid ztx validation during IBD if height is less than latest checkpoint 2023-06-12 07:55:45 -07:00
Duke
18eea5cb03 Merge branch 'duke' of https://git.hush.is/hush/hush3 into duke 2023-04-27 07:10:08 -04:00
Duke
d840a0ec62 Only log nbits in ContextualCheckBlockHeader if -debug 2023-04-23 06:56:19 -07:00
Duke
e8dc755f06 Reduce memory usage of CBlockIndex
Ported code from https://github.com/zcash/zcash/pull/6192 with various changes needed
for the Hush codebase.
2023-04-13 23:30:23 -04:00
Duke
053e9156a7 Fix progress estimate for HUSH at startup 2023-04-12 10:08:09 -04:00
Duke
15aaf4af44 Remove mempool p2p message #284 2023-04-06 12:59:31 -04:00
Duke
8c8f451be8 Remove dead code from CheckTransaction() 2023-04-06 12:37:10 -04:00
Duke
63ad87f69b Ensure CNode::addrKnown immediately takes little memory when we disconnect the node 2023-03-17 00:21:00 -04:00