Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×
Bitcoin Encryption The Almighty Buck Technology

How a Bitcoin Transaction Actually Works 174

An anonymous reader writes "Michael Nielsen has written a detailed article describing the nuts and bolts of a Bitcoin transaction. He builds the concepts from the ground up, starting with a basic, no-frills digital currency. He then examines it for flaws and tweaks the currency to patch up areas where we run into technical or security problems. Eventually, he ends up with Bitcoin, and explains how a transaction works. It's an interesting, technical read; much more in-depth than any explanation I've heard. Here's a brief snippet from a walkthrough of the transaction data: 'One thing to note about the input is that there's nothing explicitly specifying how many bitcoins from the previous transaction should be spent in this transaction. In fact, all the bitcoins from the n=0th output of the previous transaction are spent. So, for example, if the n=0th output of the earlier transaction was 2 bitcoins, then 2 bitcoins will be spent in this transaction. This seems like an inconvenient restriction – like trying to buy bread with a 20 dollar note, and not being able to break the note down. The solution, of course, is to have a mechanism for providing change. This can be done using transactions with multiple inputs and outputs...'" Bitcoin is going through another period of heavy fluctuation: it fell from a high of around $1,200 per bitcoin to roughly half that, and as of this writing trades around $760 per bitcoin.
This discussion has been archived. No new comments can be posted.

How a Bitcoin Transaction Actually Works

Comments Filter:
  • Comment removed (Score:5, Insightful)

    by account_deleted ( 4530225 ) on Saturday December 07, 2013 @05:00PM (#45628993)
    Comment removed based on user account deletion
    • by FlyHelicopters ( 1540845 ) on Saturday December 07, 2013 @05:12PM (#45629065)
      Yes, but I'm shocked at how no one is talking about the amount of electricity being wasted to generate digital coins.

      I thought we were trying to be all green now, yet the very idea of bitcoin and the idea that we'll be running mining for the next 2 decades runs very counter to that idea.

      • Re: (Score:1, Informative)

        Comment removed based on user account deletion
        • Oh, people /have/ talked about that since day one, and this objection has been pretty thoroughly debunked...

          Eh? How so? None of the examples you provided have debunked it...

          If Bitcoin were to take over for the US dollar, all your examples would become true about it.

          The only difference? A huge amount of power would be consumed to verify bitcoin transfers and the chain would become very long indeed.

          There is nothing special about 1s and 0s in a computer, Bitcoin's entire design is about how we can consume as many resources as possible to create them, when in truth they could be created out of thin air. (j

          • by gox ( 1595435 ) on Sunday December 08, 2013 @03:49AM (#45631425)

            There is nothing special about 1s and 0s in a computer, Bitcoin's entire design is about how we can consume as many resources as possible to create them, when in truth they could be created out of thin air. (just like US Dollars are)

            First of all, the resources are not used to create the coins, they are used to support the distributed notarization system. Even if no coins were being issued, you would need the same process, and indeed it is slowly becoming the case as the block reward drops. So the "created out of thin air" bit doesn't have any relevance to the proof of work requirement. That's a common misconception that even Paul Krugman got wrong.

            At this point, we (as humanity) don't know a better way to create a decentralized notarization system, but there are some candidates. After any of these are proven to be secure enough, Bitcoin can make the let go of the proof of work scheme. Until then, it's not fair to say that Bitcoin consumes as many resources as possible, even though within the system that might be true.

        • by Goaway ( 82658 )

          this objection has been pretty thoroughly debunked...

          Debunked in the traditional bitcoiner way, yes: Handwaved away, ignored, and claimed to be debunked.

          It is probably still far cheaper than the old-fashioned way of doing things

          As we see here. Claim it is "far cheaper than the old-fashioned way", ignore that the old-fashioned way is handling many orders of magnitude more transactions, and pretend bitcoin wouldn't need to scale up dramatically to handle the same.

      • Re: (Score:2, Insightful)

        Yes, but I'm shocked at how no one is talking about the amount of electricity being wasted to generate digital coins.

        Most bitcoins are mined where electricity is cheap, like Iceland and the US Pacific Northwest, that use hydropower. Water flowing through a turbine really isn't causing much environmental damage. Compared to the environmental damage of gold mining, this is much better.

        • like Iceland and the US Pacific Northwest, that use hydropower. Water flowing through a turbine really isn't causing much environmental damage

          Except that the hydropower that is used this way cannot be transported to other regions and displace coal power. Now for an isolated island like Iceland, transporting is not an option, but I guess for the US Pacific Northwest it may be.

      • by TeknoHog ( 164938 ) on Saturday December 07, 2013 @06:02PM (#45629321) Homepage Journal
        Hence Peercoin [peercoin.net].
      • Mining you say? Like actual mining which brings minerals out of the ground and thus gives a currency an economic anchor in value? I think you'll find it's more environmentally friendly to mine bitcoins.

        The whole concept of mining helps enforce the scarcity of the currency. The fact electricity costs real money is one of the economic underpinnings of the currency.

        • by Anonymous Coward

          >he fact electricity costs *real money* is one of the economic underpinnings of the *currency*.

          First call out: yes. Bit coins cost real money to make

          Second call out: BTC isn't a currency. It's a tradable security. Just try to buy your groceries with it.

          Dumbass

          • by Anonymous Coward

            Just try to buy your groceries with it.

            If you live in a city like San Francisco it's at the point where you can almost live off BitCoin [forbes.com] if you are determined to, including groceries. It's far from easy, but it's coming slowly.

        • The fact electricity costs real money is one of the economic underpinnings of the currency.

          It is irony that you use the term "real money" when talking about paying for electricity to create bitcoins.

          What happens when the power company will accept payment in bitcoin? It becomes a circle jerk, you use the power from the electric company to produce more bitcoins than it costs.

          Except, that is like saying you have to only pay $500 to buy a tree that grows $1,000. If everyone can do it, then money becomes worthless.

          If everyone can't do it, then you have a lot of trees being grown just to produ

          • Ahhh both worth is not a fixed term.

            You can compare that to real money as well. It costs more to create a nickel then what it's worth. The problem is that the nickel is unique in a group of denominations made of other materials with different value so it hasn't affected the currency.

            What a more practical example? Let's mine gold.

            It costs money and energy to get the gold out of the ground. The end result is that the price of gold will trend in the long run at a value higher than the cost of digging it out of

            • Re: (Score:3, Insightful)

              Frankly, you're just arguing to argue...

              Even if a nickle costs 6 cents to make, it gets used over and over again without incurring any further costs. There is a cost in compute power every time a bitcoin changes hands. Pollution created by mining gold doesn't have to be repeated over and over either, and there are practical useful applications for gold, between jewelry and electronic manufacturing.

              Bitcoin has no actual practical utility. It is just an expensive, polluting way to come up with another

              • No I'm arguing to correct your miss-conception that somehow dollars a magically green while bitcoin is the source of all pollution.

                The reality is that a modern economy is underpinned by a stupid amount of computing infrastructure. All the bitcoin mining going on in the world and happily keeping the currency running is a small pittance compared to the computing power required to keep the banks operating. Or do you think you can compare giving someone cold hard cash to whisking a bitcoin all the way around th

                • I think you're polluting just as much if not more by supporting the banking infrastructure.

                  But that is the point you're missing... the banking infrastructure won't go away, even if bitcoin completely replaces the USD.

                  This is not some fantasy world where bitcoin is going to replace the banks and wall street. It is just another tool, not a new system.

                  So bitcoin will just add to the existing system, not replace it.

                  • It may not completely but it may go away enough to offset it. Not right now, but maybe in 20 years. Hell look at the movement away from cash in some countries. You know how much money I keep in my wallet? None. I can tap my bank card on the side of vending machines now to get my coke. None the less the debate we're having right now was identical to the one from back 30 years ago how the credit card would never displace cash, and if they cared about it back then someone would have complained about the carbon

            • check out:
              http://mining.thegenesisblock.com/a/b58934cea0 [thegenesisblock.com]

              I was curious how much 1000 Ghash/sec would cost, and pay out. A $3600 ASIC miner will pay for itself in under 5 days, and the estimated ROI after 1 year is about $40,000 (it actually starts losing $10 - $20 a month the last few months based on current rates) and then you could just buy the next one and keep making $

              I was surprised!
              Cheers

              • What's the incentive for the company to sell their ASIC miner, given those numbers? They would make more money just by plugging it in, wouldn't they?

      • by MrKaos ( 858439 )
        Yes, but I'm shocked at how no one is talking about the amount of "first post" trolls wasted with an actual insightful first post.
      • by hodet ( 620484 )

        Say you are to compare bitcoin to gold. (and i am not saying that bitcoin is gold 2.0... but for the sake of argument). Is it not expected that you will need to expend huge amounts of resources to mine gold? Does that discourage physical miners from expending huge amounts of resources, quite possibly to the detriment of the planet? No, they do this because it is profitable to do so, despite objections from environmentalists. Why should we abondon bitcoin because it consumes electricity? Also, what is

        • The problem with that is I can't type a few letters into a computer and create gold. Gold has real uses, it is actually rare.

          Bitcoins are not rare, they are 1s and 0s in a computer, it is artificial scarcity, nothing more.

          • by hodet ( 620484 )

            They have value because people assign value to it, just like gold. The usefulness of gold is way overrated. There are tonnes and tonnes of it sitting there doing nothing except acting as a store of value. The scarcity of gold is only caused by people hording it, it has relatively little use otherwise. I would say there is artificial scarcity to gold as well.

      • Altcoins like Gridcoin seek to put that wasted electricity to use, doing BOINC work and earning coin credits for it.
        Seems like a great plan, doing more than just signing transactions with busy work.

      • by antdude ( 79039 )

        It's not worth it to me since it gets too hot during the heat waves (up to 90F degrees in my upstair tiny room).

      • Electricity being wasted ?
        I suggest mining bitcoins in winter only.
        The Joule effect will convert all the "wasted" electricity into heat which you need anyway.
    • by Anonymous Coward

      1. I can't wrap my head around it. At least with a fiat currency, I can hold a bill in my hand, walk into a store and change it into a tangible good. I can change numbers in my bank into currency at any time.

      2. The financial institution where numerical representations of said currency will debit or credit those numbers accordingly and everyone recognizes it as a transaction.

      3. And those numbers/money are guaranteed up to $250,000 by the FDIC or NCUSIF. I am not at the mercy of my hard drive and backups.

      4.

      • The last sentence of Point 1 doesn't apply for dollars either. You don't get currency, you get bills. The bills you hold in your hand are not the money. You may think that it is, but it isn't. People in Russia had to learn it the hard way when Boris Yeltsin decided to fight inflation by declaring the 100 Rouble bills as invalid. Many people collected their savings at home in exactly those bills. And so that day they lost a lot of money, despite losing not a single one of those bills. Which proves that the b

      • by Smauler ( 915644 )

        Currency is worth what someone is willing to exchange goods for.

        At least with a fiat currency, I can hold a bill in my hand, walk into a store and change it into a tangible good.

        Fiat currencies, just like bitcoin, rely upon trust. Trust that the currency won't devalue, and trust that other people will take it. Bitcoin doesn't have the latter, really, and that's why I won't touch it either.

        • by AK Marc ( 707885 )
          The same applies to gold. Gold only has value if others say it does. The trust is higher, but the tangibility isn't.
      • by sjames ( 1099 )

        Item 1: Bitcoins are cash that you can transmit. Like cash, if you misplace it or it is destroyed, it's gone. If you stuff the mattress with your life savings, that could become a serious issue.

        Item 2 and 6: Bitcoins are, in effect, a foreign currency. They have an exchange rate with your local currency and their value in your local currency is based on the faith a local exchange has in them.

        The rest: Bitcoins are not a bank, but there's no reason a bank (complete w/ FDIC insurance) couldn't accept bitcoins

    • I belive a truer statement would be (changes in bold)

      If you think about how to distribute the initial bitcoins (somewhat) equitably, the only non-exploitable and automatic method you can realistically come up with - that involves no central authority - is approximately the one bitcoin uses: Hand out the bitcoins slowly over a period of time via an automatic lottery, and in proportion to computing power. (Anything else, such as: in proportion to the number of nodes, etc. gets easily exploited.)

      Bitcoin was cr

    • by neoform ( 551705 )

      >Once you have this awesome protocol for money transmission, the next question is: how to get bitcoins in wide and equitable circulation in the first place?

      Why does it have to be a new currency? Why can't we have digital USD that can be transmitted this easily without the use of credit cards?

      The government is in charge of printing money, why isn't it in charge of creating/handling digital currency?

      • Why can't we have digital USD that can be transmitted this easily without the use of credit cards?

        We can. It's called Dwolla. And at the current exchange rate, its 0.25 USD transaction fee isn't that much higher than the 0.0001 BTC transaction fee of Bitcoin.

        • by neoform ( 551705 )

          That is not a government run institution. There should be no fees associated with online money transfers or payments.

  • by Anonymous Coward

    $20 to $1200 to $600 to $750, etc in a year? This is not a *currency* in any reasonable economic definition beyond "any medium used for exchange". It's much more like a *commodity* (and a crazy volatile one at that).

    • by AK Marc ( 707885 ) on Sunday December 08, 2013 @01:57AM (#45631145)
      Nah, bitcoin was steady, it was the USD that was fluctuating.
    • Far too many people point to the rapid rise in value of BitCoins as a feature, not a bug. They are confusing investment returns with usefulness as a medium of exchange.

      Any actual currency that unpredictably changed in value in relation to something you'd actually want to buy (like USD/EUR/etc.) by several % a day All. The. Time. would be considered an economic catastrophe for any economy that relied on said currency. For starters it makes a functioning credit market 100% impossible. You'd have to be out

  • Blah blah blah ponzi scheme
    Wank wank not real money
    *cough*cough*hyper-inflation
    warghaghgahgahl... money laundering

    Have I missed any?
    • Yes, you missed your point ;D

    • Re: (Score:1, Troll)

      by Holi ( 250190 )

      Who is Satoshi Nakamoto? I think that might be the big one. Remember he/they own almost 3/4's of all the bitcoins mined
      This one individual or group has the power to crash the entire bitcoin economy if so desired.

    • Tulips! Tulips! My kingdom for tulips!

      Nope, that's not quite right..

      Tulip or not tulip? That is the question.

    • Have I missed any?

      The ease of use for criminal activities.

    • Blah blah blah ponzi scheme

      Wank wank not real money

      *cough*cough*hyper-inflation

      warghaghgahgahl... money laundering

      Have I missed any?

      Gah! Gah! Child Pornography!

      Whoa, Whoa... terrorism!

      Huh? Huh? Who is Satoshi Nakamoto?

      Look! Look! Just like tulips!

      Nope, Nope - can't pay taxes!

    • You missed unstable price fluctuations, no roadmap for ubiquitous deployment, and shady exchanges. I'm sure that there are more.
      • Nope, nope. you're talking about regular government sponsored monies. This is about bitcoin.

    • by Rufty ( 37223 )
      Tulips. You forgot the tulips.
    • by Kiuas ( 1084567 )

      Blah blah blah ponzi scheme
      Wank wank not real money
      *cough*cough*hyper-inflation
      warghaghgahgahl... money laundering

      Have I missed any?

      Yes, you have missed the point that with the possible exception of money-laundering all of those are in fact valid points that have yet to been answered by the pro-bitcoin people. You also confused inflation with deflation.

      Bitcoin is most certainly not a real currency at this point. It's a commodity that a very limited set of mostly online services accept as a form of payment.

  • The cited article is interesting, but he never gets into Bitcoin's "contract" capabiilty. There have been proposals to add mechanisms to Bitcoin so that you could send Bitcoins to someone, but they couldn't spend them until the sender committed the transaction. This provides a way to insure you get the goods when you order something.

    So far, that's a future feature, not a usable one. This is why Bitcoin remains the scammer's paradise - anonymous, irrevocable remote money transfer. There's little risk of a

    • by ledow ( 319597 )

      I don't see how giving either side of a transaction the ability to back out really fixes anything.

      All that will happen is that fraud will shift to ordering products/services, and then withholding the Bitcoin that is "in escrow". Seller gets screwed and buyer gets free stuff.

      There is no way to have a mutual, simultaneous exchange of goods/services/payment that doesn't allow fraud on at least one side. If there was, we'd have been using it decades ago.

      All the Bitcoin "contract" does is introduce a trusted i

      • There is no way to have a mutual, simultaneous exchange of goods/services/payment that doesn't allow fraud on at least one side.

        Sure there is: both sides arrange a meeting to do the exchange, and carry an armed handgrenade with them. If their grip slackens, for example because a sniper shot them, the grenade goes off, kills both parties and destroys the goods/money.

        It's just too much trouble to bother for most transactions.

      • by paskie ( 539112 )

        (And who's going to be a trusted intermediary that the seller will adhere blindly to their opinion, and who would need to be able to prove reasonably that you DID or DID NOT receive the product that was sent? Answer: Nobody.)

        What about the post office / delivery company? That's how much of it works when ordering stuff online now too (often you pay the delivery man, or you can refuse the package if the goods is damaged).

  • This is a great article. It combines about 30 pages of info that I had to scan to learn it down to one.

    It also explains how to manipulate Bitcoin mining to guarantee you mine the next block. It's in the section on what happens when two miners have the next block in the blockchain ready at the same time:

    Occasionally, a fork will appear in the block chain. This can happen, for instance, if by chance two miners happen to validate a block of transactions near-simultaneously – both broadcast their newly-validated block out to the network, and some people update their block chain one way, and others update their block chain the other way:

    This causes exactly the problem we’re trying to avoid – **it’s no longer clear in what order transactions have occurred, and it may not be clear who owns which infocoins.** Fortunately, there’s a simple idea that can be used to remove any forks. The rule is this: if a fork occurs, people on the network keep track of both forks. But at any given time, miners only work to extend whichever fork is longest in their copy of the block chain.

    Suppose, for example, that we have a fork in which some miners receive block A first, and some miners receive block B first. Those miners who receive block A first will continue mining along that fork, while the others will mine along fork B. Let’s suppose that the miners working on fork B are the next to successfully mine a block:

    **After they receive news that this has happened, the miners working on fork A will notice that fork B is now longer, and will switch to working on that fork.**

    And the miners on fork B get paid their 20 BTC for mining the next block!

    Presto, in short order work on fork A will cease, and everyone will be working on the same linear chain, and block A can be ignored. Of course, any still-pending transactions in A will still be pending in the queues of the miners working on fork B, and so all transactions will eventually be validated.

    Presto indeed!

    If you set up inside a city fiber ring and made BTC exchanges and *also* mined BTC blockschain solutions you could game o

    • If you set up inside a city fiber ring and made BTC exchanges and *also* mined BTC blockschain solutions you could game out the transactions and network traffic so that **your BTC** solution was always the first available to the network because it is the closest geographically and by network topology!

      So how do you get **your BTC** solution? Because you still have to actually calculate it, which takes hours to weeks, at which point the main chain has had many other blocks added (one every 10 minutes, on ave

You will lose an important tape file.

Working...