fix: Recovery of anchors from anchor origin #1046
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit adds the capability for an anchor origin to recover AnchorEvents and Sidetree files that it had previously published but does not currently have in its database (possibly due to a backup/restore). Logic has been added in the anchor sync process to also process the inboxes of services that are following me. So, an AnchorEvent may be recovered by reading the inbox of a service to which I had previously published a 'Create' activity. All of the Sidetree files are also recovered by supplying an 'alternate source' to the Observer. (The alternate source is the service from which I recovered the 'Create' activity.)
Also upgraded the Go version to 1.17 to all Docker images/builds and updated the Alpine version to 3.15. (This fixes a bug in Go version 1.17.3 where closing an HTTP response body always resulted in an error 'context canceled'. See golang/net@f0573a1.)
closes #1030
Signed-off-by: Bob Stasyszyn Bob.Stasyszyn@securekey.com