Commit Graph
100 Commits
Author SHA1 Message Date
Duke f98c34be1c Make -disableipv4/-disableipv6 do something useful 2025-02-12 13:38:53 -05:00
Duke 46e6faa6fb New script to calculate average blocktime between block heights
To use the script:
    ./contrib/avg_blocktime.pl DRAGONX

It has some default block heights defined, if you want custom ones
than those are given as 2nd and 3rd arguments. Currently the script
prints out:

Avg blocktime over 3000 blocks = 36.0526666666667

So with this evidence it seems that DRAGONX has the correct average
blocktime and network hashrate.
2024-12-25 12:03:29 -05:00
Duke 15f889d9f8 Cleanup 2024-12-03 11:55:43 -05:00
Duke 179fc6d6c0 Skip networks which do not have ASNs 2024-12-03 11:53:30 -05:00
Duke ecf98cbce1 Schedule asmap health check to run once 5 mins after node starts 2024-12-03 11:28:11 -05:00
Duke cceb61c371 Initial implementation of asmap health check 2024-12-02 11:11:40 -05:00
Duke 1009f931f2 Remove duplicate scheduling of peers.dat 2024-12-01 20:05:34 -05:00
Duke 0f4956be72 Support an env var to generate SDL checkpoints for a HAC 2024-11-18 10:43:08 -05:00
Duke 6e6ff5ccbc Support an env var to generate SDL checkpoints for a HAC 2024-11-18 07:10:25 -08:00
Duke 5578bc81b9 Remove dead code 2024-11-11 08:25:38 -05:00
Duke 82f6b592c5 Remove dead code 2024-11-09 12:01:02 -05:00
Duke f12152af70 Remove dead code 2024-11-09 10:27:58 -05:00
Duke d31c69cf23 Remove dead code 2024-11-09 09:18:08 -05:00
Duke d8a799abe3 Make time warning correct for any HAC 2024-10-22 08:50:39 -04:00
Duke 65568d5738 Remove opreturn amnesty 2024-10-07 06:03:41 -04:00
Duke 8e44829cdf Merge branch 'dev' into duke 2024-10-03 11:11:07 -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 598b969987 Use our own hosted version of libgmp 2024-10-01 08:46:46 -04:00
Duke 67fe111050 Mention wolfssl change in relnotes 2024-09-30 04:36:21 -07:00
Duke 47cc49bcc5 Change OP_RETURN fee requirements
This commit removes the CLI option -opretmintxfee, makes it always
enabled, changes the required fee rate and changes which OP_RETURNS
get "amnesty" and do not need to pay this fee rate.
2024-09-27 09:09:31 -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 bd5f0103a8 Remove more cc code 2024-09-22 12:19:12 -04:00
Duke b6bcacad20 We do not support coin imports 2024-09-22 12:16:21 -04:00
Duke f6b42fe3a3 We do not support coin imports 2024-09-22 12:12:22 -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 26a341983a const some stuff 2024-09-22 08:57:23 -04:00
Duke 986d0d8b7d isStake is always zero 2024-09-22 08:51:48 -04:00
Duke 45de2584b9 ASSETCHAINS_STAKED is always zero 2024-09-21 11:25:48 -04:00
Duke 3fba035c01 const some stuff 2024-09-21 11:04:25 -04:00
Duke 40cf90b4ff Fix compile issue with missing cast to unsigned int 2024-09-21 11:03:49 -04:00
Duke 2a740cb09d Merge branch 'duke' of https://git.hush.is/hush/hush3 into duke 2024-09-20 13:43:15 -04:00
Duke a53d8baeda Do not lock cs_main in mining code
Technically we should take this lock but it has never been there before
and it leads to potentially large slow downs when mining with multiple cores.
We see basically the same hashrate for a single core if we have the lock or
not and that makes sense, since there is only one core, there are no other
mining threads that have to wait. But on one particular CPU I saw a 6% slower
hashing when mining with 2 threads and 35% slower with 3 threads.

This change also means debug builds will coredump if mining is enabled.
2024-09-20 13:41:51 -04:00
Duke 792fec7689 Do not lock cs_main in mining code
Technically we should take this lock but it has never been there before
and it leads to potentially large slow downs when mining with multiple cores.
We see basically the same hashrate for a single core if we have the lock or
not and that makes sense, since there is only one core, there are no other
mining threads that have to wait. But on one particular CPU I saw a 6% slower
hashing when mining with 2 threads and 35% slower with 3 threads.

This change also means debug builds will coredump if mining is enabled.
2024-09-20 13:35:38 -04:00
Duke dfeccf6ce4 Make nBlockPrioritySize and nBlockMinSize consts 2024-09-20 11:24:59 -04:00
Duke 5a3c06e539 MAX_BLOCK_SIZE ignores height argument
The function no longer looks at this argument so don't waste resources calculating a height.
2024-09-20 11:18:16 -04:00
Duke f3995fa1b7 Cleanup MAX_BLOCK_SIZE 2024-09-18 18:12:01 -04:00
Duke ad8a86a19b Merge branch 'dev' into duke 2024-09-18 12:16:29 -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 160802cddf Update relnotes 2024-09-18 11:48:52 -04:00
Duke fcc5c17628 Bump protocol version and client version 2024-09-18 10:59:37 -04:00
Duke d915fc38b7 Add some useful comments to the wolfssl package 2024-09-18 10:53:28 -04:00
Duke adbd47980c Merge branch 'dev' of https://git.hush.is/hush/hush3 into dev 2024-09-18 10:50:42 -04:00
Duke 27f72405b2 Also print address to stderr in hush_isnotaryvout 2024-09-17 13:11:11 -04:00
Duke bd967b7ac6 Exit out of TLSManager::waitFor() loop if shutdown requested 2024-09-17 11:30:01 -04:00
Duke 8adaa3641f Exit out of TLSManager::waitFor() loop if shutdown requested 2024-09-17 11:29:24 -04:00
Duke 3f50dd988a Only use -rdynamic on debug builds 2024-09-16 11:26:28 -04:00
Duke bc20629b9f Revert "Fix memory DoS"
This reverts commit 84377caae7.
2024-09-16 11:18:16 -04:00
Duke fc5b0f38bd Revert "Memory DoS fixes"
This reverts commit 6a5f0eafde.
2024-09-16 11:17:56 -04:00
Duke c5eeb74807 Simplify MAX_BLOCK_SIZE
Our code requires sapling activation at height 1 so we can simplify this function
which should lead to some performance improvements since it is called from many
places, including mining code.
2024-09-16 11:06:31 -04:00
Duke 912942f2a8 Delete more CC stuff 2024-09-13 18:50:28 -04:00
Duke 4f4a72da8e Go back to taking both main+wallet lock in DecrementWitnesses
By taking a wallet lock first and then main later we run into
a potential deadlock :

2024-09-13 11:14:37 POTENTIAL DEADLOCK DETECTED
2024-09-13 11:14:37 Previous lock order was:
2024-09-13 11:14:37  (1) cs_wallet  wallet/wallet.cpp:985
2024-09-13 11:14:37  (2) cs_main  wallet/wallet.cpp:890
2024-09-13 11:14:37 Current lock order is:
2024-09-13 11:14:37  (2) cs_main  wallet/wallet.cpp:2845
2024-09-13 11:14:37  (1) cs_wallet  wallet/wallet.cpp:2845
2024-09-13 09:34:10 -04:00
Duke f5cae3b403 getinfo rpc needs a cs_wallet lock
Without it we get an AssertLockHeld when calling GetKeyPoolSize .
We could probably make this lock apply to less code, possibly only
the single line that calls GetKeyPoolSize() needs it.
2024-09-13 04:37:48 -04:00
Duke 6845fcd93a This rpc can only be used on non z2z chains 2024-09-13 04:22:28 -04:00
Duke be3641158a Only take cs_main lock in GetSaplingSpendDepth
We do not seem to need this lock for the entire DecrementNoteWitnesses function,
we need it only when calling GetSaplingSpendDepth. Also protects against
the case in the future where some code without cs_main calls GetSaplingSpendDepth.
2024-09-13 04:11:38 -04:00
Duke 72c530d281 SMART_CHAIN_SYMBOL is always defined 2024-09-13 03:50:07 -04:00
Duke 7e486538c9 SMART_CHAIN_SYMBOL is always set, so we can remove these checks 2024-09-12 20:12:26 -04:00
Duke 215d0b7db4 Remove commented out code 2024-09-12 20:02:10 -04:00
Duke 8b0c0493ac Ensure cs_main lock is held when TestBlockValidity() is called 2024-09-12 19:47:42 -04:00
Duke 04165e161a Explain more details about the burn address 2024-09-12 13:40:30 -04:00
Duke f8e7df37a1 Delete commented out code 2024-09-12 12:12:59 -04:00
Duke 7f9878cf0c Take a lock on cs_main in DecrementNoteWitnesses
Another possibly better approach would be to take a lock inside
GetSaplingSpendDepth since we want the lock to apply to as little
code as possible and it is GetSaplingSpendDepth that calls GetDepthInMainChain
which requires a cs_main lock .
2024-09-12 11:47:58 -04:00
Duke aab240e3b3 Temporary change to add -rdynamic to build flags
This allows us to see function names in a backtrace when AssertLockHeld
gives us an assert, which is helping to debug our deadlock bug.

