14

What is the definition of a transaction and a message in Ethereum? How are they different?

9

From the Yellow Paper:

Transaction: A piece of data, signed by an External Actor. It represents either a Message or a new Autonomous Object. Transactions are recorded into each block of the blockchain.

This means that a transaction represents either a Message or a new contract.

Message: Data (as a set of bytes) and Value (specified as Ether) that is passed between two Accounts, either through the deterministic operation of an Autonomous Object or the cryptographically secure signature of the Transaction

This means that a Message is the data and amount of Ether that is passed between two accounts. A message is created by contracts interacting with each other, or by a transaction. (In practice the Ether is specified in units of Wei.)

Transactions are explicitly on the blockchain, and messages are "internal", see example.

For a related question with more practical help than just terminology, see What is the difference between a transaction and a call?

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.