Other concepts

Since Ethereum is built on top of Bitcoin, many of the basic concepts were already discussed in Chapter 12Introduction to Blockchain Technology. For the rest of this subsection, we briefly cover a few of them with a focus on the key differences.

  • Consensus algorithms:
    • Like Bitcoin, PoW is its consensus algorithm. Unlike Bitcoin, Ethereum is working on switching to another consensus algorithm called Proof-of-Stake (PoS) to significantly improve performance with its next release tag of serenity.
  • Private blockchain:
    • In general, both Bitcoin and Ethereum are public blockchains since the network is open to anyone and a node can join freely.
    • Ethereum has variants on private chains. With private Ethereum, a node needs approval prior to joining a network. These blockchains are called private blockchains. Private blockchains are suitable for enterprise applications. Hyperledger and JPM Morgan's Quorum are examples of well-known private blockchain variants of Ethereum. Another example is Brainbot's hydrachain.
  • Off-chain data:
    • With the Bitcoin blockchain, we do not talk much about the concept of off-chain data. With the Ethereum blockchain, this topic needs to be discussed. There are multiple scenarios where data cannot be stored on-chain:
      • The first case is state variables. All data stored in a blockchain is immutable since the contents of a block are hashed and blocks are linked via these hashes. A tiny change in the contents of a block will lead to the reconstruction of all the blocks afterwards, which is obviously not feasible. However, state variables are, for instance, used to hold balances. They do change content to reflect the balance move. A solution is to save them off-chain.
      • Oracles are another example, where information pulled from external sources is saved off-chain to be fed to smart contracts.
      • Ethereum was invented to allow for trading generic digital or digitized assets. Metadata describing the underlying assets is saved off-chain.
      • With Bitcoin, the distributed ledger has to be saved on all nodes in order to provide the information required for transaction validation. In the case of Ethereum, the balance of a cryptocurrency or digital asset can be directly retrieved from state variables. There is no need to browse the ledger to obtain balances in order to determine whether a _from address has sufficient funds. As a result, a full node can choose to keep only a portion of the ledger, that is, trim a ledger. The blocks being trimmed can be saved off-chain at a centralized location for future inquiries.
  • Testing:
    • It is vital to thoroughly test, double-test, and triple-test a smart contract. Safety testing is critical. As explained earlier, in Ethereum's short history, there have been several high-profile hacking events, which occurred mainly due to buggy smart contract code.
    • Ethereum is less safe than Bitcoin because of bugs introduced in smart contracts. Ethereum smart contracts are saved in chained blocks and are not encrypted. Hackers can easily spot and explore the vulnerability of buggy contract code and engage in attacks. On the other hand, like Bitcoin, data and transactions on Ethereum are relatively secure and not vulnerable to hacking. It is only the contract that a hacker can construct malicious transactions to call and abuse.
    • After a smart contract is deployed, it is permanent and immutable. Deployment of revised code will become a new contract with a different address. It has different state variables with new balances.
    • Deployment of a smart contract is not free. It burns gas.
  • Digital signature, encryption, and public/private keys:
    • Bitcoin is a multi-signature process. In order for a transaction to be executed, both sides have to sign it. Ethereum is similar. In addition, deployment of a smart contract also requires digital signatures.
    • Like Bitcoin, with an Ethereum blockchain one can take a wallet application and generate a pair of public and private keys at the same time. An address is derived from a public key; that is, an address is just the hash of a public key. A sender uses a private key to sign a transaction and a receiver uses a public key to verify the authenticity of a signature. In general, a pair of public and private keys can be used to support the following two types of activity:
    • Sending a secret message: The public key is used to encrypt a message and the private key is used to decrypt the message.
    • Signature: A private key is used to encrypt and generate a signature. The public key is used to decrypt for signature verification.
    • Block transaction contents in both Bitcoin and Ethereum are currently not encrypted. On the other hand, block contents in Zcash are encrypted.
    • Since every Ethereum transaction, including smart contracts, has to be digitally signed, a node only needs to accept digitally signed requests, potentially without the need to verify the entire transaction history. This approach can help to improve performance.
  • DAO:
    • DAO refers to a decentralized autonomous organization. One should not confuse it with the organization called The DAO, which is famously linked to a hacking event that resulted in the split of Ethereum into Ethereum (ETH) and Ethereum Classic (ETC).
    • DAO can be considered to consist of smart contracts, which is in term-built form decentralized codes, that is, a hierarchical structure of decentralized core → smart contract → DAO.
      • Decentralized code is saved in multiple nodes. It will definitely run and cannot be stopped.
      • Smart contracts move money and digital assets.
      • DAO consists of smart contracts and creates an independent entity or community.
  • DApp:
    • DApp is a big topic. We briefly mention it due to restrictions on the size of the book:
      • DApp refers to decentralized application and uses decentralized code.
      • Ethereum is a general-purpose DApp platform.
      • An Ethereum DApp, like any other blockchain DApp, has a decentralized backend (for instance, smart contracts) and a centralized frontend (a client-side application for interacting with the blockchain). This architecture is due to the performance and limitations of today's blockchain.
      • As discussed before, a large portion of the backend, the database and business logic, is hosted off-ch.
  • Ethereum issues:
    • Ethereum suffers from issues inherited from Bitcoin:
      • Data can get lost due to forking or splitting. When there are two competing chains, the chain that cannot manage to grow fast has to be discarded in order to maintain data consistency on all nodes. Transactions on the short chain will get lost if they are not included in blocks of the winning chain without even being known by their original requesters!
      • Since data on-chain is not encrypted, a blockchain is not anonymous and not confidential.
      • Addresses are not verified. This is bad. When a receiver's address is wrongly entered, the coins being transferred to it will be permanent as transactions are permanent and coins are locked forever!
      • The PoW algorithm consumes a huge amount of power. It is reported that some large mining operations in China require dedicated power stations to supply electricity.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.19.243