All right. Well, hello everyone and welcome to Sailor Academy's Bitcoin for developers unit number unit number three You got to hear a little bit of the behind-the-scenes because while I unmuted you I did not so hello everyone and Thank you so much for joining us. I hope if you have not seen the previous two videos in this series You could check them out on in the playlist below and also just to mention this is a supplement to Sailor Academy's CS102 so you should definitely Find the link below to the course and start taking the course and catch up with us Of course if you're watching a long live feel free to leave questions in the chat and we'll get to those You know as soon as we can but with that I'll just hand it over here to hand and we can get started All right. Welcome everyone. This is unit three and as Mike said Please do ask lots of questions in the chat and as we go through this I'll pause periodically to answer any questions that you all have put in the chat So, please do ask lots of questions That you know helps us all learn stuff and just makes it more fun and more interesting if we are you know Having a conversation rather than just me sitting in an office by myself talking to my computer screen It makes it much more fun. So let's dive into it unit three Covers what is a digital signature covers? Introduction Bitcoin transactions and how Bitcoin transactions use signatures but what we'll focus on today is we'll really get a bit in depth on pay to public key hash transactions and I think if we really Dive into that and focus on walking through that here today that will kind of cover No, help us get a understanding of you know, all of these topics here that units three covers And again, this is supplementary to unit three of the course So we're not going to cover everything that's in unit three But here today we'll focus on pay to public key hash transactions and that's really still the I think the most common type of Bitcoin transaction and It's not quite the original but like it does just call it like the original form of Bitcoin transactions So if we really grasp what's happening in P2PKH Transactions, then we can they gives us a really solid foundation for understanding You know, what's going on and all kinds of other transactions. They're now on the network So let's go ahead and get into that again digital signatures Hope y'all can't hear my neighbor's dog going nuts This is a lovely graph we have here showing, you know, some elliptic curve Mathematics some graph there of that which is quite cool So we did in the last unit unit to talk a bit about Cryptography and public and private key pairs in the different ways the different cryptographic functions that we use In Bitcoin and we'll come back to that a bit more and we'll focus in a bit on signatures And at the end of this session today, we'll do a quick example where we'll go through Creating a signature and validating it in Python But we're not going to dive too heavily into the math again. There's you know description of Elliptic curves math mathematics and how it's used to generate public and private keys and all that good stuff that we cover In the course from the book Mastering Bitcoin But then again, we're not we're just going to need to be aware We just need to be aware of what this stuff is and that'll help us work with it I'm not gonna dive too much into the math Okay So let's start first with a bit of a history lesson pay to public key hash is The most common type of Bitcoin transaction not quite the original because at first there was pay to public key But for some security and privacy reasons that with pay to public key hash also helps Compress the data that goes in the blockchain. So for a couple of those reasons pay to public key was changed to public key hash But it's I think it's helpful just to think about you know pay to public key because this Is a very Sort of a more simplified version and if we can understand kind of what was the thought process was is You know Bitcoin is the system that's built on this, you know public key Infrastructure right this idea that you have this Public and private key pairs right and everything's kind of built up Upon that so the idea is originally as we walk through these transactions You can kind of think of maybe the way satoshi was thinking about this is like Okay, I have a public and private key pair. I'm keeping that private key private that public key is public And if someone wants to send me bitcoin, they essentially send that bitcoin to my pub key Right and kind of lock it to my pub key And then once that bitcoin is locked to my pub key The only person that can spend it is me because I have the private key associated with that pub key and that key pair And the only way to spend it is to have the network agree that this is a valid transaction is if I produce a signature On that transaction that we can all validate came from the private key Associated with that pub key that the bitcoin is locked to right so that's that's basic idea of you know, how this Simplified form or the most simple form of bitcoin transactions work is that we just all have these pub keys Right and people just send bitcoin to your pub key And then you are the only person that can spend it from there that can send it to someone else's pub key Because you're the only person assuming you're the only person that has that private key Then you're the only person that can produce a signature That's necessary to create a valid transaction to send those funds out to someone else's pub key, right So I think it's helpful To know that history to understand that that's the basic fundamental ideas. We can lock Bitcoin to pub keys and then only the person with the corresponding private key can create a valid signature to send it to someone else's Pub key right to lock it to someone else's pub key. That's the basic Form of transactions and then it's just gotten, you know, all kinds of different complexity and different functionality have been added to it from there Including right at the beginning when paid a public key became paid a public key hash again. This was Instead of sending funds to just someone's pub key you would send it to you know an address Which is basically a hashed and formatted version of a pub key There's a number of different reasons for that to make it, you know Even more difficult to sort of attempt to reverse engineer that right because it's not directly the pub key It's the hash of the pub key Also, the different types of hashes used to help compress the data. So you have less, you know, you're taking up less space on the blockchain Here we go. This is uh, just what I was talking about you have this pub key First you hash it with Shah 256, which you know is a very very secure hashing algorithm Right, then you hash it again with this ripe mb 160, which makes it a shorter hash, right? Then that goes through some formatting This base 58 check encoding Excuse me, which we'll talk about later in the course Or is discussed later in the course and then that creates this address Right So it started with this very simple idea that you're just going to send funds to someone's pub key They can only unlock it with their corresponding private key But we you know for security reasons and you know data blockchain chain space reasons, right? Added this complexity to it. But that's the basic idea All right. Now here we are I just want to show you this to So that if you come across You know as you're working with this tech you're going to come across with different types of bitcoin addresses So you should have some familiarity with what all these things mean I'm here We're just going to be talking about this first one pay to public key hash That address as it's formatted here as it goes through this whole process Comes out at the other end looking like this starting with the one The next sort of upgrade in bitcoin transactions was a pay to script hash Which is how you get multi sig which is all sorts of really fascinating stuff But we're not going to talk about that today But that starts that address starts with the three After that we had You know segwit, right? And then you get this p2 pay to witness public key hash, right and those addresses look like this bc1 Q right and then the latest sort of change to bitcoin transactions was the pay to tap route transaction, which looks like this bc1p Again, that's outside of the scope of what we'll talk about For today and a lot especially this one is pretty new But it's just helpful for you to keep this in mind that you know bitcoin transactions You know you have this formatted address and they will look different Depending on what type of address what type of transaction that is so you might see addresses on the bitcoin blockchain That look like this these different types of formats Okay So before we start walking through a pay to public key hash transactions I'll pause in case we have any questions on that bit of history there Mike, do we have any questions? Um, we don't have any questions right now some people saying hello in the chat Hello there everybody and again if you have any questions feel free to go ahead and leave them down on the chat and I will I'll let you know If any come through Okay, awesome. All right. Let's dive into pay to public key hash transactions and here One of the most difficult things about trying to teach You know bitcoin and bitcoin technology and how this all works is trying to decide Where to the start right because there's so many different Interconnected concepts and technologies and techniques etc that are all working together And to understand that you kind of have to understand the whole constellation of things and that are you know being used But when you're teaching it when you're trying to explain it You kind of just have to pick a starting point and it's difficult because everything's kind of dependent on everything else So here what I've done is I've just picked a method for walking through this What we're kind of going to come back and forth on some of these things and touch on things briefly And then come back around to them because they all are interconnected and there's no clear direction to start with this concept And then lead up to that one So we'll bounce around a bit and I think often also because these are you know, this is New technology and there's lots of different components at play and you kind of have to understand all of them to get the full picture And that sometimes it takes a number of passes at it Um to to fully grasp it. So we've already gone through unit three or if you've read some of you know Mastering bitcoin second edition that we reference in the course and watch some of the videos you might already have an idea but Well, a lot of these things and every time I'm learning something new To bitcoin you know with taproot stuff like I'll read the same things over and over again until it like properly settled into my head So we'll come back and forth a few times All right. So again, um a key pair is created, right? So we're kind of going to walk through the process of a pay to public key hash transaction, right? So a key pair is created That is a pub key and associated private key right All right, the public key is hashed and formatted to create an address Okay, we got that funds are locked to that address, right? So if I've gone and I've instructed my bitcoin software to create a key pair And then take that public key and format it into an address Then let's say Mike sends me some bitcoin. He would just broadcast to the bitcoin network. Hey, I'm taking these, you know Tiny transaction I'm taking his 100,000 satoshis and I'm going to send it to this address, right? So what happens is he locks those funds Creates a locking script um on broadcast that to the bitcoin Network it gets, you know mind in a block it becomes part of the blockchain There are funds that are locked to my address, right that is associated with my public key or produced from my public key All right a transaction that spends funds from that address needs to include a signature that was produced From the private key corresponding to the pub key that the address was created from All right, so I go through this process. I create an address. I Tell Mike about my address. He sends funds to that address locks them on the bitcoin blockchain to My to that address that I've produced But let's say I then want to send some of those funds to my friend, uh, daniella Right in order to send those funds that are locked to my address and then Relock them to her address. I have to first unlock them and in this, um, you know Pay to public key hash type transaction What I would do is just produce a transaction that says, hey, I'm taking this bitcoin here And I'm sending it to this address over there and then I would create a signature And that signature in order for that transaction to be valid can only have been created by the private key Corresponding to the pub key that was used to create that address, right? All right, um the signature That signature from my private key unlocks those funds so I can send them to daniella and relock them to daniella's address All right to understand Real quick we had we had some questions back there I wanted to see if you get through to see if maybe they you've already answered them for people But there we have two questions here about Basically about it seems about the con the concept of older addresses interacting or targeting newer addresses Hmm So like the idea of being if I have funds locked to a pay to public key hash address Can I take those funds and send them to a pay to tap rich address? Uh when train Getting more stuff in but uh, yeah, the so the original question was Uh, is there any specific? Is there any special consideration? Uh When transacting with an older address? type when targeting a newer type Okay, so yeah, I think that's that's kind of this question Let's say I have funds locked at a pay to public key hash transaction But daniella is now want sends me a pay to tap rich address right and how would I go through that process? So we'll look a bit in a minute. We'll dive a bit more in depth with the Locking and unlocking but essentially yeah, that wouldn't be a problem because in that bitcoin transaction What I would do is I would have to provide a valid unlocking script Right for the funds that were locked to my address So I would have to provide that signature that satisfies that locking script But then in the output of that transaction where I am sending funds to daniella's Pay to tap route address I would create a locking script that is appropriate For that address right and talking about locking scripts for pay to tap route is Addresses is like outside the scope of the course. Um, what we're doing today But essentially that's not a problem. I just have to provide an unlocking script Which we'll see in a second here as we go to here This input right here's the unlocking scripts. So I would have to provide an unlocking script that is appropriate for that pay to Public key hash address and then in the output this new locking script Then I can create a locking script that's appropriate For the address that where daniella is receiving funds I hope that helps there any other questions Mike Well, you're either on mute or there are no questions. So I will move on All right, I'm sorry about that Uh, they can hear me. Um, yeah We I think I think we should probably move on just because we there are some questions But I think having seen the slides they might be answered going on So if your question isn't answered in the next couple slides, please please restate it and we'll get back to it Gotcha. Okay. Let's do that. Okay. So we've gone through this the whole, you know funds are locked my address I have to unlock them to send them on to daniella's address, right? All right, so to understand the locking and unlocking locking Let's go through inputs and outputs and the utx o the all important utx o So let's look at this picture, which is one way to envision utxos and again This is like this circular sort of thing where we're going to talk now about utxos But we might come back to it in a bit because these all these concepts go together All right. So first of all a utx o is an unspent transaction output So let's go back to that example I have created this key pair from that pub. He have produced an address might have sent funds to That address and locked them to that address that I produced So that is an unspent transaction output. So again, if we come back here and look at the structure of transaction I'll dive in depth in this in a minute But here is this output right some sort of input and there is this output and here this is You know funds being locked to You know locked with this particular script, right? So they are locked, right? It's an output That is locked with a particular locking script But is out on the blockchain and in theory it is spendable bitcoin, right? If someone can produce the appropriate Unlocking script it is spendable, right? So this is important because so much in bitcoin we think about utx os, right? These are basically chunks of bitcoin on the blockchain that could be spent So let's look at here. Let's walk through this example from the mastering bitcoin book We have this is like a whole block here. This is numbered, right?  So Joe here had a utx o But he took that output that he had and he used it to create a transaction to alice which creates another output, right? Then alice took, you know, and that happened in this block and then alice used that Output that she had to create another transaction where she sent some funds to bob, but some back to her right bob and and so here she has this Funds that she potentially could unlock in use. This is a unspent transaction Output a utx o bob then goes and takes his utx o and uses it as an input so we spend it But he produces two outputs one back to him and one to go past here, right? So as we look at this we want to track, you know, once you have an output Once that is used as an input on a transaction. It is then a spent transaction output, right? And so in the bitcoin worlds, we're thinking about a lot of this stuff We're generally much less concerned with the spent transaction outputs than we are with the unspent transaction outputs Like, you know, your bitcoin node Will track all the unspent transaction outputs it can find right it's going to find all of them on the blockchain It's going to track it and like keep like, you know Keep a track of those and keep an eye out for them to see if anyone wants to spend those So utx o is just bits of bitcoin that could be unlocked and transferred elsewhere, right? And you can use this picture to imagine it if you like all of these ones in red are Um outputs that were then used as inputs They're spent bitcoin that bitcoin is moved on from that address and then all these ones in green Are these outputs like funds that'll lock somewhere that could potentially be spent right So well with that understanding of utx o's we'll kind of dive back into our whole process walking through this transaction process All right We're not going to go too in depth with this at the moment because we just want to get the concept of inputs and outputs And then in a couple of slides we'll come back to this picture here and really walk through it in a bit more depth But again, what's in what's important to pick up from this slide is just the idea that all bitcoin transactions Have some inputs that are used for them, right? This was a utx o here Right when mic sends me that bitcoin and it's locked to my address That's utx o and then if I want to send daniela some funds I can use that utx o as an input And then in this bitcoin transaction create a new output. So this is now no longer a utx o It's a spent transaction output. We don't care about that anymore As long as it's valid, right? And then what we now care about are these other these two outputs which I created here Perhaps one going back to myself and then one going on to daniela, right? And these are our new utx o's So we consumed one utx o here as an inputs and produced these two New utx o's as an output. This is no longer a utx o at spent Now we care about these two utx o's these two outputs unspent transaction outputs Okay, so every bitcoin transaction is kind of going to go through that process inputs Outputs consume a utx o create new utx o's right for that process. All right So a couple of things about Um utx o's and then we'll pause for questions and then we'll dive a bit more into depth on This um image here this process All right transaction outputs consist of two parts an amount of bitcoin denominations Toshis the smallest unit of bitcoin Um an cryptographic puzzle that determines the conditions required to spend that out of course Okay, so if we come back and look at this we can kind of see that's what's going on here We have a value and we have this locking script Which we'll talk about more in a minute. All right So it's also known as a locking script a witness script for a script pub key Actually in here. Let's talk about it. This says script pub key um and script sig right script signature and you can see that this is what it looks like in the bitcoin You know bitcoin core code And it got this name because of this original type of transaction, which is the pay to You know pub key pay to pub key hash right So with that in mind, I guess when the bitcoin was written I guess the toshi was only envisioning this type of transaction right so script pub um key It's like saying i'm locking the the bitcoin to this public key right and in order to spend You know that bitcoin you have to unlock it with the signature right but of course now because we have much more complex versions of bitcoin transactions that terminology isn't really entirely accurate So we often I tend to use just the term locking and unlocking script right but witness script or script or script pub key etc Like there's a different terminology used for this. I prefer locking and unlocking script. So that's what I use All right, each input contains an unlocking script and refers to a previously existing utxl All right, the validation software will copy the unlocking script retrieve the utxl reference by the inputs and copy the Locking script from that utxl the unlocking and locking script are then executed in sequence. Okay, so that was a lot But we'll walk through it in a bit more depth In the coming slides in just a second. All right When we say that a user's wallet has received bitcoin What we mean is that the wallet has detected on the blockchain a utxl that can be spent with one of the Keys controlled by that wallet right your wallet is like scans the bitcoin blockchain is like a ha That utxl I think I can spend it if I want to so that then your wallet says that's part of my balance right All right Thus the user's bitcoin balance is the sum of all utx those of the user's wallet can spend in which may be Scattered among hundreds of transactions and hundreds of blocks right So the idea of telling you this here is that you know, if you get a bitcoin wallet and install it on your phone and open it It's kind of going to say here's your balance right and this is your wallets making things really easy for humans That's actually not what's happening on the bitcoin blockchain. Things are scattered these utxos. I'll be back up to this picture These utxos might be scattered over a number of different blocks. We can see alice has three Different utxos right which are scattered over, you know, all these different blocks Here and then but this might be the current utxo sets down here So her wallet might be aware of this utxo this utxo and this utxo and it looks sort of Different on the blockchain than it is presented for alice in her wallet Okay, so Now that we've talked through that we'll dive more in depth into what's happening in this particular bitcoin transaction, but first If there are questions that uh, we've not yet properly answered We might answer them here, but mike if we've got any interesting ones, please let me know Um, well, we that we had a question about utxo. So I hope that uh that that was that uh that helped to answer that one.  Thank you sounds like a good plan All right, so here, um, we're going to Um, this as you look at this it's kind of confusing right first time you look at this You're like wait, where's the bitcoin and what's happening and what's this be out in sequence and I don't get what's going on here, right? um, and what we need to keep in mind is the bitcoin software is always trying to preserve Um space in the bitcoin blockchain, right? So we want to broadcast and record absolutely as little information as we need to so we don't bloat the bitcoin blockchain, right? so A lot of what's happening here is just reference to other things For example, let's look at this input right and this v in these are the inputs being used For this transaction, right? So again, if this is that um mike has sent me some bitcoin and I want to send some of that bitcoin on to daniella I what the This might be the transaction that my wallet puts together for me, right? And it's going to say Hey, this is the inputs i'm using this is a utx o which i'm going to consume and thus destroy to create new utx os, right? So this is the utx o that i'm going to use I'm not going to tell you all the information about it because that would be a duplicate all the information about that utx So already exists in the blockchain. So all i'm going to do is just point you to it This I forgot that this is just an image and I can't highlight it. Maybe I will go Here There we go. Haha. Okay. So and then maybe I can zoom in a little bit Control plus Thank you mike. That was it. All right So hopefully you can see this a little bit better But the idea is is i'm just going to tell all the bitcoin nodes that I broadcast this transaction to them like Hey, I'm not going to put all the details of this utx o here because i'm just going to tell you where to find it You go back and look at the blockchain and you look for this transaction And you look at this specific outputs of that transaction because we can see here Transactions can have a number of different outputs, right? So if you look at the very first Outputs of this transaction, you're going to find the utx o that i'm talking about and that I want to use And so, you know someone else's bitcoin node Right, it's going to go out and say oh, okay. All right. I have to go find that utx So here it's going to find another transaction that looks very similar to this It's going to say right here's the first output of that transaction here is the locking script So i'm going to copy that right Then i'm also going to take this unlocking script You can see it's kind of big here. There's a lot going on It's going to copy this whole thing boom and then it's going to run those two things together We won't talk too much in depth here about bitcoin scripting because we cover that in depth in unit seven But the idea is it takes the unlocking script It puts it together or it takes the locking script It puts it together with the unlocking script and it runs those two together and see if one can satisfy the other Right, if so then my transaction to daniella is valid, right? So let's look a bit at what's happening here You can we'll stick to this one here. So this is complex, but hey, basically it's saying i'm locking this to this public key right Again, we'll get into this in unit seven kind of simplified But then it's saying hey I have to satisfy this this big long thing here is going to be a signature Right and we'll talk a bit more depth and signatures in a minute And here is the pub key, right? So these look a bit different. They're all formatted a bit different again unit seven We'll talk about that, but that's basically what's happening. So if we come back here And we look at this one all right here is um More in-depth view is that locking script and that unlocking script And we'll talk about how these are run together also in unit seven But basically it's saying hey do all these things to format this pub key right this hash of a pub key, right? And then I have to unlock it and spend it. I have to produce a signature That was that can be validated Um using this pub key right so signature that was produced with the private key corresponding with this pub key Right and these have to match up. So I have to prove that I can produce a signature That um is from the private key corresponding with this pub key, right? That's what I need to do to unlock that utx o and send some funds onto daniella right So that's roughly what's happening here Let's go through some of this because you might be still looking around going why is there all kinds of different things This is script version again. That's for later lock time. That's time time locks and all this stuff very Fascinating stuff. That's for later This v in these are all the different inputs that we're using It might be that I want to send daniella more money than mike sent me Right, I want to send her more bitcoin than I received from mike So I have to use another utx o that I got from charlie earlier, right? And I have to put those together to then be able to have enough funds to send on to daniella, right? So I could have a whole bunch of inputs. I could have one or many many many outputs, right? But here that's what's happening. It's we're for every Input we're referencing a previous utx o via this and we're producing An unlocking script which in this case is a signature But it could be a number of different things and we're producing an unlocking script in this sequence again That's used for time lock sort of stuff. Um, which is outside scope for today But that's just for more complicated transactions Okay, then let's come down and look at the out the out is a bit more human readable, right? We can see exactly how much we're sending, right? Maybe this is coming back to myself and this is the funds i'm sending on to daniella And we would know here Even though it's not expressly stated if this is a valid transaction Then this utx o referenced here would have to have at least this much Bitcoin in it, right? So zero point zero Nine nine, you know, whatever it is, right? You add those two up any difference between that input and those outputs is assumed to be a Transaction fee which goes to the miner Right and again, we're putting as little data as we need to in the blockchain So when you see this transaction if you're trying to read this yourself as a human or your bitcoin node it's going to have to Sort of create a lot of the data like go reference other things and piece together The complete picture of what's happening here because again, we only give absolutely as much data We have to not drop more, right? So we preserve that space in the blockchain Okay And then looking at this v out, right? This would be output zero This would be output one Right and we have a value which is nominated in satoshis And then we have this Script pub key, which is the locking script, right? So this in this pay to public key or pay the public key hash format It is essentially the pub key That you're locking funds too But because we now have much wider variety of bitcoin transactions, it's the locking script Right and we'll stick with that for the moment Okay, so that was a lot That is, you know, let's just hold it here on this slide. That was a lot that's a lot to Sort of digest again, like I said, you might want to come back to this or you know Check out like rewatch one of the videos from unit three. There's a good one there where andrea talks through this This is also, you know Chapter six of mastering bitcoin goes through this, you know, so if it does it all quite gel for you at the moment Just, you know Come back tomorrow and come at it from a slightly different angle and hopefully then that makes it all Gel properly in your head. But also what helps is asking questions. Mike. Do we have any questions at this point? Mike is perhaps on mute All right, I like that one cool questions. Okay So signature verification, who's doing the signature verification? And again, this goes back to unit one where we talked about everyone needs to know about everything on the bitcoin network So who's verifying the signatures? Everyone everyone is So what happens with the node is if i'm if i'm a node, right? And i'm sitting there and i'm watching this transaction, you know go from, you know Hannah to daniella and i'm like, is this valid, right? Every time I see a new transaction come in I'm going to look at it. I'm going to go read the data.  So every node On the bitcoin network is validating the signatures with every transaction, right? It gets a bit more complicated, but um Every single transaction is validated by every single node on the network So i'm going to go and i'm going to run and we'll do this in a minute in python So we can kind of get a feel for of course this little difference In bitcoin a bit more complex. We'll get a feel for doing it in python um And so i'm going to validate it right and i'm going to run it through my software and it comes out with Hey, that's that signature matches, you know that pubkey and that message excellent. Boom. That's valid I'll then broadcast it on to other nodes, right? So if something is invalid It's gonna, you know, the first node to see it is going to see it as invalid And then we'll refuse to broadcast it on to the rest of the network So an invalid transaction with the bad signature isn't going to get very far on the bitcoin network So I hope that answers that question then to the question of can you disagree? um And the simple answer is no right because if we had a case where there was a transaction where some nodes thought that was valid Right, maybe that we're using See these little things dupe or off dupe off hash 160, right? These are our op codes, right? So they're um like functions that the bitcoin software runs It's to check on this stuff and if someone was perhaps using an op code that one node Thought existed and another node thought was invalid and didn't exist If that had ever happened, right you would then wind up with a split in the network, right? That would fork bitcoin into like two different versions So essentially No, we can never disagree because if we disagree Then we we kind of fork the whole network So this is part of why updating bitcoin and changing it is so contentious and slow and difficult because it's pretty catastrophic if we wind up with a situation where nodes Disagree about what is there is not? A valid transaction and we'll talk more about that In unit eight the short answer is no we never disagree. We hope So Mike any more questions No, we're all right. All right. Thanks Mike. Okay, so hopefully now we all have a pretty good idea of what's going on with UTXOs and locking scripts and unlocking scripts and pay to pub key hash transactions and inputs and outputs Right, that's the idea is that the goal for this session is have you all like form that picture that map in your head of what's the flow of what's happening here and what are the necessary components and How a node puts this data together, etc So hopefully we've achieved that if not, please do come back and watch this stuff again sometimes I mean for me it usually takes like three passes or something All right. I think we're going to skip this for a moment This is just a link to go look at I think would I try to find this transaction in the bitcoin blockchain? but I think we'll move on to trying our exercise to Sign and validate some data because that's really fun. And then maybe we'll come back to poking around a bitcoin walk explorer if we get the time so Let's move on to our exercise and what we're going to do is sign and validate some data, right So if you're following along with this again, you want we're going to do this in python Um, you can install python on your machine. I'm on a ubuntu machine here So that's the examples that I'm showing. I have a python installed on my ubuntu machine You can also, you know run this And you know all kinds of different You know websites will let you run python in the browser, etc So there's lots of different ways you can follow along with this But Importantly what I've already done and what you'd need to do to follow along with this is make sure that python knows to go and download this specific Library so ecdsa elliptic curve something signature algorithm I can't remember exactly what it is, but this is the mathematical library Right that we need to do this this math this complicated math And i'm downloading this one because there's other ways you could do it in python Or we could do signatures and we don't need this specific library, but i'm using this one because this is The um, it creates the type of signatures That bitcoin uses right so this s e c p two five six k one Right this long complicated thing. This is the type of signature that bitcoin uses so Here i'm just telling you how to get the library. Um, you would need if you want to work with That bitcoin variety of signatures now there are the ones, but this is the one we're talking about today It's sort of the original Okay, so I have um this Code hold up here. I'll show you in a second All right, but we're going to do first is we need to generate a key Specifying which curve to use and this is the the curve right the type of math that we want to use to create the signature I said it um in uh last week and i'll say it again today Don't roll your own crypto right don't go try and creating your own curve Don't try and create your own math here unless you really want to be a cryptographer right then definitely do that But if you're not going to focus on being a cryptographer and working on these algorithms Just use a well tested, you know well used Common library because if you don't you wind up causing yourself a lot more trouble Then you're able to fix Or it could be you know more a lot more trouble than it's worth. Okay So here we go. I have this file. I'm just going to uncomment as we go First we can see that we are importing this signing key like this particular The library to you know do the math that is necessary for this particular variety of Signature right So from this library here. Okay, then we're going to um generate a key Is signing key so Here we've been talking about public keys and private keys, but when you're talking about signatures They're often called a signing key and the verifying key We can just remember that the signing key is The private key and the verifying key is our public key. All right So first thing we do is Generate the signing key right generate the pub key. I'm sorry Private key so always when we're generating these key pairs. You start with the public key Bank I keep getting it backwards. Let me try that one more time when you're generating these key pairs You always start with the private key and then that you know a public key is derived from the private key So the first thing we do here is generate a private key or a signing key You're using this specific math here in that library Then we'll go and use that um to create this verifying key So we take this signing key Run this function on it and produce this verifying key or a pub key All right now um to Oh, not that one. Um, all right, so There are sort of Three components we need to think about here at least when verifying is we need to have The message the signature and the pub key right so we need to create this message right now This is where bitcoin transaction this lovely phrase here. Not your keys. Not your coins We could replace that with an actual Bitcoin transaction with inputs and outputs, etc um But here just for demonstration. We're just creating a string my simple string which we'll sign So here it's not your keys not your coins All right, so then Once we've created this message, right? This is the creation of our message But then we'll use the signing key Which remember is our private key and we'll run this function on it to sign it And that's going to produce a signature, right? And let's come back here for a moment And look at this. This is one of my favorite Graph graphics to use when talking about this stuff But before and we were talking about last week We're talking about a difference between encrypting data signing data and hashing data. Remember when we are signing We're taking the message We're not altering the message. We're not really doing anything to that. We're just producing An additional bit of information, which is That signature, right? So when we go to validate, we're still going to take the original message We're just going to add to it that signature and then we're going to validate it against the pub key Okay So let's come back here All right, so now we've done that. We've imported our library We've generated the private key or the signing key. We've generated the pub key or the verifying key We've created a message and we have produced a signature Now let's print that out so we can have a look at it So i'm going to save this I'm going to come over here to terminal Hopefully y'all can see that pretty well. I zoomed in a bit today and then There we go. I'm going to run this file and hopefully it's spit out a signature Ta-da, it doesn't look very nice, right? Because that's readable for computers Not for humans, right? But that is our signature. Okay, so That's what we spit out on the screen, but we have all this different data We have keys. We have the message. We have the signature All right, so now let's go through and try to Validate that this is um A valid signature, right? We're going to go through and check this And look at this, you know, because it's python and we're trying to sort of do all these different things So it's kind of difficult a little bit difficult to read it Let's go look at the different components that we're putting in Like the different components different bits of data that we need to validate the signature All right, the first thing is our message not your keys, not your coins Exclamation mark, right can't change anything about that that message or it will no longer be valid All right, then we have this bit of data which is the signature that we just created and spit out on the screen And then we have our verifying key or our pub key, right? So we have those three bits of data And then we can put these all together and fancy math happens and if they all match up Right, we can be pretty darn sure that this message was um signed By the person that holds the private key associated with this pub key this verifying key, all right So we can do this and then here we are So just the functions that we've used here in python. This isn't really going to print anything out on the screen It's just going to throw an error if it doesn't work, right? So I have this print statement there And if we managed to see this as an output in terminal, then we know that that assert function has ran without throwing an error So essentially it validated the signature So let's say this We'll come back here And we'll run that and let's see what happens Ta-da Congrats you successfully validated the signature Now let's look at why this stuff is so important to bitcoin, right? It's so important because this is how I can be assured that you know, mike sent me those funds and he locked it You know with that locking script to my address The idea being that only me the person that's hopefully the only person that's holding the private key associated with that pub key that Mike locked those funds to only I should be able to produce a valid signature To send those funds off to daniella or charlie or whomever, right? Now if this this needs to be the case that um only I can do that and this message Used to create that signature can't be tampered with otherwise Mike could see that transaction and just alter the message They're like actually one of those outputs is going to come back to me, right? And anyone could do this right and just alter that transaction so that they're receiving That bitcoin or they're getting that utx o which they can unlock right instead of daniella getting it So the idea being is it if we alter this message in any way This signature um cannot be validated, right? It'll throw an error, right? So let's change that and i'm just going to change this exclamation Point to a period right very very tiny change. I'm going to save that and then we're going to go Back to the terminal here and we're going to run this again and see what happens Boom here. We go. We got an error bad signature error signature verification failed So this is mission accomplished for this cryptography, right? It says if I try and alter this message because this message was the input used when we created this signature, right? If I alter this message In any fashion from what was used to create the signature then i'm not going to be able to validate it So this is how For this type of transaction. This is how The bitcoin system prevents someone from just going in and being like actually that bitcoin is mine Send it over here, right? You can't do that because the math the public keys the verification, etc Won't Line up and won't work all right so that hopefully Was like I always enjoy messing with this stuff in python Hopefully you all can follow along with this And have a bit of fun with that as well But at this point we only got a few minutes left might do we have any questions? Yes, I believe that's accurate, but I remember about it is that Yeah, yeah, and I can't remember exactly what the b is but that sounds right because I remember when I was putting this script together It's like if that's not there it's not going to work Right, that's how python knows that this is this is a string that i'm passing it. Yeah awesome All right Any other questions? Right now. No, we don't But if anyone has any questions, please feel free to put them down in the chat below and But while we do that I'll just vamp for a minute. Thank you everyone for joining us and of course Thank you hannah for taking us through this So far and of course if you just getting here This is again a supplement to sailor academy's course So please find it in the link below and uh, so taking the course you can find the other videos also if you need to catch up and um Yeah, I'm not seeing any questions coming in that's about um, oh never mind every time I say it We'll get another one. All right. What do we got? Is there any reason to transition uh, utxos from one style of address to a newer one? Okay, so if you're holding um bitcoin in let's say pay to key hash Addresses would you want maybe to then hold that bitcoin in pay to taproot addresses? And the answer is yeah, totally um, or how about you know, maybe you want to um, move that from pay to public key hash addresses to like segwit addresses maybe because you're then going to go and Use that money um on the bitcoin lightning network, etc. And there's all sorts of specific use cases we could get into maybe there's some Um functionality you want to use that requires um taproot So you would want to move your funds to taproot addresses So um, yes, there's definitely reasons why you would want to use one type of address over the other But I don't think you really have to worry about like if I'm storing bitcoin in Pay to public key hash. Do I ever need to like move it or whatever? It's like no not really because if you're storing it here Um in this, you know, maybe older type of address But you're going to want to use this service over here that requires a newer type of address Then you know, whenever it is you get around to doing that just you would create a transaction that as you went You know, like if you wanted to open a lightning channel or something When you moved those funds you would take these utxos as an input and those outputs would just be of the new variety would be, you know segwit address that you would use as the output to open that lightning channel So functionally, I'd say you don't really need to concern yourself with um What type of address formats your bitcoin is currently stored in It's just whenever you want to do a new feature you would have to have a wallet That was uh, you know speaks that language Can can is enabled with that feature and then as you move funds over to go use that feature That transaction would just take an input from an old address type and spit it out lock it to a new address type So kind of but don't worry about it. I think it's the address is the answer there Excellent. We got a thank you there in in the chat and I guess the final question will go out on here real quick is um um Someone wondering, um, they won't have to be writing code to create signatures. Will they? Or they will be happy. Um Yes and no, so this like hold on. Let's go back here This is like the level of code that you might have to write right unless you really want to get in depth You really want to be like a photographer or a protocol? Um engineer then then you would be but if you're just like a lot of the work that I've done is just sort of integrating Bitcoin functionality into other systems like working with bitcoin not really being a bitcoin protocol engineer and then in this case like Generally, it's going to be finding the appropriate library making sure it's a really good solid library and asking google We're referencing the documentation to find the appropriate functions to use in that library Like what we see here is kind of in general Unless you're going to be a cryptographer or a protocol engineer. This is sort of the level on which you'll have to actually work with that that math Okay, excellent. Thanks a lot. Um, and I think with that we'll uh, we'll call this one and again I just big thank you to hannah for taking us through this and a big thank you to everyone for joining us We will see you for unit form say unit four same time uh next week And if you are watching this later and you have any questions leave them in the comments. Um, thank you again everybody See you next week


wedi bod yn ystyried o'r fawr. Rwyf wedi bod yn ei wneud oeth chi'n gweithio, erbyn ei hoffwyr atwineisio am Coffin, fel chi'n gweithio, mae'r fawr yn gyflwyffain. Mae'r sgwrs ond i'n gwneud yn y ddweud hefyd a'r dweud o'n convullu rhoi o wneud ac eio'n ddweud cael y bydwyd, ac nes metres o'r atom, dweud o'r argyngrwydd shares o ran ar y dyfodol. Yn ddwyrd wideron, Rydych chi weithio'n crin. Since the need for support to work through it and move on. One of the biggest things about psychotherapies is the relationship. When you start working with someone and developing a rapport. a trusting bond in a relationship. That connection is the most important thing. There's many many therapists of all different experiences. mae'n gwybod y cymhiliad, ond mae'n gofyn o ddegol, mae'n ffordd ac yn ffordd. mae'n ddegol yn gweithio'n gweithio'n gweithio'n gweithio'n gweithio. Mae'r mhwyl wahanol yw i mi, ei ffamil, lle mae'r ffamil proffesiadol sy'n fwy ar y cyd-fianfalu, ac mae'r gweithio'n gweithio'n gweithio yn y ddiddordeb. I would just say of the crew is just to get in touch because their professional here, their job is to not judge, listen, allow the client to feel safe enough and grounded enough so that they can share their experience and what's going on for them and that's the seals broken. They can then discuss the work and the issues and there's nothing to be shameful of, there's nothing to be. I'm embarrassed about, it's a really positive move to come and chat to somebody.


