This repository has been archived by the owner on Jun 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 458
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
♻️ 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
- Loading branch information
Showing
10 changed files
with
215 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
framework/src/modules/interoperability/events/invalid_outbox_root_verification.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/* | ||
* Copyright © 2023 Lisk Foundation | ||
* | ||
* See the LICENSE file at the top-level directory of this distribution | ||
* for licensing information. | ||
* | ||
* Unless otherwise agreed in a custom licensing agreement with the Lisk Foundation, | ||
* no part of this software, including this file, may be copied, modified, | ||
* propagated, or distributed except according to the terms contained in the | ||
* LICENSE file. | ||
* | ||
* Removal or modification of this copyright notice is prohibited. | ||
*/ | ||
import { BaseEvent, EventQueuer } from '../../base_event'; | ||
import { HASH_LENGTH } from '../constants'; | ||
|
||
export interface InvalidOutboxRootVerificationData { | ||
inboxRoot: Buffer; | ||
partnerChainOutboxRoot: Buffer; | ||
} | ||
|
||
export const invalidOutboxRootVerificationSchema = { | ||
$id: '/interoperability/events/invalidOutboxRootVerification', | ||
type: 'object', | ||
required: ['inboxRoot', 'partnerChainOutboxRoot'], | ||
properties: { | ||
inboxRoot: { | ||
dataType: 'bytes', | ||
fieldNumber: 1, | ||
minLength: HASH_LENGTH, | ||
maxLength: HASH_LENGTH, | ||
}, | ||
partnerChainOutboxRoot: { | ||
dataType: 'bytes', | ||
fieldNumber: 2, | ||
minLength: HASH_LENGTH, | ||
maxLength: HASH_LENGTH, | ||
}, | ||
}, | ||
}; | ||
|
||
export class InvalidOutboxRootverification extends BaseEvent<InvalidOutboxRootVerificationData> { | ||
public schema = invalidOutboxRootVerificationSchema; | ||
|
||
public error( | ||
ctx: EventQueuer, | ||
chainID: Buffer, | ||
data: InvalidOutboxRootVerificationData, | ||
noRevert: boolean, | ||
): void { | ||
this.add(ctx, data, [chainID], noRevert); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.