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

[Bug]: Rosetta Standalone fails to retrieve block with transactions #15987

Closed
Tracked by #16220
bizk opened this issue Apr 28, 2023 · 6 comments
Closed
Tracked by #16220

[Bug]: Rosetta Standalone fails to retrieve block with transactions #15987

bizk opened this issue Apr 28, 2023 · 6 comments
Assignees
Labels
C:Rosetta Issues and PR related to Rosetta S:zondax Squad: Zondax T:Bug

Comments

@bizk
Copy link
Contributor

bizk commented Apr 28, 2023

Summary of Bug

When the user through Rosetta tries to get a block that contains transactions, Rosetta will fail with error 500:

{
	"code": 3,
	"message": "encode/decode error",
	"description": "returned when there are errors encoding or decoding information to and from the node",
	"retriable": true,
	"details": {
		"info": "unable to resolve type URL /cosmos.bank.v1beta1.MsgSend: tx parse error"
	}
}

Steps to Reproduce

  1. Run a rosetta node through Gaia v9.0.x. Connected to theta-testnet-001 with state sync enabled
  2. Build rosetta on tools/rosetta with make rosetta
  3. Run rosetta server ./rosetta --blockchain "gaia" --network "theta-testnet-001" --tendermint "localhost:26657" --addr "localhost:8080" --grpc "localhost:9090"
  4. Make a POST call to http://localhost:8080/block with body:
{
    "network_identifier": {
        "blockchain": "gaia",
        "network": "theta-testnet-001"
    },
    "block_identifier": {
		"index": 15697694
	}
}

Notes:

  • The issue is similar as issue 11402 but with a different typeUrl error
  • Rosseta is looking for cosmo.bank.v1beta1.MsgSend typeUrl which is not present in the registry object when performing the search onregistry.typeURLMap[typeURL], failing to resolve the ProtoMessage on interface_registry.go file on Resolve function.
  • fetching the data inside the node trough gaiad query block 15697694 will retreeive TXs encoded. When decoded the typeUrl is present.
  • It only happens with blocks that contains transactions.
  • The registry contains other submodules from cosmos.bank.v1beta1
@bizk bizk added the T:Bug label Apr 28, 2023
@julienrbrt
Copy link
Member

What Rosetta version are you using?

@julienrbrt julienrbrt added the S:needs more info This bug can't be addressed until more information is provided by the reporter. label Apr 28, 2023
@bizk
Copy link
Contributor Author

bizk commented Apr 28, 2023

I'm building rosetta from master

@julienrbrt julienrbrt removed the S:needs more info This bug can't be addressed until more information is provided by the reporter. label Apr 28, 2023
@julienrbrt
Copy link
Member

Alright, then it makes sense, that Rosetta does not support v0.45. Can you look at the v0.45/v0.46 branch and use Rosetta from there?

@bizk
Copy link
Contributor Author

bizk commented Apr 28, 2023

Rosetta at V0.46.x it is failing to connect to those endpoints, I'm trying to use the ./build/simd since rosetta is not stand alone in previous versions.
Will try with v0.45, if fails will debug on whats going on there

@bizk
Copy link
Contributor Author

bizk commented Apr 28, 2023

Well seems like it is failing to connect to the gateway on previous versions, anyway this is something we will need to fix, I will start working on this one right away

@facundomedica facundomedica added the S:zondax Squad: Zondax label Apr 28, 2023
@bizk bizk changed the title [Bug]: Rosetta fails to retrieve block with transactions [Bug]: Rosetta Standalone fails to retrieve block with transactions May 2, 2023
@bizk
Copy link
Contributor Author

bizk commented May 2, 2023

After debugging with @fdymylja we came to the conclusion that it works on simd build, but fails to work on the standalone version, due to a failure on populating the registry with the proto implementations.

the interface registry is app dependent as is constituted inside the app, why? because the app is the only component aware of its types (msg/query types)

@ainhoa-a ainhoa-a added the C:Rosetta Issues and PR related to Rosetta label Jun 22, 2023
@bizk bizk closed this as completed Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:Rosetta Issues and PR related to Rosetta S:zondax Squad: Zondax T:Bug
Projects
None yet
Development

No branches or pull requests

4 participants