hashgraph / hashgraph/guardian
DR: policy state 'save points' capability to be restarted from for restore operations
- Dominant language
- TypeScript
- Stars
- 146
- Forks
- 186
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 126
Description
### Problem description
In #1814 and previous DR-related tickets Guardian has been enhanced with the capability to restore all related information of an instance and its operation from immutable sources (IPFS and Hedera) following a disaster, providing the user keys are known and have been restored from the back-up (at #1814).
However the restoration of the operation is limited use as it is not possible to restart policy execution 'from where it was' or another arbitrary point because policy state information is not preserved.
Note: this is different from #2838 which focuses on the dry-run policy authoring/testing mode. The focus of this ticket is production policy execution with published artifacts etc.
### Requirements
Introduce a new capability into Guardian policies to have 'restore points' at a particular stage of the policy execution, which would mark the point from which the execution of the policy can be restarted following the restore operation. The author of the policy would then be able to select an appropriate stage for restart by introducing a 'save state' block at the corresponding points, which for example could be:
- just after project registration, at the beginning of the 'MRV receive' loop
- submission of the new yearly emissions user report
### Definition of done
- Guardian can restore the policy execution state at the 'save point' from the corresponding policy data stored in IPFS.
- Such restore operation requires policy authors' pre-planning at the policy creation stage in using special 'restoration point' block
### Acceptance criteria
- For policies with 'save state' blocks Guardian restart operation at these points following the DR procedure
Contributor guide
Assessment
This issue has not been assessed yet.