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

unable to resolve type URL /osmosis.gamm.v1beta1.MsgCreatePool #202

Closed
danbryan opened this issue Dec 31, 2022 · 23 comments · Fixed by #308 or #305
Closed

unable to resolve type URL /osmosis.gamm.v1beta1.MsgCreatePool #202

danbryan opened this issue Dec 31, 2022 · 23 comments · Fixed by #308 or #305
Assignees
Labels
2023 bug Something isn't working osmosis-1 Q1

Comments

@danbryan
Copy link
Collaborator

I got this error

6:25PM ERR Failed to process block 2695938 after 5 attempts. Will add to failed blocks table
6:25PM ERR Error getting transactions by block height. Will reattempt error="rpc error: code = InvalidArgument desc = unable to resolve type URL /osmosis.gamm.v1beta1.MsgCreatePool: tx parse error: invalid request"

with this compose file.

version: "3.9"
x-logging: &logging
  logging:
    driver: json-file
    options:
      max-size: 100m
      max-file: "3"
      tag: '{{.ImageName}}|{{.Name}}|{{.ImageFullID}}|{{.FullID}}'

services:
  postgres:
    restart: "unless-stopped"
    image: postgres:15-alpine
    stop_grace_period: 1m
    volumes:
      - /etc/localtime:/etc/localtime:ro
      # - postgres:/var/lib/postgresql/data
    environment:
      - POSTGRES_USER=taxuser
      - POSTGRES_PASSWORD=password
    ports:
      - 5432:5432/tcp
    healthcheck:
      test: ["CMD", "nc", "-z", "-v", "localhost", "5432"]
      interval: 5s
      timeout: 5s
      retries: 5
    networks:
      default:
        aliases:
          - defiant
    <<: *logging
  indexer:
    restart: "no"
    image: ghcr.io/defiantlabs/cosmos-tax-cli-private:sha-766a0e6
    user: defiant
    stop_grace_period: 1m
    volumes:
      # - indexer:/var/lib/cosmos-tax-cli-private-index
      - /etc/localtime:/etc/localtime:ro
    depends_on:
      postgres:
        condition: service_healthy
    links:
      - postgres
    networks:
      default:
        aliases:
          - defiant
    <<: *logging
    command:
    - /bin/sh
    - -c
    - |
      cosmos-tax-cli-private index \
      --log.pretty = true \
      --log.level = debug \
      --base.startBlock 2695938 \
      --base.endBlock 2695938 \
      --base.index true \
      --base.throttling 1.9 \
      --base.api https://api.osmosis.strange.love:443 \
      --lens.rpc http://104.196.107.57:26657 \
      --lens.accountPrefix osmo \
      --lens.keyringBackend test \
      --lens.chainID osmosis-1 \
      --lens.chainName osmosis \
      --db.host postgres \
      --db.database postgres \
      --db.user taxuser \
      --db.password password
@danbryan danbryan added bug Something isn't working Q1 osmosis-1 2023 labels Dec 31, 2022
@danbryan danbryan moved this to Todo in Defiant OSS Dec 31, 2022
@davidkonigsberg davidkonigsberg moved this from Todo to In Progress in Defiant OSS Jan 2, 2023
@davidkonigsberg
Copy link
Contributor

Looks like we are missing a few Gamm msg types. Will add them in based on this doc:
https://docs.osmosis.zone/osmosis-core/modules/gamm#messages

@davidkonigsberg
Copy link
Contributor

Ok, we were only missing 1 msg from the doc above, and it wasn't "/osmosis.gamm.v1beta1.MsgCreatePool"

I wil add "/osmosis.gamm.v1beta1.MsgCreatePool" as well, and I believe it is an older version of the "MsgCreateBalancerPool" msg that now exists.

@davidkonigsberg
Copy link
Contributor

Here is the block we are having issues with: https://www.mintscan.io/osmosis/blocks/id/2697048

@davidkonigsberg
Copy link
Contributor

So it looks like the transaction in question just fails.... https://www.mintscan.io/osmosis/txs/F007D9DB5DE0EC7D6F71ED97925349ED1A5B2355628320AD51BDDCC2C32ED1E2

@davidkonigsberg
Copy link
Contributor

Ok, so this error is actually coming from Lens.... It seem like this msg type isn't even valid... not sure how that is possible though... Wondering if we need to make changes to lens so it can fail safer?

In other words, if lens encounters a msg it doesn't know how to parse, rather than error out, just log and continue... or something... @KyleMoser might need a hand with this when you have time.

@davidkonigsberg davidkonigsberg moved this from In Progress to ‼️Blocked‼️ in Defiant OSS Jan 2, 2023
@davidkonigsberg davidkonigsberg linked a pull request Jan 2, 2023 that will close this issue
@KyleMoser
Copy link
Contributor

