¶ Welcome To Bitesize Bitcoin!
Begin with, what is Bitcoin? 1 bit 47. A lot of people are familiar with Lightning, and Liquid is effectively, layer 2. Bit 129. What is Taproot? Sure and Taproot, that's the first new protocol upgrade since SegWit. Difficulty adjustment. How do mnemonic seed words work? UTXO Management.
¶ Talkin' Block Templates with Jon
It's been a while since we recorded a bite sized Bitcoin. We created these to make complex topics in Bitcoin and some of the more technical aspects more easy to chew on. I haven't had a lot of time up until now, but John, my cohost for Action News and PMM, is getting on a bit. It's really important when people are older. You keep in contact. You keep them challenged. And they get to talk about the things that they love. John absolutely loves it when I call him.
So I thought I'd kill 2 birds with 1 stone and call him each day and ask him some more technical questions about mining. Now this one didn't go quite as I'd hoped. He was a little bit grumpy and stroppy. You know how they get sometimes. So this was really more of a brief discussion about what we will be covering. So we cover the basics of block version number, previous blocks hash, the Merkle route, time stamps, difficulty targets, and ance.
We'll go through them in full detail and 1 by 1 in the next episodes. Here's our call. Hey Max, what's going on? It's freaking pitch dark here, there's chickens out everywhere, a raccoon got in the coop, what's going on? Oh cool, I just got up. Fucker. I was having a think last night about how a miner constructs a block. Yeah. Okay. That's that's what you're dreaming about. Got some time on your hands. I don't. I was just thinking because
we do a mining show together. Yeah. It might be good for me to understand how a a miner constructs a block. Yep. Sure. So it's a good time now, maybe we can go through it? It's not sitting here with a flashlight, just chase this raccoon out of here. I don't have time for this. A raccoon? Oh, what's what's going on? But, you know, they attack the chickens and pluck the fucking feathers out, trying to eat their brains. It's what raccoons do. You're calling me about fucking block templates. Oh, what time is it there? It's midnight. Oh, that's a 5 hour time difference between the 2 of us. Yeah. Yeah. I'm just getting up to go to the gym, mate. Been thinking about it all night and I'd really like to know how a minor construction Okay. Well, fine. If I explain this to you, can I get off the phone and get my chickens? I mean, yeah. It doesn't have to be right now. It sounds like you're busy, mate. Max, I'd love to do this all night, but I gotta get these chickens in a coop.
Covered in chicken blood and feathers here. What do you what do you need? What are the components of the block template?
Yeah. I guess so. Just like what are the components of the block template? Yeah. You got the block template. Number, break it down, mark it down, merkle root, time stamp, difficulty target, nonce. Alright. Is that good? Can we talk about this later? Well, you know, I was really hoping to sort of break them down a little bit, go into some detail of each of those things you mentioned, because I just don't really have a firm grasp of it. Alright. Fine. Jesus, Max. What do you wanna know about first? How about block version number? Can I give you that one and get off the phone here? Yeah, I guess so. Okay, great. Block version number.
It indicates the version of the block, and you can use the version of the block to signal a miner's choice on software and protocol upgrades and changes. That signaling and activation in the relation to soft ports is something we can talk about in greater detail at another time when I'm not covered in chicken blood and feathers. I gotta get this raccoon out of here. Oh, is it still in there, is it? Yes. Alright. Can I go now? Well, hold on mate.
This previous block hash thing you mentioned was Oh, I'm stuck with that. Max. The previous block's hash, alright, so that serves as a reference to the preceding blocks in the blockchain. You know, this is blockchain. So it links the blocks together and ensures that a miner is working on the longest valid chain. Yeah. That's what I was thinking with the blocks. I was imagining how they're actually linking together. Yep. That's good, Max. That kinda makes sense.
And so how does that tie into this Merkle root thing?
Max, I'm not a cryptographer. Alright? I'm some telephone man in the middle of the night chasing chickens around and fucking raccoon. But Yeah. I'll give you the best explanation that I have. So the merkle root, that's a hash that represents all of the transactions included in the block. It like summarizes all the contents of the transactions into a 32 byte value. I mean, you start off with all these branches, the first branch is the coinbase transaction
and the first transaction you hash that together, then you take 4 transactions, you hash all those together and hash it with 1 and 2 and then you take 8 transactions and so on and so forth until you have enough branches to cover all of the transactions in a block. Max, I gotta go, I gotta shoot this fucking wreck. Alright, you little shit. God damn thing is still moving. I'm gonna take another shot.
Alright. Hang on, mate. I haven't got all day. Talk to me about this time stamp thing. Fuck, Max. The time stamp records the time at which the block was mined and it's derived from the miner's local clock. So there's some variation in that based on the accuracy of the miner's clock and the levels of synchronization with other network nodes. Alright? I gotta get these chickens in the coop, man. Gotta go. Before you do that, this difficulty target, what's that?
Okay. The difficulty target. We talk about this on the show all the time. It's the value that sets the target for mining difficulty. Yeah. Alright? Gotta go. Yeah. But the mining difficulty,
that's to do with sort of how much hash rate comes on and then it has this adjustment. Yeah. The adjustments say on the show all the time. It's called the statistics section. The find Yeah. Yeah. It it it determines the level of computational effort needed to find a valid block. And that difficulty target is encoded in a 256 bit number in the block template. And it represents a required computational effort and it's adjusted how often? We've talked about this a 1000000 fucking times.
Every like 4 blocks. Fuck prick. 2,016 blocks. That's how you maintain the 10 minute target. Alright. Recently, you changed your name to non spoil or something like that. That has something to do with the mining blocks, doesn't it? What what is this nonce thing? It, my new Twitter handle is prevhashnonce. The previous
hash is nonce. Yeah. Then you get it now? Isn't that cute? I gotta go. I gotta get the time to spit to explain nonce to you. This is the last one. I just wanna know your co host on the
show. You are a nonce, and I just wanted to know what it is. This sounded a bit quick what you said there. I I kind of get it, but can you just go into slightly more detail? And I promise I promise I'll let you go. Max, if I explain this to you, can I please fucking go? Yeah. Yeah. Yeah. Yeah. Alright. Nance is a random value that miners tweak to find a valid block. When a miner creates a block candidate, they increment the nance in the block header and compute the hash. If the hash is less than a difficulty target, the block is considered valid and added to the blockchain. Alright? Mhmm. Max, gotta go. Gotta clean up brains,
chicken feathers, blood. I gotta get up in a few hours, play gay little pigeon on a pole as you like to say, the fiat telephone man, take care of my family. Gotta go. Okay. No. Fair enough. I'm just about to go to the gym anyway. Took me about half an hour to get down there. Once I've settled in and had a coffee,
I'll give you a call probably about an hour from now. Fuck. You know, just to go into a little bit more detail on some of these things. I'll tell you what. We'll just do one per call. So we'll just go through maybe block version number fine. Bye. Love you. Love you too.
