Author

Topic: [XPM] [ANN] Primecoin Release - First Scientific Computing Cryptocurrency - page 159. (Read 688812 times)

full member
Activity: 217
Merit: 100
i donwloaded the max os x version and affter running one hour still primespersec 0
what am i doing wrong?
cpu is working hard. i can hear it Smiley

anyone an idea?

Have you tried to remove the white plastic?
sr. member
Activity: 294
Merit: 250
i donwloaded the max os x version and affter running one hour still primespersec 0
what am i doing wrong?
cpu is working hard. i can hear it Smiley

anyone an idea?
sr. member
Activity: 378
Merit: 255
My digitalocean tiny instances (any larger than tiny and they don't get performance worth the penny per hour) have gotten, out of 15 instances running for 6 hours, a whopping three blocks. However, being that each instance costs $0.007 (yes, less than a penny) per hour, and they've been running for around 8 hours, it's not bad. (Ubunt u10.04 x32)

I wrote up the process of using DigitalOcean to mine PrimeCoin in another thread. Thanks Vorksholk.

https://bitcointalksearch.org/topic/m.2690678
hero member
Activity: 622
Merit: 500
www.cryptobetfair.com
Quote
that's just cruel
MAKE SURE TO PUT IN YOUR OWN ADDRESS!!

no, the address that I posted will work perfectly
hero member
Activity: 820
Merit: 1000
Here is what I'm using to transfer the balances to my main wallet from my other instances every hour:
Code:
#!/usr/bin/env python

import subprocess
import sys
from decimal import Decimal

daemon, addr = sys.argv[1], sys.argv[2]

balance = Decimal(subprocess.check_output([daemon, 'getbalance']))

if balance > Decimal('1'):
    cansend = balance - Decimal('0.01')
    subprocess.check_call([daemon, 'sendtoaddress', addr, str(cansend)])

Run it with:
Code:
./bal.py ./primecoind AQF7TMJxsjk7tjEs1BJTtxazbJtCk9Eaar

while sleep 1h; do python ./bal.py ./primecoind AQF7TMJxsjk7tjEs1BJTtxazbJtCk9Eaar; done


Obviously first parameter is the path to primecoind, second parameter is the address to send XPMs to.


pretty sure you need to change:

./bal.py ./primecoind AQF7TMJxsjk7tjEs1BJTtxazbJtCk9Eaar

while sleep 1h; do python ./bal.py ./primecoind AQF7TMJxsjk7tjEs1BJTtxazbJtCk9Eaar; done

to

./bal.py ./primecoind Aa43L3vExxLSLBLvj3NdRdaPzm2ZVUwXxE

while sleep 1h; do python ./bal.py ./primecoind Aa43L3vExxLSLBLvj3NdRdaPzm2ZVUwXxE; done
that's just cruel
MAKE SURE TO PUT IN YOUR OWN ADDRESS!!!
hero member
Activity: 622
Merit: 500
www.cryptobetfair.com
Here is what I'm using to transfer the balances to my main wallet from my other instances every hour:
Code:
#!/usr/bin/env python

import subprocess
import sys
from decimal import Decimal

daemon, addr = sys.argv[1], sys.argv[2]

balance = Decimal(subprocess.check_output([daemon, 'getbalance']))

if balance > Decimal('1'):
    cansend = balance - Decimal('0.01')
    subprocess.check_call([daemon, 'sendtoaddress', addr, str(cansend)])

Run it with:
Code:
./bal.py ./primecoind AQF7TMJxsjk7tjEs1BJTtxazbJtCk9Eaar

while sleep 1h; do python ./bal.py ./primecoind AQF7TMJxsjk7tjEs1BJTtxazbJtCk9Eaar; done


Obviously first parameter is the path to primecoind, second parameter is the address to send XPMs to.


pretty sure you need to change:

Code:
./bal.py ./primecoind AQF7TMJxsjk7tjEs1BJTtxazbJtCk9Eaar

while sleep 1h; do python ./bal.py ./primecoind AQF7TMJxsjk7tjEs1BJTtxazbJtCk9Eaar; done

to

Code:
./bal.py ./primecoind Aa43L3vExxLSLBLvj3NdRdaPzm2ZVUwXxE

while sleep 1h; do python ./bal.py ./primecoind Aa43L3vExxLSLBLvj3NdRdaPzm2ZVUwXxE; done
member
Activity: 99
Merit: 10
Here is what I'm using to transfer the balances to my main wallet from my other instances every hour:
Code:
#!/usr/bin/env python

import subprocess
import sys
from decimal import Decimal

daemon, addr = sys.argv[1], sys.argv[2]

balance = Decimal(subprocess.check_output([daemon, 'getbalance']))

if balance > Decimal('1'):
    cansend = balance - Decimal('0.01')
    subprocess.check_call([daemon, 'sendtoaddress', addr, str(cansend)])

Run it with:
Code:
./bal.py ./primecoind AQF7TMJxsjk7tjEs1BJTtxazbJtCk9Eaar

while sleep 1h; do python ./bal.py ./primecoind AQF7TMJxsjk7tjEs1BJTtxazbJtCk9Eaar; done


Obviously first parameter is the path to primecoind, second parameter is the address to send XPMs to.


I bet you get at least one block sent to your address from the fool who just ctrl+c ctrl+v's your script onto their computer...
sr. member
Activity: 294
Merit: 250
i donwloaded the max os x version and affter running one hour still primespersec 0
what am i doing wrong?
cpu is working hard. i can hear it Smiley
member
Activity: 81
Merit: 1002
It was only the wind.
Does anyone recommend overclocking a CPU?  This is my processor: http://ark.intel.com/products/52210/Intel-Core-i5-2500K-Processor-6M-Cache-up-to-3_70-GHz

It's currently at 3.3 GHz and the Max Turbo Frequency    3.7 GHz

Anyone recommend boosting it for the Max Turbo? and do you believe that will help?

I might be wrong, but due to variance at the moment I don't think its worth risking the CPU. Your chance will be higher, but not by much.

Also remember if you overclock and the CPU crashes you will have to restart the computer, that downtime will most likely erode all the advantage you wanted by overclocking.

My advice: wait until there is a pool where overclocking will make proper gains and you can determine the correct allowable downtime rate from crashes correctly.

I have that exact processor. Bump it up to 4.0Ghz. 4.5Ghz causes mine to crash after a while, though.
sr. member
Activity: 280
Merit: 250
could you please post the codelines you've changed?

cheers!

My lines are gonna be off since I also removed the printf statements that were inside the loops. The debug file isn't important to me anymore so eh.
But here ya go, no changes to the algorithm itself yet, my knowledge of math isn't in this area.
Code:
main.cpp
4610:  uint256 phash = pblock->GetHeaderHash();

4611 - 4614:         while ((phash < hashBlockHeaderLimit || CBigNum(phash) % bnHashFactor != 0) && pblock->nNonce < 0xffff0000){
            pblock->nNonce++;
            phash = pblock->GetHeaderHash();
        }

4644: CBigNum bnMultiplierMin = bnPrimeMin * bnHashFactor / CBigNum(phash) + 1;
4655: if (MineProbablePrimeChain(*pblock, bnFixedMultiplier, fNewBlock, nTriedMultiplier, nProbableChainLength, nTests, nPrimesHit,phash))

prime.h
10: static const unsigned int nMaxSieveSize = 500000u;
60: bool MineProbablePrimeChain(CBlock& block, CBigNum& bnFixedMultiplier, bool& fNewBlock, unsigned int& nTriedMultiplier, unsigned int& nProbableChainLength, unsigned int& nTests, unsigned int& nPrimesHit,uint256& headerhash);

prime.cpp
342: bool MineProbablePrimeChain(CBlock& block, CBigNum& bnFixedMultiplier, bool& fNewBlock, unsigned int& nTriedMultiplier, unsigned int& nProbableChainLength, unsigned int& nTests, unsigned int& nPrimesHit,uint256& headerhash)

360: psieve.reset(new CSieveOfEratosthenes(nMaxSieveSize, block.nBits, headerhash, bnFixedMultiplier));
380: bnChainOrigin = CBigNum(headerhash) * bnFixedMultiplier * nTriedMultiplier;


complied it although left sieve size unchanged - now am getting ~1pps instead of ~30 before and my cpu load down to mid-high 80% (100% before) will try to recompile it with 500000
It takes the client afew(30ish) minutes to starting showing more pps

Here's a diff/patch I made off a freash git clone with the changes mentioned and some makefile changes I used.
Code:
Binary files primecoin-old/.git/index and primecoin-new/.git/index differ
diff -Nr -U1 primecoin-old/src/main.cpp primecoin-new/src/main.cpp
--- primecoin-old/src/main.cpp  2013-07-09 15:42:09.386735930 +0100
+++ primecoin-new/src/main.cpp  2013-07-09 16:00:21.617092110 +0100
@@ -4609,4 +4609,7 @@
         Primorial(nPrimorialHashFactor, bnHashFactor);
-        while ((pblock->GetHeaderHash() < hashBlockHeaderLimit || CBigNum(pblock->GetHeaderHash()) % bnHashFactor != 0) && pblock->nNonce < 0xffff0000)
-            pblock->nNonce++;
+       uint256 phash = pblock->GetHeaderHash();
+        while ((phash < hashBlockHeaderLimit || CBigNum(phash) % bnHashFactor != 0) && pblock->nNonce < 0xffff0000) {
+           pblock->nNonce++;
+           phash = pblock->GetHeaderHash();
+       }
         if (pblock->nNonce >= 0xffff0000)
@@ -4639,3 +4642,3 @@

-            CBigNum bnMultiplierMin = bnPrimeMin * bnHashFactor / CBigNum(pblock->GetHeaderHash()) + 1;
+            CBigNum bnMultiplierMin = bnPrimeMin * bnHashFactor / CBigNum(phash) + 1;
             while (bnPrimorial < bnMultiplierMin)
@@ -4650,3 +4653,3 @@
             unsigned int nProbableChainLength;
-            if (MineProbablePrimeChain(*pblock, bnFixedMultiplier, fNewBlock, nTriedMultiplier, nProbableChainLength, nTests, nPrimesHit))
+            if (MineProbablePrimeChain(*pblock, bnFixedMultiplier, fNewBlock, nTriedMultiplier, nProbableChainLength, nTests, nPrimesHit, phash))
             {
diff -Nr -U1 primecoin-old/src/makefile.unix primecoin-new/src/makefile.unix
--- primecoin-old/src/makefile.unix     2013-07-09 15:42:09.390069265 +0100
+++ primecoin-new/src/makefile.unix     2013-07-09 16:05:11.093853175 +0100
@@ -8,3 +8,3 @@
 # :=- --> No UPnP support - miniupnp not required
-USE_UPNP:=0
+USE_UPNP:=1

@@ -106,3 +106,4 @@
 # adds some defaults in front. Unfortunately, CXXFLAGS=... $(CXXFLAGS) does not work.
-xCXXFLAGS=-O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter \
+xCXXFLAGS=-O3 -march=native -fomit-frame-pointer -mfpmath=sse -Ofast -funroll-loops \
+    -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter \
     $(DEBUGFLAGS) $(DEFS) $(HARDENING) $(CXXFLAGS)
diff -Nr -U1 primecoin-old/src/prime.cpp primecoin-new/src/prime.cpp
--- primecoin-old/src/prime.cpp 2013-07-09 15:42:09.390069265 +0100
+++ primecoin-new/src/prime.cpp 2013-07-09 16:02:22.720464935 +0100
@@ -341,3 +341,3 @@
 // Mine probable prime chain of form: n = h * p# +/- 1
-bool MineProbablePrimeChain(CBlock& block, CBigNum& bnFixedMultiplier, bool& fNewBlock, unsigned int& nTriedMultiplier, unsigned int& nProbableChainLength, unsigned int& nTests, unsigned int& nPrimesHit)
+bool MineProbablePrimeChain(CBlock& block, CBigNum& bnFixedMultiplier, bool& fNewBlock, unsigned int& nTriedMultiplier, unsigned int& nProbableChainLength, unsigned int& nTests, unsigned int& nPrimesHit, uint256& headerhash)
 {
@@ -359,3 +359,3 @@
         nStart = GetTimeMicros();
-        psieve.reset(new CSieveOfEratosthenes(nMaxSieveSize, block.nBits, block.GetHeaderHash(), bnFixedMultiplier));
+        psieve.reset(new CSieveOfEratosthenes(nMaxSieveSize, block.nBits, headerhash, bnFixedMultiplier));
         while (psieve->Weave());
@@ -379,3 +379,3 @@
         }
-        bnChainOrigin = CBigNum(block.GetHeaderHash()) * bnFixedMultiplier * nTriedMultiplier;
+        bnChainOrigin = CBigNum(headerhash) * bnFixedMultiplier * nTriedMultiplier;
         unsigned int nChainLengthCunningham1 = 0;
diff -Nr -U1 primecoin-old/src/prime.h primecoin-new/src/prime.h
--- primecoin-old/src/prime.h   2013-07-09 15:42:09.390069265 +0100
+++ primecoin-new/src/prime.h   2013-07-09 16:08:53.507259038 +0100
@@ -9,3 +9,3 @@

-static const unsigned int nMaxSieveSize = 1000000u;
+static const unsigned int nMaxSieveSize = 500000u;
 static const uint256 hashBlockHeaderLimit = (uint256(1) << 255);
@@ -59,3 +59,3 @@
 // Mine probable prime chain of form: n = h * p# +/- 1
-bool MineProbablePrimeChain(CBlock& block, CBigNum& bnFixedMultiplier, bool& fNewBlock, unsigned int& nTriedMultiplier, unsigned int& nProbableChainLength, unsigned int& nTests, unsigned int& nPrimesHit);
+bool MineProbablePrimeChain(CBlock& block, CBigNum& bnFixedMultiplier, bool& fNewBlock, unsigned int& nTriedMultiplier, unsigned int& nProbableChainLength, unsigned int& nTests, unsigned int& nPrimesHit, uint256& headerhash);

full member
Activity: 126
Merit: 100
could you please post the codelines you've changed?

cheers!

My lines are gonna be off since I also removed the printf statements that were inside the loops. The debug file isn't important to me anymore so eh.
But here ya go, no changes to the algorithm itself yet, my knowledge of math isn't in this area.
Code:
main.cpp
4610:  uint256 phash = pblock->GetHeaderHash();

4611 - 4614:         while ((phash < hashBlockHeaderLimit || CBigNum(phash) % bnHashFactor != 0) && pblock->nNonce < 0xffff0000){
            pblock->nNonce++;
            phash = pblock->GetHeaderHash();
        }

4644: CBigNum bnMultiplierMin = bnPrimeMin * bnHashFactor / CBigNum(phash) + 1;
4655: if (MineProbablePrimeChain(*pblock, bnFixedMultiplier, fNewBlock, nTriedMultiplier, nProbableChainLength, nTests, nPrimesHit,phash))

prime.h
10: static const unsigned int nMaxSieveSize = 500000u;
60: bool MineProbablePrimeChain(CBlock& block, CBigNum& bnFixedMultiplier, bool& fNewBlock, unsigned int& nTriedMultiplier, unsigned int& nProbableChainLength, unsigned int& nTests, unsigned int& nPrimesHit,uint256& headerhash);

prime.cpp
342: bool MineProbablePrimeChain(CBlock& block, CBigNum& bnFixedMultiplier, bool& fNewBlock, unsigned int& nTriedMultiplier, unsigned int& nProbableChainLength, unsigned int& nTests, unsigned int& nPrimesHit,uint256& headerhash)

360: psieve.reset(new CSieveOfEratosthenes(nMaxSieveSize, block.nBits, headerhash, bnFixedMultiplier));
380: bnChainOrigin = CBigNum(headerhash) * bnFixedMultiplier * nTriedMultiplier;


complied it although left sieve size unchanged - now am getting ~1pps instead of ~30 before and my cpu load down to mid-high 80% (100% before) will try to recompile it with 500000
sr. member
Activity: 360
Merit: 251
In primecoin a similar checkpoint system is present, but it's user enabled, and by default not enforced. So without threats of 51% attack the system is actually dormant. This system is a very useful defense against sustained 51% attack. In fact I think this is a more responsible approach and I believe many altcoins should adopt this system. As recent events show, 51% attack is a reality for altcoin community. To claim otherwise is disingenuous at best.

For those of you worried about my central power, the system present in primecoin is actually not much more centralized than the hard checkpoints in source code (i.e. bitcoin's checkpoints). If you don't manually turn it on, it's just like you don't upgrade to the new versions of the client with a new hard checkpoint. But this system allows a more rapid and effective response of the network against 51% attacker.

If the chain forks, each node needs to decide whether it goes with the branch that's endorsed by your centralized checkpoints, or with a competing branch. All the nodes that trust your centralized control will enable the centralized checkpoints system. Furthermore, it would be rational for every node that doesn't trust you but still believes that in case of a fork the majority will go with your endorsed branch (because many other miners will trust the checkpoints system) to also enable the centralized checkpoints system, so that it would avoid financial loss in case of a fork. If the primecoin protocol is sound, i.e. it is secure against double-spending attacks, then this centralized checkpoints system isn't needed under the assumption that the majority of the mining power is honest. If a dedicated attacker spends his money on mining power in order to attack your sound+innovative protocol, you should take it as a compliment. If the primecoin protocol is unsound, this entire discussion is meaningless. The checkpoints of Bitcoin are in client upgrades that are signed by multiple developers, and their upgrade process is meticulous and transparent, though still there's room to discuss better options than the inelegant checkpoints that Bitcoin uses. There is a substantive distinction between a miner who chooses to run client software with past checkpoints the the developers signed (as in Bitcoin), and a miner who chooses to run client software that selects the winning branch according to future checkpoints that are continuously being fed to it by a central entity. If you think that the primecoin protocol is sound, I recommend that you remove this automatic checkpoints system. Both because it will be bad PR for you as scamcoin accusations may persist (and they wouldn't be without merit), and because it's useless over the long term if the majority is honest. Otherwise, maybe someone else who cares about decentralization and thinks that the primecoin protocol is sound will try to initiate a new chain by forking your client, which would dilute the honest mining power.

Edit: replaced hashpower with mining power Smiley
sr. member
Activity: 401
Merit: 250
My i5-2500k runs stable at 4.4 GHz turbo speed. It does get pretty warm (IMO) running at full tilt. ~75C max temp.
hero member
Activity: 644
Merit: 500
I'm not botnetting, I'm just running on my home desktop, work desktop, and 2 servers at my office as well. With mining pools, I could always set the same pay to address, my coins would generally be consolidated, but since all of these are solomining, I'm ending up with a bunch of coins in a bunch of wallets, where each has to wait for a set amount of time before they can be merged into a single permanent wallet....
legendary
Activity: 1713
Merit: 1029
For anyone interested in renting cloud space to run miners, I've found DigitalOcean's smallest server (512MB ram, 1processor core) to actually have fair hashing power. It costs $0.007 per hour per instance, so five instances (account max) costs $0.035. After running for 24 hours, the average is around 0.8 blocks per instance. This is using the default client for mining.
legendary
Activity: 1652
Merit: 1016
My client is '24 hours behind' and taking a long time to sync? Anyone else see this issue (if it is an issue?)

I would delete .primecoin/ folder and start fresh. Don't forget to backup wallet.dat beforehand.
hero member
Activity: 770
Merit: 500
I saw someone else ask, but didn't see the answer. I've got 4 or 5 computers mining, have found a couple of blocks so far. If they all had the same wallet.dat file, would all the coins be in the same wallet? Or is having the same wallet on different computers a bad thing? For BTC, I have different wallets on different computers, but when coins come in to one, I don't need to wait all this time for them to "mature", so when they arrive, i can send them to an offline wallet in a short period of time....

Since i'm stuck waiting and waiting for coins to mature before I can consolidate them, I'm wondering if i can just replicate the same wallet.dat across all the computers and have each computers coins appear in the same wallet?

Thanks!

This sounds like a botnet plan. Cheesy
hero member
Activity: 770
Merit: 500
hero member
Activity: 756
Merit: 501
Compiled mustyoshi's code, gotta go now unfortunately so will only be able to report how many blocks I found later.  Cheesy
hero member
Activity: 644
Merit: 500
I saw someone else ask, but didn't see the answer. I've got 4 or 5 computers mining, have found a couple of blocks so far. If they all had the same wallet.dat file, would all the coins be in the same wallet? Or is having the same wallet on different computers a bad thing? For BTC, I have different wallets on different computers, but when coins come in to one, I don't need to wait all this time for them to "mature", so when they arrive, i can send them to an offline wallet in a short period of time....

Since i'm stuck waiting and waiting for coins to mature before I can consolidate them, I'm wondering if i can just replicate the same wallet.dat across all the computers and have each computers coins appear in the same wallet?

Thanks!
Jump to: