tari-project / tari-dan

BSD 3-Clause "New" or "Revised" License
5 stars 14 forks source link

feat(transaction)!: allow multiple signers #1053

Closed sdbondi closed 3 weeks ago

sdbondi commented 1 month ago

Description

Allow multiple signers for a transaction

Motivation and Context

This enables many use cases including paying for another user's fees (gasless) and invoking two or more components owned by different public keys in the same transaction.

It is possible for a party to remove all signatures but one and still have a valid transaction. In future, we'll add a final signature that includes all signatures in the preimage.

How Has This Been Tested?

Manually. TODO: Multiple signer integration test

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

Submit transactions requiring badges from multiple public keys

Breaking Changes

BREAKING CHANGE: wallet database changed, transaction struct changed

github-actions[bot] commented 1 month ago

Test Results (CI)

539 tests  +1   539 :white_check_mark: +1   1h 54m 29s :stopwatch: - 26m 27s  64 suites ±0     0 :zzz: ±0    2 files   ±0     0 :x: ±0 

Results for commit b9c4f4e4. ± Comparison against base commit 0ebb1fb1.

This pull request removes 3 and adds 4 tests. Note that renamed tests count towards both. ``` tari_transaction ‑ transaction::export_bindings_substaterequirement tari_transaction ‑ transaction::export_bindings_versionedsubstateid tari_transaction ‑ transaction::tests::it_hashes_identically_to_a_substate_id ``` ``` tari_dan_engine::account ‑ gasless tari_transaction ‑ substate::export_bindings_substaterequirement tari_transaction ‑ substate::export_bindings_versionedsubstateid tari_transaction ‑ substate::tests::it_hashes_identically_to_a_substate_id ```

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