Page MenuHomePhabricator

[Chronik] Automatically fix MINT VAULT txs
ClosedPublic

Authored by tobias_ruck on Oct 19 2024, 13:45.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABCaa5e92acc72b: [Chronik] Automatically fix MINT VAULT txs
Summary

This is part of the DB upgrade to version 13.

It seems that at this moment of time, this only upgrades a single tx, 47f663238196a8376dffeb867727b7794f1a86e97d7401dd141ac8c072f91c54. However, if someone is updating the DB at a later stage, this code will handle this gracefully (and there seems indication that more txs of this form will come in the future).

Note that this uses the (erroneously added) indexing of OP_RETURN scripts, which actually will be removed as part of D16941. This way the upgrade is basically instant (instead of requiring a full search through all txs, or requiring the LOKAD ID index to be enabled).

Test Plan
  1. Make a backup of the Chronik DB
  2. Search for "UPGRADE13", apply the changes
  3. Build using ninja
  4. Run node, it should upgrade automatically to 13, and should print "Upgrading SLP MINT VAULT with TxId " for 47f663238196a8376dffeb867727b7794f1a86e97d7401dd141ac8c072f91c54 and 4c0f26fb3ceef96c56b7797386412e8b1a2d6155f18c146e8fd388b80efbab29, followed by "Upgrading, writing 1 entries for the token DB fix"
  5. (optional) Restore the previous Chronik DB and unapply the UPGRADE13 changes