CryptoCoinsInfoClub.com

Blockchain State Root

Basic Questions About The Ethereum Evm And State Storage : Ethereum

Basic Questions About The Ethereum Evm And State Storage : Ethereum

This is cross-posted in the forum, but it seems like there's more readership here. I have a few questions about how the system/EVM works. These are probably basic questions, but after reading the information around I can't seem to wrap my head around exactly what's going on. If there's a reference for where I can read the answers, please let me know! 1) Where is each contracts' assembly/bytecode physically stored? Looking at the blocksizes, it looks like they're currently about 780 bytes, so I assume that's not storing the contracts code directly. 2) Where is the EVM memory physically stored? Is every node running the EVM and holding the entire memory? 3) When a node sends a transaction to the network and has the receiver as a contract, does every node execute the contract bytecode with the inputs to confirm the hash? Or does the first node receiving the transaction execute and create the transaction hash that's then distributed and is what's used for consensus. Basically, is the contract code executed once or many times for each transaction? I assume the it's the former if every node is running the EVM. 4) Where is the data for the state transition function actually stored? Fundamentally, I'd like to understand where the pieces of the EVM, EVM memory, state transition function, and contracts are stored and actually executed. What storage medium is housing them, and what processor is executing the instructions? Any help from knowledgeable folks would be most appreciated. Continue reading >>

Blockchain Scalability: When, Where, How?

Blockchain Scalability: When, Where, How?

Blockchain Scalability: When, Where, How? Angel Investors, Startups & Blockchain developers... Blockchain Scalability, a very real problem! Cryptocurrencies are becoming more and more mainstream. In fact, lets check out how popular bitcoin and ethereum have gotten over time. This is a graph of the number of daily bitcoin transactions tracked over the years: And here we have the number of Ethereum transactions per month over the years: Now, this may look very impressive, but here is the thing, the initial design of cryptocurrencies was not meant for widespread use and adaptation. While it was manageable when the number of transactions was less, as they have gotten more popular a host of issues have come up. The scalability problem of cryptocurrencies For bitcoin and ethereum to compete with more mainstream systems like visa and paypal, they need to seriously step up their game when it comes to transaction times. While paypal manages 193 transactions per second and visa manages 1667 transactions per second, Ethereum does only 20 transactions per second while bitcoin manages a whopping 7 transactions per second! The only way that these numbers can be improved is if they work on their scalability. If we were to categorize the main scalability problems in the cryptocurrencies, they would be: The time is taken to put a transaction in the block. The Time Taken To Put A Transaction In The Block In bitcoin and ethereum, a transaction goes through when a miner puts the transaction data in the blocks that they have mined. So suppose Alice wants to send 4 BTC to Bob, she will send this transaction data to the miners, the miner will then put it in their block and the transaction will be deemed complete. However, as bitcoin becomes more and more popular, this becomes more time-consu Continue reading >>

Sharding Faq Ethereum/wiki Wiki Github

Sharding Faq Ethereum/wiki Wiki Github

Currently, in all blockchain protocols each node stores all states (account balances, contract code and storage, etc.) and processes all transactions. This provides a large amount of security, but greatly limits scalability: a blockchain cannot process more transactions than a single node can. In large part because of this, Bitcoin is limited to ~3-7 transactions per second, Ethereum to 7-15, etc. However, this poses a question: are there ways to create a new mechanism, where only small subset of nodes verifies each transaction? As long as there are sufficiently many nodes verifying each transaction that the system is still highly secure, but sufficiently few that the system can process many transactions in parallel, could we not use such a technique to greatly increase a blockchain's throughput? What are some trivial but flawed ways of solving the problem? There are three main categories of easy solutions. The first is to simply give up on scaling individual blockchains, and instead assume that users will be using many different altcoins. This greatly increases throughput, but comes at a cost of security: an N-factor increase in throughput using this method necessarily comes with an N-factor decrease in security. Hence, it is arguably non-viable for more than small values of N. The second is to simply increase the block size limit. This can work and in some situations may well be the correct prescription, as block sizes may well be constrained more by politics than by realistic technical considerations. But regardless of ones beliefs about any individual case such an approach inevitably has its limits: if one goes too far, then nodes running on consumer hardware will drop out, the network will start to rely exclusively on a very small number of supercomputers running Continue reading >>

State Tree Pruning - Ethereum Blog

State Tree Pruning - Ethereum Blog

One of the important issues that has been brought up over the course of the Olympic stress-net release is the large amount of data that clients are required to store; over little more than three months of operation, and particularly during the last month, the amount of data in each Ethereum clients blockchain folder has ballooned to an impressive 10-40 gigabytes, depending on which client you are using and whether or not compression is enabled. Although it is important to note that this is indeed a stress test scenario where users are incentivized to dump transactions on the blockchain paying only the free test-ether as a transaction fee, and transaction throughput levels are thus several times higher than Bitcoin, it is nevertheless a legitimate concern for users, who in many cases do not have hundreds of gigabytes to spare on storing other peoples transaction histories. First of all, let us begin by exploring why the current Ethereum client database is so large. Ethereum, unlike Bitcoin, has the property that every block contains something called the state root: the root hash of a specialized kind of Merkle tree which stores the entire state of the system: all account balances, contract storage, contract code and account nonces are inside. The purpose of this is simple: it allows a node given only the last block, together with some assurance that the last block actually is the most recent block, to synchronize with the blockchain extremely quickly without processing any historical transactions, by simply downloading the rest of the tree from nodes in the network (the proposed HashLookup wire protocol message will faciliate this), verifying that the tree is correct by checking that all of the hashes match up, and then proceeding from there. In a fully decentralized co Continue reading >>

Diving Into Ethereums Worldstate

Diving Into Ethereums Worldstate

Finding extraordinary solutions, reading, researching, writing, presenting, programming, learning. These are just a few of my favorite things. Ethereum comprises of many constituent parts. This post seeks to de-construct Ethereum to provide you with an understanding of its data storage layer. We will introduce the concept of blockchain state. We will cover the theory behind the Patricia Trie data structure and demonstrate Ethereums concrete implementation of tries using Googles leveldb database. This post also links to a step by step guide which will assist you in installing and configuring your very own Ethereum private network (including mining). From this point you will be able to execute transactions and explore how Ethereums state responds to activities such as transactions. Bitcoins state is represented by its global collection of Unspent Transaction Outputs (UTXOs). The transfer of value in bitcoin is actioned through transactions. More specifically, a bitcoin user can spend one or more of their UTXOs by creating a transaction and adding one or more of their UTXOs as the transactions input. A full explanation of UTXOs is out of scope for this article. However, we mention UTXOs in the following paragraph, to point out a fundamental difference between bitcoin and Ethereum. The following two bitcoin examples will provide contrast between bitcoins UTXO model and the concept of Ethereums world state. Firstly, bitcoin UTXOs can not be partially spent. If a bitcoin user spends 0.5 bitcoin (using their only UTXO which is worth 1 bitcoin) they have to deliberately self-address (send themselves) 0.5 bitcoin in return change. If they dont send themselves change, they will loose the 0.5 bitcoin change to the bitcoin miner who mines their transaction. Secondly, at the most f Continue reading >>

An Introduction To Ethereum And Smart Contracts: A Programmable Blockchain

An Introduction To Ethereum And Smart Contracts: A Programmable Blockchain

An Introduction to Ethereum and Smart Contracts: a Programmable Blockchain Bitcoin took the world by surprise in the year 2009 and popularized the idea of decentralized secure monetary transactions. The concepts behind it, however, can be extended to much more than just digital currencies. Ethereum attempts to do that, marrying the power of decentralized transactions with a Turing-complete contract system. In this post we will take a closer look at how Ethereum works and what makes it different from Bitcoin and other blockchains. Read on! In our previous post , we took a closer look at what blockchains are and how they help in making distributed, verifiable transactions a possibility. Our main example was Bitcoin: the world's most popular cryptocurrency. Millions of dollars, in the form of bitcoins, are traded each day, making Bitcoin one of the most prominent examples of the viability of the blockchain concept. Have you ever found yourself asking this question: "what would happen if the provider of this service or application disappeared?" If you have, then learning about Ethereum can make a big difference for you. Ethereum is a platform to run decentralized applications: applications that do not rely on any central server. In this post we will explore how Ethereum works and build a simple PoC application related to authentication. A blockchain is a distributed, verifiable datastore. It works by marrying public-key cryptography with the nobel concept of the proof-of-work. Each transaction in the blockchain is signed by the rightful owner of the resource being traded in the transaction. When new coins (resources) are created they are assigned to an owner. This owner, in turn, can prepare new transactions that send those coins to others by simply embedding the new owner Continue reading >>

Merkle Trees Hacker Noon

Merkle Trees Hacker Noon

The adventitious prop roots of an Indian BanyanTree. Merkle trees are a fundamental part of blockchain technology. A merkle tree is a structure that allows for efficient and secure verification of content in a large body of data. This structure helps verify the consistency and content of the data. Merkle trees are used by both Bitcoin and Ethereum. A Merkle tree summarizes all the transactions in a block by producing a digital fingerprint of the entire set of transactions, thereby enabling a user to verify whether or not a transaction is included in a block. Merkle trees are created by repeatedly hashing pairs of nodes until there is only one hash left (this hash is called the Root Hash, or the Merkle Root). They are constructed from the bottom up, from hashes of individual transactions (known as Transaction IDs). Each leaf node is a hash of transactional data, and each non-leaf node is a hash of its previous hashes. Merkle trees are binary and therefore require an even number of leaf nodes. If the number of transactions is odd, the last hash will be duplicated once to create an even number of leaf nodes. The Merkle Tree of transactions A, B, C &D. Lets look at an example of four transactions in a block: A, B, C, and D. Each of these is hashed, and the hash stored in each leaf node, resulting in Hash A, B, C, and D. Consecutive pairs of leaf nodes are then summarized in a parent node by hashing Hash A and Hash B, resulting in Hash AB, and separately hashing Hash C and Hash D, resulting in Hash CD. The two hashes (Hash AB and Hash CD) are then hashed again to produce the Root Hash (the Merkle Root). This process can be conducted on larger data sets, too: consecutive blocks can be hashed until there is only one node at the top. Hashing is usually conducted using the SHA- Continue reading >>

White Paper Ethereum/wiki Wiki Github

White Paper Ethereum/wiki Wiki Github

Introduction to Bitcoin and Existing Concepts The concept of decentralized digital currency, as well as alternative applications like property registries, has been around for decades. The anonymous e-cash protocols of the 1980s and the 1990s were mostly reliant on a cryptographic primitive known as Chaumian Blinding. [8] Chaumian Blinding provided these new currencies with high degrees of privacy, but their underlying protocols largely failed to gain traction because of their reliance on a centralized intermediary. In 1998, Wei Dai's b-money [9] became the first proposal to introduce the idea of creating money through solving computational puzzles as well as decentralized consensus, but the proposal was scant on details as to how decentralized consensus could actually be implemented. In 2005, Hal Finney introduced a concept of reusable proofs of work, [10] a system which uses ideas from b-money together with Adam Back's computationally difficult Hashcash [11] puzzles to create a concept for a cryptocurrency, but once again fell short of the ideal by relying on trusted computing as a backend. In 2009, a decentralized currency was for the first time implemented in practice by Satoshi Nakamoto, [1c] [1d] combining established primitives for managing ownership through public key cryptography with a consensus algorithm for keeping track of who owns coins, known as "proof of work." The mechanism behind proof of work was a breakthrough because it simultaneously solved two problems. First, it provided a simple and moderately effective consensus algorithm, allowing nodes in the network to collectively agree on a set of updates to the state of the Bitcoin ledger. Second, it provided a mechanism for allowing free entry into the consensus process, solving the political problem of Continue reading >>

How Does Ethereum Work,anyway?

How Does Ethereum Work,anyway?

