Aaron van Wirdum Live from Utrecht, this is the Van Wirdum Sjorsnado.
Transcript
Sjors Provoost Hello.
Aaron van Wirdum Sjors, welcome.
Sjors Provoost Thank you. It's good to be back. Well, I never left, but...
Aaron van Wirdum Yeah, we're at your home now, so you never left, I think. You probably literally never left because of corona.
Sjors Provoost Exactly. We're at my secret location.
Aaron van Wirdum How are you enjoying the second wave?
Sjors Provoost It's amazing.
Aaron van Wirdum It is happening, isn't it?
Sjors Provoost Yeah, it's clearly happening. We've crossed every threshold value there is, I think.
Aaron van Wirdum Now it's just waiting for things to get worse.
Sjors Provoost Yeah, I mean, the amazing measure after three weeks of warnings that was taken was to close bars like one hour earlier. That's not going to do it.
Aaron van Wirdum Yeah, it was like the R value was way too high. So now they made the very strict measure of closing bars one hour early.
Sjors Provoost Yeah, which I'm sure will reduce.
Aaron van Wirdum Nothing's going to change, obviously.
Sjors Provoost Well, yeah, but the number still keeps going up. So eventually there's probably going to be some sort of lockdown. Because the difference between now and the last time is the last time the numbers were bad and everybody was worried. And now the numbers are bad and nobody's worried.
Aaron van Wirdum Yeah. Are you expecting a real full-blown lockdown this time in the Netherlands?
Sjors Provoost Well, we never had one. I don't know. I think it will be more strict than last time. But I don't think it will be Australian style.
Aaron van Wirdum Right. Yeah, so anyways, this episode is not about Corona.
Sjors Provoost Nope.
Aaron van Wirdum This episode is about Signet.
Sjors Provoost Indeed, Signet.
Aaron van Wirdum So Signet. So this is a new version of Testnet. So let's start with Testnet.
Sjors Provoost Yeah, or start with Mainnet.
Aaron van Wirdum Are you going to explain everything about Mainnet now first?
Sjors Provoost No, just to point out that in the early days, Bitcoin was practically worthless. So you could just test everything on production.
Aaron van Wirdum Okay.
Sjors Provoost And now that Bitcoin is not worthless. You know, you don't want to test things on production. In general, you do not want to test things on production. So there's this additional network that is identical to Bitcoin, and that's called Testnet.
Aaron van Wirdum Yeah, it's basically a clone of Mainnet, which was created, I think, by, I think Gavin Andresen created this back in, what would have been, 2011, 12, 13? Could be. Probably before, I don't know.
Sjors Provoost But it was designed to be worthless, but of course, some people are idiots, so they started trading it. Because, you know, it's probably better than any altcoin.
Aaron van Wirdum Right, because it's just Bitcoin.
Sjors Provoost Well, Bitcoin with a few gotchas. I think the main gotcha is that if nobody mines a block, the difficulty goes back down so that anyone can mine a block again.
Aaron van Wirdum Oh, the difficulty adjusts faster on testnet?
Sjors Provoost Yeah, there's basically after 20 minutes in what we would now call emergency difficulty adjustment, which just basically sets the difficulty right back to zero or whatever the lowest number is.
Aaron van Wirdum Right, right, right.
Sjors Provoost So what you see is usually 20 minutes, nothing. And then all of a sudden... One block comes in or a whole series of blocks comes in.
Aaron van Wirdum And that just resets difficulty to one?
Sjors Provoost Yeah, exactly. And the problem is that some joker with a big ASIC miner mines a bunch of blocks on testnet and creates really high difficulty because the difficulty keeps adjusting up and then they just go away. And nobody can mine a block anymore. But in 20 minutes it goes back.
Aaron van Wirdum So first of all, I think what you were going to say, but I'm not sure, is that the thing about testnet is that it's not supposed to have any value. And then if for some reason it does get value, like some people start trading it and hoarding it and holding it, then actually the whole testnet is just reset because people really... Well, punished in a way for giving it value.
Sjors Provoost Yeah, I think that happened once or twice. The current testnet is called testnet 3.
Aaron van Wirdum Right, so just to make sure that it has no value, that's the whole point of having this network. It should have no value, so people can use it to test stuff on.
Sjors Provoost That's right.
Aaron van Wirdum Okay, so then the problem is, and that was the other thing you were explaining, is that... this network, this test network, because it has no value, there's no— there's no sort of real incentive and mining economy around hash power or— and therefore it's instable. So sometimes blocks are like you mentioned, mined very fast and all of a sudden, you have, you have a whole bunch of blocks, and then this ASIC clown leaves and then there's no blocks for a while, and it's unstable, and this does not make for an ideal test environment.
Sjors Provoost And there's other problems, like you might have a reorg of 15,000 blocks, which is not realistic, or I think in the beginning, SegWit blocks didn't get mined. I don't even think it was censorship, it was just nobody was bothering. So all these kind of problems, yeah, it's time to get rid of it. Well, not to get rid of it, but time to have something else as well.
Aaron van Wirdum Yeah, so you have a proof-of-work chain. without all the benefits of proof of work.
Sjors Provoost Yeah, it's basically the worst of all worlds. It's all the downsides of proof of work because you do need to have it, but you don't have the incentives that go with it. So it's just a mess.
Aaron van Wirdum It's a messy test environment. There is another sort of... So what's RecNet? Is that what it's called? regtest.
Sjors Provoost Yeah, regtest. So basically regression testing. There is another version that you can spin up. That's called regtest.
Aaron van Wirdum That's a version of Testnet.
Sjors Provoost It's Testnet-ish, but it's a different kind of network.
Aaron van Wirdum Okay.
Sjors Provoost So Bitcoin Core defines three types of networks, Mainnet, Testnet, and regtest. And the last one...
Aaron van Wirdum Just to be clear about this, because this... It's maybe slightly interesting for someone who... I wasn't even sure about this. So Bitcoin Core actually embeds this stuff. Bitcoin Core embeds Testnet. There's like an option in Bitcoin Core to use Testnet.
Sjors Provoost Yeah, you launch Bitcoin Core with -testnet.
Aaron van Wirdum Right, so you download the Bitcoin Core software and then you can choose Mainnet or Testnet.
Sjors Provoost Or regtest.
Aaron van Wirdum Or regtest, which you're going to explain now.
Sjors Provoost And so I think the biggest difference with regtest is that it has no difficulty adjustment.
Aaron van Wirdum Okay.
Sjors Provoost Or something like that. Basically, the use case for that is you run a test on your own computer. So Bitcoin Core has a whole bunch of tests.
Aaron van Wirdum Right.
Sjors Provoost And those tests actually spin up a node that really produces blocks and reorgs and makes transactions and rejects transactions and all these things. But you don't want to have this huge CPU waste when you're running your tests to have this difficulty. So I think they're all just trivially easy.
Aaron van Wirdum But it's only on your own computer. This one. You're not sharing it with other people.
Sjors Provoost Yeah, not necessarily, but in practice, that's how you use it. You spin up a bunch of nodes on your own computer. Now, in principle, they're nodes, so they can run all over the network. But the problem then is because anybody can create blocks. You can just wipe out each other's chains, and it wouldn't be very suitable to use between different people on different networks. It's not ideal for that.
Aaron van Wirdum It's even worse than Testnet for that.
Sjors Provoost Yeah.
Aaron van Wirdum Right. Okay, so we have testnet that's unstable. We have regtest that's even more unstable, especially if you use it with other people. A bit better, probably, if you use it on your own. But we're looking for something better.
Sjors Provoost Yes.
Aaron van Wirdum We want something better or not, Sjors?
Sjors Provoost I would like something better.
Aaron van Wirdum That's what I thought. I don't really care either way. I'm not a developer, but for you... You want something better, for sure.
Sjors Provoost Yes. It's nice to be able to develop on something and try it with other people. So when you're working with other people, it's nice to have perhaps an explorer somewhere that you can point to, a faucet somewhere, maybe somebody takes care of occasional reorgs, so you can write software that you know every day or every hour. It's going to be a three-block reorg, and you can just make sure your software actually handles that. All these kind of things you can do. So Testnet is... Sorry, Signet...
Aaron van Wirdum Yeah, so Signet is the new testnet.
Sjors Provoost It's not the new testnet. It's another form.
Aaron van Wirdum It's a new testnet. Okay, so the new Bitcoin, if you download Bitcoin Core... Once there's a Bitcoin Core software release that has this implemented, then you have four options. So you have Bitcoin Mainnet, you have Bitcoin Testnet, you have Bitcoin regtest, and now you have another option, which is Bitcoin Signet.
Sjors Provoost That's right.
Aaron van Wirdum Cool.
Sjors Provoost Yeah.
Aaron van Wirdum What is Signet?
Sjors Provoost So Signet is signed, essentially. So what happens is, and it's completely centralized, every block is signed.
Aaron van Wirdum Every block must be signed for it to be valid.
Sjors Provoost Correct. So when you receive a new block, you check the proof of work, but that can be trivially low.
Aaron van Wirdum Right, it still has proof of work as well.
Sjors Provoost It does, yes.
Aaron van Wirdum And then you need a valid signature on top of the proof of work for the block to be valid.
Sjors Provoost Correct.
Aaron van Wirdum Plus, of course, the rest of the block needs to be valid, like always, all the transactions. Okay, so...
Sjors Provoost The signature is included in one of the coinbase transactions or in the coinbase transaction as one of the outputs.
Aaron van Wirdum I see.
Sjors Provoost Basically what you do is you create a block and then you add the signature to it and then you start grinding to find a proof of work.
Aaron van Wirdum Right.
Sjors Provoost And there's a couple of fields you cannot change when you do that. But in principle, you can try a couple of nonces and then you sign again and you try some other nonces. Right. And eventually you mine a block. So that's all the same.
Aaron van Wirdum So who's creating the signature?
Sjors Provoost So the idea is that there can be more than one Signet, so we'll get into that. But in this case, the main Signet, the default Signet is probably a better way to say it, is checked by a one of two multi-sig. So a Signet can have any arbitrary rules for what the block should be signed with. And the rule that's picked for the main one is a one out of two multi-sig. So there are two public keys out there. And I think, yeah, it's disclosed on the list. So it's Kalle Alm and AJ Towns. they have either of the keys. So if one of their computers disappears, Signet will go on. But it's very clearly very centralized in this sense. So they sign the block, and then it's fine. And they sign one every 10 minutes.
Aaron van Wirdum One of them signs one every 10 minutes.
Sjors Provoost Exactly.
Aaron van Wirdum And the other one just stands by. Just in case. So you know for sure there's going to be one block every 10 minutes, so that makes it stable.
Sjors Provoost That's the idea. And because they can both agree not to annoy each other with increasing the difficulty, you won't have that kind of problems. Right. Now, it's just a Signet. It's a default that Bitcoin Core will ship with, but you have a simple parameter that you can start Bitcoin Core with to find any other Signet. So anybody can create their own super centralized Signet. That's kind of the trade-off.
Aaron van Wirdum Right.
Sjors Provoost And they can have arbitrary conditions. So you could have, especially with Taproot, a 1,000 out of 300,000 multi-sig weird construction. That could be valid too for a Signet. There's probably no reason to do it. It's probably enough to just have a one of two or one of three.
Aaron van Wirdum Right. You can use it to test your new software or whatever you're testing. I would imagine that because of this structure, wouldn't it also... make it unsuited to test certain stuff like i'm just thinking out loud there but if you want to test something proof of work related or something. Like I can imagine that it's actually getting in the way as well sometimes or not.
Sjors Provoost I would say you can test whatever you want because it still has proof of work. So you could have a one of two signature and one of the two could increase the work, could just start mining with more work. And so triggering reorgs that way.
Aaron van Wirdum Are there any trade-offs or downsides then to Signet or do you think it's just strictly better than Testnet?
Sjors Provoost Well, it's extremely centralized. the default Signet, but because everybody can make their own Signet, that's kind of not an issue either.
Aaron van Wirdum Yeah, plus it's just for testing anyways, and it's valueless anyways.
Sjors Provoost Exactly. So I don't see any downside. I also don't see no reason to get rid of Testnet, but this is just an option you have. And yeah, so Kalle says hello. I talked to him earlier today.
Aaron van Wirdum Hello.
Sjors Provoost And one of the things he pointed out is that you can test soft forks with this. pretty easily by just shipping a new version of the Signet code, or like running your own branch of the Signet code, your own Bitcoin Core branch, which happens to check that soft fork, whereas others can simply ignore the soft fork.
Aaron van Wirdum Right.
Sjors Provoost So let's say they do an update that has taproot in it, and they say, well, as of Signet block 1000, taproot is now activated. And so if you run the old version of Signet code, the one that's in Bitcoin Core now, you'll just ignore it because this is a soft fork.
Aaron van Wirdum Yeah, well, you'll still follow the chain. You'll still be fine with it. You're just not enforcing.
Sjors Provoost You're not checking any of the taproot rules.
Aaron van Wirdum Yes, exactly.
Sjors Provoost But if you have that version, you will check the taproot rules. And now what if taproot rules are changed? Because it's still work in progress, so the consensus rules around taproot might change, right? Or there could be a bug in the first implementation. Well, it's very simple. You ship a new version of this taproot Signet code and you activate it later. So you basically say, well, now we activate taproot at block 2000 and anything before that is ignored. So that means you can have a single Signet chain that everybody can point to that can have all sorts of soft forks going on at the same time. and it's not really bothering anybody else. So it's kind of nice, because with Testnet, you really... I guess you can do the same on Testnet, but yeah.
Aaron van Wirdum All right. Any other benefits? What else do our listeners need to know about Signet?
Sjors Provoost I think the main benefit is that you can run your own if you have some sort of... you know, a large operation and you want to test all sorts of scenarios. If you want to test reorgs, then you can either ask, you know, some of the current Signet operators to do reorgs for you, or you can run your own Signet and have reorgs on it. And if you want to be cool and you want to do 10,000 block reorgs, then you can do that, you know, and you can have other people join in. You can spin up an explorer and people can point to it. I think it's pretty cool. But it's not life-changing or anything.
Aaron van Wirdum It's been in development for a while, right?
Sjors Provoost Correct. And it's already used in C-Lightning. So you can use an older version of Signet inside of C-Lightning. But they changed the Genesis block again a couple times. C-Lightning will be updated, I think, to have the new version of it. Right. And so that's nice. You can test lightning stuff on a Signet, which is interesting because you want to have multiple nodes, weird latency all over the world. And Signet is a nice thing for that. Testnet is absolutely horrible for lightning because if you get a 15,000 block reorg, your channels just blow up.
Aaron van Wirdum Yeah. Okay, so and this was merged into Bitcoin Core last week or something like that?
Sjors Provoost Yeah, a few days ago.
Aaron van Wirdum And that means it will be included in the next Bitcoin Core release.
Sjors Provoost Yep.
Aaron van Wirdum Which is scheduled for a couple months from now?
Sjors Provoost This fall.
Aaron van Wirdum This fall. All right. Sjors, anything else we need to discuss about Signet? Or is that it?
Sjors Provoost No, I think it's a pretty brief one.
Aaron van Wirdum Yeah. Great.
Sjors Provoost Yeah.
Aaron van Wirdum All right. I like brief ones.
Sjors Provoost All right. So thank you for listening to the Van Wirdum Sjorsnado.
Aaron van Wirdum There you go.