Pages:
Author

Topic: 'CACHE'Project [VALM-Cache difficulty recalculation algorithm, SpamHash Control] - page 6. (Read 8135 times)

sr. member
Activity: 939
Merit: 261
Data HDD Repair - Recovery of lost information
 
 Upcoming changes ...

Often there are situations in which a chain of blocks with a later timestamp but with greater trust replaces the earlier found blocks.
I do not like such situations, and I consider this vulnerability. In the updated code, a chain of blocks with a larger time stamp loses its trust.
Code ...
Code:
CBlockIndex* pblockindex = NULL;
    int nPossibleHeight = pindexNew->pprev->nHeight + 1;
    if (fDebug)
        printf(" 'AddToBlockIndex()' - The new block pretends to a height %d, block chain height %d\n", nPossibleHeight,
               pindexBest->nHeight);

    if (nPossibleHeight < pindexBest->nHeight && fHardForkOne)
    {
        if (nPossibleHeight <= pindexBest->nHeight - nTriggerDepth)
        {
            if (fDebug)
                printf(" 'AddToBlockIndex()' - The new block pretends to a height %d, maximum allowed block height for a competing chain %d\n", nPossibleHeight,
                pindexBest->nHeight - nTriggerDepth);
            pindexNew->bnChainTrust = 0;

        }

        pblockindex = FindBlockByHeight(nPossibleHeight);
        if (pindexNew->GetBlockTime() > pblockindex->GetBlockTime())
        {
            if (fDebug)
                printf(" 'AddToBlockIndex()' - Generation time of a new block date=%s later than available in the database date=%s\n",
                DateTimeStrFormat("%x %H:%M:%S", pindexNew->GetBlockTime()).c_str(), DateTimeStrFormat("%x %H:%M:%S",
                pblockindex->GetBlockTime()).c_str());
            pindexNew->bnChainTrust = 0;
        }
        else if (pindexNew->GetBlockTime() < pblockindex->GetBlockTime())
        {
                 if (nPossibleHeight < pindexBest->nHeight && nPossibleHeight > pindexBest->nHeight - nTriggerDepth)
                 {
                     if (fDebug)
                         printf(" 'AddToBlockIndex()' - The generation time of a new block date=%s earlier than the one in the database date=%s\n",
                         DateTimeStrFormat("%x %H:%M:%S", pindexNew->GetBlockTime()).c_str(), DateTimeStrFormat("%x %H:%M:%S",
                         pblockindex->GetBlockTime()).c_str());
                     bnBestChainTrust = pblockindex->pprev->bnChainTrust;
                 }
        }
    }

sr. member
Activity: 939
Merit: 261
Data HDD Repair - Recovery of lost information
 Upcoming changes ...

2) If the "ChainTrust" matches, the network will not wait for the child block from the competitor’s node. Code..

Code:
// New best
    if (pindexNew->bnChainTrust > bnBestChainTrust)
    {
        if (!SetBestChain(state, txdb, pindexNew))
            return false;
    }
    else if (pindexNew->bnChainTrust == bnBestChainTrust && fHardForkOne && pindexPrevPos->GetBlockHash() >=
        pindexPrevPrevPos->GetBlockHash())
    {
        printf(" 'CBlock' - BestChainTrust %s\n", bnBestChainTrust.ToString().c_str());
        printf(" 'CBlock' - NewChainTrust %s\n", pindexNew->bnChainTrust.ToString().c_str());
        if (((pindexNew->IsProofOfStake() && pindexBest->IsProofOfStake()) ? (pindexNew->GetBlockHash() >
            pindexBest->GetBlockHash()) : (hash > pindexBest->GetBlockHash())) ||
            (pindexBest->IsProofOfWork() && pindexNew->IsProofOfStake()))
        {
            printf(" 'CBlock' bnChainTrust = bnBestChainTrust - Block accepted\n");
            if (!SetBestChain(state, txdb, pindexNew))
            {
                return false;
            }
        }
        else
        {
             printf(" 'CBlock' bnChainTrust = bnBestChainTrust - Block not accepted\n");
             return false;
        }
    }
    else if (pindexNew->bnChainTrust == bnBestChainTrust && fHardForkOne && pindexPrevPos->GetBlockHash() <
             pindexPrevPrevPos->GetBlockHash())
    {
        printf(" 'CBlock_' - BestChainTrust %s\n", bnBestChainTrust.ToString().c_str());
        printf(" 'CBlock_' - NewChainTrust %s\n", pindexNew->bnChainTrust.ToString().c_str());
        if (((pindexNew->IsProofOfStake() && pindexBest->IsProofOfStake()) ? (pindexNew->GetBlockHash() <
            pindexBest->GetBlockHash()) : (hash < pindexBest->GetBlockHash())) ||
            (pindexBest->IsProofOfWork() && pindexNew->IsProofOfStake()))
        {
            printf(" 'CBlock' bnChainTrust = bnBestChainTrust - Block accepted\n");
            if (!SetBestChain(state, txdb, pindexNew))
            {
                return false;
            }
        }
        else
        {
             printf(" 'CBlock' bnChainTrust = bnBestChainTrust - Block not accepted\n");
             return false;
        }
    }
    txdb.Close();


sr. member
Activity: 939
Merit: 261
Data HDD Repair - Recovery of lost information

  Upcoming changes ...

1) Adaptation of difficulty for NF19 - 20 / min = 0.00024 -> 0.00000096 /

sr. member
Activity: 939
Merit: 261
Data HDD Repair - Recovery of lost information
  
  To enable the function "setcontrolrealtime", you must specify the parameter "setcontrolrealtime=1".
This function changes the limit on the number of transmitted blocks. In the case when the sent "inv"
has one size, and the received "getdata" the other limit is set to 10. Additionally, when transferring
blocks with a height of more than 150000, the limit is set to 30.
  Starting from the previous version, in the event of a socket error, the transfer of a chain of blocks is
interrupted on the block with an error.

sr. member
Activity: 939
Merit: 261
Data HDD Repair - Recovery of lost information

New version available

CACHE-Project, Changing the parameters of the "setcontrolrealtime" function. Implemented stop the transfer of a chain of blocks in case of a socket error

Version : v_6.1.1.30
Version of git : v_0.7.5.149
Subversion : v_0.7.6.42


sr. member
Activity: 939
Merit: 261
Data HDD Repair - Recovery of lost information

  Fixed balance calculation errors. Added new features for analyzing addresses and wallet accounts.
New features -

"fixerrorgetbalancefunction"
"getaddressbalance"
"getbalancealladdresses"
"getbasebalancealladdresses"
"getreceivedbyalladdresses"
"getsenttobyalladdresses"
"getstakebalancealladdresses"

sr. member
Activity: 939
Merit: 261
Data HDD Repair - Recovery of lost information
New version available

CACHE-Project, Adding new features and correcting errors in the balance calculation

Version : v_6.1.1.29
Version of git : v_0.7.5.147
Subversion : v_0.7.6.41


sr. member
Activity: 939
Merit: 261
Data HDD Repair - Recovery of lost information

  Work function "setreconnectpresenttime" - log.

Code:
trying connection 188.163.45.132:2225 lastseen=331,3hrs
     For a long time without new blocks - queue: 0 loops from: max
disconnecting node 185.220.101.26:35056
     Start block sync

sr. member
Activity: 939
Merit: 261
Data HDD Repair - Recovery of lost information
 
  Job the filter - log ..

Code:
accepted connection 167.86.103.109:53424
disconnecting node 167.86.103.109:53424
accepted connection 167.86.103.109:53443
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 1
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 1
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 2
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 3
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 4
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 5
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 6
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 7
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 8
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 9
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 10
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 11
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 12
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 13
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 14
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 15
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 16
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 17
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 18
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 19
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 20
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 21
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 22
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 23
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 24
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 25
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 26
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 27
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 28
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 29
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 30
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 31
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 32
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 33
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 34
disconnecting node 167.86.103.109:53443
accepted connection 167.86.103.109:53654
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 35
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 36
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 37
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 38
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 39
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 40
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 41
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 42
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 43
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 44
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 45
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 46
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 47
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 48
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 49
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 50
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 51
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 52
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 53
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 54
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 55
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 56
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 57
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 58
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 59
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 60
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 61
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 62
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 63
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 64
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 65
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 66
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 67
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 68
socket closed
disconnecting node 167.86.103.109:53654
accepted connection 167.86.103.109:53810
disconnecting node 167.86.103.109:53810
accepted connection 167.86.103.109:53814
disconnecting node 167.86.103.109:53814
accepted connection 167.86.103.109:53816
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 69
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 70
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 71
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 72
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 73
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 74
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 75
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 76
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 77
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 78
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 79
  ProcessMessages - !msg.complete(): 167.86.103.109 - error count: 80
  ProcessMessages - spam ip actual: 167.86.103.109
disconnecting node 167.86.103.109:53816
connection from 167.86.103.109:53882 dropped (IsGlobalIpBanned)

sr. member
Activity: 939
Merit: 261
Data HDD Repair - Recovery of lost information
 
 These additions are implemented to eliminate the possibility of repeated use of the same coins. This is exactly what happened on the Cryptopia Exchange. For double spending, coins with a small number of connections and a small network hash rate or POS coins were chosen. Moreover, an attack of 51% is not obligatory, it is enough to tear off the exchange's wallet from its main network. Coins with which this focus was repeated many times and were delist from the Cryptopia.

sr. member
Activity: 939
Merit: 261
Data HDD Repair - Recovery of lost information

 New settings and what they are for.

 Options - ("setreload" "setreconnecting") - used when synchronizing blocks.

1) default
Synchronization mode with disconnection from peers sending incorrect data.

setreload=0
setreconnecting=1

2)
Use in cases where some members of the network are not interested in the presence of a large number of synchronized nodes and if they interfere with the completion of synchronization.
Synchronization mode with ignoring all transactions with the current(real) time stamp and disconnection from peers who send incorrect data.

setreload=1
setreconnecting=0


 The "setreconnectpresenttime" option is used after synchronization is complete. Reconnects the wallet to another peer in the absence of a new block within the specified time.
The option "timeupreconnectpresenttime" sets the time in seconds.

Used in many cases, for example, to counter the module "TARPIT".

1) default

setreconnectpresenttime=1
timeupreconnectpresenttime=60*20




sr. member
Activity: 939
Merit: 261
Data HDD Repair - Recovery of lost information

New version available

CACHE-Project, SetControlRealTime added

Version : v_6.1.1.28
Version of git : v_0.7.5.138
Subversion : v_0.7.6.40


sr. member
Activity: 939
Merit: 261
Data HDD Repair - Recovery of lost information

 According to the tests results:
The optimal mode -

setreload=0
setreconnecting=1

Extreme mode -

setreload=1
setreconnecting=0

sr. member
Activity: 939
Merit: 261
Data HDD Repair - Recovery of lost information
 The inclusion of many features was tied to the "debug" setting and was not written about this. In this version, this dependency is removed.
Synchronization of blocks is implemented in three modes -

1)
setreload=0
setreconnecting=0
2)
setreload=0
setreconnecting=1
3)
setreload=1
setreconnecting=0

Coinexchange.io installed the latest version of the wallet and synchronized the blockchain from the zero block to check the balance.

Thank you for your dedication to this project Deff. Without you this coin would have died many moons ago. Cheers!

Thanks for thanks, dear friend!
 Smiley
legendary
Activity: 1404
Merit: 1001
 The inclusion of many features was tied to the "debug" setting and was not written about this. In this version, this dependency is removed.
Synchronization of blocks is implemented in three modes -

1)
setreload=0
setreconnecting=0
2)
setreload=0
setreconnecting=1
3)
setreload=1
setreconnecting=0

Coinexchange.io installed the latest version of the wallet and synchronized the blockchain from the zero block to check the balance.

Thank you for your dedication to this project Deff. Without you this coin would have died many moons ago. Cheers!
sr. member
Activity: 939
Merit: 261
Data HDD Repair - Recovery of lost information
  The inclusion of many features was tied to the "debug" setting and was not written about this. In this version, this dependency is removed.
Synchronization of blocks is implemented in three modes -

1)
setreload=0
setreconnecting=0
2)
setreload=0
setreconnecting=1
3)
setreload=1
setreconnecting=0

Coinexchange.io installed the latest version of the wallet and synchronized the blockchain from the zero block to check the balance.
sr. member
Activity: 939
Merit: 261
Data HDD Repair - Recovery of lost information

New version available

CACHE-Project, All features are enabled and available

Version : v_6.1.1.27
Version of git : v_0.7.5.136
Subversion : v_0.7.6.39


sr. member
Activity: 939
Merit: 261
Data HDD Repair - Recovery of lost information
sr. member
Activity: 939
Merit: 261
Data HDD Repair - Recovery of lost information

New version available

CACHE-Project, Modifying the block chain request rule in case of transmission failure during synchronization

Version : v_6.1.1.25
Version of git : v_0.7.5.133
Subversion : v_0.7.6.37


sr. member
Activity: 1246
Merit: 257
can't say no dev here  Grin
cool to see solid activity for CACHE, old project that goes back to cryptsy days.
Pages:
Jump to: