Source code: GitHub
Windows and Linux binaries: Linux, 32 and 64 bit binaries. Windows 32 bit binaries.
Source code: GitHub
Binaries 3.0.0: Windows and Linux, 32 and 64 bit binaries. All 4 combinations.
Binaries 3.1.1: Windows 64 bit binaries
Blocks every 2.5 minutes
Block reward of 50RIC, halving every 840000 (about 4 years)
Cap: about 84 million RIC
PoW: custom, prime constellations
Difficulty adjustments every 288 blocks (targeted every 12hs)
RPC port 28332, or 38332 for testnet
P2P port 28333, or 38333 for testnet
It is very important for the success of any new cryptocurrency for everybody to have fair access to mining at the beginning, and the launch should be as transparent as possible. The incentive to early adopters should be the expectation that the price will go up, and the fact that it's easier to mine at the beginning, but without generating an unfair distribution where anyone gets more than the expected minting of 50RICs every 2.5 minutes.
Source code and binaries for the Windows and Linux clients will be provided at launch time. There will be no premine.
Since this is a new PoW, it is very hard to define a starting difficulty that avoids instamining. To overcome this and contribute to a fair launch, the first 576 blocks will have no reward and the next 576 will linearly increase and reach the full reward at block 1152, after 4 difficulty adjustments were performed. Besides avoiding instamining, this should allow time for those who want to compile their own clients.
Expect the starting difficulty to be hard.
Source code will be provided a few days before launch, but the PoW functions will be replaced by stubs. The idea is that everyone would be able to examine the code and confirm that there's nothing strange and it is indeed pretty similar to bitcoin's. Everyone would be able to compile it, see if they have the correct dependencies, etc, but it won't run. At launch time, when the final code is released, everyone could easily check that the only thing that changed is the PoW code, so you'd only have to check the diff of a few lines of code and recompile.
Riecoin is a decentralized (p2p), open source digital currency. It allows to transfer money to anywhere in the world with only minimum transaction fees, sometimes even for free (depending on many factors like the amount to transfer and the network load at the moment of the transaction). It is a fork of the Bitcoin project.
The name "Riecoin" pays homage to Bernhard Riemann, whose work generated new ways of studying the distribution of prime numbers and is referenced in the math of Riecoin. It also pays homage to Bitcoin, the cryptocurrency that started them all.
For more info, visit bitcoin.org
The process of money creation in Bitcoin - referred to as mining - involves executing software that utilizes your hardware running sha256 hashes until a certain criterion is met. This part of the mining process is called generating a "Proof of work". The whole mining process also has a critical role in processing transactions and providing security to the network. It is estimated that all the processing power devoted to Bitcoin mining represents more computing power than several of the largest supercomputers in the world combined. Wouldn't it be great to be able to use all that massive power for something else?
Even special purpose hardware was designed for Bitcoin mining. Some consider this a waste of resources, while others argue that supporting a decentralized currency is hardly a waste. We believe that the mining process required for currency to work does not need to include hashing functions as a Proof of Work, and that a "more useful" calculation can be done instead.
That's the point of Riecoin: the mining process, besides fulfilling its function to the operation of the network, generates series of prime numbers as a by-product. This prime numbers are of interest to mathematicians and the scientific community. Riecoin is proof that it is possible to effectively harness all that massive computing power to something useful other than hashing functions.
Finding a prime number p takes O( log(p) ^ 4 ) work, while verifying if it's prime requires O( log(p) ^ 3 ) using the Rabin-Miller test. That's not much difference, so finding prime numbers is not practical for a PoW.
One possible solution for this is looking for prime number constellations (like twin prime numbers, or triplets, etc), that is n "consecutive" prime numbers. Consecutive in this case means that they are grouped as closely as possible minimizing the distance between the first and the last one. This takes O( log(p) ^ (n + 3) ), while verification still takes the cube of the log. This allows us to make the generation arbitrarily more difficult than the verification.
Difficulty can be adjusted by changing the length of the prime numbers. Riecoin currently uses constellations of size 6 (also known as prime sextuplets) which have the form p, p+4, p+6, p+10, p+12, p+16. So each block represents six prime numbers.
Let S be the sha256 of the first part of the block header (the nonce is not needed).
In binary, let basep be an 1 concatenated with eight 0's, concatenated with S, concatenated with as many 0's as needed to reach the required difficulty. Let Z be that quantity of 0's.
Find X such that basep + X is the first prime of a prime constellation of size n, where n is hardcoded at 6. The value of X should not be larger than 2^Z: this last restriction removes any chance of using the same actual constellation as PoW for more than one block.
Since S and basep can be calculated from the block header up to the time field, only X needs to be stored in place of the usual nonce.
PoW verification is done using Rabin-Miller primality tests. The intention of the eight 0's before the hash is to minimize the influence that the value of the hash can have on the difficulty of finding a sextuplet.
You can use the built-in miner using the classic "setgenerate true", or (preferred) you can use the external cpu-miner rminerd, fork of Pooler's cpu-miner.
At the moment only a CPU miner exists, but I'm sure a miner that makes use of the GPU will eventually be released.
Having shares simply be blocks with lower difficulty does not work for pooled mining. Finding a prime sextuplet with small primes is not helpful towards the general goal of finding one with the network's required size.
So the way to implement it is by making pool shares be prime constellations of the same difficulty as desired, but with less primes. So for example if the requirements for a block are a sextuplet with difficulty n, then a quintuplet with the same difficulty could constitute a valid pool share (or quadruplet, or whatever the pool operator wishes).
Note that finding a quintuplet is O(log p) times easier than finding a sextuplet.
Pooled mining works because of the many quintuplets found, eventually one will be part of a sextuplet, thus being a valid block. One drawback of this implementation is that miners may optimize they prime number generation for quintuplets instead of sextuplets, finding more shares but less blocks. If only some miners did this, they would be receiving more than they deserved share of the reward, and if all did this, the reward would be fair but mining this way in a pool would be less profitable than solo mining. To avoid this problem, the pool software must validate that the shares do have the potential to be blocks according to some precomputed sieve. Careful crafting of this sieve will ensure that tuning the mining algorithm for finding blocks instead of shares is still the most profitable way to mine in the pool.
Obviously this cannot be implemented on bitcoin without a hard fork, and I'm just experimenting. If any of my experiments proves worthy, I'd be happy to see it in bitcoin.
Lots of mathematicians study prime numbers. Many conjectures on prime number constellations and prime number distribution in general rely on the Riemann Hypothesis, which has a prize of 1M USD for anyone who can prove (or disprove) it. If they are willing to give that much money, it means exploring them should have some value.
It's not like we are solving the Riemann Hypothesis with Riecoin, but we will be verifying Hardy-Littlewood k-tuple conjectures (at the moment, for k = 6).
Even if the only value of Riecoin's proof of work algorithm is getting people interested in prime numbers, it already is worth trying.
Primecoin is good and I'm not against it, but since its PoW might at first glance look similar to Riecoin's, I feel the need to differentiate from it. Here I go:
Primecoin uses the Fermat primality test, which has some flaws. Carmichael numbers are not prime and still pass Fermat's test for all bases, however those are relatively rare. Secondly, in general, if Fermat's test says a number is prime, it has at least a 50% probability of being prime. Primecoin uses only one Fermat test with base 2. While base 2 may provide more confidence than the general bound of 50%, still many composites will pass as primes. What's worst, is that Euler-Lagrange-Lifchitz test used for the other primes in the chain assumes the previous number in the chain is prime. So if the chain starts with a number that is not prime, then the Euler-Lagrange-Lifchitz test is not guaranteed to work, and all numbers in the chain may be composite.
short version: Primecoin numbers are not guarranteed to be prime, they may be Fermat pseudoprimes to the base 2. There is an infinite list of Fermat pseudoprimes to the base 2 (oeis.org/A001567). Riecoin uses enough Rabin-Miller tests with random bases, so the probability of a number that is not prime being accepted by the majority of the Riecoin network is negligible.
The probability of a client accepting one number that is not prime is one in 2^80 for each prime in the constellation. This is very low. But this applies to each client, and since each client uses different random bases for testing, the probability of 2 clients accepting a block with a fake prime is 1/2^160. This number is really really low, and it's only for 2 clients: it approaches 0 exponentially as we add clients to the equation. So in the highly unlikely case that someone accepts a fake block, it will surely be orphaned later. It really is not likely that anyone can use this as an attack vector.
I'm betting it will. According to this the record for a prime sextuplet is 559 digits, which should be 1857 bits. Riecoin's starting (and minimum) difficulty is 304 bits, so if it ever reaches 1857 then every new block would be a record breaker.
The more the better because it makes verification easier relative to mining. But 7 would have been too difficult to mine, have in mind we need numbers of least 256 bits to hold the hash, and then some more. Minimum difficulty is 304 bits.
The RPC API is extremely similar to Bitcoin's JSON API.
Only the getwork command has changed significatively. It now returns the padded data to hash, you have to hash, find a nonce and embed it in the data. Please see the source code of client or the external miner for reference.
The meaning of gethashespersec and the difficulty in getmininginfo have changed.
getblocktemplate had small changes. The target does not exist anymore, and the noncerange is now always the full 64 bits of the nonce field except when the trailing zeros are less than 64 (see the PoW explanation).
The P2P protocol is extremely similar to Bitcoin's protocol.
The block header has changed. Timestamps are now 64 bits and there are 64 bits for the nonce.
The protocol version is hardcoded to 10070001 and the protocol's "magic" number is 0xdbb2bcfc, and 0x0511090d for testnet.
If you wish to donate to the development or promotion of Riecoin, it's really appreciated. Donation addresses:
Logo by Mick Bruce
Video by Bill Sotnikow - RIC: RGJAyKFQAS7eKvmhU66hm3ApA6jTyFRvEu
Core developer: Gatra
mail to info at riecoin.org