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

Implement sidechain State Recovery Initialization Command execution #7036

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

Implement sidechain State Recovery Initialization Command execution #7036

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

Comments

@mitsuaki-u
Copy link
Contributor

mitsuaki-u commented Feb 22, 2022

Description

Add command to initialize state recovery.

let sidechainAccount be the deserialization of trs.params.sidechainChainAccount
if terminatedStateAccount(trs.params.chainID) exists:
    terminatedStateAccount(trs.params.chainID).stateRoot = sidechainAccount.lastCertificate.stateRoot
    terminatedStateAccount(trs.params.chainID).mainchainStateRoot = EMPTY_BYTES
    terminatedStateAccount(trs.params.chainID).initialized = True
else:
    createTerminatedStateAccount(trs.params.chainID, sidechainAccount.lastCertificate.stateRoot)

Acceptance Criteria

  • Add unit tests for recovery initialization
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