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

Register old proto messages #700

Conversation

amimart
Copy link
Contributor

@amimart amimart commented Dec 11, 2024

Purpose of Changes and their Description

Solve the unmarshalling issues of sdk.Msg implementations of previous x/emissions and x/mint versions by registering related types in the InterfaceRegistry.

This change is not consensus breaking as these messages are never manipulated in state mutations, there is no need to update validator nodes with this fix.

It'll allow to query transactions containing old versions of proto messages, for example the query below was returning an error:

> allorad --node "https://allora-rpc.testnet.allora.network" query tx 74E327C59995366ECF6009AE68122EB60B24815C78B636B01B52B2E96772932C
Error: unable to resolve type URL /emissions.v5.InsertWorkerPayloadRequest: tx parse error
Usage:
  allorad query tx --type=[hash|acc_seq|signature] [hash|acc_seq|signature] [flags]

Flags:
      --grpc-addr string   the gRPC endpoint to use for this chain
      --grpc-insecure      allow gRPC over insecure channels, if not the server must use TLS
      --height int         Use a specific height to query state at (this can error if the node is pruning state)
  -h, --help               help for tx
      --node string        <host>:<port> to CometBFT RPC interface for this chain (default "tcp://localhost:26657")
  -o, --output string      Output format (text|json) (default "text")
      --type string        The type to be used when querying tx, can be one of "hash", "acc_seq", "signature" (default "hash")

Global Flags:
      --home string         directory for config and data (default "/Users/arnaud/.allorad")
      --log_format string   The logging format (json|plain) (default "plain")
      --log_level string    The logging level (trace|debug|info|warn|error|fatal|panic|disabled or '*:<level>,<key>:<level>') (default "info")
      --log_no_color        Disable colored logs
      --trace               print out full stack trace on errors

unable to resolve type URL /emissions.v5.InsertWorkerPayloadRequest: tx parse error [cosmos/cosmos-sdk@v0.50.10/x/auth/tx/decoder.go:44]

I'll mention this in the upgrade checklist so we do the same for future versions.

Link(s) to Ticket(s) or Issue(s) resolved by this PR

https://linear.app/alloralabs/issue/PROTO-3030/investigate-issue-when-querying-transactions-in-testnet

Are these changes tested and documented?

  • If tested, please describe how. If not, why tests are not needed.
  • If documented, please describe where. If not, describe why docs are not needed.
  • Added to Unreleased section of CHANGELOG.md?

@amimart amimart force-pushed the arnaud/proto-3030-investigate-issue-when-querying-transactions-in-testnet branch from b2cc162 to 064ba8c Compare December 11, 2024 14:22
@amimart amimart marked this pull request as ready for review December 11, 2024 14:22
@amimart amimart force-pushed the arnaud/proto-3030-investigate-issue-when-querying-transactions-in-testnet branch from 064ba8c to 5efc17e Compare December 11, 2024 14:23
@amimart amimart force-pushed the arnaud/proto-3030-investigate-issue-when-querying-transactions-in-testnet branch from 5efc17e to 6f4eac2 Compare December 11, 2024 14:50
Copy link
Contributor

@guilherme-brandao guilherme-brandao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

Copy link
Contributor

@xmariachi xmariachi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good one

@amimart amimart merged commit ad0e86b into dev Dec 15, 2024
9 checks passed
@amimart amimart deleted the arnaud/proto-3030-investigate-issue-when-querying-transactions-in-testnet branch December 15, 2024 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants