Skip to content

TopicUpdateTransaction silent state-rewrite and small consistency issues #2471

Description

@exploreriii

The following TCK PR has surfaced a couple bugs in topic update:
#2462

The constructor defaults auto_renew_period=Duration(7890000) so every bare TopicUpdateTransaction().set_topic_id(...).execute(...) silently rewrites the topic's auto-renew period to ~91 days

Instead we should assume absence of duration means none, similar to the JS SDK implementation
https://github.com/hiero-ledger/hiero-sdk-js/blob/main/src/topic/TopicUpdateTransaction.js

Also we don't need to raise this error:
topicID=self.topic_id._to_proto() if self.topic_id else None,
Let the network answer INVALID_TOPIC_ID — matching the JS SDK

Additionally this type hint is incorrect
def set_expiration_time(self, expiration_time: Timestamp) -> TopicUpdateTransaction:

Metadata

Metadata

Assignees

Labels

approvedIssue has been approved by team memberskill: intermediaterequires some knowledge of the codebase with some defined steps to implement or examples

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions