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

Implement mainchain State Recovery Command execution #7021

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

Implement mainchain State Recovery Command execution #7021

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

Comments

@mitsuaki-u
Copy link
Contributor

mitsuaki-u commented Feb 21, 2022

Description

Add state recovery command execution to mainchain interoperability module.

let storeQueries be an empty array

for each entry in trs.params.storeEntries:
    # The recover function corresponding to the module ID applies the recovery logic
    route processing logic to the module given by trs.params.moduleID
    recover(trs.params.chainID, trs.params.moduleID, entry.storePrefix, entry.storeKey, entry.storeValue)
    if the previous call fails:
        execution fails and trs is invalid

    emptyStore = empty bytes # Define an empty store entry
    query = { key: entry.storekey,
              value: SHA-256(emptyStore),
              bitmap: entry.bitmap}
    push query to storeQueries

terminatedStateAccount(trs.params.chainID).stateRoot = SMTCalculateRoot(trs.params.siblingHashes, storeQueries)

Acceptance Criteria

  • Add unit tests for execution command
  • Import this class for use in sidechain interoperability module
@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
@shuse2 shuse2 linked a pull request May 3, 2022 that will close this issue
@milenagojkovic milenagojkovic modified the milestones: Sprint 68, Sprint 69 May 7, 2022
@milenagojkovic milenagojkovic moved this from Backlog to ToDo in Lisk SDK Version 6.0.0 May 9, 2022
@milenagojkovic milenagojkovic moved this from ToDo to In Progress in Lisk SDK Version 6.0.0 May 11, 2022
@mitsuaki-u mitsuaki-u moved this from In Progress to Pending Review in Lisk SDK Version 6.0.0 May 13, 2022
mitsuaki-u added a commit that referenced this issue May 18, 2022
Implement State Recovery Command for interoperability - Closes #7020 and #7021
Repository owner moved this from Pending Review to Done in Lisk SDK Version 6.0.0 May 18, 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.

3 participants