Ethereum, conceptualized by Vitalik Buterin in 2013, is a blockchain platform that enables the creation of smart contracts and decentralized applications (DApps). The Ethereum ecosystem includes components such as ether cryptocurrency, keys and addresses, accounts, and transactions, with various versions released over the years culminating in the latest update, Arrow Glacier. Accounts in Ethereum can be externally owned or contract accounts, allowing users to interact with the blockchain through transactions that are digitally signed and executed on the network.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
17 views16 pages
Ethereum Part 1
Ethereum, conceptualized by Vitalik Buterin in 2013, is a blockchain platform that enables the creation of smart contracts and decentralized applications (DApps). The Ethereum ecosystem includes components such as ether cryptocurrency, keys and addresses, accounts, and transactions, with various versions released over the years culminating in the latest update, Arrow Glacier. Accounts in Ethereum can be externally owned or contract accounts, allowing users to interact with the blockchain through transactions that are digitally signed and executed on the network.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 16
ETHEREUM
Industry Use Cases Using Blockchain
ETHEREUM Vitalik Buterin conceptualized Ethereum in November 2013. The core idea proposed was the development of a Turing-complete language that allows the development of arbitrary programs (smart contracts) for blockchain and Decentralized Applications (DApps). Ethereum can be viewed as a transaction-based state machine. The first version of Ethereum, called Olympic, was released in May 2015. Two months later, a version of Ethereum called Frontier was released in July. Another version named Homestead with various improvements was released in March 2016. The latest Ethereum release is called Arrow Glacier, which delays the difficulty bomb, a difficulty adjustment mechanism that eventually forces all miners to stop mining on Ethereum 1 and move to Ethereum 2. ETHEREUM The Ethereum blockchain stack consists of various components. At the core, there is the Ethereum blockchain running on the peer-to- peer Ethereum network. Secondly, there’s an Ethereum client that runs on the nodes and connects to the peer-to-peer Ethereum network from where the blockchain is downloaded and stored locally. It provides various functions, such as mining and account management. The local copy of the blockchain is synchronized regularly with the network. Another component is the web3.js library, which allows interaction with the Geth client via the Remote Procedure Call (RPC) interface. ELEMENTS PRESENT IN THE ETHEREUM BLOCKCHAIN Ether cryptocurrency/tokens Keys and addresses Accounts Transactions and messages The EVM The Ethereum blockchain Nodes and miners The Ethereum network Smart contracts and native contracts Wallets and client software ETHEREUM ECOSYSTEM ARCHITECTURE 1. ETHER CRYPTOCURRENCY/TOKENS As an incentive to the miners, Ethereum rewards its own native currency, called ether (abbreviated as ETH). Ether is minted by miners as a currency reward for the computational effort they spend to secure the network by verifying transactions and blocks. Ether is used within the Ethereum blockchain to pay for the execution of contracts on the EVM. Ether is used to purchase gas as crypto fuel, which is required to perform computation on the Ethereum blockchain. There are now two Ethereum blockchains: one is called Ethereum Classic, and its currency is represented by ETC, whereas the hard- forked version i.s ETH, which continues to grow 2. KEYS AND ADDRESSES Keys and addresses are used in the Ethereum blockchain to represent ownership and transfer ether. The keys used are made up of pairs of private and public parts. The private key is generated randomly and is kept secret, whereas the public key is derived from the private key. Addresses are derived from public keys and are 20-byte codes used to identify accounts. 2. KEYS AND ADDRESSES The process of key generation and address derivation is as follows:
1. First, a private key is randomly chosen (a 256-bit positive integer)
under the rules defined by the elliptic curve cryptography secp256k1 specification (in the range [1, secp256k1n − 1]). 2. The public key is then derived from this private key using the Elliptic Curve Digital Signature Algorithm (ECDSA) recovery function. 3. An address is derived from the public key, specifically, from the rightmost 160 bits of the Keccak hash of the public key. 2. KEYS AND ADDRESSES Description of how keys and addresses look in Ethereum: A private key is basically a valid nonzero 256-bit integer randomly picked up from the range of the elliptic curve’s field size (order). Ethereum client software makes use of the operating system’s random number generator to generate this number. Once this integer is picked up, it is represented in hex format (64 hexadecimal characters) as shown here:b51928c22782e97cca95c490eb958b06fab7a70b9512c38c36974f47b954f fc4. A public key is an x, y coordinate, a point on an elliptic curve that satisfies the elliptic curve equation. The public key is derived from the private key. Once we have the randomly chosen private key, it is multiplied by a preset point on the elliptic curve called the generator point, which produces another point somewhere on the curve. This other point is the public key and is represented in Ethereum as a hexadecimal string of 130 characters. An address is a unique identifier on the Ethereum blockchain, which is derived from the public key by hashing it through the Keccak-256 hash function and keeping the last 20 bytes of the hash produced. An example is shown here: 2. KEYS AND ADDRESSES The public and private key pair generated by the new account creation process is stored in key files located locally on the disk. These key files are stored in the keystore directory present in the relevant path according to the OS in use. The private key is stored in an encrypted format in the keystore file. It is generated when a new account is created using the password and private key. The keystore file is also referred to as a UTC file as the naming format of it starts with UTC with the date timestamp therein. A sample name of a keystore file is shown here: UTC--2022-01-18T17-46-46.604174215Z-- ba94fb1f306e4d53587fcdcd7eab8109a2e183c4 It is imperative to keep the associated passwords created at the time of creating the accounts and when the key files are produced safe. As the keystore file is present on the disk, it is very important to keep it safe. It is recommended that it is backed up as well. If the keystore files are lost, overwritten, or somehow corrupted, there is no way to recover them. This means that any ether associated with the private key will be irrecoverable, too. The key purpose of this file is to store the configuration, which, when provided with the account password, generates a decrypted account private key. This private key 3. ACCOUNTS An account is one of the main building blocks of the Ethereum blockchain. It is defined by pairs of private and public keys. Accounts are used by users to interact with the blockchain via transactions. A transaction is digitally signed by an account before submitting it to the network via a node. With Ethereum being a transaction-driven state machine, the state is created or updated as a result of the interaction between accounts and transaction executions. With every new block, the state of the Ethereum network is updated. Operations performed between and on the accounts represent state transitions. The state transition is achieved using the Ethereum state transition function, which works as follows: 1. Confirm the transaction validity by checking the syntax, signature validity, and nonce. 2. The transaction fee is calculated, and the sending address is resolved using the signature. Furthermore, the sender’s account balance is checked and subtracted 3. ACCOUNTS 3. Provide enough ETH (the gas price) to cover the cost of the transaction. This is charged per byte and is incrementally proportional to the size of the transaction. In this step, the actual transfer of value occurs. The flow is from the sender’s account to the receiver’s account. The account is created automatically if the destination account specified in the transaction does not exist yet. Moreover, if the destination account is a contract, then the contract code is executed. This also depends on the amount of gas available. If enough gas is available, then the contract code will be executed fully; otherwise, it will run up to the point where it runs Out of Gas (OOG) . 4. In cases of transaction failure due to insufficient account balance or gas, all state changes are rolled back except for the fee payment, which is paid to the miners. 5. Finally, the remainder (if any) of the fee is sent back to the sender as change and the fee is paid to the miners accordingly. At this point, the function returns the resulting state, which is also stored on the blockchain. 3. ACCOUNTS Two types of Accounts: Externally owned account (EOA): EOAs are similar to accounts in Bitcoin that are controlled by a private key. The same as in Bitcoin, where an address is controlled by a private key, Ethereum addresses are also controlled by their corresponding private keys. They are defined by three elements: address, balance, and nonce. They have the following properties: They have a state. They are associated with a human user, hence are also called user accounts. EOAs have an ether balance. They can send transactions, i.e., can transfer value and can initiate contract code. They have no associated code. They are controlled by private keys. An EOA’s public address is derived from its private key. EOAs cannot initiate a call message. Accounts contain a key-value store. 3. ACCOUNTS Contract account (CA): CAs are accounts that have code associated with them in addition to being controlled with the private key. They are defined by five elements: address, balance, nonce, StorageRoot, and codeHash. They have the following properties: They have a state. They are not intrinsically associated with any user or actor on the blockchain. CAs have an ether balance. They have associated code that is kept in memory/storage on the blockchain. They can get triggered and execute code in response to a transaction or a message from other contracts. A CA’s public address is the combination of the public address of the EOA that created it and a transaction counter (how many transactions the EOA has sent) nonce. They have access to storage and can manipulate their storage. Also, CAs can maintain their permanent states and can call other contracts. 3. ACCOUNTS A CA can only be created from an EOA or from an already existing CA (contract). CAs cannot start transaction messages. CAs can initiate a call message, i.e., can call other contracts and contracts’ functions. • CAs can transfer ether. CAs contain a key-value store. CAs’ addresses are generated when they are deployed. This address of the contract is used to identify its location on the blockchain. Accounts allow interaction with the blockchain via transactions. 4. TRANSACTIONS AND MESSAGES A transaction in Ethereum is a digitally signed (using a private key) data packet that contains the instructions that, when completed, either result in a message call or contract creation. Transactions are constructed by an actor external to the Ethereum blockchain or some external software tool. Smart contracts cannot send a transaction.