Differences from EVM
TVM is basically compatible with EVM. However, it differs in some specific features and details.
- TVM uses the concept of energy instead of gas.
- No concept of
gasprice
. TVM has a stable energy price or floating rate from freezing TRX. - There is no concept of
block.difficulty
. It is a constant 0. - There is no concept of
block.gaslimit
. It is always 0. - The
selfbalance
,chianid
opcode is not supported. - Most instructions consume almost the same amount of EVM, memory operation instructions consume less than EVM.
COINBASE
opcode returns a 21-byte address- The contract address created by the CREATE2 instruction is calculated with a prefix of 0x41, not 0xff for EVM.
- The CREATE instruction creates a contract address calculated as
keccak256(transaction root hash + nonce)
, where nonce is the index of the current internal transaction, starting from 0. - Adding TRC10 token function and related opcodes
- Adding opcodes for bulk signature verification and multisig validation
- Adding shielded TRC20 contracts and several librustzcash instructions
- Internal Transaction has No data information.
- An extra error type
TransactionException
is introduced, it interrupts VM execution without consuming all energy.
Updated about 4 years ago