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

wallet-core: Add creation of phoenix-transaction that increases the max spendable #3003

Open
moCello opened this issue Nov 18, 2024 · 0 comments
Labels
module:wallet-core type:feature implementing a new feature

Comments

@moCello
Copy link
Member

moCello commented Nov 18, 2024

Summary

Add a phoenix transaction that merges unspent notes to increase the max spendable.

Possible solution design or implementation

The transaction should take the 4 highest unspent notes and create a transaction to self so that these notes are merged.

Additional context

In phoenix, we use the notion of spendable (vs total), to express the highest amount that is spendable in one transaction.

This value will be different from the total phoenix DUSK owned by a key if the key owns more than 4 unspent notes. This is due to the fact that in order for the transaction circuits not to blow up in size, we can only create phoenix-transactions with at most 4 input notes.

To mitigate this, we already implement a strategy to maximize the amount of notes spent in each transaction in our pick_notes function.

If the user wants to spend more than the spendable however, notes need to be merged.

@HDauven HDauven added type:feature implementing a new feature module:wallet-core labels Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module:wallet-core type:feature implementing a new feature
Projects
None yet
Development

No branches or pull requests

2 participants