Closed yanghang8612 closed 2 months ago
It could ensure more justice of TRON energy consumption in TVM, though some contracts need to be adjusted, it is worth.
To make the most of limited resources on TRON, taking time of resource occupancy into consideration, this proposal improves the energy allocations.
Only the energy consumption of SUICIDE
and VOTEWITNESS
opcodes is adjusted, for reasonable resource utilization, other opcodes remain the same. In this case, I think it's fine to make this proposal on chain.
An additional 25,000 energy cost for SUICIDE
opcode is acceptable, it rarely affect the normal transactions. The extra cost of destroying a contract is based on fair and security considerations.
https://tx.botdev.me/TRX/0xdc2cc1a56111023633d1c74ae8e29139861dc3e80c921e2422292d2424a328
Thanks to all your discussion on this proposal. This issue will be closed as it has already taken effect, please check it here.
Simple Summary
In order to make the energy consumption of the opcodes in TVM better reflect their real resource consumption, it is recommended to open the energy adjustment in TVM. For more information on energy adjustment, please refer to TIP-653.
Motivation
The energy consumption of
SUICIDE
andVOTEWITNESS
opcodes currently does not reflect their true resource consumption. If this situation persists, it may bring some unanticipated problems, such as unfair resource modeling, DDoS attacks, and so on.Therefore, it is necessary to open energy adjustment proposal to moderately adjust the energy consumption of
SUICIDE
andVOTEWITNESS
opcodes.How to Initiate the Voting Request
Implement energy adjustment in TVM:
Backwards Compatibility
Energy adjustment to these opcodes may potentially break contracts that depend on fixed energy costs. Even so, it is recommend opening this proposal. This is based on the fact that firstly the opcodes being adjusted are only applied to a few types of contracts, and secondly the benefits of the adjustment proposal for the protocol as a whole and for TVM outweigh the impact it would have.