How Do Bitcoin Transactions Actually Work?
Whether you’re interested in becoming a developer for blockchain applications, or you’re just looking to understand what happens under the hood when you send bitcoin to a friend, it’s good to have a working knowledge of what happens when you create and broadcast Bitcoin transactions to the Bitcoin network. Why?
Because transactions are a basic entity on top of which the bitcoin blockchain is constructed. Transactions are the result of a brilliant collision of cryptography, data structures, and simple non-turing-complete scripting. They’re simple enough that common transaction types aren’t overly-complex, but flexible enough to allow developers to encode fairly customized transactions types as well. Today we’ll take a tour of the former.
As a developer, how does your bitcoin client post a new transaction to the network (and what happens when it’s received)?
What exactly is happening when you send some bitcoin to a friend?
This post will assume that the reader has a basic understanding of hashing, asymmetric cryptography, and P2P networking. It’s also a good idea to have a good sense for what exactly a blockchain is, even if you’re unfamiliar with any specific mechanics.
Bitcoin Transactions and their role in the bigger picture
Bitcoin is comprised of a few major pieces: nodes and a blockchain. The role of a typical node is to maintain its own blockchain version and update it once it hears of a “better” (longer) version. Simply put, the blockchain has blocks, and blocks have transactions.
With this simplified but accurate picture in mind, you might be wondering what exactly a transaction is made out of.
- How will understanding transactions help me to become a
- How do transactions allow me to transfer some bitcoin to a friend?
It turns out that the answers to these questions vary based on many things. Even assuming that we’re talking only bitcoin, we can use transactions in a number of creative ways to accomplish a variety of personalized goals. Let’s start at the beginning, that is, let’s take a look a good old-fashioned pay-to-PK-hash transaction type. After all, this type of transaction accounts for over 99% of all transactions on the
Hungry for knowledge?
New guides and courses each week
Looking to invest?
Market data, analysis, and reports
A community of blockchain experts to help
Get started today and earn 4 bonus blocks
Already have an account? Sign In