Sugarcane Podcast

The role of miners and nodes | Processes, Transactions, Consensus | Ep. 05

August 08, 2023 Sugarcane Episode 5
Sugarcane Podcast
The role of miners and nodes | Processes, Transactions, Consensus | Ep. 05
Show Notes Transcript Chapter Markers

We discussed sending transactions before but what really happens behind the scenes? Here are some topics we dive into.

Miners Exposed: Peel back the digital veil on miners - the hidden heroes of cryptocurrency! No pickaxes here, just cryptographic puzzles.

Mining Decoded: It's not just number crunching, it's the backbone of blockchain. Unpack the intricacies of solving mathematical conundrums that keep the digital world secure.

Nodes Unleashed: Nodes - they're more than just data points. We're revealing their pivotal role in upholding blockchain's integrity and driving decentralization.

Consensus Demystified: It's the core of democratic digital systems. Explore how network consensus ensures smooth blockchain operation.

 And remember, we're just a sweet Discord message away.

Links: 🔗 Website - Podcast - YouTube - Twitter - Discord - TikTok

Disclaimer: 🚨 The information provided across all of Sugarcane's communication channels is for informational and entertainment purposes only. It should not be construed as financial or investment advice. Consult with a financial professional before making any investment decisions.

Rudy:

Welcome back new week, new episode with me, Rudy, your host.

Sheldon:

Hey, I'm Sheldon, the founder CEO of Sugarcane.

Rudy:

We are here to give you some more fun, sweet, sweet information about crypto. The tastiest, continuing from last week, is miners, nodes and how that all works and how they come into an agreement. And I have something else thinking about, like how do we, what else in life do we all have to kind of have to have a witness of or agree on to kind of show validity? Yep, typically we're used to having some type of entity to say this is good, yeah, like a deed to your house, like there is paperwork that the government signs and, yep, this person owns this house. But in a more human level, community level, there's I like to compare it to like marriage.

Rudy:

Back in the day and the Renaissance times, king and queen want to marry their prince or princess. There used to be a big ceremony for that. The whole town used to know about it. This was something that everyone would know, because everyone would attend, everyone would watch, the church would be there, the highest levels of royalty would be there. This was all confirmed through a consensus of all parties and all witnesses agreeing that these two people are married. And today's day You similarly still have that. I mean today you can't get married without, at least in most states that I know of, you can't get married without a witness. Someone has to be there to watch you sign and watch the local municipality sign those documents saying these two people are going to get married. That's almost like what minors and nodes do Like. I want to hear your take Sheldon on a technical standpoint of how does that relate into what minors are doing?

Sheldon:

Minors and nodes to get married. That's all, it's all love.

Sheldon:

That's all love here. Yeah, so the kind of role of the miners in the context of proof of work and nodes in the context of proof of stake, kind of packed by last. You can talk more about it this week, but really just about coming to an agreement about the state of the world, right? So we keep talking about how there's a ledger or state of transactions or state of accounts and balances And then I transfer five Bitcoin from me to you And now you have five Bitcoin, that ledger or that state of the world to get updated to show that Rudy now has five Bitcoin He's rich and Sheldon now has five less Bitcoin He's a lot poorer. So that's kind of the role of minors and nodes in those scenarios. Basically come to agreement that everyone agrees that this new state of the world is not showing that Rudy has five Bitcoin and Sheldon has five less Bitcoin. That's kind of the context of witnessing that everyone witnesses that that transaction occurred.

Rudy:

And because I love you and I send you some of that Bitcoin. Everyone will know that it's true. Yeah, this mechanism, yeah. So then they're confirming this consensus. And you know, for me, it took me a while to even just know what the word consensus meant. Yeah, you'd hear it. I don't know, maybe it was just me, i'm just slow with words. I feel like in your next presentation, yeah, totally Yeah, for this consensus. It's just a collective agreement between, in this case, computers that are viewing these transactions And collectively agreeing that these are legitimate transactions. But in the complexity of it, like, what are they actually agreeing on?

Sheldon:

Yeah, so it's gonna start with Bitcoin at the end first, i think.

Rudy:

Bitcoin is a Good one to start off of because it's a little bit simpler. Yeah but then we'll go into the Ethereum side of things.

Sheldon:

I go, yeah. So in the Bitcoin case, their consensus algorithm kind of fancy words to say how they all agree, how all the nodes, all the other miners agree on the state of the world is called proof of work, and there's roughly I think it's like 10 to 15,000 nodes across the world running.

Rudy:

What's the difference between a node and a miner?

Sheldon:

Yeah, so it's just the consensus algorithm used, right? so In the context of Bitcoin it's, they're called miners because they're Mining that's kind of funny word but they actually like Running calculations, running complex mathematical calculations to produce what's called a hash, or kind of like a key or like a secret, to like Be the one to approve the next state of the world. But in the context of Ethereum, they're called nodes because in proof of stake, there's no. Mining is actually just everyone is a node and a separate piece of the network and they're running because this is our written proof of stake. They basically come to some agree on the world.

Rudy:

Nice, yeah, and nodes are like yeah, pretty much locations Like a ping point. Yeah, that's scattered across the globe.

Sheldon:

Yeah, if you think about like connected dots, you know how, like there's all those little dots, that with numbers on them And it's like little lines between them and like if you're a little kid, you got doing like a restaurant, you got like a paper, you have like the dots in lines, you think about like all the nodes. Yeah, all the nodes in the network are those little dots, right, and they're all single pieces of Computers that are running something. In the context of a Bitcoin, they're running a mining algorithm, like produced hashes, and in the context of Ethereum, their nodes and they're actually participating in the kind of Contents algorithm per stake.

Rudy:

That's context of difference in it too cool and now that we're Used, now we're back into Bitcoin's reference of miners. Yeah, we're doing on these transactions that are happening. So I send you a transaction and Bitcoin world There are miners who are receiving these transactions and Doing complex algorithm and algorithms to prove that this address is legitimate in their network and is legitimately sending Bitcoin and I generally have it. I'm not like faking how much Bitcoin I have and I actually And making sure that is true due to what was happened previously in the Bitcoin world. It kind of checks right, like it checks what happened last day and it continues on to next day. So if someone's trying to be malicious and edit a certain state of Bitcoin, it'd be very difficult because it would break the consensus and that would just be booted.

Sheldon:

That wouldn't work, yeah, yeah. So I think also something to make reference is that, like a block is made up of a set of transactions. So there's like set of transactions that occurred in that kind of snapshot of time and it's also like kind of a state of accounts, right. That's basically like balances in that state of time, right. So every block again is a collection of all the transactions that occurred in that particular period of time. So in the context of Bitcoin, like 10 minutes, in the context of three minutes, about 12 seconds, they take all the transactions that occurred, they put them all together and they update the balances of each person. So, like in the context, let's say, i send the transaction to you, to send that by Bitcoin, that transaction, that actual action that occurred, would be stored as well as the balance change of you, rudy, getting plus five, me, sheldon getting minus five.

Sheldon:

And if we're using the Bitcoin blockchain to do that transaction, the miners that are all different computers in this network.

Sheldon:

They're basically competing to produce a number right.

Sheldon:

So they run an algorithm, complex mathematical operation to produce a number right And the number has to be kind of a technical detail but it has to be below a certain threshold, the sort of like limit, right. And the algorithm basically randomly generates a number, randomly, randomly, randomly, randomly. And each time you randomly generate a number, if it's below this threshold, that means you're the one that got the perfect number and you can actually produce, you can be the one to propose your next block. You can be the one to say, hey, this block that I collected all the transactions from, this is the next state of the world, right. And if you're not the one that has got the number that is below this threshold, you can't actually say that you can't produce the block. And the reason why people create these blocks is because they get rewarded by the network. So kind of the way that block chains work is that each person, each network, each node in the network produces a block and they get rewarded from the network for doing that action because they're supporting the network.

Rudy:

Yeah, that makes sense. So you have the term mining too, because as you're doing these actions, it's kind of like you're physically mining for gold. You're going through this tunnel and you're digging and digging in the network of transactions and the Bitcoin network rewards and brings more Bitcoin into the ecosystem, because there's 21 million total that can ever be created, but there isn't 21 million out now. The miners job is to look for them by confirming transactions as a reward.

Rudy:

Yeah that makes sense Now for Ethereum's sake. They were in a similar phase of proof of work. Now they're in proof of stake and they're using nodes instead of miners. How does that compare with proof of work?

Sheldon:

Yeah, so one thing you said that I actually want to touch upon in the Bitcoin case is that everyone knows there's 21 million hard cap in Bitcoin and every four years the amount of Bitcoin that gets created gets cut in half. So if I'm the one that created a block and I submit that to the blockchain, i get rewarded, and so every four years, the amount that I would get rewarded gets cut in half, and so what ends up happening is that asymptotically, eventually the number will slowly curve over until it maxes at 21 million. That's the one thing I just wanted to bring up, just because I don't know if people actually understand how the 21 million hard cap gets created, just by the fact that the rewards that get slowly diminished over time.

Rudy:

And the fun thing too is if you ever lose any Bitcoin like those stories of someone losing their hard drive like 5,000 Bitcoin in it, that's gone forever. There's no recovering that, so it's like 21 million minus 5,000 in the system, since It's getting more scarce due to human error.

Sheldon:

Yeah, we're just like losing their computers or like the company's getting destroyed with the keys that can actually access the account. Yeah, so that was the context for the 21 million hard cap. But talking about Ethereum, and the difference is that now in the Ethereum world that in again October of last year 2022, when the transition from Prufivork to Pistak each of the nodes in the network, they put up a certain amount of Ethereum. So currently you have to put up 32 Ethereum as almost like a bond or like a collateral, to say, hey, i'm going to be a good actor in the system And if I don't become a good actor, you can take my money from me. So anyone can basically take 32 ETH, put that up as collateral and now they get a certain percentage chance of being the one to get rewarded for producing the next block in the system.

Sheldon:

And if you don't produce a correct block, if you say, hey, rudy decided to send 10 ETH or 10 Bitcoin, 10 Ethereum, when that actually didn't happen, the actual network basically checked that transaction. That showed that Rudy never sent Sheldon 10 ETH never occurred and Rudy is actually the one that still has the 10 ETH Now, the 32 Ether that I put up as collateral, as the bond can get flashed or can get cut in half because I was a bad actor in that scenario. That's how we can move from having everyone compete being the ones that produce the correct number the hash in the Prufivork sign up context. So now everyone is still a good actor because they have money on the line of losing if they don't become a good actor, if they do something bad.

Rudy:

And that helps out against people who are just massively rich whales who have gotten early and have thousands and thousands of ETH. They can post a bunch of nodes, but they still would be. It would not be in their own best interest to try to maliciously attack the network.

Sheldon:

Yeah, so in the case of Ethereum it's actually technically more secure than Bitcoin, just because the attack vector or the ways in which the Ethereum network can get attacked are kind of limited, because you have to put up money to be a part of the Ethereum network And if you do something bad in the Ethereum network you actually can get slashed. that money gets taken away from you, so you don't actually have access to that anymore. But in the Bitcoin case, if you were to buy, let's say, 50% of total computational power on the Bitcoin network I see you bought a bunch of a big warehouse full of ASICs, like the computers that we use to create Bitcoin hashes. Let's say I bought enough that I was actually able to control half the network. There's nothing against or stopping me from constantly doing bad things. if I have enough computation, that's because there's someone can take my hardware from me, right. But in the Ethereum context, they can slash your money and take your money from you, so you can't keep attacking. That's why Ethereum, technically, is actually more secure than Bitcoin.

Rudy:

That makes sense, and for Ethereum's case also, there is no hard limit of how much Ethereum can exist. But they have introduced an interesting method of burning Ethereum during transactions to kind of keep it almost at bay at balance of what is needed to keep the network alive and thriving. Can you go into a little bit about that until you went into the 21 million?

Sheldon:

Yeah, you're opening up a whole bunch of kind of worms that are fun to go, Sorry keep it small.

Rudy:

We have way more episodes to show out.

Sheldon:

Yeah, a lot of smiles for us. And back in August of 2021, something called EIP 1559, so 1559, there's an upgrade to the network. Ethereum introduced something that allowed for Ethereum people spend to actually produce transactions or to actually get the transaction into the network, get slashed or take a quick setback. Whenever again, in the context of, let's say, i wanna send you five Ethereum or set five Bitcoin, not only do I have to basically broadcast that hey, i Sheldon and moving five Bitcoin from me to you, i also have to pay a small amount of money, kind of like a tip or tax. This is called gas in the context of Bitcoin or in context of blockchains, so I have to pay a small amount to the miners to basically include my transaction.

Rudy:

Or.

Sheldon:

Bitcoin, yeah, in the context of net fees And both of them. Both of them, yes, you have to pay gas, you have to pay some type of tax to get your transaction included into a block And what happens is that people can actually pay more money. Basically, you guarantee that their transaction gets included faster into the network. So we can dive into the transactions and gas in another episode as well.

Sheldon:

But Ethereum, kind of bringing back full circle, is Ethereum introduce a mechanism to actually reduce the amount of Ethereum in circulation. If there's a lot of activity, so if there are a bunch of people who want to actually get their blocks included into again, it gives transactions into, included into a block. What happens is that people tend to pay more to actually get their transactions included. And so what happens in the Ethereum context? the actual network can recognize that more money is being paid and it can actually like flash or actually like basically, instead of paying the fee or the amount that people pay directly to the miners, it can actually just remove it or like take it away from the system. So the Ethereum network technically doesn't have a cap as to how much Ethereum can get created, but it also it's almost like a damping factor. It can actually reduce the amount of Ethereum in circulation, and there's actually a bunch of dashboards out there that show how much Ethereum has been burned or removed from circulation.

Rudy:

Those are fun.

Sheldon:

You always feel like, yeah, keep going down, make it more scarce, yeah, but it's actually every day, like Ethereum is actually reducing in how much circulation, how much Ethereum is in circulation. But again, that's a not longer conversation.

Rudy:

Yeah, and it's all important, Like there's so much more to go into. But that's the idea of what it means, to how complex it can be to run a successful blockchain project that involves a token, a coin because there are plenty of different cryptocurrency projects out there And it gets into. These weeds is where you kind of have to do your research. It's like how does it actually work And where is the value generated? And how is it generated? Is it set up in a way where everyone is winning or is it set up in a way where certain people win or the early people win, and it's difficult, it's hard to tell, and we're here to make sure that we give you the best information that's possible.

Sheldon:

On TCS.

Rudy:

Tidbits TCS Tidbits on what's going on in crypto. So that was the idea of the roles in of minors and nodes. We definitely want to hear all your questions and join our Discord. all some Twitter, sheldon. do you have anything else to leave us off with?

Sheldon:

No, i think that's all I got.

Rudy:

Oh, you've got much, much more by now. You're saving.

Sheldon:

You know I'm good for now soon.

Crypto Consensus and the Role Explained
Understanding Blockchain
Crypto Tidbits and Questions in TCS