Pt0x


July 25, 2013, 04:53:24 AM 

Four desktops found nothing for 3 days. Does the Primecoin client support pool mining now? thx
Only one pool exists for now: http://ypool.net/Looks odd to me

BTC: 17sz6AoYVpwXjaStmnVCsGTufUhvrAMhTw





Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.




8bitPunk
Member
Offline
Activity: 70
Merit: 10


July 25, 2013, 05:49:24 AM 

I might have found a bug in hp7. I copied the hp7 code over to Reaper, and found some weird behavior. I noticed that many shares/blocks it found, had a difficulty with a fractional part of 0.
Function: FermatProbablePrimalityTestFast. It does a Fermat test, and if it fails, it calculates the fractional part. However, there's a fast division test before the Fermat test. If the fast division test is succesful, the function is returned from and the fractional part isn't calculated. If it just happened to be the last number in a chain, the fractional part isn't calculated and is left at 0. This means if the difficulty is for example 6.2, and the miner found a block of difficulty 6.3, it's possible that the fractional part was left uncalculated, and the miner thinks it's difficulty 6.0. The block doesn't get submitted and lots of profit has been lost.
The same applies to EulerLagrangeLifchitzPrimalityTestFast.
Right now I don't have git set up, I can't submit a patch.
Is this the specific change that causes the bug you are referring to: https://bitbucket.org/mikaelh/primecoinhp/commits/64528eba386c948e4e63d50b9eb6c1a500bac4ca ? Here's the original comment explaining why it should work: https://bitcointalk.org/index.php?topic=255782.msg2787426#msg2787426What are your thoughts? mtrlt replied that this commit is not what he was referring to, and the commit is after the hp7 tag which mtrlt pulled into his project. I believe he is referring to the code below  which appears around lines 556 & 606: if (lRemainder % vPrimes[nPrimeSeq] == 0) return false; This code returns false without first calculating the fractional part, exactly as mtrlt explained. I'm testing a fix and will let mikaelh know if it works.

BTC 18bPunkuginRBm1Xz9mcgj8mWJnHDAW5Th  Ł LTCgXEdyBdoQ9WdF6JHi7Pa2EWtzbDjG76  Ψ ATEBiTLkLpAYeW5hQknUfSvnb7Abbgegku



maco


July 25, 2013, 05:50:36 AM 

+1 8bitPunk I might have found a bug in hp7. I copied the hp7 code over to Reaper, and found some weird behavior. I noticed that many shares/blocks it found, had a difficulty with a fractional part of 0.
Function: FermatProbablePrimalityTestFast. It does a Fermat test, and if it fails, it calculates the fractional part. However, there's a fast division test before the Fermat test. If the fast division test is succesful, the function is returned from and the fractional part isn't calculated. If it just happened to be the last number in a chain, the fractional part isn't calculated and is left at 0. This means if the difficulty is for example 6.2, and the miner found a block of difficulty 6.3, it's possible that the fractional part was left uncalculated, and the miner thinks it's difficulty 6.0. The block doesn't get submitted and lots of profit has been lost.
The same applies to EulerLagrangeLifchitzPrimalityTestFast.
Right now I don't have git set up, I can't submit a patch.
Is this the specific change that causes the bug you are referring to: https://bitbucket.org/mikaelh/primecoinhp/commits/64528eba386c948e4e63d50b9eb6c1a500bac4ca ? Here's the original comment explaining why it should work: https://bitcointalk.org/index.php?topic=255782.msg2787426#msg2787426What are your thoughts? mtrlt replied that this commit is not what he was referring to, and the commit is after the hp7 tag which mtrlt pulled into his project. I believe he is referring to the code below  which appears around lines 556 & 606: if (lRemainder % vPrimes[nPrimeSeq] == 0) return false; This code returns false without first calculating the fractional part, exactly as mtrlt explained. I'm testing a fix and will let mikaelh know if it works.




Foamy
Member
Offline
Activity: 96
Merit: 10


July 25, 2013, 07:40:35 AM 

Four desktops found nothing for 3 days. Does the Primecoin client support pool mining now? thx
Only one pool exists for now: http://ypool.net/Looks odd to me I'm sure it took some hard work to be the first pool.




mikaelh


July 25, 2013, 07:51:51 AM 

I might have found a bug in hp7. I copied the hp7 code over to Reaper, and found some weird behavior. I noticed that many shares/blocks it found, had a difficulty with a fractional part of 0.
Function: FermatProbablePrimalityTestFast. It does a Fermat test, and if it fails, it calculates the fractional part. However, there's a fast division test before the Fermat test. If the fast division test is succesful, the function is returned from and the fractional part isn't calculated. If it just happened to be the last number in a chain, the fractional part isn't calculated and is left at 0. This means if the difficulty is for example 6.2, and the miner found a block of difficulty 6.3, it's possible that the fractional part was left uncalculated, and the miner thinks it's difficulty 6.0. The block doesn't get submitted and lots of profit has been lost.
The same applies to EulerLagrangeLifchitzPrimalityTestFast.
Right now I don't have git set up, I can't submit a patch.
Good catch! Letting that one slip was definitely a big oversight on my part. I pushed my own fix to bitbucket just now. I don't have time to do a release right now so it'll have to wait for a bit. In the meantime the fix is up there for testing.




Vannicke
Member
Offline
Activity: 95
Merit: 10
That guy, you know, with the face


July 25, 2013, 09:05:21 AM 

Does this mean that people with hp7 that find blocks are effectively at difficulty 10?
That would certainly explain my long dryspell...

The Satoshi Jar: 16t2BLGZyaMpGm3vzYWxucGz8g4bVotr1h



K1773R
Legendary
Offline
Activity: 1792
Merit: 1008
/dev/null


July 25, 2013, 09:10:04 AM 

Does this mean that people with hp7 that find blocks are effectively at difficulty 10?
That would certainly explain my long dryspell...
yes




Tamis


July 25, 2013, 09:23:37 AM 

That indeed explains a lot ! 96 hours without a block...
I'm thinking about all those that are paying a fortune for vps and were mining at difficulty = 10




arnuschky


July 25, 2013, 10:11:01 AM 

@mikaelh: Why not merge your code with Sunny King's? He stated that it's due to licensing problems with libgmp (can't find the source), but I think that this is wrong. libgmp is LGPL, not GPL, and can therefore be used even in closedsource projects provided that you link to it only dynamically. Which primecoind does, so you would be fine even if primecoin would be closedsource.




mikaelh


July 25, 2013, 10:25:19 AM 

@mikaelh: Why not merge your code with Sunny King's? He stated that it's due to licensing problems with libgmp (can't find the source), but I think that this is wrong. libgmp is LGPL, not GPL, and can therefore be used even in closedsource projects provided that you link to it only dynamically. Which primecoind does, so you would be fine even if primecoin would be closedsource.
Well, technically my Windows builds have been using static linking. It can be changed to dynamic linking. x86 will take a minor performance hit from that but x64 should be fine. Even if the licensing concerns are solved through dynamic linking, it's still Sunny King's call whether he wants the code or not.




cryptrol


July 25, 2013, 10:38:47 AM 

I am currently testing the latest commits, it seems that the PPS indicator is very low compared to the value before, more than halved my numbers and chainspermin is 0 mostly all the time. I will keep on testing, meanwhile, is anybody else testing the CURRENT version and seeing the same results out there ?




mikaelh


July 25, 2013, 11:08:16 AM 

I am currently testing the latest commits, it seems that the PPS indicator is very low compared to the value before, more than halved my numbers and chainspermin is 0 mostly all the time. I will keep on testing, meanwhile, is anybody else testing the CURRENT version and seeing the same results out there ?
Can you post more information about your system and the which exact versions you are comparing?




wetroof
Member
Offline
Activity: 75
Merit: 10


July 25, 2013, 11:20:35 AM 

thanks for all the work mikaelh, I will send some XPC tomorrow because I've been using your miner. I compiled with your latest updates and will see how many blocks I solved in a while...
I do not understand primecoin that well at the moment, the problem with v7 would that be reflected in primemeter stats in the debug file, does anyone know?
BTW the measurements on the primemeter lines are about the same I think for compiled with recent commits from bitbucket vs v7. . the numbers are "per hour" but fluctuate a lot which doesn't make sense really.
i
NEW 20130725 11:00:44 primemeter 11620189 prime/h 99396927 test/h 480 5chains/h 20130725 11:01:44 primemeter 8731912 prime/h 73598147 test/h 300 5chains/h 20130725 11:03:26 primemeter 6473749 prime/h 53716243 test/h 420 5chains/h 20130725 11:04:26 primemeter 11358263 prime/h 94857756 test/h 360 5chains/h 20130725 11:05:26 primemeter 10517945 prime/h 86684575 test/h 540 5chains/h 20130725 11:06:26 primemeter 6861122 prime/h 56816904 test/h 300 5chains/h 20130725 11:07:26 primemeter 7530512 prime/h 62189498 test/h 480 5chains/h 20130725 11:08:26 primemeter 11711653 prime/h 97222796 test/h 480 5chains/h 20130725 11:09:26 primemeter 10724171 prime/h 91132990 test/h 600 5chains/h 20130725 11:10:26 primemeter 10896501 prime/h 95608657 test/h 540 5chains/h 20130725 11:11:26 primemeter 11080172 prime/h 92579202 test/h 660 5chains/h 20130725 11:12:26 primemeter 10947355 prime/h 90129236 test/h 900 5chains/h 20130725 11:13:26 primemeter 10639445 prime/h 87377427 test/h 600 5chains/h 20130725 11:14:26 primemeter 11264090 prime/h 94878948 test/h 360 5chains/h 20130725 11:15:26 primemeter 11257125 prime/h 93178274 test/h 420 5chains/h 20130725 11:16:26 primemeter 10974868 prime/h 93342587 test/h 540 5chains/h 20130725 11:17:26 primemeter 10785060 prime/h 94334568 test/h 720 5chains/h 20130725 11:18:26 primemeter 9667875 prime/h 83818672 test/h 420 5chains/h 20130725 11:19:26 primemeter 11297512 prime/h 96529571 test/h 540 5chains/h 20130725 11:20:26 primemeter 11927047 prime/h 101064994 test/h 480 5chains/h 20130725 11:21:26 primemeter 11032266 prime/h 96171180 test/h 480 5chains/h 20130725 11:22:26 primemeter 10354207 prime/h 89454202 test/h 480 5chains/h 20130725 11:23:26 primemeter 11900447 prime/h 102212426 test/h 540 5chains/h 20130725 11:24:26 primemeter 11404850 prime/h 98671475 test/h 480 5chains/h 20130725 11:25:26 primemeter 9602519 prime/h 84853689 test/h 300 5chains/h 20130725 11:26:26 primemeter 9281489 prime/h 78998684 test/h 360 5chains/h 20130725 11:27:26 primemeter 8884255 prime/h 75387586 test/h 240 5chains/h
V7
20130725 11:00:14 primemeter 12709168 prime/h 102728788 test/h 420 5chains/h 20130725 11:01:14 primemeter 12230125 prime/h 96631178 test/h 480 5chains/h 20130725 11:02:14 primemeter 9534801 prime/h 74242523 test/h 720 5chains/h 20130725 11:03:14 primemeter 11987920 prime/h 97475875 test/h 360 5chains/h 20130725 11:04:14 primemeter 12769249 prime/h 104281388 test/h 360 5chains/h 20130725 11:05:14 primemeter 12493744 prime/h 99081597 test/h 660 5chains/h 20130725 11:06:14 primemeter 11579987 prime/h 96437593 test/h 420 5chains/h 20130725 11:07:14 primemeter 12332598 prime/h 98128858 test/h 660 5chains/h 20130725 11:08:14 primemeter 11683786 prime/h 95558717 test/h 480 5chains/h 20130725 11:09:14 primemeter 8767002 prime/h 70311084 test/h 420 5chains/h 20130725 11:10:14 primemeter 12229069 prime/h 97593820 test/h 780 5chains/h 20130725 11:11:14 primemeter 12784167 prime/h 102993623 test/h 840 5chains/h 20130725 11:12:14 primemeter 11273512 prime/h 90101818 test/h 1020 5chains/h 20130725 11:13:14 primemeter 9378264 prime/h 75669719 test/h 180 5chains/h 20130725 11:14:14 primemeter 11606913 prime/h 97411733 test/h 420 5chains/h 20130725 11:15:14 primemeter 11406520 prime/h 94552468 test/h 480 5chains/h 20130725 11:16:14 primemeter 13122741 prime/h 106142671 test/h 600 5chains/h 20130725 11:17:14 primemeter 13195040 prime/h 106230149 test/h 660 5chains/h 20130725 11:18:14 primemeter 11849023 prime/h 96649509 test/h 660 5chains/h 20130725 11:19:14 primemeter 13291085 prime/h 106534624 test/h 660 5chains/h 20130725 11:20:14 primemeter 12262307 prime/h 97869387 test/h 540 5chains/h 20130725 11:21:14 primemeter 12022898 prime/h 97095967 test/h 240 5chains/h 20130725 11:22:14 primemeter 10369642 prime/h 82206150 test/h 420 5chains/h 20130725 11:23:14 primemeter 13693115 prime/h 109174861 test/h 300 5chains/h 20130725 11:24:14 primemeter 9506542 prime/h 78578050 test/h 360 5chains/h 20130725 11:25:14 primemeter 8806506 prime/h 72187974 test/h 240 5chains/h 20130725 11:26:14 primemeter 5864129 prime/h 45733931 test/h 300 5chains/h




mikaelh


July 25, 2013, 11:29:34 AM 

I do not understand primecoin that well at the moment, the problem with v7 would that be reflected in primemeter stats in the debug file, does anyone know?
No, it won't show up in primes/sec or chains/min. I'm guessing it's reducing block rate by about 20%.




wetroof
Member
Offline
Activity: 75
Merit: 10


July 25, 2013, 11:35:36 AM 

ah  thanks for your answer . 20% seems about right to me from the blocks I solved with v7 vs v5. I had about half my instances on v5 and half on v7. edit: NVM I understand the debug file and why it fluctuates. the stats are calculated based on last 60 seconds of mining, then multiplied by 60 to get per hour.




kendog77


July 25, 2013, 12:07:16 PM 

I do not understand primecoin that well at the moment, the problem with v7 would that be reflected in primemeter stats in the debug file, does anyone know?
No, it won't show up in primes/sec or chains/min. I'm guessing it's reducing block rate by about 20%. Is this only a problem in hp7? If it is, I assume that most folks would be better off by going back to hp6.




juhakall


July 25, 2013, 12:08:53 PM 

ah  thanks for your answer . 20% seems about right to me from the blocks I solved with v7 vs v5. I had about half my instances on v5 and half on v7. edit: NVM I understand the debug file and why it fluctuates. the stats are calculated based on last 60 seconds of mining, then multiplied by 60 to get per hour. I really wish it was averaged over a longer period, now I have to monitor the average with a shell script.




mikaelh


July 25, 2013, 12:12:09 PM 

I do not understand primecoin that well at the moment, the problem with v7 would that be reflected in primemeter stats in the debug file, does anyone know?
No, it won't show up in primes/sec or chains/min. I'm guessing it's reducing block rate by about 20%. Is this only a problem in hp7? If it is, I assume that most folks would be better off by going back to hp6. HP6 is also affected.




OnkelPaul
Legendary
Offline
Activity: 1044
Merit: 1000


July 25, 2013, 12:16:21 PM 

ah  thanks for your answer . 20% seems about right to me from the blocks I solved with v7 vs v5. I had about half my instances on v5 and half on v7. edit: NVM I understand the debug file and why it fluctuates. the stats are calculated based on last 60 seconds of mining, then multiplied by 60 to get per hour. I really wish it was averaged over a longer period, now I have to monitor the average with a shell script. Use the source, Luke! (it's open source, you know...)Changing the code to compute a sliding average over the last half hour or so should be a bit easier than implementing a faster prime finding algorithm :) Onkel Paul




itod
Legendary
Offline
Activity: 1358
Merit: 1013
^ Will code for Bitcoins


July 25, 2013, 12:17:13 PM 

@mikaelh: Why not merge your code with Sunny King's? He stated that it's due to licensing problems with libgmp (can't find the source), but I think that this is wrong. libgmp is LGPL, not GPL, and can therefore be used even in closedsource projects provided that you link to it only dynamically. Which primecoind does, so you would be fine even if primecoin would be closedsource.
Well, technically my Windows builds have been using static linking. It can be changed to dynamic linking. x86 will take a minor performance hit from that but x64 should be fine. Even if the licensing concerns are solved through dynamic linking, it's still Sunny King's call whether he wants the code or not. +1 for merging code, hope Sunny King will make clear where he stands on this one. It's not normal that wast majority of miners ignore the official version, not to mention the security issues. The problem few days ago had to wait for mikaelh to wake up for solution to be implemented networkwide, is that what Sunny King wants? It certainly doesn't add to confidence in XPM. Also it will give mikaelh recognition for his work on this coin, I hope Sunny King agrees with that.




