Aaron van Wirdum Live from Utrecht, this is Bitcoin Explained. Hey Sjors.
Transcript
Sjors Provoost Hello.
Aaron van Wirdum So this was kind of funny. We always have our conversation before we do the actual podcast one day in advance. And then you ask me, do you have any topics? And I ask you, do you have any topics? And this time we both had a topic in mind. But we both had a different topic in mind, except it turned out it was sort of the same topic after all.
Sjors Provoost Exactly.
Aaron van Wirdum We just approached it from like opposite directions. And then we realized that we were, you know, talking about the same thing. So we're going to talk about Stamps and an invalid block that was found.
Sjors Provoost On April Fool's Day.
Aaron van Wirdum The block was mined on April Fool's Day?
Sjors Provoost Yes.
Aaron van Wirdum Right. But first, Sjors, you want to read some boostagrams, I think. Is that what it's called?
Sjors Provoost That's right.
Aaron van Wirdum Sjors stacks sats. Sjors stacks sats. Sjors stacks sats.
Sjors Provoost Hooray. Okay, I've got one from Eric99 for 50,000 sats. And he says, stay humble, stack sats.
Aaron van Wirdum There you go. Okay where do we start with this so we we did an episode on inscriptions two three episodes ago something like that and in a way I guess Stamps are a new way of doing inscriptions but they're really an old way
Sjors Provoost or yeah they're they're really an old and very inefficient way to do
Aaron van Wirdum they're kind of a rediscovered older Well, they—we kind of—when we discussed inscriptions, the point was that people were always putting stuff on the blockchain and then Bitcoin developers figured out better ways of doing it. And now Stamps is kind of going back to the bad ways of doing it.
Sjors Provoost Yeah, because they realized that putting things on the blockchain is a van Wirdum good, as you would call it.
Aaron van Wirdum That's a reference. That's a deep reference to the Bitcoin show or Dutch podcast.
Sjors Provoost Yes, and I forgot what the actual word was.
Aaron van Wirdum Veblen good?
Sjors Provoost Yeah, Veblen good or something. Anyway, it means something that because it's expensive, it's actually more popular. So you think you don't want to put too much stuff on the blockchain because that is inefficient, but it turns out that because it's so expensive to put stuff on the blockchain, it actually suddenly became popular with inscriptions. And so the folks from Counterparty said they had an old method to put data on the blockchain even more inefficiently than with ordinals. So that's sort of what you were seeing. And then what I was seeing was that there was an invalid block and I started looking at why that block was invalid. And that actually ties into what we discussed last episode. Because in our last episode, we talked about multisig. And one of the things we discussed as part of multisig was this weird thing called the sigops counter. And... So a block can have four mega—four [unclear], or whatever, four megabyte worth of stuff in it. And there's this counter for how much. So SegWit data counts as less than regular data. And that's how you get a fee market, which is a fairly straightforward way to calculate. But then the problem is... There's another counter for things that involve signature checking called the sigops counter. And it turns out that the reason this block failed, or at least the message I saw when the block failed, was max sigops exceeded.
Aaron van Wirdum Yeah, we'll get to that, I think, later. But yeah, you're right. So we discussed that in the previous episode. And then I think maybe the episode before that was inscriptions. So this episode is sort of combining insights from the previous two episodes.
Sjors Provoost Yes.
Aaron van Wirdum Is there? Okay.
Sjors Provoost And the other observation I guess we did was a very happy Mike in Space on Twitter. Though not because of the failed block, but very much around the same time.
Aaron van Wirdum I was just going to ask, so who's Mike in Space? Because Mike in Space introduced this Stamps protocol, right?
Sjors Provoost Yeah. Well, Mike in Space is a famous movie maker. He made this, this series Bitcoin Car Talk. And he's also involved with the Counterparty protocol.
Aaron van Wirdum I think there's probably a lot of newer Bitcoiners that may not know Mike in Space. He was sort of... A comic relief type of figure on Bitcoin Twitter Yeah, sort of during the block size war kind of era I would say.
Sjors Provoost Yeah, so the Bitcoin Car Talk series very short videos he made were quite funny I think I don't know if they're still on YouTube but they would involve him sitting in a car and calling somebody else who might be sitting in another car and talking about something technical but in a funny way and then either the car would explode or or somebody would be in the trunk.
Aaron van Wirdum Yeah, there were like spoof interviews with Bitcoin developers and that kind of stuff. Yeah, so now he somehow introduced a new particle is I guess my question to you or is this serious
Sjors Provoost I don't know.
Aaron van Wirdum Because we know him as a comedian, basically, right? Is it supposed to be serious? How are we supposed to look at this or think about this?
Sjors Provoost This is always difficult to know, right? Because Counterparty was partly a joke, especially with the Rare Pepe that was being traded. But Rare Pepe was essentially there before even CryptoKitties, one of the first NFTs. And that trading was kind of a joke, but also involved money. And it had its own token. So, you know, that was partly a joke, but it was also not a joke. And some people make money, some people lost money. So you never know these things.
Aaron van Wirdum I mean, that's, did I discuss this before?
Sjors Provoost The blockchain doesn't care whether it's a joke or not.
Aaron van Wirdum Yeah, I don't remember if I discussed this on the podcast before, but what's the guy's name who was behind the whole Rare Pepe thing and who was promoting it? I should know his name. I know his name.
Sjors Provoost Well, John Seth is one of them, but he was not behind it, but he was promoting it. But he was jokingly promoting it as part of Bitcoin Uncensored.
Aaron van Wirdum Well, that's the point. Man, his name is slipping my mind right now. Anyways.
Sjors Provoost John Carvalho?
Aaron van Wirdum No. Yeah I I his name is escaping me but yeah no I I always took it as a joke and I thought it was like a hilarious joke I thought it was he did this interview this famous and there was this famous interview Sjors, maybe we're going off the rails now with these sort of half-baked memories he did this famous interview at the time about Rare Pepes and sort of defending it and it was really hilarious and then I ran into him pretty recently like a year ago and I commented on how funny that interview was and the reason it was so funny because he kept a straight face the whole time and now I ran into him and I told him that and turns out that no he wasn't actually like his straight face was a genuine straight face he was actually being serious about the whole NFT thing and he actually believed in it well for me it was anyways a lot of people including myself thought it was like taking the piss out of the concept but no he actually believed in it and I guess a lot of people believe in the whole NFT thing.
Sjors Provoost Well, but it ran into problems because all these transactions were on-chain. And especially early on, fees started going up in the Bitcoin network. Fee estimation was very bad. So I think the wallet software that Counterparty was using was just a modified Bitcoin Core client, which did not have very good fee estimation. And so each of these transactions became extremely expensive. And I think they even thought about moving the whole protocol off to one of the forks or some other blockchain. So we hadn't really heard from it in a while but once the ordinals inscription stuff started coming about I think they kind of made a comeback and so the Stamps protocol is just one example of how you can use Counterparty and I think the idea there is you put very small images on the blockchain so 64 by 64 pixels and then you you know you trade them
Aaron van Wirdum okay so let's let's talk about it more in detail more specifically so Last time in our inscriptions episode, we discussed inscriptions, and that's a way of putting data in the blockchain. And then there were sort of the ordinals, and that lets you supposedly trade ownership or whatever you want to call it. It allows people to pretend that they own whatever data is on the blockchain.
Sjors Provoost Yes.
Aaron van Wirdum So Stamps are kind of the equivalent of inscriptions. And there is probably also an equivalent of ordinals, which is traded on Counterparty. But like our inscriptions episode, we're not really going to talk about that. We're just going to talk about how you upload data into the blockchain, right?
Sjors Provoost Yeah, I would say that Counterparty has a different way of telling the blockchain, well, not telling the blockchain, telling people who owns which asset by making transactions on the blockchain that would say, okay, this asset has moved from A to B. And the way Counterparty does it I don't know exactly it's but I do know it's different from the way ordinals do it right and it doesn't really matter I mean the blockchain doesn't care what's happening but from the outside you see I think in the case of Counterparty you usually see a bunch of OP_RETURN transactions and if you run the right software that software will know what those OP_RETURN transactions mean and it will know which who owns which Counterparty asset and they can show you pictures
Aaron van Wirdum Stamps are like inscriptions right and that's okay so is a stamp because you've mentioned Counterparty a couple of times is Stamps just using Counterparty in the same way that Rare Pepes was using Counterparty?
Sjors Provoost That is my understanding. I think the only difference is that you put the word stamp in front of it like when you're making the asset and you I think you also should use 64 by 64 pixels so it's kind of a convention on top of Counterparty that's my understanding, but it uses all the same rails.
Aaron van Wirdum Okay, so it's not actually that new.
Sjors Provoost No, I think the new thing is this convention around it that makes it a little bit more similar to how inscriptions work. But I don't think the technology itself is new.
Aaron van Wirdum Okay, I think there's one new thing about it and we'll get to that.
Sjors Provoost Okay.
Aaron van Wirdum But let's just first explain how it works.
Sjors Provoost Yeah, so basically when you create the asset or whatever it is, you have to put the data on the blockchain. That's hip nowadays.
Aaron van Wirdum Yeah, so how do you put the data on the blockchain?
Sjors Provoost So they do that using, well, they do it using Counterparty. And Counterparty has different ways of doing it depending how big the thing is that you want to put on the blockchain. So basically, if it's less than 80 bytes, it'll put OP_RETURN on the blockchain. But if it's more than 80 byte, it's going to fall back to an older mechanism, which uses fake multi-signature addresses. Fake, raw, or bare multi-sig. And we described what bare multi-sig is last week. But basically, it looks to the blockchain looks like it's one out of three multisig. And the idea is that two of the... And so when you create a multisig address, you have to specify which public keys can spend it. And it turns out that one of those public keys is real. So actually the owner.
Aaron van Wirdum Well, that's new in Stamps, right? Or not?
Sjors Provoost Yes, but it's not new in Counterparty.
Aaron van Wirdum Oh, okay. So then there's literally nothing new about Stamps.
Sjors Provoost Pretty much.
Aaron van Wirdum Oh, it's just a troll then. I didn't realize it was literally just a troll. Now it sounds like it's just a troll.
Sjors Provoost Well, it sounds like there's a little bit of extra convention around it but it's basically repurposing what already existed.
Aaron van Wirdum Okay, all right well I didn't know that.
Sjors Provoost So two of the three signatures so one of the three six sorry one of the three public keys is real so you can actually spend it and and then two of the three are fake and that means that you get 32 bytes per signature so you get 64 bytes for each of these multisig outputs that you can put real data in. Now, if you have an image that's, say, 200 bytes, you're going to need four of these outputs. So you make a transaction that has coins going in, and it has, on the output side, it will have four, basically, UTXOs, each of which have two real public keys, sorry, one real public key and two fake public keys, and that's how you're stuffing the data in. So you can put as much data as you want on the blockchain this way.
Aaron van Wirdum Okay, but we've we've discussed some of these things these things before but let me break it down because you've mentioned a couple different things now so Counterparty as a protocol as a layer two protocol for Bitcoin has several different ways of including data on the blockchain Now the first way that people, even before Counterparty I guess, the first way that people were putting data on the blockchain, I don't know if it was the first actually, but the first that I know of was this bare multisig…
Sjors Provoost Yeah.
Aaron van Wirdum Trick, essentially that that you're mentioning although probably at first there was not even a single key that was valid.
Sjors Provoost Right, I think either way I don't remember we did an episode called the OP_RETURN wars a long time ago where I think we explained all the mechanisms it's possible that they used OP_RETURN first then there was a limit in OP_RETURN then they thought okay then we'll just use multisig but it's also possible that they started with the multisig from the beginning
Aaron van Wirdum Right, well it's kind of that episode I was sort of rehashing here so…
Sjors Provoost Yeah, and those would all three be fake so you would have a three of three multi-sig and all three public keys would be fake.
Aaron van Wirdum Right, so there was the bare multi-sig way of doing it and then at some point Bitcoin developers said all right use OP_RETURN because that way you can prune the data more easily. So Counterparty actually does use the OP_RETURN, but then if the data doesn't fit within the OP_RETURN, they fall back to the bare multisig, which is sort of older than using OP_RETURN.
Sjors Provoost Yes.
Aaron van Wirdum And that way you can still include as much data as you want.
Sjors Provoost Yes.
Aaron van Wirdum Okay. So Stamps is data, for example, pictures, pictures most obviously, and Stamps, because they're too big for OP_RETURN, Stamps use Counterparty. They use the Counterparty protocol. But because they're too big for the OP_RETURN option, they use the bare multisig option.
Sjors Provoost Yes.
Aaron van Wirdum Okay. And the way they're doing it specifically is they're using, I think you said one out of three multisig.
Sjors Provoost That's right.
Aaron van Wirdum Where two of the addresses public keys are actually just fake data. Well, they are the data you're uploading. There are no actual private keys. So you can't spend from these two public keys. But then the remaining public key is actually real and there's a private key. So that would allow you to spend.
Sjors Provoost Yeah, so that's the biggest difference, I guess. It's actually possible to remove these things from the UTXO set. So as we've discussed before, the UTXO set is a set of who owns which coin. And these nodes like to keep this in RAM. They can't because it's too big, but they prefer to keep as much as possible in RAM because that makes it quicker to figure out when a new block comes in, whether a coin that's being mentioned in the block actually exists or not. So to very quickly look it up and to look up what the script... Now, the blockchain has no idea whether a public key is fake or not. So when it has a UTXO that mentions three public keys, it'll simply assume that those three public keys are real. And so it's going to keep it in memory just like it would keep anything else in memory. So by using a mechanism like this, you're using up other people's RAM,
Aaron van Wirdum essentially.
Sjors Provoost But you can, because you can spend it, you can still remove it from people's RAM if you want to.
Aaron van Wirdum I was first going to ask, so this is why Bitcoin developers essentially don't like this method, right?
Sjors Provoost Yes.
Aaron van Wirdum Like you.
Sjors Provoost Yes, and the difference with OP_RETURN is that OP_RETURN, because it is provably unspendable, because the way the script works is when it sees OP_RETURN, it says this script is invalid. That's what it means. And therefore, because the node knows can prove that the script is invalid, it can forget about it because it knows it can never be spent. So it does not have to hold on to it. And so anything that comes after the OP_RETURN then is just data you can put in the blockchain. And it will use disk space if you're storing the whole blockchain. You have to download it. But you don't have to keep it in memory to see who owns this particular output.
Aaron van Wirdum Right. So whatever is stored in the UTXO set, I guess one, [unclear] be pruned. And two, practically speaking, most Bitcoin nodes would keep that in…
Sjors Provoost RAM, if they have the space to keep it in RAM. Yeah, and if you want your nodes to be fast.
Aaron van Wirdum So what happens if everyone would start using Stamps? What's the problem that I will encounter on my node for example?
Sjors Provoost Well, then you will see the size of the UTXO set grow and it's been remarkably stable so it's it seems to have reached when you're keeping it in memory on your node it might peak at about 12 or 13 gigabytes and then I think that was a few years ago and then it goes down a bit but Yeah, it's been around that space for a few years. Now, if everybody starts using Stamps and that's the only thing going on in the blockchain, this thing can grow quite fast.
Aaron van Wirdum And then what?
Sjors Provoost I think it's like tens of gigabytes a year or something.
Aaron van Wirdum It basically means it will require more of my computer's resources to run a node. My computer will get slower if I want to do other stuff. That's basically the problem here.
Sjors Provoost Yeah, pretty much.
Aaron van Wirdum Is there a benefit? Because it... So Mike in Space and again I don't know to what extent he's trolling but this sort of perverted benefit is also that it's kept in UTXO. Is this an argument that you think [unclear] steelman—is, is there any…
Sjors Provoost Yeah, I think the argument then is that it's harder to prune so if your goal is to put something in the blockchain and keep it there well Even with ordinals, it's going to be in the blockchain. So in that sense, it's there. And the entire blockchain should always be available. Now, there have been talks about syncing a Bitcoin node and then not downloading all the witness, at least from the older blocks. So in that sense, there might be nodes in the future that will never have these ordinals on them. And that, from the ordinal point of view, is considered a good thing. It's like a way to not waste resources.
Aaron van Wirdum Wait, from whose point of view?
Sjors Provoost From the ordinals folks point of view they're trying not to waste resources beyond what they need.
Aaron van Wirdum Well, but they do want the data to exist on the blockchain right?
Sjors Provoost Yeah, it exists on the blockchain but nodes don't have to download that part of the blockchain at least if they're if they're pruning so there's like a special case if you're running a node that's going to prune things and you use the assume valid block then you can skip downloading all the witness data. Now, this is a couple of things we talked about many, many episodes ago.
Aaron van Wirdum Yeah, but I still want to dig a little bit into this because this does seem to be the main difference between Stamps and inscriptions. I mean, the way people are talking about inscriptions is this idea that 10,000 years in the future and there will be, you know, Mars colonies. When people download the blockchain, they'll still find these original Dickbutt pics.
Sjors Provoost Yeah, but this is a tricky question, right? And it depends on where these things are. So you could say, well, the UTXO set is sort of the most durable thing because it's the database of who owns what coin. So to be in there sounds possibly as the most durable thing you can do to make sure that everybody running Bitcoin in the future will have your Dickbutt pic on their computer in RAM, like ready. And then if you're going back from that, when you look at something like ordinals, because the data is pruned, every node that is, or sorry, because the data is only in the blocks, but not in the UTXO set.
Aaron van Wirdum Also, we're talking about inscriptions.
Sjors Provoost Yeah.
Aaron van Wirdum To be specific.
Sjors Provoost Yeah. So when you're talking about inscriptions, the data is inside the blocks, but it is never inside the UTXO set. And so if you're pruning the blocks as a node, so if you're keeping only the most recent 1000 blocks, eventually you throw these ordinals away. So they're not going to be on your disk anymore.
Aaron van Wirdum Let me ask you a more specific question, which is more to the point. Is there a potential future where inscriptions that are included in the blockchain today are not available in the future while Bitcoin is still working and running just fine?
Sjors Provoost That depends very much on your definition of just fine and what you're willing to tolerate. So there is a possible future where you could say, hey, you know what? We're not going to sync from the Genesis block. Or at least you could if you wanted to. You could sync all the way from the Genesis block 50,000 years in the past and all the way through. But maybe most people have decided, you know what? We're only going to sync the last 100 years. And that could lead to a situation where one day, all you have is the last 100 years and nobody has the actual blockchain all the way back to the 21st century.
Aaron van Wirdum Right, exactly. But even in that world...
Sjors Provoost In that world, you'd still have this thing in your UTXO set. Because that's not going to go away.
Aaron van Wirdum Now you're going to Stamps.
Sjors Provoost Okay.
Aaron van Wirdum Even in that world, we would know that there's only 21 million coins, right?
Sjors Provoost Yes, you can see the total supply.
Aaron van Wirdum Yeah, the only thing we wouldn't know for sure is if any coins have been stolen Over 100 years ago.
Sjors Provoost Exactly.
Aaron van Wirdum Okay, so that actually sounds to me like that's a feasible past— that's a feasible future.
Sjors Provoost Yeah, although it could still create lots of conspiracies right because you might have this really rich family and you would say well we know that five generations ago you guys stole Bitcoin but nobody can prove it anymore because you killed everybody who still had the blockchain and so it could still lead to controversy, but it's a it's you know it's a plausible future right?
Aaron van Wirdum Yes. Okay, so that's a plausible future okay now let's go to Stamps so is… how does this come, like… So is the claim that it's better to store in UTXO for this reason? For example, now you're steelmanning it. So is this actually a good steelman?
Sjors Provoost Yeah, this would be the argument. And we'll get later to why this doesn't work either. But at least it's plausible that in this case, people still have to keep the list of who owns which coin. Who owns which coin has to be kept by nodes in some way either in memory or on disk because you never know if it ever gets spent. Yeah, especially with the way they're doing it now because it is actually one of the keys is valid.
Aaron van Wirdum Right, okay so in this plausible future where people are only keeping track of the last hundred years and other than that Bitcoin doesn't change I guess we should sort of add that then it sort of makes sense to use Stamps if you want to make sure that people will still find your Dickbutt picture.
Sjors Provoost Yeah, but but even in the shorter term…
Aaron van Wirdum years from now.
Sjors Provoost Even in the shorter term there are proposals where if you want to prune your node anyway so if you don't want to keep all the old blocks you will right now when you when you turn on this pruning feature you will download the whole blockchain you will verify the whole blockchain but you will toss away the old blocks once you're done with them and there's a second feature that we discussed many many episodes ago called assume UTXO sorry assume valid not assume UTXO assume valid is a feature that says when you're starting up this new node, and all nodes do that now by default, we're not going to check any signatures before, I don't know, six months ago or a few months ago. With some security assumptions around that, you can turn that off. But if you do turn that on, which is the case by default, you're not validating the witness data for all the blocks. And so then the idea would be that if you're pruning anyway, It is completely pointless to download witness data, not verify it, and then delete it. You're literally downloading something, not looking at it, and then throwing it away. Well, you're looking at some aspects of it, but you're not looking at most of it. And so one concrete proposal that's already people are trying to implement is to just not download the witness data for all blocks. And so then you can say, well, but then your ordinals won't be downloaded by all new nodes. Only some lucky nodes will have the ordinals in it. Which is a good thing if you're trying not to waste people's resources but it's a bad thing if you somehow want to be stored
Aaron van Wirdum your point being that it might not only like the Stamps argument if we're steelmanning it doesn't only make sense 10 000 years into the future when people are only downloading the last hundred years it might actually make sense in a couple years in the future when people are not downloading witnesses that are older than six months.
Sjors Provoost Yes.
Aaron van Wirdum Right, that's the steel man.
Sjors Provoost Exactly. They will still be around because nobody's going to delete the blockchain and there's very good reasons why you want to make sure that the blockchain stays in existence and is widely available but… that that might be their worry.
Aaron van Wirdum All right so that's the steel man for Stamps now let's… Well, it's not a straw man, I think. It's a legitimate...
Sjors Provoost We're gonna…
Aaron van Wirdum No, it's also not a concern. But does this... I just want to question, does this steel man really hold up?
Sjors Provoost Well, I would describe this phenomena as Utreexo accelerationism, if we want to give it a name.
Aaron van Wirdum Right, I was thinking.
Sjors Provoost Really, this problem that we want to keep track of who owns which coins... This has been known to be a problem that does not have a limit. Because there could be an infinite number of coins. And every year, tens of gigabytes of new coins could be created that people have to keep track of. Even if it's on a disk at some point, if you have 200 gigabytes of things, you can't prune it. And it can grow forever. So something that cannot be pruned and can grow forever is bad, generally. And so there is a solution to that problem, which is called Utreexo, which we did a whole episode on two years ago.
Aaron van Wirdum Yeah. What's the episode number?
Sjors Provoost I don't know, but just look for Utreexo.
Aaron van Wirdum I'm pretty sure it's just called Utreexo.
Sjors Provoost Yeah. So it's a U and then a tree, like in the thing with leaves, and then XO.
Aaron van Wirdum Right. So Utreexo would be a way to essentially prune the UTXO set, right?
Sjors Provoost That's right. And the short version of it is that instead of every node keeping track of which coin is where, the burden of evidence is sort of turned around. So you're telling if you want to spend a coin, you need to prove that this coin exists. I'm not going to remember that this coin exists. And there's some mathematical magic there. That means that I as a node operator only have to remember like a kilobyte worth of data, a bunch of Merkle trees or some other mechanism. And then if you send me a transaction, including a piece of proof, then I can check that this transaction is valid and spending a coin that exists. So you're basically hiding the whole UTXO set inside a Merkle tree.
Aaron van Wirdum Yeah. So even if... The argument that it's better to put it in the UTXO set is superior because it can't be pruned, Even that is not really true because there are solutions to prune the UTXO set, except they're not in Bitcoin yet.
Sjors Provoost No, and I think within the next couple of weeks, there's going to be a demo of this software. So people are working on it, but this would just be a demo. And of course, ultimately, something like this, in order to really get rid of the UTXO set, it would have to be a soft fork that is pretty dramatic. So this is not something that would happen in the next year or so, probably not even in the next decade or so. Because there is a pretty serious downside to it.
Aaron van Wirdum It might also depend on how many people are going to use Stamps. As you said, Stamps might be sort of an acceleration. Motivation behind Utreexo.
Sjors Provoost There's always a balance when you want to do a new piece of functionality between how desperately do you need it and how scary is it. And this is scarier than something like Taproot, I would say. And we don't really need it at the moment. But, you know, if the dynamics change, then... So the downside of this proposal, Utreexo, is that it's going to make blocks bigger. So that creates a trade-off where you need more bandwidth. And that's a pretty big deal in some countries.
Aaron van Wirdum Right.
Sjors Provoost But so is storage.
Aaron van Wirdum Okay. Well, we've done a whole episode on Utreexo, so if people want to know more about that, you should probably just go back to that episode and hear all the details.
Sjors Provoost But if we go to a world where you only download the last 100,000 or the last 100 years of blocks or even less, and you're not holding on to the UTXO set… That means that your Bitcoin node is always going to be the same size. The blockchain is always going to be the same size because it's only just the last 100 years, for example. So I don't know how many terabytes that is, but that's it. And the UTXO set is always going to be one, like a kilobyte. And then the system can be like that forever. So that's kind of a nice potential future.
Aaron van Wirdum Okay, letting go of the future for one second.
Sjors Provoost But that would mean that any of these things, ordinals would be gone. Or at least they wouldn't be gone. They would just not be on your hard disk unless you want them to be. So if you want to reveal them, somebody can give you proof and they can show that indeed this picture exists on the blockchain in some way that you define existing, but it wouldn't actually be on your disk anymore. Although you could say like, if something is in a Merkle tree, is it really there? That's a nice philosophical question.
Aaron van Wirdum If a Merkle tree falls in the forest, Okay, letting go of the future for one second. One thing we haven't mentioned, I think, is just the difference in cost between Stamps and inscriptions. And essentially, inscriptions are a lot cheaper, right?
Sjors Provoost Oh, yeah.
Aaron van Wirdum Because inscriptions use the SegWit discount, which we discussed in our inscriptions…
Sjors Provoost Yeah, they are cheaper in two ways, exactly. They use the SegWit discount, so that makes them a factor four cheaper. Well, in three ways, I guess. I think they're also cheaper because they used like... Transaction itself more efficiently like it's not because you're not adding this this third multi-sig key for every output so like a third of the data is being used to repeat the the public key that's real when you make this Counterparty thing so if you have for example six outputs then each of these outputs will have one real key in them so that's one third of your data right which you are paying fees for and the third way is that you're not dealing with the sigops limit.
Aaron van Wirdum Yes, you want to get to why the block failed, but I want to make sure we're done with the whole Stamps thing. And it's been a bit all over the place with the pros and the cons and the comparisons. But one thing we sort of mentioned, but it's worth repeating, is that a potential kind of benefit of Stamps is that they can also be removed, spent.
Sjors Provoost Right, that's using that one valid key.
Aaron van Wirdum Yeah, so if you use that one valid key to actually spend the funds that were in there then the UTXO set disappears again. The stamp disappears from the UTXO set,
Sjors Provoost yes, which is the same for the ordinals for the inscriptions.
Aaron van Wirdum Is it? No it's not.
Sjors Provoost Yeah, you can just burn them you can…
Aaron van Wirdum Well, okay yeah now you're talking about Ordinals.
Sjors Provoost Well, the inscription is not even using the UTXO set in the first place.
Aaron van Wirdum Yes, I know. So Stamps is using the UTXO set, but it can also be removed from the UTXO set if the coins are spent. Right? I think there was one more thing I wanted to say about this. Oh, yeah. So that's kind of, I don't know if it's funny or interesting or dumb or all of the above, but it also means that you can create a stamp. And then I can sell the stamp to you. Well, I mean, as dumb as we can pretend that I sold the stamp to you by sending you a Counterparty transaction. But then afterwards, since I have the private key that can remove the stamp from the UTXO, I can still... Remove it even though…
Sjors Provoost This part I'm not sure whether that's true it could be it could be that you're transferring everything but then I guess then you would have to rebroadcast the whole the whole picture that would be really inefficient so yeah I'm guessing you can as the original creator remove it from the UTXO set it's not as the current owner.
Aaron van Wirdum As far as I understand. Yes, exactly. Yeah, so that's we we both immediately thought of the Banksy painting which would be the equivalent so you sell it and then you destroy it. Yeah, okay before okay I know you really really want to get to the invalid block. First of all Sjors, give us your expert opinion. What should people use inscriptions or Stamps?
Sjors Provoost Neither.
Aaron van Wirdum Well, pick one though. You gotta pick one. People are desperate to upload their Dickbutts onto the blockchain.
Sjors Provoost I cannot… No, I can't see into the mind.
Aaron van Wirdum Which protocols should they use?
Sjors Provoost I can't see into the mind of why they would want to do this. So I can't make that choice to them. We've explained the differences. It does actually, before we get to the block, raise one other issue or one discussion that's been renewed now. That even happened with ordinals. Sorry, with inscriptions. The discussion is we have a limit on OP_RETURN. Right for 80 bytes and the question is for in the mempool and the question is should we just get rid of that limit because you know or at least increase it to something really large for two reasons one is that these ordinals are getting around that limit anyway or these inscriptions are getting around the limit anyway and if people do use OP_RETURN then at least they're paying four times as many fees per byte that they're using And the other is that then they would maybe stop using these bare multisigs.
Aaron van Wirdum But they wouldn't, though, because that's apparently the point for them. They want it in the UTXO set. That's the selling point.
Sjors Provoost Yeah, and then they would have to modify the philosophy of Counterparty itself because, as far as I know, Counterparty tries to use the most efficient way to put stuff on the blockchain and by making these pictures slightly bigger. It has to fall back to the inefficient way, but if we were to raise the OP_RETURN limit, then Counterparty could just always use OP_RETURN, and there would be no reason to use multisig unless you deliberately run an old version of Counterparty software or something contrived like that. But it sounds like, given the motivation, they might actually do that.
Aaron van Wirdum I mean that that's the selling point right it seems like okay so okay you want to get to the invalid block desperately before we get there I'll say it use inscriptions don't use Stamps it's ridiculous it's more expensive it's annoying to fill the UTXO set with crap please if you must upload your Dickbutt use inscriptions so… anyway why was there an invalid block?
Sjors Provoost Well, yes. So on April Fool's Day of all times, F2Pool produced a block that was invalid with the message back—bad sigops count or something like that. And that means this sigops limit was violated. And as we explained last week, there is this extra limit in the block, not just the size, but the...
Aaron van Wirdum First of all, first of all, how do we know there was an invalid block? If it's invalid, why do we know about it even?
Sjors Provoost Well, if your node sees it, it'll tell you it's invalid. And the reason your node saw it, there can be two reasons for that. One reason could be that, well, you happen to have been connected to the miner, they sent it to you, or you were connected to somebody evil, and they sent it to you even though they knew it was valid. Or, and this is what happened, at least in case of my own node, you received it through a compact block. And I don't think we've done an episode about compact blocks, so we can do that some other time. But the idea of a compact block is to send the block as fast as possible through the network, not wasting as little time as possible while not making it unsafe, basically. And so what you do is when you receive a compact block, you check the header. And if the header has enough work, then you will send on the message. So you send it first and then you check the block. And that's why that block would have been spread.
Aaron van Wirdum Okay.
Sjors Provoost There's more to compact blocks, but that's the most important aspect of it here.
Aaron van Wirdum Okay. So that's why we know, or at least that's why you know. No, it was posted probably in… message forums and stuff, right? People know about this block. I mean, I didn't, but...
Sjors Provoost Yeah, the other way you would find out about the block is you read about it, and some people have posted the full block, so you can download it and send it to your own node and see what your node thinks of it.
Aaron van Wirdum Okay, so there was an invalid block, and you mentioned the sigops limit was reached. Is that what you said?
Sjors Provoost Yeah, so as we explained last week, when you use raw multisig… what happens is that it counts as 20 sigops. So there's this counter called the sigops counter, and each raw multisig counts as 20 of these units. We'll just call them units. And, well, with SegWit, you know, that was multiplied by 4, but then the maximum was also multiplied by 4, so we can kind of ignore that. We can just say it counts as 20 points, whereas a normal single signature transaction counts as 1 point. So even if you're only using a one-of-one multisig, you're still using those 20 points. So these Counterparty transactions are using 20 points for each output. So not for each transaction, but for each output. And there's 20,000 points to a block. That's the limit. So you can have 1,000 of these things in there. Now, one single...
Aaron van Wirdum Go on.
Sjors Provoost Today, we looked at one example of these Counterparty transactions, and we saw it was creating six outputs for like a... Tiny, tiny picture. And so that is 6 times 20 is 120 sigops.
Aaron van Wirdum So that means there can be less than 200 of these pictures in a block?
Sjors Provoost Exactly.
Aaron van Wirdum It's never a good idea to do math live, right? But I'm saying that right, I think?
Sjors Provoost Yeah, I think so. Less than less than 200 per block.
Aaron van Wirdum Right, so and that's what happened so there were more were there more 200?
Sjors Provoost So this is the tricky part I've been trying today and yesterday to figure out exactly how many of these sigops points were used because Bitcoin Core won't tell you the only thing Bitcoin Core will do is it it'll count them internally and when there's too many it says too many and it stops counting so it doesn't give you the total doesn't say where they are Now you can use other tools to try and figure that out. And I'm not super good at those tools. So anyway I've been counting, I think the highest number I was able to get at was with the SegWit counting, which is four times the limit. I got 79,828 in total, which is less than 80,000, which means I'm counting something wrong.
Aaron van Wirdum Can you repeat that?
Sjors Provoost 79,828 points.
Aaron van Wirdum Wait, wasn't the limit?
Sjors Provoost Well, with SegWit, the limit is 80,000. So, and then you have to multiply by four, the punishment. But if I look only at those OP_RETURN transactions, those bare multisig transactions, then I find how many? 890 bare multisig transactions. So that's not the number of assets, because you probably have to divide by five or six, depending on how big they are. But that's pretty close to the limit. Right, because they count, in SegWit, they count as 20 times 4, basically. So you get 71,000 points just for all this Counterparty stuff. I'm saying Counterparty stuff that might be somebody else using bare multisig, but I'm just going to assume it was only the Counterparty people.
Aaron van Wirdum Right.
Sjors Provoost So, you know, 71,000 out of 80,000 was already used for this Counterparty stuff. And then, of course, there's other transactions out there that also count.
Aaron van Wirdum So in short, this block was invalid because people were stamping too much. That's what it sort of sounds like.
Sjors Provoost So if a miner is configured correctly, it won't produce an invalid block. It will simply just not include all the pictures. It has to decide what to throw out. So ideally, when you create a block as a miner, you just want to look at the highest fees and sort them from high to low. But unfortunately, when all these pictures are in there, you really need to make sure that you're taking into account that you don't go over this limit. And Bitcoin Core will do that for you if you let it construct a block. And some miners probably use Bitcoin Core to create the block, but other miners think they can do it more efficiently and they might be correct about that. But then if you do it wrong, then you could produce an invalid block.
Aaron van Wirdum So usually, you just mentioned, usually when you're constructing a block, you're just filling the block as full as possible with as many fees as possible.
Sjors Provoost Yeah, and that itself is also a non-trivial problem, but at least it's like a one variable. But keep in mind that you can have transactions that are groups, like clusters of transactions. And so you can't arbitrarily remove things from a group because there has to be a chain. It has to be complete. The actual puzzle of finding the most economically efficient block is non-trivial.
Aaron van Wirdum Yes.
Sjors Provoost But it's made very, very non-trivial because of the sigops limit.
Aaron van Wirdum Yeah, this sounds like there needs to be another limit being weighed in when calculating fees. So you might need... So while inscriptions actually gives you a discount, Stamps might, if miners are configured correctly, be more expensive than usual.
Sjors Provoost Exactly. If you can choose between two transactions with the exact same size and the exact same fee rate, you'd want to pick the one that does not have bare multisig in it.
Aaron van Wirdum Right.
Sjors Provoost But the question is, can you just translate that to say, well, it's the equivalent of so many sats per byte extra premium? I don't think it's that simple. My guess is Bitcoin Core internally uses some heuristic to make it expensive enough so it never goes over the limit. But that heuristic might not be the most economically efficient one. It might just be the safest one because nobody's using that feature. So it doesn't have to be efficient. Well, until now. So somebody might have thought, hey, I'm not getting the maximum revenue because of this Bitcoin Core thing is not giving me the perfect block. I'll just try it myself. And then they might have done that. You know, they might have started doing that just after the first hype around Counterparty died out. So they didn't really take that into account, and then it went perfectly fine for four years, and then boom, it blew up.
Aaron van Wirdum Right. Yeah, what you're saying is this block was not mined with any sort of Bitcoin Core software. No, it must have been…
Sjors Provoost And another reason we know that…
Aaron van Wirdum To some extent, right?
Sjors Provoost I don't know how miners produce their blocks, but the one observation that you can do is you can look at mempool.space and another website called miningpool.observer. Now, it turns out if you go to miningpool.observer, which is one site, what that site does is it actually uses Bitcoin Core to produce a template of a block. So it says, hey, Bitcoin Core, if there was a block right now, what would be in there? And it does that every 10 seconds. And so then it looks at the real block. But unfortunately, it didn't look at the invalid block. It looked at the valid block. And then you can see that the valid block looks almost identical to what was in Bitcoin Core. And so that suggests that the miner that produced the valid block was probably using Bitcoin Core because it came to almost the same result. And the difference was three transactions, and that could just be because they didn't see those three. And those were not Counterparty transactions. Those were very small, normal transactions. Now, on the other hand, we have mempool.space, which has its own way of calculating what would be ideal for a block. And it does not use Bitcoin Core's method of doing it. And it also compares every 10 seconds or whatever what it expects in a block. And it shows you a really nice graphic nowadays with pink being the color of blocks of transactions that are not included. And then you see lots of big transactions that were not included. And many of these were these Counterparty transactions. So what that means is that whatever heuristic mempool.space is using would include these transactions because they are probably paying a very good fee rate. And then it would say, hey, why is the miner not including them? Well, it doesn't know, but of course it's because of the sigops limit.
Aaron van Wirdum Right.
Sjors Provoost And so probably the miner would have been using an algorithm that's closer to what mempool.space is doing. Not the same code necessarily, but something similar because it makes sense from an economic point of view, but you're ignoring this limit. But ideally you'd want to have a way to compare the invalid block to what these tools are doing to see what the miner is doing. So in that sense... This new protocol has given us interesting information. It's shown us that some miners use different ways to compose their blocks.
Aaron van Wirdum Right. Moral of the story.
Sjors Provoost And they have not commented yet on it.
Aaron van Wirdum If you're mining blocks, use the sigops limit because retards are uploading dumb images in very efficient ways on the blockchain.
Sjors Provoost Yeah, and I guess either you want to use the Bitcoin Core way of doing it. But like I said, it may not be the most economically efficient algorithm. I haven't studied it in enough detail. Or if you do roll your own, maybe just don't include bare multisig at all. Just, you know, don't—it's not enough—it's not worth for those few extra satoshis to risk making an invalid block. Or if you do include them, make absolutely sure you don't go over the limit.
Aaron van Wirdum I mean, that's maybe what Bitcoin Knots does, right? I think they don't include bare multisig at all.
Sjors Provoost Yeah, you can always, if you're a miner and you have a mempool, presumably, you can configure that mempool to reject whatever you don't like. But there are downsides to doing that. For example, if you rely on compact blocks yourself as a miner, that's going to slow down if your mempool is incomplete. Because compact blocks, which we talked about earlier, you're basically sending a header over to the next peer, or you're sending a hash over to the next peer, and a list of transactions that are included in it. And so, and then you look at that list of transactions, which is like a summary and any transactions you don't have, you're going to ask from your peer. So that means if, if, if this, if the last block did include something you don't like, well, then you won't have those transactions and you then have to call your peers to get those transactions. All the while you're missing, you know, seconds of revenue perhaps, because it might, especially these big ones could take you a few seconds to download.
Aaron van Wirdum Yep. Okay.
Sjors Provoost So it's a very non-trivial thing. Like if you don't want to mine these things, there's a cost to that too. But if you do mine them, there's a cost as well if you make a mistake.
Aaron van Wirdum Yeah, makes sense.
Sjors Provoost Taproot gets rid of the sigops limit.
Aaron van Wirdum Taproot gets rid of the sigops?
Sjors Provoost Yeah, so Taproot.
Aaron van Wirdum But we have Taproot.
Sjors Provoost Yeah, so Taproot transactions do not count towards this limit.
Aaron van Wirdum Ah, I see.
Sjors Provoost Which means if blocks were only Taproot, this whole problem wouldn't exist.
Aaron van Wirdum I see. But yeah, you can't make bare multisig Taproot transactions, Sjors?
Sjors Provoost Correct.
Aaron van Wirdum Okay, I think that covered it all. We sort of explained what Stamps are and how they compare to inscriptions and why they're much dumber and why the block was invalid.
Sjors Provoost And why it's very hard to count sigops. Well, we didn't say why, but I can tell you it's hard to count sigops.
Aaron van Wirdum I think it's time to close this off.
Sjors Provoost I think so too. So thank you for listening to Bitcoin.
Aaron van Wirdum Explained.