Research
Timechain
Search Donate
Sponsors
Cake Wallet, private Bitcoin and Monero walletSideShift.ai, no-signup crypto exchangeOrangeRock, non-custodial bitcoin spot and perps tradingBraiins Hashpower, buy and sell Bitcoin hashrateLayer Two Labs, drivechains for Bitcoin
Home / Podcast / S14 E7 / Transcript
Transcript · S14 E7 · 1:10:09 · 7 Aug 2023

S14 E7: Martin Habovštiak on Firefish & Bitcoin Development

With Martin Habovštiak. Hosted by Vlad Costea.

← Episode page Plain text
Machine transcript, corrected by hand. It can still contain mistakes, so the recording is what counts. Tap any timestamp to play from that moment. Use Cite to copy a timestamped link and a short attribution. Dotted words were hard to make out in the audio.

Search this conversation

0:00Ad voiceoverYou're listening to the Bitcoin Takeover Podcast, the Bitcoin podcast for OGs and intermediaries. Make sure you subscribe, leave a comment and like this episode. Also, read the new BTCTKVR magazine. This episode is sponsored by Wasabi Wallet, Cryptosteel, ShopinBit and Satodime. Thank you for listening.

1:11Vlad CosteaHello there and welcome to the Bitcoin Takeover Podcast. I am Vlad, and today I am joined by Martin Habovštiak, who is the co-founder of Paralelná Polis in Bratislava, and he's also a coder, a very involved bitcoiner who works on Rust libraries for lots of projects. And I'm gonna let him also talk about that one. There are a bunch of them which I use almost on a daily basis, and I had no idea that he is a contributor to them, like, I think it's Electrum Rust or Electrs, also BTCPay Server, and a bunch of others. So it's really good to have you, Martin. I don't even know what I should ask you first. I'm happy that I get to finally interview you. And let's start this. Let's talk about your work.

1:57Martin HabovštiakThank you. Hello.

2:01Vlad CosteaThat was a short introduction on your behalf. So what is it that you do these days?

2:08Martin HabovštiakSo I just finished working for Firefish, and currently I'm, like, looking for other stuff to do. And meanwhile, in the open source realm, I'm doing some contributions into the Rust Bitcoin library, as there are some important things to do, and I want to try to do more stuff on the Cryptoanarchy Debian Repository.

2:39Vlad CosteaWhen you say you finished working on Firefish, you mean that you finished coding for it?

2:44Martin HabovštiakYeah, so the main part is finished, and there will be probably some other things to do later, but, like, most of the stuff that I'm responsible for is pretty much done.

2:55Vlad CosteaYou said the same about Electrum Rust, that you finished everything that you wanted to fix and you moved on.

3:01Martin HabovštiakTo the next one. Yeah, so with Electrs, like, the things that were affecting me mostly, those I helped to fix. And there isn't that much of stuff that I would need to change urgently right now. So it's like I moved on in the sense that I might return sometime when there is something to do, but I now contribute to some other things.

3:35Vlad CosteaI think that's nice. I think you're also the maintainer of the Electr... not the Electrum, the Bitcoin Rust repository.

3:43Martin HabovštiakI'm co-maintainer together with Andrew Poelstra and Tobin Harding.

3:48Vlad CosteaAnd what's that like? Why do you work on this specific language repository for Bitcoin?

3:55Martin HabovštiakYeah, so in my opinion Rust is a very good language, very well suited for Bitcoin applications, because they need to be often fast, because they need to parse the whole chain, which is pretty big and complicated. And also, they need to be secure, because you don't want to lose your sats or privacy or something. And Rust has properties that make this better. And the other part of it is I started working on Rust Bitcoin when there was a... because, like, Electrum Rust is written in Rust, obviously, and there was a bug, like some overflow bug, which in some weird situations just caused a crash in Electrum Rust, and it was actually in the library, not in Electrum Rust. And so I fixed the bug.

4:51We were, like, analyzing it for a while, and then I figured it out and sent a pull request, and then I started to contribute other things and such. And eventually I got invited as a co-maintainer. And now I'm trying to help with fleshing out the API and improving the library, because I have also some other projects that use Rust Bitcoin, and I want other projects to use Rust Bitcoin, and I want the library to be good, to be reliable, to be kind of foolproof in a way. Like, maybe foolproof is too, you know, too confident a way to say it, but let's say that it should be unlikely to screw up when you are writing in Rust and using this library.

5:43So that's my focus, and that's something I want to achieve, and I'm helping others to build this.

5:52Vlad CosteaRight, so you also worked on Paralelná Polis, the Slovakian branch of it. It was open for a couple of years. As far as I know, right now it's no longer open. What is the story behind that?

6:06Martin HabovštiakSo for those who don't know maybe even what Paralelní Polis is... So it started as a building in Prague.

6:19Vlad CosteaThat's where we are recording this, by the way. Thank you, Katka and Mario and everyone, for letting me use your studio. So please go on.

6:27Martin HabovštiakYeah, so it was a building that was created by a collaboration of hackers, Slovak hackers, and Czech artists, which is kind of interesting. It's a whole pretty long and complicated story. I don't know if you covered it anywhere already?

6:45Vlad CosteaI did an interview with Sodomak last year. He told me about Benda, about resisting communism, about building parallel societies.

6:54Martin HabovštiakYeah, so probably check out that episode. But the short story is that these hackers and artists had some vision of improving the society, and they created this building and community; this is the more important stuff. Like, the building is just a symbol for the community who meets here and discusses these topics. And they do various things like Bitcoin, liberty, 3D printing, art, whatever. So this was running for a while in Prague, and we were thinking, like, okay, we should do one in Bratislava as well, because it's cool and it's useful, and some of the co-founders of Prague Paralelní Polis also became co-founders of Bratislava Paralelná Polis.

7:50And at the time when Paralelní Polis Prague was created, I personally wasn't, like, involved, although I kind of could have; like, I was aware of these people at the time. But when there was one in Bratislava going on, then I wanted to join. And so we also created, or rather rented, this building and arranged it for our purposes, and also we got together with some community of various bitcoiners and liberty lovers and whoever else. It was pretty cool. It ran, like, you know, with every business, charity, whatever, there are some difficulties, that's obvious, but it ran pretty nice, and it created a bunch of very interesting content. We had many discussions; there were some things actually invented there. The situation itself helped create some technologies that you might be using unaware of it, like, thanks to Paralelná Polis Bratislava, so that's pretty cool.

9:12And after a while, like, pretty much during the COVID... like, we had some difficulties running it also, but the main part was that the COVID stuff broke out and we had to shut it down, basically, the physical space. The community remained, largely, at least, like, the core people who were the most involved, most interested. They are still communicating, and we were even thinking of restarting it now that there is not that much stuff going on.

9:52But it's kind of difficult because, you know, some people moved on, some people decided that Slovakia is not that great and moved somewhere else, mostly Paraguay or other countries. So it's pretty difficult to restart it now, but we had some events at least and some community gatherings, so at least that's going on now. And we often meet in various conferences somewhere else, you know, like in Prague. There is also another one in Košice, actually, which is another city, like the second largest city in Slovakia. So Bratislava is the capital of Slovakia, and Košice is the second largest city, and there is actually a Paralelná Polis. And unfortunately I wasn't able to visit it yet. It opened, like, towards the end of last year, I think it was something like the 12th of December or something like that.

10:49I'm not sure; you can probably Google it. And so we meet together when we are attending various conferences like Pizza Day today, or others. There are some in Slovakia, in the Czech Republic, or some remote conferences, where we meet and we talk. So the community remains a little bit scattered, but still alive, I would say. But the building is no longer there.

11:25Vlad CosteaIt's a bit sad when I think about it, but let's make this a little happier, because we are here at Pizza Day today, and there were about 200-plus people who attended this event and watched the talks. They even got to launch my magazine, which I'm really happy about. But let me ask you about the stuff you're building, because you mentioned Firefly... Firefish. Firefly is something else. Firefish. I got a t-shirt there of Firefish. They are sponsors of this event, but I'm still not sure what that is. So how would you describe it?

12:00Martin HabovštiakSo it's Bitcoin-backed loans, but as opposed to these BlockFi and other companies, this is based on multisig on Bitcoin directly. And so you have, like, the trust is effectively three-of-four. Technical details look a little bit different, but, like, on-chain it doesn't look as three-of-four, but, like, three people could in theory scam the fourth one if they collaborated, which is much better security than having one custodian that holds everything. And there are some other ideas, like how to improve the incentives better.

12:50There is also this interesting thing that when you are setting up, or after you set up the contract, if the collaboration wasn't during the setup, then the collaboration should be less likely afterwards, because these entities, if they don't trust each other, then, like, let's say the person who is borrowing fiat, let's say this person wants to steal the bitcoin, then he would have to convince the oracles (there are two oracles) to cooperate. But the issue is that the cooperators have no reason to trust him, because he could scam them as well. Then, if they cooperated, he could still steal the bitcoins and keep it for himself and not pay the oracles, and there is no way for them to enforce it.

13:50And if he is already dishonest, then why would they trust him? So that's kind of cool, and the same goes the other way around for the borrower, who is borrowing the fiat and depositing bitcoin. So it's still even, like, slightly better. If they cooperated from the beginning, during the setup, it's of course bad; like, there is nothing that would, like, kind of prevent them. But it should be in theory at least harder to convince, like, several people, or maybe companies, to do something bad. So it's better security, definitely, than just giving it to someone who holds a single key that can send it anywhere, any time. So that's the main idea behind it.

14:41And there are some other technicalities, like how to make it kind of user-friendly and such. So there are some other things, but this is, like, the main idea. And maybe another idea is that we don't want to issue stablecoins, because they are kind of user-unfriendly. You know, like, when people want to, I don't know, make a business, and they want to borrow money so that they can launch the business, then they want the cash, the euros, dollars, whatever. They don't want stablecoins, because the suppliers don't accept stablecoins. So it's not that nice to have stablecoins. And stablecoins kind of try to solve the issue of having oracles, and it kind of works, it seems, within some other limits.

15:36But if you want to, like, directly borrow fiat and don't want to deal with stablecoins, then you have no other option, basically. You just have to use something like this, and I think that this kind of contract is, like, a really good step towards it. Of course, there might be ways to improve it, and you could probably add more signers, more entities, more oracles, or something like that. And maybe this is something that will happen one day, who knows. But this is already, I think, like, a huge step forward towards better security. And there is also one interesting thing: like, if some meteors hit the oracles and they are unable to operate, then the borrower can still get back his bitcoins after the loan expires. Like, there is some maturity date, and there is some timelock after, like, some time afterwards, it could be two weeks or something, and if it's not moved before then, then the borrower can take it.

16:44So even if everything goes to hell, then still the borrower can get back the bitcoin. So it's mainly focused on paranoid bitcoiners who need the loan but don't want to give up bitcoin easily.

17:04Ad voiceoverWasabi Wallet is unfairly private. It's the most advanced and most used Bitcoin privacy wallet, with half a million downloads across Windows, macOS, and Linux, as well as thousands of fresh new bitcoins getting mixed every month. Wasabi makes use of the new-generation WabiSabi engine to create mega-coinjoins, thus mixing your bitcoins with those of hundreds of other users. For amounts lower than 0.01 BTC and remixes, you pay no coordination fee. Even if you don't use CoinJoins, Wasabi Wallet has a native Tor integration and downloads block filters to help you keep your network-level and public key privacy. Download Wasabi Wallet for free today at wasabiwallet.io and experience the future of Bitcoin privacy.

17:56Vlad CosteaSo you're saying basically that Firefish is like BlockFi, but as a protocol, without stablecoins, without the counterparty risk of trusting in people, and some sort of multisig-ish on top of it, plus some programmability in terms of timelocking, because you're not allowed to withdraw until a certain time.

18:16Martin HabovštiakYeah, pretty much. It's like the contract is more or less fixed, the structure of the contract, but the parameters, like what is the amount, what is the timelock, those are changeable. And, like, it's kind of... like, people sometimes say it's non-custodial, but it depends on the definition of custodial, of course, because, like, okay, there are still three parties that can, like, take your bitcoins, but there are three parties, not one. That's the advantage. And the incentives should be such that it's unlikely.

18:58Vlad CosteaI mean, it is possible, but it's more difficult to cooperate. But my question to you is: is it like a multisig where you know which parties have signed the withdrawal? Or is it anonymous?

19:10Martin HabovštiakSo yes, you know which parties did what. But, like, it is like multisig, but in classical multisig you have this problem that you need to cooperate at the time when it's going on. So let's say if the maturity date comes, or, let's say, the borrower returned the loan, then the borrower would have to open the wallet and sign the transaction, if it was naive multisig, like, you just use a Bitcoin contract and do this. So this has two problems. First is a UX issue, because the borrower has to do some additional step. And the second problem is that the borrower has to hold the keys all the time, and the key must not be compromised.

20:06But we did, like, these tricks with timelocks, and we actually pre-signed the transactions. So the key there is also the part that the borrower discards the key right after pre-signing the transactions. So if the borrower doesn't have his computer compromised at that moment, then it's safe later. Like, even if someone compromised his computer, if the return address is going to his hardware wallet, let's say, then he's completely fine. And so this is a very cool security feature, and with naive multisig you wouldn't have this. And the borrower doesn't also need to sign anything or log in or do anything, basically, afterwards.

20:57Like, maybe there is some super unlikely edge case where he would like to do child-pays-for-parent, but other than that, there is pretty much nothing he has to do.

21:08Vlad CosteaRight, so I think on this topic of Firefish, I satisfied my curiosity. So right now I want to know more about Rust. I know you said something in the introduction, but I know that Bitcoin was written in C++. And there are still some puritans, people who say that good code that's fast and reliable is developed using C++. But there's this new generation of coders who say, "No, no, no, Rust is better in so many ways. It's more secure, it has fewer bugs." What is your take on this debate, and why do you work so much in Rust?

21:45Martin HabovštiakYeah, so I will be biased, obviously, but... so why was Bitcoin not written in Rust? There is a very simple answer to this: Rust didn't exist at the time. And I guess that if Satoshi developed Bitcoin today, he would choose Rust. I believe so. And the reason is that Rust tries to achieve the speed of C and C++, because C and C++ are really fast. You have precise, like, control over things like memory, and this affects speed. Like, there are very technical quirks, like how just where you place your data in memory can really affect speed, and you can do this with C or C++.

22:39But the problem is that it is super easy to make security vulnerabilities with C and C++. And it doesn't just mean that it's easy for someone who tries to do it intentionally; it's very easy to do it unintentionally. And there are, like, tons of security vulnerabilities. Like, the famous one is probably Heartbleed; maybe many of you have heard of it. Like, there was this super insane bug in SSL, and it could compromise the keys of the server, and when it was published, all hell broke loose, and everyone was questioning everything about security. But this kind of bugs are pretty likely to happen if you write in C and C++.

23:33And it's not like stupid people writing C and C++; like, very intelligent, skilled people still made the bugs, because we are humans. Ultimately, no one is perfect, and even code reviews aren't perfect. Like, we have some insane code reviews in Rust Bitcoin; we go very into details, everyone tries to break the code of someone else and tries to point out the bugs before they land in, but it still happens from time to time that we land some bug. At least it's not super critical bugs, usually. At least I don't remember any, like, super critical bug. But because we are humans, we have this problem. And there are other languages that solve this issue with security, like Python, JavaScript, whatever else, Java, and many, many others, but the cost of this is that they are much slower.

24:33Well, depending on which one; some of them aren't that slower, but still are slower. And this is not really great for some applications that really need the speed, and Bitcoin is unfortunately one of them, because the chain is large, and we already had the scaling debate and stuff, and it really does affect, like, synchronization speed and such, and UX, and ultimately it affects how many people will run full nodes, of course. So of course it needs to be written in a fast language. And so Rust was created with the idea to solve this, like, have a fast language that is at the same time memory-safe. So memory safety is the property that refers to, like, not having these kinds of memory bugs.

25:25And this is successful. Like, it started as an experiment in Mozilla, and it was successful; it did solve the issue. Of course, the cost is that the code is... like, you sometimes write a bit more code, you sometimes must think a bit more about the code, and there are other things, but it pretty much solves the problem. And therefore I think it's totally natural for Bitcoin; like, you have secure code that is fast, which is what we need here. And even if you have applications that aren't... like, they don't need, let's say, they don't need speed, just the safety, but they need portability.

26:18If you want portability, which means, like, you want to run it in the browser, on desktop, or on phones, maybe in some embedded hardware, like hardware wallets, then you have essentially three possible languages: C, C++, and Rust. And then you have, like, okay, if you are handling money, then probably you don't want C and C++, because it's easy to mess up. So the only option is Rust. And this is actually the reason why we chose Rust in Firefish. Well, there are other reasons, but I think this is the main one, because we didn't have any other option, because we wanted the code to be portable and we wanted the code to be secure. And the choice is obvious, and we could probably... like, if the code was, like, a thousand times slower than it is, probably nobody would even notice.

27:19But still, the choice is this one. So it's not just speed, because many people are like, "Oh, I don't need speed that much, I don't need to use Rust." Okay, fine, but maybe portability is also a concern. And another part of it is that Rust solved these memory safety issues, but it had to create some tools to solve these issues. And coincidentally, these tools are very useful to catch other kinds of bugs. Not all of them, unfortunately, but pretty obviously, because if Rust caused bug-free software, that would be insane; like, everyone would start using it, maybe. But it's not even possible theoretically; there are mathematical proofs that this is effectively impossible. But it can catch many, many other kinds of bugs, like logical bugs.

28:16And this is really cool, especially if you can write your code such that this property of catching bugs is even, like, more effective, like, that it catches even more bugs than by itself. Like, if you structure code in some ways, you can defend against your own bugs better. So this is also something we do in Rust Bitcoin: we try to structure the code such that it defends against bugs of other programs that use this library, which is very cool.

28:49Vlad CosteaIn the beginning of the interview, I mentioned a few other projects in Bitcoin, like BTCPay. I think you also work on the Lightning daemon, but I'm not sure which one. What other projects do you currently work on, and are they all Rust-based?

29:04Martin HabovštiakSo these other projects, there it was some small contributions. Like, I found a bug in BTCPay Server's payjoin implementation when I was doing some payjoin experiments, really crazy ones, I would say. So I found this interesting edge case that got later fixed. And I also improved some handling of some configuration regarding Lightning Network Daemon, it's LND from Lightning Labs. So I added some functions to better, like, connect to the operating system and better, like, inform the system to know that, okay, now the initialization stopped, like, the wallet is ready, and things like that. I think I did some kind of improvement on the configuration handling, because there were, like, very confusing error messages that made it very painful to configure or debug things and stuff.

30:09So I helped... although I'm not sure if this was LND; maybe it was Loop, I'm not sure, but one of them. So I did things like that, like small contributions here and there, in other projects, also BTC RPC Explorer, like, adding some authentication mechanism. I usually do these things because I need them in my projects and stuff, so, yeah, I do various things like this. And, yeah, there are other projects that are Rust-based, and some project that is more, like, pure Rust. And the biggest one is the Cryptoanarchy Debian Repository, which allows you to spin up your node more easily, in a way that is well integrated into the operating system.

31:02And this one, because of how Debian repositories work, obviously cannot be pure Rust, because there are files that literally have to be something else. So I use something else for those files. And, oh yeah, there are other parts where Rust wasn't that much needed, although I sometimes kind of think that, oh, maybe I should have gone with Rust anyway, because it would probably save me some pain, who knows? I'm not always sure whether it's worth it, but it could be. So there is a bunch of projects, and this Cryptoanarchy Debian Repository, like, joins together multiple software, like bitcoind, LND, BTCPay Server, and such. And to work well, I needed to do these contributions, these small things, for the whole project to be better. And yeah, it did improve quite a few things significantly.

32:10Ad voiceoverCryptosteel is the original Bitcoin cold storage backup, and it's been innovating self-custody since 2013. Designed and manufactured in Europe from the finest and most resistant stainless steel, the Cryptosteel Cassette and the Cryptosteel Capsule are industry standards. These cold storage devices are made to resist house fires, extreme floods, and physical shocks. You can also use Cryptosteel to store your important passwords, BIP39 passphrase, or Nostr private keys. Buy your Cryptosteel today from cryptosteel.com and use promo code BTCTKVR to get a 10% discount. Cryptosteel: secure your Bitcoin like an OG.

32:55Vlad CosteaWhen I speak to some Bitcoin developers, they tell me that there are many limitations in place that they find a bit frustrating, and they wish they could... in the event of a hard fork, they wish they could include some features in there. And I want to ask you, as someone who works with the Bitcoin code on Rust: is there any optimization or change that you would make if you were to either include them in a future fork, or else, if Bitcoin was to get launched again today, and they would be a must-have?

33:25Martin HabovštiakHm, interesting question. Nobody asked me anything like this. But things that come to me... like, obviously there is this mandatory hard fork, because there will be time overflow eventually, in I don't know how many years. So we need to fix that anyway. So maybe not make the time tracking or time computation that limited from the beginning is the one. There is also, like, maybe have SegWit from the beginning. That's kind of... it would help so much then. Oh, just the malleability fix; that's the main reason. If it was there from the beginning, then things like this... how is it called... that you can replace the input... I forgot the name, the one that's needed for L2.

34:35Vlad CosteaIt's not RBF, right?

34:37Martin HabovštiakNo, it's another type of signing transaction.

34:48Vlad CosteaMaybe you'll remember along the way.

34:50Martin HabovštiakMaybe I will remember. Basically, it's the required soft fork for L2. And I had another idea just today that would be kind of interesting, although I'm not sure how much helpful, but might be worth considering: like, having a way to bump another transaction without having to prepare the transaction for bumping. Like, for instance, if you have a pre-signed transaction, and you want it to be later, like, not replaceable, but you want to later do child-pays-for-parent without spending the outputs that you intend to have there, then you have to add an additional output.

35:43This is what anchors do in Lightning. So in Lightning channels, you have to add two more outputs to solve this issue that, basically, you don't know what the fees will be in the future when you are trying to close the channel. And these outputs also waste some space, are a bit inefficient, and then you use them to make a transaction. And what could be kind of useful, although in case of Lightning it could probably open some attack vectors, I'm not entirely sure; I know there was some conversation around this... But what could be kind of interesting would be if you had, like, just a normal transaction like this, and if you could create another transaction that basically subsidizes the other one without having this link.

36:43And I also, like, thought that it could be done via soft fork. So the way it could work is that you make the other transaction that is valid for old nodes, of course, but the new nodes would see it as only valid if the other transaction... if it contains the transaction ID, if it was already confirmed. And it could be within the same block, it could be in the chain, but that would be the condition. Probably doing it in the same block would be most effective, and it could be better, probably. So that the transaction would be valid only if another transaction is in the block.

37:38And if you have this condition, then you can just set a very large fee on the other transaction and then just subsidize the other one. So this condition could be a little bit more efficient regarding the block size. It can be done via soft fork, which is pretty cool, I think. But I'm not sure; I just got the idea today, so maybe there will be some development, maybe not. Maybe it has some horrible problem, so that people will rather not do it.

38:11Vlad CosteaI'm really happy that this was first recorded on the Bitcoin Takeover Podcast. So if you go on other shows, people are gonna know: "Oh, it's that one that you discussed, and I recorded this the day after you thought about it." So I'm proud to have it recorded here. I was wondering if you like any of the privacy proposals for the base layer of Bitcoin.

38:33Martin HabovštiakYeah, I was also, like, thinking a lot about privacy. I have this proposal that I didn't, like, publish; I showed it to some people, to make channel factories more private, such that the members of channel factories don't know how much each other has. So, like, if you have a channel factory of, let's say, ten people, and two of them move the coins so that one of them sends it to the other, then the other eight people wouldn't know that this amount changed. And this requires actually, interestingly... like, if you try to do it naively, you would think that this requires the same cryptography as in Monero, so Pedersen commitments and Bulletproofs and stuff like this.

39:23But actually it only requires Pedersen commitments, and you can do Bulletproofs off-chain. Because with Pedersen commitments, you can commit to the amount, and you can prove to all other participants that, yeah, this amount is such that it should be there, without revealing it. And so it would be pretty efficient. And of course, the risk is that if Pedersen commitments get broken, then those who use this protocol would lose their satoshis. That's the risk, which would be opt-in. So I want to, like, kind of clear up the proposal and send it somewhere, but this is something I was thinking about.

40:14But privacy on the main chain, on the base layer, is pretty hard in general. And I also think, like, doing stuff like Monero, like adding noise to the chain, is not really that great. I really like more removing information from the chain, which is what Lightning does, which is what channel factories do, which is what Taproot does. It is a much better design, because it's...

40:43Vlad CosteaIt's more scalable.

40:44Martin HabovštiakIt's scalable, and it incentivizes people to use it. That's a really strong one. Like, people also say, like, "Yeah, Monero is, like, mandatory privacy," which is good, but that's not the actual reality, because using Monero is not mandatory. That's the problem. Of course, we don't want to force anyone to use anything, but, like, because using Monero is not mandatory, they don't have that great an anonymity set and stuff. And I don't want to, like, make this into some kind of framework, but just... it seems better to just make it incentivized.

41:35Vlad CosteaLet me get into the lesser popular territory and ask you for opinions that can get you cancelled on Twitter. What's your take on these Ordinals inscriptions and the fact that they use Bitcoin in a non-financial way? And they use Taproot, so they kind of bumped the amount of Taproot transactions. They priced out some financial transactions, so now on-chain fees are higher. But at the same time, it's kind of healthy for the miners, because they kind of needed this.

42:05Martin HabovštiakSo, okay, I have an opinion that is very nuanced and could get me cancelled if people really don't understand what I mean. So I think that Ordinals deployed and used today, when the chain is not already full, are more harmful than helpful to the ecosystem, because they increase the cost of syncing and stuff. But we hope that in the future pretty much all blocks will be full. Not even hope; it's kind of predicted. You know, like, if there is a lot of use, there will always be someone competing for block space, and essentially this means the blocks are full. So whatever we do, we have a constant amount of data, which is four megabytes.

42:56Or maybe, like, because of the way the discount works, it could be between two and four or something like that, but, you know, they have pretty much constant block size. But here's the interesting thing: like, verifying a block which is full of normal transactions, financial transactions, where someone is sending stuff to someone else... You can do some simple math, like, if I really, like, estimated, like, divide the block size by the size of inputs and outputs of a normal transaction, you will get some estimate of how many inputs there will be, and you can assume that for each input you have at least one digital signature.

43:49So you calculate some number of signatures. And if you compare it to a block which has only one transaction... or, well, yeah, it could be even a coinbase transaction, but let's say a coinbase and another one, which has an input that is so big that it fills the whole block but contains only one signature, then the latter is actually better for verification. Like, the speed of verifying signatures really does matter. And I did test this: I set up some node with some hardware, I synced it with default settings, and then I restarted it and set assumevalid to zero, which means that some signatures that are so buried in the chain that Bitcoin Core doesn't even bother verifying them with default settings, they will be verified.

44:53And this increased the time of synchronization massively. I think it went from, like, eight hours... oh, sorry, I think it was from twelve hours to, like, three days or something like that. I'm not sure, I don't want to lie, but it was definitely more than a day. So it really does matter a lot how many signatures you do have. So for verification, having these non-financial transactions that just load the data is better, if the block would be full anyway. Like, you want a block which is full of some data that is the easiest to verify. You know, like, having thousands of transactions will cost you more on power, or on time, on electricity, on many things, than having just one transaction and some big chunk of some bushy data that you will only keep. You will hash, check the hashes, and that's it. So that's the nuanced answer.

46:04Vlad CosteaBut you're saying that you're not running the Ordisrespector software to filter these transactions on your node?

46:11Martin HabovštiakI didn't even have time to look into it. I think it would make sense to run it today, because today, without Ordinals, the blocks wouldn't be full, so they are harmful. But of course, we can argue whether, like, this is... like, it harms financial transactions, but it's just free market. Well, if someone values their ordinal more than someone else values their financial transaction, then who am I to say that they are not allowed to do that, of course? And even then, like, this incentivizes use of Lightning, use of Taproot, use of technologies that actually increase privacy. So in an ironic way, maybe we should be thanking Ordinals for incentivizing people to run the damn node and to, like, install a Lightning wallet, you know.

