Bitcoin Forum
November 18, 2024, 06:57:07 PM *
News: Check out the artwork 1Dq created to commemorate this forum's 15th anniversary
 
   Home   Help Search Login Register More  
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 [43] 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 ... 199 »
  Print  
Author Topic: [XPM] [ANN] Primecoin Release - First Scientific Computing Cryptocurrency  (Read 688814 times)
shinkicker
Full Member
***
Offline Offline

Activity: 140
Merit: 100


View Profile
July 09, 2013, 02:38:51 PM
 #841

My client is '24 hours behind' and taking a long time to sync? Anyone else see this issue (if it is an issue?)
Chemisist
Member
**
Offline Offline

Activity: 99
Merit: 10



View Profile
July 09, 2013, 02:40:57 PM
 #842

My client is '24 hours behind' and taking a long time to sync? Anyone else see this issue (if it is an issue?)

Restart it?

btc 1ChemaH12nRmd75M8BmPSiqd8x7B2wxFNF     ltc LaWX7jgJDyQ2oFaQYJvo5kqC1e1KYPoCfd     xpm Ab8NSgxHgGUJvHgSHYqMYBMWai6ZdsA91s
mustyoshi
Sr. Member
****
Offline Offline

Activity: 287
Merit: 250



View Profile
July 09, 2013, 02:41:40 PM
 #843

Maybe the improvement should be tested with shorter chains on the testnet first.  Or it takes days or probably weeks to show its effects...
Do you know a way to become your own chain?

Timing how long it takes to create a blockchain x blocks long would be an interesting test of your miner's performance.
lucasjkr
Hero Member
*****
Offline Offline

Activity: 644
Merit: 500


View Profile
July 09, 2013, 02:43:33 PM
 #844

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

Activity: 756
Merit: 501


View Profile
July 09, 2013, 02:43:41 PM
 #845

Compiled mustyoshi's code, gotta go now unfortunately so will only be able to report how many blocks I found later.  Cheesy

Moebius327
Hero Member
*****
Offline Offline

Activity: 770
Merit: 500



View Profile
July 09, 2013, 02:45:46 PM
 #846

So I guess this is good:

http://www.businessinsider.com/primecoin-2013-7
Moebius327
Hero Member
*****
Offline Offline

Activity: 770
Merit: 500



View Profile
July 09, 2013, 02:47:06 PM
 #847

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
Buffer Overflow
Legendary
*
Offline Offline

Activity: 1652
Merit: 1016



View Profile
July 09, 2013, 02:47:41 PM
 #848

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.

Vorksholk
Legendary
*
Offline Offline

Activity: 1713
Merit: 1029



View Profile WWW
July 09, 2013, 02:51:16 PM
 #849

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.

VeriBlock: Securing The World's Blockchains Using Bitcoin
https://veriblock.org
lucasjkr
Hero Member
*****
Offline Offline

Activity: 644
Merit: 500


View Profile
July 09, 2013, 02:52:46 PM
 #850

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

Activity: 401
Merit: 250



View Profile
July 09, 2013, 02:52:55 PM
 #851

My i5-2500k runs stable at 4.4 GHz turbo speed. It does get pretty warm (IMO) running at full tilt. ~75C max temp.
iddo
Sr. Member
****
Offline Offline

Activity: 360
Merit: 251


View Profile
July 09, 2013, 03:07:13 PM
Last edit: July 09, 2013, 03:36:05 PM by iddo
 #852

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

Activity: 126
Merit: 100


View Profile
July 09, 2013, 03:08:49 PM
 #853

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

I'd like to thank eduffield and the other developers for this critically important evolution in virtual currency. DarkCoin is what bitcoin should have been. Some might call it "Bitcoin 2.0" but would do better by saying: "DarkCoin is digital cash."  -  Child Harold - February 28, 2014
https://bitcointalk.org/index.php?topic=421615.msg5424980#msg5424980
oroqen
Sr. Member
****
Offline Offline

Activity: 280
Merit: 250



View Profile
July 09, 2013, 03:13:43 PM
 #854

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);

captainfuture
Sr. Member
****
Offline Offline

Activity: 294
Merit: 250



View Profile
July 09, 2013, 03:46:11 PM
 #855

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

Activity: 99
Merit: 10



View Profile
July 09, 2013, 03:51:23 PM
 #856

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

btc 1ChemaH12nRmd75M8BmPSiqd8x7B2wxFNF     ltc LaWX7jgJDyQ2oFaQYJvo5kqC1e1KYPoCfd     xpm Ab8NSgxHgGUJvHgSHYqMYBMWai6ZdsA91s
laughingbear
Deflationary champion
Hero Member
*****
Offline Offline

Activity: 622
Merit: 500


www.cryptobetfair.com


View Profile WWW
July 09, 2013, 03:51:28 PM
 #857

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

Activity: 820
Merit: 1000


View Profile
July 09, 2013, 03:52:43 PM
 #858

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!!!
laughingbear
Deflationary champion
Hero Member
*****
Offline Offline

Activity: 622
Merit: 500


www.cryptobetfair.com


View Profile WWW
July 09, 2013, 03:53:56 PM
 #859

Quote
that's just cruel
MAKE SURE TO PUT IN YOUR OWN ADDRESS!!

no, the address that I posted will work perfectly
rethaw
Sr. Member
****
Offline Offline

Activity: 378
Merit: 255



View Profile
July 09, 2013, 03:55:22 PM
 #860

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://bitcointalk.org/index.php?topic=252944.msg2690678#msg2690678

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 [43] 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 ... 199 »
  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!