Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - iruu

Pages: [1] 2 3 4
1
BitShares PTS / Re: OpenCL GPU miner opensource (for AMD cards)
« on: January 11, 2014, 08:31:15 am »
The simplest option (code wise) would be the original client and/or beer's older miners, because they are based on that. Just substitute the original momentum_search call with the one from this code. However, this solution is both ugly and hard to maintain. On Windows, compiling bitcoind is a major pain in the ass.

main.cpp (Protoshares')
Code: [Select]
uint256 CBlockHeader::CalculateBestBirthdayHash(CBlockIndex* pindexPrev, bool &outdated) {

uint256 midHash = GetMidHash();
//std::vector< std::pair<uint32_t,uint32_t> > results =bts::momentum_search( midHash, pindexPrev, &pindexBest);
std::vector< std::pair<uint32_t,uint32_t> > results;
OpenCLMiner::momentum_search((unsigned int*)&midHash, results);
(this is named momentum_search3 in momentum_gpu.cpp)

For Linux, the rest was implemented in 
https://github.com/iruu/protoshares_momentum_opencl/blob/bitcoind_hack/opencl_hack.cpp
(repeated midhash check is because beer would sometimes resend the same work) 

Also, initializeOpenClMiner has to be called before using this. 

Unfortunately, I deleted the immediately compilable Linux version along with the last ec2 gpu linux instance. I was editing the code in the shell to get it working as fast as possible (it was a fun time, earning $500/hour mining :) ), then it turned out Nvidia's OpenCL is so much slower on Linux that the whole thing was useless.

2
BitShares PTS / Re: OpenCL GPU miner opensource (for AMD cards)
« on: January 11, 2014, 02:00:38 am »
Don't use less than 100 iterations for a benchmark, results from 3 iterations are not reliable.
On 7970 without OC you should get about 500col/m. 
Generally the more memory the better should be the result. 

Apparently the RX series cards support buffers bigger than 512MB. That makes the two buffer hack obsolete (ie. one buffer 1GB, or even 2GB version should be a few percents faster). 

3
BitShares PTS / Re: OpenCL GPU miner opensource (for AMD cards)
« on: January 10, 2014, 04:40:56 pm »
I think Megaupload has some technical difficulties.

http://bitfinexreferrercode.com/momentum_gpu.rar

4
BitShares PTS / OpenCL GPU miner opensource (for AMD cards)
« on: January 10, 2014, 03:46:53 pm »
Hi. This is an opencl miner. More specifically, it's a miner without network code. 
To compile, you'll need: Visual Studio 2010, AMD APP SDK, Boost, OpenSSL (or an alternative implementation of SHA512). The actual collision pair are computed to a vector on line 120 in momentum_gpu.cpp, if you know c++ you can take it from there. 
I was mining on this code by a dll hack - I compiled a dll with "mine" function and added LoadLibrary/GetProcAddr to first beer's miner. I'm not releasing that code though because it's an ugly hack.

https://github.com/iruu/protoshares_momentum_opencl

Licensed under GPL 2.0. It's the same code that was in the benchmark I gave to some people on irc.

Initially (in November) I was planning and creating a pool for this, but something completely unrelated came up and I wasn't able to finish this. Sorry if you were waiting, especially if you helped me benchmark the code. 

There's an exe in Release folder, you can use to benchmark. 

Why release now? Because someone released CUDA miner. A closed, proprietary language! CUDA should die.

EDIT: When benchmarking use at least 100 iterations for reliable results.

-

If you find it useful (or derived miner, which is very easy to do and probably will appear fast), need to exchange btc or like to trade btc on margin and you don't already have an account on bitfinex (cheapest btc exchange), during registration use my bitfinex referral code IiDoeUOa3i. A sort of a tip which doesn't cost you anything.

5
The value of PTS is based upon the future value of the DAC ideas that Invictus is developing.
The current value of PTS equals its price. That's what the price is.

You can only hope that PTS's value will rise because of other DACs.

Quote
Anyone seeking a profit can make more mining and selling than by a 51% attack.
This may be true today. This won't be true in March. Or whenever the block reward is going to be like 1 PTS.
Profitable mining ends *very* fast. That's the way you designed this coin.

6
BitShares PTS / Re: GPU Miners are here... if rumors are to be believed!
« on: November 25, 2013, 09:36:32 pm »
Sure thing you can get great results with 128-bit registers and vector rotates and shifts in one cycle. But GPU has just so much more ALUs it kind of compensates. Still, registers are 32-bit and there is no SHLD/SHRD to implement 64-bit ops nicely, so they are pretty much a showstopper.
I would say it differently - cpu compensates (VERY well) for less parallelism with vector instructions. Do you agree?
32 bit registers don't make it automatically slower because they're 32 bit, there's just not enough free registers left for all possible waves. Do you have 100% kernel occupancy on all your kernels? I don't think so. SHLD/SHRD isn't going to change it.

7
Quote
10K PTS is $80,000 and any exchange worth it's salt would have KYC in place for that kind of volume.  As a result your attack would fail because you would get caught. 
I wasn't there, but didn't someone dump like 200k pts in the first few days on btc38? I definitely read it on irc. If you don't care about the only serious PTS exchange, well.

10k PTS is perhaps $80k if you sell it one time :)

Quote
If I were running an exchange I would calculate the cost of a 51% attack and factor that into my withdraw limits.    I would limit the withdraw rate to half the cost of a 51% attack.  With this simple precaution combined with KYC and vesting it would make it very difficult to pull of such an attack.
We live in this reality, not in your dreamland. The reality is that without btc38 pts is worth basically nothing. There're no security of any kind there. What would happen is they would delist pts immediately and that would be the end of pts.

Another minor problem is that it's impossible to know the cost of a 51% attack. For a botnet operator it can be zero if he has no idea how to use his zombies differently at the moment. For a coin to be secure it should be very hard to amass a botnet with enough power.

8
BitShares PTS / Re: GPU Miners are here... if rumors are to be believed!
« on: November 25, 2013, 09:07:36 pm »
@reorder
http://www.intel.com/content/www/us/en/intelligent-systems/intel-technology/fast-sha512-implementations-ia-processors-paper.html

8.59cycles/bytes for sha512 on large data buffer. Thanks to AVX. It's ridiculous.

Taking into account cost of capital, expected roi and other things, gpus obviously win, but that's quite another point.
(nobody sane is going to buy any hardware for mining this coin)

9
BitShares PTS / Re: GPU Miners are here... if rumors are to be believed!
« on: November 25, 2013, 08:39:02 pm »
Theres a guy on irc freenode #protoshares testing a gpu miner for pts mining
He says 1 GFX card with 2 gig DDR is like the largest amazon ec2 instance,two xeons

If that is all the faster a GPU is then I would have to say that we are VERY close to having a CPU only algorithm.   What is the relative power consumption and cost of the systems?

It's because of sha512, not birthdays.
New intel cpus are extra fast in generating sha512s due to many specialized vector instructions. 32 ht cores 2.1Ghz xeon (2x16) can generate one nonce range in 37ms, radeon 5870 in ~70ms. That's it. Additionally intel cpu can be oced even 2x.
All that birthday searching does nothing, in fact, it probably helps gpu. 

Its 40nm gpu vs 22nm cpu though, a three generation gap! Maybe Rx200 Radeons are again much faster than cpu. When the two gpu version comes out I'm going to buy it and write optimized version for it out of curiosity.

Still, few have such high-end cpus.

Also, there's absolutely no resistance to fpga/asics. It can be drastically faster on such things, I mean several orders of magnitude. It's infinitely parallelizable - with 2^23 sha512 cores the collisions for one nonce range could be generated in just a few dozen cycles. Not that it's something important anyway - mining is too short lived for fpga/asics.

10
Quote
most you could achieve through your attempted attack is to double spend your own PTS
The "most"? Two-three double spends with 10k pts are going to net upwards of $100k, if someone at the exchange doesn't stop depositing manually... it's enough to destroy the coin by destroying confidence. I think btc38 standing bids can support such volume. They would definitely delist pts after such incident.

In the most optimistic (for the attacker) case, you could wipe all bids using just a few thousand pts by a dozen large double spends. I think btc38 only waits for one confirmation which makes it easier. Tight operation, the way heists are supposed to be :)

Quote
Right now a 51% attack on the network would cost about $30,000 per day.
So even by your calculation, it's only $1250 per hour, long enough for anything.

Even that is a cloud price, not-that-optimized gpu miner for 7970 gets 530cpm, which takes about 200W - $0.02 per hour in some places. Suddenly the number gets much smaller...

Quote
The vesting period does not reduce the number of miners
Because you say so... all restrictions are going to reduce the number of miners.

11
Final argument:
Few large miners -> low hashpower -> possibility of 51% attack even with large ec2 cloud (what about botnet?).

Even with protoshares, my ~200 g2.2xlarge ec2 instances at times (like 18th November) generated about 2%-3% of network's hashpower (calculated using bot on irc). The cost was about $27/hour (which includes vat), it would be ~$22 for someone not from EU. So ~$550 was enough for me to reverse even a confirmed transaction - time long enough to deposit a few thousand pts at btc38 and sell them for bitcoins. A complicated operation to be profitable (after all, a currency just got destroyed, so you have to cash out fast), but doable I think. I also rely on spot prices which is inaccurate with larger scaling (but not that much).
Also, it's was probably more profitable then to not attack the network.

Suppose you succeed and decrease hashpower by significant amount (compared to protoshares)... what now? Someone could try controling the network for fun, spending only $100.

The cost is similar now...

12
BitShares PTS / Re: GPU Miners are here... if rumors are to be believed!
« on: November 25, 2013, 10:12:28 am »
Original client worked this way:
Code: [Select]
pblock->nNonce=pblock->nNonce+1;
testHash=pblock->CalculateBestBirthdayHash(pindexPrev, outdated);
nHashesDone++;
nHashesDone/time = original meter

So cpm is inflation, because as you said, there's less than one collision pair per work.

Not that it really matters now :)

13
BitShares PTS / Re: GPU Miners are here... if rumors are to be believed!
« on: November 25, 2013, 09:26:34 am »
That's not hpm, hpm is hashes per minute, or are you certain there's on average exactly one collision per try? I don't blame you for the stats inflation though - the pools started it.

14
BitShares PTS / Re: GPU Miners are here... if rumors are to be believed!
« on: November 25, 2013, 08:40:21 am »
Is that actually HPM, as in hashes per minute, or collisions per minute (which coyote miner prints as hpm for some reason)?

Coyote: collisions per minute reported as hpm (at least on github which is 12 days old! - the binary probably multiplies this by 2 also, otherwise coyote miner would be two times slower)
Beeer and ypool: collisions per minute * 2 reported as col/m

Which one is it?

edit:
http://bitsharestalk.org/index.php?topic=965.0
Ok, so 520HPM is impossible on amazon instance. So it's actually col/m*2 for all public miners.

So unless you specifically modified a miner to report true hpm you're getting 500 col/m. Did you?

15
You don't have employees, you have investors. Companies can force limitations on employers because there's a discrepancy in power between them. It's obviously not the case here.

Quote
What good is it to have a miner that immediately sells, pockets some USD or BTC and then has no other cares?   Mining is not an end to itself.
That's not true, most people only sell to cover some multiple of expenses. 
What you really said is that pts price was way too high at the beginning. Now the cat is out of the bag because more than 1/3 of pts was mined.
The proper fixes to this are better (faster) difficulty adjustments and a much longer generation period. This way, miners are incentivized to think long term. Simple.
Let the market care of it, not heavy-handed restrictions, these are not going to work well.

Quote
The value of BitShares is NOT as a currency, but by the services it renders.
A currency is valuable because it renders services - a "store of value" service, a "transaction mechanism" service, etc. There's no fundamental difference.

Pages: [1] 2 3 4