Modular Blockchains with Celestia
Listen Now
About This Episode
In this episode of DevNTell, Narb welcomes Josh Stein from Celestia Labs to discuss the revolutionary concept of modular blockchains. Josh explains how Celestia is breaking the traditional monolithic blockchain model into separate, specialized layers: execution, settlement, consensus, and data availability. This modular approach allows for greater scalability, flexibility, and shared security without the heavy resource requirements of full nodes. Josh also gives a live demonstration of how easily a light node can be run on basic devices, like a cell phone or computer, proving the accessibility of Celestia's technology.
Key Takeaways
Modular blockchains decouple core functions (execution, settlement, consensus, and data availability), allowing for better optimization and scalability compared to monolithic blockchains.
Celestia is a specialized modular blockchain that focuses on data availability and consensus, enabling other blockchains (rollups) to build on top of it on their own terms.
Light nodes in the Celestia network can verify the entire block with high security by only downloading about 1% of the data, thanks to a process called data availability sampling (DAS).
Running a light node on Celestia is accessible to a wider audience, as it can be operated on low-resource devices like a cell phone or a Raspberry Pi.
Modular blockchains provide 'shared security,' meaning new chains don't need to bootstrap their own validator sets and can instead inherit security from a base layer like Celestia.
Featured Guest
Josh Stein
DevRel @ Celestia
Timestamps(click to jump)
Episode Transcript
Read full transcriptHide transcript
All right, we're live. GM, GA, GE everybody. Welcome to what's going to be another great DevNTell. So if you didn't know, DevNTell is a 30-minute window for builders to showcase something they're passionate about or have been working on in Web3. This could be an awesome project they're working on, demonstrating new testing best practices, automation goodies, smart contracts, how to structure a project, etc. Basically, if you've got a passion for something, this is your opportunity to share it with the community.
And I am ecstatic to welcome D-D legend Josh Stein to DevNTell. Welcome, Josh. Pleasure to have you on, buddy.
Yeah, thank you, Narb. Thanks for having me. I'm excited to be here and excited to talk about modular blockchains and then we'll get into the light nodes that you might have seen on Twitter recently in the past few weeks.
I've got to open with this: how many light nodes have you installed in random places?
So I've mainly just run it on my computer, but I would say that the coolest low-resource devices that I've put them on are a Raspberry Pi—it's a Model 4B, I think. I actually have that running right now. And then I have one running on a Pixel 3 XL, which is a few years old, but I actually have one running right now on my cell phone.
So yeah, we're going to go over this—this is going to be the portable one that I take to new places—but we'll be going over how to install that at the end of the DevNTell for those who are interested.
Beauty, beauty. And I guess before we get into it, for those that may be watching and aren't familiar with you or your work, you want to give a brief intro about yourself and how you found yourself in the DAO now?
Yeah, I guess it kind of does go back to Developer DAO. I was finished with business school, kind of looking for work. I knew I wanted to end up in the software world somehow, or tech in general, and I stumbled across Developer DAO on Twitter. I'd kind of been getting my feet wet, dipping my toes in the NFT talk for a while, and ultimately Developer DAO is what helped me find my way to my first front-end contract. And then I actually worked with buildspace very briefly before I went to work with Ankr last year. So yeah, I kind of stay in the developer advocate realm. I do a lot of work with the engineers, but also with the front-facing things like this.
So yeah, I just really enjoy playing around with new technologies and new toys and learning about new things. Shiny object syndrome sometimes, I guess.
Yes, we all have that from time to time. It's always fun. That's awesome. Yeah, I guess do you want to get right into it?
Yep, let's get started.
And just to say you're getting lots of love in the comments here.
Oh, nice. Yeah, it's great to see everyone's chats. So yeah, let's get started. I want to make sure we have enough time to run a node at the end. So I'll be presenting today on modular blockchains. Generally, we're going to be talking about Celestia and we'll get into it.
So yeah, I'm a Solutions Engineer at Celestia Labs, and Celestia is a modular data availability layer-one blockchain. As I mentioned, I was at Ankr and buildspace before as a developer advocate and teaching assistant. I am a GM emoji stan. I love the little rainbow emoji that we have in Developer DAO. I don't know where it came from, but it's amazing. And yeah, Developer DAO is kind of what got me started on this path.
First things first, I want to kind of talk about the elephant that might be in the room. You might have seen on Twitter recently these people running light nodes in weird places on weird devices. And that's kind of the core concept that we're going to talk about today and that's what makes Celestia possible. I guess it is fun to point out on the right side we have a light node running on an e-book reader, so it's using a Paperwhite screen and very low resource requirements compared to what we recommend.
Going over the agenda a little bit, we're going to cover what a modular blockchain is, we're going to cover what Celestia is, and at the end we're going to run our own light node.
So first, what is a modular blockchain? It seems like a buzzword—it might be a buzzword—but what does it actually mean? A modular blockchain is a blockchain that decouples the core functions of a blockchain, which are execution, settlement, consensus, and data availability.
And basically another way to think about that is with the OSI model for software development. You don't necessarily bundle all of the complicated pieces together because if you do, it would result in a lot of bottlenecks, and that's pretty much what we're doing with this idea of modular blockchains.
So first, what is a modular blockchain? Again, taking a step back, we have the monolithic era, as we call it, and this is where execution and consensus are coupled together. Then we have the modular software era, where execution and consensus are decoupled at the software level. This could mean different layer ones that are isolated, they have their own validator sets, so still, this is something that requires a lot of resources to start your own chain. And now in the modular blockchain era, our vision at Celestia Labs and for the Celestia blockchain is to have a world where anyone can launch their own blockchain without having to set up a validator set and do all the social coordination and have all the resource requirements that come along with that. So basically, we're breaking apart the stack so that you can plug and play and mix things up to best fit your use case.
We won't go too deep in the weeds here, but this basically allows people to build different types of rollups, and what this does is allows folks to specialize each layer depending on what they want this to be used for. So you could actually have something that settles on Ethereum, uses Ethereum consensus, but instead of posting call data to Ethereum, it would post data to Celestia. There's also a case where you can have a sovereign rollup, which would basically be your own execution and settlement environment. You have nothing else that's constraining it, and that's kind of the beauty of what this is allowing people to do.
We can kind of also think about the modular blockchain stack similarly to the progression of computing. The Web2 cloud stack basically uses large data centers, but in the Web3 modular stack, what we're building is a global data network that allows more people to participate by allowing them to use nodes with lower resource requirements.
So why Celestia? I guess like we need to reel it back in a little bit. So what Celestia is aiming to enable is anyone to quickly deploy a decentralized blockchain without having to deal with the overhead of bootstrapping a new consensus network. So that would be the shared security layer that we're talking about at the bottom of this graphic.
So what makes the light node so special? I feel like it's kind of important to go into that. There's two traditional types of blockchain nodes in the blockchains that we know today. A full node downloads and verifies all of the blockchain data, so it's downloading all of the transactions, making sure that all the state transitions are valid, and basically re-executing all of those. And that happens every block. So there's a higher barrier to entry because these full nodes require really large resource requirements, server-level sometimes. We know famously Bitcoin is something that requires a lot of compute power. And this results in a minority of users being able to actually have the same guarantees that the people running the full hardware do.
There's also a new concept now of a light node, where it only downloads block headers. Instead of downloading the entire block, it just verifies the headers because the block data has already been re-executed by the full nodes. So there's a lower barrier to entry and this allows more people to run nodes and to get the actual latest state of the chain. Say they want to check their balance—instead of talking to MetaMask and to some type of RPC provider, they would actually be able to run their own node and check their balance on their cell phone.
So that's a little bit far out, but it does work. This is another visualization of what different types of light clients do. In the Celestia light client, it's going to check the header and make sure the header's valid, and then it will also download a very small portion of the data from the body of the block and use something called erasure coding, which is basically a mathematical primitive to check that the data is there. And I'll get into that a little bit deeper in a second.
So first, I think it's important to go over the differences in data availability and data storage. Data availability is transaction data that's being verified for the first time. So you can think of this like the mempool in a sense where it's only the latest transactions on the latest block and what we need to do is gossip the transaction data in that block to all the other nodes and make sure that everyone in the network can access that data.
Now data storage is when you want to retrieve old transaction data. So this is transaction data that has already been verified, it's already been sampled, and usually this is something that is just different than data availability. We're going to have data storage for our old blocks, but making sure that the latest block information is available is the really important piece for what we're doing at Celestia Labs.
I guess like the big picture of what this all does—and one of the big reasons that I chose to work with Celestia Labs is because the modular vision... the pie-in-the-sky idea for the modular vision is that by allowing people to use lower resource requirements, this allows more people to participate in the network. The more people that participate in the network, the more little bits of the block that everyone can sample and the larger the blocks can grow. And this can happen without needing to increase resource requirements like we see in monolithic chains. So bigger blocks usually mean bigger servers, bigger hardware requirements, and fewer people actually running their own nodes.
So now we're going to get into data availability sampling or DASsing. You might see it like that in your node or online. Data availability sampling allows these light clients to have a really high probability guarantee that the entire block is valid by just downloading around 1% of the block. As I mentioned, this is made possible with something called erasure coding. If you've ever used a CD player or a DVD player and your disc is scratched, there's a good chance that it will still play to a certain degree. And that's using the same type of math.
I think a better example than CDs and DVDs is probably a QR code. So actually, if you take your phone or tablet and pull up your camera, you're going to see that both of these QR codes will take you to the same place. And that's because they're using erasure coding. So basically it's using some really complex polynomial math and is able to predict what the missing pieces are and only actually use a little bit of that data to reconstruct the entire truth, more or less.
So I feel like I went too deep into that, but if you want to go into it more yourself, I would suggest checking out these papers. The first would be LazyLedger, which is the original paper for Celestia blockchain, written by Mustafa Al-Bassam. And then the Fraud and Data Availability Proofs paper is about light clients specifically, and that's written by Mustafa, Alberto, Vitalik, and Ismail. And you can find those both online.
The benefits of building on a modular blockchain like Celestia: first, scalability—the network will grow as there are more nodes in the network. By using a common shared security layer, people can bridge between chains inheriting the same security from the security layer, whereas if there were different validator sets on both of these Chain A and Chain B, there was a little bit more trust assumptions that have to exist to bridge between those two chains because you're relying on different validator sets, so different security layers. And that's what shared security changes. Sovereignty is also a big one. This allows you to use whatever type of execution environment you want. This could be the Solana VM, this could be the EVM, could be MoveVM, could be Neon—so there's pretty much anything under the sun that you could do, and you can always come up with your own new configuration.
We're getting close to Q&A time, so I'm going to skip through this a little bit, but I will share this for after. This is basically an overview of kind of what the different security models look like. And this is a little bit of a visualization of what actually splitting the layers of the stack apart looks like.
So the big question: how can I run a light node? As I mentioned, I'm running it on a Raspberry Pi, I'm also running it on an old Android phone. So chances are if you are at a computer right now, you're going to have enough processing power, storage, basically the right specs to run a light node. And that's the whole goal of this. So if you're interested, what I'm going to do next is go through running these nodes. There's two different ways to do it, depends on what you're comfortable with. In the building from source, we will be downloading Golang and downloading the source code of Celestia node, building that with Go and then running the binary. If you're using a Docker image, you will need Docker installed on your computer and with one command line you can get a node up and running as long as you have Docker.
So yeah, I think now's a good time to take a break, answer some questions, and then we'll get into the demonstration.
Yeah, totals. Billy asked, 'How does Celestia differ from Fuel and Cosmos? What is their main selling point?'
Fuel is something that kind of falls in the execution and settlement category, so it would actually be something that can be used on top of something like Celestia. And then for Cosmos, Celestia is kind of the extension of the Cosmos vision. So in the modular software era, this is kind of what you can think of Cosmos as. So each one of these little Legos on the bottom with a different color is a different validator set. So every Cosmos chain actually needs to spin up their own validator set and basically create their own security layer. And in the Celestia vision, we're kind of isolating that security to Celestia so that everyone can share the same security rather than having to build their own. So yeah, they're similar but different—they're all kind of adjacent though.
Excellent. Phil asks, 'What are some prime examples of projects built on Celestia and why is using Celestia the best tech decision for that specific use case?'
The main goal of the Celestia blockchain is to allow people to be able to deploy their own blockchains—you can think of that as a rollup—without having to go through all of this same thing like setting up a Cosmos chain or creating your own L1. So yeah, the main type of use case here is someone who's building a rollup. And I would say like the type of projects that are really well suited for this are things like gaming, payments, social media, things like that that the person building the chain needs to really specialize what each layer does.
Great answer. And Turja asks, 'I forget if it was already mentioned, but what's the point of running a light node? What impact does it have? Do I need to run it for hours to have meaningful impact?'
The point of running a light node—like if you run a light node, you won't get anything out of it except for knowing that you're able to access the same data that someone running a full node would be able to do. From the actual user perspective, if you wanted to, let's say, run your own rollup, you could run a light node and use something called Rollkit or use the OP Stack. You can use the OP Stack to build on top of Celestia, you could also use something called Dymension or Sovereign Labs. So basically, if you want to go start your own chain right now, you can use a light node and on top of it you're able to send transactions and also retrieve data from the chain.
But the reason I'm on this slide is that basically the more light nodes there are in the network, the more nodes that there are sampling the data, and this allows the blocks to increase in size over time. But the device you're using for your light node will not need to grow in resource requirements. So yeah, Billy, basically you're right—it's so you don't have to depend on a third party like an RPC provider. Basically it allows you to run your own node without high resource requirements.
So I guess if there's no questions right now, we're going to go... yeah. So I'm going to go ahead and pull up on one side of my screen our docs and I'm going to pull up a terminal on the other side. I've actually gotten rid of Celestia and I've gotten rid of Go, so I'm ready to start fresh. The first thing we'll do is go to the run-a-node category and then I'll go to the light-node page. So in terms of hardware requirements, we recommend 2 gigabytes of RAM and a single-core CPU with at least 25 gigabytes of storage. I haven't seen mine go over like 10 gigabytes, but yeah, just to be safe, it's always good to have a little bit more storage so things don't shut down. For bandwidth, you don't need much. If you're on this call right now, you probably have enough bandwidth to run a light node.
First thing we'll do is make sure we select the right operating system. I'm not going to do this first set of commands because I'm not using Linux. If you don't have Homebrew installed, I'd recommend installing Homebrew on Mac, and this is going to basically give you a few package dependencies that you need to run the node. And I already have those installed. So we're going to install Golang. I'm just going to copy and paste. If you haven't installed it before, you'll also need to set the path and you might need to put your password in because it requires sudo access.
Now that I have Go downloaded and installed, I can run `go version` and see that I have Go 1.20.2 installed. The next thing I want to do is download Celestia node. I'm going to do the same thing, copy and paste it, and what we're doing is we're checking out at version 0.10.0. We're going to run `make build`, which is going to build the binary, and then we're going to install it, which sets the path correctly in our machine. And then the last step is making something called `cel-key`—this is the Celestia key utility that allows you to manage your keys.
So if all goes as planned, we're going to see a few warning errors, but this should be installed in a few seconds. And the next thing we'll need to do is initialize the light node. Basically what this does is it initializes a node store and that's going to be in our home directory. And it's also going to create a key for us. So if I copy this command, we're going to be running it on the Blockspace Race network. It's going to initialize a node store and it created a new key called `my-celes-key`. It will show you your public address and it will also give you a mnemonic that is something you don't want to post in a livestream.
Next thing we need to do is start the node. We do have some RPCs to choose from and those are basically just the places that you send transactions to. So I think we have a command handy in my terminal, so I'm going to just use that. So the core IP is the core node of the Celestia network that we're going to be communicating with. The gateway flag allows us to submit and retrieve things through our node, and the P2P network flag is for the Blockspace Race network. So we're just clarifying which network we want to run on.
Now it's trying to start. There admittedly is a little bit of a bug right now, so it just takes a second try. Hopefully just a second try. Our light node is running and we can see that since I wiped the entire node store, it's actually sampling all the old headers. I think the current height right now is probably in like 600,000 or so. So yeah, that's the beauty of running a Celestia light node. I guess I'll show off just real quick that I can check my balance on this node and I have 100 TIA on the Blockspace Race network in my wallet.
If we want to go a step further while we're here... never mind. I guess like caveat on these nodes right now is in order to post something and then retrieve it, the node actually has to be synced all the way. And right now I'm at a few percent of the entire state. So we'll save that for another day, but I do have a fun little tutorial on posting an SVG if you want to check that out as well.
Awesome. Yeah, definitely we can... we'll add it to the list of links on the YouTube description after the fact. But unfortunately, yeah, we've come at time. But Josh, this was excellent, man. Thank you so much for coming on and teaching us about modular blockchains. You're more than welcome to come back on if you want to do another speedrun of a full node.
Thanks for having me. My pleasure. But for the gang that's tuned in, here is your QR code to claim your mint kudos for being an attendee today. So you'll want to pull out your regular QR code scanner, scan this link, and you will have a time interval of one hour to claim your kudos for coming on the show today.
And with that, I just want to wish everybody a very happy Friday, happy long weekend to our friends in the States, and we will catch you back here next week.
Cheers. Bye.
Listen On
Share This Episode
Share on XWatch Episodes Live!
Subscribe to our event calendar and never miss a live episode.
View Event Calendar