Proof of State | No Forks Given Aftershow

Recorded: Sept. 22, 2022 Duration: 0:28:08

Player

Snippets

Hey, Aguadabs! Welcome to another episode of the Algaran Proof of State No Forks Given After Show. Today I've got a couple of my colleagues joining from Algaran Inc. I've got Noah Grossman. He is a product manager
as well as Idan Shahra, he is on the engineering team, a product lead there, and was one of the lead developers implementing the just released state proofs to our main net. So I see Noah's up here
Welcome to the stage Noah. Hey Ryan, how's it going? Going well, thanks. I'm also here with Edon. Oh, that's right. You guys are sitting side by side there in the office. Of course. So we're only going to see Edon up here. I'm sorry. We'll only see Noah here in the space.
Hey, how are you going? Hello, talking to us the half. Yes, all right, very good. Well, okay, so we just heard how state proofs are implemented, kind of what they do. Maybe no, you could just go through real briefly and give us a recap of what
Why we have state proofs now? Yeah, so state proofs are... So what does state proofs do? They basically give people a way to more easily and more securely go cross-chain. So state proofs are cryptographic proofs of algorithms
and state that summarize a set of transactions or all transactions that occur over a recent period of time and are signed by the Algrang Network itself. And as portable proofs, you can send them to other places. So you can send state proofs to other blockchains and use them to build state proof likely
clients or smart contracts that basically verify, algorithm state, and then can answer questions about it. So if you're trying to build a cross-train app like a bridge or something else, you can just rather than building or turning to some trusted intermediary, you can simply ask the state-proof smart contract, "Hey, did these transactions occur?"
All right, great. I think I got a little bit cut off there at the end, but I think I got the, I think I got most of it there and kind of the, the, the why for state proofs. So I just want to clarify one thing here for the algodels out there. Do state proofs give me any benefit in Algrant Smart Contracts?
If I am only dealing with the Algrang blockchain exclusively. As of now, state proofs are really useful for people that want to go to other blockchains. If you want to export Algrang to other environments, those other environments can more efficiently
state proves and in a trustless way. So if you're building just within Algarine itself, these don't provide any immediate benefit right now, but we are looking at ways to incorporate them on Algarine. There's a couple of cool use cases with catch up where you can basically more easily or more trustlessly catch up with the Algarine network without having to trust anything at all.
And there's also some other things that we're looking at down the road for St. Bruce internally. Got it. That makes sense there. All right. AlgoFam, I want to make sure that you have the opportunity to come up to the stage. So on your Twitter app, make sure you hit that request button. We'll get you up here to the stage.
and you can ask Noah and Edon any questions that you have regarding state proofs or actually anything that's included in the most recent protocol release that hit main net just a handful of hours ago first. We had the enhancements to our performance, right? So we have
now larger block sizes. We have a lower latency in our time to finality and we have a higher transaction throughput now. So if you're interested in learning a little bit about that, I think no one done might touch on that a little bit. And then the other thing that was interesting in this latest release
was upgrades now to our algorithm virtual machine now at abm version 7 and the ability to Do randomness now on the on the blockchain and and be able to access that within your smart contracts. This is useful for say building
a Oracle or a random speaking. So some pretty cool articles I just hit the the Dev Portal recently. So if you got questions on any of those topics, do hit the request button and we'll bring you up to the stage and have you ask no one need on about that. So I did have a
another question here. I'm for you guys. How often are these state proofs generated? Yeah, so state proofs are generated every 256 rounds, which as of now with the new roughly 3.75 average round times is I think roughly 16 minutes, but don't
quote me on that, it's roughly in that like 16, 17 minute range. And what we're doing after, you know, after the lease is trying to make that a little bit faster. So if you're trying to go cross chain, latency is obviously an important metric. So if you want to go from Algrant, some of the blockchain, we want to make that as quick and
as possible. So we're looking at ways to make state purse a little bit more efficient and a little bit faster. But as of now, it's 256 rounds. All right, very good. And you said that would end up being about 17 minutes. So if I'm a developer and I'm interested in
interoperability what do I have what what tooling is available today and kind of what's coming down the pike as well for being able to build these cross chain interoperable solutions using state proofs.
Now that state proofs are out there, we're going to have people building light clients. Anyone can build a light client. A light client is basically an application. It can be a smart contract on another blockchain that learns about some blockchain state in this case, Algrant. So if I build an Algrant light client on another blockchain,
like Ethereum, it can basically ingest and cryptographically verify state proofs as they are written on chain and store some summary data that allows it to then answer questions about Algrant State. So as you store these little snapshots of Algrant activity over time, you have this window and
And I think we talked about this a little bit earlier, but in order to complete a bridge, you also need to have a way to verify the other blockchain state on Algrant. So after the Ethereum merge that happened about a week ago, you're able to basically verify Ethereum transactions on Algrant. So if you wanted to bring some
perhaps eth over to algrand rather than having to trust some centralized intermediary, you can actually just deposit those tokens in a Ethereum smart contract and then verify that deposit on algrand in a similar way that you can going from algrand to Ethereum. So you have this bi-directional bridge that doesn't require trust in anything
except the underlying blockchains themselves and the smart contracts that are actually written which have rules about locking and unlocking tokens. And that kind of makes, it reduces the attack surface on these bridges so that they can inherit the same trust assumptions as any other smart contracts that has to have quality smart contract code.
All right, so if I understand it correctly, state proofs are actually just one way and you were touching on this here and talking about bidirectionality, is that is the bidirectionality available today and I guess what does it take to get there?
the future. Yeah, so the light clients have not been created yet, but we're talking to some folks that are interested in building light clients. Again, anyone can build a light client. In the coming months, I don't have an exact timeline right now.
Now, but we're going to start seeing like clients pop up over on Ethereum and then over on Algrant to complete this trustless bidirectional picture. All right. And since the tech doesn't exist, the tooling isn't there yet for working with the
with these like clients, maybe we can't really answer this, but Idaan, do you have a sense of what that might look like and kind of what some of the tooling may look like for the algodevs out there when they want to be doing bi-directional state proof?
improving and bridging in a bidirectional manner. On your theory, you mean, right? Well, I guess maybe I'll let you expand that question. Ethereum being just one of many blockchains, we talk about interoperability to
What are the possibilities to go to other chains, non-EVM chains? What is the tooling that's going to be built? First, it sounds like it'll be Ethereum, but what does that look like and then what does it look like going to other chains as well in the future?
Yeah, you could be the technology is there so you could actually export it to any other blockchain, right? And they did it if you want to export meaning to export something from Algrant to other blockchain, then you use tapos, right?
And the other way around, you need the ability to take summary of what's going on on the other chain and export it into Algrant. Since Algrant is low on cost and fees, so you could use and create some kind of
of slim node on Algrant and verify transaction in blocks for auto blockchain. So this is the bidirectional stuff. So this is how you import stuff into Algrant. Right. And if other blockchains want to provide their users with, you know,
trustless interoperability rails to other blockchains like Algrant, they need to have their own version of state proofs or a way to verify consensus or to verify transactions on Algrant. So really any proof of state blockchain can take state proofs technology and implement their own version of it so that they can kind of join
this network of blockchains that have trustless like clients, or the ability to build trustless like clients externally. So do we find any other blockchains out there that are implementing something similar to state proofs?
There's a couple out there. I know Ethereum has something with the after the merge that allows you to kind of verify their state. I don't have like the full list off the top of my head, but I've seen that some blockchains are building somewhat equivalent versions of this. I think a lot
A lot of blockchains are interested in connecting to other ecosystems, we're moving towards a cross-chain and a multi-chain future. So there's a lot of interest from other blockchains to build similar tech. I know that Cosmos has the IBC framework, which basically describes a protocol for building like clients from Cosmos or Tendermint
blockchains. So that's one ecosystem that has something similar. And there's a couple others as well that are working on something like this. Well, give a shout out because I met them today here at the UDC conference in Korea. This was the Mina Protocol, M-I-N-A.
And they are also building some zero knowledge proof protocol and they were keenly interested in Chettin with Algrand about how we could actually complete that first of its kind by directional trustless bridge. So there's one protocol. They're actively working similar
to us on building a light client to Ethereum as well. So maybe we can combine some efforts there with Mina. Yeah, absolutely. Well, tell us a little bit more about some of the things that you are working on related to state proofs on that roadmap. What can you share with us there?
So I think the next big focus for state proofs is to produce them more frequently. Anytime you want to go cross chain, you have to wait for state proofs to be produced. And right now that's about 226 rounds. So we want to speed that up so that you can look
about Algrin State a little bit faster and that will reduce the latency when you're trying to use a state-proof power bridge. So right now the core focus is to really find the best way to speed it up. We've got a couple of approaches in mind but that's kind of the main focus right now.
We've also looked at ways to improve our catch up mechanisms to make them a little bit more trustless, actually more than a little bit, because state proofs, again, summarize what's happened on Algrand, you can use that to provide post-quantum
So what does that mean? Because state proofs contain or are signed by these Falcon keys, which is a post quantum secure signature scheme, you have confidence that a post quantum computer could not fall
a state proof. And you can then verify state proofs when you're doing catch up to make sure that the blocks that you're seeing as you're catching up are in fact legitimate and we're not tampered with by any kind of powerful adversaries like a quantum computer. I don't know if you don't want to kind of expand on any of that.
maybe around like Falcon a little bit and where that came from. So this is a well known library which was nominated by needs to be the group the graphics scheme for post quantum realm and we hear an algorithm
We tweaked it a little bit to be deterministic. We have a deterministic version of this. And this is what we are using. So we took the fundamental math underlying the scheme and we tweaked it a little bit.
All right, Algo fam. I want to again remind you if you are interested in coming up here on stage and asking a question of Noah or Ydan about state proofs or anything that's included in this latest release. Do hit that request button and we will get you up here.
to ask that question live. We do the Algarand Proof of State Show weekly and we do the post show, no folks given post show directly after it as well where we bring our guests up and we want to open the stage up to you.
And, and, and, you don't it's great to have have you here. Let's talk maybe just a little bit about some of the other features that were included in this latest release. Maybe, maybe tell us about, um,
How ABM 7 or I should say what is included in ABM 7 for devs in working with randomness? What does that look like? Yeah, so I'll give a shot at it. This was not my group, but I know a little bit about it. So basically,
AVM7 introduces a couple of new opcodes that give view or the community the ability to build randomness oracles. So there's one opcode called VRIF verify and then there's another one that basically give applications that want to include
randomness inside of them, a way to, you know, it gives them a reliable source of randomness on chain. And using these outputs, you can basically commit to a future round that will have some randomness data, which you can then fetch and include in, you know, any of your applications.
So if you want to build some kind of game, maybe there's like a casino app or something else that needs to have a reliable access to randomness data, these randomness oracles will provide that data reliably. So I'm not sure how many other blockchains have done this, but I think it's going to be pretty cool to
see some new games coming out. I would love to play Blackjack or Poker online on Algrand or lots of other types of games. Get your DJ on. I know. I know. So that was Anz team that had worked on this feature. Is that correct?
Yeah, that's that's the end team exactly. All right. Well, we might have to have her back here on the Agaran proof of the stage. So we enjoyed having her and Jason Paulus on a handful of weeks ago. We'd welcome her back to tell us a little bit more about how to create a randomness beacon using the VRF. And as you wrote an article that
has been posted to the Algorand developer portal and it walks a developer through how to do that. So that is developers.algorand.org if you want to do the play at home game devs. How about the performance enhancements?
Was that your team? Did you guys work on performance enhancements? Yeah, that's something else that we worked on. So we basically introduced a significant memory improvement that allows us to store security data related to consensus on disk like in storage rather than
than keeping it in memory. And through that and some other optimizations, we were essentially able to increase our block size by a factor of 5, going from roughly 1 megabyte to 5 megabytes. So larger blocks can now contain more transactions, and that gave a significant boost
to our TPS and we also in conjunction with that reduced our round times to sub for seconds. And as we saw yesterday, it actually is kind of turning through at roughly 3.6 to 3.8 seconds. So there's a little bit of variability there, but we've got an average round
time around 3.75 seconds now. So that's really exciting. And moving forward, we're going to continue to lower those round times that will both A) improve the user experience so that transactions will settle faster with finality on Algrant, and it'll also give a TPS boost as well.
If you produce blocks more frequently, you can effectively handle more transactions per second. So that is what the performance team is going to be focusing on for the rest of this year. Very good. Do we expect that we'll see another performance enhancement coming in this gallery yet? Yeah, we don't have an exact date
yet, but we are hoping to have an additional performance boost before the end of the year. Very exciting. All right. So I get this question a lot when Devs come and ask me about the Algrant protocol and it's always about TPS. I get this when I'm very mad at conference, right? Oh, Algrant says now that
6,000 transactions per second. What does that mean? What are we measuring in there? Can give some insights in that? Yeah, so we actually run some load tests both internally and externally to benchmark our performance and make sure that these aren't just advertised numbers.
So we produced these large blocks to make sure that the network can actually handle up to 6,000 transactions per second. So yesterday I think we saw that the first example of that there was a block that had like 25 or 26,000 transactions inside of it and then when you took
provide that by the average round times, you can see how that translates to 6,000 transactions per second. Now, we're also doing some other performance testing for sustained TPS. So what happens when you just dump a bunch of transactions on a chain over a consistent period of time, and we've seen similar results on
So we're looking at different ways to push the envelope of what's possible in terms of TPS. And as we do this performance testing, we basically identify different bottlenecks that prevent us from processing more transactions. So each round and algorithm
and is kind of split up into three phases. You have block assembly, which groups transactions together into a block. You have block propagation, which sends that data across the network to all the different nodes, all the different participation nodes. And then you have block validation, where nodes actually verify that these blocks are legitimate, and they then vote through the soft
vote and the cert vote rounds. So we're looking at ways to speed up block assembly, which again, assembles transactions into blocks, as well as block validation, and find ways to propagate that data a little bit faster across the network. All right, I've got it. All right. So I know that the other devs are interested in going
to search for those large blocks that have been posted to mainnet recently. And if they do the exploration inside of there, are they going to find that these are transfer type transactions or these application call transactions and mixture of both? Like when we talk about that metric
of TPS, what is the mix of transactions that make up that metric? Yeah, so right now I think the block that we put on Mainnet was just payment transactions, but we have lots of different workloads that include different types of smart contract calls and asset opt-in.
and the algorithm made up of lots of different types of transactions. So one of the things we're doing this quarter is seeing how different mixes of transactions impact performance. So some people talk about the number of swaps that could be processed per second. That's one thing we're looking at. Different computer
on blockchains or different types of transactions will take up a different amount of time. So we're really slicing and dicing the data to see exactly how performance is impacted as a larger number of swaps come on shaming versus NFT men's or other types of use cases.
Right, that's very helpful. And I think that's an important thing that we want to get the messaging out there on that algorithm are truly trying to have a meaningful metric and not just have a metric that gives only a certain type of transaction
mixture. When we talk about it, we really do want to have something that represents a real-life use case and an actual metrics of what it should be able to do when we have real user load on that.
I want to remind our Algadev's that the time is running out if you have held your tongue and not ask your question you are running out of time here on the Agra and No Force given post show here to ask Noah and Ydonne any questions that you might
have this week. So hit the request button. We'll get you to come up. Edon and Noah, what's the best way to get a hold of you? Obviously Noah, we see that you've got your Twitter handle here. Edon, do you have one? I would drop that.
link the reference to my Twitter later on. All right, that's so good. And what is the best way to reach out to your team if we want to talk about performance? If we want to talk about state proofs, how do we make the best connection with your teams?
So I think Discord is a great place to search for answers and talk with us like "I'm on Discord on the Discord server for Anna" on Algrant and you could come up as question and we'll answer.
All right, good stuff. Well then, Noah and Idan, you have provided us with just a wealth of information regarding the latest algorithm updates, including state proofs and how we'll be able to use those in bridging.
updates to the AVM version 7 and how we can now create oracles and randomness beacons as well as talking through the performance enhancements that we have. So I want to thank you both for joining the Algrang Proof
the state show and the no forks given post show. You guys have been just a wealth of information. Now I actually see that we have somebody who has come up and requested you guys want to stick around and answer a question.
Yeah, absolutely go for it. All right, here we go. Let's see. Oh, did it go away? No, no, it looks like the request went away. All right, Algo devs, I think we're going to wrap it up here with Noah and Ydan. Once again, thank you both for joining.
Yeah, great to be here. Thanks Ryan. Thank for having us. You are welcome. And to all the Alga devs out there, I want to wish you well and have fun building an Alga Rand. We'll see you next week.

FAQ on Proof of State | No Forks Given Aftershow | Twitter Space Recording

What is the purpose of state proofs?
State proofs provide a way to more easily and securely go cross-chain by giving cryptographic proofs of algorithms and state that summarize a set of transactions or all transactions that occur over a recent period of time and are signed by the algrang network itself.
What benefit do state proofs give to algrang smart contracts when dealing exclusively with the algrang blockchain?
As of now, state proofs don't provide any immediate benefit when building within the algrang network itself, but there are potential use cases with catch-up and other internal applications being explored.
How often are state proofs generated?
State proofs are generated every 256 rounds, which is currently around 16-17 minutes.
What tooling is available for developers interested in building cross-chain interoperable solutions using state proofs?
Light clients can be built on another blockchain, like Ethereum, that ingest and cryptographically verify state proofs as they are written on chain and store some summary data that allows them to then answer questions about algrang state. In the coming months, we expect to start seeing light clients pop up on Ethereum and then on algrang to complete this trustless bidirectional picture.
Is bidirectionality available today for state proofs?
Bidirectionality is not available today, but it is expected to be possible in the coming months with the creation of light clients on both Ethereum and algrang.
What is the purpose of larger block sizes, lower latency, and higher transaction throughput in the most recent protocol release?
The purpose of these enhancements is to improve overall performance.
What is the purpose of the algorithm virtual machine upgrade in the most recent protocol release?
The upgrade to the algorithm virtual machine now at abm version 7 and the ability to do randomness on the blockchain is useful for building an oracle or a random speaker.
What are some potential use cases for state proofs within the algrang network?
State proofs can potentially be used for catch-up and other internal applications within the algrang network.
What are some potential use cases for state proofs in cross-chain interoperability?
State proofs can be used for building bi-directional bridges that don't require trust in anything except the underlying blockchains themselves and the smart contracts that are actually written, which have rules about locking and unlocking tokens.
How does a light client work?
A light client is an application, which can also be a smart contract on another blockchain, that learns about some blockchain state, in this case, algrang. It can then ingest and cryptographically verify state proofs as they are written on chain and store some summary data that allows it to answer questions about algrang state.