Pages:
Author

Topic: New Ixcoin fork -> I0coin - page 46. (Read 217126 times)

full member
Activity: 126
Merit: 100
August 26, 2011, 02:00:25 PM
IXCoin is going back up, it's at around 0.0027 right now. Not nearly as impressive as solidcoin, but way better than i0coin.
sr. member
Activity: 406
Merit: 257
August 26, 2011, 01:17:12 PM
Well, kr105 seems unable/unwilling/busy/run over by a bus... so... *shrug*.
legendary
Activity: 1526
Merit: 1002
Waves | 3PHMaGNeTJfqFfD4xuctgKdoxLX188QM8na
August 26, 2011, 12:38:27 PM
When is this fixed? Do we need >48 hours to copy/paste some code?

hero member
Activity: 700
Merit: 500
August 26, 2011, 04:58:13 AM
Sorry if this is the wrong place to post, but I couldn't find anywhere else.

Is anyone selling i0coins?

Thanks.
legendary
Activity: 1526
Merit: 1002
Waves | 3PHMaGNeTJfqFfD4xuctgKdoxLX188QM8na
August 25, 2011, 11:17:31 AM
Any updates?
legendary
Activity: 1526
Merit: 1002
Waves | 3PHMaGNeTJfqFfD4xuctgKdoxLX188QM8na
August 25, 2011, 05:25:20 AM
Something like this should do the trick (disable the broken one-week crap, switch to solidcoin algo after block 14639).


I think this is how it should be solved.
legendary
Activity: 1512
Merit: 1036
August 25, 2011, 05:05:54 AM
birth and death of a fork. the start is late for a day or so. let's see if it will become a zombie after the retargeting  Cheesy

It is only truly dead after no one ever speaks its name again.
sr. member
Activity: 406
Merit: 257
August 25, 2011, 02:05:21 AM
Something like this should do the trick (disable the broken one-week crap, switch to solidcoin algo after block 14639).

Code:
diff -Nur I0coinClientv1.0-linux-stable-orig/src/main.cpp I0coinClientv1.0-linux-stable-dev/src/main.cpp
--- I0coinClientv1.0-linux-stable-orig/src/main.cpp 2011-08-18 23:15:50.000000000 +0200
+++ I0coinClientv1.0-linux-stable-dev/src/main.cpp 2011-08-25 08:23:52.143725519 +0200
@@ -644,7 +644,7 @@
     return nSubsidy + nFees;
 }
 
-unsigned int static GetNextWorkRequired(const CBlockIndex* pindexLast)
+unsigned int static GetNextWorkRequired_OLD(const CBlockIndex* pindexLast)
 {
     const int64 nTargetTimespan = 7 * 24 * 60 * 60; // two weeks
     const int64 nTargetSpacing = 5 * 60;
@@ -659,6 +659,7 @@
     // Only change once per interval
  if ( nRemaining != 0)
  {
+/* HORRIBLY BROKEN, *NEVER* use time() in here
  const CBlockIndex* pindexFirst = pindexLast;
  for (int i = 0; pindexFirst && i < nRemaining-1; i++)
  pindexFirst = pindexFirst->pprev;
@@ -666,6 +667,7 @@
 
  int64 rema = GetAdjustedTime() - pindexFirst->GetBlockTime();
  if(rema < nTargetTimespan)
+*/
  return pindexLast->nBits;
  }
 
@@ -691,6 +693,71 @@
 
     if (bnNew > bnProofOfWorkLimit)
         bnNew = bnProofOfWorkLimit;
+
+    /// debug print
+    printf("GetNextWorkRequired RETARGET\n");
+    printf("nTargetTimespan = %"PRI64d"    nActualTimespan = %"PRI64d"\n", nTargetTimespan, nActualTimespan);
+    printf("Before: %08x  %s\n", pindexLast->nBits, CBigNum().SetCompact(pindexLast->nBits).getuint256().ToString().c_str());
+    printf("After:  %08x  %s\n", bnNew.GetCompact(), bnNew.getuint256().ToString().c_str());
+
+    return bnNew.GetCompact();
+}
+
+//blatantly stolen from SolidCoin
+unsigned int static GetNextWorkRequired(const CBlockIndex* pindexLast)
+{
+    const int64 nTargetTimespan = 12 * 60 * 60; // 12 hours
+    const int64 nTargetSpacing = 3 * 60;    //3 minute blocks
+    const int64 nInterval = nTargetTimespan / nTargetSpacing;
+
+    // Genesis block
+    if (pindexLast == NULL)
+        return bnProofOfWorkLimit.GetCompact();
+
+//okay, maybe not this line
+    if ((pindexLast->nHeight+1) < 14640)
+        return GetNextWorkRequired_OLD(pindexLast);
+
+    // Only change once per interval
+    if ((pindexLast->nHeight+1) % nInterval != 0)
+        return pindexLast->nBits;
+
+    // Go back by what we want to be 14 days worth of blocks
+    const CBlockIndex* pindexFirst = pindexLast;
+    for (int i = 0; pindexFirst && i < nInterval-1; i++)
+        pindexFirst = pindexFirst->pprev;
+    assert(pindexFirst);
+
+    // Limit adjustment step
+    int64 nActualTimespan = pindexLast->GetBlockTime() - pindexFirst->GetBlockTime();
+    int64 nTwoPercent = nTargetTimespan/50;
+    //printf("  nActualTimespan = %"PRI64d"  before bounds\n", nActualTimespan);
+
+    if (nActualTimespan < nTargetTimespan)  //is time taken for a block less than 3minutes?
+    {
+         //limit increase to a much lower amount than dictates to get past the pump-n-dump mining phase
+        //due to retargets being done more often it also needs to be lowered significantly from the 4x increase
+        if(nActualTimespan<(nTwoPercent*16)) //less than a minute?
+            nActualTimespan=(nTwoPercent*45); //pretend it was only 10% faster than desired
+        else if(nActualTimespan<(nTwoPercent*32)) //less than 2 minutes?
+            nActualTimespan=(nTwoPercent*47); //pretend it was only 6% faster than desired
+        else
+            nActualTimespan=(nTwoPercent*49); //pretend it was only 2% faster than desired
+
+        //int64 nTime=nTargetTimespan-nActualTimespan;
+        //nActualTimespan = nTargetTimespan/2;
+    }
+    else if (nActualTimespan > nTargetTimespan*4)   nActualTimespan = nTargetTimespan*4;
+
+    // Retarget
+    CBigNum bnNew;
+    bnNew.SetCompact(pindexLast->nBits);
+    bnNew *= nActualTimespan;
+    bnNew /= nTargetTimespan;
+
+
+    if (bnNew > bnProofOfWorkLimit)
+        bnNew = bnProofOfWorkLimit;
 
     /// debug print
     printf("GetNextWorkRequired RETARGET\n");
legendary
Activity: 1078
Merit: 1005
August 25, 2011, 01:32:23 AM
Deposits and withdrawals in for i0coins in the i0coin exchange are suspended until the issue is fixed. This is to prevent withdrawals occurring on a 'split' chain and the receipient on a different split of the chain not getting their funds. Let's hope the developers comes up with a fix!
donator
Activity: 1654
Merit: 1351
Creator of Litecoin. Cryptocurrency enthusiast.
August 25, 2011, 01:25:29 AM
The one week part of "one week or 2016 blocks" retargeting is b0rked.
Downloading the chain with a fresh datadir makes it try to retarget at block 1.
Then it tries to go back 2016 blocks. from block 1. Boom, NULL pointer.
With a client that already has the blockchain up to some point in the past, it'll start disagreeing on what the target should be (again, mistrigger of the after-7-days stuff)... around now.
Easy Fix: pull a Thomas and blatantly rip off solidcoins retargeting algo.

Well, that's a big failure. I guess this was never tested so it could be released so soon after ixcoin.

Given that i0coin price is down the drain, it would probably not even be worth fixing. Even if it was fixed, not many people would even bother downloading a new client. Most people have either moved on to SolidCoins or back to Bitcoin. Well it was fun while it lasted. Smiley
legendary
Activity: 2492
Merit: 1473
LEALANA Bitcoin Grim Reaper
August 25, 2011, 01:25:19 AM
Easy Fix: pull a Thomas and blatantly rip off solidcoins retargeting algo.

+1 LOL
sr. member
Activity: 406
Merit: 257
August 25, 2011, 01:08:54 AM
The one week part of "one week or 2016 blocks" retargeting is b0rked.
Downloading the chain with a fresh datadir makes it try to retarget at block 1.
Then it tries to go back 2016 blocks. from block 1. Boom, NULL pointer.
With a client that already has the blockchain up to some point in the past, it'll start disagreeing on what the target should be (again, mistrigger of the after-7-days stuff)... around now.
Easy Fix: pull a Thomas and blatantly rip off solidcoins retargeting algo.
sr. member
Activity: 574
Merit: 250
August 25, 2011, 12:34:37 AM
That's with the block chain already deleted to start from scratch, actually.
Yes, you're right, I just tested. It looks like the i0coin network is dead. Perhaps the maintainer of the software can comment.

Just tried i0coin for fun after reading this.  I keep bouncing around between 3-5 connections and am sitting @ 14514 blocks
legendary
Activity: 1078
Merit: 1005
August 25, 2011, 12:21:07 AM
That's with the block chain already deleted to start from scratch, actually.
Yes, you're right, I just tested. It looks like the i0coin network is dead. Perhaps the maintainer of the software can comment.
member
Activity: 112
Merit: 10
August 24, 2011, 11:08:54 PM
$ bin/64/i0coin -addnode=206.71.179.116
i0coin: main.cpp:676: unsigned int GetNextWorkRequired(const CBlockIndex*): Assertion `pindexFirst' failed.
Aborted


looks like you've a corrupted blockchain.
Try to delete the blockchain file from ~/.i0coin and redownload it. (Beware to not delete wallet.dat!)

That's with the block chain already deleted to start from scratch, actually.
legendary
Activity: 1218
Merit: 1000
August 24, 2011, 08:12:31 PM
Start the client with -addnode= set to an IP address of a known node. Try "-addnode=206.71.179.116" for example.

I've been having the same problem, and, well, I tried what you just suggested, and get:

$ bin/64/i0coin -addnode=206.71.179.116
i0coin: main.cpp:676: unsigned int GetNextWorkRequired(const CBlockIndex*): Assertion `pindexFirst' failed.
Aborted


looks like you've a corrupted blockchain.
Try to delete the blockchain file from ~/.i0coin and redownload it. (Beware to not delete wallet.dat!)
member
Activity: 112
Merit: 10
August 24, 2011, 06:30:26 PM
Start the client with -addnode= set to an IP address of a known node. Try "-addnode=206.71.179.116" for example.

I've been having the same problem, and, well, I tried what you just suggested, and get:

$ bin/64/i0coin -addnode=206.71.179.116
i0coin: main.cpp:676: unsigned int GetNextWorkRequired(const CBlockIndex*): Assertion `pindexFirst' failed.
Aborted
legendary
Activity: 1078
Merit: 1005
August 23, 2011, 07:11:13 PM
I can't get either the stable or beta client to make connections now. I think the IRC bootstrapping is dead or something. Which sucks because I can't move any i0coin right now if I can't download the blockchain.
Start the client with -addnode= set to an IP address of a known node. Try "-addnode=206.71.179.116" for example.
legendary
Activity: 1708
Merit: 1020
August 23, 2011, 04:00:51 PM
birth and death of a fork. the start is late for a day or so. let's see if it will become a zombie after the retargeting  Cheesy

newbie
Activity: 42
Merit: 0
August 19, 2011, 08:37:28 PM
Its the same version as before but compiled again, both versions (beta&stable) includes the source code used to compile on the src folder Smiley

Edit: Oh, and used static libraries instead of shared. Also, if you want to view the changes that i've made on the stable version, you can diff the source with the 0.3.24 version of the main bitcoin client.
Does this new version work on 64bit linux? I couldn't compiler original build.
I had to run the I0coin server off if my Windows 7 laptop.
Maybe I'm making some newb mistakes.
Pages:
Jump to: