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

Patch/parser updates for fixing message parsers #468

Merged
merged 12 commits into from
Sep 8, 2023

Conversation

pharr117
Copy link
Collaborator

@pharr117 pharr117 commented Sep 6, 2023

Overview

This PR contains a few bug fixes and parser updates. It also has updates to support fixing old message types that have errors and prevent them from happening in the future.

Parser Updates

MsgWithdrawValidatorCommission

We are using a new event to get the receiver address for Validator commission. The old event was searching for the withdraw_commission event, which was turning up blank in later Osmosis blocks. We now look for the coin_received event to get the proper address.

Fixing this in old blocks will require to run the indexer with the --re-index-message-type "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission" option set.

Closes #460

MsgSplitRouteSwapExactAmountIn

This is a complex swap. The parser will gather token in and token out from the event structure.

MsgUnlockAndMigrateSharesToFullRangeConcentratedPosition

This is a delegation action provided in Superfluid. We have decided to ignore Superfluid, so we add this one to the ignore list and only index the fees as normal.

Transaction Indexer DB Loop CreateOrUpdate

The transaction DB loop will now do CreateOrUpdate operations rather than a CreateOrFind. This was an unfinished aspect of the reindexing feature of the application that was preventing updates from happening when reindexing old blocks.

Better Indexer Error Passing

Event GetValueForAttribute Error Raise

The GetValueForAttribute util function will now return an error if the attribute was not found. This was originally silently passing an empty string if the attribute was not found, which was the original cause of the MsgWithdrawValidatorCommission error.

Throw Failed Block when Message Parser or Ignore List Entry Missing

When a parser or ignore list entry was not found for a message (i.e. we have encountered a new message we have never seen before), we would originally just output a Log saying so. This PR changes this so that an error is passed up. This will cause the block to fail and we will be able to track down missing message types easier.

CSV Parsers for Osmosis Pool Manager Swaps

This PR adds CSV parsers for all CSV formats for the Osmosis Pool Manager Swaps.

@pharr117 pharr117 merged commit 8ce9576 into main Sep 8, 2023
3 checks passed
@pharr117 pharr117 deleted the patch/parser-updates-for-fixing-message-parsers branch September 8, 2023 01:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Commission is being indexed, but not making it to the parser.
2 participants