trustbloc / orb

A DID method implementation that extends the Sidetree protocol into a Fediverse of interconnected nodes and witnessed using certificate transparency. Spec: https://trustbloc.github.io/did-method-orb/
Apache License 2.0
35 stars 22 forks source link

Resolving branches #426

Open sandrask opened 3 years ago

sandrask commented 3 years ago

With Orb there is a possibility that we may end up with branches in anchor credential graph.

sandrask commented 2 years ago

Currently we have two guards against branching: -- VDR (client) is sending requests for document updates to anchor origin -- if operation request is not sent to anchor origin server and the receiving server has VERIFY_LATEST_FROM_ANCHOR_ORIGIN=true then the receiving server will check local document version against anchor origin server before accepting did operations.

Also, VDR can also use servers configured with RESOLVE_FROM_ANCHOR_ORIGIN=true to speed up the processes of resolving did from anchor origin.

With all the above mentioned guards it appears to be impossible to end up in branching situation.

sandrask commented 2 years ago

If the guards above are not used then it is possible to end up in branching situation. For example, client can send two different operation request with same commitment to two different domains that don't follow each other. In this case document resolution from those two domains will be different. We have to address this scenario in two ways:

  1. Client has to decide which (if any) document is correct (one solution could be that longer operation chain wins)
  2. Server that lost has to be able to recover from this situation.
sandrask commented 2 years ago

@bstasyszyn @fqutishat As agreed postponing the implementation of resolving branches due to current safeguards until next milestone (>0.1.8)