tari-project / tari

The Tari protocol
https://tari.com
BSD 3-Clause "New" or "Revised" License
339 stars 210 forks source link

fix: make tx id random #6380

Closed SWvheerden closed 4 weeks ago

SWvheerden commented 1 month ago

Description

Force tx_id to be random

Motivation and Context

If some apparent reason a transaction fails to be submitted after creation using any method that does not supply a random tx_id, the tx_id is created using the first output. But this will create deterministically create a tx_id. This mean you can never rerun that transaction as it will always create the same tx_id which results in a db unique constraint failure.

github-actions[bot] commented 1 month ago

Test Results (CI)

    3 files    120 suites   43m 51s :stopwatch: 1 294 tests 1 294 :white_check_mark: 0 :zzz: 0 :x: 3 874 runs  3 874 :white_check_mark: 0 :zzz: 0 :x:

Results for commit fb01362b.

:recycle: This comment has been updated with latest results.

github-actions[bot] commented 1 month ago

Test Results (Integration tests)

 2 files  + 2  11 suites  +11   33m 32s :stopwatch: + 33m 32s 35 tests +35  33 :white_check_mark: +33  0 :zzz: ±0  2 :x: +2  39 runs  +39  34 :white_check_mark: +34  0 :zzz: ±0  5 :x: +5 

For more details on these failures, see this check.

Results for commit fb01362b. ± Comparison against base commit f5e88e9e.

:recycle: This comment has been updated with latest results.

SWvheerden commented 1 month ago

good catch