-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible endless loop in resolving DID document #164
Comments
S3bb1
changed the title
Possible endless Loop in resolving DID Document
Possible endless loop in resolving DID document
May 5, 2021
@BenjaminMoe I think I had you look at this issue on the upstream, please make sure to cross link so we get their fixes implemented. |
I think this is related: decentralized-identity/sidetree#1172 (review) @BenjaminMoe can you confirm. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi all,
i found a possible endless loop when resolving a DID document.
Test scenario:
When executing these three operations in order with the following order
sidetree.js runs into an endless loop during calculation of the didState. This is because i updated the DID document with 2 times the same "updateCommitment" hash.
In the resolver where the
commitValueToOperationMap
is processed i have for the same entry two values:now the while loop in https://github.com/transmute-industries/sidetree.js/blob/main/packages/core/src/Resolver.ts#L151 checks if the map has the
nextUpdateCommitmentHash
and continues the loop. MynextUpdateCommitmentHash
is always the same like in the picture aboveEiC3h5hjrIw4_DpeS0zF4ZjuQ_7sHQcEuOYTG9vNp9LuLQ
and the while loop never finishes.Solution would be that the already processed keys are deleted from the map.
I have also looked into the original Sidetree repo and it seems that the same issue exists there too.
The text was updated successfully, but these errors were encountered: