Ensuring uniqueness of transaction IDs #1133
walter-hernandez
started this conversation in
Ideas
Replies: 1 comment
-
Note that there's also the scheduled flag that is included in the TransactionID proto and is used for uniqueness as well. So you can have two transactions with the same account, valid start, and nonce with only the scheduled flag varying. The nonce came later and non-zero nonces were never used for scheduled transactions. Scheduled transactions should probably be changed to use nonce as well, though that doesn't help historical transactions. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
hip: XX
title: Ensuring uniqueness of transaction IDs
author: Jiahua Xu [email protected], Walter Hernandez [email protected], Juan Ignacio Ibañez [email protected], Paolo Tasca [email protected], Nikhil Vadgama [email protected]
type: Service
category: Service
needs-council-approval: Yes
status: Draft
created: 2025-02-28
discussions-to: https://github.com/hashgraph/hedera-improvement-proposal/discussions/XX
Abstract
This proposal introduces a nonce-based approach to enhance transaction ID representation in the Hedera network to resolve the observed duplication of transaction identifiers. Empirical analysis of network transaction data reveals systematic patterns of identifier duplication across heterogeneous transaction categories, primarily manifesting in cases where multiple operations share timestamps and account parameters. The proposed enhancement mandates the explicit inclusion of the transaction nonce parameter in the canonical transaction ID representation, resolving ambiguity while maintaining backward compatibility with existing infrastructure.
Motivation
According to Hedera documentation (https://docs.hedera.com/hedera/core-concepts/transactions-and-queries), a transaction ID is composed of the account ID of the fee payer and the transaction's valid start time. The current format appears as
[email protected]
, where0.0.9401
represents the fee payer's account ID and1598924675.82525000
indicates the timestamp in seconds.nanoseconds.While the protocol architecture includes a nonce parameter for distinguishing transactions with identical account and timestamp parameters, this nonce is not reflected in the canonical transaction ID representation. This implementation inconsistency has led to several documented instances where distinct transactions exhibit identical transaction IDs, creating significant operational challenges:
Rationale
Transaction IDs serve as critical identifiers within the Hedera network. However, in certain situations, some transactions share the same ID. For example:
A comparative analysis of major block explorers reveals inconsistent treatment of these duplicated identifiers:
This inconsistency creates significant user confusion, particularly for cross-reference verification between explorers, and indicates the need for a standardized, unambiguous transaction identification format.
User stories
As a developer of financial reconciliation systems, I require guaranteed unique and consistent transaction IDs across all infrastructure components to ensure accurate transaction correlation and auditing.
As a block explorer provider, I need a standardized, canonical transaction ID format that intrinsically captures all differentiating parameters to ensure consistent user experiences across the Hedera ecosystem.
As an end user verifying transaction execution, I require a transaction ID format that provides unambiguous reference to a single transaction to eliminate confusion when using different exploratory tools.
As a compliance officer conducting transaction analysis, I need deterministic transaction identification to ensure comprehensive audit trails without identifier collisions.
Specification
The proposed enhancement modifies the canonical transaction ID representation to explicitly incorporate the nonce parameter, which already exists within the system but is not reflected in the transaction identifier string.
The enhanced transaction ID format transitions from:
accountID@timestamp
To:
accountID@timestamp/nonce
Examples:
[email protected]
[email protected]/0
(with nonce=0)[email protected]/1
(with nonce=1)Implementation requirements include:
Importantly, this approach leverages existing protocol parameters and requires no fundamental changes to the underlying transaction structure, focusing instead on representation standardization.
Backwards Compatibility
The proposed enhancement maintains strong backward compatibility through:
Security Implications
The proposed enhancement offers several security benefits:
No new security vulnerabilities are introduced, as the approach:
How to Teach This
Open Issues
References
Copyright/license
This document is licensed under the Apache License, Version 2.0 -- see LICENSE or (https://www.apache.org/licenses/LICENSE-2.0)
Beta Was this translation helpful? Give feedback.
All reactions