Pages:
Author

Topic: Fix GIL client. 20K GIL Bounty!! - page 2. (Read 2019 times)

full member
Activity: 182
Merit: 100
fml
August 26, 2013, 03:16:05 PM
#21
I'll run it overnight, and see what happens.
full member
Activity: 182
Merit: 100
fml
August 26, 2013, 03: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
legendary
Activity: 1008
Merit: 1022
August 26, 2013, 03:00:24 PM
#19
The chains tries to resync still. May need  to go a step further. Took a few hours.
full member
Activity: 182
Merit: 100
fml
August 26, 2013, 02: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
full member
Activity: 182
Merit: 100
fml
August 26, 2013, 02: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
legendary
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
August 26, 2013, 02: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
full member
Activity: 168
Merit: 100
August 26, 2013, 02: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."
legendary
Activity: 1176
Merit: 1280
May Bitcoin be touched by his Noodly Appendage
August 26, 2013, 02: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
legendary
Activity: 1008
Merit: 1022
August 26, 2013, 02:00:44 PM
#13
Either or. All good.
full member
Activity: 168
Merit: 100
August 26, 2013, 01: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
legendary
Activity: 1008
Merit: 1022
August 26, 2013, 01: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:)
full member
Activity: 168
Merit: 100
August 26, 2013, 12:56:01 PM
#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
legendary
Activity: 1008
Merit: 1022
August 26, 2013, 12:13:59 PM
#9
If it's all good GIL to this address 783Gu7CkJGgpo4qx4ERCyc8bihLPosUHkF
full member
Activity: 182
Merit: 100
fml
August 26, 2013, 12:13:15 PM
#8
I'll test it out when I get home. Thanks Smiley
legendary
Activity: 1008
Merit: 1022
August 26, 2013, 12:05:58 PM
#7
Source-http://www.mediafire.com/?m4iyzpu8vniamj8
Windows qt-http://www.mediafire.com/?azzv12whj28gjbl

Updated Links
legendary
Activity: 1008
Merit: 1022
August 26, 2013, 11:49:12 AM
#6
Opps I am. Wrong checkpoint at 82050. 5 minutes.
sr. member
Activity: 308
Merit: 250
August 26, 2013, 11:48:34 AM
#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
sr. member
Activity: 434
Merit: 250
August 26, 2013, 11:47:19 AM
#4
lol, hydro has no idea how to fix it? check alphacoin's code, I guess it also fixed in GLD Grin Grin Grin
legendary
Activity: 1008
Merit: 1022
August 26, 2013, 11:42:50 AM
#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"))
sr. member
Activity: 308
Merit: 250
August 26, 2013, 10:00:56 AM
#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.
Pages:
Jump to: