DRD does not check result of /run_operation to detect issues beforehand
DRD calls /chains/main/blocks/head/helpers/scripts/run_operation
with the initial transfer JSON to verify/validate but does not parse/check the result before continuing on to forge, sign, and inject. This has the potential to inject ops which will immediately fail, causing lost fees for the delegate.
DRD should parse the result of run_operation
and verify everything is good before continuing.
Example:
{ "contents":
[ { "kind": "transaction",
"source": "dn1V9rn27QHWMA6tacos8VhxqBLfr2dyGfBB", "fee": "1792",
"counter": "25116", "gas_limit": "10413", "storage_limit": "0",
"amount": "162285684",
"destination": "KT1WYZNVZxKZCdT8uHoyjF4kdKwowsYUjUoU",
"metadata":
{ "balance_updates":
[ { "kind": "contract",
"contract": "dn1V9rn27QHWMA6tacos8VhxqBLfr2dyGfBB",
"change": "-1792" },
{ "kind": "freezer", "category": "fees",
"delegate": "dn1G8vdxwTcD7Nqf5ewF8FAj6bRG8iqtTgba",
"cycle": 114, "change": "1792" } ],
"operation_result":
{ "status": "failed",
"errors":
[ { "kind": "temporary",
"id": "proto.005-PsBabyM1.gas_exhausted.operation" } ] } } },