HomePhabricator

[Chronik] Automatically fix MINT VAULT txs

Description

[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

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D16936

Details

Provenance
tobias_ruckAuthored on Sat, Oct 19, 13:32
tobias_ruckPushed on Tue, Oct 22, 08:38
Reviewer
Restricted Project
Differential Revision
D16936: [Chronik] Automatically fix MINT VAULT txs
Parents
rABC6214f97a3602: [Cashtab] Add max qty validation to isValidTokenSendOrBurnAmount
Branches
Unknown
Tags
Unknown