-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: create hip-1021 #1021
Open
kantorcodes
wants to merge
2
commits into
hashgraph:main
Choose a base branch
from
kantorcodes:hip-1021
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
feat: create hip-1021 #1021
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,65 @@ | ||
--- | ||
hip: 1021 | ||
title: Improve Assignment of Auto-Renew Account ID for Topics | ||
author: Michael Kantor (@kantorcodes) | ||
type: Standards Track | ||
category: Service | ||
status: Draft | ||
created: 2024-08-01 | ||
requested-by: TierBot | ||
discussions-to: https://github.com/hashgraph/hedera-improvement-proposal/pull/1021 | ||
needs-council-approval: Yes | ||
--- | ||
|
||
## Abstract | ||
|
||
This HIP proposes a modification to the Hedera Consensus Service (HCS) to: | ||
- Enable setting the `autoRenewAccountId` to the account creating a `TopicCreateTransaction` when an Admin Key is not present during Topic Creation. | ||
- It ensures that for all existing topics with only a Submit Key and no `autoRenewAccountId`, the original `payer_account_id` of the topic is retroactively set as the `autoRenewAccountId`. | ||
- Automatically set the `autoRenewAccountId` to the `payer_account_id` of the Topic Id to prevent unintended user error. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How would I be able to leave this field empty intentionally? |
||
|
||
## Motivation | ||
|
||
Currently, when a Topic ID is created, the `autoRenewAccountId` is not automatically set to the account that initiated the transaction. Additionally: | ||
|
||
- It is only possible to set this field when an Admin Key is generated with the Topic. For topics that are created with the intention of being more "immutable," this is a risk. | ||
- Up until HIP-874 (https://github.com/hashgraph/hedera-improvement-proposal/pull/883/files), it was not easy to verify if a Topic was successfully created with an Autorenew Account Id, leading to more unexpected errors for users. | ||
|
||
This proposal seeks to simplify the process for users by making the auto-renewal mechanism seamless, eliminating the need for manual setting of the `autoRenewAccountId`. This change will reduce the potential for errors and ensure that topics are automatically renewed by the account responsible for their creation. Moreover, this proposal aims to provide backward compatibility by setting the `autoRenewAccountId` for previously created topics to the `payer_account_id` of those topics. | ||
|
||
## Rationale | ||
|
||
The proposed change simplifies user interactions with HCS and ensures consistency in managing topic renewals. Automatically associating the `autoRenewAccountId` with the topic `payer_account_id` account reduces complexity and the risk of unexpected topic expirations due to missing auto-renewal settings. For existing topics, retroactively setting the `autoRenewAccountId` to the `payer_account_id` ensures a uniform approach to topic management, especially when rent is enabled. At present, due to the inability to set an `autoRenewAccountId` on Topics without a Submit Key. | ||
|
||
## Specification | ||
|
||
### Automatic Setting of autoRenewAccountId | ||
|
||
When a new Topic ID is created, the `autoRenewAccountId` shall be automatically set to the account ID that creates the transaction, providing additional flexibility for when an Admin Key is not set. | ||
|
||
### Backwards Compatibility | ||
|
||
For all topics created before this proposal is implemented, the `autoRenewAccountId` shall be set to the original `payer_account_id` of the topic. This change shall be applied if and when rent is enabled for these topics. | ||
This retroactive setting shall not require any action from the original topic creators and shall be handled by the Hedera network. | ||
|
||
### Transaction Changes | ||
|
||
The current implementation allows for the `autoRenewAccountId` to be specified during topic creation only when an Admin Key is present. This proposal does not remove this capability but adds an automatic default to the transaction creator's account if not explicitly set, and the capability to set an `autoRenewAccountId` when only the Submit Key is present during creation. | ||
|
||
## Backwards Compatibility | ||
|
||
This proposal ensures backwards compatibility by defaulting the `autoRenewAccountId` to the original `payer_account_id` for all existing topics. This approach preserves the integrity of previously created topics and aligns future topic renewals with their original creators. | ||
|
||
## Implementation | ||
|
||
The Hedera node software will be updated to support automatic assignment of the `autoRenewAccountId` during the topic creation process. | ||
A migration process will be implemented to update the `autoRenewAccountId` for all existing topics to their the `payer_account_id`. | ||
|
||
## Drawbacks | ||
|
||
The primary drawback is the automatic nature of this feature, which may limit flexibility for users who wish to set a different `autoRenewAccountId`. However, this drawback is mitigated by allowing users to change the `autoRenewAccountId` post-creation if necessary. | ||
|
||
## Alternatives | ||
|
||
- **Future Rent Logic Adjustments:** If rent is enabled for TopicId Entities and a Topic Id was created before this HIP, rent would be charged to the `payer_account_id` of the Topic Id when an Autorenew Account Id was not present. | ||
- **No Retroactive Changes:** Implement the automatic setting of `autoRenewAccountId` only for new topics without making retroactive changes. This alternative would lead to inconsistent handling of auto-renewal across topics. |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not modify existing topics IMO:
payer_account_id
.