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

Commits on Oct 30, 2024

  1. Fix UTXO stomping from the network for Cardano

    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 committed Oct 30, 2024
    Configuration menu
    Copy the full SHA
    824ce4a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    aee4bb4 View commit details
    Browse the repository at this point in the history