chia-blockchain icon indicating copy to clipboard operation
chia-blockchain copied to clipboard

Specify unconfirmed transactions to delete in a backwards-compatible way

Open aqk opened this issue 1 year ago • 2 comments

Purpose:

If we make the state of in-progress transactions more visible, we need to have a way to say "stop broadcasting this transaction"

Discussion:

If we unify the idea of "deleted from local wallet transaction database" with "we are no longer tracking or re-submitting this transaction", then this change is sufficient to allow the user to manage their submitted transactions. However, it is (and always was) possible to have a transaction confirmed after it is deleted locally, so special care needs to be taken when messaging how this works to the user.

Another issue I'd like input on: If we delete an outstanding transaction locally, and that transaction is then confirmed, we lose all metadata not held in the transaction itself, or not indexable from the data in the SpendBundle. Personally, I think that all data associated with a transaction (held outside the chain) should be implemented this way. But we must make this clear to wallet developers.

Current Behavior:

Fully backwards compatible.

New Behavior:

Overview: For the delete_unconfirmed Wallet RPC call, You are now allowed to add a parameter "tx_ids", which is a list of The old behaviour, with no arguments is preserved - it deletes ALL unconfirmed transactions in that case.

New behaviour is extensively documented in tests/wallet/rpc/test_wallet_rpc.py

Testing Notes:

aqk avatar Feb 15 '24 18:02 aqk

This pull request has conflicts, please resolve those before we can evaluate the pull request.

github-actions[bot] avatar Mar 14 '24 17:03 github-actions[bot]

This PR has been flagged as stale due to no activity for over 60 days. It will not be automatically closed, but it has been given a stale-pr label and should be manually reviewed by the relevant parties.

github-actions[bot] avatar Apr 29 '24 11:04 github-actions[bot]