Bitcoin Lesson | Transactions

  Рет қаралды 14,616

learnmeabitcoin

learnmeabitcoin

Күн бұрын

An explanation of how bitcoin transactions work.
01:27 - Transaction Basics
↳ 08:45 - Change
↳ 12:49 - Graph
↳ 15:10 - Coinbase Transaction
↳ 17:24 - Fees
20:00 - Transaction Data
↳ 35:22 - Signing
↳ 48:20 - Summary
54:20 - Live Example
↳ 1:02:45 - Code
learnmeabitcoin.com/code - Transaction Builder & Command-Line Tools
For more simple explanations of how bitcoin works, visit my website: learnmeabitcoin.com
If you found this video helpful, please buy me a beer: 3Beer3irc1vgs76ENA4coqsEQpGZeM5CTd

Пікірлер: 104
@adalbertthomalla4887
@adalbertthomalla4887 Жыл бұрын
Wow, I read just books about bitcoin. But this explanation and your website is really the best Ive seen yet.
@layomi3.094
@layomi3.094 2 жыл бұрын
I've been looking for videos that go in deep into the technical details, and your videos have been extremely satisfying to watch and comprehend. Absolutely love them!
@learnmeabitcoin
@learnmeabitcoin 2 жыл бұрын
Thank you! :)
@julien4230
@julien4230 3 жыл бұрын
This is just the best explanations I’ve ever seen about Bitcoin. Really worth taking time to study.
@learnmeabitcoin
@learnmeabitcoin 2 жыл бұрын
Thank you.
@RonFreimann
@RonFreimann Жыл бұрын
Just found your video series. Really good work, much appreciated.
@simux008
@simux008 6 жыл бұрын
This is perfect. I really enjoy documentation in action format! Please keep it up, your voice, format and content are very very helpful and easy to follow.
@learnmeabitcoin
@learnmeabitcoin 6 жыл бұрын
Thanks Simon, got a few more videos planned :)
@pierreschuster9054
@pierreschuster9054 6 жыл бұрын
another great video from this channel. it's also good to have a student in it, who asks some interesting questions. great format.
@learnmeabitcoin
@learnmeabitcoin 6 жыл бұрын
Thanks Pierre.
@weissmannrob
@weissmannrob 2 жыл бұрын
Just found your side, double thumbs up, the best for learning bitcoin internals. Thanks for all the work you put into it.
@learnmeabitcoin
@learnmeabitcoin 2 жыл бұрын
Thank you, means a lot.
@brunoa2893
@brunoa2893 3 жыл бұрын
Excellent content. Better than most of the videos I have seen on the subject
@learnmeabitcoin
@learnmeabitcoin 3 жыл бұрын
Thank you.
@futuschnig
@futuschnig 4 жыл бұрын
The beer is on its way! Again, a great video - thanks mate!
@learnmeabitcoin
@learnmeabitcoin 4 жыл бұрын
Got it, thank you very much! :)
@julienriposo8896
@julienriposo8896 4 жыл бұрын
This is an excellent explanation, with a story. This is what's really missing anywhere else. Thank you so much for your time and energy to build such crazy website!
@learnmeabitcoin
@learnmeabitcoin 4 жыл бұрын
The pleasure is all mine, thanks for being so kind!
@Pherecydes
@Pherecydes Жыл бұрын
Dude, you are a hero. Thank you.
@milleym1057
@milleym1057 3 жыл бұрын
You are a great teacher. You do a good job of explaining things with words and visuals. Thanks for the video. :)
@learnmeabitcoin
@learnmeabitcoin 2 жыл бұрын
Thank you.
@alihendi1880
@alihendi1880 Ай бұрын
Thank you for such a great job.
@ariel10aguero
@ariel10aguero 8 ай бұрын
Super clear, thank you so much
@ee04b040
@ee04b040 3 жыл бұрын
Your video series just absolutely brilliant!, you have the most clear and comprehensive explanation on bitcoin. Very much appreciate the efforts that went behind this.
@learnmeabitcoin
@learnmeabitcoin 3 жыл бұрын
My pleasure, thank you.
@okorodiana9759
@okorodiana9759 2 жыл бұрын
I can literally say the same thing even now. Great job bro, What is your Twitter handle?
@felipedecarli1113
@felipedecarli1113 6 жыл бұрын
Please keep the videos. Your lessons are great!
@learnmeabitcoin
@learnmeabitcoin 6 жыл бұрын
Will do, thank you!
@abdulrahmansattar2873
@abdulrahmansattar2873 5 жыл бұрын
Great video! Thanks for putting the time and effort into it!
@learnmeabitcoin
@learnmeabitcoin 5 жыл бұрын
No problem, glad you like it!
@sohansingh2022
@sohansingh2022 4 ай бұрын
Legendary explanation!
@tyogarasa
@tyogarasa 7 ай бұрын
Great video. The explanations and illustrations were amazing. I learned so much from it. Thank you so much!
@learnmeabitcoin
@learnmeabitcoin 7 ай бұрын
My pleasure. Thank you for the kind words.
@anuragtiwari3032
@anuragtiwari3032 5 жыл бұрын
Great video man.keep it up
@lynndon2000
@lynndon2000 3 жыл бұрын
Learned much from your video and web site, thank you.
@learnmeabitcoin
@learnmeabitcoin 3 жыл бұрын
My pleasure, thank you :)
@vitordeoliveira6139
@vitordeoliveira6139 Жыл бұрын
Excellent video. Congrats
@uber354
@uber354 Жыл бұрын
Another video of this format explaining different types of transactions would be great
@satepestage3599
@satepestage3599 8 күн бұрын
Insane website man. Well done.
@learnmeabitcoin
@learnmeabitcoin 8 күн бұрын
Thank you
@MarkT
@MarkT 6 ай бұрын
BSV: Sequence number (nSequence) - A sequence number used to indicate whether an input is considered ‘finalised’, given as a 4-byte little-endian value. Sequence numbers are used in conjunction with the transaction lock time (nLockTime) to iterate inputs inside of a payment channel. Inside a payment channel (see page 11) nSequence is considered final when its value is 0xFFFFFFFF i.e. the maximum value of a 4-byte field, often referred to as “UINT_MAX”.
@MarkRobson99
@MarkRobson99 2 жыл бұрын
These explanations are up there with the likes of Feynman. Amazing work!
@learnmeabitcoin
@learnmeabitcoin 2 жыл бұрын
Thank you
@andreasmanousakis8083
@andreasmanousakis8083 Жыл бұрын
Great video, thank you! I have question.. In blockchain explorers each input is associated to address(es) and their value(s) are known. However, the inputs in the video do not seem to have such fields. Why is that? Is it possible to extract input values and associated addresses from raw TX data?
@MarkT
@MarkT 6 ай бұрын
I'd really like to see the signing video about now-ish!
@MMABeijing
@MMABeijing 4 жыл бұрын
Hi Greg, you have inspired and helped me to understand the inner structure of a transaction and now that I do the entire bitcoin blockchain picture is much clearer. I knew the details pertaining to cryptography (ECM, hash, merkle tree and path etc) and many other details, but it is the understanding of a transaction that really had me think I actually get things now. I am trying to explain what I have learned about the blockchain to a group of colleagues, and I was actually thinking about starting from the transaction instead of starting with the blocks. Have you had that thought and what it your opinion on that question. Thank you again, cheers
@learnmeabitcoin
@learnmeabitcoin 4 жыл бұрын
Thanks! And sure, transactions would be a fine place to begin. Start with whatever your audience finds most interesting and relevant. Personally I think you can break Bitcoin up in to the following main parts: * Networking (The Bitcoin Network) * Mining * Blockchain * Transactions * Script * Keys / Addresses I usually start with networking, because I feel that's the big picture part, and gives you a "top down" approach. Other books I've read seem to start with Keys/Addresses for a more "ground up" approach. But I think you could start anywhere really. As long as you have a reason and a logical flow that's all that matters.
@MMABeijing
@MMABeijing 4 жыл бұрын
@@learnmeabitcoin gotcha, thank you 🙏
@THANO55
@THANO55 2 жыл бұрын
excellent lecture. Are these slides/images available for use? thanks
@gomino14
@gomino14 2 жыл бұрын
Great explanation! Will you do more videos in the future about what changed in the protocol in the meantime, like Segwit and Taproot?
@learnmeabitcoin
@learnmeabitcoin 2 жыл бұрын
I intend to at some point, thanks for the reminder.
@adnantatlis6791
@adnantatlis6791 Жыл бұрын
hello thank for your helpful teaching I have a question please help... what's make different between etherume signing and bitcoin signing?
@imed6240
@imed6240 2 жыл бұрын
You explanation are so on point. Thanks so much for you effort. Can you tell me how you approach such complex topic and break it down. Do you have any method for it ? What kind of sources do you use ?
@learnmeabitcoin
@learnmeabitcoin 2 жыл бұрын
Thank you, I appreciate it. And that's an interesting question... I haven't given it much thought before. The first thing I do is understand how it works. The better I understand something, the easier it is to explain. I spend a lot of time coding things from scratch and playing with data. For example, for this video I decoded existing transactions, then coded my own transactions from scratch and sent them in to the network to see if they worked. I like figuring out how things work. When it comes to explaining things, I think "If I completely forgot about this topic, what would be the quickest way for me to relearn it again?", then I try to achieve that. It's a lot easier if you break things down in to sections. I also try to avoid looking at existing explanations of the same topic so I can build up my own picture in my head. The main sources I use are pencil and paper. Ultimately I just like the challenge of taking something that's thought to be complex and explaining it in really simple terms so everyone can understand it. I don't think many topics are truly difficult to understand, it's just that some topics are difficult to explain. But you can explain anything if you break it down enough. Thanks for asking.
@k.v.d
@k.v.d 4 жыл бұрын
I missed the part that version number is hexadecimal and was wondering how binary 4 bytes binary number takes only 8 digits. Later got to know it is hexadecimal, therefore each character takes up 4 bits and hence 8 characters 32 bits or 4 bytes. Could be of help to novice like me.
@HariPrasad-zk4ue
@HariPrasad-zk4ue 2 жыл бұрын
Hey Man ! Thanks for the video ! this is the best so far I have seen about the bitcoin transaction ! I have a doubt at 58:15 ! we are supposed to give input's(basically senders) privatekey to sign it ! but you are pointing towards output and giving the private key ! So can you please clarify this ? If my understanding wrong ! correct me plz :)
@learnmeabitcoin
@learnmeabitcoin 2 жыл бұрын
Hi Hari, I'm not sure I fully understand your question, but I'll give some sort of answer anyway. I'm pointing to an output from a previous transaction, and that's what I'm using as the input the transaction I'm constructing. So someone has sent us some bitcoins in a previous transaction (the output), and we're going to unlock it this new transaction (as an input). To unlock this input for use in the current transaction, we need to create a signature using the private key. But in the process of creating this signature, we also need to grab the locking script that was originally placed on the output (this is just how the signing process works). Does this help answer your question? Greg.
@kosasihkosasih5678
@kosasihkosasih5678 Жыл бұрын
Top
@AlecBerg
@AlecBerg 6 жыл бұрын
Great video. Thanks. How did you learn this?
@learnmeabitcoin
@learnmeabitcoin 6 жыл бұрын
Thanks Al. I learn't a lot by making my own blockchain explorer, as I had to figure out what all the data meant so that I could display it on a webpage. As far as learning resources go, I found en.bitcoin.it/wiki and the bitcoin.stackexchange.com to be the most helpful. But overall, trying to build something is what helps me to learn the most.
@adnantatlis3225
@adnantatlis3225 Жыл бұрын
how much nonce blockchain use in block and singaure? is 2*32 ?
@mustafakamal8106
@mustafakamal8106 Жыл бұрын
is there any way that i can get these slides?
@simux008
@simux008 6 жыл бұрын
It would be nice to get your detailed layout of segwit and Lighting Networks.
@learnmeabitcoin
@learnmeabitcoin 6 жыл бұрын
Sure. I'd like to cover all the remaining basics of Bitcoin first (Networking, Blockchain), but after that I'll move on to more recent changes like SegWit and lightning. Thanks for the suggestions.
@AdityaFingerstyle
@AdityaFingerstyle 4 жыл бұрын
31:13 I think you meant the highlighted hex string is actually the hash160 of the public key. It can be derived from the address by using base58DecodeCheck algorithm.
@learnmeabitcoin
@learnmeabitcoin 4 жыл бұрын
Yes that's correct, it's the hash160(public key) and not the raw public key. Thank you.
@hackerclient7055
@hackerclient7055 Жыл бұрын
sir can u make video about "how we can create a coinbase transaction and sign them the manual way?"
@pierrehavard3237
@pierrehavard3237 3 жыл бұрын
I am not sure to understand at 31: 00 is it really the public key ? Isn't it the adress which is linked to a public key ?
@learnmeabitcoin
@learnmeabitcoin 3 жыл бұрын
In general, an address is just an encoding of a public key that's easier to share. So whilst we pass around addresses when we want to send each other bitcoin, it's actually the underlying public key that gets put inside transaction data. In this particular locking script for example, the address contains the hash of a public key (to make it shorter), and this is what gets put inside the locking script. When we come to unlock these bitcoins for spending, we provide the original public key, and this is compared with the hashed version in the lock to make sure they match, before going on to perform the signature validation against the public key as normal. You can see how this mechanism works here: learnmeabitcoin.com/technical/p2pkh It looks a bit complex at first, but in general, addresses are what we pass around, but the original public keys are used inside transaction data. Does that make sense?
@pierrehavard3237
@pierrehavard3237 3 жыл бұрын
@@learnmeabitcoin make sensé but i learned in Mastering Bitcoin that an adresse was a double hash from a public Key. ( Sha 256 and then RIPEMD 160 hash function) thanks you for your vidéos by the way they are really cool. I think i am wrong because i don't know much i will see the video with the link
@learnmeabitcoin
@learnmeabitcoin 3 жыл бұрын
@@pierrehavard3237 Yes that's correct. Public Key -> SHA-256 -> RIPEMD-160 -> Base58 Encode (with checksum) = Address Then when you give someone that address, they Base58 Decode it and put the hashed public key inside the locking script on top of the bitcoins they're sending you.
@whightspace
@whightspace 3 жыл бұрын
What do I have to do if I want to join these classes. I want to ask questions like Neville is asking.
@learnmeabitcoin
@learnmeabitcoin 3 жыл бұрын
I don't run classes or anything on the regular; these videos were mainly one-off explanations with Neville (sorry). If it's any help, feel free to ask any questions in the comments and I'll do my best to answer them.
@susilkumarmohanty9624
@susilkumarmohanty9624 5 жыл бұрын
Great !!!! , Is there any lecture on Ethereum like this....
@learnmeabitcoin
@learnmeabitcoin 5 жыл бұрын
Nothing on Ethereum I'm afraid.
@luyangdu1036
@luyangdu1036 5 жыл бұрын
So how does this 'grey out' works? Like how does it prevent used input to not be used again?
@learnmeabitcoin
@learnmeabitcoin 5 жыл бұрын
If you tried to use an output (that has already been spent) as an input in a new transaction, then every node you send this new transaction to will reject it. They will not accept it in to their memory pool, nor will they relay it to other nodes. A full node keeps a copy of every bitcoin transaction ever made, so they know which outputs have been spent or not. My "greying out" was just to indicate that nodes would reject any transaction that tried to spend an output again.
@luyangdu1036
@luyangdu1036 5 жыл бұрын
​@@learnmeabitcoin My bad of not asking a clear question... My question is more like how does it 'get rejected' ? Does it check against each transaction in the whole chain, or there is some other magic?
@learnmeabitcoin
@learnmeabitcoin 5 жыл бұрын
@@luyangdu1036 No problem, sorry I didn't explain more thoroughly. Bitcoin actually keeps track of every unspent output in a separate database (called the "chainstate" database). This makes it faster to lookup outputs during transaction validation (as opposed to scanning the entire blockchain for them). So if an input in a transaction cannot be found in the chainstate database, the transaction will be rejected.
@JeromeCaporossi
@JeromeCaporossi 4 жыл бұрын
Hello, just a remark about Network Byte Order: fields in transactions (such as version for instance) are in little endian order (LSB first). To me, it is the opposite of Network Byte Order, which is as far as I have understood is big endian order (MSB first) (see tools.ietf.org/html/draft-newman-network-byte-order-01). It is confusing.....
@anuragtiwari3032
@anuragtiwari3032 5 жыл бұрын
Sry I don't have any bitcoins otherwise I would have bought u a beer and I'm very new to this and I thing.
@vuongngo8228
@vuongngo8228 6 ай бұрын
Can you make your website live again sir?
@learnmeabitcoin
@learnmeabitcoin 6 ай бұрын
All fixed. There was a problem with the host. Thank you for letting me know.
@vuongngo8228
@vuongngo8228 6 ай бұрын
@@learnmeabitcoin thanks sir, the explanation so good for my assignment
@learnmeabitcoin
@learnmeabitcoin 6 ай бұрын
@@vuongngo8228 My pleasure, I'm glad I could help. Good luck with your assignment.
@yashpatel8999
@yashpatel8999 2 жыл бұрын
BITCOIN WALLETS ARE CONSIDERED AS NODE? AND HOW CAN WE FETCH THE BALANCE OF PARTICULAR ADDRESS?
@learnmeabitcoin
@learnmeabitcoin 2 жыл бұрын
In the early days of bitcoin, a wallet would run on top of a node. These days you can run a lightweight wallet (without running your own node), and that wallet can just connect to someone else's node. The easiest method to get the balance of an address would be to use a blockchain explorer. Other than that, to get the balance of an address you could sum the values of unspent outputs located at each address in the chainstate database (the database containing all the unspent outputs in your bitcoin node).
@PHrushikesh
@PHrushikesh 2 жыл бұрын
Bitcoin simplified.
@refractedphoton
@refractedphoton 3 жыл бұрын
I don't understand the need for transactions requiring whole inputs when making payments which - unless you happen to want to send the exact amount of the input/s - necessitates the process of getting change. Why doesn't the system just allow the actual amount you want to pay someone be sent to them with no need for any change? For example, if you own 10 bitcoins (for the example's sake lets's say you received these 10 bitcoins in one transaction and this is the only payment you have ever received) and you want to send someone 5 bitcoins, instead of sending 10 bitcoins with 5 going to the payee and the other 5 going back to you as change, why doesn't the system just look back at the blockchain where it can calculate that you have 10 bitcoins in total and then have the new transaction just send 5 bitcoins to your payee as this would still allow the system to know you now only have 5 bitcocins as this is call calculatable from the blockchain (i.e. +10 bitcoins - 5 bitcoins = 5 bitcoins? If it was done this way there would be no need for change.
@learnmeabitcoin
@learnmeabitcoin 3 жыл бұрын
You make a good point. But how would you keep track of how much each person owned? The benefit of using UTXOs is that you only need to keep track of those UTXOs. So whilst it might seem awkward at first to create change outputs, it makes the transaction system more efficient. There may be a better method, but you have to figure out how it would work.
@Partizanu
@Partizanu 6 жыл бұрын
Very good and talented teacher, but extremely annoying student. I wish I could mute his audio and enjoy your presentation. Thank you for sharing.
@learnmeabitcoin
@learnmeabitcoin 6 жыл бұрын
Having a student helps me to present the information. I realize that it may interrupt with your own personal flow of understanding whilst watching, but without this student I wouldn't have been able to make these videos. Thanks for the kind words about the overall video though nonetheless.
@MMABeijing
@MMABeijing 4 жыл бұрын
i disagree, the student was helpful
@MMABeijing
@MMABeijing 4 жыл бұрын
Actually let me reformulate my earlier comment: you are a negative asshole
@jasonjason8639
@jasonjason8639 Жыл бұрын
but what about the fees, how do I get to choose how much fee I will pay for a certain tx
But how does bitcoin actually work?
25:16
3Blue1Brown
Рет қаралды 15 МЛН
Mastering Chaos - A Netflix Guide to Microservices
53:14
InfoQ
Рет қаралды 2,2 МЛН
ОСКАР vs БАДАБУМЧИК БОЙ!  УВЕЗЛИ на СКОРОЙ!
13:45
Бадабумчик
Рет қаралды 6 МЛН
Heartwarming moment as priest rescues ceremony with kindness #shorts
00:33
Fabiosa Best Lifehacks
Рет қаралды 38 МЛН
Alex hid in the closet #shorts
00:14
Mihdens
Рет қаралды 10 МЛН
Bitcoin Lesson | Keys & Addresses
1:15:16
learnmeabitcoin
Рет қаралды 12 М.
Neo4j (Graph Database) Crash Course
1:23:08
Laith Academy
Рет қаралды 212 М.
Bitcoin Lesson | Script
1:05:54
learnmeabitcoin
Рет қаралды 34 М.
Beginner's Crash Course to Elastic Stack -  Part 1: Intro to Elasticsearch and Kibana
56:42
Bitcoin Transaction Details - Part 1
15:47
djp3
Рет қаралды 85 М.
Bitcoin - Transaction records
11:31
Khan Academy
Рет қаралды 119 М.
How does a blockchain work - Simply Explained
6:00
Simply Explained
Рет қаралды 10 МЛН
Elliptic Curve Cryptography Overview
11:29
F5 DevCentral
Рет қаралды 462 М.
Bitcoin Transaction Details - Part 2
19:56
djp3
Рет қаралды 32 М.
How secure is 256 bit security?
5:06
3Blue1Brown
Рет қаралды 3,2 МЛН
ОСКАР vs БАДАБУМЧИК БОЙ!  УВЕЗЛИ на СКОРОЙ!
13:45
Бадабумчик
Рет қаралды 6 МЛН