I'm trying to store transactions in a database and want to generate a unique identifier from the transaction data. It must not change My data source is api.etherscan.io, and I am currently making an id from the transaction blockHash + hash, eg:
Given this transaction (with hashes are shortened for clarity):
{ blockNumber: '6564583',
timeStamp: '1540241421',
hash:
'0xf59dc77',
nonce: '34',
blockHash:
'0x19f51a3',
transactionIndex: '141',
from: '0x83b2d2289f1a666659a0261f4e0cd046386d586f',
to: '0x164013dfdfbf67b0dfca341ff12c4a616fb2a44a',
My database id would be something like 0xf59dc77_0x19f51a3
.
Is this enough to guarantee uniqueness, or is there more?