Ethereum Transaction Architecture

Ethereum transaction architecture involves several components that work together to enable the execution of transactions on the Ethereum blockchain. The architecture includes the following components:

  • Nonce: This is an index that gets incremented every time a transaction from an account gets mined.

  • Recipient: This is the receiving address. If it is an externally-owned account, the transaction will transfer value. If it is a contract account, the transaction will execute the contract code.

  • Value: This is the amount of Ether (ETH) to transfer from the sender to the recipient, measured in wei (a denomination of ETH).

  • yParity, r, s (aka digital signature): These are the components of the digital signature that proves the sender's authorization for the transaction.

  • Init or data: This is typically referred to as "calldata". If it is 0, the transaction is just a typical ETH transfer. If it is not 0, it contains data to be used by the recipient contract.

  • Gas limit: This is the maximum amount of gas units that can be consumed by the transaction.

  • Type: This field indicates the type of transaction. Type 0 is for legacy (pre-EIP-1559) transactions, while type 2 is for EIP-1559-compatible transactions.

  • MaxPriorityFeePerGas (aka minerTip): This is the maximum amount of gas to be included as a tip to the validator.

  • MaxFeePerGas: This is the maximum amount of gas willing to be paid for the transaction, inclusive of baseFeePerGas and maxPriorityFeePerGas.

  • Chain ID: In order to protect against replay attacks on other EVM chains, each transaction must now include a specific ID per chain. Mainnet is 1, and other chains have their own specific IDs.

|          Ethereum Transaction               |
|                                            |
|  _______________          _______________ |
| |     Header    |        |  Message or   ||
| |______________|        |     Call      |||
| | Nonce         |        | Data          |||
| | Gas Price     |        | Gas Limit     |||
| | Gas Limit     |        | Recipient     |||
| | Value         |        | Signature     |||
| | Signature     |        |______________|||
| |______________|                        ||
|                                            |
|                                            |
|  ________________                          |
| | Transaction    |                         |
| | Receipt        |                         |
| |________________|                        |
|                                            |

The transaction is composed of a header and a message or call. The header includes information such as the nonce, gas price, gas limit, value, and signature. The message or call includes data, gas limit, recipient, and signature.

Once the transaction is submitted to the network, it is included in a block and a transaction receipt is generated. The transaction receipt includes information such as the status of the transaction and the gas used.

Last updated