We call them HACs now

This commit is contained in:
Duke
2025-06-27 05:32:12 -04:00
parent 3b105c0245
commit 7e63e2f013
9 changed files with 13 additions and 13 deletions

View File

@@ -87,7 +87,7 @@ static int AppInitRPC(int argc, char* argv[])
ParseParameters(argc, argv);
std:string name;
// default HSC is HUSH3 itself, which to the internals, is also an HSC
// default HAC is HUSH3 itself, which to the internals, is also a HAC
name = GetArg("-ac_name","HUSH3");
if ( !name.empty() )

View File

@@ -340,7 +340,7 @@ public:
assert(maxUint/UintToArith256(consensus.powLimit) >= consensus.nPowAveragingWindow);
consensus.nPowMaxAdjustDown = 0; // Turn off adjustment down
consensus.nPowMaxAdjustUp = 0; // Turn off adjustment up
consensus.nPowTargetSpacing = 60; // HSC's default to 60 seconds so a theoretical testnet should as well
consensus.nPowTargetSpacing = 60; // HAC's default to 60 seconds so a theoretical testnet should as well
consensus.nPowAllowMinDifficultyBlocksAfterHeight = 0;
ups[Consensus::BASE_SPROUT].nProtocolVersion = 170002;
ups[Consensus::BASE_SPROUT].nActivationHeight = NUNU::ALWAYS_ACTIVE;

View File

@@ -63,7 +63,7 @@ const uint32_t nHushHardforkHeight4 = 1605555;
const uint32_t nHushHardforkTimestamp = 1580303652; // Jan 29nd 1pm GMT
const uint32_t nHushHardforkTimestamp2 = 1594425600; // Jul 11th 12a GMT
// Used by HSCs
// Used by HACs
static const uint32_t HUSH_SEASON_TIMESTAMPS[NUM_HUSH_SEASONS] = {1525132800, 1563148800, nHushHardforkTimestamp, nHushHardforkTimestamp2, nHushHardforkTimestamp2*5, nHushHardforkTimestamp2*6, nHushHardforkTimestamp2*7};
// Used by HUSH3+TUSH

View File

@@ -102,7 +102,7 @@ int32_t hush_notaries(uint8_t pubkeys[64][33],int32_t height,uint32_t timestamp)
int32_t i,htind,n; uint64_t mask = 0; struct knotary_entry *kp,*tmp;
static uint8_t hush_pubkeys[NUM_HUSH_SEASONS][64][33],didinit[NUM_HUSH_SEASONS];
//HUSH3+TUSH use block heights, HSCs use timestamps
//HUSH3+TUSH use block heights, HACs use timestamps
if ( timestamp == 0 && SMART_CHAIN_SYMBOL[0] != 0 ) {
timestamp = hush_heightstamp(height);
} else if ( SMART_CHAIN_SYMBOL[0] == 0 ) {
@@ -113,7 +113,7 @@ int32_t hush_notaries(uint8_t pubkeys[64][33],int32_t height,uint32_t timestamp)
int32_t hush_season = 0;
bool ishush3 = strncmp(SMART_CHAIN_SYMBOL, "HUSH3",5) == 0 ? true : false;
bool istush = strncmp(SMART_CHAIN_SYMBOL, "TUSH",4) == 0 ? true : false;
// TUSH uses height activation like HUSH3, other HSCs use timestamps
// TUSH uses height activation like HUSH3, other HACs use timestamps
hush_season = (ishush3 || istush) ? gethushseason(height) : getacseason(timestamp);
if(IS_HUSH_NOTARY) {

View File

@@ -1086,9 +1086,9 @@ void static RandomXMiner()
// With the defaults of 1024 and 64
// the key block will change every ~21.3 hours with a 75s block time
// and every ~17 hours with the default 60s block time for HSCs
// and every ~17 hours with the default 60s block time for HACs
static int randomxInterval = GetRandomXInterval();
// This lag is 80 mins for 75s blocktime and 64 mins for 60s (default) blocktime for HSCs
// This lag is 80 mins for 75s blocktime and 64 mins for 60s (default) blocktime for HACs
static int randomxBlockLag = GetRandomXBlockLag();
randomx_vm *myVM = nullptr;

View File

@@ -511,7 +511,7 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead
// Changing this requires changing many other things and
// might change consensus. Have fun -- Duke
// NOTE: Ony HUSH3 mainnet should use this function, all HSC's should use params.AveragigWindowTimespan()
// NOTE: Ony HUSH3 mainnet should use this function, all HAC's should use params.AveragigWindowTimespan()
int64_t AveragingWindowTimespan() {
// used in const methods, beware!
// This is the correct AWT for 75s blocktime, before block 340k

View File

@@ -862,7 +862,7 @@ UniValue getblockmerkletree(const UniValue& params, bool fHelp, const CPubKey& m
if (fHelp || params.size() != 1 )
throw runtime_error(
"getblockmerkletree height\n"
"\nGet full merkletree for a given Hush or HSC block height.\n"
"\nGet full merkletree for a given Hush or HAC block height.\n"
"\nArguments:\n"
"1. height (int, required) block height\n"
"\nResult:\n"
@@ -877,7 +877,7 @@ UniValue getblockmerkletree(const UniValue& params, bool fHelp, const CPubKey& m
int nHeight = params[0].get_int();
if ( (nHeight < 1) || (nHeight > chainActive.LastTip()->GetHeight()) ) {
throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid Hush or HSC block height parameter");
throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid Hush or HAC block height parameter");
}
phushblockindex = chainActive[nHeight];

View File

@@ -489,7 +489,7 @@ UniValue validateaddress(const UniValue& params, bool fHelp, const CPubKey& mypk
"\nResult:\n"
"{\n"
" \"isvalid\" : true|false, (boolean) If the address is valid or not. If not, this is the only property returned.\n"
" \"address\" : \"addr\", (string) The Hush or HSC address validated\n"
" \"address\" : \"addr\", (string) The Hush or HAC address validated\n"
" \"scriptPubKey\" : \"hex\", (string) The hex encoded scriptPubKey generated by the address\n"
" \"ismine\" : true|false, (boolean) If the address is yours or not\n"
" \"isscript\" : true|false, (boolean) If the key is a script\n"

View File

@@ -507,7 +507,7 @@ void CWallet::ChainTip(const CBlockIndex *pindex,
}
void CWallet::RunSaplingSweep(int blockHeight) {
// Sapling is always active since height=1 of HUSH+HSCs
// Sapling is always active since height=1 of HUSH+HACs
// if (!NetworkUpgradeActive(blockHeight, Params().GetConsensus(), Consensus::UPGRADE_SAPLING)) {
// return;
// }
@@ -551,7 +551,7 @@ void CWallet::RunSaplingSweep(int blockHeight) {
}
void CWallet::RunSaplingConsolidation(int blockHeight) {
// Sapling is always active on HUSH+HSCs
// Sapling is always active on HUSH+HACs
//if (!NetworkUpgradeActive(blockHeight, Params().GetConsensus(), Consensus::UPGRADE_SAPLING)) {
// return;
//}