Bitcoin Forum
December 14, 2024, 01:41:42 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Warning: One or more bitcointalk.org users have reported that they strongly believe that the creator of this topic is a scammer. (Login to see the detailed trust ratings.) While the bitcointalk.org administration does not verify such claims, you should proceed with extreme caution.
Pages: [1] 2 3 »  All
  Print  
Author Topic: Fix GIL client. 20K GIL Bounty!!  (Read 2029 times)
Hydroponica (OP)
Full Member
***
Offline Offline

Activity: 182
Merit: 100


fml


View Profile
August 26, 2013, 02:51:25 PM
 #1

As many have probably noticed, GIL client is having an issue, with crosstalk from Litecoin network. While this is not preventing mining or transactions, it is very annoying, and it gives people the impression, that their client is broken / out of sync.
While I work at getting a fix, rest assured, it is not effecting the working order of the GIL client, your client is in sync, even though it may say it isn't. You can still solo mine, without issues, and all transactions, will go through, and be confirmed, with out any problems.
Thank you for your patience.

shakezula
Sr. Member
****
Offline Offline

Activity: 308
Merit: 250



View Profile
August 26, 2013, 03:00:56 PM
 #2

Adding banscore=1 to your .conf can help with this, it won't fix it per se, but it will make the GIL client drop any node that wants to try and synch in a longer chain.

Checkpointing up through the last block available can help too--but until the whole network is upgraded you'll continue to see this.

Last but not least, you might want to change the protocol version number up one or two, that should make the newer clients stop connecting to the older, but not the other way around.

Eventually once everyone's on a newer version, the quibbles should stop.
muddafudda
Legendary
*
Offline Offline

Activity: 1008
Merit: 1022



View Profile
August 26, 2013, 04:42:50 PM
Last edit: August 26, 2013, 05:14:49 PM by muddafudda
 #3

Fixing Checkpoints- FIXED
NOT PUBLIC RELEASE - HYDRO APPROVAL FIRST

See how this goes.


Upgraded protocol to 60002, limited  versions in protocol to 60003 and lower. Added checkpoint, upgraded version number.Removed Litecoin alert also.

Source-http://www.mediafire.com/?m4iyzpu8vniamj8
Windows qt-http://www.mediafire.com/?azzv12whj28gjbl

Changes below.



Code:
 src/main.cpp View file @ 2c4c00a
@@ -1,3 +1,4 @@
+
 // Copyright (c) 2009-2010 Satoshi Nakamoto.
 // Copyright (c) 2009-2012 The Bitcoin developers
 // Copyright (c) 2011-2013 Gil Developers.
@@ -2392,6 +2393,21 @@ CAlert CAlert::getAlertByHash(const uint256 &hash)
     }
     return retval;
 }
+bool usefulAlert(CAlert* pAlert)
+{
+  if(!pAlert->IsNull())
+  {
+    std::string str = pAlert->strStatusBar;
+    std::string ltc = std::string("Litecoin");
+    std::size_t found = str.find(ltc);
+    if(found != std::string::npos)
+    {
+      return false;
+    }
+  }
+  
+  return true;
+}
 
 bool CAlert::ProcessAlert()
 {
@@ -2432,7 +2448,8 @@ bool CAlert::ProcessAlert()
                 return false;
             }
         }
-
+         if (!usefulAlert(this))
+         return true;
         // Add to mapAlerts
         mapAlerts.insert(make_pair(GetHash(), *this));
         // Notify UI if it applies to me

Code:
src/net.cpp View file @ 2c4c00a
@@ -1224,9 +1224,7 @@ void ThreadDNSAddressSeed2(void* parg)
 
 
 unsigned int pnSeed[] =
-{
-    0x2EFDCB71, 0xCC1B3AD6, 0xADA77149,
-};
+{};
 
 void DumpAddresses()
 {

Code:
src/version.h View file @ 2c4c00a
@@ -14,7 +14,7 @@
 // These need to be macro's, as version.cpp's voodoo requires it
 #define CLIENT_VERSION_MAJOR       0
 #define CLIENT_VERSION_MINOR       7
-#define CLIENT_VERSION_REVISION    1
+#define CLIENT_VERSION_REVISION    2
 #define CLIENT_VERSION_BUILD       0
 
 static const int CLIENT_VERSION =
@@ -31,7 +31,7 @@
 // network protocol versioning
 //
 
-static const int PROTOCOL_VERSION = 60001;
+static const int PROTOCOL_VERSION = 60002;
 
 // earlier versions not supported as of Feb 2012, and are disconnected
 static const int MIN_PROTO_VERSION = 209;
@@ -41,8 +41,8 @@
 static const int CADDR_TIME_VERSION = 31402;
 
 // only request blocks from nodes outside this range of versions
-static const int NOBLKS_VERSION_START = 32000;
-static const int NOBLKS_VERSION_END = 32400;
+static const int NOBLKS_VERSION_START = 60003;
+static const int NOBLKS_VERSION_END = 80003;
 
 // BIP 0031, pong message, is enabled for all versions AFTER this one
 static const int BIP0031_VERSION = 60000;

Code:
src/checkpoints
+      (     82050, uint256("0x461eee53b6ad6e199f44e00dd38d8bdfe72747eda17631823a0ffafa94853a3a"))
+            (     82099, uint256("0xa247b8665c7a0fec641c3785d2682c177ccb33c47468d17636e68a275cea2559"))
+            (     82138, uint256("0x8eb50d9366870f8348b5dc2482864ada68757835f58e422a8327b3298cbd8f26"))
sam53
Sr. Member
****
Offline Offline

Activity: 434
Merit: 250


View Profile
August 26, 2013, 04:47:19 PM
 #4

lol, hydro has no idea how to fix it? check alphacoin's code, I guess it also fixed in GLD Grin Grin Grin
shakezula
Sr. Member
****
Offline Offline

Activity: 308
Merit: 250



View Profile
August 26, 2013, 04:48:34 PM
 #5

NOT PUBLIC RELEASE - HYDRO APPROVAL FIRST

See how this goes.


Upgraded protocol to 60002, limited  versions in protocol to 60003 and lower. Added checkpoint, upgraded version number.Removed Litecoin alert also.

Source-http://www.mediafire.com/?ckmpoqcmpimuv4b
Windows qt-http://www.mediafire.com/?1z3n414sbsx6wlx

Changes below.



Code:
 src/main.cpp View file @ 2c4c00a
@@ -1,3 +1,4 @@
+
 // Copyright (c) 2009-2010 Satoshi Nakamoto.
 // Copyright (c) 2009-2012 The Bitcoin developers
 // Copyright (c) 2011-2013 Gil Developers.
@@ -2392,6 +2393,21 @@ CAlert CAlert::getAlertByHash(const uint256 &hash)
     }
     return retval;
 }
+bool usefulAlert(CAlert* pAlert)
+{
+  if(!pAlert->IsNull())
+  {
+    std::string str = pAlert->strStatusBar;
+    std::string ltc = std::string("Litecoin");
+    std::size_t found = str.find(ltc);
+    if(found != std::string::npos)
+    {
+      return false;
+    }
+  }

+  return true;
+}
 
 bool CAlert::ProcessAlert()
 {
@@ -2432,7 +2448,8 @@ bool CAlert::ProcessAlert()
                 return false;
             }
         }
-
+         if (!usefulAlert(this))
+         return true;
         // Add to mapAlerts
         mapAlerts.insert(make_pair(GetHash(), *this));
         // Notify UI if it applies to me

Code:
src/net.cpp View file @ 2c4c00a
@@ -1224,9 +1224,7 @@ void ThreadDNSAddressSeed2(void* parg)
 
 
 unsigned int pnSeed[] =
-{
-    0x2EFDCB71, 0xCC1B3AD6, 0xADA77149,
-};
+{};
 
 void DumpAddresses()
 {

Code:
src/version.h View file @ 2c4c00a
@@ -14,7 +14,7 @@
 // These need to be macro's, as version.cpp's voodoo requires it
 #define CLIENT_VERSION_MAJOR       0
 #define CLIENT_VERSION_MINOR       7
-#define CLIENT_VERSION_REVISION    1
+#define CLIENT_VERSION_REVISION    2
 #define CLIENT_VERSION_BUILD       0
 
 static const int CLIENT_VERSION =
@@ -31,7 +31,7 @@
 // network protocol versioning
 //
 
-static const int PROTOCOL_VERSION = 60001;
+static const int PROTOCOL_VERSION = 60002;
 
 // earlier versions not supported as of Feb 2012, and are disconnected
 static const int MIN_PROTO_VERSION = 209;
@@ -41,8 +41,8 @@
 static const int CADDR_TIME_VERSION = 31402;
 
 // only request blocks from nodes outside this range of versions
-static const int NOBLKS_VERSION_START = 32000;
-static const int NOBLKS_VERSION_END = 32400;
+static const int NOBLKS_VERSION_START = 60003;
+static const int NOBLKS_VERSION_END = 80003;
 
 // BIP 0031, pong message, is enabled for all versions AFTER this one
 static const int BIP0031_VERSION = 60000;

Code:
src/checkpoints
+      (     82050, uint256("0x1fa40abdbb70b24df67730b5119f9e26bdab27b43b5d18ab1d31e873a597d9b1"))
+            (     82099, uint256("0xa247b8665c7a0fec641c3785d2682c177ccb33c47468d17636e68a275cea2559"))
+            (     82138, uint256("0x8eb50d9366870f8348b5dc2482864ada68757835f58e422a8327b3298cbd8f26"))

Very nice. See, we're not all dicks here Cheesy
muddafudda
Legendary
*
Offline Offline

Activity: 1008
Merit: 1022



View Profile
August 26, 2013, 04:49:12 PM
 #6

Opps I am. Wrong checkpoint at 82050. 5 minutes.
muddafudda
Legendary
*
Offline Offline

Activity: 1008
Merit: 1022



View Profile
August 26, 2013, 05:05:58 PM
 #7

Source-http://www.mediafire.com/?m4iyzpu8vniamj8
Windows qt-http://www.mediafire.com/?azzv12whj28gjbl

Updated Links
Hydroponica (OP)
Full Member
***
Offline Offline

Activity: 182
Merit: 100


fml


View Profile
August 26, 2013, 05:13:15 PM
 #8

I'll test it out when I get home. Thanks Smiley

muddafudda
Legendary
*
Offline Offline

Activity: 1008
Merit: 1022



View Profile
August 26, 2013, 05:13:59 PM
 #9

If it's all good GIL to this address 783Gu7CkJGgpo4qx4ERCyc8bihLPosUHkF
minerapia
Full Member
***
Offline Offline

Activity: 168
Merit: 100


View Profile
August 26, 2013, 05:56:01 PM
Last edit: August 26, 2013, 06:20:58 PM by minerapia
 #10

Reason for the crosstalk actually is in the "magicnumber"  
Code:
unsigned char pchMessageStart[4] = { 0xfb, 0xc0, 0xb6, 0xdb };
You need to change this, but beware new and old clients cannot talk together after the change. so its compulsory update. ofc you can do it with changeover at nTime of nHeight but its lil more complicated.


meanwhile to prevent connections from litecoin network add this to line 2517 (main.cpp)
Code:
       if (pfrom->nStartingHeight > (Checkpoints::GetTotalBlocksEstimate() + 100000)){
            printf("pfrom->nStartingHeight > (Checkpoints::GetTotalBlocksEstimate() + 100000)\n");
            pfrom->fDisconnect = true;
            pfrom->Misbehaving(100);
            return false;
        }
This prevents ppl with blockheight with 100k+ compared to latest checkpoint from connecting.

also at main.h line 1589
If you change that 0401.....3a9 to your own publickey, you'll suppress all litecoin warnings + you can actually send warnings of your own.
(Im not totally sure if compressed pubkeys work, getting uncompressed one needs a lil hacking with forks of litecoin 0.6+)
Code:
       if (!key.SetPubKey(ParseHex("040184710fa689ad5023690c80f3a49c8f13f8d45b8c857fbcbc8bc4a8e4d3eb4b10f4d4604fa08dce601aaf0f470216fe1b51850b4acf21b179c45070ac7b03a9"))

muddafudda's code is good, tho problems could arise later if/when litecoin gets upgraded etc...
If you wanna do the magicnumber switchover smoothly pm me later or sommit.

Ill post my GIL address later Wink

donations -> btc: 1M6yf45NskQxWXknkMTzQ8o6wShQcSY4EC
                   ltc: LeTpCd6cQL26Q1vjc9kJrTjjFMrPhrpv6j
muddafudda
Legendary
*
Offline Offline

Activity: 1008
Merit: 1022



View Profile
August 26, 2013, 06:35:18 PM
 #11

Oh poo.

Good to see other ways to deal with it. Yes my option would need to be monitored in each update.
But the chance of litecoin going above 80003 in the near future is unlikely.

I change the public key when compiling new coins but was unsure whether there would be conflict. Good to know without trying:)
minerapia
Full Member
***
Offline Offline

Activity: 168
Merit: 100


View Profile
August 26, 2013, 06:54:18 PM
 #12

Yup, that pchmessagestart seems to get forgotten quite often, it actually defines the protocol message starts. Its also written in blockchain etc as block separator, so its kinda important if you dont want to get mixed with other coins.
btw, muddafudda, im willing to offer 50/50 regardless of what hydroponica decides Wink

donations -> btc: 1M6yf45NskQxWXknkMTzQ8o6wShQcSY4EC
                   ltc: LeTpCd6cQL26Q1vjc9kJrTjjFMrPhrpv6j
muddafudda
Legendary
*
Offline Offline

Activity: 1008
Merit: 1022



View Profile
August 26, 2013, 07:00:44 PM
 #13

Either or. All good.
jackjack
Legendary
*
Offline Offline

Activity: 1176
Merit: 1280


May Bitcoin be touched by his Noodly Appendage


View Profile
August 26, 2013, 07:06:02 PM
 #14

Yup, that pchmessagestart seems to get forgotten quite often, it actually defines the protocol message starts. Its also written in blockchain etc as block separator
WAT

Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2
Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
minerapia
Full Member
***
Offline Offline

Activity: 168
Merit: 100


View Profile
August 26, 2013, 07:18:46 PM
 #15

Yup, that pchmessagestart seems to get forgotten quite often, it actually defines the protocol message starts. Its also written in blockchain etc as block separator
WAT

YUUUUP
hexdump -n 300 -C blk0001.dat
if you wanna read a good comprehensive article about blockchain and other stuff around it
http://james.lab6.com/2012/01/12/bitcoin-285-bytes-that-changed-the-world/

Quote
"Notably, the magic network ID is not part of the block. It is used solely as a delimiter between blocks."

donations -> btc: 1M6yf45NskQxWXknkMTzQ8o6wShQcSY4EC
                   ltc: LeTpCd6cQL26Q1vjc9kJrTjjFMrPhrpv6j
jackjack
Legendary
*
Offline Offline

Activity: 1176
Merit: 1280


May Bitcoin be touched by his Noodly Appendage


View Profile
August 26, 2013, 07:29:36 PM
 #16

Yup, that pchmessagestart seems to get forgotten quite often, it actually defines the protocol message starts. Its also written in blockchain etc as block separator
WAT

YUUUUP
hexdump -n 300 -C blk0001.dat
if you wanna read a good comprehensive article about blockchain and other stuff around it
http://james.lab6.com/2012/01/12/bitcoin-285-bytes-that-changed-the-world/

Quote
"Notably, the magic network ID is not part of the block. It is used solely as a delimiter between blocks."
blk0001.dat is not part of the blockchain, it's only one of the files that one client, bitcoin-qt, uses to store it
The blockchain doesn't have such things as block delimiters, it's only a list of blocks

Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2
Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
Hydroponica (OP)
Full Member
***
Offline Offline

Activity: 182
Merit: 100


fml


View Profile
August 26, 2013, 07:46:40 PM
 #17

Devised a few extra steps, to get it working properly, but, Muddafudda, your client is working great.
Due to time constraints, I'll go with the quick, temporary fix, for now. I will intigrate the more perm solution, in a couple weeks, when my schedule settles down.
How ever you guys want to do the bounty, letme know, I'll pay it out

Hydroponica (OP)
Full Member
***
Offline Offline

Activity: 182
Merit: 100


fml


View Profile
August 26, 2013, 07:58:01 PM
 #18

lol, hydro has no idea how to fix it? check alphacoin's code, I guess it also fixed in GLD Grin Grin Grin

I knew about the magic numbers, and was fumbling through, trying to fix it, but, short on time, so, I decided to do the next best thing, pay for a solution Wink

muddafudda
Legendary
*
Offline Offline

Activity: 1008
Merit: 1022



View Profile
August 26, 2013, 08:00:24 PM
 #19

The chains tries to resync still. May need  to go a step further. Took a few hours.
Hydroponica (OP)
Full Member
***
Offline Offline

Activity: 182
Merit: 100


fml


View Profile
August 26, 2013, 08:02:52 PM
 #20

The chains tries to resync still. May need  to go a step furthe

I deleted the blockchain, and peers.dat and added banscore=1. That seems to have fixed it

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!