Merge branch 'dev' into lockzins
This commit is contained in:
@@ -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() )
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -18,7 +18,10 @@ static const uint8_t chainparams_seed_main[] = {
|
||||
0x01,0x04,0x95,0x1c,0x66,0xdb,0x00,0x00, // 149.28.102.219
|
||||
0x01,0x04,0x9b,0x8a,0xe4,0x44,0x00,0x00, // 155.138.228.68
|
||||
0x01,0x04,0x6b,0xae,0x46,0xfb,0x00,0x00, // 107.174.70.251
|
||||
0x01,0x04,0xb2,0xfa,0xbd,0x8d,0x00,0x00, // 178.250.189.141
|
||||
0x04,0x20,0x0e,0x86,0xb6,0xfd,0x96,0xfe,0x06,0xda,0x39,0xeb,0x97,0x39,0xc9,0xd1,0x17,0xa2,0x4e,0x2b,0x75,0x4d,0xeb,0xb5,0xa1,0x34,0x1e,0x34,0x0a,0xcb,0x68,0xab,0xf0,0xe2,0x00,0x00, // b2dln7mw7ydnuopls444tuixujhcw5kn5o22cna6gqfmw2fl6drb5nad.onion
|
||||
0x04,0x20,0x1c,0x96,0x10,0x03,0xa6,0xa4,0xfa,0xa0,0x3e,0x13,0x1f,0x38,0xf0,0x9b,0xdd,0x9b,0xd7,0xdc,0x0e,0x40,0x61,0x71,0xed,0x1d,0x21,0x58,0xce,0x59,0x55,0x5e,0xe4,0x25,0x00,0x00, // dslbaa5gut5kapqtd44pbg65tpl5ydsamfy62hjbldhfsvk64qs57pyd.onion
|
||||
0x04,0x20,0xac,0xa0,0x3a,0x31,0xa7,0xea,0x8e,0x90,0xc7,0x2b,0xbb,0x89,0x41,0x05,0x48,0xa0,0x10,0x29,0x8f,0x38,0x16,0xc9,0x94,0xbe,0xef,0x7e,0x9e,0x7d,0x98,0xb6,0x76,0x9f,0x00,0x00, // vsqdumnh5khjbrzlxoeucbkiuaictdzyc3ezjpxpp2ph3gfwo2ptjmyd.onion
|
||||
0x02,0x10,0x2a,0x0c,0xb6,0x41,0x06,0xf1,0x01,0x8e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00, // 2a0c:b641:6f1:18e::2
|
||||
0x02,0x10,0x24,0x06,0xef,0x80,0x00,0x03,0x12,0x69,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00, // 2406:ef80:3:1269::1
|
||||
0x02,0x10,0x24,0x06,0xef,0x80,0x00,0x02,0x3b,0x59,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00, // 2406:ef80:2:3b59::1
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -1805,12 +1805,23 @@ void hush_args(char *argv0)
|
||||
if (ishush3) {
|
||||
HUSH_nodes = {"node1.hush.is","node2.hush.is","node3.hush.is",
|
||||
"node4.hush.is","node5.hush.is","node6.hush.is",
|
||||
"node7.hush.is","node8.hush.is"};
|
||||
"node7.hush.is","node8.hush.is",
|
||||
"178.250.189.141",
|
||||
"31.202.19.157",
|
||||
"45.132.75.69",
|
||||
"45.63.58.167",
|
||||
"b2dln7mw7ydnuopls444tuixujhcw5kn5o22cna6gqfmw2fl6drb5nad.onion",
|
||||
"dslbaa5gut5kapqtd44pbg65tpl5ydsamfy62hjbldhfsvk64qs57pyd.onion",
|
||||
"vsqdumnh5khjbrzlxoeucbkiuaictdzyc3ezjpxpp2ph3gfwo2ptjmyd.onion",
|
||||
"plrobkepqjxs2cmig273mxnqh3qhuhdaioyb2n5kafn264ramb7tqxid.onion"
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
if (isdragonx) {
|
||||
DRAGONX_nodes = {"node1.dragonx.is","node2.dragonx.is","node3.dragonx.is",
|
||||
"node4.dragonx.is","node5.dragonx.is","node6.dragonx.is"};
|
||||
"node4.dragonx.is","node5.dragonx.is","node6.dragonx.is"
|
||||
};
|
||||
}
|
||||
|
||||
vector<string> more_nodes = mapMultiArgs["-addnode"];
|
||||
|
||||
@@ -1649,6 +1649,14 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
|
||||
|
||||
// Disable clearnet peers if -clearnet=0
|
||||
if (!GetBoolArg("-clearnet", DEFAULT_CLEARNET)) {
|
||||
#ifdef ENABLE_MINING
|
||||
// mining to the same taddr links different txs together as from the same owner
|
||||
// and if using -clearnet=0 that can be used to link together different .onions
|
||||
// as being the same entity, because they are mining to the same taddr
|
||||
if (mapArgs.count("-mineraddress")) {
|
||||
return InitError(_("-mineraddress and -clearnet=0 cannot be used together because it would reduce your privacy!"));
|
||||
}
|
||||
#endif
|
||||
SoftSetBoolArg("-disableipv4", true);
|
||||
SoftSetBoolArg("-disableipv6", true);
|
||||
SoftSetBoolArg("-dns", false);
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -639,12 +639,6 @@ UniValue getblockhash(const UniValue& params, bool fHelp, const CPubKey& mypk)
|
||||
return pblockindex->GetBlockHash().GetHex();
|
||||
}
|
||||
|
||||
UniValue getlastsegidstakes(const UniValue& params, bool fHelp, const CPubKey& mypk)
|
||||
{
|
||||
UniValue ret(UniValue::VOBJ);
|
||||
return ret;
|
||||
}
|
||||
|
||||
UniValue getblockheader(const UniValue& params, bool fHelp, const CPubKey& mypk)
|
||||
{
|
||||
if (fHelp || params.size() < 1 || params.size() > 2)
|
||||
@@ -862,7 +856,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 +871,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];
|
||||
|
||||
@@ -90,10 +90,8 @@ static const CRPCConvertParam vRPCConvertParams[] =
|
||||
{ "getblock", 1 },
|
||||
{ "getblockheader", 1 },
|
||||
{ "getchaintxstats", 0 },
|
||||
{ "getlastsegidstakes", 0 },
|
||||
{ "gettransaction", 1 },
|
||||
{ "getrawtransaction", 1 },
|
||||
{ "getlastsegidstakes", 0 },
|
||||
{ "createrawtransaction", 0 },
|
||||
{ "createrawtransaction", 1 },
|
||||
{ "createrawtransaction", 2 },
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -320,7 +320,6 @@ static const CRPCCommand vRPCCommands[] =
|
||||
{ "blockchain", "getblockhashes", &getblockhashes, true },
|
||||
{ "blockchain", "getblockhash", &getblockhash, true },
|
||||
{ "blockchain", "getblockheader", &getblockheader, true },
|
||||
{ "blockchain", "getlastsegidstakes", &getlastsegidstakes, true },
|
||||
{ "blockchain", "getchaintips", &getchaintips, true },
|
||||
{ "blockchain", "getdifficulty", &getdifficulty, true },
|
||||
{ "blockchain", "getmempoolinfo", &getmempoolinfo, true },
|
||||
@@ -431,7 +430,6 @@ static const CRPCCommand vRPCCommands[] =
|
||||
{ "wallet", "getbalance", &getbalance, false },
|
||||
{ "wallet", "getbalance64", &getbalance64, false },
|
||||
{ "wallet", "getnewaddress", &getnewaddress, true },
|
||||
// { "wallet", "getnewaddress64", &getnewaddress64, true },
|
||||
{ "wallet", "getrawchangeaddress", &getrawchangeaddress, true },
|
||||
{ "wallet", "getreceivedbyaccount", &getreceivedbyaccount, false },
|
||||
{ "wallet", "getreceivedbyaddress", &getreceivedbyaddress, false },
|
||||
|
||||
@@ -245,7 +245,6 @@ extern UniValue cclibinfo(const UniValue& params, bool fHelp, const CPubKey& myp
|
||||
extern UniValue cclib(const UniValue& params, bool fHelp, const CPubKey& mypk);
|
||||
|
||||
extern UniValue getnewaddress(const UniValue& params, bool fHelp, const CPubKey& mypk); // in rpcwallet.cpp
|
||||
//extern UniValue getnewaddress64(const UniValue& params, bool fHelp, const CPubKey& mypk); // in rpcwallet.cpp
|
||||
extern UniValue getaccountaddress(const UniValue& params, bool fHelp, const CPubKey& mypk);
|
||||
extern UniValue getrawchangeaddress(const UniValue& params, bool fHelp, const CPubKey& mypk);
|
||||
extern UniValue setaccount(const UniValue& params, bool fHelp, const CPubKey& mypk);
|
||||
@@ -286,7 +285,6 @@ extern UniValue getdragonjson(const UniValue& params, bool fHelp, const CPubKey&
|
||||
extern UniValue getnotarysendmany(const UniValue& params, bool fHelp, const CPubKey& mypk);
|
||||
extern UniValue geterablockheights(const UniValue& params, bool fHelp, const CPubKey& mypk);
|
||||
extern UniValue setpubkey(const UniValue& params, bool fHelp, const CPubKey& mypk);
|
||||
extern UniValue setstakingsplit(const UniValue& params, bool fHelp, const CPubKey& mypk);
|
||||
extern UniValue getwalletinfo(const UniValue& params, bool fHelp, const CPubKey& mypk);
|
||||
extern UniValue getblockchaininfo(const UniValue& params, bool fHelp, const CPubKey& mypk);
|
||||
extern UniValue getnetworkinfo(const UniValue& params, bool fHelp, const CPubKey& mypk);
|
||||
@@ -316,7 +314,6 @@ extern UniValue getblockhashes(const UniValue& params, bool fHelp, const CPubKey
|
||||
extern UniValue getblockdeltas(const UniValue& params, bool fHelp, const CPubKey& mypk);
|
||||
extern UniValue getblockhash(const UniValue& params, bool fHelp, const CPubKey& mypk);
|
||||
extern UniValue getblockheader(const UniValue& params, bool fHelp, const CPubKey& mypk);
|
||||
extern UniValue getlastsegidstakes(const UniValue& params, bool fHelp, const CPubKey& mypk);
|
||||
extern UniValue getblock(const UniValue& params, bool fHelp, const CPubKey& mypk);
|
||||
extern UniValue gettxoutsetinfo(const UniValue& params, bool fHelp, const CPubKey& mypk);
|
||||
extern UniValue gettxout(const UniValue& params, bool fHelp, const CPubKey& mypk);
|
||||
|
||||
@@ -5441,6 +5441,8 @@ UniValue z_shieldcoinbase(const UniValue& params, bool fHelp, const CPubKey& myp
|
||||
"\nExamples:\n"
|
||||
+ HelpExampleCli("z_shieldcoinbase", "\"RD6GgnrMpPaTSMn8vai6yiGA7mN4QGPV\" \"zs14d8tc0hl9q0vg5l28uec5vk6sk34fkj2n8s7jalvw5fxpy6v39yn4s2ga082lymrkjk0x2nqg37\"")
|
||||
+ HelpExampleRpc("z_shieldcoinbase", "\"RD6GgnrMpPaTSMn8vai6yiGA7mN4QGPV\", \"zs14d8tc0hl9q0vg5l28uec5vk6sk34fkj2n8s7jalvw5fxpy6v39yn4s2ga082lymrkjk0x2nqg37\"")
|
||||
+ HelpExampleCli("z_shieldcoinbase", "'*'\", \"zs14d8tc0hl9q0vg5l28uec5vk6sk34fkj2n8s7jalvw5fxpy6v39yn4s2ga082lymrkjk0x2nqg37\"")
|
||||
+ HelpExampleRpc("z_shieldcoinbase", "'*'\", \"zs14d8tc0hl9q0vg5l28uec5vk6sk34fkj2n8s7jalvw5fxpy6v39yn4s2ga082lymrkjk0x2nqg37\"")
|
||||
);
|
||||
|
||||
LOCK2(cs_main, pwalletMain->cs_wallet);
|
||||
|
||||
@@ -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;
|
||||
//}
|
||||
|
||||
Reference in New Issue
Block a user