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

Implement mainchain Message Recovery Command verfication #7022

Closed
Tracked by #6915
mitsuaki-u opened this issue Feb 21, 2022 · 0 comments · Fixed by #7166
Closed
Tracked by #6915

Implement mainchain Message Recovery Command verfication #7022

mitsuaki-u opened this issue Feb 21, 2022 · 0 comments · Fixed by #7166
Assignees
Labels
framework/module/interoperability Interoperability module
Milestone

Comments

@mitsuaki-u
Copy link
Contributor

mitsuaki-u commented Feb 21, 2022

Description

Add message recovery command verification to mainchain interoperability module.

if terminatedOutboxAccount(trs.params.chainID) does not exist:
    return False

# Check that the CCMs are still pending
for index in trs.params.idxs:
    if index < terminatedOutboxAccount(trs.params.chainID).partnerChainInboxSize:
        return False

# Check the validity of the CCMs to be recovered
for ccm in deserializedCCMs:
    if ccm.status != CCM_STATUS_OK:
        return False

# Check the inclusion proof against the sidechain outbox root
proof = { size: terminatedOutboxAccount(trs.params.chainID).outboxSize,
    idxs: trs.params.idxs,
    siblingHashes: trs.params.siblingHashes}


return RMTVerify( 
  [SHA-256(ccmData) for ccmData in trs.params.crossChainMessages],
  proof,
  terminatedOutboxAccount(trs.params.chainID).outboxRoot
  )

Acceptance Criteria

  • Add unit tests for message recovery
@ishantiw ishantiw added framework/module/interoperability Interoperability module and removed framework labels Feb 23, 2022
@milenagojkovic milenagojkovic added this to the Sprint 68 milestone Apr 25, 2022
@Incede Incede self-assigned this May 4, 2022
@Incede Incede moved this from Backlog to In Progress in Lisk SDK Version 6.0.0 May 4, 2022
@Incede Incede moved this from In Progress to ToDo in Lisk SDK Version 6.0.0 May 6, 2022
@shuse2 shuse2 moved this from ToDo to In Progress in Lisk SDK Version 6.0.0 May 6, 2022
@milenagojkovic milenagojkovic modified the milestones: Sprint 68, Sprint 69 May 7, 2022
@Incede Incede moved this from In Progress to Pending Review in Lisk SDK Version 6.0.0 May 13, 2022
ishantiw added a commit that referenced this issue May 20, 2022
Implement mainchain & sidechain recovery verification -  Closes #7022
Repository owner moved this from Pending Review to Done in Lisk SDK Version 6.0.0 May 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
framework/module/interoperability Interoperability module
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants