Loading...
Main page  |  FAQ  |  How Ethereum transactions are performed

How Ethereum transactions are performed

2017-11-06 00:00:00

An amazing ecosystem of alternative monetary units was born recently, only in 2009, and it was all started by the brilliant programmer Satoshi Nakamoto, who created the first cryptocurrency Bitcoin. Surprisingly, he wished to remain anonymous and preferred to watch the success of his own brainchild from the shadow of the unknown. The main points of Mr. Nakamoto were picked up by other well-known developers, who created many altcoins on the source code of the pioneer.

However, the evolution of crypto-money, solved in the form of digital coins devoid of physical embodiment, was not limited to this, and the Russian-speaking programmer Vitalik Buterin, who lives in Canada, having decided to abandon standard templates and algorithms, developed a new generation cryptocurrency Ethereum, which has its own kind of blockchain based on the application of the phenomenon of smart contracts. Thanks to the presence of innovative elements, Ether, a new type of alternative currency, quickly gained popularity and rightly took the second position in terms of market capitalization.

In the article, we will try to convey in popular language to ordinary readers how the system of this digital currency works, what an Ethereum transaction is and how settlements are carried out in the payment system of the same name. We will also try to determine what role miners who mine Ethereum virtual coins play in the development of the phenomenon. Periodically, given the availability of technical details, the author will provide explanations of the terminology and certain nuances. 

Types of accounts in the Ethereum system

Getting started discussing the topic, you should know that in the Ethereum system, which has few analogues with other cryptocurrencies, there are two types of accounts. Each of them should be discussed separately.

External accounts, called EOA for short, have the following features:

  1. They have a separate balance of Ether coins.
  2. The owners of such accounts are allowed to carry out financial manipulations on the Ethereum blockchain. In particular, make money transfers or activate a smart contract code.
  3. This profile is controlled by separate secret keys, each of which is created by the profile owner. It should be noted that the latter include ensuring the secure storage of this information in a private form.
  4. An important feature should be considered the presence of a mechanism that allows you to work without code binding.

The second type is the so-called Account-contract, the features of which are:

  1. A separate balance of Ether coins, as in the first case, with external accounts.
  2. At the same time, the code is linked to it automatically.
  3. The code mentioned above is activated by transactions that are launched by receiving special calls (messages) received from other contracts or EOA accounts.
  4. After the activation process is completed, the owners of the contract accounts can begin to carry out financial transactions of various complexity and manipulate their own savings, as well as send requests to other system participants.

As we said above, the Ethereum distributed ledger is not copied from the Bitcoin system, therefore all financial flows move in the Ethereum blockchain, obeying the orders of the profiles. The owner of the contract account, when receiving a money transfer, launches his own code, taking into account the instructions and input parameters, the data about which is delivered by the system as part of the transaction. At the same time, the identification of the money transfer code is shifted to the Ethereum Virtual Machine, and the work itself is performed by nodes that are analogous to miners in the Bitcoin network.

It should be noted that after the activation of the updated Metropolis protocol, such differentiation of accounts will not be so obvious, which will undoubtedly affect the improvement of the networks operating parameters.

What are Ethereum transactions and what role do messages play?

A transaction, as a rule, is synonymous with money transfers, but unlike fiduciary assets and modern payment institutions, in digital currency systems it has slightly different terminological and functional loads.

An Ethereum transaction in the cryptocurrency system of the same name is usually called a package of information material in which a message is located, intended to be sent on behalf of EOA to other accounts registered in the decentralized register of Ether. The content of a transaction consists of the following data:

  • Destination.
  • A signature that allows you to identify the initiator of the transaction and the expression of his will, send information to the recipient through the blockchain system.
  • The point of value (VALUE) differs in that often information about the volume of the transfer is secretly indicated there or the amount of the transaction in Ether is indicated.
  • The DATA section can contain a message to be sent to the contract. Filling is optional.
  • The GASLIMIT parameter is designed to determine the limit for the number of manipulations within each transaction.
  • The purpose of GASPRICE is to set a commission threshold. In this case, one conditional point of Ethereum gas is an analogue of one computational operation, otherwise called an indivisible (atomic) instruction.

What do you need to know about message assignment? Their role is played by virtual objects that serve as a means for transporting information between participants in the Ethereum system. They contain data of the following form:

  • Information about the account that initiated the payment, but the data is indirect in the reason that it was obtained from smart contracts, and not from an external profile.
  • Information about the final addressee of the transaction.
  • The VALUE section indicates the volume of the transfer.
  • The DATA clause, which is optional, contains information to clarify the input data.
  • The GASLIMIT parameter. This clause specifies the maximum rates of Ethereum gas that can be spent on a specific money transfer.

The institution of messages resembles and is similar to the phenomenon of transactions, but they are created exclusively by contracts, and not by an external kind of accounts. They are also commonly called intrasystem transfers. Thanks to this standard, each member of the system, initiating a money transfer, starts its own code.

You should be aware that many users identify the terms message and transaction, so gradually the first of them is used less and less and is replaced by the second synonym.

What is Ethereum Gas?

The Ethereum payment system is developing on the basis of its own version of the blockchain, and the environment itself is called EVM or the Ethereum Virtual Machine. Each of the network participants, called a node (an analogue of miners in the Bitcoin network), activates the Ethereum Virtual Machine, and becomes part of the general protocol, the purpose of which is the timely and truthful verification of the blocks of the main chain of the distributed ledger. Each of the complete computational nodes (nodes) performs computational solutions in a similar format and volume, generating the same values. This duplication is reflected in the rising cost of contracts. Therefore, there is an incentive to use the blockchain only partially, and to perform some manipulations outside its area of action. At the same time, the transaction price is also different, and the Ethereum gas serves as a measure.

The relationship of Ethereum gas metrics and transaction costs

We have already talked about the GASLIMIT parameter, which should be considered an analogy of the commission fee that exists in the system of the first Bitcoin cryptocurrency. Before making a transfer, you should include not only the gas limit, but also the amount that the user is willing to pay for one unit of it. Computing nodes, having studied the information, are determined with priority transfers that need to be included in the main blockchain chain, having received a certain reward for this.

As a rule, all money transfers, sooner or later, go there, but the point here is in the duration of the time intervals required for a specific manipulation. Delays become especially widespread during periods when the total amount of gas begins to massively exceed the usual limit. In this case, the system records in the blockchain that a specific transfer was initiated, but the shortage of gas caused the cancellation of all operations included in a specific contract. The surplus, in this case, is automatically converted into cryptocoins and returned to the account of the client who activated the failed transfer.

Calculations of the amount of gas consumed by the system in order to quickly complete an Ethereum transaction are usually carried out approximately. Therefore, the members of the ether community include it in the transfer more than is necessary, but given that the extra units are returned back, this is quite a common option, widely used in practice.

However, it is inappropriate to set too large a limit. Since if it is unrealistically high, the nodes will cancel the transaction.

What is a gas limit and how to determine it?

Rough calculations can be done quite simply by considering two components:

  1. gasUsed is the total amount of gas used to complete the transaction.
  2. gasPrice is the price of each unit needed to be quickly included in the money transfer block. Calculations must be made in Ethereum coins.

The figure is set by simply multiplying these indicators.

For a full disclosure of the topic, it makes sense to determine what the upper threshold of Ethereum gas per block is. It is customary to call the maximum allowable number of these structural components, which is used to determine the capacity of transactions in each structural component of the blockchain (block). Lets say a user has 4 money transfers with a threshold of 10, 30, 40 and 70 gas. If the single limit is equal to 120 units, then three out of four transfers can be made. At the same time, some computing nodes may, in pursuit of a reward, give preference to the last two transfers (70 + 40), rather than act according to the 70 + 30 + 10 scheme. In this case, there will be room for the first of the transfers. In the event that another miner, at the same time, tries to include a transfer with a limit of 30 gas in the block, the Ethereum network will simply reject this transfer.

Who determines the gas limit and how the parameters change?

As a rule, the computational nodes determine the value of this parameter, regardless of the underlying protocol. Although many people prefer to leave the default options. Let us find out how the gas value is established. Miners, to generate virtual coins, use special programs that connect to the client nodes Parity and geth. In the settings of the latter, there are items, changing which is equivalent to setting a new parameter for Ethereum gas.

The importance and diversity of the "DoS" phenomenon

Dos - so it is customary to mean the problems arising in the Ether network in the direction of the speed of making money transfers. As we have already noted above, conflicts of interest arise in the event of a discrepancy between gas indicators and the general permissible upper limit. At the same time, there is a slowdown in transactions against the background of overflow of blockchain blocks. Such complications can be both intentional and accidental. I wonder why during periods of massive block overflow, the limit values remain the same?

There may be several reasons, but we will not go deep into technical nuances and highlight the main one, which should be considered incomplete mastering of the adaptive limit by computational nodes. There is a mechanism in the Ethereum network that allows miners to determine the limit by voting, which allows changing parameters without introducing fundamental innovations to the main protocol (hard fork). So whats the problem?

The reason for this should be sought in the greed of the administration of large mining pools. Having increased the upper gas threshold, after the situation has been resolved, they rarely agree to restore the original parameters and settings, reducing the limits to their previous values.

What are the modern realities

A significant increase in exchange rates and the massive use of Ethereum crypto coins for the purchase of tokens of numerous ICO projects caused a critical network overload and a significant slowdown in transfers. As a result, the weighted average gas price reached a record high of 20 gwei and continues to grow, while the simplest transaction costs at least 3 cents, and this is far from the limit. At the same time, the cost of smart contracts has grown significantly, which have become very expensive.

According to the latest statements by Vitalik Buterin (the developer of Ether), such a high cost of Ethereum transactions, despite the significantly high similar indicators of the Bitcoin network, is absurd and contradicts the principle, which is one of the main achievements of the phenomenon of cryptocurrencies, the cheapness of online settlements.

Modern realities look like this:

  • User dissatisfaction is growing, provoked by a sharp increase in commission fees.
  • Reducing the cost of gas does not suit miners.
  • The following incident should be considered that more than 99% of users set a limit of at least 20 gwei for a quick transfer for two reasons:
  1. Some of them agree to pay approximately 5 cents or more to quickly incorporate a remittance into a blockchain block. Especially against the background of a sharp increase in exchange quotations for virtual coins.
  2. Many people simply do not understand the technical details and do not know how to reduce the cost of gas.
  3. It is difficult and difficult to operate with numbers containing numerous zeros after the decimal point (up to nine). This explains the widespread adoption of the gwei-based settlement standard.
  4. It should not be ruled out that the owners of cryptocoins, in the process of carrying out Ethereum transactions, are wary of violating the network standards from ignorance of the necessary parameters and methods of their regulation.

How can the problem be solved?

Recently, the proposal to introduce a function that reduces the cost of gas by default has been popular. But its reasonable to assume that large pools will object. The creation of an efficiently functioning gas market, where computing nodes will compete with each other for the right to include Ether money transfers in the blockchain, looks quite promising.

Original advice for fast and secure transactions using Ethereum cryptocoins

What should be done for people who find it difficult to understand all these technical difficulties or are simply not interested, and transfers in the right direction must be carried out with a certain frequency? Not everyone is happy to follow and verify an Ethereum transaction on dedicated online platforms. Such users will come in handy as a worthy alternative to an online conversion point designed to carry out fast and safe Ethereum exchanges, converting or buying crypto coins in various directions. The option of cooperation with the Xchange.sh exchanger looks worthy, which has deservedly earned an impeccable business reputation over the years of work in the profile direction. Of course, the conversion resource takes certain commissions for the services provided, but the scantiness of the latter cannot be compared with the speed and quality of services provided to customers.