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
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:
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: