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

Loading player…

Introduction to Ethereum with Michał Sieczkowski

ETH WarsawThu, Oct 7, 2021, 12:00 AM

Workshops for blockhain beginner devs. Learn how to build on Ethereum! BOUNTY LINKS: Hermez Network: https://gitcoin.co/issue/hermeznetwork/0xhack/1/100025692 https://gitcoin.co/issue/hermeznetwork/0xhack/2/100025700 https://gitcoin.co/issue/hermeznetwork/0xhack/3/100025693 https://gitcoin.co/issue/hermeznetwork/0xhack/4/100025694 DevCon: https://gitcoin.co/issue/EthWorks/hackathons/1/100025722 Golem: https://gitcoin.co/issue/golemfactory/hackathons/18/100025686 Polygon: https://gitcoin.co/issue/maticnetwork/matic-bounties/21/100025715 Status: https://gitcoin.co/issue/status-im/0xHack/3/100025685 https://gitcoin.co/issue/status-im/0xHack/2/100025680 https://gitcoin.co/issue/status-im/0xHack/2/100025680 https://gitcoin.co/issue/status-im/0xHack/1/100025679 Ethworks: https://gitcoin.co/issue/EthWorks/useDApp/181/100025575 https://gitcoin.co/issue/EthWorks/useDApp/180/100025574 https://gitcoin.co/issue/EthWorks/useDApp/179/100025573 https://gitcoin.co/issue/EthWorks/useDApp/178/100025570 https://gitcoin.co/issue/EthWorks/useDApp/176/100025566 Moonbeam: https://gitcoin.co/issue/PureStake/hackathon-0x-moonbeam/2/100025702 https://gitcoin.co/issue/PureStake/hackathon-0x-moonbeam/1/100025701 Ramp: https://gitcoin.co/issue/RampNetwork/0xHack/1/100025724 https://gitcoin.co/issue/RampNetwork/0xHack/2/100025725 https://gitcoin.co/issue/RampNetwork/0xHack/3/100025726 Chainlink: https://gitcoin.co/issue/smartcontractkit/chainlink/4375/100025683

Transcript

hello everyone uh sorry for a slight delay uh i had some internet connection problems uh let me know in the chat if you can hear me if anyone could just write a message okay that's fine um yeah so let me introduce myself first uh my name is mihao i'm a software developer here at youthworks i've worked on a multiple of projects related to blockchain for instance i worked on ecosystem developer tools like waffle or hardhat and today i'd like to give you a more technical presentation on ethereum so the previous presentations were more high-level introduction to to the columns concepts that we deal with in blockchain and in this presentation hopefully i'll clarify some uh more technical aspects um so without further ado let me start first in order to talk about ethereum i need to first say a few words about blockchain so this presentation doesn't assume that you know anything about blockchain but it assumes that you have some technical background that you understand understand some uh it related terms so what is a blockchain uh a blockchain for a programmer or developer is yet another database but this database is different than any other that we have the main the main differentiating factor is that it's decentralized so uh blockchain uh is a database that is not only distributed it's also decentralized which means that no single entity control it and everyone has equal rights when writing and reading from this database the way it's done uh it's based on a peer-to-peer network uh where many computers distributed around the world collectively maintain the database there are many different types of nodes in this network but some of them hold all of the data that that the blockchain contains and these are called so-called full nodes other nodes are called miners and these are also responsible for uh for writing to this database uh more but more on that topic later what else can we say about blockchain is a blockchain is a public transaction ledger it means that it records transactions just like any other database a data structure that is created inside the blockchain is a linked list of blocks that's where the name comes from we call it a chain because this list is immutable which means that you cannot change data that was added in the past and obviously there is no central administrator because it's decentralized blockchain can also be viewed as a state machine so you have a you have a genesis state uh which uh in case of bitcoin uh we can think of it as uh balances of all of the accounts and then you have a bunch of transactions which can be seen as for instance transfers of cryptocurrency and when you apply those transactions you get a new state what's important here is that you only get a new state after applying all of the transactions that happened in a single block there's nothing in between we only care about the states at the given block height other blockchains than bitcoin for instance ethereum make the notion of transaction more general and in ethereum you not only have transfers of digital currency uh you can in ethereum you can program any logic that you like which basically means that you can create smart contracts and your own state's transition functions i mentioned that a blockchain is a linked list of blocks so and i also mentioned that it's immutable imitability is possible thanks to a special function which we call cryptographic hash function and uh let me first remind you what are the properties of of this this function because it's used everywhere in the blockchain in in blockchain domain so hash function is a function that given an arbitrary length input produces an output that looks random to normal to human to humans and it has special properties so the first property is that it's deterministic uh given an input you always get the same outputs no matter the the time that you're invoking the function or the context uh another important property is that it's one way uh which means that uh given the the hash so the the output of the of the of the hash function it's hard to determine the input here the the example with two colors mixing is is intended to give you some intuition so uh when you have a mixture of two colors it's it's hard to know what what were the the input colors yeah um another property of hash function is that it's collision free so it's very hard to find two inputs that produce the same output it is physically possible but it's so improbable that that we assume it's not possible uh also another feature is that even the slightest change of input produces a completely different different output so you can't so you cannot uh like uh based on on the similarity of outputs say that the inputs were similar as well it's not it's not the case with a hash function so given such a strong cryptographic tool you can build an immutable chain immutability is preserved in this way that you hash a header of the block and you store this hash in the next in the next block um and uh this is this this happens for every blocking the chain uh this way the hash that is stored in the in the latest block uh is uh is uh sort of a hash of all of the previous blocks if anything changed in block 38 the resulting hash that is stored in block 39 would change and so on this is how it's done whatever mentioned in the comments section that you can ask questions and raise your hands on airmeat at any point in time feel free and i'll be happy to answer some questions we have two models of blockchains the first one is called account model and the other utxo ethereum uses account model which is uh easier for humans to understand so we have accounts just like your bank bank accounts where you have uh some balance and then transactions transfers of money from one account to the other you store not only the the transaction data you also store every every intermediate state this is the case for account based blockchains in bitcoin you don't you don't store the intermediate states you only store transactions so in order to get to know how much money i have at given point in time i need to go through all of the transaction history for my account from the genesis state this is the main difference between those two models a blockchain in order to be able to deliver this decentralized feature needs a consensus algorithm the main the main point of this algorithm is to is to um help nodes determine a common state of a blockchain because you have a database that that multiple actors can write to we need a way to to tell what is the the common state among all of the actors the second necessary feature of this algorithm is that no single node of the network can dominate building blocks so no single node can take control over the network and an algorithm that was proposed by satoshi nakamoto in the original bitcoin white paper is proof of work and this is essentially what we use up until now in many blockchains so in this slide i'll try to briefly explain uh how technically pro work works so uh the diagram that you see here is uh what is what a minor node does how he operates so a minor first listens for transactions that are distributed in this peer-to-peer network and chooses transactions to be included in the next block so he tries to add a new block to this existing chain when he picks transactions he then needs to solve a computational problem uh and after he does it he he is only allowed to uh to add the block to the blockchain why solving such problem um well this makes it less probable that two miners will arrive at a new block at the same time because it's time consuming and you need to burn a lot of computing power and and energy and money as a result and uh and as i said it's it's it's uh not very probable that two miners will arrive at the same solution at the same time so in order to what what this problem is about this problem is about calculating a hash function that has a number of zeros at the beginning what does it mean so i mentioned that uh it's hard that that one that the hash function is one way it's hard to get the input that produces an output that you would like to see therefore in order to get an output that has many zeros at the beginning uh you have you essentially need to uh play a game of trial and end error you randomly choose data that you said so there's input and hope to get an output in this case the input is the log data and an additional field of the block which is called nonce that you choose randomly this nonce was present here in the block header you do this in the loop after you arrive at the solution you immediately show off to other nodes in the network and and your block is added to the blockchain the algorithm managed to choose a single person that will determine the next block for the entire network in case uh while you're doing this computation someone else arrives at the solution uh you need to stop because the block you're trying to build is probably probably consist some of the transactions that were already added you need to basically start from scratch if you have any questions regarding this algorithm feel free i'll try to answer them as we go uh now what is this algorithm for uh well it solves a problem that is called double spending and this slide will try to explain this problem uh assume that we have a blockchain that has 50 blocks so far and we start our experiment from here we have a buyer and a seller a seller will offer some digital goods which can be bought using bitcoin uh at state b the buyer creates a transaction that sends bitcoin to to the seller he announces this transaction it gets picked up by some miner and included in the block number 51. let's assume that the buyer is also a miner and at the same time he starts building his own version of the blockchain but he doesn't he doesn't show this this version to the rest of the network uh in his version of the blockchain there was no such transaction that that transferred money to the seller and then at state c we have we have another block built on top of the block 51. the seller assumes that he got one confirmation uh it's enough to to trust that he got the bitcoin and he will send the digital good to the buyer buyer at the same time still builds his own version of the blockchain without this transaction after he receives the digital goods what he does he is he publishes his version of the blockchain and now here is a rule that says that uh in blockchains the chain with the most blocks is the one that we choose as the current chain the chain that is is the real thing um such situation is not possible with uh algorith with consensus algorithm like proof of work because uh how would how would the buyer be able to outrun outrun the rest of the network in order to do that the buyer would need to have at least 51 percent of the competing power of the network uh this is so called 51 attack and and so so he would essentially need to have the majority of the competing power of the network to be able to produce produce the results of this computation fast enough to outrun the rest of the network in practice this number is a bit lower it's not 51 percent uh it's somewhere in somewhere around 30 i think but this is enough for for a decentralized network to operate obviously people came up with different consensus algorithm to name a few we have a proof of stake proof of authority capacity and elapsed time i don't have time to talk uh to talk about them all today but uh i can mention that proof of stake is a family of our algorithms that will have more uh importance in the future uh ethereum 2.0 uh has will have consensus based on proof of stake okay after this introduction uh we can dive into ethereum internals so first things first what are the main features of ethereum it's a relatively new thing it was proposed in late 2013 by programmer named vitalik buterin the development started briefly after and the the first mainnet block was mined on july 30 2015. so as you can see ethereum is only like six years old uh it's still er in i think it's still an uh a relatively new system uh it has consensus consensus algorithm based on proof of work uh it has its own cryptocurrency which is called ether and ether is divisible down to 10 to the power of 18 uh so just like in dollars you have cents one ether is 10 to the power of 18 they ethereum uh is uh an expansion of of bitcoin in the sense that it can handle more complex smart contracts and in order to to do that it implements turing complete and deterministic virtual machines now i would like to start talking about ethereum internals ethereum data structures and stuff that you need to know in order to start using ethereum as a user and also as a developer so let's start with uh the world state what is the world state in case of ethereum so in case of blockchain you could say that the world state is how many in in case of bitcoin you could say that it's how many how much money each account has in ethereum it's a bit more information but again you have you have accounts which have which has uh which have addresses now we have two types of accounts there are some accounts that are controlled by users using their private keys and there are also accounts that are controlled by a smart contract code i notice a question i think we will publish those this presentation afterwards somewhere as pdf going back both of these accounts have a balance which is how much money it holds in ether and also they have a field called nonce which is a transaction counter which means how many transactions this account made so far uh notice that there is a non name collision this nonce here is something different than the nonce you saw in the block contract account also has the source code that controls it and a storage that you can write data to so again the same thing on a different slide you can see two types of accounts only externally owned accounts are controlled by people or machines that hold private keys to them now uh how do you get an address of an account in case of externally owned accounts you have a private key from which you derive public key and then you you take you you hash this public key and uh take uh 160 bits of this hash and this is the address so the address of the externally on account is derived from its private key in case of contract accounts because each contract account is created by some externally owned accounts the the address of contract account is a is a hash of uh some externally owned accounts and this externally on the counts nones uh so for instance if my account uh creates a some contract account as the first transaction it will be the address of my account and uh loans zero then then you hash those both those two informations and take 160 bits it's the is the address of the new new contract account uh there is also one other way to create uh contract accounts in ethereum but which is called create two uh but uh i'm gonna i'm not gonna cover this this topic in this presentation now let's talk about transactions transactions can only be sent by externally owned accounts so if you ever heard about something happening automatically on blockchain that smart contracts talk to each other without some external interaction it's not true uh every every interaction in blockchain is triggered by some external actor it obviously can be some service that holds keys to the private it holds the private keys it doesn't have to be a human every time but it's always triggered from the outside so an external actor creates a transaction and we have two transaction types the first type is contract creation it's a transaction that creates a contract account so it creates a smart contract and the other type is called message call and uh it's a type it's a type of transaction that for instance can invoke some method of an existing smart contract so here you have another slide that shows that a transaction containing initialization code can create a new contract account that has its its source code and its storage a message call on the other hand can given some input data update the storage of an existing contract account now i would like to show you a couple of slides that help understand those two types of cons accounts more so imagine the blockchain system as a circle you have green external accounts on the border of the circle and the contract accounts uh in the middle of it uh only the the green uh the green uh uh circles can uh be entry points to the system so uh you have different types of transactions the first type is a normal ether transfer between two externally owned accounts just like transfers of transfer of bitcoin between two to accounts in case of bitcoin then you can also call a method on a smart contract you can also have a smart contract doing interaction with other accounts so for instance you can call some smart contract which will in turn send some ether to external accounts you can have a logic that is more complex than that and uh i guess we can have a smart contract that creates a chain reaction it calls a couple of different smart contracts which can uh which can uh in turn call uh externally on the send ether to extremely owned accounts and so on now let's talk about about transaction fields so this is uh these fields uh at least couple of them you need to know because you need you you specify them when you send any transaction for instance using metamask which i will talk about more later um so every transaction has announced and in this case this is the nonce of the account so uh if if it's the first transaction that i make the notes will be zero and uh or one i'm not completely sure but it will be the first notes here and then we have two fields that i'm gonna talk about uh just in just a minute then you have the recipient address you have the the value of ether that you are sending along this transaction it can be zero if you're not if you don't want to send any ether then you have three fields which uh together uh make up the digital signature uh of the transaction uh and that's why you don't have a field called from which means the sender of the transaction because you can derive the address of the sender from the digital signature the last field is called init or data it depends on the type of transaction that you're making if you're creating a new smart contract this field is called init if you're calling an existing smart contract uh it is called data by the way each transaction obviously is signed using the private key to your externally owned account as i mentioned before contract accounts don't have their private keys they are controlled by the code that's why they don't they cannot initiate transactions so smart contracts can only call other contracts in a transaction that was initiated by an externally owned account so the all of these arrows that arrows that you see here are a single transaction let me now introduce you to the topic of gas so in ethereum gas is the unit of uh cost that the network needs to make to handle your computations and to store your data so each transaction costs some fee that is that is collected by the miners so there are two incentives for the miners to even take part in this proof of work algorithm that are that i talked about the first incentive is the popular mining uh so you mine a new cryptocurrency uh you might you mind with every block you are the miner is allowed to create a new transaction that will uh give him some cryptocurrency uh that wasn't present before so he minds new new coins and the other source of income uh is transaction fees from from all of the transactions that are included in the book in order to calculate those fees we need we need gas so every operation that is done on blockchain has some predefined cost then you sum all of those operations and you get you get an amount of gas that was used by a transaction to calculate the transaction fee uh you multiply the the the gas gas used value by some gas price it's similar to normal uh gas that we used to power our cars with uh you you you need to you need an amount of gas to travel some distance and you pay some some price for this uh for this gas to get the the price of the journey you you have to multiply the price of your uh of the gas by the the amount of uh of gas used by your car yeah so it's pretty easy to to understand this concept now uh what's what may be uh interesting for someone new to blockchains is that you yourself set the gas price with every transaction that you send you specify the gas price that you want to pay for this transaction okay so why don't you just set the gas price to zero and have have transactions that are free of charge well you need to you need to know that that miner earns by collecting the fees of the transactions so at any point in time there are more transactions uh in the network than can fit in a single block so what what the miner does the miner first sorts those transactions by the gas prices and he picks up those that will give him the most fees this is like the more the this is the the way majority of miners work on the network unless you have some philanthropic miner that mines transactions for free so the amount of gas price that you need to pro that you need to provide uh or the price of the gas that you need to set is not something that's uh set in stone it changes you have a market you have an open market where you have the normal economic rights of demand and supply in action and the price changes every day you need to keep track of this price and set it in a way that will will let you your transaction be mined in some reasonable time thankfully we have tools that do that for us we don't have to worry too much about it ourselves okay so the next field that you are setting yourself is gas limit gas limit is simply a field that lets you limit the the amount of gas that will be burned so using gas limit you can calculate the maximal transaction fee that you will pay for a transaction why would you want to limit that well assume that you're calling a method on a smart contract that has uh that has a loop in it let's say for some reason this loop or the smart contract has a back and this loop is unbounded in this case such transaction could drain all of your funds really quickly because because it goes into loop gas limit is a field that lets you prevent that situation um well in real life you wouldn't lose all of your money money in such case because there's also a gas limit to a block so a single block cannot cannot contain uh more computation than than some amount of gas so you would eventually hit the hit the block gas limit but anyway you can also individually set gas limit for each individual transaction uh you may be also wondering uh how do you know what gas limit to set well in case of normal ether transfers uh it's predefined it's 21 000 gas in case of uh smart contract methods invocations again we have tools that help us those tools simulate the transaction that will happen in the blockchain and and take the result of the simulation and set the gas limit accordingly it's not so easy to easy task because sometimes you can have a logic that changes over time in the smart contract and the time you make the simulation is different than the time the miner actually runs your transaction but it's still better than guessing every transaction in in in blockchain is atomic so let's say uh you have uh you have an error happening instead of instead of a transaction if some state change was made made before that error this state change will be reverted because transaction is as an atomic operation it's either all complete or it's reverted and has no effect on the state [Music] transactions are never executed in parallel which can be actually mind-blowing so you have a global system called ethereum uh global computer run by thousands of nodes in the peer-to-peer network and you only have one you only execute one transaction at a time one after the other so this is the case currently in ethereum and it's probably one of the the main reasons we have scalability problems in ethereum which we try to solve with uh uh with rollups and uh and and uh ethereum 2.

0 uh which is a much much much wider topic i i don't have time to cover it right now but but you can imagine where the bottleneck comes from it's not guaranteed that you will you will get your transaction before someone else so even if you send your transaction first it's still possible that someone that did it after you will get his his transaction mined first uh well why is the case why is it the case it can be the case of simply a geographical uh location so uh you need to bear in mind that you are sending a transaction uh in a pretty pre-network and and the miner can be in totally different location so assume you're in the united states the miner is in china someone else sending transactions from china can be closer to the miner and this way his transaction will be noticed first um i now notice that we have some questions in the questions tab uh i'll try to answer them uh after i finish this section uh so vote on the ones that you that you want answered the most and uh i'll tackle them in a minute um order within block is is determined by the miner i already mentioned that so the miner sorter sorts the transactions by by the gas price and and he is in charge of the order order between blocks so which miner gets to my mind the next block is obviously uh determined by the consensus algorithm in case of ethereum and bitcoin it's pro of work uh okay so let me look at the questions has blockchain ever been hacked okay so hacking a blockchain is a very very broad term and obviously we have multiple blockchains uh if we're talking about uh consensus algorithm so has has anyone been able to to hack pro work uh yes it is possible especially in networks that don't have a lot of nodes so in such networks like uh some other cryptocurrencies that are not so popular which are simply uh forks of existing blockchains uh it's uh totally possible to get gets 51 of all of the competing power uh you essentially can hire enough machines to to join this network and and and gather enough competing power in this case 51 percent attack is is possible and someone could double spend the same money or do other other malicious uh malicious activity uh it happens uh i i i don't i don't think i can give examples uh right now but it definitely happened in in less popular popular uh blockchains and what's important though is that it doesn't really happen in bitcoin or ethereum because those networks are highly decentralized and have thousands of nodes taking part in this com competition of pro work and it's enough that we assume that it's not possible to hack pro work there's also the topic of hacking smart contracts but that's whole domain of of different attacks and i don't think i have time to cover this right now there's one question about eip 1559 i don't think i can answer it right now because uh i only heard the the news about it i didn't read for this back yet so sorry i'm not capable of answering this this right now um is it possible to move bitcoin from pro work to provost take to increase the scalability well in principle it is it is possible to move from poor work to prostate but this will require everyone moving to this new network and everyone updating their their software so you can you can imagine that uh with such move you will have a fork and you will end up with a bitcoin on proof of stake and a bitcoin on on pro work because not everyone will move so such changes to the to the protocol consensus need to be uh well thought and planned in advance and this is what ethereum is doing right now we are having a trial network of ethereum 2.0 and there will be a modular upload approach to this where current ethereum network will be connected as a one of the ethereum 2.0 subnetworks so to say so this is my answer to this question uh i'll go for the presentation and if we have some time at the ends i'll answer the rest of the questions okay let's talk more a bit more about smart contracts [Music] they are executed on something called ethereum version virtual machine you can think of it as of other virtual machines so for instance if you ever coded in java you have jvm so java is compiled to a byte code that is executed on the jvm implementation similarly in ethereum we have higher level languages like solidity which are compiled down to evm bytecode which in in turn is executed on ethereum virtual machine so evm is completely isolated from the the operating system it doesn't allow for instance making http calls to some other services connecting other networks uh and there's a strong reason for it and the reason for it is that it needs to be deterministic so imagine that as a part of your transaction you want to query some http server some search central server using http uh well different nodes of if you network while executing those this transaction could get a different result from the server and introduce non-determinism we cannot accept that allow that so that's why evm doesn't even support such operations you have a set of supported operations which are nicely presented in something called ethereum yellow paper and by the way uh each of this these low-level operations has has a set uh gas uh that they use and the way you calculate uh how much gas a transaction used is by counting those low-level operations so solidity is the most popular language that was implemented on top of this ethereum virtual machine there are many other languages but this is you guys you can say the solidity is is the standard one right now it's object object oriented and static statistically typed it supports inheritance libraries and you can define your own types there it looks very similar to its syntax looks very similar to the javascript java or c plus plus so uh learning it is really uh is not so so so difficult because the syntax is really really familiar um let me now talk a bit about uh how we view uh what's going on right now in in the blockchain space so uh in early days of of internet we had a client server model where we built services run on our own hardware and then we we built clients that we often installed on on some on some client computers now we have web 2.2.0 where we no longer have our own infrastructure we usually rent it from some providers like aws or google cloud and our applications are no longer installed on the on the client computers we run them in browsers and we move some of the computation to the to the browsers the but we still have a client and server model where our services are centralized in case in case some data center goes down it's very high very likely that the whole service goes down and some people argue that this is not what the internet meant to be and with web 3.

0 we are trying to build a better model that is distributed and decentralized in this model you no longer have a central server you have nodes of a pew to pure network which can be located closer to you geographically for instance you can be uh downloading data from your neighbor instead of some server in in a foreign country and in this model you need you need blockchain to provide the common state of the of of the service uh you also need some distributed storage because uh as you'll learn blockchain is not really the place to store big amounts of data because it's really costly uh some someone made a comparison that storing a photo of lamborghini on the blockchain is more expensive than than the lamborghini itself so that's that's the amount of money that we're talking about so the idea is that we can use distributed storage uh and there are many protocols existing like ipfs that work similarly to to uh torrents which you can which are probably more familiar to someone who didn't didn't have experience with the distributed systems before and obviously we run our applications in in browser browsers and such applications are named decentralized applications the apps for short and uh their main their main differential feature is that they uh they interact with smart contracts that that are deployed to some blockchain network other than that they can be viewed as normal internet applications as normal web apps so an architecture of such application can look can have three layers you have a presentation layer in the browser which is managed by html and css and also some javascript then you have a logic layer where javascript can also be used but the the the majority of but the main logic is is done in the smart contract and also you have a data layer which uses blockchain and also i think i should mention distributed storage here here as well and one of the properties uh of the apps is that they are they currently can be used by any anyone so you don't need a special software to use a decentralized application your browser is enough but in order to make transactions and interact with such a such application you need either browser that already supports crypto wallets or at least you need an extension to the to the browser when it comes to browsers with support i think opera already does and the the extension that we use the most is called metamask so metamask is a crypto wallet that can hold multiple ethereum accounts and it lets you make transactions it shows you balance of your account and also balance in your c20 tokens that barclay probably mentioned in his presentation um [Music] it works with multiple networks so uh not only uh main ethereum network but also it works with development networks so it's useful for for programmers when they build applications the other service service no worth mentioning is etherscan and etherscan is a website a service that tracks the state of the blockchain we call it block explore explorer because it lets you view the data of all of the blocks it tracks all of the transactions shows you their status whether they were already mined or are still waiting for a miner to pick up ether scan also enables you to verify a smart contract what it means it means that in blockchain you only store this low level byte code of smart contracts as you can imagine bytecode looks like assembler it's not non-readable by humans that's why etherscan has a feature that you can upload the code the source code that was used to generate the bytecode and and it verifies that it's uh it's the same the source code matches what what can be seen on blockchain and and presents it nicely on the on the smart contract page uh it also recently they also even added a feature for you to interact with uh such smart contracts so uh etherscan can be sort sort of front-end for for smart contracts that you can use to make transactions thank you for your attention that will be all for this presentation uh here are the sources of images that i used and let me now answer some more of your questions feel free to ask some more and i'll try answering the ones that i left previously okay there is one very interesting question uh by andre why are most uh the apps working on on web whereas in web 2.0 users interact more with smartphones how difficult is it to build the apps on mobile devices okay so first of all i think we can see some move on mobile devices from applications that you install towards so-called i forget the name but but what i'm what i mean are applications that are web apps which look like normal apps on on mobile devices so you obviously can use the apps which are web apps on your mobile device you would need some special browser for it but it's totally possible it is also possible to create native mobile apps that connect to blockchain now what i didn't mention in this presentation is that to run a full blockchain node is a really data consuming task so you need a lot of storage to hold all of the blockchain data to give you some idea right now i think one of ethereum implementation implementations called parity you need somewhere around 400 gigabytes to run a full node and the full node is not even the the the node that holds entire history of blockchain there is a separate node called called archival node that does but full node is enough for you to be sure that uh that your for for you to be using uh blockchain uh trustlessly uh now uh this is too much for someone to to use to store on a mobile device uh it's also not convenient for people to use uh to use such such software on their consumer laptops because they don't have 400 gigabytes of storage available so what do we do in practice you have two options first you can use a node that is provided by someone else and you have excellent uh excellent uh services in ethereum that offered such feature for for free [Music] they are called infura and alchemy recently so such services allow you to send a transaction in a trustless way but then you do need to place a bit of trust in them because the data that you get from them is can be can be altered in some way so you need a bit of trust to use to use the network in this way but you are sure that your transactions will never be uh faked in some way because you still hold private keys that you did that you use to create digital signatures and sending transactions using using such services is completely safe the other the other way i mentioned is running a light client so a third option i mentioned archival node full node and light node light node is something we are able to run on a mobile device this is a node that doesn't store much data it only stores enough data that it's sure that that the block history wasn't tampered with and the rest of the data it queries other nodes of the peer-to-peer network so when it tries to fetch some balance at a block that was mined like two weeks ago it needs to ask some other know hey give me this data i need this right now and for the current block it stores only the it stores only the block header so the running light node is totally possible on a mobile device and you do have ethereum wallets wallet apps that that do this and you could also create a mobile application that uses a smart contract and runs a light node uh if gas price is a set number how will it change when layer 2 for ethereum arrives well gas price is not a set number uh it's something that's uh and you you you specify it but the amount that you should specify is uh determined by the the market you have for instance to get to know what gas gas price you should use you can use a service you buy by etherscan that shows you uh uh what other transactions uh mind used recently i'll i'll be posting a link to this uh to this uh service in the comment in the chat section so you can take a look and how does it change when we move to uh how uh how will it change when larry two for ethereum arrives the gas price of your transactions will be much much lower and that's that's one of the the points of layer two solutions um this is because in larry two solutions we batch transactions that happened in this layer two and we submit only a batch of transactions to the main ethereum network it's much broader topic but you can say that transactions should be at least two orders of magnitude cheaper i think it's safe to say that uh for more information on layer 2 i strongly recommend vitalik's article on this topic i'll try to quickly find a link to it i think there he goes also through transaction costs and what we expect to see uh andrew mentioned that it's still hard for him to understand uh sure i i didn't even try to explain how a light node works uh in detail because i would need to introduce you to the topic of miracle trees and uh how uh what are the contents of blocks and this is uh i thought this is too much for a single presentation uh i'll try to post some links here after after i go through all the questions okay uh where can we check normal gas price for ins for instance using the site that i already posted to deploy our id app do we need a real ether not a test net ether uh it depends on the network you're trying to deploy to uh if you're deploying to a test net and there are multiple of them you need ether from this test net so for instance you have ring cabi test net you need ring cabinet here there's uh robsten test net and also kovan i think these are the ones available right now and i mostly use drinkability in the past for my projects and i can i can quickly paste a link to to a website that uh gives away uh those tests not ether this does not ether for free unfortunately i don't have a button to mark questions and as answered but if i'm not mistaken i covered all of them okay uh i think mater did it for me and uh yeah i'm listening for some other questions uh feel free to ask anything here that's on your mind and i'll try to look for some resources for andrei okay so uh here's a link to an excellent uh introduction to all of the different uh ethereum notes uh i think i read it recently and they also mentioned light nodes there and multiple different implementations of ethereum that you can use as part of your your project uh yeah i i already answered that that uh you will get this presentation as a pdf later on whatever do we have a way to forward this pdf should we we will probably it will probably be possible to post it on this card so if you're not already there you should probably join xerox hack discord and we will be posting it somewhere there yeah okay if you don't have any other questions thank you very much and i invite you to my next presentation which will start in i think 35 minutes i'll be covering basic solidity topics there how did i get to be a blockchain developer um so uh i started uh being i i i started looking into this subject on my own uh i was studying at warsaw university of technology and had to make a bachelor thesis about something so i figured why not make a bachelor thesis on a topic that actually interests me and i i studied ethereum and ipfs as as part of it and shortly after i i got a position at it works and we and have been working here for almost two years right now we're building a awesome stuff and we often hire new people so uh i encourage you to to look around for for open positions okay i think we can wrap this up thank you very much again for your attendance and i hope to see you in in 30 minutes

Automatic transcript — names and jargon may be misspelled.