New Ethereum talks, every Monday. The week's conference uploads by event, in your inbox.

Loading player…

What We Can Learn from TON to Improve ETH 2.0 Dev Experience – Nikita Kozlov

Ethereum DenverFri, Oct 9, 2020, 12:00 AM

This talk is from ETHDenver, the world’s largest Web3 BUIDLathon and Community Gathering. ETHDenver’s content is crypto and blockchain focused. Subscribe to our channel to learn more + connect on Twitter: https://twitter.com/EthereumDenver. Speaker: Nikita Kozlov of zeropool.network Abstract: Telegram Open Network Smart Contracts implementation and development experience. What we can learn from TON to make ETH 2 dev experience better Our team will share our experience of developing smart contracts on TON. We won the TON first international contest in the nomination of the sync payment channel. We want to show how TON implemented smart contracts in sharded blockchain and try to understand what we can learn from their approach and what are the main problems of it. This talk was recorded Friday, February 14, 2020. ETHDenver 2020’s content themes included DeFi; DAOs and Token Engineering (TE); Gaming and Usability; Protocols and Interoperability; and Public Good and Social Impact. Industry experts also weighed in on topics like decentralization, privacy, identity, non-fungible tokens, scaling, governance, diversity, and arts and culture in blockchain technology. The 2020 event was February 14-16 in Denver, Colorado and hosted 2000+ blockchain enthusiasts, developers and community members from 50 countries and 50 U.S. states. 🔴 SUBSCRIBE ETHDenver’s YouTube https://www.youtube.com/channel/UCgz9NU06t_FkT0Py1Vadczw 💡 LEARN ETHDenver’s Official Website https://www.ethdenver.com/ 👋 CONNECT ETHDenver Twitter https://twitter.com/EthereumDenver 📖 READ ETHDenver News on Medium https://medium.com/ethdenver 🛍️ SHOP ETHDenver Official Merchandise bufficorn.com 💬 CHAT Telegram https://t.me/Ethdenver Discord https://discord.gg/jteMn5c 📱 FOLLOW LinkedIn https://www.linkedin.com/company/ethdenver Instagram https://www.instagram.com/ethdenver/ Facebook https://www.facebook.com/ETHDenve

Transcript

hi everyone let's start our talk about telecom open network and how it can be improved and how if you 2.0 can learn something from telegram open network experience my name is Nick Cosmo and it's my colleague his name is Cale Kuznetsov we want to talk about it and let me first talk about our team actually I am part of a big team of his software engineers we are like a group of hackers they are about six of us and actually we made several very important projects for film for last couple of years so actually our several our projects have for some of them have 150,000 users that have a film wallet also our team members published about 5 articles on another research that have some like scientific value also we are really like very big hackathon lovers and we visited about 18 hackathons for the last couple of years and most importantly we visited most of the film global hackathons like a film Singapore Cape Town with you're only from Denver last year and actually we trying to participate as much as hackathon as we can and actually most of them we meant give you a mention somehow and on some of them we want something especially we won like we've got the main prize on if ETH Boston with our latest project it's actually zero pull Network it's anonymous transactions on the film we use the key starts technology for that if you heard something about another cash it's pretty the same but actually we are not mixture we allow users to make atomic swaps unanimously also so check this out if you're interested in anonymity in a few so let's talk about telegram open network right now actually it was it's like a blockchain that was released a couple of months ago it's like it's a product of telegram team telegram messenger team that is proof of stake also what is it actually it's the most interesting part about it is that it used charging approach to send transactions so actually telegram is proof of state blockchain with shouting and also they have smart contracts and it's possible to communicate between contract vision chart chains using small contracts only so basically what they have right now they have smart contracts with shouting approach and also they have done virtual machine they have their own virtual machine that they they read together with two languages they have fifth language and font languages so like it's how you can write small contacts on this platform and actually they released only full note on C++ and light not on C++ and also small in examples how you can read someone called smart contracts without any documentation and all without any like suitable information anything that can we can that we can learn to develop something and we need to when we started to develop some weak on tone we need to learn it from scratch we use source code to understand how this language works so actually they announced like a couple of months ago like two months ago they announced first contest it's like an international contest it was like hackathon it was really big hackathon and we spend about three weeks to participate in it and we won the first prize in the most complex elimination we've like implementation the basic smart contracts for telegram open network so we have some experience and right now we just want to share how it works and how this network works and how we can use it in a film put 2.0 in phase 5 for example when we will start to think about how we need to design smart concepts with charging on a few so like the key points about tone from technical point of view of what we need to know firstly its cells what the cell it's like basic storage unit and everything in telegram open networks we store everything in cells like a cell is just something that have 128 bytes of any data that you can store like 1000 23 bits of any data there and also you can store for up to 4 references to other cells that can also store another for reference to another cells and actually it's like actors model how you can store data and like even reference this data between different cells like it's like everything done basically is group of cells they don't have any other primitives on the layer of storage and also you have messages between short chains so basically in telegram open network they have the same picture the same thing as beacon chain it's called master chain and they have a lot of like shard chains they call it work shades and actually in telegram open network you can easily communicate between different work chains and you can have different you have different options how you can communicate between work chains one the first one is without hyper coopering so you don't need to pay a lot for calls but you can but your course can be executed and predicted that in a predicted amount of time and you can use hypercube proteins to have like a fixed amount of time but it will be executed so also it's very important to understand how you can how you can create account at all like for example a TV room and a Bitcoin we just have private key we have an address and we just need to send my own this address and actually we are set up we have account on the become in Whittaker on the Bitcoin actually on the network it's a bit different what we have we need to create a smart contract we need to deploy a compiled this mark on tech and deploy this on smart contact to the network after that we need to send some grams to this account to this smart contract to this address and after that it will be activated and only after that you will have access to your funds and basically the main idea is that there is no any basic accountants on telegram or an open network if you want to have a wallet you need to write smart contract you need to implement it and you will have it you need to deploy it and you'll have this wallet you can contract this smart contract you'll control all your fans there let's like the main points about Jam open network in general so and right now my partial will my partner will talk more about how it looks how simple telecom open network port looks like from in fifth language and in 15 funk languages okay don't don't wallet it's a smart contract that contains two main things the first one it's a sequence number it's like a nonce in the theorem that protects against double spending Kotak and the second it's protection with their private key you need to sign the external message hash by a private key and next verify the signature inside the contract by your public key that was said when contract was deployed and the most important thing that you can customize your wallet inside the toun blockchain if you have the sequence number and signature verification you can add any functionality for example it's a multi signature or asset transfers and I want to explain how to work with the storage inside the tone the storage contains one cell with the up to four references to an avid cells and to get access to the specific memory area you need to preload all bits or skip these bits before anthem for example if you want to get access to the old noon area you need to load the storage signal 32 bits and to write to the storage you need to build a one cell with data and even this data didn't changed you need to specify this data inside this chain as well there are two functions that available from outside of their contract the first one it's external function the message provided to this function goes directly to the contract and this function has one parameter it's a slice with the message bottom and second function its internal the message provided to this function goes from the ANOVA contract and this function has three parameters the first one is a message value it's a amount of grams provided to this contract the second is a system cell with the Flex and the source address and the last parameter it's a slice with the message podium let's look how to communicate between the contracts this is him that explains how to communicate between two contracts on the first step we need to send the message from contract a to the contract beam next contract B will handle this message and send Cole back to the contract a and contract a will handle this callback let's look how to let's look at a simple implementation of the contract communication to send message to the contract beam we need to build a cell that will contains of destination address also we need to attach some amount of grams almost for for reading fee and add message body and next this cell will forward to the central message function and goes to the contract a the contract a will receive the message to the req internal function and handle on the line 44 and next send the call back to the contract beam and contract B can handle this call back by the operation code you can choose the operation code to call the specific function that you want after the callback and handle this callback actually he'll try to make took understand like the what are the key features of silica rampant Network and how they implemented smart context with shower chains the main idea is that they have they use pretty simple approach they decided to have a low-level approach to develop smart contracts actually they have very simple stack based virtual machine and when you develop smart contracts you need to communicate directly with this machine actually have access like to the low level assembly and most of the smart contacts that are right now deployed at telecom open network they you can't deploy it without working with assembly it's like it's a bit difficult on the first time but because of this approach is much more easier to implement charging and implement device how you can send like how we confirm it we communicate between smart contexts in different shared chains and I think that it's very important to it's very important point that if we want to somehow to make to make it work and if you want to make his chartered smart contacts on the film like as fast as possible we need to make to think about how we can go to the mall or low-level approach and how we can simplify the like the approach to develop smart contracts on the low level currently I think it's a big problem on a film and it's like the way how we can fix it just looking just looking at how telecom open network implemented it secondly like as I said and actually the main idea that I think is very variable here is that they use actors model to communicate between shower chains and each like each unit of data each state is actually a combination of cells that actually I see as if you it's like a graph and because of that actually it's much more easier to chart this book chain on different notes so it's like I think the key feature of telecom open network the main problem that they have right now is because is lack of developers community and it's obvious because they don't have a normal documentation and they don't have any like public public communities that are active right now but basically they have a lot of Engineers solutions that are really nice and we can you use them in a form of a theorem for example so also I want to explain some another features that right now not very stable on Telecom for Network but it's really great and we can use them in the film 2.0 the main problem that we have right now is that if we will have smart contracts with charging the main idea of shots is that you can't communicate with other shots you don't use accounts like share data between them and because of that it's much more scalable you'd like Evernote don't need to communicate with another chart and because of that unique unit you can really scale like this chart chains but it's the main problem for protocols like dye for example you can't you need to find solution how we can send transactions between different sites I like between different work chains short chains and because and the only way how we can solve it is we need to have a common like we come to have a common contract between them and actually for example telegram open network they have a feature that you can actually deploy your smart context to the old short chains instantly you need to pay a lot for it but you will have a like you will just a small context state will synchronize between all the short chains and it's like a solution how you can like implement some critical protocols tokens for example for the old short chains and you can communicate with them on the old short chains and it's like the point how you can solve this issue on angelicum open network I think we can think we can make something the same on aphelion 2.0 and just like a good idea that I think we can be used there actually if you have any questions you can ask it right now like I think it's the I like the end of our talk like the main idea of this talk as I said was just to let's look about let's look at Jellico open network right now because they have a lot of interesting things there that can be useful for approach and the freedom 2.

0 like how we can scale it and how we can solve something with smart contracts and like this this one actually we decided to look at telegram open Network and research nothing there like what they have thank you you can use one private key for different contracts and how to build to the contract address when you deploy your contract you built there you have them source code cell will the fifth assembler and next it's an initial State a cell and initial storage cell and all these cells combined into one cells cell with their references and we get the hash from this cell and this hash will be the contract address basically basically that we don't have like a primitive like an account and done you just have a group of cells that somehow can be executed by Tom virtual machine and you need to explain like to say to settle to show how to how beautiful machine needs to communicate with these cells and if each time when you need to send some transaction you need to provide a signature and you need to implement six signature check on the smart contract and that's how you can build a wallet like you don't have a count and you don't have like the way how you send transactions is like on your own you can and you can use different the projects not only for example private key so like you can use do any approach how to send funds you just have like a small contract it's like a group of cells and there are some asses on this side like on this small contract and the way how this some small contract will send these grams is only controlled by these functions there and there is only an option to check the signature like we have implements like some precompiled features like how you can check signature there and because of that you can easily implement wallets for example but there is no any like legal there is no any official wallet and each time you need to create an account you need to solve on your own and decide on your own how you need to how you can create this wallet like what do you need you can actually create an account without any privacy like checking any signatures and responsible can be distributed by anyone who will make a call on this my conduct yes about amen actually the main idea is that you have identity of any smart conduct because when you deploy it to the network the day is like you will got an address on this network and this way you can how you can navigate and how you can send transactions with two different small contracts but if you don't probably don't even have private keys it's like only issue of persons who will deploy this my context because look anyone can just use this funds like they have a gas and also they have like a fee for that and because of that is also like they have a like you could like a way how to manage amount of trans ice amount of transactions from the network though it's like it's more close to the blood chains like stellar where you need firstly to send some money on the account to activate it it's pretty the same but on our terms we don't have an account at all we need to create this account on our own and each account is just our own custom smart contract and actually everything in tone is just group of smart contacts that's all like this the main idea that is very very customizable because you don't have it like a simple smart contract you can use one private key to manage multiple addresses multiples like smart contracts on this network and that's like the main point it's a bit different approach that we have at aphelion and Bitcoin and it's very I think it's like there are a lot of advantages and disadvantages of this approach because it's not so user friendly right now for most of the developers and for most of the users but on the same like on the same side it's very customizable and we can like create a lot of new features using this approach thank you [Music]

Automatic transcript — names and jargon may be misspelled.