fran2k (OP)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
July 07, 2013, 10:31:54 PM Last edit: July 08, 2013, 12:06:00 AM by fran2k |
|
How we extract the new primes from the Primecoin Blockchain?
Someone understands how this research the coin does can be obtained, it's not clear for me from the Primecoin whitepaper.
|
|
|
|
Eli0t
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
July 07, 2013, 11:07:39 PM |
|
|
LTC: LKpJf3uk7KsHU73kxq8iFJrP1AAKN7Yni7 DGC: DKXGvEbj3Rwgrm2QQbRyNPDDZDYoq4Y44d XPM: AWV5AKfLFyoBaMjg9C77rGUBhuFxz5DGGL
|
|
|
fran2k (OP)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
July 07, 2013, 11:12:28 PM |
|
|
|
|
|
ahmed_bodi
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
July 07, 2013, 11:16:31 PM |
|
as i posted in the main thread the values there might be prime numbers generated however im not totally sure, ill check with sunny next time hes online though. If we do manage to figure it out, itll be added to the block explorer like that
|
Bitrated user: ahmedbodi.
|
|
|
Loktera
Newbie
Offline
Activity: 41
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
July 07, 2013, 11:45:23 PM |
|
It's XPM, XRP is Ripple.
|
|
|
|
fran2k (OP)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
July 08, 2013, 12:06:24 AM |
|
as i posted in the main thread the values there might be prime numbers generated however im not totally sure, ill check with sunny next time hes online though. If we do manage to figure it out, itll be added to the block explorer like that
Which variable means the prime number?
|
|
|
|
ahmed_bodi
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
July 08, 2013, 12:08:10 AM |
|
right ive talked to him, the 2 prime boxes that are on my explorer are used to calculate it
|
Bitrated user: ahmedbodi.
|
|
|
Sunny King
Legendary
Offline
Activity: 1205
Merit: 1010
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
July 08, 2013, 12:21:55 AM |
|
Quoted from my tutorial in main thread Primes Tutorial
To understand the primes stored in block chain, one should read my design paper regarding prime chains.
In the 'getblock' output, there is a 'primeorigin' field. This is the origin of prime chain described in design paper, from which you can derive the prime numbers in the chain.
Another field 'primechain' describe this primechain type and length:
1CC -> Cunningham chain of 1st kind 2CC -> Cunningham chain of 2nd kind TWN -> bi-twin chain
The length part consists of an integral length and a fractional length. The integral length is what we understand normally about chain length, the fractional part is a score system assigned to the prime chain in order to make difficulty adjustment continuous.
|
|
|
|
rethaw
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
July 08, 2013, 12:30:31 AM |
|
Quoted from primecoin genesis block: "primechain" : "TWN06.e0d80e", "primeorigin" : "8965952996020407064364391577136065268670542909213664815741310568010946895662880601479081230"
|
|
|
|
ahmed_bodi
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
July 08, 2013, 12:31:22 AM |
|
yeah ive got all that in my block explorer
just gotta figure out how to convert it into a prime number
EDIT:Anyone willing to provide me the code to convert those into a prime number for the block explorer, will get their name listed on the page for donations
|
Bitrated user: ahmedbodi.
|
|
|
fran2k (OP)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
July 08, 2013, 01:52:23 AM |
|
Quoted from primecoin genesis block: "primechain" : "TWN06.e0d80e", "primeorigin" : "8965952996020407064364391577136065268670542909213664815741310568010946895662880601479081230" "primeorigin" clearly isn't a prime. yeah ive got all that in my block explorer
just gotta figure out how to convert it into a prime number
EDIT:Anyone willing to provide me the code to convert those into a prime number for the block explorer, will get their name listed on the page for donations
I hope Sunny is releasing soon and updated whitepaper or more details, I don't understand why so much silence.
|
|
|
|
fran2k (OP)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
July 08, 2013, 01:53:00 AM |
|
Quoted from primecoin genesis block: "primechain" : "TWN06.e0d80e", "primeorigin" : "8965952996020407064364391577136065268670542909213664815741310568010946895662880601479081230" "primeorigin" clearly isn't a prime. yeah ive got all that in my block explorer
just gotta figure out how to convert it into a prime number
EDIT:Anyone willing to provide me the code to convert those into a prime number for the block explorer, will get their name listed on the page for donations
I hope Sunny is releasing soon an updated whitepaper or more details, I don't understand why so much silence.
|
|
|
|
Sunny King
Legendary
Offline
Activity: 1205
Merit: 1010
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
July 08, 2013, 02:39:39 AM |
|
origin is explained in design paper ![Wink](https://bitcointalk.org/Smileys/default/wink.gif)
|
|
|
|
rethaw
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
July 08, 2013, 02:47:27 AM Last edit: July 08, 2013, 04:41:39 AM by rethaw |
|
yeah ive got all that in my block explorer
just gotta figure out how to convert it into a prime number
EDIT:Anyone willing to provide me the code to convert those into a prime number for the block explorer, will get their name listed on the page for donations
This is a bitwin chain. Both n-1 and n+1 are prime, as well as 2n-1 and 2n+1. This chain is 6 long, so if I understand correctly: p === primeorigin p1 = p + 1 p2 = p - 1 p3 = p * 2 + 1 p4 = p * 2 - 1 p5 = p * 4 + 1 p6 = p * 4 - 1 and so on. In python: def primeChain(origin, length): primes = [] for i in range(length / 2): primes.append(p * pow(2,i) + 1) primes.append(p * pow(2, i) - 1) return primes
primeChain(8965952996020407064364391577136065268670542909213664815741310568010946895662880601479081230, 6)
Or as a list comprehension: primes = [[p * pow(2,i/2) + 1, p * pow(2,i/2) - 1] for i in range(length)]
Gives: - 8965952996020407064364391577136065268670542909213664815741310568010946895662880 601479081231
- 8965952996020407064364391577136065268670542909213664815741310568010946895662880 601479081229
- 1793190599204081412872878315427213053734108581842732963148262113602189379132576 1202958162461
- 1793190599204081412872878315427213053734108581842732963148262113602189379132576 1202958162459
- 3586381198408162825745756630854426107468217163685465926296524227204378758265152 2405916324921
- 3586381198408162825745756630854426107468217163685465926296524227204378758265152 2405916324919
See for yourself! And happy priming, I still haven't found a block :/ EDIT: added code snippet EDIT: helpful or interesting? send primecoins ASxa5AHJFHnpr47BMwKEZ4zksK57AJT6FT
|
|
|
|
claycoins
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
July 08, 2013, 02:49:43 AM |
|
as far as I can tell the generation of prime numbers is just a replacement for the proof of work, it is not meant to try and generate new prime numbers that have yet to be discovered.
|
|
|
|
rethaw
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
July 08, 2013, 03:27:52 AM |
|
as far as I can tell the generation of prime numbers is just a replacement for the proof of work, it is not meant to try and generate new prime numbers that have yet to be discovered.
It is conjectured that there are arbitrarily long prime chains. Primecoin is exploring this territory.
|
|
|
|
coinerd
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
July 08, 2013, 03:34:33 AM |
|
just gotta figure out how to convert it into a prime number
There is no "prime number". It appears the proof of work certificate is evidence that you identified a "prime chain" of acceptable type which is divisible by the block header hash. How we extract the new primes from the Primecoin Blockchain?
Someone understands how this research the coin does can be obtained, it's not clear for me from the Primecoin whitepaper.
This is not research. It's just busy work. I hope Sunny is releasing soon an updated whitepaper or more details, I don't understand why so much silence.
The real explanation for this coin is on the PPCoin forums ... In a few years that chart would have many different types of proof-of-work, bitcoin's mining share would be further reduced. This means the relative security against 51% attack is going to be weakened for each pure proof-of-work cryptocurrency.
Primecoin may help speed up this process, taking a significant piece of mining market while attracting a larger user base to both primecoin and ppcoin. I believe it could strengthen our positioning against litecoin and other potential competitions.
http://www.ppcointalk.org/index.php?topic=288.msg1557#msg1557The confusion surrounding the coin is very helpful to the goal, I think. Acting mysterious doesn't hurt any either. If there was scientific value to it he would be proud and careful to explain it clearly...
|
|
|
|
Petr1fied
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
July 08, 2013, 04:38:19 PM |
|
yeah ive got all that in my block explorer
just gotta figure out how to convert it into a prime number
EDIT:Anyone willing to provide me the code to convert those into a prime number for the block explorer, will get their name listed on the page for donations
This is a bitwin chain. Both n-1 and n+1 are prime, as well as 2n-1 and 2n+1. This chain is 6 long, so if I understand correctly: p === primeorigin p1 = p + 1 p2 = p - 1 p3 = p * 2 + 1 p4 = p * 2 - 1 p5 = p * 4 + 1 p6 = p * 4 - 1 and so on. In python: def primeChain(origin, length): primes = [] for i in range(length / 2): primes.append(p * pow(2,i) + 1) primes.append(p * pow(2, i) - 1) return primes
primeChain(8965952996020407064364391577136065268670542909213664815741310568010946895662880601479081230, 6)
Or as a list comprehension: primes = [[p * pow(2,i/2) + 1, p * pow(2,i/2) - 1] for i in range(length)]
Gives: - 8965952996020407064364391577136065268670542909213664815741310568010946895662880 601479081231
- 8965952996020407064364391577136065268670542909213664815741310568010946895662880 601479081229
- 1793190599204081412872878315427213053734108581842732963148262113602189379132576 1202958162461
- 1793190599204081412872878315427213053734108581842732963148262113602189379132576 1202958162459
- 3586381198408162825745756630854426107468217163685465926296524227204378758265152 2405916324921
- 3586381198408162825745756630854426107468217163685465926296524227204378758265152 2405916324919
See for yourself! And happy priming, I still haven't found a block :/ EDIT: added code snippet EDIT: helpful or interesting? send primecoins ASxa5AHJFHnpr47BMwKEZ4zksK57AJT6FT Any idea how this works in relation to the 1CC and 2CC versions. It's my understanding that 1CC should use: ((previous number * 2) + 1) And 2CC should use: ((previous number * 2) - 1) But it doesn't seem to work. Take for example block 2003: Prime Chain: 1CC08.339b77 Prime Origin: 9615572543071231184837168360004814554467140239322370722813195196221920358459324 7487894105484172550 [0] => Array ( [number] => 192311450861424623696743367200096291089342804786447414456263903924438407169186494975788210968345101 [score] => 0 )
[1] => Array ( [number] => 384622901722849247393486734400192582178685609572894828912527807848876814338372989951576421936690203 [score] => 0 )
[2] => Array ( [number] => 769245803445698494786973468800385164357371219145789657825055615697753628676745979903152843873380407 [score] => 0 )
[3] => Array ( [number] => 1538491606891396989573946937600770328714742438291579315650111231395507257353491959806305687746760815 [score] => 0 )
[4] => Array ( [number] => 3076983213782793979147893875201540657429484876583158631300222462791014514706983919612611375493521631 [score] => 0 )
[5] => Array ( [number] => 6153966427565587958295787750403081314858969753166317262600444925582029029413967839225222750987043263 [score] => 0 )
[6] => Array ( [number] => 12307932855131175916591575500806162629717939506332634525200889851164058058827935678450445501974086527 [score] => 0 )
[7] => Array ( [number] => 24615865710262351833183151001612325259435879012665269050401779702328116117655871356900891003948173055 [score] => 0 ) NOTE: score is the result of the php function gmp_prob_prime() which seems to be pretty reliable for outputting 1 for the correct numbers in the bitwin results. This can be important when there are an odd number of primes in the chain. ![Wink](https://bitcointalk.org/Smileys/default/wink.gif) Any idea where I'm going wrong here?
|
|
|
|
Sunny King
Legendary
Offline
Activity: 1205
Merit: 1010
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
July 08, 2013, 04:44:29 PM |
|
1CC is the chain below center numbers, 2CC is the chain above center numbers.
So you should substract 1 from the center numbers (keep doubling from origin) for 1CC.
|
|
|
|
rethaw
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
July 08, 2013, 05:02:08 PM |
|
1CC is the chain below center numbers, 2CC is the chain above center numbers.
So you should substract 1 from the center numbers (keep doubling from origin) for 1CC.
http://en.wikipedia.org/wiki/Cunningham_chainIf I'm reading this correctly its actually the other way around. Cunningham Chain of the first type: ![](https://ip.bitcointalk.org/?u=http%3A%2F%2Fupload.wikimedia.org%2Fmath%2Fc%2Fe%2F2%2Fce25bf0879e3ac9c8a197dc98a8be828.png&t=665&c=QXdN9Y0fuGm2Vg)
|
|
|
|
|