Internal Transactions in Ethereum: Know Them and Solve Them

Internal Transactions in Ethereum: Know Them and Solve Them

Blockchain Ethereum Knowledge

Crypto APIs Team

Jun 21, 2021 • 4 min

In this article, we will explore the different transaction on the Ethereum blockchain - smart contracts and internal transactions.

Smart Contracts

Making virtual transactions of currencies and assets over a blockchain has become a day-to-day routine for many people, businesses and companies. Blockchains and their technology is one of the greatest modern digital marvels so far this century where their prospects and capabilities may not even be fully explored just yet. They involve complex mechanisms to carry out transactions, one of which is the “smart contract”.

The term “smart contract” is one of the main features of the Ethereum blockchain. Smart contracts are business-automated self-executing digital contracts which hold their terms programmed in code and don’t require the involvement of any kind of legal or central authority.

More simply put, Ethereum Smart Contracts are computer programs that have been deployed to the Ethereum blockchain and are used to maintain Ether balance, as well as state between code invocations, and to perform transactions. The contracts are public, like everything on the blockchain. Smart Contracts are most often used by governments, health systems and administrations, insurance companies, and ICOs. One of the biggest upsides of Smart Contracts is that their clauses are automatically executed when the specific predefined conditions have been met.

Transactions to smart contracts are usually both irreversible and trackable and are sent from externally owned accounts, or EOAs, which are generally private and owned by people. Such interactions with smart contracts are very interesting as they trigger specific preset mechanisms and create “side effects”, or byproducts of sorts, such as “internal transactions”. A single interaction with a smart contract can generate tens of even hundreds of such internal transactions.

Internal Transactions

An internal transaction, also initially called а “message”, is the byproduct, or “side effect”, of the interaction of an EOA to contract (and potentially subsequent contracts) address(es), ending with Ether being moved between addresses. In other words, it is the result of logic already built into the smart contract which was triggered from an outside transaction - the transaction sent from the EOA to the smart contract.

Unlike standard transactions, internal transactions have no cryptographic signature and are mostly held off-chain, i.e. they are not included in the blockchain itself. There are some that are stored on-chain but that requires additional gas, so it isn’t seen very often. Such internal transactions always move around Ether only, due to which they affect address balances.

The Issue of Internal Transactions

When internal transactions occur, there is not much detail listed on them. So the problem becomes that users are often left in the dark about when their address, Wallet or contract is party to such an internal transaction. To see that information users must re-execute the transaction in the EVM (Ethereum Virtual Machine) and trace the calls that it makes. But tracking the outcome of an internal transaction usually poses issues of its own and brings headaches to anyone who is trying to obtain that information.

Tracing transactions is slow. Very slow. This process also takes its toll on the nodes as it is quite CPU-intensive. If the node is not powerful enough it could even break while tracing which could lead to spreading issues for the entire data on that node.

Moreover, trace results for internal transactions can be enormous and difficult for both storage and retrieval later on. Another issue is that the process of tracing is often limited by the nodes to a fixed number of blocks - usually about 30 minutes worth of blocks back, to be exact. Hence, the time period after interacting with a smart contract is vital for making actions if you want to be able to obtain information on any probable occurring internal transactions.

In the case where users want to obtain data older than 30 minutes an archive node is needed, otherwise it is not possible. But an archive node is an extremely expensive luxury to have which requires upkeeping payments on a monthly basis. Moreover, an archive node can be very difficult to sync; it can take months and even years to get it up to date and requires at least several TB of storage space.

In a nutshell, anyone who wants to be able to trace internal transactions must have the time, node capacity and power to do it. This is absolutely not possible for each blockchain user and crypto enthusiast where it should be an easily available operation.

Crypto APIs Solution for Internal Transactions

Well, since we don’t want to bum all of you out with this article, we would like to say that we do have a solution for internal transaction tracing which can avoid the issues it usually comes with.

Crypto APIs can now easily provide you all of that information. We have added internal transactions to the stack of supported elements by our product which completes the traceability of also Ether moved inside the Ethereum network, along with normal transactions and mining rewards.

No more is it needed for you to go through the trouble of setting up tracers and having to wait for results that may or may not come up. Now Crypto APIs 2.0 customers can use our new endpoints to obtain information about internal transactions either by Parent Transaction Hash, or by both Parent Transaction Hash and Operation ID (for a specific internal transaction). Moreover, you can also set up blockchain event subscriptions (Webhooks) and receive notifications for when an internal transaction has occurred.

You can check our subscription plans and don’t hesitate to contact us if you have questions.

Blockchain becomes easy with Crypto APIs. 🏆👍🏼

Related articles

Share