 Hello, everyone. My name is Akkos and I'm here to present what I've been working on in the last few months, which is to run FVM inside TenderMint as an alternative node provider instead of Lotus. So this is part of the interplanetary consensus or what used to be hierarchical consensus effort, which is kind of a recursive sidechains organized under the Filecoin rootnet. And because we can't use the same consensus as expected consensus because storage, you shouldn't be reusing it, I suppose. We need a different consensus and one thing we use is as a fork of Lotus, which we call Udcoin. You have probably seen it many times presented by Alfonzo. And the other one is this TenderMint, which is an off-the-shelf TenderMint with FVM put in it. So it's all rust what I called, but TenderMint calls me. So for anyone who isn't too familiar with TenderMint, it's a proof-of-stake BFT protocol. And there is a generic component called TenderMintCore now renamed or, you know, success by succeeded by ComEd BFT. And it's very convenient from a developer's perspective because blocks are instantly fine, or you're only moving forward, never have to worry about rolling back your state. It's very easy to think about, but it doesn't scale to thousands of validators. So you have to be somehow sampling or letting people to opt into a subnet, and around 100 validators can run it. And they're nice rust libraries. But what always comes with this is that the Cosmos SDK, so the TenderMint is the bedrock of the Cosmos ecosystem. We are not using the Cosmos SDK because the Cosmos SDK is like these reusable modules of accounts and banking and transfer and transaction. Instead, we are having the built-in actors and the FVM that we use in Lotus, so that completely replaces it. This is the lifecycle of an application. So I'm the application TenderMint calls me, and this is the lifecycle of how a block is given and fed to the application. So you get a header, then for each transaction, you get a deliver. At the end, you get to change the power table, which is the next set of validators who can run or produce blocks. And finally, it tells you to commit the changes to the database. So next time, we all have to remember, but it has other methods to run the genesis to check transactions that have been added to the mempool. And all this exists without TenderMint having any notion of what a transaction is. So in the tutorial, it's just key value paths, but in our case, it's going to be our stuff. And we will use the FVM to interpret these. So that is two, it's an evolving standard. So there is this thing, ABCI++, which at the moment adds two very important methods to for us, which is, which allows us to inspect the transactions that are going to be in the next block and inspect them again before we cast a vote on this block, which are going to be very useful functions for us to move into the hand and replacing like full blown messages with CIDs because CIDs are not immediately available like the previous fantastic presentation show that you can have a CID, but you have to be able to look it up somewhere and it's not something you can just trust. So a fandom in itself, this is kind of the architecture. You have Lotus in the top and then some kind of nodes with three layers pushing messages between these nodes. And the Tendermint core is one process that we have to run. And then the Tendermint process is another one. And because it's another process, we have complete freedom in how we deal with data. So we can use IPLD. Tendermint is not enforcing it, not even providing us with any storage. So that's completely on us. And we can also do our own network communication because we are not restricted to like Vazem or anything. You can do anything you want. So effectively, there are proof of state side chain and with the potential in more child subnets under us. So we have two important aspects. One is observing our parent. These are top down messages coming from the parent and we need to know when they are final before everybody applies it on the side chain. And we have to agree that the bottom of messages are available. So if someone sends us a checkpoint because that's how we propagate information up and down, then the parent validators who are not running the sub chain, the side chain can only apply this checkpoint once they understand that most of the majority of them will do so and they have the data. So even though maybe one of them don't have it, but this time they can retrieve it from their own bodies and it's going to work out fine. So checkpoints are one of these examples where you have, it can be anything, you know, the size can be anything because like you can imagine that for the root, you have massive number of subnets potentially under it and they have to go through, if they have to go through the root to send each other messages, you know how many there's going to be, it's difficult to tell up front. So we thought that definitely a checkpoint can only contain a CID to some kind of list of messages and we don't know how many there's going to be. So there's many two options, one you send some commitment and then you feed messages one by one or like the previous presentation, the IP and I said that you can advertise that you have it or you know advertise that you are able to serve anything from the subnet, send the CID and let the notes come to you and for this to work there is just this two phase publishing. The first we publish the intent for the checkpoint to be included in the blockchain but not for execution because they don't have it and then let the parent validators get it and then vote again that they have it and that's when it gets executed and this is when these ABCI++ methods are important. For this we implemented this resolver which is somewhat similar to IP and I think with gossip and bit swap to resolve content from anyone in any subnet and with that this is the architecture that you have your ABCI application which is Fenderman. You see bytes because that's what a transaction looks like for Tenderman and then you via these stack of interpreters refine it into more and more into messages that are more and more close to what the FEM can actually handle. So this might be a CID then we hand it over to a pool to the IPRD resolver where it can get it back from the network and then next time if it has it it can just go through the to the FEM. We have a roadmap but the green means here that it's done so we are less than halfway through our roadmap and at this stage it's just FEM plus IPRD and all this demo that I did is like available on the on the website on the repo website it's like 50 minutes so I'm just now it's a very truncated version but there is a CLI and an RPC client and that's what I just I just wanted to show you here. So I have a demo script that's checked in it goes through the steps of setting up a genesis file and as we can have a quick look at that it's the genesis of Tenderman actually so if you just run it run this quickly then it has sections for like its own consensus nobody's interested and then we have our own genesis we can't use lotuses it's we don't run the full lotus we don't run markets unless people want us to run markets but it has its own accounts and a single validator because there's going to be a standalone setup so in these right two terminals in the top I'm going to start the pandemic process and then the bottom I'm going to start Tenderman and it's going to here it says that we are going through the genesis phase and it takes some time because the wasn't needs to be loaded but now now you can see it's running blocks so with that I can go back to my other scripts I have created some keys so I have Alice and Bob I'll put those of you familiar with DFEM this is like the state I can I have this CLI to ask like what's the state of an actor and it will tell me the balance and the what kind of code like EVM or account it is and what's the current state and then we can do transfers just do a quick transfer just so there's other things check out so here there was a transfer so now if I ask Bob's balance it shows that Bob now has a thousand tokens because that's what the transfer did and then we can deploy Febham contracts with this so that one deployed as Febham contract and returned to me there's a bunch of addresses so this is like the delegated address which we can copy and give it to this command which calls a method on that thing this is very not you know not something I would do but if you look at this is called a simple coin contract that I've deployed here so just to quick have a look at this is a solidity contract which gives the owner 1000 coins of this thing and then it has a few methods like sending and getting a balance getting a balance as a view and if I look at the signatures then get balances this F8B to something and that's what we've been calling here but this is and actually this thing that it returned is a hexadecimal encoding if you decode it it says 10 000 but this is not very user friendly so we have this other method call other thing other option to just run it programmatically so here it says 10 000 and then and you can see that these are the JSON things that come and go from the actual tandem entire PC because that's what you're talking to and we're decoding it just to have a quick look at what this looks like so so this this example is like a script where you can with static typing interact with your feminine contract so this is the this is the contract I'm going to actually deploy that again in this script and if the solidity compared to me this ABI so with that I can create this is not done by me this is another library but I'm just saying that this is a nice way of working with this so we can create a simple coin interface and then we can say that I'm just going to connect to the fandom and actually tandem and with my client I'm going to read my secret key which is Alice is in this example I'm going to check out I'm going to query what Alice is nonsense so we can resume and send the next transaction so that it checks out create a message factory bind it to the client and then run this thing and then running it means that I have a client who can I which I can now use to send transactions send these ABCI queries which I read only things and do what is a call which is a trans it looks exactly like a transaction but it doesn't consume money for you know everybody familiar with the ethereum call knows this that if you have this view like a pure view that doesn't need gas but we can use gas if we want so in this in this example we make actually two calls to the contract one is in transaction and the other one is not in transaction so they're not in transaction just queries the low the low the node that you're connected to that you have to trust it or you have to run it with a few samples and they might not even let you do this because it it's um it might be your own node that you're querying but it does put a load on them or you do this transaction in which case you don't have to trust them but there's gonna be a call more because everybody runs it and you have to pay for it and it's just asserts that these are the same so that's the test here and then there are these library methods that are available now to to query the state and it gives you back something that is an actual you know statically typed actor state or deployed a contract with a method that is specific to fpm and it gives you back the the return so you can read the addresses from it or and this is where the static typing comes in if you want to get the balance then you can create a contract and call it and it knows that this is going to return a big int that it can pass and you don't have to worry about the hexadecimal abi encoded stuff yourself so yeah that's just as an example of either calling or invoking a transaction yeah a transaction so it has the same almost exact parameters except the call you can specify where on the blockchain you should run this yeah and um the way we see this used is is that if you run a subnet then you might want to modify the fpm actually so some of our some of the people interested in this want to run their own syscalls like they want to actually connect to an external database and maintain that so more like a cosmos application where you do whatever you want and not restricted to what the lotus version of the fpm lets you do and like you can't at the moment deploy use defined wasm contracts there whereas here you can just start your own subnet with the extra wasm like extra built-ins that you want to run and that's up to you what what they do and how they do it it's a more lightweight option to explore the fpm and sorry if I went over time but thank you very much for listening