@davidkonigsberg Sorry, I didn't even see this notification. I'm on a lot of GH repos (will clean up now that I noticed I'm buried with Cosmos repos I don't care about).

The only reason I know of that lens would say a message type is invalid, is because the codec for the type isn't registered with lens. If you do a search for ModuleBasics in lens, that is where all of the message types should be registered.

BTW, moving this issue to high priority

@danbryan
Copy link
Collaborator Author

@davidkonigsberg @KyleMoser is this still blocked

image

@davidkonigsberg
Copy link
Contributor

@danbryan I havne't had a chance to dig into this more since @KyleMoser responded. I think I already checked to make sure lens had the module registered, but I will need to look again.

I will move this ticket from blocked to TODO and will work on it once the other CSV parsers are completed.

@davidkonigsberg davidkonigsberg moved this from ‼️Blocked‼️ to Todo in Defiant OSS Jan 12, 2023
@davidkonigsberg
Copy link
Contributor

@KyleMoser I am finally looking at this again, and I don't think the issue is as simple as a missing module (although I may be wrong). To me, it looks like an incompatibility between the version of osmosis that created this block, and the version of osmosis that lens is using to decode the message.... although I'm really not sure. Would you have some time to pair on this?

@davidkonigsberg
Copy link
Contributor

Looks like others have run into this issue: osmosis-labs/osmosis#1017

@davidkonigsberg
Copy link
Contributor

Looks like they closed it because of this PR: osmosis-labs/osmosis#1066 but that PR doesn’t actually fix it….

I feel like this is just broken…. not sure what we can do here unless we really hack together an alternate version that uses the old code and fails over to that if this doesn’t work…. to me that sounds like go import hell though, and I’m not even sure how I would go about doing it…

Changing this ticket backed to blocked....

@davidkonigsberg davidkonigsberg moved this from Todo to ‼️Blocked‼️ in Defiant OSS Jan 13, 2023
@danbryan
Copy link
Collaborator Author

Curious, do we care about failed transactions outside of the fees?

@davidkonigsberg
Copy link
Contributor

I don't think so... @KyleMoser ?

@danbryan
Copy link
Collaborator Author

If not, the next question would be, have we encoutered any /osmosis.gamm.v1beta1.MsgCreatePool that have succeeded. Could be a non / low priority issue if thats the case

@davidkonigsberg
Copy link
Contributor

Good question, not sure, I will see if I can find one.

@danbryan danbryan moved this from ‼️Blocked‼️ to Todo in Defiant OSS Jan 28, 2023
@danbryan danbryan assigned KyleMoser and unassigned KyleMoser and esaari1 Jan 30, 2023
@danbryan danbryan moved this from Todo to Ready 4 Review in Defiant OSS Feb 6, 2023
@danbryan danbryan moved this from Ready 4 Review to Todo in Defiant OSS Feb 9, 2023
@pharr117
Copy link
Collaborator

I have some experience with this one. If you follow the link here that David pointed out above, you will see that the Osmosis devs have changed the name from MsgCreatePool -> MsgCreateBalancerPool.

What this does is break the chain's ability to decode old message types since type names are used in the process of decoding backend state to generate the proper message type.

Essentially, since Osmosis deprecated the old type, the current version of Osmosis will never be able to properly decode its own state to return to us. Since we use the current version of Osmosis in Lens to decode the messages, this breaks.

Either Osmosis will need to come to a conclusion to resolve this issue, or we will need to explore alternative methods of getting the message into the proper type.

@danbryan
Copy link
Collaborator Author

Can we import a map of osmosis versions to block-heights and make sure we are using the version that was used to create the block?

@KyleMoser
Copy link
Contributor

KyleMoser commented Feb 28, 2023 via email

@danbryan danbryan moved this from Todo to In Progress in Defiant OSS Mar 8, 2023
@danbryan
Copy link
Collaborator Author

Chatted about this in the 3/8/23 sprint, has not been resumed yet

@danbryan
Copy link
Collaborator Author

march 15th,

@KyleMoser said

I'm still figuring out if I implemented #202 correctly (trying to get csvs with it). Gotta compare the csv to Join pool ones I think

@KyleMoser
Copy link
Contributor

The indexer is implemented correctly (I believe), but the CSV parser needs work still.

@danbryan danbryan assigned pharr117 and unassigned KyleMoser Apr 6, 2023
@danbryan
Copy link
Collaborator Author

danbryan commented Apr 6, 2023

@pharr117 mind checking if this one can be closed out?

@pharr117
Copy link
Collaborator

Just reran the indexer on this block and it succeeds, closing.

@github-project-automation github-project-automation bot moved this from In Progress to Done in Defiant OSS Apr 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment