33

On etherscan:

-->> accounts >> contract accounts >> selecting one contract,

There are two types of transactions mentioned under No Of Transactions:

Normal transactions and Internal transactions.

What is the difference between them and why are the Normal transactions usually much less than Internal transactions?

12

Internal transactions, despite the name (which isn't part of the yellowpaper; it's a convention people have settled on) aren't actual transactions, and aren't included directly in the blockchain; they're value transfers that were initiated by executing a contract.

Check these answers as well

  1. TheDAO internal transactions
  2. How to get contract internal transactions
  • nicksmac: Are internal transactions the events laid into the logs? Is that what they are? – Thomas Jay Rush Jun 22 '16 at 17:15
  • 1
    @ThomasJayRush its value transfers that were initiated by executing a contract. – niksmac Jun 23 '16 at 1:30
  • @ThomasJayRush no, they are just calls from one contract to another – Ethan Jul 23 '16 at 4:15
10

In the Ethereum protocol there's only transactions and message calls. A transaction is a type of message call.

A transaction may perform other message calls, but these are not transactions (even though blockchain explorers may label them inaccurately as "internal transactions"). These (internal) message calls are not published on the blockchain.

To try illustrating, a transaction in Javascript looks like:

{
  from: ...,
  to: "C1",
  value: ...,
  gas: ...,
  data: ...,
  gasPrice: ...,
  nonce: ...
}

This is what you will see on the blockchain: a "Normal transaction". An "Internal Transaction" is the effects of taking the data part, feeding it to the contract C1, and executing the Ethereum Virtual Machine. The data is what tells C1 that it should call another contract C2: there is no separate {from:C1, to:C2,...} object on the blockchain that's needed.


Contracts calling each other, along with receiving payment, is the reason why "Normal transactions are usually much less than Internal transactions". For example, TheDAO tokens were originally purchased by calling a function on TheDAO and sending ETH with it.

  • When you say "These (internal) message calls are not published on the blockchain", isn't that false since all the data is public and contained in a block, assuming of course the transaction was mined? – mecampbellsoup Dec 14 '17 at 22:52
  • 1
    @mecampbellsoup The internal message calls can be derived since indeed all blockchain data is public, but you also need to execute the EVM as the answer explains. They are not "published" in the sense that most clients do not provide a "lookup" for them. – eth Dec 30 '17 at 13:15
9

An internal transaction is not a real transaction - it has no signature and is not included in the blockchain. It is the result of a contract initiating a value transfer, or calling another contract, typically using the CALL opcode.

  • 1
    full list of opcodes is: CREATE, CALL, CALLCODE, DELEGATECALL, SELFDESCTUCT – Nulik Dec 2 '17 at 0:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.