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

Rosetta fails to retrieve some blocks #11402

Closed
4 tasks
Tracked by #13327
emmanuelm41 opened this issue Mar 16, 2022 · 1 comment
Closed
4 tasks
Tracked by #13327

Rosetta fails to retrieve some blocks #11402

emmanuelm41 opened this issue Mar 16, 2022 · 1 comment
Assignees
Labels
C:Rosetta Issues and PR related to Rosetta S:zondax Squad: Zondax

Comments

@emmanuelm41
Copy link

Summary of Bug

Rosetta is failing to retrieve some blocks with some nasty errors. On height 9773304 for example.

Version

  • Cosmos SDK v0.45.1
  • Gaia v6.0.0

Steps to Reproduce

  • Start a node and fully sync it on cosmoshub-4 with the following command gaiad start --home /data --x-crisis-skip-assert-invariants
  • Start rosetta with the following command simd rosetta --blockchain Cosmos --network cosmoshub-4 --grpc cosmos-node-srv:9090 --tendermint cosmos-node-srv:26657 --log_level trace --trace

Working request

{
    "network_identifier": 
        {
            "blockchain": "{{blockchain}}",
            "network": "{{network}}"
        },
    "block_identifier": {
        "index": 8000021
    }
}
{
    "block": {
        "block_identifier": {
            "index": 8000021,
            "hash": "D92CBFDD315BE2A2A7D24E5D1D1E8FF332BE10F00FF1206C589F6F468B19F972"
        },
        "parent_block_identifier": {
            "index": 8000020,
            "hash": "3575813AB4A5F45D21FE759AC4AF523C4A034F00822D795E5686776C6AFA577E"
        },
        "timestamp": 1634191683505,
        "transactions": [
            {
                "transaction_identifier": {
                    "hash": "01D92CBFDD315BE2A2A7D24E5D1D1E8FF332BE10F00FF1206C589F6F468B19F972"
                },
                "operations": []
            },
            {
                "transaction_identifier": {
                    "hash": "FCA128EC46CF97F43DE04869C442FF2BB9E2561F5109E8FBC68858565965FB46"
                },
                "operations": [
                    {
                        "operation_identifier": {
                            "index": 0
                        },
                        "type": "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward",
                        "status": "Success",
                        "account": {
                            "address": "cosmos1c9xj5vju9as5xygr2trma6e7dc7d0cye9ljuej"
                        },
                        "metadata": {
                            "delegator_address": "cosmos1c9xj5vju9as5xygr2trma6e7dc7d0cye9ljuej",
                            "validator_address": "cosmosvaloper1tflk30mq5vgqjdly92kkhhq3raev2hnz6eete3"
                        }
                    }
                ]
            },
            {
                "transaction_identifier": {
                    "hash": "00D92CBFDD315BE2A2A7D24E5D1D1E8FF332BE10F00FF1206C589F6F468B19F972"
                },
                "operations": []
            }
        ]
    }
}

Error 1

  • Use the following body to send a request using postman for example:
{
    "network_identifier": 
        {
            "blockchain": "{{blockchain}}",
            "network": "{{network}}"
        },
    "block_identifier": {
        "index": 9773304
    }
}
  • The error I get is
{
    "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 /ibc.core.client.v1.MsgUpdateClient: tx parse error"
    }
}

Error 2

  • Use the following body to send a request using postman for example:
{
    "network_identifier": 
        {
            "blockchain": "{{blockchain}}",
            "network": "{{network}}"
        },
    "block_identifier": {
        "index": 4000000
    }
}
____
  • The error I get is
{
    "code": 0,
    "message": "unknown",
    "description": "unknown error",
    "retriable": false,
    "details": {
        "info": "rosetta: (0) unknown"
    }
}

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@tac0turtle tac0turtle added the C:Rosetta Issues and PR related to Rosetta label Jun 14, 2022
@tac0turtle tac0turtle added the S:zondax Squad: Zondax label Jul 11, 2022
@raynaudoe
Copy link
Contributor

raynaudoe commented Sep 27, 2022

I've found not the source of these errors but how rosetta is masking inner errors, thus getting something generic like this:

{
    "code": 0,
    "message": "unknown",
    "description": "unknown error",
    "retriable": false,
    "details": {
        "info": "rosetta: (0) unknown"
    }
}

The fix for getting the actual error message would be done in Zondax's fork .

As for the error while querying a block, I wasn't able to reproduce it with the actual codebase, most likely it was already fixed (fork). This kind of errors will be easily catched when rosetta-cli test can be run on CI

mergify bot pushed a commit that referenced this issue Nov 4, 2022
### Description

Closes:
#13083
#11402
#10678
#12358
#10776
#12934

### Author Checklist

*All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.*

I have...

- [x] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [x] added `!` to the type prefix if API or client breaking change
- [x] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#pr-targeting))
- [x] provided a link to the relevant issue or specification
- [x] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/main/docs/building-modules)
- [x] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#testing)
- [x] added a changelog entry to `CHANGELOG.md`
- [x] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [x] updated the relevant documentation or specification
- [x] reviewed "Files changed" and left comments if necessary
- [ ] confirmed all CI checks have passed

### Reviewers Checklist

*All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.*

I have...

- [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] confirmed `!` in the type prefix if API or client breaking change
- [ ] confirmed all author checklist items have been addressed 
- [ ] reviewed state machine logic
- [ ] reviewed API design and naming
- [ ] reviewed documentation is accurate
- [ ] reviewed tests and test coverage
- [ ] manually tested (if applicable)
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
Projects
None yet
Development

No branches or pull requests

4 participants