mimblewimble / grin-wallet

Grin Wallet
Apache License 2.0
182 stars 133 forks source link

Define transaction states #47

Open lehnberg opened 5 years ago

lehnberg commented 5 years ago

Creating an issue to track. Relevant chat in gitter/design.

Current proposal

  1. Created: Slate was generated.
  2. Pending: Slate has been passed to the other party(ies), and you are awaiting a response.
  3. Returned: Slate was processed and returned to whoever you got it from, and you are now awaiting to see the transaction.
  4. Finalized: A valid tx was broadcasted to the blockchain.
  5. Unconfirmed: A tx is on the chain but not yet received enough confirmations.
  6. Confirmed: A tx was confirmed on the chain.
  7. Cancelled: Tx was manually canceled by a user.
  8. Expired: A transaction expired before being finalized. (For example if other party cancelled.)

Open problems / critique

tromp commented 5 years ago

The general case of an n-party transaction would require further division of states 2 & 3. I propose calling the Pending states: Committed1, Committed2, ... Committedn, and calling the Returned states: Signed1, Signed2, ... Signedn. (CommittedByi and SignedByi are more verbose alternatives). The slate after step 1, Creation, could sensibly be called Committed0, but we can also imagine the creator to immediately add their own commitments to create a Committed1. We could add a further state between Signedn and Finalized where the tx is fully formed (all n partial signatures having been combined), but not yet submitted to Dandelion.

quentinlesceller commented 5 years ago

I think this issue is still relevant and should probably be moved to https://github.com/mimblewimble/grin-wallet repository.