DeFiCh / ain

DeFi Blockchain - enabling decentralized finance on Bitcoin
https://defichain.com
MIT License
401 stars 119 forks source link

masternode data is different: blockchain (full node) != ocean api #2429

Closed RoMi1981 closed 1 year ago

RoMi1981 commented 1 year ago

Summary

Masternode status stays on PRE_ENABLED on ocean but is ENABLED on blockchain.

Ocean data differs from blockchain data for cli cmd:

getmasternode 917178fe9b27a8f02b98f691f3ebadb890d6ea67d93d0517395309d97e0e800f { "917178fe9b27a8f02b98f691f3ebadb890d6ea67d93d0517395309d97e0e800f": { "ownerAuthAddress": "tf1qk369a9rt0jrqdrlq20erh759u590m2h927cyel", "operatorAuthAddress": "748Sz2MAQ93ctBB5m8SU6JpCaVWe8S7Pd2", "rewardAddress": "tf1qx5s5w33u0u7apzry0wrvaxplw37wj9ajuyeus9", "creationHeight": 1877660, "resignHeight": -1, "resignTx": "0000000000000000000000000000000000000000000000000000000000000000", "collateralTx": "0000000000000000000000000000000000000000000000000000000000000000", "state": "ENABLED", "mintedBlocks": 0, "ownerIsMine": false, "operatorIsMine": false, "localMasternode": false, "targetMultipliers": [ 1, 1 ] } }

ocean api: https://testnet.ocean.jellyfishsdk.com/v0/testnet/masternodes or https://testnet-ocean.mydefichain.com:8443/v0/testnet/masternodes

{"data":[{"id":"917178fe9b27a8f02b98f691f3ebadb890d6ea67d93d0517395309d97e0e800f","sort":"001ca69c917178fe9b27a8f02b98f691f3ebadb890d6ea67d93d0517395309d97e0e800f","state":"PRE_ENABLED","mintedBlocks":0,"owner":{"address":"tf1qk369a9rt0jrqdrlq20erh759u590m2h927cyel"},"operator":{"address":"748Sz2MAQ93ctBB5m8SU6JpCaVWe8S7Pd2"},"creation":{"height":1877660},"timelock":0},.......

Node was created on Block height: 1877660

As I write this issue we have the block height: 1877992 and status still is different.

Steps to Reproduce

Environment

[Please fill all of the following or NA if not applicable]

RoMi1981 commented 1 year ago

Screenshot_20230907_190747_Chrome

Pre enabeld masternodes has minted a block. This shows also the bug.

shohamc1 commented 1 year ago

This is likely due to ocean indexing being behind the chain tip, or some caching issue on Ocean. The data seems to be correct at the moment. If you find any more discrepancies in Ocean, you can open an issue in the jellyfishsdk repo.