Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

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

Closed
ishantiw opened this issue Oct 18, 2023 · 0 comments
Closed
Assignees
Milestone

Comments

@ishantiw
Copy link
Contributor

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 #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

@Madhulearn Madhulearn added this to the Sprint 106 milestone Oct 19, 2023
@ishantiw ishantiw added the framework/module/interoperability Interoperability module label Oct 20, 2023
ishantiw added a commit that referenced this issue Oct 20, 2023
- Create Panic function to exit application on unexpected error while CCU execution
- Add events to verifyPartnerChainOutboxRoot on smt and partnerOutbox failure #9111
- Rename executeCommon->beforeCrossChainMessagesExecution
- Add verifyRoutingRules similar to LIP0053
- Move verifyCertificateSignature and verifyPartnerChainOutboxRoot outside beforeCrossChainMessagesExecution and call before it #9112
- Move constant EVENT_TOPIC_CCM_EXECUTION to interoperability module
ishantiw added a commit that referenced this issue Oct 21, 2023
- Create Panic function to exit application on unexpected error while CCU execution
- Add events to verifyPartnerChainOutboxRoot on smt and partnerOutbox failure #9111
- Rename executeCommon->beforeCrossChainMessagesExecution
- Add verifyRoutingRules similar to LIP0053
- Move verifyCertificateSignature and verifyPartnerChainOutboxRoot outside beforeCrossChainMessagesExecution and call before it #9112
- Move constant EVENT_TOPIC_CCM_EXECUTION to interoperability module
ishantiw added a commit that referenced this issue Oct 22, 2023
* ♻️ Update getChildQueue to replace default topic
- getChildQueue is updated to replace default topic
- Transaction execution to have a transactionID with prefix as default topic
- CCM execution to have a ccmID with prefix as default topic

* ♻️ Add prefix to txID when call unsafeAdd

* ♻️ Handle ccm processing error #9100
- Create Panic function to exit application on unexpected error while CCU execution
- Add events to verifyPartnerChainOutboxRoot on smt and partnerOutbox failure #9111
- Rename executeCommon->beforeCrossChainMessagesExecution
- Add verifyRoutingRules similar to LIP0053
- Move verifyCertificateSignature and verifyPartnerChainOutboxRoot outside beforeCrossChainMessagesExecution and call before it #9112
- Move constant EVENT_TOPIC_CCM_EXECUTION to interoperability module

* ✅ Add and update tests for CCU execute and verifyPartnerChainOutboxRoot

* 💅🏻 Fix lint error

* 💅🏻 Apply feedback comments
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants