Bitcoin Forum
May 22, 2024, 01:24:28 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 3 »  All
  Print  
Author Topic: TRC: 32-bit Linux client cannot synchronize with TerraCoin network  (Read 3796 times)
PSL (OP)
Member
**
Offline Offline

Activity: 166
Merit: 10


View Profile
June 02, 2013, 06:56:55 AM
Last edit: June 04, 2013, 08:30:51 AM by PSL
 #1

Gentlemen,

I try to synchronize my client with TerraCoin network but I cannot get the latest blocks those I see at http://www.cryptocoinexplorer.com:3750/chain/Terracoin

I run the latest version of TRC SW from GIT at 32-bit Linux box; https://github.com/terracoin/terracoin
I tried several times to synchronize my client that was offline for few days and I finish in blind allay. Like this:

TRCoin$ ./terracoind getinfo
{  
    "version" : 80000,
    "protocolversion" : 70001,
    "walletversion" : 60000,
    "balance" : 0.00000000,
    "blocks" : 137429,
    "timeoffset" : -2,
    "connections" : 4,
    "proxy" : "",
    "difficulty" : 5254.96236407,
    "testnet" : false,
    "keypoololdest" : 1370150464,
    "keypoolsize" : 101,
    "paytxfee" : 0.00000000,
    "errors" : ""
}

Sometimes I get to different state but I cannot synchronize with the network. I hope you can replicate this problem, just start fresh TerrcoinClient and try to synchronize. I tried several times...

Troubles start at block 137162. I see in .terracoin/debug.log that there are many clients on network those are in bad state.

This is one version of block chain I received:

TRCoin$ for I in {137160..137170}; do echo "$I: $(./terracoind getblockhash $I)"; done
137160: 0000000000027bb9e06f2811ef8cdac16ab0fa9a50f60556652fc9b8741692a6
137161: 000000000002fd58866ebe4bf20cc4f125d0f73a8f3062af33cf2a51b28e3101
137162: 000000000004448227cc755bb5b24c3c09d14d960f490227579cd9685fb33e7d !!!
137163: 0000000000048491747e46c82406ebc819677e1dd98f4bf9b60ecbb741bb9466
137164: 000000000005ff203bec45e1be7434ea3e160563f72339e91c8036d65c97e80b
137165: 000000000004cb33d4d7bfbfde9a789b0a1399152e15c9990c14193dad35ba5d
137166: 000000000001e0d9aec3e887e9eb7b38440eb8bc70cad26194b7111b0682b270
137167: 0000000000050e06cf00e11342e00e1476632ed0aa257d06e65ac291042c26b6
137168: 000000000001711ef7abe0bb0e909c619e0addac20ef30dc354268fa56e0e0d2
137169: 000000000002206c363c8ce4aae47b66f36991250a5369321846bd8cc1ebd0a7
137170: 000000000002d28a32b8e7f068c3ed13f97832731cd50e7991f766cdc6ae5f66

Notice that my block 137162 is different from
http://www.cryptocoinexplorer.com:3750/block/00000000000342fd6e38765cc6f8f56d60c49e3e9522a54d99f561d35800a293

So, I touched source code and added checkpoint:

terracoin$ git diff
diff --git a/src/checkpoints.cpp b/src/checkpoints.cpp
index 78449ec..9205ff4 100644
--- a/src/checkpoints.cpp
+++ b/src/checkpoints.cpp
@@ -91,6 +91,7 @@ namespace Checkpoints
        (107368, uint256("0x000000000009062fe1b4c0654b3d152282545aa8beba3c0e4981d9dfa71b1eaa"))
        (108106, uint256("0x00000000000282bf4e2bd0571c42165a67ffede3b81f2387e301369162107020"))
        (110197, uint256("0x0000000000002d863064910c8964f5d8e2883aca9760c19368fe043263e2bfdd"))
+       (137162, uint256("0x00000000000342fd6e38765cc6f8f56d60c49e3e9522a54d99f561d35800a293"))
         ;
     static const CCheckpointData data = {
         &mapCheckpoints,

I recompiled terracoind, deleted downloaded blocks chain and started TRC client to download fresh blocks.

This is a surprise I see in .terracoin/debug.log:


received block 00000000000342fd6e38765cc6f8f56d60c49e3e9522a54d99f561d35800a293 from 198.199.109.12:13333
ERROR: AcceptBlock() : incorrect proof of work
ERROR: ProcessBlock() : AcceptBlock FAILED


This message explains why I cannot download the latest blocks!
Could you explain me this mystery? Do I miss something?? From my point of view, TRC network is not healthy for several days. On the other side, I see that pool, like Coinotron, creates fresh blocks and there are several clients on network those have the latest blocks...

I am sorry, this post was too technical.
Thank you for your help!
PSL (OP)
Member
**
Offline Offline

Activity: 166
Merit: 10


View Profile
June 02, 2013, 07:13:21 AM
Last edit: June 03, 2013, 07:09:23 AM by PSL
 #2

An update that explains why I think that something is wrong with TRC network:

$ awk '/ blocks=/{print $6;}' .terracoin/debug.log | sort -n -k1.8 | uniq -c
      2 blocks=0,
      1 blocks=2000,
      1 blocks=33358,
      1 blocks=54517,
      1 blocks=60500,
      1 blocks=62000,
      1 blocks=62500,
      1 blocks=81000,
      1 blocks=85657,
      1 blocks=91036,
      1 blocks=100554,
      1 blocks=101000,
      2 blocks=101632,
      1 blocks=107000,
      2 blocks=108657,
      3 blocks=111210,
      1 blocks=113500,
      1 blocks=129000,
      1 blocks=132246,
     41 blocks=137161,
      2 blocks=137413,
      1 blocks=137428,
      2 blocks=137429,
      1 blocks=138754,
      4 blocks=138770,
      7 blocks=138771,
      1 blocks=138774,
      2 blocks=138775,
      1 blocks=138776,
      3 blocks=138781,
      4 blocks=138784,
      3 blocks=138785,
      3 blocks=138787,
      4 blocks=138789,
      3 blocks=138791,

EDIT: fresh update, about 24 hours latter (3 Jun):

      1 blocks=0,
      1 blocks=62,
      1 blocks=39491,
      3 blocks=101632,
      1 blocks=104291,
      1 blocks=108626,
      4 blocks=108657,
      1 blocks=111079,
      1 blocks=111190,
      4 blocks=111210,
      1 blocks=130910,
      2 blocks=132246,
    548 blocks=137161,
      1 blocks=137305,
     11 blocks=137413,
      1 blocks=137428,
      7 blocks=137429,
      5 blocks=138834,
      6 blocks=138837,
      7 blocks=138839,
      5 blocks=138840,
...
      5 blocks=139230,
      1 blocks=139231,
      1 blocks=139235,
      4 blocks=139236,
      3 blocks=139239,
      3 blocks=139241,
      3 blocks=139244,
      5 blocks=139248,
      2 blocks=139249,

You can clearly see that many clients cannot synchronize and stop at block 137161!! Data were collected at 64-bit box (that is synchronized).
PSL (OP)
Member
**
Offline Offline

Activity: 166
Merit: 10


View Profile
June 02, 2013, 07:37:02 AM
 #3

So far, I was running TRC clients at 32-bit Linux, Ubuntu 11.04 and 12.10. I was unable to synchronize.

A few minutes ago, I installed TRC at Ubuntu 12.04, 64-bit and client downloaded the blocks chain, I have the latest block; http://www.cryptocoinexplorer.com:3750/block/000000000000e53d6150f45965445abf1121d704e8a48e488af5ae2fe3a6bef6

TRC$ ./terracoind getinfo
{
    "version" : 80000,
    "protocolversion" : 70001,
    "walletversion" : 60000,
    "balance" : 0.00000000,
    "blocks" : 138797,
    "timeoffset" : -1,
    "connections" : 9,
    "proxy" : "",
    "difficulty" : 20755.83791229,
    "testnet" : false,
    "keypoololdest" : 1370154117,
    "keypoolsize" : 101,
    "paytxfee" : 0.00000000,
    "errors" : ""
}
TRC$ ./terracoind getblockhash 138797
000000000000e53d6150f45965445abf1121d704e8a48e488af5ae2fe3a6bef6

After this test, I think there is a bug in the 32-bit version of the client; as described in the first post:

32-bit system:

received block 00000000000342fd6e38765cc6f8f56d60c49e3e9522a54d99f561d35800a293 from 198.199.109.12:13333
ERROR: AcceptBlock() : incorrect proof of work
ERROR: ProcessBlock() : AcceptBlock FAILED

64-bit system:

received block 00000000000342fd6e38765cc6f8f56d60c49e3e9522a54d99f561d35800a293 from 5.39.79.140:13333
SetBestChain: new best=00000000000342fd6e38765cc6f8f56d60c49e3e9522a54d99f561d35800a293  height=137162  work=4137787908838877763  tx=272549  date=2013-05-30 11:54:41
ProcessBlock: ACCEPTED
PSL (OP)
Member
**
Offline Offline

Activity: 166
Merit: 10


View Profile
June 02, 2013, 10:54:31 AM
Last edit: September 23, 2013, 11:35:19 AM by PSL
 #4

I can replicate the problem, it proves that a bug is at 32-bit client.

1) Synchronize TRC client at 64-bit box, IP address of this box is 54.226.35.73 in my case.

2) Try to synchronize fresh TRC client at 32-bit box; you can add -connect=54.226.35.73 switch to be sure that client talks to the right node.

3) x32 client will synchronize only first 137161 blocks, block 137162 is rejected with error "ERROR: AcceptBlock() : incorrect proof of work". You can check this in .terracoin/debug.log.

I tried another test. I moved .teracoin directory with complete block chain from x64 box to x32 box. I tried to synchronize x32 box and x64 box against this "modified" x32 box (-connect=xxx). Client at x64 box successfully downloaded complete block chain. Client at x32 box failed to download complete block chain...

Both tests were run at boxes with Ubuntu 12.04.2.

This is strange bug, isn't it?


UPDATE:

I state that bug is in 32-bit client. Well, it is still possible that bug is not in 32-bit client but in 64-bit client (I assume that block 137162 was created by 64-bit client). 32-bit client is in trouble because it cannot get fresh blocks. It is clear that 32-bit and 64-bit clients are not compatible...

UPDATE2:
There is an easier way to replicate the problem at 32-bit Ubuntu box. Copy a fresh copy of block chain file from Windows or from 64-bit Linux to your 32-bit box; file at 64-bit box is .terracoin/blocks/blk00000.dat, copy file to your home directory at your 32-bit box. Start terracoin client with command
terracoind -loadblocks=blk00000.dat
Only part of the file will be loaded, after a while you can find REJECT message in debug.log; no network connection is needed in this test.

UPDATE3:
TRC client compiled at Smartbook Toshiba AC100, NVidia Tegra2 ARM CPU, runs without this bug. Ubuntu 12.10 (armhf) runs on this smartbook.
super3
Legendary
*
Offline Offline

Activity: 1094
Merit: 1006


View Profile WWW
June 02, 2013, 08:11:04 PM
 #5

Ok let me try to replicate it on my end.

Bitcoin Dev / Storj - Decentralized Cloud Storage. Winner of Texas Bitcoin Conference Hackathon 2014. / Peercoin Web Lead / Primecoin Web Lead / Armory Guide Author / "Am I the only one that trusts Dogecoin more than the Federal Reserve?"
calonew
Full Member
***
Offline Offline

Activity: 196
Merit: 100



View Profile
June 03, 2013, 10:10:28 AM
 #6

The same problem on my Linux Ubuntu 10.04 (32 bit): terracoin client is not syncronized and stucked at block 137161 for several days.

PSL (OP)
Member
**
Offline Offline

Activity: 166
Merit: 10


View Profile
June 03, 2013, 12:08:17 PM
 #7

I tried to run terracoin-0.1.3-40-win32.zip under WINE at Ubuntu 12.10 i386. Windows terracoin-qt.exe client works "OK" and was able to download complete block chain.

Well, there was one crash

wine: Unhandled page fault on read access to 0x00000000 at address 0x7e62c790 (thread 0009), starting debugger...

but this is out of scope of my test.
super3
Legendary
*
Offline Offline

Activity: 1094
Merit: 1006


View Profile WWW
June 03, 2013, 07:51:10 PM
 #8

Can you not use the 64 bit client?

Bitcoin Dev / Storj - Decentralized Cloud Storage. Winner of Texas Bitcoin Conference Hackathon 2014. / Peercoin Web Lead / Primecoin Web Lead / Armory Guide Author / "Am I the only one that trusts Dogecoin more than the Federal Reserve?"
PSL (OP)
Member
**
Offline Offline

Activity: 166
Merit: 10


View Profile
June 03, 2013, 09:53:51 PM
 #9

Can you not use the 64 bit client?

I can run client at 64-bit box or I can run Windows client, or I can do something else. This problem is serious from my point of view and I decided to ignore TRC until this is fixed...
PSL (OP)
Member
**
Offline Offline

Activity: 166
Merit: 10


View Profile
June 04, 2013, 05:49:32 AM
Last edit: June 04, 2013, 09:55:04 AM by PSL
 #10

TRC cryptocoinexplorer is in trouble, the last listed block is 138975 but TRC network created block 139719...

http://www.cryptocoinexplorer.com:3750/block/0000000000013d4654ae1f5a15d2d6620d798a010d85124fa6836a4cb5c5f986
super3
Legendary
*
Offline Offline

Activity: 1094
Merit: 1006


View Profile WWW
June 04, 2013, 11:35:54 PM
 #11

TRC cryptocoinexplorer is in trouble, the last listed block is 138975 but TRC network created block 139719...

http://www.cryptocoinexplorer.com:3750/block/0000000000013d4654ae1f5a15d2d6620d798a010d85124fa6836a4cb5c5f986

Sent mail to the block explorer admin.

Bitcoin Dev / Storj - Decentralized Cloud Storage. Winner of Texas Bitcoin Conference Hackathon 2014. / Peercoin Web Lead / Primecoin Web Lead / Armory Guide Author / "Am I the only one that trusts Dogecoin more than the Federal Reserve?"
rav3n_pl
Legendary
*
Offline Offline

Activity: 1361
Merit: 1003


