terra.py icon indicating copy to clipboard operation
terra.py copied to clipboard

terra.tendermint.block_info return wrong latest block height 467248

Open uranik777 opened this issue 2 years ago • 7 comments

  • terra_sdk version: v3.0.1
  • Python version: 3.10.6
  • Operating System: Windows 10

Description

method terra.tendermint.block_info return wrong latest block height 467248 for phoenix-1 network, in bock explorer >1171995 blocks - https://terrasco.pe/mainnet/blocks/1171995

What I Did

from terra_sdk.client.lcd import LCDClient
terra = LCDClient("https://phoenix-lcd.terra.dev", "phoenix-1")
out = terra.tendermint.block_info()['block']['header']['height']
print(out)
# out: 467248

uranik777 avatar Aug 17 '22 19:08 uranik777

@uranik777 still having this problem? i tried to reproduce it but it doesn't happen to me.

Vritra4 avatar Aug 18 '22 04:08 Vritra4

@Vritra4 Today is the same, tried on another virtual machine with python 3.7.7

>~/src# python3.7 test.py
467248

uranik777 avatar Aug 18 '22 19:08 uranik777

@uranik777 could you tell me the height returned by curl https://phoenix-lcd.terra.dev/cosmos/base/tendermint/v1beta1/blocks/latest on your virtual machines?

Vritra4 avatar Aug 19 '22 03:08 Vritra4

@Vritra4

# curl https://phoenix-lcd.terra.dev/cosmos/base/tendermint/v1beta1/blocks/latest
{"block":{"header":{"version":{"block":"11","app":"0"},"chain_id":"phoenix-1","height":"467248","time":"2022-06-29T10:05:37.456421891Z","last_block_id":{"hash":"7/WT7/87V6C/Gap0VxEotetb5Y+aD3yKTvAj1yx54s4=","part_set_header":{"total":1,"hash":"td23sldDWYUSOYZZ32aMA0G2bz9xkFda2Q5GXPxJUUw="}},"last_commit_hash":"cfbFtUjVjWZqFDuH6GBTvhzsd1ignOFXX2OPHiTegQw=","data_hash":"47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=","validators_hash":"119P3r2hbDXCggvc24BAg9dtHAPcspDfldWnet3/bM8=","next_validators_hash":"119P3r2hbDXCggvc24BAg9dtHAPcspDfldWnet3/bM8=","consensus_hash":"5mDvFKlRQ9sPPq8vMfF33jNN5atlBXn9CToQy66G1aY=","app_hash":"klLcM9DadJSRUzt19xx0Ga8YzvPBUQgeLnTIPb4q/IU=","last_results_hash":"47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=","evidence_hash":"47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=","proposer_address":"ttTB5lQz6YLRt/Zx7UUH4zeM0Dw="},"data":{"txs":[]}}}

uranik777 avatar Aug 19 '22 08:08 uranik777

@uranik777 Still have problem? Can't produce the issue. It seems your vm is looking up wrong pheonix node(API server). Have you ever tried to update cURL?

JSHan94 avatar Sep 06 '22 10:09 JSHan94

@JSHan94 I tried to open the link https://phoenix-lcd.terra.dev/cosmos/base/tendermint/v1beta1/blocks/latest through the TOR browser (so that requests come from different IPs), and I get different results, not always up-to-date. Probably different terra servers respond to different ranges of ip addresses.

uranik777 avatar Sep 06 '22 16:09 uranik777

@JSHan94 I tried to open the link https://phoenix-lcd.terra.dev/cosmos/base/tendermint/v1beta1/blocks/latest through the TOR browser (so that requests come from different IPs), and I get different results, not always up-to-date. Probably different terra servers respond to different ranges of ip addresses.

Yeah, maybe related with AWS load balancer for lcd node. I will report it to the infra team.

JSHan94 avatar Sep 08 '22 06:09 JSHan94