tari-project / tari-dan

BSD 3-Clause "New" or "Revised" License
7 stars 16 forks source link

fix(consensus)!: deferred execution of txs with unversioned inputs #1023

Closed sdbondi closed 5 months ago

sdbondi commented 5 months ago

Description

Motivation and Context

Deferred execution previously had a default COMMIT decision which led to bugs when running rejected transactions (they would still get a COMMIT decision, but the validator does not have an accepted result to commit).

This PR partially implements late execution for local-only transactions. Additional work is required to support this and it has been disabled i.e. will ABORT the transaction for transactions without versions.

There was a bug where inputs without versions were provided but filled inputs for those substates were provided, the transaction would still detect that one or more inputs do not have a version.

Input refs are unnecessary because the validator will always know which substates were written at lock time.

TODOs:

How Has This Been Tested?

Existing tests pass, a new consensus unit test was written which is ignored because it fails, requires additional work to succeed, manually (previously working transactions still work).

What process can a PR reviewer use to test or verify this change?

Submit a transaction with a missing version

Breaking Changes

github-actions[bot] commented 5 months ago

Test Results (CI)

533 tests  +3   532 :white_check_mark: +2   1h 36m 53s :stopwatch: - 25m 45s  63 suites ±0     0 :zzz: ±0    2 files   ±0     1 :x: +1 

For more details on these failures, see this check.

Results for commit b2a10fe8. ± Comparison against base commit a77eda60.

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