Don`t panic! Organize!


View Profile WWW
June 05, 2013, 01:15:20 PM
 #12

Issue reported on github
https://github.com/terracoin/terracoin/issues/10

1Rav3nkMayCijuhzcYemMiPYsvcaiwHni  Bitcoin stuff on my OneDrive
My RPC CoinControl for any coin https://bitcointalk.org/index.php?topic=929954
Some stuff on https://github.com/Rav3nPL/
calonew
Full Member
***
Offline Offline

Activity: 196
Merit: 100



View Profile
June 07, 2013, 05:27:09 AM
 #13

still stucked at block 137161...

does anyone knows if it's possible to transfer updated chain files from Windows to Linux?
if yes... what files should be copied?
pawlak2
Newbie
*
Offline Offline

Activity: 36
Merit: 0


View Profile
June 07, 2013, 06:11:45 AM
 #14

I've tested it and it didn't work Sad
PSL (OP)
Member
**
Offline Offline

Activity: 166
Merit: 10


View Profile
June 09, 2013, 02:10:14 PM
 #15

still stucked at block 137161...

does anyone knows if it's possible to transfer updated chain files from Windows to Linux?
if yes... what files should be copied?

It is possible...
You want to copy everything except wallet.dat and terracoin.conf. Please, create a backup first!
calonew
Full Member
***
Offline Offline

Activity: 196
Merit: 100



View Profile
June 09, 2013, 04:57:30 PM
 #16

still stucked at block 137161...

does anyone knows if it's possible to transfer updated chain files from Windows to Linux?
if yes... what files should be copied?

It is possible...
You want to copy everything except wallet.dat and terracoin.conf. Please, create a backup first!


Thank you for your help! I tried your suggested method, copying everything from Terracoin folder under Windows into Linux .terracoin folder. But, when I try to start terracoind (the daemon) on Linux, I get this error:

"Error: Error initializing wallet database environment /root/.terracoin!"

It seems there is a database incompatibility error... maybe the Windows binaries were compiled with a different database version than my Linux terracoind (compiled from sources, on a machine running ubuntu 10.04 32 bit). So... I am still stucked with an incomplete block database, unable to use the blocks chain from Windows.

Any help or suggestion to solve this problem would be greatly appreciated... Thanks again
PSL (OP)
Member
**
Offline Offline

Activity: 166
Merit: 10


View Profile
June 10, 2013, 05:28:26 AM
 #17


Thank you for your help! I tried your suggested method, copying everything from Terracoin folder under Windows into Linux .terracoin folder. But, when I try to start terracoind (the daemon) on Linux, I get this error:

"Error: Error initializing wallet database environment /root/.terracoin!"

It seems there is a database incompatibility error... maybe the Windows binaries were compiled with a different database version than my Linux terracoind (compiled from sources, on a machine running ubuntu 10.04 32 bit). So... I am still stucked with an incomplete block database, unable to use the blocks chain from Windows.

Any help or suggestion to solve this problem would be greatly appreciated... Thanks again

I think that your Windows client and Linux client have different version of libdb. I guess that Window client have libdb4.8. I heard that there is a way to upgrade DB file from older to newer version  but I never tried that.

Well, do you really want to use Terracoins? There are so many other coins on the market those work better...
pawlak2
Newbie
*
Offline Offline

Activity: 36
Merit: 0


View Profile
June 10, 2013, 06:59:28 PM
 #18

As I've said before. I've imported block chain from windows client through terracoind -loadblock=blk.dat command. It imported block chain until the fatal block and then stopped with:
Code:
ERROR: AcceptBlock() : incorrect proof of work
ERROR: ProcessBlock() : AcceptBlock FAILED
calonew
Full Member
***
Offline Offline

Activity: 196
Merit: 100



View Profile
June 10, 2013, 07:13:18 PM
 #19

I've finally managed to copy the block chain from Windows to Linux!
Here is how:

1. Copy the ENTIRE Terracoin folder from Windows (which was synchronized) - without wallet.dat and terracoin.conf
2. Paste to .terracoin folder in Linux
3. IMPORTANT! Delete .terracoin/database/log.00000000  files! (all log.xxx files from .terracoin/database/ folder!)
4. copy your saved wallet.dat and terracoin.conf files to .terracoin folder on Linux
5. start the daemon (terracoind -daemon)

Done! Linux daemon is now synchronized!

rav3n_pl
Legendary
*
Offline Offline

Activity: 1361
Merit: 1003


Don`t panic! Organize!


View Profile WWW
June 10, 2013, 09:36:21 PM
 #20

I've finally managed to copy the block chain from Windows to Linux!
Now use -rescan

1Rav3nkMayCijuhzcYemMiPYsvcaiwHni  Bitcoin stuff on my OneDrive
My RPC CoinControl for any coin https://bitcointalk.org/index.php?topic=929954
Some stuff on https://github.com/Rav3nPL/
Pages: [1] 2 3 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!