-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Transaction ID offline calculation #5935
Comments
transaction id is the hash of the transaction content itself, and it will not be affected by the signature. However, the signature will use the combined information from chain_id, transaction content and content free data as digest, then be signed by the private key. Therefore, transaction ID will never equal to signature. All of these can be found in transaction.cpp. |
I understand that signature never equal transaction ID, I want completely understand how exactly transaction ID generated For example, tx: https://tools.cryptokylin.io/#/tx/88aa28ba94c529aa075fa41f1ff7822703b7271b754be0f3c0253cfd973f4d48 Chain ID: 5fff1dae8dc8e2fc4d5b23b2c7665c97f9e9d8edf2b6485a86ba311c25639191 Neiter SHA256 of ChainID + packed_trx, neither SHA256 of packed_trx not equals Transaction ID |
The transaction ID is the sha256 of the transaction structure in memory. See the code here. |
Confirmed with this sha256 calculator sha256 is 88aa28ba94c529aa075fa41f1ff7822703b7271b754be0f3c0253cfd973f4d48 |
How can I get packed_trx by offline signature? |
so anyone managed to create the txId offline? |
Hi!
I need transaction ID before pushing transaction to network. I found some Java implemetation of signing transactions offline, but as I can see, transaction ID is not equal signed hash. How I can calculate it? Which fields of transaction and in wich order I should pack before calculation?
The text was updated successfully, but these errors were encountered: