QOSGroup / qmoon

the moon of QOS
Apache License 2.0
4 stars 8 forks source link

Tx table not updated since last commit 97cc3fd #145

Closed ewagmig closed 5 years ago

ewagmig commented 5 years ago

The Tx table is not updated any more since last commit 97cc3fd 14

  1. investigation is ongoing, the upgrading should take place first at dev environment then migrated to production

  2. new monitor KPI with this metric for Txs updating will also taken into consideration with alignment of Feiping.

ewagmig commented 5 years ago
  1. refer to https://github.com/prometheus/client_golang for new service kpi monitor
ewagmig commented 5 years ago
image

There are some Txs missed since block height 1590570 and restored 1706296, It is supposed to have relation with the qmoon_cosmos_agent not restarted on time. Why this happened is related to the fact that qmoon upgrading with QOS testnet aquarius-1001 on 28th Aug. which also pointed to the last height 1590570 unix time.

ewagmig commented 5 years ago

Things are still under investigation and how to restore the nearly 1100000 blocks data into database is one thing, and the other is to prevent this happen from the code perspectives.

ewagmig commented 5 years ago

So there are top things need to do in list as below:

  1. monitor the Tx table when no Tx insert, it should take some action from the transaction rather than monitor the Tx table only. Because there could be no Txs within blocks in practice, i.e. no Txs at all during some period. It should be designed seriously from the traffic scenario;

  2. TxStatus is just an object defined in qmoon, should be modified to coordination with Tendermint Tx types printout.

ewagmig commented 5 years ago

https://github.com/QOSGroup/qmoon/blob/97cc3fd551eb77642509f323be73ca63377040b7/models/tx.go#L26 for the above Item 2

ewagmig commented 5 years ago

It is the TmClient updated with Tendermint version v0.32.0, and not compatible with previous version which cosmos hub-2 used.

屏幕快照 2019-09-09 下午2 50 32

The Tx parse encountered error and then this TxStatusInit is set in Tx table. https://github.com/QOSGroup/qmoon/blob/97cc3fd551eb77642509f323be73ca63377040b7/lib/tmclient.go#L44

res, err := tc.Tx(txHash, true)
    if err != nil {
        return types.TxStatusInit
    }
ewagmig commented 5 years ago

It should be collaborated with #151, this part will be resolved on latest version cosmosv37 for the coming cosmoshub-3 upgrading! It will be closed.