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

[Feature][Wallet] Allow sendXtoY to create multiple transactions #970

Open
9 of 10 tasks
Zannick opened this issue Oct 5, 2021 · 0 comments
Open
9 of 10 tasks

[Feature][Wallet] Allow sendXtoY to create multiple transactions #970

Zannick opened this issue Oct 5, 2021 · 0 comments
Assignees
Labels
Coin Type: Basecoin Specifically related to basecoin transactions Coin Type: CT Specifically related to CT transactions Coin Type: RingCT Specifically related to RingCT transactions Component: Core App Related to the application itself. Component: RPC Related to the console commands themselves. Component: Wallet Relating to keystore, tx creation, and balance tracking Dev Status: In Progress Someone is actively working on this issue. Issue Type: Feature Request Additional feature that would make Veil better.

Comments

@Zannick
Copy link
Collaborator

Zannick commented Oct 5, 2021

Summary

Currently, attempts to send Veil with these commands can fail if it does not fit in a single transaction or block (and for RingCT, sometimes the user needs to run an additional command to unstick the funds). Instead, we plan to create multiple transactions for sending the requested funds. Spending zerocoin already does this. (We will not cover minting zerocoin here.)

Outline

  • Create MultiTxReceipt wrapper class akin to ZerocoinSpendReceipt.
  • Create new function to pick inputs up to a certain amount.
  • Modify send
    • assign partial values to outputs when the inputs returned aren't enough
    • Like ZerocoinSpend: create multiple transactions, test accepting them to the mempool as they are created, commit them in a batch after all have passed
    • ct and ringct outputs are split not something that I have to edit
  • Add RPC option to use multi-tx. Automatically determine maximum number of inputs (or define a hardcoded fixed maximum) or accept the number as the option.
  • regtest ct sends
  • regtest ringct sends

Optional additions

  • Add config option to default to multi-tx.
  • Can change from one tx can be used in another? Doesn't matter in this case, because only the last tx will even have change left.
  • If a transaction is still rejected for being too large, it could be automatically split further?
@Zannick Zannick added Component: Wallet Relating to keystore, tx creation, and balance tracking Issue Type: Feature Request Additional feature that would make Veil better. Component: RPC Related to the console commands themselves. Component: Core App Related to the application itself. Coin Type: RingCT Specifically related to RingCT transactions Coin Type: Basecoin Specifically related to basecoin transactions Coin Type: CT Specifically related to CT transactions Dev Status: In Progress Someone is actively working on this issue. labels Oct 5, 2021
@Zannick Zannick self-assigned this Oct 5, 2021
codeofalltrades added a commit that referenced this issue Mar 11, 2022
…ipt.

b10216a Split ZerocoinSpendReceipt into a generic Receipt. (Zannick)

Pull request description:

  This makes it easier to organize multiple transactions into a single receipt regardless of whether it's a zerocoin spend or something else. (#970)

Tree-SHA512: be829a0007ccbdc7e7c784964c2b02c198a2e9ce9d050696ea66d6e79999fafc2764e9e7eb088d2feefeb4c4f5529366d450f55e2e62a66f09019d33cacbb747
codeofalltrades added a commit that referenced this issue Mar 13, 2022
ec15117 Correctly track and test RingCT spends. (Zannick)

Pull request description:

  ## Problem

  Creating multiple ringct spend transactions in a batch (as part of #970) does not work because of these two similar issues.

  1.  When creating a transaction, the transaction record has dummy inputs which don't correspond to any actual output, so we don't actually track the pending spends.
  2.  When verifying that we aren't double-spending any ringct output, we add every keyimage we see to the set to check against. But if we're testing that a transaction could be accepted to the mempool, then committing that transaction, the commit fails (until the next block).

  ## Solution

  1.  Extract the spent coins' txo records to be marked as pending spend.
  2.  Don't track the inputs permanently when testing that a transaction could be accepted to mempool. We still track within the transaction.

  ## Tested

  On regtest with other changes for #970.

Tree-SHA512: 9ffc4be52dc94c15940fdc83629ccc4ed9ce1c3e42e31eaa9bbf3fac909fe30035e1d481f7dc416f90384e870bc9e82421348d042b77fbd8d1c26f3316798ace
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Coin Type: Basecoin Specifically related to basecoin transactions Coin Type: CT Specifically related to CT transactions Coin Type: RingCT Specifically related to RingCT transactions Component: Core App Related to the application itself. Component: RPC Related to the console commands themselves. Component: Wallet Relating to keystore, tx creation, and balance tracking Dev Status: In Progress Someone is actively working on this issue. Issue Type: Feature Request Additional feature that would make Veil better.
Projects
None yet
Development

No branches or pull requests

1 participant