Environment: Delphinet using https://delphinet.smartpy.io
. I'm connecting to it through the RPC via the java/kotlin library OkHttp.
Steps to reproduce:
Trying to send my max XTZ balance to another account. The account is not delegated so it should be able to be empty.
- First dry-run the operation using
/run_operation
and/forge
to get the fees, gas limit and storage limit. The simulation returns:
{
"contents": [
{
"kind": "transaction",
"source": "tz1Ydpp4ibTrGSPn2i6cqQZ6arWieUbcfWVn",
"fee": "0",
"counter": "780748",
"gas_limit": "800000",
"storage_limit": "60000",
"amount": "692750",
"destination": "tz1LnZxYuTUpf54cx8RWEX6EW9sZBoxGbqPQ",
"metadata": {
"balance_updates": [
],
"operation_result": {
"status": "applied",
"balance_updates": [
{
"kind": "contract",
"contract": "tz1Ydpp4ibTrGSPn2i6cqQZ6arWieUbcfWVn",
"change": "-692750"
},
{
"kind": "contract",
"contract": "tz1LnZxYuTUpf54cx8RWEX6EW9sZBoxGbqPQ",
"change": "692750"
},
{
"kind": "contract",
"contract": "tz1Ydpp4ibTrGSPn2i6cqQZ6arWieUbcfWVn",
"change": "-64250"
}
],
"consumed_gas": "1427",
"consumed_milligas": "1427000",
"allocated_destination_contract": true
}
}
}
]
}
- I send an operation that has:
amount = max balance - (0.001591 ꜩ + 0.06425 ꜩ)
(baker fee + allocation fee)gas_limit: 1527
storage_limit: 257
This returns an error: proto.007-PsDELPH1.gas_exhausted.operation
- If I add 1 mutez padding to that
amount
the operation runs with no problem (that mutez gets left as balance). Example of this, where the balance was left as 1 mutez.
I tried this with several newly created accounts (all undelegated) and every time I tried to transfer all my funds found myself with this error.