47:11Like, yes, people will be pissed off that opening a channel is also costly, but, you know, it's kind of silly. Like, you had all this time where you could open cheap channels. And we did say, like, "Open channels now, when the fees are low; you will have it ready when the fees are high." And people didn't do it. Well, guess what you get? That's what you get.

47:35Vlad CosteaWe had, like, four years to do that.

47:37Martin HabovštiakYeah.

47:38Vlad CosteaWe assumed that low fees are gonna last forever.

47:41Martin HabovštiakThat's the wrong assumption from the beginning. Like, pretty much every bitcoiner who is, like, sane was saying that the fees will get back... like, the fees will be high again. It was not only known, it's also required for Bitcoin to survive. If there are no high fees, like, miners will not be that incentivized to mine, and the network could become insecure. And this is not just theory; like, look at the coins that got double-spent because they have a very low hash rate, because they are not very profitable. Like, Ethereum Classic comes to mind. So they were double-spent. So if Bitcoin had low fees all the time, we would have the same problem, probably.

48:39And maybe even a bigger one, because Bitcoin is, like, a more juicy target for attackers. So we need the fees to be high, and this incentivizes Lightning transactions. And yes, there will be people who will be annoyed, but come on, this is the reality. You have your responsibility, you can make choices. You know, it's like being pissed off that you broke your leg and nobody wants to help you because you didn't pay your health insurance. No, you need to buy insurance before the event happens, not afterwards. That's kind of an obvious thing in other aspects of life. Like, if someone cried that, "Oh, this doesn't work," because I didn't buy the insurance, and the insurance doesn't work because I didn't buy it before and I only bought it when the event happened...

49:34It would look crazy, but those people are crying now that, "Oh, it's too expensive." Well, you got what you wanted. You know, like, you caused it yourself.

49:49Ad voiceoverRemember the paper wallet? Ah, yes, the good old days when you printed your Bitcoin private key on an offline computer? It was so fun, but not really easy, and totally not secure. Today we have Satodime, a chip card that acts just like your good old paper wallet, but with all the modern security features and top-notch functionality. It turns your bitcoin into a bearer asset, which you can easily trade in person. Thanks to NFC, you can use the Satodime card with your smartphone. Creating a new pair of Bitcoin keys takes just two swipes. Check your balance in real time. Create multiple key pairs. Whenever you want, you can reveal your Bitcoin wallet's private key with just a single click. The simple, uncluttered interface lets you quickly see if a key pair has been unsealed. Finally, the cold storage you've been looking for. Available now on satodime.io.

50:40Vlad CosteaLet me ask you about scaling layers. I know that nowadays it's less taboo to talk about drivechains, for example, which is a proposal to bring merge-mined chains that do different stuff, for example a Zcash sidechain, maybe an Ethereum sidechain, and bring all of that economic activity to the same Bitcoin miners to fix some of the security budget. But there's also the risk of one of these chains becoming dominant and leaving the Bitcoin main chain less used. So there are some risks associated with this. At the same time, I think something else that's interesting is the extension block with Mimblewimble. It was deployed on Litecoin. It's effectively a block size increase on a separate chain. It's still mined by the same miners, so it increases the revenue, and it's also adding privacy. I think that's an interesting design which is not being discussed too much in the Bitcoin circles. What's your take on these? Or do you think it's just Lightning, that's the future?

51:39Martin HabovštiakWell, drivechains are kind of an interesting trade-off, at least if we talk about drivechains as described by Paul Sztorc. I'm not sure how his name is... Sztorc, Sztorc, yeah. And so there is this thing that miners could steal the satoshis in there, and it is opt-in, which is nice, and the theft would be massive. And there is some, like, argument why the incentives should be so that they probably won't do it, at least not for sane chains. And it's kind of interesting. I'm not sure, and there is some pushback against it. And I think, like, we should probably try other ways that are more secure first, and maybe if all other ways fail, then maybe consider this. It seems a better approach.

52:45Vlad CosteaI mean, there is a more secure way. There is Liquid, the federated sidechain, but it seems like it's not being used at all.

52:51Martin HabovštiakI wouldn't say... like, it's a completely different design, I would say. And it's a good question whether it's more secure, because now you have a federation.

53:05Vlad CosteaYeah, most people don't get the point of having a federation.

53:08Martin HabovštiakYeah, it's like... in both cases you have multiple parties, and if there is collaboration, they could steal. Like, pretty much similar security, I think. It depends on various parameters, and, like, I don't think I could analyze it right now. But, yeah, I mean, we could try these alternatives first. And, like, I like it being opt-in. But there is also this idea that some people had... they think that you can... and I think Paul had this idea too, that you can kind of reuse the work by miners, without adding data to Bitcoin, to secure other chains.

54:05And this idea is actually invalid. You cannot improve security of another chain without adding the data and the verification rules. Well, maybe you don't have to add the verification rules, but definitely you cannot do it without increasing size in Bitcoin, and I mean the size that miners will have to process. And this is kind of, like, pretty difficult to explain with some cryptography stuff, but basically, if you do it in a naive way, there are, like, two... there are two attack vectors against it, so rather, there are, like, three options. One is that you make it so that it doesn't work at all, or that it doesn't increase security but does something weird.

54:56You can do a design that, like, increases security but is totally, trivially attackable in another way. And then there is another design that increases security by mining Bitcoin, but... so the first attack is one where you could pretty much double-spend; you could rewrite history. And the second design is one that allows a denial-of-service attack, so it freezes, destroys the whole chain, and it's also trivially executable. Like, any user... oh, sorry, not any user; it has to be someone who creates these other blocks, but pretty much anyone, just single, you don't need some majority or anything.

55:54Anyone who is capable of producing these alternative blocks of this altcoin is able to pull off this attack. You need to produce just one... oh, sorry, maybe two. But if you can produce two such blocks, then you can pull off this attack, and basically it's destroyed. So you cannot really increase the Bitcoin block size by doing this in a secure way. I'm sorry, it's impossible. And I was actually reading it, but didn't finish the article, but, yeah, I analyzed it and it doesn't work; it's impossible. So this doesn't work, but extension blocks are effectively a block size increase in a soft-fork way.

56:49So the only thing that I like about extension blocks is that if we agree that it's a good time to increase the block size, then we can do it via soft fork. That's, like, the only one. And Mimblewimble is kind of interesting, but to my knowledge, like, the space savings aren't that huge compared to Lightning, let's say. I mean, it could happen one day that it would be deployed. I guess I wouldn't mind too much, but I'm not sure about all the implications. It does improve privacy, but effectively it only improves the privacy in the way CoinJoin does. Because, like, the inputs are joined, but then, if you have an active attacker, then you can trivially decouple them.

57:46So there needs to be some protocol that is similar to this Chaumian eCash stuff, like Wasabi uses, to, like, securely mix the inputs and outputs, and this needs to be used instead of the naive implementation in Mimblewimble to be actually secure. And that's another thing that makes it kind of problematic. But yeah, it's kind of interesting. And the other problem is that it adds some... someone called it rocket science cryptography, like more difficult cryptography, to the chain. Although this one isn't that crazy, I think, so maybe it's not too bad. But yeah, it's a nuanced topic. But I think, like, currently the Bitcoin block size is pretty big.

58:42I'm not that convinced that we should try to lower it yet, because, like, I think what is really... like, the main reasoning behind lowering the block size is that the UX of running a full node is worse. But from my experience, there is something completely different that causes people to not run nodes, and that is simply... it's either a lack of education, why they should run it, or it's just the UX of, like, installing software and setting it up, and stuff like this. This is much more... like, this is a much bigger barrier for people than, like, paying a few bucks for a bigger hard drive or better internet or something.

59:39Like, this is incomparable. And I say this as someone who, like, spent a lot of time in Paralelná Polis Bratislava, where I observed firsthand what newbies do when they try to interact with bitcoins, various people. So, like, many developers are in this bubble where they imagine that everyone knows, like, how to calculate elliptic curves on paper or something, like, to use some hyperbola. Basically, everyone, like, feels that setting up stuff is easy, and then just people don't do it because it's expensive, which is absolutely not the case. And I saw so many things... like, I made a talk about it several years ago.

1:00:33Like, how UX affects people and stuff. And I witnessed it firsthand. I helped these people to resolve their issues, and I know that this is a much, much bigger barrier than just having a few more bucks. So I'm not convinced that this is the main reason. So I would be convinced if, like, there was a good, like, wide variety of Bitcoin software that you can set up very easily, good education programs, good sources that would really explain why to do it, maybe some optimization on storage. Like, storage is ironically a pretty frequent complaint. It's not much about bandwidth or something, but people just don't have a large enough drive, and, yeah, people don't understand that they can do pruning, so this enabled path.

1:01:33Also, like, until recently, most software was incapable of running on a pruned bitcoind. So that's also a problem. Like, if you have something like Electrum Rust... or, until recently, LND was unable to run with a pruned bitcoind. Oh, well, it could run, but it was kind of dangerous. So these problems should be solved first. But until these problems are solved, and I hear, like, many people saying, "Okay, I would really like to run a node, I would know how to do it, but unfortunately I can't afford to spend more CPU time on this," or something, then we should probably lower the size.

1:02:24But I also think that we shouldn't increase it more, because it's not really needed, and we should more focus on optimizations. We should have, finally, like, Lightning on Taproot implemented at some point. We should have channel factories and other similar ideas. And if, like, every idea is implemented and it's still not enough... this is the thing, like, who knows, maybe a combination of Lightning, channel factories, and a few other things will be enough, just with four-megabyte blocks. Who knows? And if we find out that it's still not enough, and the hardware also is good enough that we could afford to increase the block size, then I think the way to do it is by extension blocks; it's better than a hard fork.

1:03:21Or if hard fork, then maybe consider coupling it with the time overflow fixing one. But I still would probably prefer a soft fork. So that's the only reasonable way to do it, I think.

1:03:41Vlad CosteaLet me take a step back and ask you this, because you have been in Bitcoin for quite a few years. You've worked on a lot of projects. As you mentioned, you realize that you've done everything that you wanted to do in a few of them. You fixed the bugs; you feel like there's nothing else for you to make contributions for. So what keeps you excited about Bitcoin? What makes you get out of bed every morning and say, "Yeah, today I'm gonna work on this project"? What is it? What's your motivation?

1:04:10Martin HabovštiakLiberty, basically. So yeah, I'm a voluntarist, among other things. So I think that people should be free to transact with anyone. And also, I come from Slovakia, which is a country that was plagued by communist propaganda and the communist regime for, I think, like, 40 years or something like that. And we had this tradition... like, there were ways to bypass the system. Like, my most favorite one was, like, smuggling books. Like, there were literally people who took a hike over, like, the highest mountains in Slovakia just to smuggle books, secretly, of course. And doing, like, Tor or other cryptographic software is basically equivalent to smuggling information, like, in a more efficient way, in a way that is more accessible.

1:05:14You can smuggle information much more easily than before; like, before, you had to, like, take a hike. And this is kind of interesting, because people say, like, "Ah, Bitcoin is too difficult to use," and stuff. But people literally took a hike over, like, the largest mountains just to smuggle books before, and now people are complaining that they need to click three times on their phones. It is insane. So that's, like, kind of... like, from this historical perspective, I totally understand. And yeah, communism, like, destroyed so many lives here. It tortured people to death, literally. I'm not kidding. Like, they often released the people before they died, so that it doesn't look like it.

1:06:06But, sorry, it's pretty obvious that these people had, like, a much shorter lifespan because of torture. So there were, like, people horribly tortured. I don't wish it to anyone.

1:06:19Vlad CosteaAnd I come from Romania, so I know.

1:06:21Martin HabovštiakYeah, so it's absolutely horrible, and I don't want this to ever happen again. And the big part of why it can happen is, like, governments existing, basically, and they are, like, vulnerable to this takeover by communist regimes, or other ideologues, of course, because, like, not only communism is problematic. And the other part of smuggling information is, of course, smuggling money, because the free market helps people. And if we want to have tools to smuggle money, then we need to build them, of course. And this is a protection against these situations. And I'm convinced that any way that in the past people could bypass government under these regimes helped them tremendously.

1:07:15So I think that by helping them even more with Bitcoin and other privacy tech, we can help even more. So that's the main motivation for me.

1:07:28Ad voiceoverShopinBit is the online store where you can buy anything with your bitcoin. Choose between more than 800,000 products, book flights and hotels, and order everything else through the concierge service. With ShopinBit, you can buy your weekly groceries, get the latest iPhone, upgrade your computer, buy something sexy for your new girlfriend, book a trip to El Salvador through the travel hacking service, and also grab a copy of the latest Bitcoin Takeover Magazine to read in the airplane. Everything is integrated with a familiar shopping experience that doesn't track you and deletes your data after the order gets completed. You also get a 3% discount if you pay in bitcoin. Try ShopinBit today and use promo code BTCTKVR for a five-euro discount on your first order.

1:08:15Vlad CosteaRight, so how can people follow you and your work? Do you have a social media presence? Do you have a GitHub where people can check out your projects?

1:08:24Martin HabovštiakYes, I did use Twitter, and I stopped using it, because it was messing with my head. And, you know, like, it's better to waste time arguing about technical stuff on GitHub than on Twitter. So that's way better. So I mainly use GitHub. The nickname is Kixunil, K-I-X-U-N-I-L.

1:08:57Vlad CosteaOkay, that's a specific name.

1:09:00Martin HabovštiakSo, yeah, I'm co-maintainer of Rust Bitcoin, so if you don't want to type it, just type rust-bitcoin.org, and then you can click on the GitHub button, and then you will eventually arrive at me. So that's the way to follow my work on GitHub. And I think I have published an email somewhere, so if someone wants something more specific, it's possible to write me an email.

1:09:31Vlad CosteaYeah, the other podcasters who steal my guests, you can email him afterwards, but after I publish this episode, so I got the ideas first. Good luck doing better than me. Anyway, thank you very much, Martin. This was incredible. I found out a lot of information from you today. And I hope that everyone who listened to this got a bit richer in terms of understanding Bitcoin. And best of luck with everything that you do. You develop a lot of projects, and you seem driven to keep going.

1:10:01Martin HabovštiakThank you a lot.

1:10:04Ad voiceoverThank you for listening. Make sure you subscribe, leave a comment, and like this episode.

1:10:04================================================================================ Production notes: CORRECTED. In-person interview recorded at Pizza Day 2023 in Prague, in the Paralelní Polis studio. Base: the pipeline's NanoGPT Whisper-Large-V3 transcript with automatic speaker diarization, which was badly damaged in this episode: about a dozen stretches were replaced by hallucinated filler ("The show is brought to you by the Russian-American community" (three times), "The following is a story about a man who was tortured to death by a woman", "The video was made by the company "Bitcoin.D"", "See more on: www.videosubtitling.com", "Episode:" prompt leaks, stray "Thank you."); that speech was restored from the audio (among others the non-custodial contract passage around 18:16-21:00, the Pedersen commitments/Bulletproofs passage at 39:23, the Ordinals question and answer at 41:35-43:00, the merge-mining security argument at 54:05-56:00, the pruning and extension-block passages at 1:01:33-1:02:24, and the communist-era passage at 1:05:14-1:06:21). Local Whisper was not used because the box never had more than 6 GB of RAM free (another transcription job was running). Instead the whole episode was re-transcribed locally with NVIDIA Parakeet-TDT-0.6B-v2 (int8, sherpa-onnx; not Whisper), which became the main text, reconciled sentence by sentence against the Large-V3 transcript; disputed spots were re-decoded a third time with NVIDIA Canary-180M-Flash (int8, sherpa-onnx) and the majority reading kept. No other transcript of this episode exists on the box, and YouTube captions could not be fetched (YouTube bot check). Speakers were checked with a full-episode local TitaNet speaker-embedding scan (1.5 s windows, 0.5 s hop; Vlad's pipeline voice print matched at 0.81), Viterbi-smoothed, plus per-word checks at short interjections; turns merged by the diarizer were split, Vlad's "and I come from Romania, so I know" (1:06:19) was separated, and sponsor reads are labelled "Ad voiceover" (intro, Wasabi Wallet 17:04, Cryptosteel 32:10, Satodime 49:49, ShopinBit 1:07:28, outro). Names and jargon fixed against the show notes, the episode article and the web: Habovštiak/Kixunil (spelled out at 1:08:24), Paralelní Polis / Paralelná Polis (Bratislava, Košice), Sodomak, Václav Benda, Firefish, BlockFi, Electrs/Electrum Rust, Rust Bitcoin, Andrew Poelstra, Tobin Harding, Cryptoanarchy Debian Repository, BTCPay Server payjoin, LND/Loop, BTC RPC Explorer, Heartbleed, Pedersen commitments, Bulletproofs, channel factories, anchors, CPFP, assumevalid, Ordisrespector, Paul Sztorc, drivechains, Liquid, Mimblewimble extension blocks, Chaumian coinjoin. Martin is a non-native English speaker; his phrasing is kept, with fillers, stutters and false starts trimmed. Remaining doubts are marked ....

← Back to the episode · All transcripts · Ask the Archive

0:000:00