Type-0 vs type-2 Ethereum transactions

Every block in the Ethereum blockchain has several transactions, and every transaction has some data stored in a specific format. When the Ethereum network came live on 30th July 2015, it only supported type-0 transactions (also known as Legacy transactions). Type-2 (also known as EIP-1559) transactions were introduced with the London upgrade in August 2021. The format of both these transactions is shown below:

Type-0 vs type-2 Ethereum transactions

Similarities

Most of the fields in both transactions are the same and have the same meaning. Similar fields in both the transactions are listed below:

  • Nonce: This is a unique identifier for every transaction. It should be consistent with the account nonce (stored in the world stateIt stores state of every account on the Ethereum blockchain.) at the transaction creation time.

  • Recipient: It is the receiver's (EOAExternally owned account or a contract account) account address.

  • Signature: It is used to authenticate the sender. The sender's private key signs the transaction.

  • Value: The amount of Wei (1 Ether = 101810^{18}Wei) to be sent to the receiver (payee) from the sender (payer).

  • Data: Some arbitrary data is stored on the blockchain or bytecode of a smart contract to be deployed.

  • Gas limit: It is the maximum amount of gas units that this transaction can consume.

  • Chain ID: For replay protection on different chains. The ID of the main chain is 1.

Differences

There is only one major difference in both these transaction formats. The "Gas price" field in the type-0 (Legacy) format is divided into two subfields: "Max priority fee per gas" and "Max fee per gas" in the type-2 transaction format. All of these fields are described below:

  1. Max priority fee per gas: This is the tip the sender is willing to pay the miner. The higher the tip, the higher the chances of our transaction being processed early. The unit of this field is Giga Wei (also known as GWei).

  2. Max fee per gas: This is the maximum price per gas unit that the sender is willing to pay for this transaction. The unit of this field is Giga Wei (also known as GWei).

  3. Gas price: This is the price of a gas unit the sender is willing to pay.

The Ethereum network still supports type-0 (legacy) transactions. The Gas price is considered the max fee per gas, and the gas price is also used to calculate the maximum priority fee per gas by the following formula:

Max priority fee per gas (tip for the miner) = Gas price - Base fee of the blockProvided by the network

Conclusion

As the Ethereum network still supports both formats of transactions, we can use any of these formats to make a transaction. Legacy or type-0 transactions give us more control over the transaction fee we pay. While type-2 transactions give us more control over the max priority fee per gas (tip of the miner), miners have a higher incentive for processing our transaction as we increase the tip. Thus, our transaction will be processed faster.

Free Resources

Copyright ©2025 Educative, Inc. All rights reserved