This code should be improved to only do this for debug builds.
2024-09-12 11:21:46 -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 b4e083ae56 Add what seems to be missing locks in mining code 2024-09-11 23:59:57 -04:00
Duke b71d95bdd4 Delete disabled code 2024-09-11 23:32:46 -04:00
Duke aa75877cd6 Print stacktrace when asserting a lock is held 2024-09-11 23:31:44 -04:00
Duke 726191cad4 Merge branch 'dev' into duke 2024-09-11 22:27:33 -04:00
Duke 2a910549ba Merge branch 'dev' of https://git.hush.is/hush/hush3 into dev 2024-09-11 14:53:58 -04:00
Duke 25f2ccb30e Document exactly what the RD6GgnrMpPaTSMn8vai6yiGA7mN4QGPVMY address is and how it is derived 2024-09-11 14:53:33 -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 https://github.com/zcash/zcash/commit/150ab1d34c98096d28d4f7951a02516232f40ae2
2024-08-07 07:18:08 -07:00
Duke 7f27489224 Speed up compile by disabling libevent sample code, originally https://github.com/bitcoin/bitcoin/commit/f38c05104848db63ad0df85c24eea466dbff8536 2024-08-07 07:11:13 -07:00
Duke 379e419aad Convenience script for doing a debug build while autodecting correct OS build script 2024-06-12 13:12:20 -04:00
Duke 8d2380a31d Record value of DEBUG_LOCKORDER in debug.log 2024-06-09 12:10:59 -04:00
Duke 4f928513c1 Revert "Fix bug when using build-mac.sh and remove cryptoconditions from mac+win build scripts"
This reverts commit 46c738500f.
2024-06-09 11:25:37 -04:00
Duke 8a997b04f3 Check if the node should stop when processing thread interrupts and exceptions, in hopes of stopping before a deadlock occurs 2024-06-09 11:22:21 -04:00
Duke cc4b0750d8 Merge branch 'dev' into duke 2024-06-08 07:33:58 -07:00
Duke 46c738500f Fix bug when using build-mac.sh and remove cryptoconditions from mac+win build scripts 2024-06-08 07:16:37 -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
Duke ba86196409 This document is bitrotten and not useful 2024-05-06 08:33:20 -07:00
Duke e42b534036 Keybase is no longer used 2024-05-06 08:29:24 -07:00
Duke 18e3364bc2 Make docs for addnode/disconnectnode correct for HACs #376 2024-04-19 07:32:23 -04:00
Duke 0d0a7e9587 Fix 'writing 1 byte into region of size 0' 2024-04-18 06:41:25 -07:00
Duke 9a23cba099 Merge branch 'duke' into dev 2024-03-22 05:49:33 -07:00
Duke 4928ed97c3 Merge branch 'dev' into duke 2024-03-22 05:16:34 -07:00
Duke f47a7a9d7f We no longer need this junk 2024-03-22 05:15:58 -07:00
Duke 89cc8a9ee3 Move toolchain-info.sh to util/ 2024-03-22 05:11:03 -07:00
Duke 981b275757 Delete unnecessary stuff 2024-03-22 05:10:19 -07:00
Duke f970082504 Remove migratecoin.sh 2024-03-22 05:07:00 -07:00
Duke 753ad7b95b Remove .gitmodules 2024-03-22 05:05:50 -07:00
Duke 975f22bfa0 Improve error message in z_sendmany if tx is estimated to be too large
The previous error message was incorrect, it could be too many inputs
or a combination of too many inputs and outputs and also did not report
the estimated size.
2024-03-21 11:30:54 -04:00
Duke 558f662a33 Do not apply sapling network rules to block height 0 or 1 in ScanForWalletTransactions 2024-03-21 11:17:58 -04:00
Duke f5f851158a Merge branch 'dev' into duke 2024-03-21 11:07:56 -04:00
Duke 3354d45fd3 Make getchaintxstats less noisy in debug log 2024-03-20 16:19:54 -04:00
Duke 8ff5e4aa5e Make getchaintxstats less noisy in debug log 2024-03-20 14:09:02 -04:00
Duke 9842687be2 It is called hush-arrakis-chain now 2024-03-15 15:17:04 -04:00