Odds are youve heard about the Ethereum blockchain, whether or not you know what it is. Its been in the news a lot lately, including the cover of some major magazines, but reading those articles can be like gibberish if you dont have a foundation for what exactly Ethereum is. So what is it? In essence, a public database that keeps a permanent record of digital transactions. Importantly, this database doesnt require any central authority to maintain and secure it. Instead it operates as a trustless transactional system a framework in which individuals can make peer-to-peer transactions without needing to trust a third party OR one another. Still confused? Thats where this post comes in. My aim is to explain how Ethereum functions at a technical level, without complex math or scary-looking formulas. Even if youre not a programmer, I hope youll walk away with at least better grasp of the tech. If some parts are too technical and difficult to grok, thats totally fine! Theres really no need to understand every little detail. I recommend just focusing on understanding things at a broad level. Many of the topics covered in this post are a breakdown of the concepts discussed in the yellow paper. Ive added my own explanations and diagrams to make understanding Ethereum easier. Those brave enough to take on the technical challenge can also read the Ethereum yellow paper. A blockchain is a cryptographically secure transactional singleton machine with shared-state. [1] Thats a mouthful, isnt it? Lets break it down. Cryptographically secure means that the creation of digital currency is secured by complex mathematical algorithms that are obscenely hard to break. Think of a firewall of sorts. They make it nearly impossible to cheat the system (e.g. create fake transactions, erase tr Continue reading >>

Blockchain - What Is State-trie Pruning And How Does It Work? - Ethereum Stack Exchange

Blockchain - What Is State-trie Pruning And How Does It Work? - Ethereum Stack Exchange

What is state-trie pruning and how does it work? Several sources mention the idea of state-trie pruning. What is that, and is it currently being implemented on the network? Is this a manual process or can it be done automatically? If Ethereum is currently processing 1 GB per month under the current volume, and could grow with greater adoption, can state-trie pruning prevent the size of the ethereum blockchain from becoming unwieldy? Some sources seem concerned . It is a similar concept to garbage collection in programming languages and in tree-based version control system like git.When ethereum contracts run, they modify their state. And since the state tree is an immutable append-only structure, it means that every time the state is modified, it gets a new state root. Some elements that were reachable from the old roots may be not be reachable from the new root (due to operations that delete or modify entries). Theoretically, they can be pruned (garbage collected). However, since the Proof-Of-Work consensus as it is does not define when state transitions are final, there is always a theoretical possibility that state will be reverted to older roots and things that were pruned would be needed again.So, pruning is currently a trade-off. We say, that, for example, after 5000 block we assume that the state won't be reverted and prune all unreachable nodes.Someone might still want to disable this feature to keep the entire history of the blockchain for special purposes. Here is a very detailed description: Continue reading >>

Global State Sawtooth V1.0.4 Documentation

Global State Sawtooth V1.0.4 Documentation

One goal of a distributed ledger like Sawtooth, indeed thedefining goal, is to distribute a ledger among participating nodes.The ability to ensure a consistent copy of data amongst nodes inByzantine consensus is one of the core strengths of blockchain technology. Sawtooth represents state for all transaction families in a singleinstance of a Radix Merkle Tree on each validator. The process of blockvalidation on each validator ensures that the same transactions resultin the same state transitions and that the resulting data is the samefor all participants in the network. The state is split into namespaces which allow flexibility fortransaction family authors to define, share, and reuse global state databetween transaction processors. Sawtooth uses an addressable Radix Merkle tree to store data fortransaction families. Lets break that down: The tree is a Merkle tree becauseit is a copy-on-write data structure which stores successive node hashesfrom leaf-to-root upon any changes to the tree. For a given set of statetransitions associated with a block, we can generate a single root hashwhich points to that version of the tree. By placing this state roothash on the block header, we can gain consensus on the expected versionof state in addition to the consensus on the chain of blocks. If avalidators state transitions for a block result in a different hash,the block is not considered valid. For more information about generalconcepts, see the Merkle page on Wikipedia. The tree is an addressable Radix tree because addresses uniquelyidentify the paths to leaf nodes in the tree where information isstored. An address is a hex-encoded 70 character string representing35 bytes. In the tree implementation, each byte is a Radix path segment whichidentifies the next node in the path to Continue reading >>

What Is Merkel Tree & Merkel Root In Blockchain And How It Exists?

What Is Merkel Tree & Merkel Root In Blockchain And How It Exists?

What Is Merkle Tree & Merkle Root In Blockchain? We all know that people who are familiar with cryptography and cryptocurrency will have heard of Merkle trees before. Every non-leaf nodehas a label with the hash of the names of child nodes . In plain English, this means Merkle trees provide for efficient and secure verification of large amounts of data. It is a very intriguing piece of technology that will be beneficial to cryptocurrency in the long run as well. What is Merkle tree and Merkle root in Blockchain? from Blockchain Council When it comes to storing data efficiently and securely, Merkle trees certainly have their role to play. A hash tree is the alternative name of a Merkle tree. It is often meant for verifying any data stored and transmitted in and between different computers on a network. The technology has become an integral part of peer-to-peer protocols as of late, including in the cryptocurrency sector. To be more precise, a Merkle tree is designed to ensure blocks of data can receive from other peers in a peer to peer network. More specifically, this information needs to be in its original state, without alterations or corrupted information. In most cases, a Merkle tree comprises of two child nodes under each node on the network. This binary approach reinstated, although it still leaves a lot of room for future improvements. In fact, there does not appear to be a limit as to how many child nodes can be used per node to establish a more secure Merkle tree. Every transaction has a hash associated with it. In a block , all of the transaction hashes in the block are themselves hashed (sometimes several times the exact process is complex), and the result is the Merkle root. In other words, the Merkle root is the hash of all the hashes of all the transactio Continue reading >>

Enterprise Blockchain May Be Ready For Its Breakout

Enterprise Blockchain May Be Ready For Its Breakout

Enterprise Blockchain May Be Ready for Its Breakout Feb 5, 2018 at 09:00 UTC|UpdatedFeb 6, 2018 at 03:33 UTC It turns out, last year's mantra "make blockchain real" was little more than wishful thinking. Instead of the increased efficiency, enterprises have encountered impractically slow transaction volumes; instead of a transparent world with ultimate accountability, companies holding sensitive customer data faced regulatory concerns. Still, there's reason to believe the same rosy-colored forecast just might come true this year. The reason for that optimism, it turns out, is that even if the blockchains didn't become real for businesses in 2017, they did become tangible in terms of technology. And now that the software has been built, those working close on development say live trials are just around the corner. "All these experiments and proofs-of-concept were not done in a vacuum and they were not done for fun," said Charley Cooper, managing director of the R3 distributed ledger consortium, which has its own series of live applications in the final stages of launch. "They were done to bear out what could and could not be done effectively on the technology, and what we felt would be meaningful commercial opportunities." In short, making blockchain real is no longer abstract, it's on the verge of being good business. But to understand how the abstract utopia of cryptocurrency becomes more than just a business interest, one needs to revisit a slew of successes that have flown under the radar. Most recently, groups of financial institutions and enterprises (R3, the Linux-led Hyperledger consortium and the Enterprise Ethereum Alliance) have all seen major software milestones. For example, computing hardware giant Intel last week launched Hyperledger Sawtooth 1.0 to the H Continue reading >>

Efficiently Bridging Evm Blockchains

Efficiently Bridging Evm Blockchains

My last article discussed the concept of a relay, which connects two Ethereum-based ( EVM ) blockchains together. A relay enables users to move their assets between the chains because those assets are replicated in both environments and map 1:1. Any number of separate blockchains may be joined to the Ethereum mainnet to offload transactions and scale the ecosystem to a much higher degree. This design is augmented by sharding and indirectly increases Ethereums capacity beyond what sharding itself allows. In this article I will discuss an updated version of my relay design. This is an exciting update because it makes two dramatic improvements: Relay data is packed much more efficiently. Instead of relaying each transaction, a Merkle root for a set of consecutive block headers is relayed with latency proportional to the cost of saving the hash. The centralized relayer is removed in lieu of a decentralized network of token stakers who run a standalone relay client, which can operate in a resource constrained environment with only moderate bandwidth requirements. Before introducing Relay Networks V2, I will review the concept of a relay. You can skip this part if you understand the concept of a relay. Relays have been discussed widely for a while under various names (bridges, sidechains, blockchain connectors). There are idiosyncrasies to every design, but the overarching concept is that you do something on one blockchain (e.g. depositing tokens) and prove it was done on another, which triggers some event on the new chain (e.g. withdrawing tokens). The first production example in the Ethereum world was BTC-Relay (built by Joseph Chow of ConsenSys in 2016), which connects the Bitcoin blockchain to the Ethereum blockchain. BTC-Relay works like this: Community members relay co Continue reading >>

Chain Documentation

Chain Documentation

This document describes all the algorithms involved in participating as a node in a blockchain network, including their interfaces and requirements for persistent state. Each algorithm specifies its interface to the outside world under the labels inputs, outputs, references, and affects. Input is data that must be explicitly provided to the algorithm by its invoking context (either another algorithm or a user). Output is data that is explicitly returned from the algorithm to its invoking context. References lists elements of the persistent state (described above) that might be read. Affects lists elements of the persistent state that can be modified. A conforming implementation must behave as if it is following the algorithms described below. However, for the sake of efficiency or convenience, it is permitted to take other actions instead as long as they yield the same result. For example, a conforming implementation might memoize the result of a computation rather than recomputing it multiple times, or it might perform the steps of an algorithm in a different but equivalent order. A conforming implementation must be serializable with respect to these algorithms. That is, it can execute them concurrently in parallel, but it must produce the same output and side effects as if they had run serially in some order. This requirement also implies that all side effects together must be atomic for each algorithm. All nodes store a current blockchain state, which can be replaced with a new blockchain state. Make an initial block with the input blocks timestamp and consensus program . The created block must equal the input block; if not, halt and return false. The initial block and these empty sets together constitute the initial state. Assign the initial state to the current bl Continue reading >>

More in ethereum