LiskArchive / lisk-sdk

🔩 Lisk software development kit
https://lisk.com
Apache License 2.0
2.72k stars 457 forks source link

Handle unexpected errors in framework without having unintended state changes #9100

Closed ishantiw closed 8 months ago

ishantiw commented 8 months ago

Expected behavior

When there is some unexpected error happening while executing transaction then it should reject the whole transaction and makes the block invalid. Especially in the case of CCU transaction processing, if a CCM apply fails unexpectedly then it should make the CCU tx invalid instead of applying partial state changes and finally making the block invalid.

Actual behavior

When there is unexpected error like described in https://github.com/LiskHQ/lisk-sdk/issues/9099, the application still continues to execute the transaction and include it in the block that also includes some state changes done by the transaction. In case of CCU execution, if CCM apply fails due to unexpected system error then it continues to execute and is included in the block with invalid state changes.

Which version(s) does this affect? (Environment, OS, etc...)

6.0.0-rc.3