Managing Business Continuity Risk With Decentralized RPC
ETHCC 6 · July 2023 · 30:28
Fedor Kurbatov presents decentralized RPC as an approach to business-continuity risks for applications. The speaker discusses single points of failure, verification and additional control algorithms for decentralizing infrastructure.
Speakers
Topics
From ETHCC 6, hosted by Ethereum France.
Transcript
[Music] thank you [Music] hello I'm further from fluence labs and today I'm going to be talking about managing business continuing to risk with the centralized rpcs so in the previous talk Alexander told us about how Enterprises could sort of on board with web3 Technologies and
I'm gonna talk about the Enterprises who already like onboard it in the web 3 and created the Rd apps and how can how and how they can manage their risks and their business continuity risks with decentralized rpcs so yeah um let's start so first of all let's talk the apps so what's the app ID app is a basically a web app that uses blockchain at the back end and it needs blockchain nodes to access their rpcs to so to to interact with the with the blockchain um so uh how the businesses can access the rpcs so first of all they
can self-host them sell host the filtering nodes and it can be difficult and time consuming or they can use the centralized SAS RPC providers like infuria Alchemy or quick node so and the most of them go the second way so the SAS rpcs for the apps are basically very convenient they are cost effective but they introduce like different risks that centralized and they start to be a single point of failure because well we depend on single RPC provider and if it fails your app basically is unfunctional and there are
also the platforming risks because well those uh says RPC providers are basically just non-regular companies and they have their terms of services and well they can terminate a service and just in case you violate some some points in their terms of service agreements and of course there is significant trust components so your interest the uh Reliance you rely on some third party to sort of manage this infrastructure for you um so yeah and uh uh also uh there is there is a thing called um uh so those risks are uh associated with uh the centralized
providers so is there basically any way to manage those risks is there any way to sort of uh work with them and those are not the only risks there's there's also some regulatory risks so as you know there were recent events when SEC uh just chased the companies who issued the apps and they inquired about their native token and they tried to um you know try to uh sort of uh make them uh make those make their tokens uh removed from the centralized
exchanges they can they wanted to call their token a security so basically if the app is sufficiently decentralized if it's not reliant on some uh Central third party um the actually can benefit and they can protect them from those regulatory risks so um what can we do with the RPC centralization problem well let's de-risk those rpcs but how what can we do about it so first of all in order to de-risk those SAS rpcs we can sort of try to work with what we
have we have those centralized rpcs providers and we can sort of include the our own Quorum or failover Solutions inside the app or we can use the centralized servers tooling and open permissions platforms what decentralized tooling what open permissions platforms okay um and so if we take a look at the first at the first uh way so it basically it gives us a lot of control but we have to handle all the calorim and fill our Solutions inside our inside of our our app we have to sort of um
create all that logic ourselves and it can be really cumbersome and it creates and it makes the idea app very coupled to this uh this code and we have lots of complexity to manage but we can also use open permissions platforms it gives us a lot of control and it's just decouples that RPC endpoint sync from our app and basically you can use it as a drop-in replacement and you're safe from those risks and there is a possibility to have a real decentralized backend for your app so meet fluence fluence is the
decentralized serverless compute platform so it's verifiable and trustless it's Unstoppable and suddenly ship resistant it's fault tolerant and it's a compute platform so this basically allows you to run your apps in decentralized cloud with it replicates the cloud stack and it allows you to build decentralized apps easily so basically if you need an analogy it's a file coin in compute so white fluence so it's basically a platform that allow you to create the uh uh to library costs
and create your and create the backends from your deferred apps so there is no controlling party it's controlled by a Dao um no vendor login you can basically switch any provider that uses fluence or provides compute refluence it's secure there is a zero trust security it's open source and it doesn't require no identity in okyc so no one can like cancel your the app um but what about the risk in rpcs so this is the thing we've created based on fluence network it's called frpc so basically it's a decentralized inferior
based on fluence it's a super convenient super convenient Showcase of what is possible with fluence and it allows you to deploy simple self-hosted RPC based on fluence and connected to your DF configure RPC providers and then basically run any Quorum load Billings and RPC methods on top of it and it's available on fluence testnet right now so you can like scan this QR code and find the uh the source code of this app so basically what's what it allows you to do so you have your web 3D app front-end
um and you basically replace the centralized RPC endpoints with our self-hosted HTTP Gateway so it's very simple it's just a very simple app that you can run on anywhere and it uses fluence decentralized Network to access RPC endpoints centralized RPC endpoints and load balance and uh run Quorum on them so you can basically validate the output that you get from there before uh uh sending it to your D app right and this basically a big deal so you
do not modify your the app in any way and you still just redirect it to a special self-hosted Gateway or to affluence hosted Gateway and basically you get a real real decentralization you do not depend on any one um on any single RPC endpoint solution and you just uh work with your d-app and get all the benefits and it's really cost effective um so right now I'll show you a little demo of how it works okay um
so let me show you so we're going to be working with this frpc substrate solution right um just a sec I'll set up the mirroring um okay um
right so we're going to work with this our frpc substrate so you so basically you can hack along with me if you want or just uh see what I do um so we start with uh with this code and we clone the repo so once we get into into the into this repo we can see what we have here
so basically it's a small really small um a small D app that uses that gets the block number from a very simple from the evm RPC and gets the data from some transactions so nothing nothing too complex just something to make sure that it can access the uh the remote rpcs and we have the fluence app that's a that can run so first of all we deploy the fluent the
frpc to the fluence network but first we have to build it so fluence uses a web assembly webassembly as the uh the way to sort of deploy the apps so we have our own investment engine called Marine so we start from building the app
it compiles the code of the frpc service and gets it ready for the deployment so while we're always compiling uh are there any uh the app owners here in this room yep thank you so um so so we have now right now we have
built the project and we can right now deploy it to fluence network so with the fluence deal deploy so basically what's the deal deal is a special object that is that appears on chain that uh allows our test net to sort of see what code you want to put and put into the network and it's our nodes of the test net download it install it on uh the necessary amount of machines to is you can see we can specify the amount of move workers we Deploy on the network
and we are deploying this to our test net so in order to deploy it we need to sign the transaction and once the transaction go through the code we just compiled will be deployed to our Network and we can start working with it
so as you can see it was deployed now let's wait a couple minutes for it to be fully deployed into our Network by running fluency logs we can see that [Music] we can query the nodes about the logs of this particular particular worker particular app it usually takes several minutes
for all the uh for all the workers to be deployed sorry it just it just needs some time to sort of growth oh okay you see so it just uh deployed the app on our backend okay so now we can work with the demo
so the code is then is now deployed in the fluence network and we can work with the app itself so uh first of all uh there is a Gateway app that is available in this package and we can start working with this so what it does is creates the [Music] it creates the connection with the fluence network you can specify the uh the RPC endpoints you want to work with you can specify the uh
uh the relay you want to work with and basically the amount the amount of Quorum nodes you want to run it against okay
um so Okay so okay so we have now started the
middleware server for our app and let's try to work with it and see how our app can interact with it so right now we are running this simple application and as you can see it started uh it started uh replicating those RPC calls has started to ask their inferior endpoint and
points about the details of the transaction and it just gets got the current block number and the transaction details and as you can see the app itself doesn't know anything that it's run against the centralized serverless networks compute Network it's a simple drop-in replacement for uh for your existing the apps and we basically have solved the and removed the risks of centralized rpcs now you can run the Quorum and the round robin against
those RPC endpoints and you can make sure that you're not dependent on a single RPC provider you don't need to modify your d-app and so basically we we just get a solution for this problem so what else can you do with fluence platform and after you have implemented the the centralized or PC so the first thing you can utilize fluence to create the back end for your app centralized backend so you can you not only can deploy this sample a simple frpc app to
influence you can deploy any kind of uh or any kind of app backend to it so right now fluent supports uh rust that can be compiled to awesome as a the language but we are going to introduce support for Python and JavaScript so right now there is a test net running and you can uh access the test net and basically there is a way to uh to run different uh small apps that are available in our example repository against it so we are
currently in a test net stage we are going to release to mainnet in Q4 this year uh uh if there are any questions regarding this this app I can answer them right now and after that we can continue with uh discussion of the fluent stack thank you so what are the trade-offs of using or going through fluence and decentralized rpcs versus using one directly like I understand like the benefits but but then like I guess in terms of
perhaps I don't know latency throughput these kind of things so regarding uh thank you for the question uh regarding the latency so it's usually adds about 500 milliseconds of latency but it depends on the algorithm that you use to sort of query those endpoints so if you chronic War Room against multiple endpoints it will take more time and if you do the just a round robin or you just query the first endpoint that actually answers you then it's will be much faster and you will be able to the basically you will not be able to notice
any any latency issues with it oops okay okay so um any other questions okay so yeah yeah yeah I I was wondering how how cost competitive it is right now compared to to Imperial Alchemy choose influence for for RPC endpoints right because I I
assume that the cost is indexed on the value of the token for for compute so right now uh how would you uh how would you say how much sir what's what's the the cautious solution using Alchemy using your solution thank you for the question so first of all um uh regarding the costs so right now uh we are targeting to be in terms of course for computer Target targeting to be like uh maybe three to four times cheaper than AWS or gcp and so the cost of compute will be really really will be much cheaper than uh in
traditional Cloud Solutions and basically uh the Alchemy you still have to pay for the RPC endpoints but uh the fluence will allow you to sort of skip skip implementing the round robin or Quorum Solutions in your app and uh Coast wise we are we are launching the network with the the centralized uh with affluence Lambda showcase or basically we allow running Lambda functions and applications like frpc on it and you just pay for each execution and it's it's a fraction of what you're paying if you are doing that on Amazon Lambda or
gcp or any other platform so so if there is because saving but I'm kind of cannot say about the exact price do you have a calculator or something for computers or is it in your plans to thank you so we are going to uh have the exact economics numbers uh closer to the main net release um right now you can test it for free with our uh test net so basically it's uh uh well uh right now yeah there is a possibility to do that
yeah so uh but anyway um uh and the costs will actually depend on the compute provider because we are we are going to implement the solution both for the developers and compute providers so compute providers can uh uh contribute their unused uh CPUs and used Ram capacity to our Network and the developers could sort of Leverage that capacity for the uh and the prices will be much cheaper than with the traditional Cloud Solutions so for the release we're targeting for the [Music] those Lambda functions stateless Lambda functions but later we are also going to
support like stateful apps so it's [Music] um that that's working what we are going to do thank you okay um any other questions okay so right now um now we can talk a little bit about so how actually um fluence Works um so we uh so as if you can see there are like traditional
Cloud backends that that use centralized apis so we use a set of decentralized services that can be choreographed in terms into uh and stacked together without like Central Authority but the with the decentralized network and uh basically you can write decentralized backends for daos you can write um solutions that allow you to just move any kind of backend to this network
okay um and I think so I'm done with this um so uh to summarize frpc is just a Showcase of what's possible with fluence and you can decentralize your whole back end by moving it into a centralized permissionless network uh and you can easily audit and share interviews review distributed algorithms that are created with aqua it's language that we have created to uh sort of write those algorithms and you can write or you can find all the developer developer documentation on influence.dev site
so um thank you if there are any questions please ask them or you can just find information about fluence on fluency.net network site on flowing is that chat there is Discord server uh telegram group and our Twitter um thank you [Music] [Music]
foreign