You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are running CONSENSUSSUBMITMESSAGE transactions then we then query from the mirror nodes to find out the message sequence number. However, we randomly found that some messages could not be found. After some digging, we found that the TransactionId.toString() function was returning a timestamp string that did not match the values returned by the mirror node. This made searching for the generated message impossible without creating a custom toString for the TransactionIds.
This only happened when the transaction's nanoseconds begin with a 0.
Description
We are running
CONSENSUSSUBMITMESSAGE
transactions then we then query from the mirror nodes to find out the message sequence number. However, we randomly found that some messages could not be found. After some digging, we found that theTransactionId.toString()
function was returning a timestamp string that did not match the values returned by the mirror node. This made searching for the generated message impossible without creating a custom toString for the TransactionIds.This only happened when the transaction's nanoseconds begin with a 0.
Example transaction:
https://testnet.mirrornode.hedera.com/api/v1/transactions/0.0.2180436-1681876267-054802581
Example Messages:
https://testnet.mirrornode.hedera.com/api/v1/topics/0.0.4250176/messages?limit=100&order=desc×tamp=gte%3A1681876267.054802581
Sequence number: 5
Looks like the culprit is this line:
https://github.com/hashgraph/hedera-sdk-js/blob/develop/src/transaction/TransactionId.js#L165
The nanoseconds need to be left padded with 0s for 9 chars
Steps to reproduce
Additional context
No response
Hedera network
mainnet, testnet, previewnet, other
Version
v2.23.0
Operating system
Linux
The text was updated successfully, but these errors were encountered: