hashgraph / hashgraph/guardian
Global Events Reader and Writer improvements
- Dominant language
- TypeScript
- Stars
- 146
- Forks
- 186
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 126
Description
### Problem description
While working extensively with the Global Events Reader and Global Events Writer blocks in the FDA policy, I observed several behavior patterns that may require further review and potential improvement.
After creating and publishing multiple policies (required for testing, since Dry Run does not work with these blocks), I noticed that over time my machine’s CPU usage significantly increased. This appears to correlate with a large number of published policies subscribed to topic IDs.
Although this may not be a direct defect in the blocks themselves, the current behavior can lead to performance degradation when many policies remain subscribed, especially in testing-heavy environments.
Additionally, there are usability limitations related to discontinued policies and grid state persistence.
### Step to reproduce
1. Create multiple policies containing Global Events Reader and/or Writer blocks.
2. Publish each policy (Dry Run is not supported for these blocks, so publishing is required for testing).
3. Repeat the process multiple times to accumulate many published policies subscribed to topics.
4. After some time, observe increased CPU usage on the local machine.
5. Discontinue one of the published policies.
6. Attempt to disable or modify the Global Events Reader/Writer blocks inside the discontinued policy.
7. Notice that it is not possible to change their active state after discontinuation.
8. Navigate to the policies grid.
9. Observe that discontinued policies are always shown.
10. Change “Per page” value (e.g., from 10 to 50).
11. Navigate away and return to the page.
12. Notice that the “Per page” value resets to default.
13. If a discontinued filter is added manually, its state is not persisted after page reload.
### Expected behavior
1. When a policy containing Global Events Reader/Writer blocks is discontinued:
• The blocks should automatically be set to inactive, or
• There should be a way to disable topic subscriptions before or after discontinuation.
• Discontinued policies should not continue consuming resources through active topic subscriptions.
2. Add a Show / Hide Discontinued filter to the policies grid:
• By default, discontinued policies could be hidden.
• Users should be able to toggle visibility when needed.
3. Persist UI state for better usability:
• The selected “Per page” value should be saved (e.g., 50 instead of resetting to 10).
• The Show/Hide Discontinued filter state should also persist across page reloads or navigation.
### Screenshots
Correctly unsubscribed from topic, once policy is discontinued:
Image 1.a – Unable to unsubscribe topics from blocks after discontinuation
Image 1.b – Discontinued policies visible in grid
Image 1.c – “Per page” value resets after navigation
Contributor guide
Assessment
This issue has not been assessed yet.