Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Pure python bitcoin miner to understand how it works (github.com/jgarzik)
70 points by clay on April 18, 2011 | hide | past | favorite | 22 comments


One of my frustrations with bitcoin is that there is a small cable of investors who own significant amounts of the outstanding bitcoins. They stand to make a fortune if the currency were to take off and it seems that would leave us with an economy controlled by a small number of participants, defeating much of its potential benefits.

A better proposal would be to distribute the available bitcoins equally to everyone on the planet, creating a fair and true starting point... wishful thinking, or could we hack the algorithm and shortcodes to do this?


A better proposal would be to distribute the available bitcoins equally to everyone on the planet, creating a fair and true starting point

That's exactly the point of the algorithm, but instead of distributing bitcoins to everyone in the planet, it distributes it to everyone running the software.


72% of bitcoins are not generated yet.

The largest known amount is 400000 BTC, that is around 2% of 21m coins.

2% of US money supply (M2) is around 180 billions.

And the owner of that coins should wait decades, before bitcoin economy reach such size. Probably they will spend it long before that time.


Historically, 'equal initial distribution' hasn't seemed necessary for a money to be adopted. Equal initial distribution might not even be desirable for spurring adoption; among other things, it implies a 'big bang launch' rather than 'money MVP', and giving a new thing mostly to people who (quite reasonably) won't understand or value it.

But I suppose it's possible. First, assign all 7 billion persons a unique ID and ensure they have a secure communications channel. Then, create a Bitcoin-analogous system with different initial parameters, whose difficulty of minting coins only escalates after you create the first 7 billion in private. Then, send those first 7 billion coins to everyone via the secure channel. Voila, the 'potential benefits' of equal distribution should arrive soon thereafter.


Isn't it still possible to get in on this?

Early is relative, but if bitcoin ever makes it to any substantial point wouldn't that imply people buying bitcoin now will make huge profits? Maybe you can't be Larry & Sergey, but you can be be a pre-IPO investor. I think.


[Early adopters] stand to make a fortune if the currency were to take off and it seems that would leave us with an economy controlled by a small number of participants, defeating much of its potential benefits.

This is only true if early adopters keep holding onto their bitcoins as the value rises. In practice, only a very few will do this.

I started mining about a month ago, which will qualify me as an early adopter if this really takes off. And I can tell you right now that if the exchange rate were to spike to something like $10 within the next year or so, I would probably cash out all or nearly all of my holdings, on the hypothesis that a correction was coming soon. Anyone who buys now and continues to hold at $10, at $50, at $100, ... and finally cashes out at $1000, probably deserves their fortune for exhibiting that level of foresight, patience, and self-control.


You could always spawn off your own chain. Like with most things, including the gold rush, people struck it early and are likely to profit if it takes off. But there isn't anything stopping you from grabbing a pick axe and mining yourself.


1) Invent your own digital currency 2) ??? 3) Profit


There is even a javascript implementation out there somewhere but it only runs at 4khash/sec.

Oh here's a variation https://github.com/progranism/Bitcoin-JavaScript-Miner

But what we really need is some code with true hash throttling because limiting it to one CPU just makes performance unbalanced as it still runs at max cpu.


for pure curiosity... isn't bitcoin like a pyramid scheme? 25% of the money is with the early adopters and the first individuals have big amounts compared to people that came 1year after.


I would think that early adopters must be given some incentive, otherwise such things would never get off the ground.

But they had to invest computational power into it, so their power bill went up, so it wasn't "free" for them.


Not necessarily. But it does seem that most the interest is oriented around speculation rather than actual usage and that this sort of behavior could create an unhealthy dynamic that turns it into a fiasco.


The same could be said of LLCs. Early investors can snag a large proportion of the total shares for a relatively cheap price.


Could you describe how that makes it like a pyramid scheme?


The return one gets is a function of elapsed time since bitcoin started with every newcomer getting ever-diminishing returns even if they expend the (Moore's law inflation adjusted) same amount of work. With pyramid schemes, the wealth of those who got in early is entirely supported by those who came in under them at a later date. It's not entirely analogous as later bitcoin adopters aren't kicking back value to the early adopters, but there are similarities in the end result: someone new to bitcoin in the year 2029 has no chance of catching up with those who were new in 2009 due to the fact that the total number of bitcoins has been mathematically limited to 21,000,000: http://www.bitcoin.org/faq#How_are_new_Bitcoins_created


But there's more money being created every day, for the next decade or so (I believe). Once Bitcoin drops off Hacker News, there's probably going to be inflation rather than deflation. But if bitcoin does take off and they get rich, well, good for them for spotting the next big thing!


Can anyone provide an explanation as to what we're looking at here?


This python script is communicating with the bitcoin program (the one available from the bitcoin website which is running in headless mode) via JSON-RPC. It's asking the program which is communicating with all the other nodes for work, performing that work and returning an answer eventually to the bitcoin program which then will propagate it to other nodes. This python script is simply performing the work in python instead of (in parallel?) the bitcoin headless server performing the work.

Essentially, attempting to implement the communication protocol of bitcoin, it's piggy backing off the bitcoin application and just attempting to perform the work. If you've ever looked at the "specification" of the communication protocol you can certainly emphasise going with this route.


How long does it take to create a coin using the official client? The only coin I have is from that bit coin faucet that I heard about a while back. I've been running the client now for almost a month, and nothing. I've dedicated 2 of my laptop cores on coin generation, but I haven't seen anything. Or, are the only people getting coins those that are using their GPUs to generate coins?


Check how many khash/s do you process and use this calculator http://www.alloscomp.com/bitcoin/calculator.php to estimate how long you'll have to wait to get bitcoins with 95% probability.

I currently have 150 000 khash/s on Radeon HD 6850 And I'm hoping to see 50 bitcoins per two months (I don't run my computer 24/7).

Six core AMD 1090T does only 9 000 khash/s so with two cores of laptop you'll see your first mined bitcoin exactly 5 seconds after hell freezes over. ;-)


You probably want to ditch the official client join a mining pool to get anything, but sadly without a GPU you won't get much. I just started goofing around this weekend and earned like 0.07 BTC from three computers over at http://btcmine.com/. But I was surprised I actually could use the GPU on my MacBook Pro, not that it's anywhere as fast as the ones serious miners are using.


Ok, I want a lesson on this. @tenzwarszawy




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: