'What values of a blockchain transaction need to be hashed to get a standardly correct tx hash?
I am stumbling upon, for passion and experimentation, the construction of a simple blockchain system locally .... My question was, when I hash the transaction, exactly, is what I have to hash 'is the complete transaction or just the key values? I give an example: Let's say I have this transaction:
{
"index": 1,
"filename": "tree.jpg",
"size": 143083,
"type": "image/jpeg",
"CID": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"time": [
"08-03-2022 11:46:26 AM",
1646736386.1427407
]
}
Do I have to hash all this content as a "unique string" input or only the values inside "file_name", "index" etc ??? Thanks!!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
