Open imterryyy opened 1 year ago
following this commit https://github.com/ethereum/go-ethereum/commit/bbfb1e4008a359a8b57ec654330c0e674623e52f
Currently, TomoChain only supports the "Legacy Transaction" format, which is encoded using the RLP (Recursive Length Prefix) method. The encoding follows the pattern rlp([nonce, gasPrice, gasLimit, to, value, data, v, r, s])
, where the resulting byte array always starts with a byte greater than or equal to 0xc0
.
However, there is a proposed improvement known as EIP-2718 by the Ethereum Team. This proposal suggests the creation of a new transaction type, which would be encoded using the format TransactionType || TransactionPayload
(||
is the byte/byte-array concatenation operator.).
To differentiate between legacy transactions and the new typed transactions, clients can examine the first byte of the encoded transaction. If the byte falls within the range [0, 0x7f]
, it indicates a new transaction type. On the other hand, if the byte falls within the range [0xc0, 0xfe]
, it represents a legacy transaction type. The value 0xff
is reserved for future use as an extension sentinel value and is not currently used in RLP encoded transactions.
Motivation
As part of our ongoing efforts to enhance the functionality and flexibility of our blockchain platform, Ethereum team are proposing the implementation of Ethereum Improvement Proposal (EIP) 2718 - Typed Transaction Envelope. This EIP introduces a standardized format for transactions, allowing for the inclusion of additional transaction types beyond the current simple value transfers.
Benefits
Reference