Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposed wallet changes #2520

Closed
yeastplume opened this issue Feb 3, 2019 · 4 comments
Closed

Proposed wallet changes #2520

yeastplume opened this issue Feb 3, 2019 · 4 comments

Comments

@yeastplume
Copy link
Member

yeastplume commented Feb 3, 2019

Am thinking about making the following changes to the way the wallet handles outputs:

  • Currently, when a wallet creates an output to receive funds, it creates the output as ‘unconfirmed’ and adds it to the wallet total (overall total, not spendable amount). I propose not adding it to any totals, instead displaying these amounts separately as ‘Awaiting Finalization’ or something that implies these outputs are now awaiting someone else’s actions before they will appear confirmed. This will also include change outputs.

  • Outputs currently being displayed as ‘awaiting confirmation’ should only be outputs that have appeared on the chain, but have fewer than the default number of confirmations (currently 10 blocks). All others will be included in the ‘Awaiting finalization’ state described above

  • ‘grin wallet check’ will no longer remove outputs/transactions that are in the ‘Awaiting finalization ’ by default. A flag can be added to remove them, or other options will be provided to clear them out (such as provide a command to return a list of all transactions associated with said outputs, making it easier to clear them
    manually.

Putting this here for thought and discussion, would be grateful to hear suggestions from everyone, especially now we’ve all had a couple of weeks of real-world wallet use

@mably
Copy link

mably commented Feb 3, 2019

‘grin wallet check’ will no longer remove outputs/transactions that are in the ‘Awaiting confirmation’ by default.

Why would you remove an output/tx that have already appeared on chain? 🤔

@yeastplume
Copy link
Member Author

Meant ‘Awaiting finalization’, will change

@i1skn
Copy link
Contributor

i1skn commented Feb 4, 2019

@yeastplume does that imply that we would have smth likeTxFinalized added here?

/// Types of transactions that can be contained within a TXLog entry
#[derive(Serialize, Deserialize, Debug, Clone, Eq, PartialEq)]
pub enum TxLogEntryType {
/// A coinbase transaction becomes confirmed
ConfirmedCoinbase,
/// Outputs created when a transaction is received
TxReceived,
/// Inputs locked + change outputs when a transaction is created
TxSent,
/// Received transaction that was rolled back by user
TxReceivedCancelled,
/// Sent transaction that was rolled back by user
TxSentCancelled,
}

In this case TxSent would become TxFinalized after it appears on the chain.

@quentinlesceller
Copy link
Member

Fixed by mimblewimble/grin-wallet#8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants