Pages:
Author

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

sr. member
Activity: 301
Merit: 250
@mikaelh Thank you for clarifying, could you also discuss shortly other enhancements pointed by Supercomputing? Not necessarily definitely, just from the perspective of your experience.
There are several enhancements which account for the drastic increase in performance over the current CPU implementation:
1) Montgomery Reduction is used.
2) The size of the multiprecision arithmetic is fixed.
3) An optimized sieve is running on the GPU.
4) An optimized primorial search is running on the GPU (double SHA-256).
5) An exploitation of the difficulty (Sunny King knows what I am referring to here, just ask Sunny).
Thanks

Ok, here's my take on these claims.

1) There's no question about the fact that GPUs are faster at modular multiplication. Supercomputing has already linked plenty of papers about that.

The missing piece of information about his implementation is how he goes from multiplication to exponentiation. The Fermat's test in Primecoin is all about doing modular exponentiation. There's a well-known algorithm for that which uses modular squaring and multiplication. I think you are forced to do some branching on the GPU which slightly slows it down.

2) Fixing the precision definitely gives a minor speedup and makes the implementation easier. The only caveat is that it may not be future-proof when we move to longer chains.

3) Yes, I think it's possible to implement a much more efficient sieve if you exploit the shared memory on the GPU.

4) I'm guessing that primorial search refers to finding header hashes divisible by a primorial. The CPU implementation searches for hashes that are divisible by 7# (= 2 * 3 * 5 * 7). On the CPU this takes only a tiny fraction of time. If you have a fast GPU implementation of it, you can search for hashes divisible by much larger primorials. This might get him a minor speedup.

Note that his faster primorial search will be obsolete once mining protocol v0.2 is enforced. Link: http://www.peercointalk.org/index.php?topic=453.0
legendary
Activity: 1120
Merit: 1000
anyone know if there are any more Pools starting up for this coin?
newbie
Activity: 31
Merit: 0
This can be a very good alternative to Bitcoin!
member
Activity: 110
Merit: 10
legendary
Activity: 2940
Merit: 1090
The next address in you list of upcoming addresses to use I used, I think.

(The wallet typically creates 100 addresses in advance when created.)

Basically each block it finds, probably including orphans, it mined to another new address you had not yet used.

Some people tell their walelt to generate thousands of addresses up front so they can put the same wallet on multiple machines so that until those pre-generated addresses have been used all the machines will "see" all the blocks mined by any of them. This lets them see from just one machine when some one of their many many machines they have rented or that are part of their botnet or whatever have found a block. (Though it obfuscates which machine it was exactly that found it; they'd have to check the debug.log logs of all the machines to discover which one it was that actually found the block.)

-MarkM-
member
Activity: 110
Merit: 10
ok noobie question here.

When solo mining using the primecoin wallet console and command "setgenerate true", if you do find a block where will it be sent ? to what address ?

Thanks for your help in advance.
newbie
Activity: 52
Merit: 0
hero member
Activity: 765
Merit: 503
Is the proof of work paper still around somewhere?  I get 404s on the links
legendary
Activity: 924
Merit: 1000
Hi Guys,

What is the difference between jhPrimeminer-T15-AVX.exe and jhPrimeminer-T15.exe in aerocloud's miner ?

thanks

AVX is a feature of modern CPUs, look here: http://en.wikipedia.org/wiki/Advanced_Vector_Extensions

According to AeroCloud, the factor of optimization is rather low (about 5%) and it needs more electrical power! So maybe, it's not worth the effort...
member
Activity: 110
Merit: 10
Hi Guys,

What is the difference between jhPrimeminer-T15-AVX.exe and jhPrimeminer-T15.exe in aerocloud's miner ?

thanks
legendary
Activity: 1205
Merit: 1010
5) An exploitation of the difficulty (Sunny King knows what I am referring to here, just ask Sunny).
Sunny ?

Supercomputing does Fermat test on the last number of a candidate chain first, rather than the first number first. This may improve the performance of Fermat test stage of the miner when fractional difficulty is high. After some discussion we agree that it should be considered a mining optimization rather than an exploit.
legendary
Activity: 1120
Merit: 1000
anyone got any tips for optimizing shares/s for pooled mining?
hero member
Activity: 1328
Merit: 563
MintDice.com | TG: t.me/MintDice
iMac with all cores running 24/7
The thing is going to explode. (i)Macs are extremely bad at handling constant heat.

ok, ty, ill change that.

Never mined anything before.

Is it possible to [profitably] solo mine with a 2010 iMac with all cores running 24/7 and free electricity?

Well if you have the hardware (no investment / capital cost) and free electricity (no operational costs) then yes, by definition you are mining with 100% profit.

Will you make A LOT of money from it? No. (Probably a few cents or tens of cents per day on average). You'll also want to look at pooled mining.

sounds pretty bad. ill look into pooled mining, thanks.
sr. member
Activity: 278
Merit: 250
5) An exploitation of the difficulty (Sunny King knows what I am referring to here, just ask Sunny).
Sunny ?

From Sunny King's design document.

"Block hash, the value that is embedded in the child block, is derived from hashing the
header together with the proof-of-work certificate. This not only prevents the proof-ofwork
certificate from being tampered with, but also defeats attempt at generating a single
proof-of-work certificate usable on multiple blocks on the block chain, since the block
header hash of a descendant block then depends on the certificate itself. Note that, if an
attacker generates a different proof-of-work certificate for an existing block, the block
would then have a different block hash even though the block content remains the same
other than the certificate, and would be accepted to the block chain as a sibling block to
the existing block
."

Unless I completely misunderstood the meaning of that statement, but why would generating a different proof-of-work certificate for an existing block be considered an attack? Which implies two things:

1) The difficulty of that block will be frozen, and you can add as many sibling  blocks as you whish, as the probability of finding the next sibling block is not much lower than finding the next block.
2) There is no mechanism in place to prevent spending from the sibling block, double spending attack.

Please let me know if I misunderstood something.

I think you have misunderstood the paragraph you quoted. That note is trying to say that the attack wouldn't work. The sibling blocks would all be orphans which makes them useless. Only one of the blocks will be part of the blockchain because its block hash is referenced from the next block in the blockchain. The block cannot be replaced unless you are able to create another block with the same block hash. I think Sunny was trying to say that it's not possible to create such a block in Primecoin even if the attacker finds a different proof-of-work certificate. That's because the certificate (i.e. the prime chain multiplier) is hashed into the block hash. Note that there are two hashes: the block header hash and the block hash. They are defined as follows:

blockHeaderHash = HASH(nVersion, hashPrevBlock, hashMerkleRoot, nTime, nBits, nNonce)
blockHash = HASH(nVersion, hashPrevBlock, hashMerkleRoot, nTime, nBits, nNonce, bnPrimeChainMultiplier)

The block hash is the "official" hash of the block which is referenced in the next block as hashPrevBlock.

Thank you mikaelh, your input is greatly appreciated and it saves me the trouble of going through the source code.

Thank you again.
newbie
Activity: 52
Merit: 0
@mikaelh Thank you for clarifying, could you also discuss shortly other enhancements pointed by Supercomputing? Not necessarily definitely, just from the perspective of your experience.
There are several enhancements which account for the drastic increase in performance over the current CPU implementation:
1) Montgomery Reduction is used.
2) The size of the multiprecision arithmetic is fixed.
3) An optimized sieve is running on the GPU.
4) An optimized primorial search is running on the GPU (double SHA-256).
5) An exploitation of the difficulty (Sunny King knows what I am referring to here, just ask Sunny).
Thanks
sr. member
Activity: 301
Merit: 250
5) An exploitation of the difficulty (Sunny King knows what I am referring to here, just ask Sunny).
Sunny ?

From Sunny King's design document.

"Block hash, the value that is embedded in the child block, is derived from hashing the
header together with the proof-of-work certificate. This not only prevents the proof-ofwork
certificate from being tampered with, but also defeats attempt at generating a single
proof-of-work certificate usable on multiple blocks on the block chain, since the block
header hash of a descendant block then depends on the certificate itself. Note that, if an
attacker generates a different proof-of-work certificate for an existing block, the block
would then have a different block hash even though the block content remains the same
other than the certificate, and would be accepted to the block chain as a sibling block to
the existing block
."

Unless I completely misunderstood the meaning of that statement, but why would generating a different proof-of-work certificate for an existing block be considered an attack? Which implies two things:

1) The difficulty of that block will be frozen, and you can add as many sibling  blocks as you whish, as the probability of finding the next sibling block is not much lower than finding the next block.
2) There is no mechanism in place to prevent spending from the sibling block, double spending attack.

Please let me know if I misunderstood something.

I think you have misunderstood the paragraph you quoted. That note is trying to say that the attack wouldn't work. The sibling blocks would all be orphans which makes them useless. Only one of the blocks will be part of the blockchain because its block hash is referenced from the next block in the blockchain. The block cannot be replaced unless you are able to create another block with the same block hash. I think Sunny was trying to say that it's not possible to create such a block in Primecoin even if the attacker finds a different proof-of-work certificate. That's because the certificate (i.e. the prime chain multiplier) is hashed into the block hash. Note that there are two hashes: the block header hash and the block hash. They are defined as follows:

blockHeaderHash = HASH(nVersion, hashPrevBlock, hashMerkleRoot, nTime, nBits, nNonce)
blockHash = HASH(nVersion, hashPrevBlock, hashMerkleRoot, nTime, nBits, nNonce, bnPrimeChainMultiplier)

The block hash is the "official" hash of the block which is referenced in the next block as hashPrevBlock.
sr. member
Activity: 278
Merit: 250
5) An exploitation of the difficulty (Sunny King knows what I am referring to here, just ask Sunny).
Sunny ?

From Sunny King's design document.

"Block hash, the value that is embedded in the child block, is derived from hashing the
header together with the proof-of-work certificate. This not only prevents the proof-ofwork
certificate from being tampered with, but also defeats attempt at generating a single
proof-of-work certificate usable on multiple blocks on the block chain, since the block
header hash of a descendant block then depends on the certificate itself. Note that, if an
attacker generates a different proof-of-work certificate for an existing block, the block
would then have a different block hash even though the block content remains the same
other than the certificate, and would be accepted to the block chain as a sibling block to
the existing block
."

Unless I completely misunderstood the meaning of that statement, but why would generating a different proof-of-work certificate for an existing block be considered an attack? Which implies two things:

1) The difficulty of that block will be frozen, and you can add as many sibling  blocks as you whish, as the probability of finding the next sibling block is not much lower than finding the next block.
2) There is no mechanism in place to prevent spending from the sibling block, double spending attack.

Please let me know if I misunderstood something.
hero member
Activity: 546
Merit: 500
Never mined anything before.

Is it possible to [profitably] solo mine with a 2010 iMac with all cores running 24/7 and free electricity?

Well if you have the hardware (no investment / capital cost) and free electricity (no operational costs) then yes, by definition you are mining with 100% profit.

Will you make A LOT of money from it? No. (Probably a few cents or tens of cents per day on average). You'll also want to look at pooled mining.
hero member
Activity: 1328
Merit: 563
MintDice.com | TG: t.me/MintDice
Never mined anything before.

Is it possible to [profitably] solo mine with a 2010 iMac with all cores running 24/7 and free electricity?
hero member
Activity: 637
Merit: 500
5) An exploitation of the difficulty (Sunny King knows what I am referring to here, just ask Sunny).
Sunny ?
Pages:
Jump to: