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

Fix Cardano UTXO and balance bugs #849

Merged
merged 2 commits into from
Oct 30, 2024
Merged

Fix Cardano UTXO and balance bugs #849

merged 2 commits into from
Oct 30, 2024

Conversation

samholmes
Copy link
Collaborator

@samholmes samholmes commented Oct 30, 2024

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

none

Description

none

Network queries would result in overwriting local UTXO state without
considering that the UTXOs may have already been spent and the network
is out of date.

The solution is to always merge unseen UTXOs from the network into the
the wallet state, and ignore UTXOs that have already been seen by the
wallet.

This algorithm assumes that the network will catch-up with the wallet
well before the wallet is restarted/resync'd because the `seenVouts`
state is ephemeral. If it were to persist engine restarts, then the
only bug surface area is if the user resyncs (destroying any
persisted state for the wallet). This is generally how UTXO plugins work,
but doesn't appear to be necessary for Cardano due to it's fast block
times.
@samholmes samholmes merged commit a333939 into master Oct 30, 2024
2 checks passed
@samholmes samholmes deleted the sam/ada-utxo-stomping branch October 30, 2024 22:59
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

Successfully merging this pull request may close these issues.

2 participants