Enabling Decentralized Networks With DePin and PoC

ETHCC 7 · 8 Jul 2024 · 18:10

Bernhard Borges explains how DePIN (decentralized physical infrastructure networks) can verify that providers truly commit hardware, focusing on cloudless compute with the Fluence protocol. He traces the DePIN name to a Messari vote and argues that supply must precede demand, so protocols need proof systems. Fluence's proof of capacity builds on RandomX, Monero's proof of work: each compute unit, a CPU core with 4 GB of RAM, mines hashes that are checked against expected submission rates, and must be staked to become active. He notes GPU proofs still lack an easy equivalent, so his team is building a new one.

Speakers

Topics

From ETHCC 7, hosted by Ethereum France.

Transcript

I'm here to talk a little about how to enable decentralized networks with uh DPIN and uh proof of capacity. And that's uh in general, but as well as in the context of uh cloudless compute with the Fluence Protocol. So most of you, I think probably are here because you heard D-Pin, and D Pin has a lot of uh hype still around it. And fundamentally, D Pin is actually uh a very, very recent or nascent terminology to describe a landscape that's been existing for quite some time, and basically the landscape that brings uh or the protocols, if you will, that bring physical infrastructure onto the blockchain to create decentralized physical infrastructure. And uh it used to be known as uh proof of physical work, uh incentivized physical networks, and many, many other terms, which really didn't give you much of an insight of what was happening in the space.

So Messari stepped up and they did a vote on Twitter actually late 2022. And DPIN was the term that won. And uh initially I was a little sad because I would have preferred uh proof of physical work, but after some reflection, I think D Pin is a really good uh descriptor of the overall landscape, and we'll get into landscape in a minute. And that really kicked off the D-Pin frenzy. Now I thought AI really eclipsed the D-Pin hype, but given that you're all here, DPIN still carries some velocity, so it makes me very happy.

And uh, if you look at Messari, I mean there are different asset classifications, but there are over 60 tokens or or projects listed in the ASIC class that are tagged D Pen. So that's actually quite significant. Now I did this recently, so there's a lot of red, but I'm absolutely sure it'll be green pretty soon again, maybe before the week is out. But there's billions and billions of dollars uh uh locked and uh uh in in DPIN right now. Come on. Okay, so that's uh uh sort of uh uh breakdown of the landscape. And you sort of got two major resource uh contribution sectors.

One is physical resource, one is digital resource. Overall, we'll be focusing on digital resource and in particular compute, but physical resource is also really interesting, and you get really cool projects like uh helium, for example, and uh uh many others on the compute side on the digital resource side. Probably uh uh at least some of us probably more familiar with most of the projects, including Filecoin, you got uh uh fluence, you got render, and uh so there's there's been a lot of projects that have been around for quite a while that are sort of coalescing under that namespace, including Fluence, of course. Now, as I said, I really want to focus on the compute part.

But uh if you break it down the digital resource, you sort of see the commonality, uh, particularly on compute, then storage including file storage. So, those of you familiar with Filecoin, they've done a really good job on proving disk space, sealing disk space, and uh making sure you have proof systems that show you what's been stored, has been stored, and is being stored. And that's actually not easy to do. And they did a really really good job building out this proof system. On the compute side, the CPU and RAM side, it gets even more trickier to a certain extent because you don't have this constant commitment.

You don't fill up a CPU with one, like you with a sector. So that makes it more challenging. And the reason it's uh it's challenging is because you need a proof system. So let me briefly go over what Fluence does, and then we go into how we prove things. So Fluence is a decentralized cloud is compute stack. We basically bring together DPIN aggregating uh resources, particularly in the CPU space right now, but also pushing into the GPU space. We have a decentralized compute market space uh place where developers, for example, can buy capacity from uh from resource providers and then deploy general compute either through WebAssembly and uh we're just adding Docker and virtual machines onto that hardware. And uh part of that protocol is we also have a distributed workflow engine that allows you to to choreograph those those resources if you want to and need to.

And around capacity, we have this proof we call it proof of capacity, but we also have related proof systems for trustless compute if that's something you need to do. Overall, uh Fluence protocol is governed by a DAO, it's a Swiss association. The token was issued actually at ETH Denver this year, and uh the teams basically on the Fluence been developed distributed decentralized protocols for the last seven years, and most of us at Fluence have done it a lot longer, as you probably can tell. So back to the proofs. So why does it matter?

So most protocols, and this is now really important how the protocol is structured. In order to be able to provide demand, you have to supply. You need supply. Supply needs to precede demand. Aggregating supply is tricky because basically what you want is you want providers to commit their capacity to your protocol without actually having actual demand for it. So you need, and this is where this incentivization systems come in. Different protocols did differently, but fundamentally you need to incentivize the capacity commitment to your protocol so you have enough in order to service demand for compute. And uh what you don't want to do as a protocol, incentivize non-existing capacity.

That's the kiss of death for your protocol. You're gonna run inflation way too high or or pilfer your uh treasury for for nothing, essentially nothing. If you do have demand, you have nothing to service it with, and uh the majority of the fake providers obviously are gonna go away once uh they they drained your protocol. So it's super super important to spend uh time on these proof systems. So sometimes we see protocols where they just do a ping. Ping is nothing.

Ping doesn't ascertain anything. If you run proofs randomly, it also doesn't mean much because uh you very quickly can see uh the emergence of consortia-based uh backends that do nothing but specify on uh providing these proofs. Also, you need proofs that prove the hardware, the capacity you want to prove. So you need a proof system, for example, that's AC resistant if you want to prove CPUs, because there's no point sending money to to ASICs when you can never ever run compute jobs. In addition, if you have staking involved with capacity, so at Fluence, for example, we have stakers, could be delegated stakers, that back capacity with staking on chain.

And uh it's in my opinion super critical for stakers to be able to ascertain that that hardware they're staking actually exists. Otherwise, you turn what is uh a very productive flywheel into a flywheel of destruction of uh of uh resources. So how how do you go about it? Uh fundamentally, you want proofs that are difficult to generate, and just to be quite clear, you're looking at proof of work. There is no way around this.

You you need on the CPU because you can't sector it like you can a hard disk, you need to keep it busy at all times. Otherwise, it's just a vanishing resource. And the same for RAM. Now, there's the bandwidth component. Fluence is a peer-to-peer protocol. So measuring and uh uh benchmarking bandwidth is very, very difficult because relays may be in between, just like peer-to-peer networks work. And you shouldn't penalize a resource for being behind a bad peer as a relay. So we're not proving bandwidth at this point.

We're just going after CPU and RAM, and that's like critical. And of course, we want the additional attribute of uh you know hard to prove, easy to verify. So what we've come up with is our own proof of capacity, and it's built on random X. Random X is the proof of work used by Monero. And uh random, and what we do is basically the basic algorithms like if stake resource is idle, do proof of work, proof of capacity. Else, pin the resource to compute, and we'll get to this in a second.

So every core, so now you gotta break down, you can't just you can't, well you could, but it doesn't make much sense. You can't just prove reliably a server. You have to break it down into the smallest units, because in part, particularly if you do things like serverless, which with Fluence also does, you need you need to break down the resources to as fine-grained as possible. And it's also good for stakers because the staking is much lower than if you had uh uh just an entire server. So we use a core plus four gigabytes of RAM as our compute unit, which then mines for golden hashes, and uh submits that proof of I'll I'll show you the little drawing on a separate slide, much bigger, so you don't have to squint too much. And uh then basically those hashes get submitted, and uh valid proofs generate FLT networks reward.

Now it's not just the golden hashes that are evaluated, it's the frequency relative to a certain period of time. So you can use benchmarking plus proof validity in order to tier your responses, and that's important because I'm getting ahead, two slides ahead now. But uh random X GPU, FPGA, and ASIC resistance star on ASIC. So a GPU, for example, could do the same proof, but does it at half to a third of the speed of uh uh a high-end AMD CPU? So somebody has tons of space GPU C GPU capacity and nothing to do with it, could very easily try to trick your protocol.

So this is why you need the benchmarking of the expected submission rate plus the validity of the uh of the hashes. And as promised. So this is just sort of high level, but basically, from a provider perspective, what you do is you install the the fluence package, and then you start committing compute units, so core plus some memory, to the blockchain. So there's a record on the chain about the entire capacity map, if you will. Then you can you you have somebody to stake, could be delegated, and stake that CU on the blockchain.

Without stake, that compute unit is not active. This is important, this is like really important, particularly if you have staking. It cannot be active. So that means if it's not active, it cannot get rewards and it cannot get compute jobs to join. And that's important that you really get this capacity committed fully to your blockchain. And then the developer makes a compute offer, which we call then once it's matched with uh provider offer, a deal, and then you work on it. So if you have a staked CU and you don't have a compute job for it, no deal, then you pin basically affinity, uh your proof of capacity to that compute unit.

So the process of the proof of work runs on that particular compute unit. Those two threads plus four gigabytes of RAM. If you get a deal, you unpin and you pin your compute to the compute unit. And that's super important because the pinning part, because if a provider wants to cheat, doubling up processes on a particular CU is non-profitable because the expected frequency of your hashing goes down, and therefore you're out of the reward level. So there's no incentive about I mean there might be incentive, but it's not an incentive that is incentivized by fluence in that particular case.

If on the other hand you're pinning to a CU for a job, you should be able to pin multiple processes on it in order to optimize your resources. So on the compute side, on the deal side, there's from the developer, for example, there's an expectation of service, call it an SLA. If that expectation is not met, the developer just kills the deal, leaves a bad review, and moves on. Just you swap it out. However, if that compute job is very IO centric, and you know, 80% of the job is actually just all I owe, you want the provider to overload, to add to that CU to maximize the density, and if every provider does it, price is gonna come down, right?

You have maximum efficiencies, and you actually reduce the number of servers with semi-idle or partially idle availability. And that actually is not only good for the provider, it has an additional uh uh sort of general effect is that right now most data centers are oversubscribed with colour yet the majority of the hardware is underutilized. So if you bring the utilization rate of existing hardware up, you actually bring down the footprint, including the carbon footprint of what you need. So enabling providers to maximize is super critical.

Okay. So this is basically what it looks like, and we don't have to go by it just explain it, but this is sort of the hardware base where you pin XOR, either the job or the proof of work. And uh so uh uh just a shout out to the Random X guys. They are, as I said, it's GPU, FPGA, and ASIC resistant. However, it's no longer ASIC resistant. And there are two things happening right now is one is that uh uh Random X team is working on an upgrade. I mean, it's always gonna be a cat and mouse game, and we actually use a fork of uh of RandomX.

Plus, we use a four gigabyte of RAM requirement, which is not currently fulfillable by the ASICs available. So when you do your proofs and your verification, what you really want is that you want this cheap uh this expensive proof generation, you want cheap verification, and then you want to end up with a compute grid, essentially, to developers, to users, where they can have confidence in the compute provider in a trustless manner. So so you you should be able to have the same expectations on a network like Fluence as you do on Amazon, for example.

And you should be able to do certain checks. And these proofs, whether they're processed on-chain, whether they're done as fraud proofs, or whether they're encapsulated in zero knowledge proofs, is what we're trying to do right now, which again could be either verified on-chain or is fraud proofs, it doesn't really matter. You as a user have access to these proofs. And to me, that beats going over a bunch of logs, log files signed by Joe that they're okay by a long mile. So, in summary, um if you're looking at uh creating or participating, whether it's as a miner or capacity provider, as a user, developer in a in a deep in backed uh decentralized compute network, you really got to look at where the proofs are and how the proofs are being allocated.

If you want to build a protocol like that, make sure you really make the proofs fit your requirements so you don't get drained and you actually have a long-term sustainability. And uh so things like uh using Random X, for example, is super critical and very easy. Unfortunately, on the GPU side, there aren't any of these uh easy solutions, so we're building a new one from scratch. And uh yeah, I think that's it from my end. I think I'm at the end of time. If those of you interested in DPIN, we're uh Fluence has uh in Filecoin, we have uh or protocol apps, we have uh DPIN Day on Wednesday at the Radison.

If you you're more than welcome to attend. And uh if you have any questions, catch me outside. Thank you very much.

Related talks