-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
Description
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 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
andcancelAllUnfreezeV2ForTronPower
- 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?
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done