{
  "episodeId": "SLP214",
  "speakers": {
    "stephan": {
      "name": "Stephan Livera",
      "role": "host",
      "tag": "STEPHAN"
    },
    "pierre_rochard_fabian_jahr": {
      "name": "Pierre Rochard & Fabian Jahr",
      "role": "guest",
      "tag": "PIERRE"
    },
    "guest_2": {
      "name": "Guest 2",
      "role": "guest",
      "tag": "GUEST"
    }
  },
  "segments": [
    {
      "speaker": "stephan",
      "time": "00:09",
      "start": 8.83,
      "text": "Hi, you're listening to Stephan Livera podcast, a show about Bitcoin and Austrian economics. Today for episode two hundred and fourteen, we're talking about why auditing Bitcoin matters, why won't the supply ever actually reach twenty-one million, and which coins have already been lost. Pierre Rochard of Kraken and Fabian Jahr, Bitcoin Core contributor, join me on the show to talk about Talk. This show is brought to you by Swan Bitcoin, the best place to auto-stack your BTC in the US with incredibly easy setup and low fees. I really appreciate that Swan is Bitcoin only and they're dedicated to Bitcoin education. Go to swanbitcoin dot com slash livera to get ten dollars of free Bitcoin when you start stacking with Swan. And Swan hasn't used to share they've had massive demand for daily buys since the day they launched the service. One of the big positives of regular recurring buys is smoothing out price volatility, so buying daily will ca- Catch those dips even better than buying weekly. There's a limited number of spots in the daily buys beta, so head over to swanbitcoin dot com slash daily buys to get into the beta. Knox is a Bitcoin custodian dedicated to ensuring their insurance protection covers the full value of their customers' assets. For example, suppose a fiduciary wants to hold two hundred fifty million dollars of Bitcoin with Knox. Knox will seek to obtain two hundred fifty million dollars of insurance dedicated exclusively to that account and adjustable to volatility, no fractional coverage or narrow- Scope, insurance for what it's worth, a tool to transfer risk, and check out my recent episode with Alex Daskalov of Knox. If you are a Bitcoin company, investment fund, trust, or family office, check out Knox for your insured custody, knoxcustody dot com. And finally, Unchained Capital, Bitcoin native financial services, Unchained are doing great work to make multi-signature accessible. If you are thinking about your Bitcoin security, why not consider going from zero to multi-sig with Unchained? Now you can either build it yourself with no setup or storage fees Or if you want assistance, there's a vault concierge onboarding package where you can have hardware wallet devices mailed to you and have guided setup calls to build your vault together. The prices range from fifteen hundred dollars, which includes two hardware wallets, to twelve hundred dollars, which includes a thousand dollars to go in the vault. Use the code levera for a discount. Also, Unchained have recently launched business accounts, so if you want to use them for your business treasury while still holding your own keys, Unchained is where you should go. Go to Unchained dash capital to find out how. Find out more. Now onto the interview. Pierre and Fabian, welcome to the show."
    },
    {
      "speaker": "pierre_rochard_fabian_jahr",
      "time": "02:35",
      "start": 154.64,
      "text": "Hi, Stefan, how are you? Hey, Stefan. Really good to be here."
    },
    {
      "speaker": "stephan",
      "time": "02:38",
      "start": 158.17,
      "text": "That's great. So, look, my, Pierre, my listeners are very familiar with you, but Fabian, tell us a little bit about yourself."
    },
    {
      "speaker": "pierre_rochard_fabian_jahr",
      "time": "02:44",
      "start": 164.23,
      "text": "Well, I've been contributing to Bitcoin Core for, about a year now. I've been interested, in Bitcoin probably starting around twenty fifteen, twenty sixteen. I knew about it before, but- But, that's when I, when I really kind of grasp, its importance and, and that, that's the, the reason why I got really interested in it, and then, that, that got even more when, when Lightning came around, there was kind of another trigger for me to really spend, more significant part of, of my free time on it and, and really, try, try to get involved, try to use it in projects, et cetera. and, then the, the, the next big step up for me was, participating in the Chaincode residency, last year. that was really awesome. I learned a lot there, just meeting all the, the, the There, collaborating with the other residents, I learned a lot, and, I've mostly been trying to, yeah, just be helpful around Bitcoin development, mostly in, Bitcoin Core since then."
    },
    {
      "speaker": "stephan",
      "time": "03:55",
      "start": 235.37,
      "text": "So today, we're gonna get a little bit into this whole topic of where are all the bitcoins? Now, Fabian, I know you've got a very relevant blog post on this, it's called \"Where Are All the Coins?\" And Pierre as well, you've been, making a lot of noise about this recently. so Off, why, why is it important to verify these things?"
    },
    {
      "speaker": "guest_2",
      "time": "04:17",
      "start": 256.88,
      "text": "Yeah, sure thing. So, I, I've, I've written up a, a post that kind of summarizes it and, has some data points at pierre rochard dot com. And basically, the idea is that, if you take any kind of economic entity, typically, let's take a business, for example, and you think about, what its balance sheet looks like for, for all the items on the balance sheet, you're gonna be able to, prove out, exactly where they came from, right? And if you can't do that, then, then you've got a bad accountant or something. and basically when you apply that logic to a network like Bitcoin, the Bitcoin network is, you don't, you don't really actually hold Bitcoin yourself, right? What you hold is a private key, and that private key is what's gonna allow you to unlock Bitcoin Held on the network, and the place that they're held in specifically, i-in, in Bitcoin is the UTXO set. So that's the set of all the outputs that could possibly be spent, at a given block height. and so in a way, the Bitcoin network, y-you know, the way I describe it is it's actually, issuing a liability, right? And so the Bitcoin network owes you the It, I don't know how to word it in, in a really good way, but owes you the ability to transfer Bitcoin, to, to unlock Bitcoin if you provide a valid input inside of a valid transaction, you know, that has a high enough fee to get mined, and, and the network basically owes you that, right? And, so the way that you would approach it in terms of, of figuring out, as an auditor, w- how you would prove this out? first of all, you look at kind of what the, the expectations are, right? Of, okay, people, have this issuance function, right? And the issue-- so, yeah, I guess, I'm going off-- I'm already going into it, fully, but, yeah, so I'll, I'll take a, a breather here, Stefan, so I don't, just, because I, I feel like I could, filibuster for several hours on this topic."
    },
    {
      "speaker": "stephan",
      "time": "06:43",
      "start": 402.78,
      "text": "Of course, that's, that's fine. Fabian, let's hear a little bit from you. What was your motivation behind writing that initial where are all the coins blog post?"
    },
    {
      "speaker": "pierre_rochard_fabian_jahr",
      "time": "06:53",
      "start": 412.85,
      "text": "it was really just, kind of summarizing, what I had learned, working on my project, that is the, the coin sets index that we, that we're going to get into, I think, in a little bit. so, in that project, I was very much, having to- Figure out like how does the, the, the body of coins, like what Pierre was just, talking about, that, is, is also being called the UTXO set, the unspent transaction outbooks, outputs that, every node, in, in some way, keeps, for the user in order to validate every transaction. how that, how that actually, gets created, like what, what the rules are, that get applied to every block in the blockchain, that either allow, an output to be included in the UTXO set or not be included in the UTXO set. and, even though I, Had already gone, quite a, quite a bit, down that rabbit hole. I was still learning quite a bit along that way, and, yeah, I felt like just, just kind of summarizing that, sort of for me, but also for everyone else, because, at the time, it also felt like pretty hard to, to, find an answer to that question online. turned out there, there were some answers for a similar question, but it was just worded in a different way, but I was kind of Answering that question, for myself, summarizing, summarizing what, what I had found there, in my, in my research, and it's also a callback to, the time when I first started up running a node, several years back, because then, I, I vaguely remember that, when I spun it up, I was kind of following some tutorial, and it said to run gettxoutset info, and, when you run I'm getting a TX out of info as somebody who, who doesn't know the background of this, there are two things that are usually surprising to you. the first thing is that it takes quite a long time to run. and the second time, the second thing is, is that, it will give you an output that says total amount, and, that is, if you look at the help, that is supposed to be, the total number of coins that are, in circulation, and, it's a very crooked That number. so then if you, if you already know a little bit about Bitcoin, and you probably do because you, you're running a node, then you know that, that the block subsidies, have been, the last block sub-subsidy has been six point twenty-five, so, there shouldn't be any more crooked number that, that has anything else that has more, than, than, three digits, after the comma or, or, dot. And, so th-this is, this was very surprising to me and, at the time, back then, I was also, googling this and, and kind of trying to find an answer, and, the, the answer I found was probably, HR on Bitcoin Talk or, or some-somebody, somebody knowledgeable, But the, the question w- the answer was, was, pretty shallow, was, was kind of like, \"Yeah, there's, some coins are lost and, and this is fine basically.\" And at the time, I was kind of like, \"Okay, I guess this is somebody who, who knows, what's going on,\" so I kind of accepted it and, and moved on. and then now several years later, when I, when I really, dug into it and, and really understood fully w- how this number really,"
    },
    {
      "speaker": "pierre_rochard_fabian_jahr",
      "time": "10:40",
      "start": 639.78,
      "text": "Is calculated, I, I was kind of delighted that, that I, just, yeah, wanted to put it into writing, and, and if you look at my blog, I, I don't write a lot, there's really a lot of things can have to happen, that I, that I sit down and write a long blog post, but yeah, this, this was the reason that, that got me to do it."
    },
    {
      "speaker": "stephan",
      "time": "10:59",
      "start": 659.37,
      "text": "Excellent. So I think one point that I'd love to touch on before we go dive into further detail around"
    },
    {
      "speaker": "stephan",
      "time": "11:09",
      "start": 669.38,
      "text": "So in the past, you came, you were an auditor, and funnily enough, I was also an auditor in a, in a, in a past life, let's say, and I'd love to hear a little bit from you, Pierre, on What are some of the things that are in an auditor's mindset? Why should we, you know, try and approach things from that mindset, rather than simply trusting?"
    },
    {
      "speaker": "guest_2",
      "time": "11:33",
      "start": 692.52,
      "text": "Yeah, so I think that it really is about decentralization. So, the moment that we have to trust, you know, a, a third party, that introduces a vulnerability in my mind into, into the Bitcoin system, a-and into its immutability. So, you know, that, what, what, what Fabian just described of the, you know, the, the transac- the UTXO set, not adding up to a round number that we would expect given, the current, having, that, in the audit world, you know, that, that would be, something that they would flag, right, as something that would be, that needs to be looked into. So why, why does that matter? Matter? Why, why sh- I think, you know, to me the real reason, why this matters, even if-- and, and we're, what we're talking about is deflation, right? So first of all, you know, it, you could argue it's always in our favor, right, if it's deflation. but I think that the-- knowing the exact numbers and where they come from gives us the knowledge that there isn't a deflation bug, that there isn't, outputs that unexpectedly, are un- Unspendable, and, now they, they might be unspendable because that person lost their private key. We have no way of knowing that, right? the only thing we can know is what is unspendable from the, the network's point of view, and, part of that is, is judgment on the behalf of the developers, right? That, and, and then it's kind of just like known deflation bugs that we can't fix and won't fix. and that's totally fine. Well, we don't- We don't want is someone to think that they have a spendable output and then for them to try to spend it, only to find out that the network, won't let them spend it, right? That, in fact, they, they, they don't have access to those coins, which would be a really bad situation. and so, a deflation bug would be bad. The other thing that we wanna look for, well, so basically what we're trying to reconcile, right, is issuance to, balances, right? To user balances. and, you know, in, in Bitcoin, there's not really any concept of what the user is, right? It's just an abstraction, but, just looking at the total current UTXO set, and, and figuring out exactly where those differences are coming from, and also, recalculating it at every block height, because what you might have in accounting is where you have Have, maybe a deflation bug that reverses itself in a later block. so you would wanna look for that as well. And really, the only reason that we're, we're moving the goalpost, right, from just counting up Bitcoin supply is that we're finding anomalies, we're finding differences, and we have to reconcile those differences. We can't just decide, okay, well, it's just gonna be a black box of, you know, we, we don't, as long as this number is less than total... Expected issuance, then we're okay. you know, that's not really a satisfactory answer from, from an audit perspective, right? Of, and, and really it comes down to, this approach of risk-based auditing, where you kind of look at, you know, where, where are the risks in the system, a-a-and looking into this. And we had a, a near-miss or an unexploited inflation bug, there's probably different ways of describing it, but, that, that was fairly recent Recent in Bitcoin, and so, I think it reinforces the, the value of doing this exercise, and then we can get into what's going on in Ethereum world, but, yeah, I'll, I'll, I'll, I'll stop it here. And, and really, so this is when I asked on Twitter, \"Has someone done this for Bitcoin?\" And, I got pointed to, the CoinStats index, and that's kind of where, W-w-where I was able to, really, bribe Fabian and Fabian into, updating CoinStats Index so that I could do, the math I'm talking about here of, adding up, total issuance to Yeah, UTXO set."
    },
    {
      "speaker": "stephan",
      "time": "16:10",
      "start": 969.83,
      "text": "So Pierre, actually it's probably a good point now to talk a little bit in contrast Bitcoin with Ethereum. So there was some recent, you know, back and forward on Twitter around what is the supply of Ethereum and- You know, some of the initial answers were things like, \"Oh, just trust the block explorer, trust the online websites.\" And, do you wanna just tell us a little bit about that and whether that is a satisfactory answer or not?"
    },
    {
      "speaker": "guest_2",
      "time": "16:38",
      "start": 998.11,
      "text": "Yeah, sure. So, basically what happened, was, Eric Wall, I think is his name. He's a, he's a cryptocurrency researcher. he, made the offhand, remark on- Twitter that, Ethereum proponents are, are better than Bitcoin proponents. I forget what his exact wording was, but it was basically along those lines that they, they can better explain the value proposition for Ethereum and, are, are more technically savvy than Bitcoin users. And so, Michael Goldstein himself, Bitstein, the memester, replied asking how many- Many Ethereum users know how to add up the total supply of ETH themselves, right? Not, not trusting a third party. And that's when people realize that there actually isn't a script handy, laying around on GitHub, to, to even do that. and that all of the, code that would allow one to add up total ETH supply at that point was Actually, proprietary, and, you know, run by data providing companies, right? trusted third parties. There's no-- a-and even though, you know, you could run an Ethereum node, and in theory, you could write the code to query it, right? That's what these data pr-- third party pr-data providers are doing. But nevertheless, no-- that, that code just didn't exist in the open source community, which, you know, we can get into whether that's-- but, any- Anyway, so, so when, when this became apparent, because of Michael Goldstein's question that this, open source script didn't exist, you know, in, in the, in the audit world, that would mean that there's a very high risk, right? There's a very high audit risk because if a client tells you that they don't have the spreadsheet that does the reconciliation, then it ha-- the numbers haven't even been checked once. That's right. If there's no trial balance that you could point at and, and, anyway, so, so that was a huge, huge audit red flag that they just didn't even have a supply script. you know, someone cobbled one together within a couple of days and then someone else cobbled another one together. They didn't agree, they didn't agree with the block explorers, the proprietary websites either. and, you know, they were, they weren't off by huge amounts, right? but nevertheless- Less, as, as an accountant, you would expect that, recalculating ledger balances at a specific block height, would, would give you the same result, and, so that wasn't happening, and, so they started a project to try to reconcile it, and, they're able-- what they're able to do at this point, finally, is able to reconcile issuance. So in Bitcoin, that's- you know, kind of adding up all the Coinbase transactions, all the Coinbase outputs, it gives you, you know, historically, you know, the cumulative total, issuance, creation of Bitcoin. and so they were able to finally get that part of it together, but now getting account balances, you know, that's pretty easy in Bitcoin. Now, we said that, getting the, the, summing up the UTXO- That, you know, it can take minutes on, hardware, on, on, on OK hardware, that, you know, that's a, that's an intensive thing for, for Bitcoin. now, you know, that-- I think the current UTXO set is in like A few gigabytes or something like that? Four, four gigabytes, I think. Yeah. Yeah. So, so the, it is, you know, that's a tractable amount of, of data, but it is a very large amount of data. and you're just iterating over it and, you know, summing it up. in, in Ethereum, it's actually a lot more data than that because they don't have an output, they don't have an output model, they have what they call an account balance model. and so- Adding up all those account balances is actually, much more, computationally demanding than it is in Bitcoin. and so they're able to, to do that at, at the block tip, but they can't do it-- they don't have an, a coin stats index, in Ethereum. And, you know, the, well, they could in theory create one, right? There's nothing, you know, impossible about it. Computationally, I think that, that's what is prohibitive, for them, and that you would have to have a fairly powerful, you know, server to, be able, you know, with, with, with terabytes of SSD or even, RAM to, and, you know, very powerful CPUs to be able to do that in a timely manner. Now, obviously, somebody's doing it because these proprietary data websites are doing it Doing it. But, in terms of for, for a normal person, it's really cost prohibitive, to do that. And so generally, I think that, you know, Ethereum users are gonna have to trust third parties, with regards to, Ethereum supply and their confidence in it."
    },
    {
      "speaker": "stephan",
      "time": "22:30",
      "start": 1349.73,
      "text": "Fabian, anything to add there in terms of contrasting Ether-- Ethereum supply versus Bitcoin supply?"
    },
    {
      "speaker": "pierre_rochard_fabian_jahr",
      "time": "22:36",
      "start": 1356.16,
      "text": "Yeah, I mean, there's not really that much that I can say to that because I- I still have so much to learn, in terms of, Bitcoin Core, and so I, I kind of block out a lot of the noise, about altcoins and, and Ethereum, and, so I, I c- I, my Twitter feed, is, is curated well enough that usually I don't even see that kind of stuff. but, this, this ease supply thing was something that, that made it to my feed, and it actually, was something that I noticed, and that, that Raised my eyebrows, because, yeah, it's just, it's just amazing that, that this is even possible in Ethereum, that people don't, don't know this, that, that people don't have the script when it's like One of the most fundamental things of, of, of Bitcoin that, that I can think of. and so that was just, that was just, yeah, just, just amazing to me and just, Just giving me, giving me confirmation that, that I'm kind of on the right path to just, just focus on Bitcoin sort of. but, but that was kind of sort of it, and, and I also, of course, had the thought that, that this is, this is kind of funny because I had already been working on the CoinSets index for several months at that point, that, yeah, like, like that's why I also had this, this, this, strong, feeling about it because I, I had been working on this, very thing in, in Bitcoin. It was already existed in Bitcoin, of course, but I was putting a lot more work into basically, usability and efficiency improvement of that very thing that, that seemingly wasn't even possible in Ethereum and, then I, I only, actually sprung into action when, when Pierre was, then tweeting that, that he was interested in, something similar in Bitcoin that was, that was, giving him the, the supply of, Bitcoin in, in, in more detail, and that was really just, just Mike you and, and I just said, hey, I've been working on this for a long time, mostly just need some more, eyes for review, and, yeah, that's, We get together."
    },
    {
      "speaker": "stephan",
      "time": "24:56",
      "start": 1495.74,
      "text": "That's a really cool story. I think, I mean, to the comments around Ethereum, I think, I don't know, maybe the Ethereum people, I mean, obviously the Ethereum people might disagree, but to us as, for me as a, a relative outsider, it seems to me that the Ethereum people don't really know what they're about, whereas in Bitcoin, we know what we're about. We want fixed supply, that's so, so important to us. So maybe if I were to steal, man, the Ethereum people, that's just not their pr-"
    },
    {
      "speaker": "guest_2",
      "time": "25:25",
      "start": 1524.82,
      "text": "I want to respond to that, right? So, so that's, that's fair, right, that they say, okay, you know, Bitcoin is digital gold, so you, you're interested in that supply, you know, Ethereum is like digital oil, it's, it's, you know, its utility value is what you're interested in, and, and really ultimately, you know, their argument is that the value of your coin is gonna be determined by a combination of supply and demand, right? And, that you could have something that isn't fixed supply but if it has greater demand because there's greater utility in it, that, you know, that, that coin is going to outperform, right? I think that's, that's a core part of their thesis, and I think that where it all falls apart is that they're advertising this as digital ledger technology, and it's incomprehensible to me that you wouldn't be able to add up a ledger, you know, fairly easily to get, a reconciliation like we're able to do with Bitcoin. And, so, you know, my, my, my-- the, so the, the bounty I paid out w- to Fabian for, the CoinStats index and I also paid him a bonus bounty because he also wrote, poll requests that I was able to use to export that CoinStats index into a CSV file. and if there's any count-accountants or auditors listening, obviously they know that CSV file is the best thing to get from an audit client, right? And so I loaded that into Py- Python, I recalculated the entire, issuance myself in Python, and, you know, it came out to the same as the one in C++. Great. And then I lined it up with the, data from CoinStats Index, and sure enough, there has been zero unexpected deflation and zero unexpected inflation in Bitcoin, and everything is going according to plan."
    },
    {
      "speaker": "stephan",
      "time": "27:25",
      "start": 1644.8,
      "text": "That's awesome. Let's jump further into those numbers around Bitcoin. So I think one of the first things people learn about Bitcoin is, \"Hey, it's got a supply of twenty-one million.\" but an interesting fact that came from your article, Fabian, is that it's not actually going to be twenty-one million exactly. So can you tell us why that is?"
    },
    {
      "speaker": "pierre_rochard_fabian_jahr",
      "time": "27:47",
      "start": 1667.05,
      "text": "yeah. So, maybe, since you, since you're asking about, the, the twenty-one million, one thing that, that I- I also need to, need to say is that, that I'm not writing about in my, in my article is that, even if, if none of the other things that we're talking about that, that have already sort of let, let's say that they, they have gone wrong, like something is, if, if, if that's wrong, that something is excluded from UTXO set, then, we would still never have ended up at, twenty-one million. and that's, just, one, one The, the block subsidy, that gets, gets smaller every yearning, eventually will end up, dropping below one Satoshi, and that is, expected to be happening around twenty-one forty, and, that, is something that, w-would have been very complicated to implement. So the, what, what actually happens is that, the supply gets cut off. At that point and, the, the total supply that, that kind of, of all, of all block subsidies that we're building towards is, is, twenty million, I, I wrote this down, twenty-one million nine hundred ninety-nine thousand, nine hundred ninety-nine point nine seven nine six, bitcoin. so that's, that's the, the, the first, kind of, smart fact to know, why there will never be twenty-one million. and then there are the, the coins that have already been excluded from the UTxO set at this point. and this is where my, my article is kind of getting into. I'm, I'm actually never talking about the twenty-one million in my article. I'm talking about the number that you see, when you call gettxoutset info,"
    },
    {
      "speaker": "pierre_rochard_fabian_jahr",
      "time": "29:42",
      "start": 1782.43,
      "text": "and this is, Before that, is, probably surprising people if, they, they haven't gotten, that far down the rabbit hole yet, and they see that, that crooked number and they don't know, what the, what the, coin subsidies are, and they expect, more, more, A different number basically at this point. So, the, the coins that are missing, in my article, I'm, categorizing them in, in, in different, in, in four different categories, and, this was just a necessity for me also as I was building the index, to, to identify these, from, the, the consensus code and then, re-implement them in the index as well, because I'm processing every block and I- I need to identify which, which outputs are not included in the UTXO set, so that, that, the index is coming out to the same, data that the UTXO set is coming out to. and, the three, the four categories that I, ended up with is first, the genesis block, the genesis block, had the block subsidy of fifty bitcoin, and these fifty bitcoin aren't spendable. the reason for this is, there's just, yeah, just, just a very simple if statement in the code, and that just checks, okay, if block height is zero, then we just skip, adding the coins of that block to, to the UTXO set. I think, I didn't, I didn't Do very deep research into it, but I, I remember reading that I think nobody really questioned it ever, but, yeah, just, I think nobody really knows why Satoshi did it that way and, and didn't make it spendable, and, I think we will then, if, if that's right, then, we'll probably never get an answer to that. the second category is Bib 30. Bib 30, was- A buck in, Bitcoin that was discovered, pretty early, this, was happening, I think if I'm not wrong, two thousand eleven. I have the, you can look, look into the, the details also of the block heights, in my article. but what was happening was that, In the UTXO set, we are saving the, outputs, by looking at, the, the, TXID of the, transaction and then also the, the index of the output of that transaction. And Usually we can trust that, that this is unique, because, the T-TXIDs are unique because they depend on the TXID of the previous output. and so that way the, the uniqueness is kind of cascading, through these chains of transactions. but, there's one problem, one, One, type of our, of transaction, that we have in the system doesn't have an input, and that's the Coinbase transaction. And, the Coinbase transaction, it, it was not enforced that, these are unique. And what this meant was that, we had a block with, TXID for Coinbase transaction, and then another block occurred, that was mined by the same, person, by the same miner, and that has the same TXID. ID, for the Coinbase, and that meant that it overrode the output in the UTXO set of, that was already there. this happened twice And so, this is how we lost another, one hundred Bitcoin, that miner, lost one hundred Bitcoin from that. and then there was, a hardcoded, fix for that in the, in the code. if you, I, I also have links to, to the, specific lines in the consensus code. and, and there, is the, the block heights and, the block hashes of these very specific blocks are still hardcoded in the code. space, where, to, to ensure that, that this is kind of an exception in the consensus code, for these two blocks, it is okay, that their, coin bases are excluded from the UTxO set, but, this is never going to happen in the future because, that bug has been fixed since then."
    },
    {
      "speaker": "stephan",
      "time": "34:19",
      "start": 2058.95,
      "text": "And then you got, op returns as well, right?"
    },
    {
      "speaker": "pierre_rochard_fabian_jahr",
      "time": "34:21",
      "start": 2061.45,
      "text": "Yeah, exactly. Then op return, very famously, an, an op code with which you can embed Arbitrary data in the U, in, in, not in the UTXO set, but in the blockchain, and these outputs are, not spendable, and, that means it's also logical that they aren't included in the UTXO set. and then the last one, is, is, maybe the trickiest one to, to wrap your head around, or, at least if you, if you look at the, if you look at the code, it seemed for me that way, because it is really describing something that isn't, that isn't there. So, this is unclaimed miner rewards. So, we have been talking about the block subsidy. the block subsidy is what we always talk about When we, when we mean these fifty Bitcoin and then twenty five Bitcoin and then twelve point five and now six point two five, that are, given as a reward to, to the, to the miner, but really, the block subsidy isn't a full reward, and isn't the, the full amount that the Coinbase transaction has, because in the Coinbase transaction, in the output are also included, the fees, and this is also included in what we mean, is, is the miner reward Reward. And so, what you have to do, what, what kind of your obligation is as a miner when you mine a block, is that you, that you look at the whole, block and, you look at the, the, the block subsidy that, you, you will get a-at the current time, and you add all the fees that you get from, from all the transactions in a block together with, the block subsidy, and that is the total reward that you will get from, that block, if you And, so this isn't, like, like now, of course, everyone, knows how this works and minus f functional, software to do this, but in the earlier days, this wasn't the case and, and, probably people were playing around with, with some, some custom scripts to, to build blocks, maybe trying to make it more efficient and, led, that led to the fact that, yeah, there were coinbase transactions created that, had That, smaller, reward than they actually could have gotten from the, from the whole block. So, there, there are some examples that, I, I didn't know these examples because I haven't been around at the time, but, Peter Wuller, listed this in, In a, in an article himself, where, minor rewards haven't, haven't been, claimed. and, since these are, are just not there, they, they will never be spendable because they are, they are not included in the UTXO set because the, the, the amount of the output was too low. and, the, the software, the consensus software, doesn't, error on this. It still says, okay, the, the block is fine. Even if the reward is, is smaller, the, the, the validation logic just looks at, that the miner reward is at least, or is, is, is not higher than, the, the total miner reward that, a miner can claim."
    },
    {
      "speaker": "stephan",
      "time": "37:43",
      "start": 2263.38,
      "text": "Yeah, really interesting stuff. So it's kind of like through these different, mainly through those four categories, there are, it's something on the order of two point three million sats that will never be created or less, it's gonna end up being less than the twenty-one million, eventually. Once we get there in over a hundred years, and there's some interesting trivia as well around some of those unclaimed miner rewards. So essentially, as you're saying, as you were explaining, Fabian, miners can claim up to this amount, and some of them have, made a mistake and accidentally claimed less. And I think in one case there was a miner, I think this was like an early Bitcoin user, MidMagic, who intentionally claimed less than the full amount. I mean, this was early days as well, but it was just a funny little story to read into."
    },
    {
      "speaker": "pierre_rochard_fabian_jahr",
      "time": "38:31",
      "start": 2311.33,
      "text": "Yeah, yeah. and to be honest, I'm not sure, if I got this right, what, when you said, two point three million, sets, did you mean the, the total, missing amount of, where the coins are? because it's a hun-hundred, one hundred, eighty-three Bitcoin. I'm not sure w-which, w-what number you were referring to."
    },
    {
      "speaker": "stephan",
      "time": "38:53",
      "start": 2333.15,
      "text": "Oh, sorry, sorry. yeah, you're right, actually, yeah. it's a hundred and or not claimed coins, and then the two point three million sats, is, just the, like the high level that it's not even twenty-one million."
    },
    {
      "speaker": "pierre_rochard_fabian_jahr",
      "time": "39:09",
      "start": 2348.74,
      "text": "Yeah, yeah, exactly, yeah."
    },
    {
      "speaker": "stephan",
      "time": "39:10",
      "start": 2350.5,
      "text": "Yeah, so it would be, I guess, really it would be the combo of those. Yeah, so it'd be like the, gotta do this right. So the hundred and eighty-three that you're seeing have been lost or not claimed, and then plus that kind of two point three million sats or whatever that it's just, it was never gonna be that twenty-one million anyway. Alright, so let's get into Bitcoin Core and checking the coins. So, maybe Pierre, can you tell us a little bit about, get tx outset info? What is that and,"
    },
    {
      "speaker": "guest_2",
      "time": "39:40",
      "start": 2380.16,
      "text": "To add up the current, total sum of UTXOs at the current chain height. so if, if that's the number you're looking for, then you, you, it's at the tip of your fingers, right? now, what is that useful for, right? Because, arguably, you know, people losing their private keys eclipses this number. well, we have no, we have no way of knowing that, right? Satoshi... Come back tomorrow and, and spend his coins. So, you know, the argument there is that economic agents don't really need to know what, what the current, total money supply is at any point in time, because really it's, it, it, it-- Well, okay. So anyway."
    },
    {
      "speaker": "guest_2",
      "time": "40:33",
      "start": 2433.24,
      "text": "Yeah, I, let's see, where were we? Yeah, the, the good, sorry, the UTXO set. Alright, so really what I wanted to find was historical, UTXO set data, and that's hard to do without, doing exactly what Fabian had been working on with CoinStats Index, and I think that adding more indices to, to node software is going to increase the number of users. ultimately, because there's just more data available to it, to, to them through the API."
    },
    {
      "speaker": "stephan",
      "time": "41:07",
      "start": 2467.16,
      "text": "Maybe Fabian, can you tell us a little bit about what you're achieving with CoinStats that goes above and beyond what GetTXOutset is doing?"
    },
    {
      "speaker": "pierre_rochard_fabian_jahr",
      "time": "41:14",
      "start": 2474.31,
      "text": "Yeah. So, as Pierre said, the GetTXOutset info, call is, is, is all right, to give you, the statistics on the current UTxO set. and, at the very least, you can, you can look at that number and you can, maybe do, do a, a small calculation, on your calculator to see what the, what the, total block subsidies should be now, and you can see that the total amount that you see from Gettix also info, is smaller than that, and so, at least, you know, there haven't been, there hasn't been any inflation beyond, what, what the current, supply schedule, gives you as, as the total number, that should be out there."
    },
    {
      "speaker": "pierre_rochard_fabian_jahr",
      "time": "42:01",
      "start": 2521.0,
      "text": "but, there, there are a few things, as, as we both have mentioned before, from Gettys' outside info that, that are, sort of missing and, that, that, that I'm looking to add with the index. the first thing is that, it is quite slow. depends on your hardware, of course, on, on, on a recent, laptop, with good specs, you'll probably be below, two minutes still, but if you are running, a Raspberry Pi three, which, a lot of people do, have it running in their home, it's going to be closer to, something like, like, seven or eight minutes. and, that still, sounds fine if you, if you wanna get a coffee at, at that time, around that time or something like that. but, it's really not great if you, if you want to do a little bit more. and, Was, kind of an inspiration, f-for, going, going down this path and, and making these changes, was, Fork Monitor, and, Fork Monitor, Fork Monitor at info, is running some nodes and, and giving some, some, stats on these nodes. and one thing that they do very prominently is they continually, track the total supply of the, of Gettix out to info. and, in case that number increases in an amount that isn't, that isn't okay, then, we know there's an inflation bug and, then, this website will be, one of the first to, to ring an alarm bell. I mean, the, the, the fact that we would have an inflation bug means that the consensus code has been surpassed. but the gettxoutset info, hopefully if, if that hasn't been affected in some, some way as well. Which would be crazy. that should then show that, that, there are more coins that, that should be there. and, FOG monitor, is, is running this continuously as, as I said, and, I don't know what their hardware specs are, but, I mean, of course, they, they don't wanna, throw money out the window when they don't need to. and, what, what they told me was that when, there are blocks coming in very fast, At ten minutes, of course, in average, when a new block should come in, but then if, if you look at, the what actually happens is that sometimes we get three or four blocks in ten minutes. of course, this is going to even out, in the end, some way as well. but at that very moment when we have these many blocks coming in, the node will have, a hard time catching up because, the process is going to run on get tx out to info, and by the end of this, by the time it has ended, there will be already been, another block or maybe even two other blocks, and that is not great. And this also made me realize that, we will have a-- we'll have a problem in the future, if people w-will want to do this, because, right now we said the UTXO set, is about four gigabytes, and, when the-- when we say, \"Okay, I'm a user of a Raspberry Pi three and I run this and it takes, eight minutes,\" this number of eight minutes linearly increases with the, size of the UTXO set. Now let's say in three, four years, we've had two more bull markets and, also people, are, are, more and more people, holding their own coins, controlling their own, outputs, and so that means, UTXO set, probably will grow quite significantly. and, that would also mean that the time to run, get UTXO set info will, will run signifi-- will increase, by, by the same amount. So if it doubles, then People that, still follow the, the tutorials like, like I did, back then and run gettxoutsetinfo, they will have to wait fifteen minutes. and then we also know they won't be able to run this continual checking of gettxoutsetinfo and have the total amount anymore, because fifteen minutes is longer than ten minutes, and then this is just not possible anymore."
    },
    {
      "speaker": "stephan",
      "time": "46:26",
      "start": 2785.85,
      "text": "Yeah, fascinating."
    },
    {
      "speaker": "pierre_rochard_fabian_jahr",
      "time": "46:27",
      "start": 2786.99,
      "text": "Yeah. So what, Of course, like, th-this is, I'm not, I'm not, really, adding something new to Bitcoin because the data that I'm, that I'm using, and that, that I'm presenting, is, is already there, it's already in the blockchain anyway. what I'm, what I'm essentially doing is, is a usability and efficiency improvement. So I'm basically, pre-calculating, the, the data of get tx on set info for every block and saving it in an index So, this means, you can, look at every past block if you're interested in the data before, and this is something that, that Pierre now has been using. He has been looking at every block and, and, adding up the numbers for every block to ensure that, there's never, anything been going wrong. and, and anecdotally also maybe people want to, want to just check numbers on, on a certain, block height with, and, and don't want to use, Use a website for that, want to, want to look at it in, in their own note. And, then what also happens then when, we have these, numbers pre-calculated for every block, we don't have to, iterate over the whole UTXO set anymore to calculate the numbers for the next block. when a new block comes in, now we can just look at, okay, how are the numbers changing in that new block, and then add those or subtract those, from the numbers that we have already saved. For the last block. and that is of course much more efficient, much faster than, iterating over the whole UTXO set with every block. and that means we, we can get the new numbers, in, in less than a second, after, after the new block has been validated."
    },
    {
      "speaker": "stephan",
      "time": "48:17",
      "start": 2897.14,
      "text": "Yeah. Have you got anything to add there on the CoinStats index and the, review and the press around Bitcoin Core?"
    },
    {
      "speaker": "guest_2",
      "time": "48:24",
      "start": 2903.92,
      "text": "Yeah. Yeah. I just realized something, that, relating to the fast block there's another form of an inflation bug, which is that, the rapid increase in mining hash rate, and the two week difficulty adjustment have made it such that we're kind of living in the future, or future Bitcoin issuance has been pulled forward, right? Because we, we haven't, we've been, you know, getting blocks quick, more quickly than every ten minutes, and so this is, this is something else that we should account for, and we should look at what would issuance be today if it had actually been every ten minutes. Now, you could argue that, that's not really expected issuance because people expect the hash rate to go up, maybe. I don't know, that's, I just realized this though, thank you."
    },
    {
      "speaker": "pierre_rochard_fabian_jahr",
      "time": "49:21",
      "start": 2960.95,
      "text": "We could call it a totally different schedule. Yeah, just to cover if it's actually not sound money."
    },
    {
      "speaker": "guest_2",
      "time": "49:25",
      "start": 2964.83,
      "text": "Yeah, this is an inflationary fiat shitcoin. I can't believe"
    },
    {
      "speaker": "guest_2",
      "time": "49:31",
      "start": 2970.98,
      "text": "it. I'm so disappointed."
    },
    {
      "speaker": "stephan",
      "time": "49:33",
      "start": 2972.76,
      "text": "Oh well, pack it up, boys, it's all over. Yeah, so I-- this reminds me very much of, Saftein's comments around, Plan B and stock to flow, and he was saying, \"Oh, but what if you recut the numbers and do it on Satoshi's schedule instead of the actual, numbers?\" but, certainly that's an interesting point there. and so in terms of getting CoinStats index into Bitcoin Core, as I understand, there are multiple components required to make this happen. So Fabian, can you just give us a bit of an update in terms of where this is Before this can be fully merged in."
    },
    {
      "speaker": "pierre_rochard_fabian_jahr",
      "time": "50:09",
      "start": 3009.02,
      "text": "Yeah, so, this, this touches a bit of a, of a, of a different topic that is, that is very related, but also not, not really relevant to what we're talking about, but I'll, I'll try to just, just summarize it, briefly. so- The, the CoinSets index that I, that I set out to, to do, several months ago, and, and what, what, what caused me to, to even look at this, first of all, the, the biggest part of the, the work initially, was to look at the, hash function, because, one part of geth is all the info that we haven't talked about at all right now is, a hash of, the, it's called serialized hash, I think, in the It, it just, serializes and hashes, every, every output in the UTxO set and then gives you, gives you one number. And this, this can also be kind of a quick check to compare, a UTxO set, your UTxO set with somebody else's UTxO set, to, to ensure that you're in consensus as well. doesn't, doesn't really work that well also without the, the, the coinset index. But, yeah, the, the, this was, this Taproot was one of the reasons why the,"
    },
    {
      "speaker": "pierre_rochard_fabian_jahr",
      "time": "51:29",
      "start": 3088.64,
      "text": "why there was just not any other way to speed up, to, to optimize, the, the get tx outset info call, because the, the, this hash function, means that you, that, that you cannot, efficiently parallelize the, the calculation of, of the, the, the hash of these, UTXOs. So when a new block comes in, and, we, we just have the information of that new block, and we have kind of the hash of, of the UTXO set that existed before that block, then we cannot, reconcile that. We can, we, we, you-- this hash has to just be calculated every time, every time the UTXO set, is changed, th- it, it has to be calculated from scratch. and from Peter Wuller, to introduce a new type of hash, which is cumulative, so, this means that, we can, we can actually calculate a hash for, block height, ten thousand, and then when block height ten thousand and one comes in, we can calculate the hash for the outputs of just the transactions in one thousand, ten thousand and one, and then we, just add or, or the way this works is, is actually multiplied, but, but added to the hash that we already have from the previous height, and this works. and then we, we, we have a hash that we can compare and we can actually then save the, the intermittent hashes for every height also, in the index and, and compare these as well. something that, that can also be, potentially interesting to use for, Zumi TXO, upcoming, interesting feature by James Oberer. And, So, this, this is basically the one branch of, this development. there, two, PRs have emerged. one is the Python implementation of this hashing algorithm, and one is, alteration, refactoring basically of the get_tx_output info where you can exclude the hash from the, from get_tx_output info, which is just a, the basic pre-preparation, but also Also, this is being used in, what, what Pierre is using right now. and then following up to, to, to this hashing branch, basically, what still needs to, leads to be merged is the, C++ implementation of this, Of this, hashing algorithm, which is called MuHash, by the way. And, then what's coming on top of that, is, adding MuHash actually to get TX output info so that you can call get TX output info with, this, MuHash, calculation instead of the serialized hash calculation. and then on top of that, the, MuHash will actually be added to the index, and, so this is where basically the Branches meet, so, going back to, to, where we're at, at right now, we have the, the, index, the coinset index that is ignoring the whole hashing stuff, that just has, has, no hash of the index itself, but just calculates all the other, other numbers, most notably the total supply of, for every block. And, that's where, in that branch, we have now one big outstanding, PR that That, Pierre has been working with, that implements the index, and, the way this works, if you, if you, want to check this out, is, you can, you can check out the, this, this pull request and you can build it, you can, run the node with DashCoin Stats Index. this works very similarly to, TX Index, so you will, both see the, the progress in, in the- Blocks, but also you can now call an RPC,"
    },
    {
      "speaker": "pierre_rochard_fabian_jahr",
      "time": "55:45",
      "start": 3345.47,
      "text": "get tx, get index info, which is going to show you the progress of, of the index. and then you can call, the get tx output info call, with a specification that you don't want, a hash. and then this is automatically in the background going to use the index for you. And if you don't provide any specific height parameter or, a block hash parameter parameter, it is just going to, look at, the latest block height, but if you give it, a specific parameter, then, it will, it will look that up in the index. and then following up to that one, is, the last one that, that Pierre has been, using the most, that is the one that, looks at the index and, exports the whole index, as a CSV file."
    },
    {
      "speaker": "stephan",
      "time": "56:37",
      "start": 3396.81,
      "text": "Yeah, that's really cool. Hopefully we're gonna have these features and be able to run the numbers in, additional ways. so I guess Pierre, from your perspective, is there anything you would like to add? Is there, and also, is there anything you'd like to see in terms of future directions here?"
    },
    {
      "speaker": "guest_2",
      "time": "56:54",
      "start": 3414.27,
      "text": "Yeah, you know, I think that- If we look at it from the audit perspective, what, what I'm seeing is the audit risk go down, right? Because we get a full and complete explanation of all the differences between the issuance and the current ledger balance. and on top of that, we're adding internal controls within the system, to make sure that, you know, we, we continue to, have, The right consensus, right? That we're following the right consensus rules and that there aren't any bugs in any implementations. So, yeah, this is all, very, very good and exciting for Bitcoin and continues to kind of prove that Bitcoin is unique in that it is provable scarcity, right? That you can run your own node and you can prove yourself, without having to trust, even, and, and really, I, I argue Because of my reconciliation, I'm not even trusting the developers because I'm recalculating issuance myself, and then in Panda's, joining that with, CoinStats index. So, even from that perspective, I feel like this is a pretty trust-minimized, audit of the ledger. so, yeah, I think this is also probably the first time anyone's ever done it, like what we're talking about, you know, maybe outside of proprietary-"
    },
    {
      "speaker": "stephan",
      "time": "58:26",
      "start": 3505.51,
      "text": "Yeah, for sure. well, look, I think this has been a, a very educational episode. I think it's a good point to wrap it here, but, of course, before we let you gentlemen go, where can we find out more about you? So, let's start with you, Pierre."
    },
    {
      "speaker": "guest_2",
      "time": "58:41",
      "start": 3520.78,
      "text": "Yeah, so go to pierre rochard dot com, and sign up, for my email newsletter, where I'll sporadically send you things. and go on Twitter, go subscribe or follow or whatever. To, at pierre underscore rochard."
    },
    {
      "speaker": "stephan",
      "time": "58:56",
      "start": 3535.71,
      "text": "Excellent. And Fabian, for any listeners who would like to support you, whether that's, GitHub or Bitcoin donations or they would like to follow you, what's the best place for that?"
    },
    {
      "speaker": "pierre_rochard_fabian_jahr",
      "time": "59:04",
      "start": 3544.43,
      "text": "Yeah, I, I, I just, set up, GitHub, donation, donation site. So, I mean, it should hopefully be approved, by the time this, this airs. so, my, my GitHub username is, f jahr, You can find me on Twitter, but I, I'm honestly not, not writing much. I think it's, it's, better to, to maybe check out my, my GitHub, contributions and, otherwise you can find me on IRC, in the, in the typical, technical channels. and, yeah, just maybe, you, you briefly mentioned it already, but, my blog also doesn't have a lot of action, but, if you were- Interested in, in, in what we talked about and you just want to kind of, see it again in, in a little more detail, a little more overview, you can go to my blog, which is also linked from my GitHub, and, there is the article where the coins and, this, yeah, I just, I, I put in a lot of work and I hope it, it helps people to kind of see that and, particularly, I hope it's helpful for people that are interested in, in getting more technical and, I didn't, in, when I, when I was at, at the beginning, so I've been linking to, to parts of the code, where, where specific parts are implemented and, and, so that, that you can go in and kind of make, make that connection as well."
    },
    {
      "speaker": "stephan",
      "time": "01:00:38",
      "start": 3638.72,
      "text": "Excellent. Well, thank you both for joining me on the show today."
    },
    {
      "speaker": "guest_2",
      "time": "01:00:42",
      "start": 3642.46,
      "text": "Yeah, thanks for having us on. Thank you much."
    },
    {
      "speaker": "stephan",
      "time": "01:00:45",
      "start": 3645.1,
      "text": "Alright, I hope you enjoyed the show, and as always, you can find my show notes at stephanlivera.com. Make sure you are subscribed using a podcatcher application because I've got a big one coming on Monday with Michael Flaxman. That's it from me, thanks, and I'll see you in the Citadel."
    }
  ]
}
