Bitcoin Forum
April 25, 2024, 03:00:53 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 »  All
  Print  
Author Topic: [XRM] So... How we extract the new primes from the Primecoin Blockchain?  (Read 2788 times)
fran2k (OP)
Hero Member
*****
Offline Offline

Activity: 784
Merit: 500


View Profile WWW
July 07, 2013, 10:31:54 PM
Last edit: July 08, 2013, 12:06:00 AM by fran2k
 #1

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.
1714057253
Hero Member
*
Offline Offline

Posts: 1714057253

View Profile Personal Message (Offline)

Ignore
1714057253
Reply with quote  #2

1714057253
Report to moderator
1714057253
Hero Member
*
Offline Offline

Posts: 1714057253

View Profile Personal Message (Offline)

Ignore
1714057253
Reply with quote  #2

1714057253
Report to moderator
1714057253
Hero Member
*
Offline Offline

Posts: 1714057253

View Profile Personal Message (Offline)

Ignore
1714057253
Reply with quote  #2

1714057253
Report to moderator
The trust scores you see are subjective; they will change depending on who you have in your trust list.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714057253
Hero Member
*
Offline Offline

Posts: 1714057253

View Profile Personal Message (Offline)

Ignore
1714057253
Reply with quote  #2

1714057253
Report to moderator
1714057253
Hero Member
*
Offline Offline

Posts: 1714057253

View Profile Personal Message (Offline)

Ignore
1714057253
Reply with quote  #2

1714057253
Report to moderator
1714057253
Hero Member
*
Offline Offline

Posts: 1714057253

View Profile Personal Message (Offline)

Ignore
1714057253
Reply with quote  #2

1714057253
Report to moderator
Eli0t
Sr. Member
****
Offline Offline

Activity: 252
Merit: 250


View Profile
July 07, 2013, 11:07:39 PM
 #2

try this http://www2.crypto-expert.com/primecoin/index.php?block_hash=0ce7113c421bb5f9c046b23598cd2c5e1f9b03cb4d2182ce78a2eba11f4712f1

LTC:  LKpJf3uk7KsHU73kxq8iFJrP1AAKN7Yni7  DGC:  DKXGvEbj3Rwgrm2QQbRyNPDDZDYoq4Y44d  XPM:  AWV5AKfLFyoBaMjg9C77rGUBhuFxz5DGGL
fran2k (OP)
Hero Member
*****
Offline Offline

Activity: 784
Merit: 500


View Profile WWW
July 07, 2013, 11:12:28 PM
 #3


So?
ahmed_bodi
Hero Member
*****
Offline Offline

Activity: 518
Merit: 500

Bitrated user: ahmedbodi.


View Profile
July 07, 2013, 11:16:31 PM
 #4

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 Offline

Activity: 41
Merit: 0



View Profile
July 07, 2013, 11:45:23 PM
 #5

It's XPM, XRP is Ripple.
fran2k (OP)
Hero Member
*****
Offline Offline

Activity: 784
Merit: 500


View Profile WWW
July 08, 2013, 12:06:24 AM
 #6

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
Hero Member
*****
Offline Offline

Activity: 518
Merit: 500

Bitrated user: ahmedbodi.


View Profile
July 08, 2013, 12:08:10 AM
 #7

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 Offline

Activity: 1205
Merit: 1010



View Profile WWW
July 08, 2013, 12:21:55 AM
 #8

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
Sr. Member
****
Offline Offline

Activity: 378
Merit: 255



View Profile
July 08, 2013, 12:30:31 AM
 #9

Quoted from primecoin genesis block:

Code:
    "primechain" : "TWN06.e0d80e",
    "primeorigin" : "8965952996020407064364391577136065268670542909213664815741310568010946895662880601479081230"

ahmed_bodi
Hero Member
*****
Offline Offline

Activity: 518
Merit: 500

Bitrated user: ahmedbodi.


View Profile
July 08, 2013, 12:31:22 AM
 #10

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)
Hero Member
*****
Offline Offline

Activity: 784
Merit: 500


View Profile WWW
July 08, 2013, 01:52:23 AM
 #11

Quoted from primecoin genesis block:

Code:
    "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)
Hero Member
*****
Offline Offline

Activity: 784
Merit: 500


View Profile WWW
July 08, 2013, 01:53:00 AM
 #12

Quoted from primecoin genesis block:

Code:
    "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 Offline

Activity: 1205
Merit: 1010



View Profile WWW
July 08, 2013, 02:39:39 AM
 #13

origin is explained in design paper  Wink
rethaw
Sr. Member
****
Offline Offline

Activity: 378
Merit: 255



View Profile
July 08, 2013, 02:47:27 AM
Last edit: July 08, 2013, 04:41:39 AM by rethaw
 #14

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:

Code:
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:

Code:
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
Hero Member
*****
Offline Offline

Activity: 518
Merit: 500



View Profile
July 08, 2013, 02:49:43 AM
 #15

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
Sr. Member
****
Offline Offline

Activity: 378
Merit: 255



View Profile
July 08, 2013, 03:27:52 AM
 #16

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
Full Member
***
Offline Offline

Activity: 196
Merit: 100


View Profile
July 08, 2013, 03:34:33 AM
 #17


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 ...

Quote from: Sunny King
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#msg1557

The 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
Hero Member
*****
Offline Offline

Activity: 630
Merit: 502


View Profile
July 08, 2013, 04:38:19 PM
 #18

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:

Code:
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:

Code:
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

Code:
    [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

Any idea where I'm going wrong here?
Sunny King
Legendary
*
Offline Offline

Activity: 1205
Merit: 1010



View Profile WWW
July 08, 2013, 04:44:29 PM
 #19

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
Sr. Member
****
Offline Offline

Activity: 378
Merit: 255



View Profile
July 08, 2013, 05:02:08 PM
 #20

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_chain

If I'm reading this correctly its actually the other way around.

Cunningham Chain of the first type:


Pages: [1] 2 »  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!