You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if trs.params.chainID == MAINCHAIN_ID or trs.params.chainID == ownChainAccount.ID:
return False
# The commands fails if the sidechain is already terminated on this chain
if terminatedStateAccount(trs.params.chainID) exists and terminatedStateAccount(trs.params.chainID).initialized == True:
return False
let deserializedInteropAccount be the deserialization of trs.params.sidechainChainAccount
# The commands fails if the sidechain is not terminated on the mainchain but the sidechain already violated the liveness requirement
if (deserializedInteropAccount.status != CHAIN_TERMINATED
and chainAccount(MAINCHAIN_ID).lastCertificate.timestamp - deserializedInteropAccount.lastCertificate.timestamp <= LIVENESS_LIMIT):
return False
interopAccKey = uint32be(MODULE_ID_INTEROPERABILITY) || STORE_PREFIX_CHAIN_DATA || uint32be(trs.params.chainID)
query = { key: interopAccKey,
value: SHA-256(trs.params.sidechainChainAccount),
bitmap: trs.params.bitmap }
proofOfInclusion = { siblingHashes: trs.params.siblingHashes, queries : [query] }
if terminatedStateAccount(trs.params.chainID) exists:
return SMTVerify([interopAccKey], proofOfInclusion, terminatedStateAccount(trs.params.chainID).mainchainStateRoot)
else:
return SMTVerify([interopAccKey], proofOfInclusion, chainAccount(MAINCHAIN_ID).lastCertificate.stateRoot)
Acceptance Criteria
Add unit tests for recovery initialization
The text was updated successfully, but these errors were encountered:
Description
Add command to initialize state recovery.
Acceptance Criteria
The text was updated successfully, but these errors were encountered: