From b2d6cfe7bf70bad0fef827b4a43813a61059d188 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 15 Dec 2018 02:32:42 -1100 Subject: [PATCH 1/9] -print --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 13268fe1b..2f710af5d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1446,7 +1446,7 @@ bool CheckTransactionWithoutProofVerification(uint32_t tiptime,const CTransactio if ( ASSETCHAINS_PRIVATE != 0 && invalid_private_taddr != 0 ) { static uint32_t counter; - //if ( counter++ < 10 ) + if ( counter++ < 10 ) fprintf(stderr,"found taddr in private chain: z_z.%d z_t.%d t_z.%d vinsize.%d\n",z_z,z_t,t_z,(int32_t)tx.vin.size()); if ( z_t == 0 || z_z != 0 || t_z != 0 || tx.vin.size() != 0 ) return state.DoS(100, error("CheckTransaction(): this is a private chain, only sprout -> taddr allowed until deadline"),REJECT_INVALID, "bad-txns-acprivacy-chain"); From dd0fc6a3bce87e9e260a6ff3d447c6e9c64c20d3 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 15 Dec 2018 02:52:35 -1100 Subject: [PATCH 2/9] Dont reject peer with tx overwinter mismatch --- src/main.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 2f710af5d..e606a2667 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1020,10 +1020,8 @@ bool ContextualCheckTransaction( // If Sprout rules apply, reject transactions which are intended for Overwinter and beyond if (isSprout && tx.fOverwintered) { - return state.DoS(isInitBlockDownload() ? 0 : dosLevel, - error("ContextualCheckTransaction(): ht.%d activates.%d dosLevel.%d overwinter is not active yet", - nHeight, Params().GetConsensus().vUpgrades[Consensus::UPGRADE_OVERWINTER].nActivationHeight, dosLevel), - REJECT_INVALID, "tx-overwinter-not-active"); + return state.DoS(nHeight < Params().GetConsensus().vUpgrades[Consensus::UPGRADE_OVERWINTER].nActivationHeight ? 0 : dosLevel,error("ContextualCheckTransaction(): ht.%d activates.%d dosLevel.%d overwinter is not active yet",nHeight, Params().GetConsensus().vUpgrades[Consensus::UPGRADE_OVERWINTER].nActivationHeight, dosLevel),REJECT_INVALID, "tx-overwinter-not-active"); + //return state.DoS(isInitBlockDownload() ? 0 : dosLevel,error("ContextualCheckTransaction(): ht.%d activates.%d dosLevel.%d overwinter is not active yet",nHeight, Params().GetConsensus().vUpgrades[Consensus::UPGRADE_OVERWINTER].nActivationHeight, dosLevel),REJECT_INVALID, "tx-overwinter-not-active"); } if (saplingActive) { From faec23f3687eff8a531a93ecbb1490f37f816b82 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 15 Dec 2018 02:59:45 -1100 Subject: [PATCH 3/9] New PIRATE seed node --- src/assetchains.old | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/assetchains.old b/src/assetchains.old index c1419e7f5..6df854903 100755 --- a/src/assetchains.old +++ b/src/assetchains.old @@ -39,7 +39,7 @@ echo $pubkey ~/VerusCoin/src/komodod -pubkey=$pubkey -ac_name=VRSC -ac_algo=verushash -ac_cc=1 -ac_veruspos=50 -ac_supply=0 -ac_eras=3 -ac_reward=0,38400000000,2400000000 -ac_halving=1,43200,1051920 -ac_decay=100000000,0,0 -ac_end=10080,226080,0 -ac_timelockgte=19200000000 -ac_timeunlockfrom=129600 -ac_timeunlockto=1180800 -addnode=185.25.48.236 -addnode=185.64.105.111 & ./komodod -pubkey=$pubkey -ac_name=SEC -ac_cc=333 -ac_supply=1000000000 -addnode=185.148.145.43 & ./komodod -pubkey=$pubkey -ac_name=CCL -ac_supply=200000000 -ac_end=1 -ac_cc=2 -addressindex=1 -spentindex=1 -addnode=142.93.136.89 -addnode=195.201.22.89 & -./komodod -pubkey=$pubkey -ac_name=PIRATE -ac_supply=0 -ac_reward=25600000000 -ac_halving=77777 -ac_private=1 -addnode=136.243.102.225 & +./komodod -pubkey=$pubkey -ac_name=PIRATE -ac_supply=0 -ac_reward=25600000000 -ac_halving=77777 -ac_private=1 -addnode=178.63.77.56 & ./komodod -pubkey=$pubkey -ac_name=MGNX -ac_supply=12465003 -ac_staked=90 -ac_reward=2000000000 -ac_halving=525960 -ac_cc=2 -ac_end=2629800 -addnode=142.93.27.180 & ./komodod -pubkey=$pubkey -ac_name=PGT -ac_supply=10000000 -ac_end=1 -addnode=190.114.254.104 & ./komodod -pubkey=$pubkey -ac_name=KMDICE -ac_supply=10500000 -ac_reward=2500000000 -ac_halving=210000 -ac_cc=2 -addressindex=1 -spentindex=1 -addnode=144.76.217.232 & From ea5cd9f31b948f8ee2b58b451e97bb75bf30031b Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 15 Dec 2018 03:02:56 -1100 Subject: [PATCH 4/9] Autoscale down size of std amount --- src/cc/dapps/zmigrate.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/cc/dapps/zmigrate.c b/src/cc/dapps/zmigrate.c index 48542d2cc..4d7e89ad6 100644 --- a/src/cc/dapps/zmigrate.c +++ b/src/cc/dapps/zmigrate.c @@ -932,6 +932,12 @@ again: if ( (amount= find_sprout_amount(coinstr,zcaddr)) > txfee ) { // generate taddr, send max of 10000.0001 + static int64_t lastamount,lastamount2; + stdamount = 500 * SATOSHIDEN; + if ( amount == lastamount && amount == lastamount2 ) + stdamount /= 10; + lastamount2 = lastamount; + lastamount = amount; if ( amount > stdamount+txfee ) amount = stdamount + txfee; if ( getnewaddress(coinaddr,coinstr,"") == 0 ) From dabdd01bec1a89bbbdff8288fec3565da6013758 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 15 Dec 2018 03:03:33 -1100 Subject: [PATCH 5/9] +comment --- src/cc/dapps/zmigrate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cc/dapps/zmigrate.c b/src/cc/dapps/zmigrate.c index 4d7e89ad6..620130306 100644 --- a/src/cc/dapps/zmigrate.c +++ b/src/cc/dapps/zmigrate.c @@ -908,7 +908,7 @@ int32_t main(int32_t argc,char **argv) zsaddr = clonestr(argv[2]); printf("%s: %s %s\n",REFCOIN_CLI,coinstr,zsaddr); uint32_t lastopid; char coinaddr[64],zcaddr[128],opidstr[128]; int32_t finished; int64_t amount,stdamount,txfee; - stdamount = 500 * SATOSHIDEN; + //stdamount = 500 * SATOSHIDEN; txfee = 10000; again: printf("start processing zmigrate\n"); From 151645ce9e89c9a6ff2d11d69b536816cad971a5 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 15 Dec 2018 03:16:43 -1100 Subject: [PATCH 6/9] 10/50/500 zmigrate sizes auto set --- src/cc/dapps/zmigrate.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/cc/dapps/zmigrate.c b/src/cc/dapps/zmigrate.c index 620130306..73bff3276 100644 --- a/src/cc/dapps/zmigrate.c +++ b/src/cc/dapps/zmigrate.c @@ -932,10 +932,16 @@ again: if ( (amount= find_sprout_amount(coinstr,zcaddr)) > txfee ) { // generate taddr, send max of 10000.0001 - static int64_t lastamount,lastamount2; + static int64_t lastamount,lastamount2,lastamount3,lastamount4; stdamount = 500 * SATOSHIDEN; if ( amount == lastamount && amount == lastamount2 ) + { stdamount /= 10; + if ( amount == lastamount3 && amount == lastamount4 ) + stdamount /= 5; + } + lastamount4 = lastamount3; + lastamount3 = lastamount2; lastamount2 = lastamount; lastamount = amount; if ( amount > stdamount+txfee ) From 2546ae048d93834f0887822d321df1f9c595c392 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 15 Dec 2018 03:25:41 -1100 Subject: [PATCH 7/9] Use height check for overwinter invalid --- src/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index e606a2667..84abe0880 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1020,7 +1020,8 @@ bool ContextualCheckTransaction( // If Sprout rules apply, reject transactions which are intended for Overwinter and beyond if (isSprout && tx.fOverwintered) { - return state.DoS(nHeight < Params().GetConsensus().vUpgrades[Consensus::UPGRADE_OVERWINTER].nActivationHeight ? 0 : dosLevel,error("ContextualCheckTransaction(): ht.%d activates.%d dosLevel.%d overwinter is not active yet",nHeight, Params().GetConsensus().vUpgrades[Consensus::UPGRADE_OVERWINTER].nActivationHeight, dosLevel),REJECT_INVALID, "tx-overwinter-not-active"); + int32_t ht = Params().GetConsensus().vUpgrades[Consensus::UPGRADE_OVERWINTER].nActivationHeight; + return state.DoS((ht < 0 || nHeight < ht) ? 0 : dosLevel,error("ContextualCheckTransaction(): ht.%d activates.%d dosLevel.%d overwinter is not active yet",nHeight, Params().GetConsensus().vUpgrades[Consensus::UPGRADE_OVERWINTER].nActivationHeight, dosLevel),REJECT_INVALID, "tx-overwinter-not-active"); //return state.DoS(isInitBlockDownload() ? 0 : dosLevel,error("ContextualCheckTransaction(): ht.%d activates.%d dosLevel.%d overwinter is not active yet",nHeight, Params().GetConsensus().vUpgrades[Consensus::UPGRADE_OVERWINTER].nActivationHeight, dosLevel),REJECT_INVALID, "tx-overwinter-not-active"); } From 9dceacbde87394c92b2bb5b7ee3eda941dae5bef Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 15 Dec 2018 04:57:12 -1100 Subject: [PATCH 8/9] Allow sprout when overwinter --- src/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 84abe0880..c3fc62233 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1079,7 +1079,9 @@ bool ContextualCheckTransaction( if (overwinterActive) { // Reject transactions intended for Sprout if (!tx.fOverwintered) { - return state.DoS(dosLevel, error("ContextualCheckTransaction: overwinter is active"), + int32_t ht = Params().GetConsensus().vUpgrades[Consensus::UPGRADE_OVERWINTER].nActivationHeight; + return state.DoS( + return state.DoS((ht < 0 || nHeight < ht) ? 0 : dosLevel, error("ContextualCheckTransaction: overwinter is active"), REJECT_INVALID, "tx-overwinter-active"); } From 2532131a6aab6d4812c2aac14b0947c8147e376d Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 15 Dec 2018 04:58:36 -1100 Subject: [PATCH 9/9] Syntax --- src/main.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index c3fc62233..e4a9d04c3 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1080,9 +1080,7 @@ bool ContextualCheckTransaction( // Reject transactions intended for Sprout if (!tx.fOverwintered) { int32_t ht = Params().GetConsensus().vUpgrades[Consensus::UPGRADE_OVERWINTER].nActivationHeight; - return state.DoS( - return state.DoS((ht < 0 || nHeight < ht) ? 0 : dosLevel, error("ContextualCheckTransaction: overwinter is active"), - REJECT_INVALID, "tx-overwinter-active"); + return state.DoS((ht < 0 || nHeight < ht) ? 0 : dosLevel, error("ContextualCheckTransaction: overwinter is active"),REJECT_INVALID, "tx-overwinter-active"); } // Check that all transactions are unexpired