The Scottish Parliament's Welfare Reform Committee has published its findings on the impact of changes to the benefits system on women. The report, Women and Social Security, followed a four-month inquiry by the committee into the subject. The committee's conclusion that it's one of the most pressing areas of concern for the social security system today. Well, the committee has found that definitely women have been more detrimental affected by the welfare reforms, and given that women tend to be the care providers in our community, that's very worrying for vulnerable people. What we would like to see is a focus on women in policy development in the future, a recognition of the important role that women play and the difficulties around childcare and caring responsibilities within the system. Some of the benefits that have been removed in the past around maternity support and other things, we want to see them looked at again to see whether we can either reintroduce them or amend what's already there in order to take account of the additional pressures that are on women. We would also like to see some of the recommendations that have been brought forward regarding universal credit and the way that is delivered to families. Be explored, and then hopefully when the Scottish Government gets that devolved power, they will be able to look at things like delivering the payment to more than one person in the household and to look at maybe moving away from the monthly delivery of payments to a weekly cycle. You can view the report online and find out more about the work of the committee on our website, and join the debate on social media.


Hello everybody. This is Dorian and I'm Roman. We are from a really good company Maybe you can see it already in the color from Deutsche Telekom And we're trying to talk about Observability and how we do monitoring in cloud native tackle world and how we can tie this all together Okay, let's look at our short agenda Question is how we collect everything? How can we get the metrics? How can we evaluate them if we have them what we do with them? Of course, and of course an outlook to the future Okay, here you can see our Ecosystem you're talking about you can see that there are multiple clusters from the ship. Thank you. Look So and as you can see we not even not we only do have 5g components But we you see there. It's called MME. So the good old 4g We want to support our customer stairs. Well, and you can see also that everything is Deployed via get ups. So here short I can forget right and of course this central Instance where we push those Metrics and locks and everything else in there is small. So it's also a platform Underneath there's elastic. So an environment to analyze those data Okay, so what's observability it's events and We have different kind of events there. We have the locks with the metrics We have some alerts and of course also really important. We have traces there. Okay Next we talk about each of these steps about lock shipping metrics alerts and then we have a special guest And then we'll pass now to Dorian who's saying something about lock shipping So, thank you So for lock shipping in Kubernetes, there's not a lot of ways So the picture you see on the slide is taken directly from cuban it is documentation Basically, you have the option to run one side car per pod collect the logs there send it to some sink Of course, it's possible that the application itself is able to stream to something in our case elastic search unfortunately Not the case everywhere somewhere. It's possible somewhere not so we need a more unified approach and of course You can also log to disk directly to the worker node Collect the data there and send it to some logging backend as I said the slide is directly from cuban it is documentation Not really a surprise We tried several of the lock shipping agents available At the start of the journey we had fluent bit and it just worked it was fine But our platform provider a cuban it is as a service provider, which is the shift a torture telecom Wants to move to a vector like a pretty new project. It's on the CCC and CF umbrella We had some trouble with it getting it right and then we moved to file bit because we have at least two engineers who are really knowledgeable about file bit, so we moved back to that one But we're already planning to go back to vector once we can and find a bit of time But I'm not quite sure if the journey is at the end there Or we need to iterate further and maybe at the end of the day, we will be back at fluent bit. Who knows let's see What are the problems? Why do we iterate through so many lock shippers? Well security is really a problem if you really think it's true mounting the whole of warlock containers or warlock Pods to some kind of application running inside the cluster. This is of course against need to know principles And maybe we are able to get some audit logs. Maybe there's some stuff which should really not be in there and being sent to an analytic solution and Well a lot of open questions there because I don't see a perfect solution in anywhere in the cuban ethos environment To be honest right now Then of course, what does the platform provider want to do if they want to push vector? We will try to comply obviously and One more thing is support as you may be aware Company elastic just stopped the support for their hand charts, which we're using to deploy So we have a small problem there. Let's see if we can solve that and also Maturity because for vector when we started it and we started to use it for the first time It was not possible to even send data to multiple endpoints So if you have for highly high availability multiple endpoints vector was only able to speak to one of them Not a problem in cuban ethos world But in this case application like the logging sink was running not on cuban ethos didn't have the single endpoint But had for high availability multiple and vector was not able to support that There's more problems, but just scratching the surface here So let's talk about metrics different kind of beast less in volume like in terms of data storage But still there's a lot there So inside the box we have the solution provided by the shift again so of course they run from ethos and the pots expose their metrics there Thanos is a front-end to query and the shift is also providing crafana, which is running per cluster and If crafana can get the data from there, of course, it's possible to scrape the entire data and send it to the logging solution again which is elastic search and Again, we had huge problems there with cardinality Inside the prometos we found something like 70,000 time series and querying them and sending them to another thing is a problem because This is the memory usage of the tunnels that we are using to query and you can see we're scraping we tried to scrape just everything there and send it away and Thanos was using like 4.6 gigabyte of RAM during the queries and then slowly getting back to normal And we had queries that took like 20 something seconds to go through and send the data back to us And if you want to query this data for every 30 seconds, you can already see it's becoming a problem If there's like, I don't know 5,000 time series more. It's not gonna work out It's possible to mitigate some of that but I think cardinality with the prometos is one of the hugest issues That's awesome interesting talks about it maybe we'll find some answers and of course, there's a special type of events that are alerts and For one, we've used of course alert manager from prometos to create alarms But also I just picked this vendor out of multiple vendors that we have Because it's already public knowledge. Anyways Mavinia, for example, is creating their own alerts and that's good. The software does it The problem is how their alerts look like what fields do they have what meter do the metadata do they have is quite different from maybe the other alerts that we created an alert manager and the problem is always how to unify it again and Having one central thing to do it in in this case elastic search and then create even more alerts out of alerts is one of the solutions and one special type of event that we like every Git commit to the main branch which will result in deployment and Being sent there as well. So you can see these red lines and the red lines indicate that at this moment in time There was a commit to some cluster so that means if You can see that something apparently is wrong lock volume increases like tenfold or something but you see this red line you at least know where to start looking and I've talked about the huge differences in quality about lock formats and so on and so forth And we found one special guest which quite it's quite helpful to have a more unified look at the things and Roman will present about that one Okay Before I come to this special guest. I want to talk a little bit about our network functions We of course have a multi-vendor network function system here and the question is now They need to talk to each other, but how we We create some how we can achieve some observability between them so In a good old legacy world everyone lost a p-cap, right? But if we look at 5G stand alone With all this new services, we have some RFC 1945. Does anyone know what RFC 1945 is? Raise hands. No one maybe you're too young It's HTTP 1.0. So actually HTTP is even older and HTTP 1.0 is from 1996 by the way actually 5G stand alone, of course Is using RFC 7540 so which is HTTP 2.0 from 2015 Yeah, so we decided to put something in the middle to abstract those communication between those network functions and we chose for time being Istio for example and the black box the gray boxes here are Showing the design course there Which allows us to abstract certain certain things right like security and so on and Also with this Side course there we have the possibility to use tracing solutions Like Zipkin or like Yeager for example But our current way is we are trying to use the access lock first That means every message which goes from one network function to another will be locked and Here you can see An example of that This is already as Jason because Jason makes it easier to to parse that in a in a useful matter Especially if you have it in a yeah elastic for example, you can see here. It's the method the protocol The network function that the path it's using so it was a registration message You see if it was successful you even have the duration So lots of things and you see here. I put some dots there And it's even bigger and if there's an error like for 400 message or 500 whatever You would see then also a root cause there Yeah, of course If every message gives us a lock entry this means also it's from performance point Could be a problem Currently we are using this one But maybe we're coming back to or we are going forward to Those more enhanced ways to use use it for the SPI communication Okay, then let's jump to Evaluate all this data and Dorian is taking care of that so we have a lot of data on all the places and we have to see that the The 5g of course is new. Maybe we have new vendors inside there. What do we do with the data? And the most important question is is it working yet? Can I use it and usually you can go from the bottom up and check like is the info okay? Are the servers running is maybe the connection to run even there or has it broken somehow? Then you go up to the Kubernetes level and you can check simple things as Such like our pots even up are some of them not running and if everything seems okay Then the only solution you have of course is look at the application locks itself like the transaction locks like 5g Signaling protocol and of course the real application locks as well where maybe they report a problem Maybe they don't but if you do all these steps to really have a great understanding of why is it happening? and what can I do to change whatever I don't like about it for example having high latency or crashing applications and The other option which we're also using is to receive the answer directly and the answer obviously is 42 always But the problem is that we don't really know the question. So we have machine learning in place and it's telling us hey Something is out of the ordinary like something doesn't really really look right. Please take a look But maybe we don't even know why that's happening and worse. We don't even know what to do against it So this is the top bottom approach and the other most bottom up approach and it has to meet somewhere in the middle I'll explain a bit more in a few slides from now. So please bear with me and There's one metric which I like this is showing the Successful and failure registrations at the AMF level and Unfortunately the lower bars like the really tiny ones. That's like 8% 10% something. This is the successes So this is a horrible state right everything is failing and so on and so forth the problem here is if device for example attempts to register with the AMF and is rejected for valid reasons for example, it's not Allowed to use 5gsa or something. This is counted as a failure So what does it tell us? Well, we have a lot of data inside here But this data is not really that useful to determine if the application is working because this is perfectly fine It could be 100% KPIs on everything else, but this one, okay So we did some evaluation and it's cool to look at it, but not that useful my opinion. So this is to evaluate step About the machine learning for example, we receive emails like this one This is again the smops platform the machine learning jobs tells us. Hey, there's a metric It's called LTE something so we know it's related to MME component to 4g and it's way higher than use usually And this is a registration attempts in this case But the problem is if you receive this out of the blue and you've never seen it before You have the same problem again. Okay, you know something there is wrong But how to fix it? Where does it come from and then you need to go back to steps and trace it back to inverse case hardware level or Maybe some broken connections to run So of course we need to take action and now it's going to be a lot more broader than before What do we need to do if we have all the data? Well, we've seen that we need to automate all the interactions especially with everything ledger see especially with things like the run and of course also with the paperwork because Every time we do a change and we want to do the small incremental changes We need to notify a lot of systems like we notify need to notify our own first line and say hey Don't worry. This is a plan change. We have everything under control We can collect this for example from him chart hooks if it's a pre-upgrade hook We can just silence the alarms that are going to inevitably show up we can collect it from Kubernetes events and Like one small nitpick even the change requests, right? We have change advisory board change needs to be created send to them then to be asked Hey, is this okay? Can we do it in this time frame? Well, if we do eight or like maybe 50 changes in a day, which is maybe the goal with all the cloud nativeness We need to automate that as well there's no way around it if you have multiple clusters and want to do it like It's in no way possible to do this with a manual work and maybe create some Excel sheets or PDF files and send it via email and Of course, one thing you have to do is exercise You need to do worker node roles that means replacing old machines with new machines With probably higher level of kernel patch level or something else changed You have stuff like chaos mesh and the friends to do some chaos testing just kill some parts See if the application is as resilient as you are hoping to Do a lot of small changes to the environments really get to know is this change something I could do in the middle of the day when everyone is on their phones Or do I need to maybe shift it to the night? Of course, this is not what we want But might be the current situation and of course you nearly need to check like is it a change hot reloadable That means like can I run it without any application even taking a restart or does it include a pod restart? And if the pod restarts, what does that mean for the customer because that's the only thing that we should be really worried about in the end, right? and As an example at one point we ran like these node roles like completely replacing the entire hardware supporting us for like five days in a row So we really had then all the data like and hey, what are we knowing what can go wrong? What doesn't usually go wrong? And also to of course to train machine learning because it should be able to know Hey, this is a node role and this is expected result a bit of the outlook Talking about how to deploy tooling and some key takeaways. Hopefully So deployment strategy, there's one proven way in which everything can work And that is of course you take one core out of service You drain it you wait until there is no customer lift running any session on it and then you delete everything and then you let for example worker node replacement happened or you just run the software update that you're supposed to run and Then you wait a bit and your profit because if something goes wrong will no customers on it. No one cares you can always bring it up later if you're sure that it's saying and The config is working and so on and so forth but the problem is this takes a lot of time and If you want to keep up to date for example with security patches, you're not going to be able to like only do deployments once every couple weeks or something else, so of course really want to be cloud native and Because this is not the goal to be cloud native in itself But the goal is to be able to for example fix security problems fast and And then and please take this with some humor because this is a collection of the worst things that happened in the past And it's not happened all at the same time and it's like not to be taken that serious, but You start your rolling upgrade of either infra or application And then you run into a Linux kernel bug that you never heard about before and it only happens in your specific circumstances And then maybe you'll notice that there's some undocumented breaking change in some component proprietary or open source And suddenly nothing is working anymore That's kind of bad then you notice that you have a problem with multis like I believe this is the part where applications are not really Cloud native and let's see if the Kubernetes path will change it And then then you get the call from your boss over fixed line because mobile is no longer working. That's a problem and Then you promise that next time it will really work next time it will be better and hopefully you're right because I think that's still the goal where we want to go so one short Exercise about tooling like we're really interested right now in psyllium We are really interested in this enhancement request about multi-network requirements that will make multi-networks first-class citizen We already heard it before today. Of course and wdaf. Maybe lock shipping. I told you before this isn't the end of the road Maybe We folks is working on this helm cluster state drift detection, which is interesting and in the end Maybe it will turn out we'll have to write our own operator. Maybe it's worth it. Let's see So some key takeaways Observability is never finished. This was the main topic, right? Let's see how far it we will go and how well where it will bring us and The cloud ecosystem is huge and heterogeneous like we have I don't know Hundreds of pods different kinds of software some proprietary some open source some of them have problems some introduce new problems some fix old ones who knows there's a big change always and The cloud nativeness is not a goal. It's a tool Like we want to have the tools to not be forced to stand up in the middle of the night to make updates we want to do it during the day and We want to be fast for example with security patches and this is maybe the right tool for it. Let's see So cloud native is really difficult, but desirable. That's where we want to go and Interface to ledger C including all the paperwork that will not go away So the only solution is to automate most of all most of the things all of the things and That's something we need to tackle as well. So thank you for your attention and I'm not sure about the question part because book mention. It's going to be hard But of course we are also up for questions if you have some later I Again, please Again need to improvise Thanks, Dorian. Thanks Roman for the presentation. I have obviously some insights into what these guys are doing And might ask unfair questions But can you reflect it's obviously how it's going now? What were the major hurdles that you needed to overcome to come to this stage? So how it all began and give us a little bit of retrospective What you used before this and and how is this helping? talking about observability or general Such a broad question I joined this project last year in the middle of last year and The project was moving so fast that there was little in place like there was alarming and there was the cluster local Grafana everyone was looking at all of the time and That means of course you need to log into one specific Grafana for every cluster So I think the biggest win was moving everyone to one come and sink and you can see all of the clusters in One dashboard and can determine. Hey, I don't even need to look at that one because that looks perfectly healthy So I think this was the biggest win on that side Tooling, I don't think we're at the end of the road. There's still a lot of work ahead Especially in sinking with first line and the other colleagues Not really sure if that answers a question. Yeah, definitely another one in terms of you mentioned the tracing and As bi interface yeah, that's okay How about the telco protocol tracing not within the cluster, but end to end what's the experience? And what's the way of working today and where it's going? The problem of the legacy protocols, of course, scdp diameter and all the stuff, right? So We are still forced and with our five years a core Including 40 right. We are still forced to use pcaps or tracing in that matter. So it's It's simple as before right something in a switch you put it in there And then you just kind of get the same packets the network function then will receive so still old Hopefully we're getting better. Of course. This is also An effort for the vendor to to implement fancier things Which then do not need something on on network side because if you imagine you want to scale it or whatever, right? Or you want to bring it to a new servers? Implementing something at this could be hard because a technician needs to go outside and Why a remote whatever? And need to configure that right so and everything which can be do in an automated fashion is of course The best way to do to do it Thanks Roman last one or actually it's a more a comment in the Kubernetes Logging to the standard out from container from the pot is a kind of expected thing No, no brain and normal thing. Was that in your case always like that? Ah Asking the mean questions, so I will not name them a specific vendor But basically I've been told that if they cannot lock directly to some host mount path that they are not able to have any insights anymore This was sometime in the past We've fully moved to standard out but we had to push the vendors in this case and I think it's a good sign that they're being pushed and that they're allowed to Push it and hopefully it will help everyone like we don't want to tell a common specific solutions We think there's general solutions that will have everyone including the vendor and that's what we're usually pushing for And and in the slide from water phone. We had this hand-in-hand, right? So it's exactly what we need here, right? We we as as telecom or as water phone We do not go to Ericsson and Co and say please implement it like that, right? So this is not working. We need to do it hand-in-hand and improve forward in maybe even a DevOps way with the Infinity infinity loop. So, yeah, that's I think that's the goal We need to do and and that's also the paradigm shift in the heads of all the technical vendors and the managers there We need to yeah


The number one thing I've always wanted to do as a kid was to build a coffee shop. Five years ago I did that and today I'm going to be sharing with you the eight tips in building a successful coffee shop. Hey, it's Wilson here, your friend in helping you build a successful profitable restaurant. Huge huge shout out for these two people out here giving us support and inspiration in creating these videos for you. If you want the shout out, make sure you guys comment in the section below. Let us know how you are doing with your restaurant business. Now without further ado, let's dive right in. Number one tip in starting a successful coffee shop is to know your audience. It is crucial for you to understand the profile of your customers so you know what to serve them and you know that they'll like it for sure. It is so detrimental to your business if you serve them something that they don't like. Someone that tailors and enjoys Starbucks coffee is very, very different than someone that enjoys Dunkin Donuts coffee. So we need to understand our customer profile in order for us to serve them what they need.  Second tip in building a successful coffee shop is to leverage your location. Understanding the components that makes your location unique is crucial as well. What are some of the components? Number one is visibility. Is your shop visible for drive-by traffic? If it's not, that means it's a neighborhood environment coffee shop then you need to understand you're doing business for your neighborhood. Second thing is your community. Understand what type of community you're serving within your location. If the community you're serving is in this high rise building full of office people then you know exactly the type of clients you're serving and to leverage your location properly so quick grabbing go is what you would want to do. And the third thing is accessibility. Is your location accessible by car or by transit or by walk-in? Understanding this allows you to create and garner this experience for your ideal customer by leveraging the type of location that you have. So then that way you can always have people coming into the doors and out the doors all the time.  They come in based upon the pictures that they see on Instagram, on review sites and if your interiors are not nice it's not pleasing. It's not on brand. People would not come and try out your food. Same thing with your food. It does not matter what the quality of the food is. If it doesn't look good people are not even going to come in and give your items a try. Making all your items and your interiors pretty and aesthetically pleasing is your foot in the door. That's what wins the first chance. Give you an example. A local mechanic shop recently did a complete facelift. They renovated the whole thing, took out all the equipment and built a cafe inside. And within this cafe it was modern, it was clean, it was aesthetically pleasing. On top of that their food looks amazing and that's the reason why they have lineups out the doors every single day. Although having said that the quality of the food is just meh but it is because the feeling that it gives their customers which got them tons of business. Now that you got your foot in the door and you got this aesthetically pleasing interior and food item the fourth step is to make sure that the quality of your food item is really good. Getting the foot in the door is only one step. The second step to get people to come back again is to make sure the quality of the food is good. If the quality is no good people are not going to come back and at the end of the day you're just going to spend tens of thousands of dollars on renovations and marketing yet people don't like it. That's the reason why you need to have good quality food in order for people to come back again and again and in order for you to build a long term successful coffee shop. If you guys like this video whatsoever make sure you guys hit the like button so then that way I know this is the type of content you enjoy. Now let's get back to regular programming. The fifth step in a successful coffee shop is to build a community. Now that we have people coming in again and again we want to turn these regular customers into advocates of you, into loyal fans that spreads the word for you to introduce and get people to come in and that's where the community comes in. You need to help them feel like they belong in this environment. Help them feel like that they are one of you guys and that's how you're going to be able to have them as part of your community. Build a relationship with them and that's how you're going to be able to convert regular customers into loyal fans that would always choose you over your competitors. The sixth step in a profitable coffee shop is to know your numbers. So many restaurant owners go out of business because they don't understand the numbers. They don't know what their costs of goods are. They don't know what the prime costs are. They don't know what is the labor cost. That's the reason why you need to understand your numbers. Not only in order for you to actually know which levers to pull in order to change your business, to improve your business, but also to know when someone is stealing from you, when someone or when operations and systems can be improved upon. It is all down to the numbers. The seventh tip in building a profitable coffee shop is the average order value, AOV. What does it mean?  As an example, in a coffee shop, how many coffees do you need to sell in order for you to make enough profits to pay rent? If every coffee you sell makes you 25 cents. That's a lot of coffees we're talking about just in order for you to make rent. And that's the reason why a lot of coffee shop owners, they have pastry, they have fruits, they have soup, they have salads, all these types of items that uplifts the average order value. And that is in hopes to get a bigger profit in their pocket. So we should always, always be looking at ways to increase the average order value in order for us to make a bigger profit. The final tip is to diversify. It is crucial to diversify and as you can see through this whole pandemic, if you only rely on dine-in service, then unfortunately most likely you're going to be out of business by now. Which is the reason why we should always diversify. Now how do you diversify? We're talking about doing catering, different events, third-party delivery apps such as Uber, Postmates, Grubhub. Check out this video if you want to learn more about the nuances and how do you leverage third-party delivery apps. And also you can actually utilize under-utilized assets within your business. Just like how Kyle did, he created a course which made him an extra $50,000 doing bartending. Which is the reason why you should always diversify and not put all your eggs in one basket. So there you go, the eight steps in building a profitable coffee shop. I know this video might be a little bit short, maybe a little bit in the surface, which is the reason why I invite you to check out our hour-long free masterclass in the link below which we talk about the three steps in building a profitable restaurant. Tons of valuable insight for you. So make sure you guys sign up, otherwise make sure you subscribe along the journey as I'll be shooting these videos for you every single week. I will see you guys in the next video.


You can design custom enclosures for your DIY projects using 3D models from Adafruit. These allow you to create designs that feature accurate measurements, so you can get exact dimensions without having to guess or rely on measuring parts with calipers. The 3D models are available to download for free on GitHub, links are in the description. Each part features the product ID so it's easy to search and find exactly what you're looking for. Included are files in open formats such as STAP and STLs but also the original Fusion 360 file. You can also view a GIF or JPEG image of the part to see the model before you download it. If you can't find what you're looking for, you can submit a parts request using the issues tab. You can also contribute by submitting your own parts to the repo. Just follow the same naming convention and submit a pull request. For more documentation, be sure to check out the guide on learn.adafruit.com.