TBD54566975 / dwn-server

DWN server - host anywhere publicly accessible for DIDs to use
Apache License 2.0
40 stars 41 forks source link

Eliminate unintended pathway for record updates that uses `synchronizePrunedInitialRecordsWrite()` #32

Open frankhinek opened 1 year ago

frankhinek commented 1 year ago

PR #31 fixes a sync issue but does so in a way that RecordsWrite overwrites that mutate one of the 5 mutable properties other than data are unintentionally processed by the DWN SDK's synchronizePrunedInitialRecordsWrite() method.

Issue created to track follow-through with one of the two following changes:

  1. dwn-sdk-js change would be to modify the synchronizePrunedInitialRecordsWrite() method signature to take as input a RecordsWrite message with no associated data && a RecordsDelete.
  2. dwn-server and web5-js modification to introduce a new endpoint / RPC handler that is dedicated to sync so that RecordsWrite overwrites that mutate properties other than data don't flow through synchronizePrunedInitialRecordsWrite() unintentionally.