-
Notifications
You must be signed in to change notification settings - Fork 140
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deleted flag in ConsensusTopicInfo (#1049)
Signed-off-by: Michael Heinrichs <netopyr@users.noreply.github.com> Signed-off-by: Michael Garber <michael.garber@swirldslabs.com> Co-authored-by: GitHub Action <action@github.com> Co-authored-by: Michael Garber <michael.garber@swirldslabs.com>
- Loading branch information
1 parent
0b4c6a6
commit af6f7ee
Showing
1 changed file
with
80 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
--- | ||
hip: 1049 | ||
title: Deleted flag in ConsensusGetTopic | ||
author: Michael Heinrichs <michael@hashgraph.com> | ||
requested-by: Hashgraph | ||
type: Standards Track | ||
category: Service | ||
needs-tsc-approval: Yes | ||
status: Last Call | ||
last-call-date-time: 2024-11-05T07:00:00Z | ||
created: 2024-09-19 | ||
discussions-to: https://github.com/hashgraph/hedera-improvement-proposal/pull/1049 | ||
updated: 2024-10-22 | ||
--- | ||
|
||
## Abstract | ||
|
||
This HIP proposes to add a `deleted` flag to the response of a `ConsensusGetTopicInfo`-query. | ||
|
||
## Motivation | ||
|
||
Knowing if a topic has been deleted is essential for many use cases. Query results for all other entity types contain this information but are missing for topics. | ||
|
||
## Rationale | ||
|
||
Deleted entities are not immediately removed but marked as being deleted. Queries return these entities. The response for other entity types (e.g., `Account`, `Token`) contains a `deleted` flag that is `true` if the entity has been removed. | ||
|
||
The results of `ConsensusGetTopicInfo`-queries do not contain such a flag. This information is crucial for many use cases. For instance, a deleted topic should not be used anymore. | ||
|
||
## User stories | ||
|
||
As a user, I want to know if a `Topic` has been deleted. | ||
|
||
## Specification | ||
|
||
The message `ConsensusTopicInfo` is returned as a response to a `ConsensusGetTopicInfo`-query. It contains a deleted flag, which is true if the entity has been removed and false otherwise. | ||
|
||
```protobuf | ||
message ConsensusTopicInfo { | ||
[...] | ||
/** | ||
* Specifies whether the topic was deleted or not | ||
*/ | ||
bool deleted = 10; | ||
} | ||
``` | ||
|
||
## Backwards Compatibility | ||
|
||
The attribute is additional and can safely be ignored by existing code. | ||
|
||
## Security Implications | ||
|
||
The new flag imposes no new security risk. | ||
|
||
## How to Teach This | ||
|
||
Documentation for the `ConsensusGetTopicInfo`-query has to be updated. | ||
|
||
## Reference Implementation | ||
|
||
_The reference implementation must be complete before any HIP is given the status of “Final”. The final implementation must include test code and documentation._ | ||
|
||
## Rejected Ideas | ||
|
||
An enum `state` with the states `ACTIVE` and `DELETED` would have been extensible. However, we use a `deleted` flag already in similar situations and decided to be consistent. | ||
|
||
## Open Issues | ||
|
||
None. | ||
|
||
## References | ||
|
||
N/A | ||
|
||
## Copyright/license | ||
|
||
This document is licensed under the Apache License, Version 2.0 -- see [LICENSE](../LICENSE) or (https://www.apache.org/licenses/LICENSE-2.0) |