[Task] Disambiguate message_id
in IotaDocument
#361
Labels
Enhancement
New feature or improvement to an existing feature
message_id
in IotaDocument
#361
Description
Add
integration_message_id
anddiff_message_id
toIotaDocument
.Motivation
The
message_id
stored in a resolvedIotaDocument
is typically themessage_id
of the last document published to the integration chain. When there are diff chain updates merged in during resolution, themessage_id
becomesMessageId::Null
(all zeroes). This is somewhat correct in that a resolved document with merged diff changes does not have amessage_id
because it is not technically on the Tangle in that state. Unfortunately, it makes it difficult to apply new updates (to either the integration or diff chain) due to the lack of amessage_id
to set forprevious_message_id
.This proposal is to keep the current behaviour to avoid a breaking change for now and add two new fields:
integration_message_id
, anddiff_message_id
. Theintegration_message_id
is equivalent to the currentmessage_id
except it is not overwritten when applying diff updates, anddiff_message_id
is simply themessage_id
of the last mergedDocumentDiff
. These ids will need to be set during resolution and care needs to be taken to ensure theAccount
maintains them too, as it essentially adds more state to theIotaDocument
that can become outdated or incorrect.Edit: this should be part of the larger refactor of document metadata and resolution metadata.
To-do list
Create a task-specific to-do list . Please link PRs that match the To-do list item behind the item after it has been submitted.
integration_message_id
anddiff_message_id
toIotaDocument
or metadataChange checklist
The text was updated successfully, but these errors were encountered: