hashgraph / hashgraph/guardian

Hedera-reset tolerant Guardian

Open
#1,673 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
146
Forks
186
Avg merge
2d 20h
Merged PRs (30d)
126

Description

### Problem description
Hedera testnet will be [reset every quarter](https://docs.hedera.com/hedera/testnet#test-network-resets), starting from the 26th of January. This will wipe out all Guardian state from the testnet, including:

- Tokens
- Messages
- Topics
- Balances of user account (but the accounts themselves are not affected). (TBD - is this true?)

Guardian currently assumes that all records on Hedera (whether testnet or mainnet) are permanent and immutable, therefore Hedera reset presents a serious issue to the continuity of the Environmental projects data stream, their trust chain, and general Guardian instance functioning.

### Requirements
Create a seamless continuing operation of Guardian instances across Hedera resets, maintaining Guardian functionality and keeping data accessible (**only**) from within Guardian as if no resets have happened.

1. Adapt Guardian to tolerate Hedera resets by making it distinguish between 'archive' data and 'live' data. The former is Hedera-stored data (and their corresponding IDs) which existed prior to the reset, but is no longer available in Hedera. The latter is 'current' data which is available in Hedera. These two data types will be handled differently:

- 'Dry run'-like mode will be used for 'archive' data, i.e. when guardian performs operation on 'archive' data it does not reach out externally (to Hedera).
- Normal mode of operation applies to 'live' data.

6. Review Guardian Hedera interactions to ensure that all data stored in Hedera is cached in Guardian DB.
7. Introduce ability to arbitrarily designate data to be 'archive' data based on the data/time. This will be used every time there is a testnet reset to cut-off the archive data from live data.

### Definition of done

- Functionality implemented as above
- Documentation

### Acceptance criteria
Users of Guardian work seamlessly (**only**) via their instances' API and/or UI, agnostic to the resets that have happened on Hedera so long as they monitor Hedera reset schedule and configure guardian archvie/live data distinction accordingly.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.