You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently rosetta server response to /network/status sets genesis_block_identifier to InitialHeight by downloading the genesis blob. This is not correct as InitialHeight is not the genesis block of the chain but the block with height 1.
Furthermore as the rosetta documentation explains: oldest_block_identifier identifies the oldest block available to query, if this field is not populated then it is assumed that the genesis_block_identifier is the oldest queryable block.
Currently oldest_block_identifier is not being populated and it should be as the oldest queryable block may not be neither block with height 1 nor InitialHeight, but EarliestBlockHeight from tendermint syncstatus RPC response.
## Description
Closes:
#13830#13827
- Rosetta `/network/status` response:
* populates `oldest_block_identifier` with `EarliestBlockHeight` from rpc syncInfo
* tries to populate `genesis_block_identifier` with block of height 1
* if block is not queryable, sets value of `InitialHeight` from genesis doc
* if not queryable sets same value as `oldest_block_identifier`
- Wrap `github.com/tendermint/tendermint/rpc/jsonrpc/types` errors to rosetta errors
- Split services into its own go files (account, block, mempool, network)
---
### 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
- [ ] 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)
- [ ] updated the relevant documentation or specification
- [ ] 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)
Summary of Bug
Currently rosetta server response to /network/status sets
genesis_block_identifier
to InitialHeight by downloading the genesis blob. This is not correct asInitialHeight
is not the genesis block of the chain but the block with height1
.Furthermore as the rosetta documentation explains:
oldest_block_identifier
identifies the oldest block available to query, if this field is not populated then it is assumed that thegenesis_block_identifier
is the oldest queryable block.Currently
oldest_block_identifier
is not being populated and it should be as the oldest queryable block may not be neither block with height 1 norInitialHeight
, but EarliestBlockHeight from tendermint syncstatus RPC response.Version
61effe8
Steps to Reproduce
Start rosetta server:
./build/simd rosetta --blockchain Cosmos --network cosmoshub-4 --grpc $GRPC:9090 --tendermint $TENDERMINT:26657 --log_level debug
and make a call to /network/status:
curl $ROSETTA:8080/network/status -d '{"network_identifier":{"blockchain":"Cosmos", "network":"cosmoshub-4"}}' | jq
Proposal
When calling
/network/status
oldest_block_identifier
should be populated withEarliestBlockHeight
genesis_block_identifier
should be either:1
, if the block its not queryable leave it empty or with the same values asoldest_block_identifier
InitialHeight
, if the block its not queryable leave it empty or with the same values asoldest_block_identifier
The text was updated successfully, but these errors were encountered: