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

Scripts for patching swapped balances #8611

Merged
merged 1 commit into from
Apr 9, 2021

Conversation

psteckler
Copy link
Member

Two scripts to help patching swapped fee transfer balances in the archive db.

find-swapped-balances.awk is an AWK script that isolates the replayer log entries with the information needed to patch pairs of swapped balances. You run the script on the replayer log, and you get relevant logs with the block state hash and sequence number, plus the logs showing the balance mismatch. (Funny enough, this script revealed that one pair of swapped balances had identical amounts.)

fix-swapped-balances.sh patches all swapped balances an archive db through the first canonical block on April 7, 2021. We announced v1.1.5 later that day. Anyone who upgraded soon after the release should have few remaining invalid balances, after running this script.

Tested by:

  • dumping the mainnet archive db
  • running replayer on that db, with the target state hash
  • running the AWK script on the replayer log
  • creating the fix script from the AWK output
  • running the fix script, and re-running the replayer to verify there are no remaining errors

@psteckler psteckler requested review from a team as code owners April 9, 2021 18:14
@psteckler psteckler added the ci-build-me Add this label to trigger a circle+buildkite build for this branch label Apr 9, 2021
@mrmr1993 mrmr1993 merged commit 8ecfbf0 into compatible Apr 9, 2021
@mrmr1993 mrmr1993 deleted the feature/balance-patch-scripts branch April 9, 2021 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-build-me Add this label to trigger a circle+buildkite build for this branch waiting-for-gating
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants