zeta-chain / node

ZetaChain’s blockchain node and an observer validator client
https://zetachain.com
MIT License
165 stars 105 forks source link

zetaclient_last_scanned_block_number no longer being emitted for EVM chains #2829

Closed morde08 closed 2 weeks ago

morde08 commented 3 weeks ago

Describe the Bug The metric zetaclient_last_scanned_block_number is only emitted for chain: btc_mainnet (Mainnet) and chain: btc_testnet, solana_devnet (Testnet). The metric is not emitted as it was before for chains: eth_mainnet, bsc_mainnet, etc.

To Reproduce Start Zetaclientd with telemetry metrics enabled.

Expected Behavior zetaclient_last_scanned_block_number would be emitted for all connected chains.

Screenshots

# HELP zetaclient_last_scanned_block_number Last scanned block number per chain
# TYPE zetaclient_last_scanned_block_number gauge
zetaclient_last_scanned_block_number{chain=""} 1.4861373e+07
zetaclient_last_scanned_block_number{chain="btc_testnet"} 2.903149e+06
zetaclient_last_scanned_block_number{chain="solana_devnet"} 3.23089893e+08

^Above is all that is emitted Environment (please complete the following information):

gartnera commented 3 weeks ago

Root cause seems to be https://github.com/zeta-chain/node/pull/2568

This started injecting the chain.Chain{} that is stored on disk in zetaclient config.json rather than using the on chain info. We should be using the chain.RawChain() like we do in other chains.