Sjors and Aaron discuss Signet, a new type of testnet for Bitcoin that was merged into Bitcoin Core last week. They also discuss the original version of testnet and its problems, as well as alternative testing environment regtest. Chapters 00:00:00 Opening and the test-network discussion 00:01:26 Why testnet is useful and unstable 00:05:00 Regtest for local automated testing 00:06:47 A predictable shared testing environment 00:08:04 Signet blocks combine signatures and proof of work 00:09:05 Default signers, custom signets and centralization 00:11:53 Testing and revising soft forks 00:13:29 Custom reorg tests, Lightning and release plans Support the Show! Follow Bitcoin Magazine on Twitter @BitcoinMagazine Follow Aaron van Wirdum @AaronvanW Follow Sjors Provoost @provoost Music: Song Title: Segwit Sounds By: The NakamoTones Album: Citadel Music Produced by: Bitcoin Audio
Audio and video play straight from the show's own hosting. PodSubs stores and serves no media.
Transcript
From the show. Tap a time to play from there.
Aaron van WirdumLive from Utrecht, this is the Van Wirdum Sjorsnado.
Sjors ProvoostHello.
Aaron van WirdumSjors, welcome.
Sjors ProvoostThank you. It's good to be back. Well, I never left, but...
Aaron van WirdumYeah, we're at your home now, so you never left, I think. You probably literally never left because of corona.
Sjors ProvoostExactly. We're at my secret location.
Aaron van WirdumHow are you enjoying the second wave?
Sjors ProvoostIt's amazing.
Aaron van WirdumIt is happening, isn't it?
Sjors ProvoostYeah, it's clearly happening. We've crossed every threshold value there is, I think.
Aaron van WirdumNow it's just waiting for things to get worse.
Sjors ProvoostYeah, 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 WirdumYeah, 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 ProvoostYeah, which I'm sure will reduce.
Aaron van WirdumNothing's going to change, obviously.
Sjors ProvoostWell, 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 WirdumYeah. Are you expecting a real full-blown lockdown this time in the Netherlands?
Sjors ProvoostWell, 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 WirdumRight. Yeah, so anyways, this episode is not about Corona.
Sjors ProvoostNope.
Aaron van WirdumThis episode is about Signet.
Sjors ProvoostIndeed, Signet.
Aaron van WirdumSo Signet. So this is a new version of Testnet. So let's start with Testnet.
Sjors ProvoostYeah, or start with Mainnet.
Aaron van WirdumAre you going to explain everything about Mainnet now first?
Sjors ProvoostNo, just to point out that in the early days, Bitcoin was practically worthless. So you could just test everything on production.
Aaron van WirdumOkay.
Sjors ProvoostAnd 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 WirdumYeah, 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 ProvoostBut 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 WirdumRight, because it's just Bitcoin.
Sjors ProvoostWell, 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 WirdumOh, the difficulty adjusts faster on testnet?
Sjors ProvoostYeah, 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 WirdumRight, right, right.
Sjors ProvoostSo 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 WirdumAnd that just resets difficulty to one?
Sjors ProvoostYeah, 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 WirdumSo 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 ProvoostYeah, I think that happened once or twice. The current testnet is called testnet 3.
Aaron van WirdumRight, 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 ProvoostThat's right.
Aaron van WirdumOkay, 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
Aaron van Wirduma while, and it's unstable, and this does not make for an ideal test environment.
Sjors ProvoostAnd 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 WirdumYeah, so you have a proof-of-work chain. without all the benefits of proof of work.
Sjors ProvoostYeah, 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 WirdumIt's a messy test environment. There is another sort of... So what's RecNet? Is that what it's called? regtest.
Sjors ProvoostYeah, regtest. So basically regression testing. There is another version that you can spin up. That's called regtest.
Aaron van WirdumThat's a version of Testnet.
Sjors ProvoostIt's Testnet-ish, but it's a different kind of network.
Aaron van WirdumOkay.
Sjors ProvoostSo Bitcoin Core defines three types of networks, Mainnet, Testnet, and regtest. And the last one...
Aaron van WirdumJust 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 ProvoostYeah, you launch Bitcoin Core with -testnet.
Aaron van WirdumRight, so you download the Bitcoin Core software and then you can choose Mainnet or Testnet.
Sjors ProvoostOr regtest.
Aaron van WirdumOr regtest, which you're going to explain now.
Sjors ProvoostAnd so I think the biggest difference with regtest is that it has no difficulty adjustment.
Aaron van WirdumOkay.
Sjors ProvoostOr 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 WirdumRight.
Sjors ProvoostAnd 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 WirdumBut it's only on your own computer. This one. You're not sharing it with other people.
Sjors ProvoostYeah, 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 WirdumIt's even worse than Testnet for that.
Sjors ProvoostYeah.
Aaron van WirdumRight. 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 ProvoostYes.
Aaron van WirdumWe want something better or not, Sjors?
Sjors ProvoostI would like something better.
Aaron van WirdumThat'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 ProvoostYes. 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 WirdumYeah, so Signet is the new testnet.
Sjors ProvoostIt's not the new testnet. It's another form.
Aaron van WirdumIt'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 ProvoostThat's right.
Aaron van WirdumCool.
Sjors ProvoostYeah.
Aaron van WirdumWhat is Signet?
Sjors ProvoostSo Signet is signed, essentially. So what happens is, and it's completely centralized, every block is signed.
Aaron van WirdumEvery block must be signed for it to be valid.
Sjors ProvoostCorrect. So when you receive a new block, you check the proof of work, but that can be trivially low.
Aaron van WirdumRight, it still has proof of work as well.
Sjors ProvoostIt does, yes.
Aaron van WirdumAnd then you need a valid signature on top of the proof of work for the block to be valid.
Sjors ProvoostCorrect.
Aaron van WirdumPlus, of course, the rest of the block needs to be valid, like always, all the transactions. Okay, so...
Sjors ProvoostThe signature is included in one of the coinbase transactions or in the coinbase transaction as one of the outputs.
Aaron van WirdumI see.
Sjors ProvoostBasically 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 WirdumRight.
Sjors ProvoostAnd 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 WirdumSo who's creating the signature?
Sjors ProvoostSo 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
Sjors Provoostdisappears, 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 WirdumOne of them signs one every 10 minutes.
Sjors ProvoostExactly.
Aaron van WirdumAnd 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 ProvoostThat'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 WirdumRight.
Sjors ProvoostAnd 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 WirdumRight. 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 ProvoostI 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 WirdumAre there any trade-offs or downsides then to Signet or do you think it's just strictly better than Testnet?
Sjors ProvoostWell, 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 WirdumYeah, plus it's just for testing anyways, and it's valueless anyways.
Sjors ProvoostExactly. 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 WirdumHello.
Sjors ProvoostAnd 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 WirdumRight.
Sjors ProvoostSo 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 WirdumYeah, well, you'll still follow the chain. You'll still be fine with it. You're just not enforcing.
Sjors ProvoostYou're not checking any of the taproot rules.
Aaron van WirdumYes, exactly.
Sjors ProvoostBut 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
Sjors Provoostcan 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 WirdumAll right. Any other benefits? What else do our listeners need to know about Signet?
Sjors ProvoostI 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
Sjors Provoostit's not life-changing or anything.
Aaron van WirdumIt's been in development for a while, right?
Sjors ProvoostCorrect. 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 WirdumYeah. Okay, so and this was merged into Bitcoin Core last week or something like that?
Sjors ProvoostYeah, a few days ago.
Aaron van WirdumAnd that means it will be included in the next Bitcoin Core release.
Sjors ProvoostYep.
Aaron van WirdumWhich is scheduled for a couple months from now?
Sjors ProvoostThis fall.
Aaron van WirdumThis fall. All right. Sjors, anything else we need to discuss about Signet? Or is that it?
Sjors ProvoostNo, I think it's a pretty brief one.
Aaron van WirdumYeah. Great.
Sjors ProvoostYeah.
Aaron van WirdumAll right. I like brief ones.
Sjors ProvoostAll right. So thank you for listening to the Van Wirdum Sjorsnado.
Aaron and Sjors discuss Bitcoin Core 32.1 and its updated security disclosure policy in this live conference recording, followed by audience questions. Links Bitcoin Core 32.1 release announcement and release notes...
Aaron and Sjors discuss the COLDCARD hack: the bug itself, how it could have happened, and some reflections on having had Coinkite as a sponsor. Note: If you’re using a COLDCARD and still haven’t moved your funds to a...
The COLDCARD hardware wallet has a critical vulnerability. If you are using the COLDCARD to store bitcoin, move them to a secure location as soon as you can. More information:...
Aaron and Sjors discuss what’s new in Bitcoin Core 31. Chapters 00:00:00 Episode 100 and Core 31 00:02:41 Cluster Mempool 00:10:45 Package Relay and Fee Selection 00:18:59 Private Broadcast over Tor 00:24:03 ASMAP and...