Bitcoin Forum
October 05, 2024, 07:37:22 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Alternate cryptocurrencies / Announcements (Altcoins) / Re: cpuminer Optimations: on: February 12, 2014, 12:43:29 AM

[..] just forkt gatras cpuminer
and implemented the fremat test form primecoin:

https://github.com/iddumied/cpuminer-rminerd-fermat


Nice! what's the performance gain on this?

ok i made a few test, im running an i5-2500K @ 3.30GHz with an linux 64 OS

this are the average (about two minutes) hashrates i got:

|12 miller rabin tests  | 1 miller rabin test | fermat test           |
| (default miner)         |                              | (fork from above) |
------------------------------------------------------------------------------
|        84492                |        89620            |      78685              | --max-prime=10000
|                                  |                              |                              | --sieve=4194304
|        63276                |        64267            |      55844              | without exta
|                                  |                              |                              | options

so the fremat test doesn't got an improove on my system,
but thats maybe releated to the fast gmp implementations of the miller rabin test
(i thought fermat test should be theoretically a bit faster than miller rabin)

but decreasing the max-primes an seting MR_TESTS 1 got an reasonable increase
2  Alternate cryptocurrencies / Announcements (Altcoins) / Re: cpuminer Optimations: on: February 11, 2014, 11:34:16 PM
in scanriecoin.c:209 repleace

Code:
#define MR_TESTS 12

with

Code:
#define MR_TESTS 1

and run with --max-prime=10000

speedup is about 200%
but it maybe finds more composite numbers
do you know what effect this has or are you just playing with the source?
Gatra, please can you explain what this does?

MR_TESTS is the number of miller rabin test performed to check if a number is prime,
as more tests you use the more you can be sure the number is prime.
This is important for the wallet, but not for the miner!
(if a composite is submited the network rejects is)

futur optimation coul be an implementation of the fermat test form primecoin,
which also could speed up mining a bit.

Also the miner is not optimized for cache performance!

Yes, this miner is very inefficient, I will look into it this weekend if time permits


Will this really speed up the mining process or just the speed we see in the miner? If the miner submits a composite does the wallet test it or is the network?



i just know for sure that the miner shows an higher hashrate,
but as the primecoin paper says: with bigger numbers the propability for a composite number passing the test decreases.

I don't kown if this also applays for the miller rabin test, but i just forkt gatras cpuminer
and implemented the fremat test form primecoin:

https://github.com/iddumied/cpuminer-rminerd-fermat

3  Alternate cryptocurrencies / Announcements (Altcoins) / Re: cpuminer Optimations: on: February 11, 2014, 11:03:16 PM
in scanriecoin.c:209 repleace

Code:
#define MR_TESTS 12

with

Code:
#define MR_TESTS 1

and run with --max-prime=10000

speedup is about 200%
but it maybe finds more composite numbers
do you know what effect this has or are you just playing with the source?
Gatra, please can you explain what this does?

MR_TESTS is the number of miller rabin test performed to check if a number is prime,
as more tests you use the more you can be sure the number is prime.
This is important for the wallet, but not for the miner!
(if a composite is submited the network rejects is)

futur optimation coul be an implementation of the fermat test form primecoin,
which also could speed up mining a bit.

Also the miner is not optimized for cache performance!
4  Alternate cryptocurrencies / Announcements (Altcoins) / cpuminer Optimations: on: February 11, 2014, 10:49:40 PM
in scanriecoin.c:209 repleace

Code:
#define MR_TESTS 12

with

Code:
#define MR_TESTS 1

and run with --max-prime=10000

speedup is about 200%
but it maybe finds more composite numbers
5  Alternate cryptocurrencies / Announcements (Altcoins) / Core dumped running riecoind on: February 10, 2014, 12:55:49 PM
Hey,

i got following message after compilation and running riecoind on an x86_64 Archlinux os:

Code:
riecoind: main.cpp:2738: bool InitBlockIndex(): Assertion `block.hashMerkleRoot == uint256("0xb8fcc5eedac458fe02b8797ceff6c7ba4c05f749ff464b6ebf775e0eab0afa6c")' failed.
Aborted (core dumped)

~/.riecoin/debug.log shows:
Code:
2014-02-10 12:45:38 riecoin version v0.8.6-4-g9caaa5e-beta (2014-02-07 00:51:34 -0300)
2014-02-10 12:45:38 Using OpenSSL version OpenSSL 1.0.1e 11 Feb 2013
2014-02-10 12:45:38 Default data directory /home/chief/.riecoin
2014-02-10 12:45:38 Using data directory /home/chief/.riecoin
2014-02-10 12:45:38 Using at most 125 connections (1024 file descriptors available)
2014-02-10 12:45:38 Using 4 threads for script verification
2014-02-10 12:45:38 init message: Verifying wallet...
2014-02-10 12:45:38 dbenv.open LogDir=/home/chief/.riecoin/database ErrorFile=/home/chief/.riecoin/db.log
2014-02-10 12:45:38 Bound to [::]:28333
2014-02-10 12:45:38 Bound to 0.0.0.0:28333
2014-02-10 12:45:38 init message: Loading block index...
2014-02-10 12:45:38 Opening LevelDB in /home/chief/.riecoin/blocks/index
2014-02-10 12:45:38 Opened LevelDB successfully
2014-02-10 12:45:38 Opening LevelDB in /home/chief/.riecoin/chainstate
2014-02-10 12:45:38 Opened LevelDB successfully
2014-02-10 12:45:38 LoadBlockIndexDB(): last block file = 0
2014-02-10 12:45:38 LoadBlockIndexDB(): transaction index disabled
2014-02-10 2014-02-10 12:45:38 15e0a1dafd6ccb844a25f9e47bda83b888498c3f416e937ea8b6630e03a7f37b
2014-02-10 12:45:38 f93cd1f3344da4a12219a6d2c4cd714ba277b6c3bf4ed62a561e21105f0cf04c
2014-02-10 12:45:38 c50286add8c871ee94deb5e03af03401e99481de327049afcec0271268b9e3cd
2014-02-10 12:45:38 forPoW: b667efd1a2a99bea0e202b62e7508ec66561eb6d10318db16162a423b831de23
2014-02-10 12:45:38 CBlock(hash=15e0a1dafd6ccb844a25f9e47bda83b888498c3f416e937ea8b6630e03a7f37b, ver=1, hashPrevBlock=0000000000000000000000000000000000000000000000000000000000000000, hashMerkleRoot=c50286add8c871ee94deb5e03af03401e99481de327049afcec0271268b9e3cd, nTime=1375382507, nBitsCompact=0x02013000, nOffset=0000000000000000000000000000000000000000000000000000000000000000, vtx=1)
2014-02-10 12:45:38   CTransaction(hash=c50286add8c871ee94deb5e03af03401e99481de327049afcec0271268b9e3cd, ver=1, vin.size=1, vout.size=1, nLockTime=0)
    CTxIn(COutPoint(0000000000000000000000000000000000000000000000000000000000000000, 4294967295), coinbase 04ffff001d01041d746573746e65742120746869732077696c6c2062652075706461746564)
    CTxOut(nValue=0.00000000, scriptPubKey=04ff3c7ec6f2ed535b6d0d373aaff2)
  vMerkleTree: c50286add8 12:45:38 Initializing databases...

main.cpp:2738
Code:
assert(block.hashMerkleRoot == uint256("0xb8fcc5eedac458fe02b8797ceff6c7ba4c05f749ff464b6ebf775e0eab0afa6c"));

is this just a failur because the coin hasn't started yet?
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!