#2 - The Summer of Bitcoin Experience
Sneak peek into two of the most popular Lightning Node implementations, chat with SOB 2022 intern Sivaram Dhakshinamoorthy on his bitcoin dev journey and best bitcoin jobs for freshers!
Hello Summer of Bitcoiner!
The development on Lightning Network (second layer payments solution on bitcoin) has been buzzing for a while and 2023 sure looks to be a promising year for LN! However, a beginner to this space might wonder where do they start their development journey on Lightning. We break down two of the most popular lightning node implementations below:
The Lightning Network Protocol is based on BOLTs (Basis of Lightning Technologies). However, there are multiple implementations with pros & cons.
The two of the most popular LN node implementations are:
Lightning Network Daemon (LND)
Core Lightning (CLN)
Lightning Network Daemon (LND) by Lightning Labs
More popular among developers
Written in GO
B/w Oct 22 - Nov 22, 2022: 24 contributing developers, 43 issues resolved
LND has easy-to-read guides, articles, example applications & community resources.
Has an RPC-API that enables the user to customize some of the functionalities mentioned above, though it’s hard to customize the same way as CLN without rewriting and recompiling the source code.
Finds the shortest path between sender & receiver. Better payment success rate than CLN. However, there’s a risk of reduced privacy.
Uses 'Pool' - enables blind auction marketplace that matches nodes looking for liquidity with providers.
For channel recovery, uses 'Static Channel Backups' (SCBs). Recommends keeping regular backup of 'channels.db' file.
LND is written in Go, a language that has a fast growing dev community but is not as “lightweight” as C.
Core Lightning (CLN) by Blockstream
First implementation of the Lightning Network
Written in C
B/w Oct 22 - Nov 22, 2022: 8 contributing developers, 11 issues resolved
CLN's documentation is more technical & developer-focused.
Developers can write and publish their own plugins for payments, rebalancing, probing, dynamic fee adjusting etc., while swapping out the defaults.
Uses route randomization & shadow routes to preserve users’ privacy. Susceptible to failure & expensive fee while routing payments.
Uses 'Liquidity Ads' - advertises liquidity over the Lightning Network using the gossip protocol.
'hsm_secret' created by default. Multiple backup strategies available.
CLN is "lightweight" compared to LND as the former is written in C programming language and is aimed at hardware performance.
Read more about CLN & LND by Lorenzo, here.
Interview with Sivaram Dhakshinamoorthy
We spoke with Sivaram Dhakshinamoorthy, a 23-year old university student of Indian Institute of Technology, Kharagpur, India and a Summer of Bitcoin intern who contributed to libsecp256k1 - a library that pretty much powers the cryptography in bitcoin. Specifically, Sivaram worked on the schnorr batch verification interface. In simple terms, his work on batch verification would allow bitcoin nodes to verify digital signatures in batches instead of doing it one by one as they do today. This would make block validation, transaction verification and initial block downloads much faster. Sivaram also shares his advice on getting started with bitcoin open source development and tips for cracking Summer of Bitcoin.
Listen to the full conversation on Spotify here.
You can also watch a video of the conversation here.
Read the full transcript:
ADI SHANKARA: Hey Sivaram! Welcome to the Summer of Bitcoin Experience, do you want to give us a little bit of your introduction?
Sivaram Dhakshinamoorthy: Thanks for having me here. I am Sivaram, a final year undergraduate at IIT Kharagpur, from the Mathematics and Computing department. I had a chance to participate in Summer of Bitcoin twice. Once in 2021, again in 2022. It has been great and I am excited to talk more about it in the podcast.
SHANKARA: Alright. So let's start from the beginning, how did you stumble down the bitcoin rabbit hole? When was the first time you heard about it and what was your first impression?
Dhakshinamoorthy: The first time I heard about it, it was in the movies. So it was when COVID started in March 2020 I had a lot of time - I had been binge-watching TV series and movies. So I was watching this particular TV show called Silicon Valley. There’s a character named Gilfoyle, he sets some sort of alarm so that it rings when bitcoin goes below a certain price so he can stop mining and things like that. So that was the time when I first heard of bitcoin. Then I ignored it and moved on; I didn't think much about it. I thought it was sort of restricted to the Western world and I hadn’t seen many people talking about bitcoin in my friend circle.
SHANKARA: Alright, and then fast forward in 2021 - you may have come across Summer of Bitcoin - what was that like? Do you remember hearing about Summer of Bitcoin and what made you apply to the program?
Dhakshinamoorthy: In 2021, I was applying to all the open source programs. I was applying to GSOC, LFX and so many other programs. I got rejected at almost everything. I was also searching LinkedIn for future opportunities. I saw a post by someone about a new program called Summer of Bitcoin where students get paid a stipend in bitcoin. I thought it was a scam and I ignored it. After two days, I saw another person make another YouTube video about Summer of Bitcoin. Then I thought, maybe I should look into this and not completely ignore it. I went to the website, saw the mentor details and was convinced that this is happening. I applied after that.
SHANKARA: Before applying and after the Silicon Valley episode, had you heard about bitcoin in between, or was it just that instance when you first heard about it, and then you were applying to Summer of Bitcoin?
Dhakshinamoorthy: As I said, I was sort of applying to all the open source programs.The LFX one, I was applying for something called a hyperledger - that is also a blockchain technology. But that was the first time I sort of started reading more about blockchains. At that time, I read about hyperledger as sort of this private blockchain and bitcoin as a public blockchain and most of the articles that I read were sort of negative on bitcoin because it’s some kind of public blockchain and so many people can see it, companies cannot use it etc. So I sort of knew what bitcoin was a little bit but it was just like an overall picture, nothing more.
SHANKARA: Alright. So let's go further into your Summer of Bitcoin application process. So then you apply..what happens next?
Dhakshinamoorthy: By 2022 I think the process was standardized. 2021 was completely different, to be honest, but I'll just explain the year 2022 - so it usually starts around January. The Summer of Bitcoin applications open. Once you go to their website, you register with your university email id and you will get a coding challenge. That's like the first round. It happens on the InterviewBit platform. You will be given two questions and you will have a one hour time limit to solve them. I didn’t attempt it since I was already a Summer of Bitcoin intern last year, I was allowed to skip this round. When I talked with my friends, they said that it was similar to LeetCode, medium range questions. And once you get through this round, you will be added to the discord group. And in the discord group, there will be like so many people present. There'll be mentors, previous year interns, the applicants who are applying along with you. And the discord group was so much fun! So many things were happening at that time, we would read about bitcoin together for a week or two.
And there’s a lot going on, you can reach out to the mentors of the projects you are aiming for. So once this gets done, the second round will start around mid-February. Summer of Bitcoin will release the list of organizations that are participating this year. And under each organization, there will be some project ideas. You have to pick a project idea and write a proposal - how you will solve it, how you're the best person to solve it. Maybe you have previous experience that you can mention. You could write something like a proof of concept, add it to the proposal. You basically have to convince the mentor that you are the best among other people who are able to complete the project. And once you submit your proposal, you can just pray to God and hope that you get selected. I think the results will come by April.
SHANKARA: So before we step into the project that you chose, whether it was last year in 2021, or this year in 2022. Let's touch a bit on bitcoin itself. You've participated two times in the Summer of Bitcoin. Your first introduction was from an episode on a TV show, and meanwhile, you had heard about blockchains in general and other blockchains as well. Having understood all of that and being in space for quite a while now, what do you feel about bitcoin? Why is it important and worth paying attention to?
Dhakshinamoorthy: There are some things that I started to observe. So I started with Summer of Bitcoin in 2021. It has been almost like 1.3 years till now. And the things I've read are majorly about inflation. One of the things that I read about was somewhere in an African country, their government didn't really function properly. They didn't do their economic reforms well. So if a tea today costs 500 (whatever the currency unit is), by next week, it will be 1000. It basically doubles, so your money is sort of degrading and losing its value. So I felt that is a little unfair, because people put a lot of effort into earning money.
To me, money basically represents their life force, because it's their time that they cannot get back. And just because few people at the top are not capable enough to run a country, they are literally losing their life force. Bitcoin provides a sound, incorruptible platform to store your money, time or life force, whatever you may want to call it and that was like the one that pulled me towards bitcoin. It started happening more frequently than I imagined - Sri Lanka also went through a major crisis recently. There’s this Russia-Ukraine War, where bitcoin was talked about. You know, whenever there is a major government involved like in some way, bitcoin comes into the picture.
SHANKARA: Right. It's beautiful. I mean, the way you put it, that bitcoin essentially preserves your life force. And on the other hand, we have fiat currency, where it's controlled, manipulated and owned by a handful of individuals who are likely unelected. And, because of perhaps the corruption that creeps in or just their own incapability, it's the common people that have to suffer because of the mistakes they make in managing the fiat currency. And on the other hand, you've got bitcoin which is governed by the laws of the universe, primarily mathematics and physics. And it is something that is decentralized so it's not controlled or manipulated by any handful of individuals or even companies. And its rules are fixed, you cannot change it, you cannot manipulate or modify it. So that gives people certainty, that gives people a certain medium, a stable medium to preserve their life force in - which is where the promise for bitcoin is.
Now on one hand, like we've got bitcoin, but then there's also so much noise in the ecosystem with so many different blockchains and tokens and what not. Do you have any opinions on others and how do you separate bitcoin from the rest?
Dhakshinamoorthy: I think other than bitcoin, none of them are decentralized. They just use bitcoin as their promotional stunt or whatever and try to scam people. Whenever I talk with my friends, they think that bitcoin and ethereum are similar just because one is called bitcoin and something else is called some other coin - just because the word coin is added after something doesn't mean they're structurally same. People aren't aware about this. I think that is one of the major issues.
SHANKARA: Right. It's an interesting point. I think all the other coins out there are, as you said, perhaps not so decentralized as they claim to be. And so in that sense, they are very much like securities or stocks, as we call them. If you're buying a token or a coin, you're essentially buying a stock of the company and so you have to understand what that company does. What's the use case or service they're providing and whether there is any value to that particular token or stock for it to be a good investment. On the other hand, bitcoin is not a stock, it's not a company. There is no business plan. The only problem that it tries to solve is that of being good money. That is it. That's probably the main distinction between bitcoin and everything else in the space.
Alright, I guess we can switch to Summer Of Bitcoin. Could you tell us what project you worked on last year in 2021? And this year, was it the same organization or different?
Dhakshinamoorthy: It was the same organization and the organization name is libsecp256k1 - it's a C library that is used by bitcoin for all those elliptic curve cryptographic operations.
Since bitcoin is like a decentralized application, you can't really use passwords to prove your authenticity. For example, if you're logging into your Facebook account, you provide your password and they will know that they are the right person. But in the case of bitcoin, you can't do that. Because if you give some sort of password thing, everyone will know about it and they can imitate you. Bitcoin uses a public-key cryptography system to authenticate that you are the right person and you know, this key belongs to a certain someone. So those public-key cryptographic operations are implemented through libsecp. So whenever Bitcoin wants to, create a public key or sign a transaction, it calls this library and this library does that and returns things.
SHANKARA: So what made you choose libsecp256k1 as an organization to contribute towards?
Dhakshinamoorthy: So when I first did Summer of Bitcoin, I had completed my third year and that last semester I had a course called Modern Algebra, since I am a math student. There were topics like full abstract math, group theory, ring theory and so many other things. It was very interesting and I thought this was probably going to be another “not-so-useful” course that I'm going to forget in a year and start applying for programming jobs and things like that. When I saw libsecp, it had lots of this modern algebra group theory stuff - I was surprised to see the applications of it. And since then, I've been involved more and more and I've also started appreciating math more than what I did in my first year. It was always that computer science came in first and math came in second. But I've come to realize this isn’t the case.
SHANKARA: Tell us more about the specific project ideas that you worked on in both your summers with Summer of Bitcoin.
Dhakshinamoorthy: So in the first Summer of Bitcoin, libsecp, at least to me, was hard to understand. I think the first Summer of Bitcoin was only 2.5 months and there was a lot of learning involved. It was more focused around learning than the project implementation. I was only able to make small changes. It was mostly fixing small bugs and stuff like printing benchmarks. In the next Summer of Bitcoin, I saw this project idea called batch verification interface. After seeing it, I was surprised that people allowed students to work on it. I thought maybe this involves consensus and stuff, and they won't be willing to give it to a student. Once I saw that idea, I already had an internship offer from a company - I just mailed them saying I wouldn't be able to do it. And I was like, I'm going to apply for this project idea. I applied and luckily got selected. Do you want me to talk more about the idea?
SHANKARA: Absolutely. Let's go ahead. Let's understand what batch verification interface means and why it is an important deal and what are the benefits?
Dhakshinamoorthy: Let's say I want to send maybe 0.2 bitcoin to Adi - I will make a request on my phone. Maybe I have an app or something. I'll put Adi’s address and send 0.2 bitcoin to him. So what happens is that I will create a transaction and that will be sent to all the bitcoin nodes. The node has to verify each and every transaction; it has to literally look through - let's say there are 5000 transactions - there is a for loop that goes through each and every transaction and calls the Verify function. If it’s valid, the transaction will be added. But with batch verify, what you can do is - you can put all those 500 or 5000 transactions into the batch verify function and that will return if all of them are valid, it will just return with a confirmation saying everything is true, and vice-versa. It speeds up the block validation process.
And one more advantage is, when you're first joining a bitcoin network, your computer has to download the whole bitcoin blockchain - right now it's very huge. When I tried to Google and see like how much time it takes, it's like, if you have 2MB per second internet connection speed, it takes like 20 hours to download the whole blockchain but in practice it probably is going to take more and maybe after maybe like 10 years and people sort of move to schnorr signature and batch verification - once this verification process speeds up, this time will reduce. It makes the verification process faster than the normal one.
SHANKARA: Amazing! So if I may summarize, every time a node receives a set of transactions from the mempool, which is where all the transactions are broadcasted and collected from; a node will be able to essentially verify and validate those transactions in batches as opposed to what is happening today where they have to validate it one by one.
And even when you are downloading the bitcoin blockchain for the first time, if you're running a node, then you have to essentially start from the first block, the first transaction that Satoshi created and then validate all the subsequent transactions till the present moment. And batch verification - the project that you are helping with will allow for those nodes to verify and validate those transactions much more quickly because now they will be doing it in batches.
Dhakshinamoorthy: Yes, exactly. One issue with verifying the transactions from starting to end is that most of the transaction signatures that are in bitcoin blockchain are ECDSA. This batch verification works only on the schnorr signatures that were recently introduced. I think it was activated last November. So this speed up process will probably take a few decades, I guess, and people should start using schnorr. Even right now, only segwit is popular; taproot isn't - not many people are using taproot.
SHANKARA: So for those of you who may be hearing schnorr, taproot and all these terms for the first time, they're just different address types. And using different cryptography for receiving or sending bitcoin. Batch verification works on just a new type of signatures or addresses that are enabled through what are called schnorr signatures.
For batch verification to have a massive impact, we need a lot more people using bitcoin to be using taproot addresses that are based on schnorr signatures.
Alright, so tell us about your mentor. You worked with your mentor two times, how was your experience working with him?
Dhakshinamoorthy: Yeah, I have worked with two different people. So I had different mentors for both Summer of Bitcoin. And, most Summer of Bitcoin people that I meet, they are unbelievably helpful. I literally can't believe they are willing to help this much! For example, my 2021 mentor was Jesse Posner. I knew zero cryptography, I was making very little progress in Summer of Bitcoin, and he was helping me and teaching me cryptography terms (the basics and stuff) and once Summer of Bitcoin ended, I knew that I didn't make much contributions. So I asked him, would you be able to help me further? I know the Summer of Bitcoin has ended, but if you're willing, would you be able to help me? He was happy to do that too! To this day, I have bi-weekly meetings with my mentor, Jesse. It’s been 1.3 years and we still meet twice a week and you know, talk about Bitcoin, talk about the stuff that he's working on, I'm working on and what my plans are after I graduate etc.
For 2022, I had a mentor - Jonas Nick. Jonas is very, very good. If you have some doubt or something - for instance I'll be stuck at a few things for two or three days and not be able to do what to do. And he'll come to the meeting and he'll solve the issues in like 5-10 minutes. And one thing that stood out was; once I implemented the batch verification - it was slower than the normal one!
It was supposed to be faster, but I didn't know what to do. I thought my whole project was gone, It's unsalvageable! But he came in and did some optimizations and worked on it for like 10-15 minutes and instantly, it became 20-30% faster. People are very talented, and they are very, very helpful. And even for my final year master's theses, they gave me some ideas that I could work on. So I think even though Summer of Bitcoin is like a program to connect you with bitcoin, it's not like once Summer of Bitcoin is over, you will lose contact with your mentor.
SHANKARA: That's awesome! So, Sivaram, what are your plans now? What are you working on currently? And how do you think about your future contributions to bitcoin?
Dhakshinamoorthy: I’m working on something called hacspec implementation for frost. Since I’m in my final year, I can work on a project for half credits or something so I thought, you know, I will be doing a bitcoin project called frost hacspec implementation. Frost is like a multi signature scheme where - I don't want to explain multi signature right now completely - what it usually does is like if three people want to own a bitcoin together, they create each and every key for it separately, they sign it and add it up but in frost, you have a single key that is divided between people. It is basically like a new way to do multi signatures and implementing that in hacspec will give you a proof..
For example, whenever something new is coming into bitcoin, you have to write something called a BIP. BIP is called the Bitcoin Improvement Proposal, and that would be sent around to the community. Everyone will review it and if it gets enough support, it will get implemented. In these BIPS, usually the algorithms will have pseudocode. And the issue with this is you can't really test the pseudocode and people might misunderstand the pseudocode while implementing their own version. So if you implement it in hacspec, it will have a very proper definition for this pseudocode and you can literally convert it to a different language and prove that the signing algorithms are true. So this gives more security and makes it a bit less error prone when other people are looking at it and implementing.
SHANKARA: Interesting. Is there anything else that you're excited about bitcoin? Maybe at the technical level or some technical development that's coming up.
Dhakshinamoorthy: I've been interested in Chaumian mint - the Fedimint project - for a long time. I'm excited about how that is going to play out - I just follow their progress for now. Whenever there’s news or things that come up, I kind of keep an eye on that.
I also heard that the Frost BIP is in the first draft; my mentor Jesse Posner has written a first draft for Frost BIP. I'm looking forward to reading more about it.
SHANKARA: Nice. Let’s wrap up this conversation with what advice would you give to beginner developers or your batchmates who have joined us today?
How do they get started with bitcoin? What are the best resources to learn about it and how should they go about contributing to an open source bitcoin project?
Dhakshinamoorthy: I have collected a few resources. There’s this website called https://trybitcoin.satsie.dev/. It’s a 20 minute exercise that introduces you to bitcoin. I think this is a good way to get a feel of things and get a basic overview of the whole stuff. Once you do this, there is something called 21 days of bitcoin. It's a mailing list for the next 21 days, you'll get an email explaining some concepts of bitcoin. I used this when I joined the Summer of Bitcoin in 2021. And it really explained things. The explanations are really really good and very easy to understand.
And once you learn this stuff, there is one more video by three blue one brown, it’s a very good channel - if you're especially a math student. In the video, he dives deep into how bitcoin works - not on the complete technical level, but on the conceptual level, how the ledger functions etc.
Other than that, I think there is one more resource called learnmeabitcoin.com. I would say the first three resources that I gave would give you an overall idea; that would be enough for you to choose your own organization, look at the projects and things like that. Once you have chosen a project, you have to go deeper into a specific portion of bitcoin that is related to your project. Maybe it can be wallets or it can be about the signatures and script and so many things like that and learnmeabitcoin has all these sections. You can go into the relevant section and try to learn more about it. And yeah, and also the twitter account of Summer of Bitcoin - they post a lot of things for beginners. I've seen so many posts that are helpful, so we can also follow that.
SHANKARA: Alright, and if people want to follow you and your work, what's the best place to follow that?
Dhakshinamoorthy: Yeah, I am active on Twitter. I go by the handle @siv2r on Twitter. Twitter is the only place where I’m active. GitHub too, but it mostly has my code. I also have this newsletter on substack. I tried to document my process, some of it - week one and week two, but unfortunately I have written only about the first two weeks and the later weeks I sort of have it in my material. I will probably publish it around December when I get vacation. So that will be helpful for the people to start. But yeah, in these two places you can find my blogs and the work that I've been doing.
SHANKARA: Thank you Sivaram for joining us today and sharing your experience with Summer of Bitcoin.
Dhakshinamoorthy: Thank you so much for inviting me. It has been a pleasure talking with you after a long time!
JOBS IN BITCOIN
If you are a fresher straight out of college, here are a few exciting job postings we recommend:
Engineering:
NodeJS Engineer | Synonym | Remote | Apply
Frontend Engineer | Vulpem Ventures | Remote | Apply
Lightning Protocol Engineer | Lucent Labs | Remote | Apply
Full Stack Engineer | Lucent Labs | Remote | Apply
Frontend Engineer | Geyser | Remote | Apply
Front End Developer | Foreman | Remote | Apply
Data Engineer | Foreman | Remote | Apply
Full Stack Developer | Foreman | Remote | Apply
Software Engineer (Fixed Project) | Joltz | Remote | Apply
UX & Frontend Coder | plebeian.technology | Remote | Apply
React Native Developer | Zion | Austin, TX, USA | Apply
Software Engineer, Backend | Strike | Remote | Apply
Frontend Engineer | Alby | Remote | Apply
Backend Developer | Nordblock | Remote | Apply
Software Development Engineer in Test | Noah | Remote | Apply
Design:
UX Designer | Coinbits | Remote | Apply