You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the system contract wallet/cancelallunfreezev2 is executed, we can distinguish the amount of bandwidth/energy/tronpower canceled in this cancellation operation respectively by the transaction execution result. However, for the CANCELALLUNFREEZEV2(0xdc) opcode in TVM, it only produces an internal transaction containing the overall canceled amount, and cannot distinguish the canceled amount of each of the three resources.
Implementation
Internal transaction is defined below:
message InternalTransaction {
// internalTransaction identity, the root InternalTransaction hash
// should equals to root transaction id.
bytes hash = 1;
// the one send trx (TBD: or token) via function
bytes caller_address = 2;
// the one recieve trx (TBD: or token) via function
bytes transferTo_address = 3;
message CallValueInfo {
// trx (TBD: or token) value
int64 callValue = 1;
// TBD: tokenName, trx should be empty
string tokenId = 2;
}
repeated CallValueInfo callValueInfo = 4;
bytes note = 5;
bool rejected = 6;
string extra = 7;
}
Option A: Add three new types of internal transactions, like cancelAllUnfreezeV2ForBandwidth, cancelAllUnfreezeV2ForEnergy and cancelAllUnfreezeV2ForTronPower
Option B: Save the amount of three resource cancellations in the extra field, the format should preferably be in json.
Discussions
Q: Does it need a hard fork?
The text was updated successfully, but these errors were encountered:
Rationale
When the system contract
wallet/cancelallunfreezev2
is executed, we can distinguish the amount of bandwidth/energy/tronpower canceled in this cancellation operation respectively by the transaction execution result. However, for theCANCELALLUNFREEZEV2(0xdc)
opcode in TVM, it only produces an internal transaction containing the overall canceled amount, and cannot distinguish the canceled amount of each of the three resources.Implementation
Internal transaction is defined below:
cancelAllUnfreezeV2ForBandwidth
,cancelAllUnfreezeV2ForEnergy
andcancelAllUnfreezeV2ForTronPower
extra
field, the format should preferably be in json.Discussions
Q: Does it need a hard fork?
The text was updated successfully, but these errors were encountered: