lisk-sdk
lisk-sdk copied to clipboard
Transaction dryrun does not return errorMessage or events
Expected behavior
Transaction dryrun should return an appropriate event (insufficientFee) and errorMessage with proper reasoning when a submitted transaction doesn't satisfy the minimum fees.
Actual behavior
It only returns the following:
{
"status": -1,
"events": []
}
Steps to reproduce
Dryrun the following transaction:
Hex encoded transaction:
0a05746f6b656e12127472616e7366657243726f7373436861696e180420002a203972849f2ab66376a68671c10a00e8b8b67d880434cc65b04c6ed886dfa91c2c323a0a080400000000000000108094ebdc031a0404000001221437e320a04e5702cbfe9f9f60d8e7c8d4b0dbd4262a0030003a0804000000000000003a405ecfa06e978922af9854c66e875180e41e5b4da8d618ce84584a04cacc136197ce5fa0f56a9f331d35c1282e070c3daa665ecd4eae0bf2a01e910bccc81d2481
Same transaction in JSON format:
{
"module": "token",
"command": "transferCrossChain",
"nonce": "4",
"senderPublicKey": "3972849f2ab66376a68671c10a00e8b8b67d880434cc65b04c6ed886dfa91c2c",
"params": {
"tokenID": "0400000000000000",
"amount": "1000000000",
"receivingChainID": "04000001",
"recipientAddress": "lskbgyrx3v76jxowgkgthu9yaf3dr29wqxbtxz8yp",
"data": "",
"messageFee": "0",
"messageFeeTokenID": "0400000000000000"
},
"fee": "0",
"signatures": [
"bc36067d683cc0b9bf8fe90a3f8ab1c7ba71da3eb05affcf74770f976c3422f429d3cb5f0f643c128dedefae557b0c08d394f1d2ee9166de3034488efe757539"
],
"id": "2834044d80346864ff6947b1094e7f45ef30e01185c57c12538bbfb1f982ef3d",
}
Which version(s) does this affect? (Environment, OS, etc...)
SDK v6.0.0-beta.7
Additional Information
- The transaction dryrun successfully passes the verification
- The error is generated within the executeTransaction hook here
This only happens when dry running in default, non-strict mode.
When using strict mode, the txpool_dryRunTransaction endpoint returns the error message as part of the response. In case of insufficient fee, it looks like this:
{
"result": -1,
"events": [],
"errorMessage": "Insufficient transaction fee. Minimum required fee is 178000."
}
Since changing this behavior is a protocol change, we need to asses the impact on other components.
After talking with @shuse2 and @sameersubudhi, we have decide to keep this issue open, but de-prioritize it, as Lisk Service is currently able to dry run a transaction when it includes a sufficient fee.