-
Notifications
You must be signed in to change notification settings - Fork 13
Conversation
if terminatedOutboxAccount(trsParams.chainID) exists: | ||
raise Exception("Terminated outbox account already exists.") | ||
|
||
queryKey = STORE_PREFIX_INTEROPERABILITY + SUBSTORE_PREFIX_CHANNEL_DATA + sha256(getMainchainID()) | ||
queryKey = STORE_PREFIX_INTEROPERABILITY + SUBSTORE_PREFIX_CHANNEL_DATA + sha256(OWN_CHAIN_ID) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW: we should make sure that we have a unit test where this verify
function is called where OWN_CHAIN_ID != getMainchainID()
. Otherwise, I'd be a bit afraid that the implementation would not be changed as sha256(getMainchainID())
should work for all other SKD 6 tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point, I have noted it down in the issue (LiskArchive/lisk-sdk#8254) on SDK
Co-authored-by: AndreasKendziorra <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, left few minor suggestions and comments and some questions to make sure we are in the same page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One minor cosmetic change but approving from my end
Created related SDK issues,
if terminatedOutboxAccount(trsParams.chainID) exists: | ||
raise Exception("Terminated outbox account already exists.") | ||
|
||
queryKey = STORE_PREFIX_INTEROPERABILITY + SUBSTORE_PREFIX_CHANNEL_DATA + sha256(getMainchainID()) | ||
queryKey = STORE_PREFIX_INTEROPERABILITY + SUBSTORE_PREFIX_CHANNEL_DATA + sha256(OWN_CHAIN_ID) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point, I have noted it down in the issue (LiskArchive/lisk-sdk#8254) on SDK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Editorial approval
@@ -161,7 +180,8 @@ stateRecoveryParams = { | |||
"siblingHashes": { | |||
"type": "array", | |||
"items": { | |||
"dataType": "bytes" | |||
"dataType": "bytes", | |||
"length": HASH_LENGTH |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a small inconsistency but here you use 'length' but in the other params you are using 'minLength' and 'maxLength'.
# Check that all query keys are pariwise distinct, | ||
# meaning that we are not trying to recover the same entry twice. | ||
if len(queryKeys) != len(set(queryKeys)): | ||
raise Exception("Recovered store keys are not pairwise distinct.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we just say 'distinct' for simplicity
Closes #283.
createTerminatedStateAccount
function to actually make use of the inputstateRoot