Lecture Note
University
Princeton UniversityCourse
Bitcoin and Cryptocurrency TechnologiesPages
2
Academic year
8
anon
Views
9
Bitcoin Transactions Welcome to the third lesson in our Bitcoin series. In this lecture, we will examine Bitcoin's workings at a rather basic level. To prepare for everything we want to discuss for theremainder of the course, we will look at real data structures, real scripts, and learn thespecifics and language of Bitcoin. We will talk about the particulars and peculiarities thatmake Bitcoin what it is. From the previous lesson, the append-only ledger that the Bitcoin consensus method provides is a data structure that we can only write to, and once it is written, it remains thereindefinitely. A decentralized mechanism exists to reach agreement on the worth of thatledger. Furthermore, the protocol's miners are also responsible for validating transactions.They ensure that the currency can operate properly, that transactions are well-formed, andthat there are no double spendings. The specifics of how we create that money to enable the miners to carry out this entire process will be examined in this presentation. We'll start by examining Bitcoin transactions.The essential building blocks on which the entire currency is founded are transactions. Wehave this append-only ledger, so we continue to add units to it over time. Instead of havingblocks, our model will be streamlined so that each transaction is put to the ledgerindividually. The first model you might think of, which is actually a lot of people's mental model for how Bitcoin works, is that you would have an account-based system. You can add sometransactions that create new coins and credit them to somebody. Later, you can transferthem, and you would have a transaction that would say, "we're moving 17 coins from Alice toBob." That will be signed by Alice to authorize the transaction, and that's all the informationthat would be contained. Backing this up, there would be some state that says that after Alice received 25 coins in the first transaction and transferred 17 coins to Bob in the second transaction, Alice wouldhave an account that is left with 8 Bitcoins. We can add a few additional transactions to the ledger after Alice transfers money to Bob. We'll suppose Bob gives Charlie some Bitcoins, and Charlie gives Alice some coins. At thismoment, Alice, Bob, and Charlie are the participants, and each of them has an account witha different value. And every time we add a new transaction, their values will change. The downside of this system is that we have to remember what the account balance is for each participant to figure out if this transaction is valid or not. Does Alice have the 15 coinsthat she is trying to transfer to David here? Looking at this with the naked eye, it's quite hard to tell, to do the mental arithmetic, and to figure out if Alice has enough money to transfer to David. In fact, to figure this out, youwould have to look backward in time forever to see every transaction affecting Alice and
whether or not her net balance at the time of trying to transfer 15 coins to David is greaterthan 15 coins. To tell if this transaction is valid or not, we need a mechanism that allows usto see whether Alice has enough coins in her account or not. We can use an unspent transaction output model to solve this issue (UTXO). This concept treats each Bitcoin as a distinct entity and issues it a unique identification number,or UTXO. The UTXO linked to a Bitcoin is transferred to the new owner when it is sent fromone party to another.
Bitcoin Transactions: Understanding the Building Blocks of the Currency
Please or to post comments