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

Use FIFO for UTXO Selection #82

Open
apbendi opened this issue Aug 14, 2020 · 2 comments
Open

Use FIFO for UTXO Selection #82

apbendi opened this issue Aug 14, 2020 · 2 comments

Comments

@apbendi
Copy link
Member

apbendi commented Aug 14, 2020

Issue 6.3

FIFO by TransactionOutput.acceptingBlockBlueScore

@wildmolasses
Copy link
Contributor

wildmolasses commented Aug 17, 2020

Slight architectural change needed

Currently Api.Utxo[] are being optimistically transformed to bitcore.UnspentOutput[]. But we want to defer this until actual tx compose time. Then we can order by Api.Utxo.acceptingBlockBlueScore.

@ey51
Copy link

ey51 commented Aug 20, 2020

The goal here is to avoid double paying, by using the consensus's enforcement of no doublespending the same utxo. If transaction selection is random (as now), and the user has many utxo, there is a chance that two separate sends would result in selecting two non-overlapping sets of utxo. Deterministically choosing at least one overlapping utxo when composing a transaction would result in the consensus enforcing that only one of the transactions sent to the network will ever get accepted.

Any solution that achieves this is acceptable.

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

No branches or pull requests

3 participants