Closed jiagengliu closed 2 years ago
I am not sure if it's correct to have the issue on node repository. The problem is alignment between explorers (as they may use different backends, and/or similar queries).
It is one of the precise goals why Koios got created - to open source the queries used for a given backend (currently dbsync only, but hopefully others get added based on community interests and collaboration) and try to align, atleast between folks who would like to participate on an open-source backend.
To compare your query result:
cardano-cli query stake-address-info --address stake1uy542q9e4d69waa9dukcdvledr8t45glz0tw9ww4c225m9cm836js --mainnet
[
{
"delegation": "pool1lzupr43772kfux007sdt02vlx7uzmfcplrwmxntdztxmwv9myrj",
"address": "stake1uy542q9e4d69waa9dukcdvledr8t45glz0tw9ww4c225m9cm836js",
"rewardAccountBalance": 5042067918
}
]
curl -X GET "https://api.koios.rest/api/v0/account_info?_address=stake1uy542q9e4d69waa9dukcdvledr8t45glz0tw9ww4c225m9cm836js"
[
{
"status": "registered",
"delegated_pool": "pool1lzupr43772kfux007sdt02vlx7uzmfcplrwmxntdztxmwv9myrj",
"total_balance": "5140883928",
"utxo": "98816010",
"rewards": "5042067918",
"withdrawals": "0",
"rewards_available": "5042067918",
"reserves": "0",
"treasury": "0"
}
]
As you'd see:
total_balance
(not just rewards part), which is exactly same again.The explorers report different rewards of the HEART pool for Epoch 322. Cardanoscan and PoolTool report 644 ADA. Adapools and AdaStat report 257 ADA. Cardano CLI doesn't seem to provide the data.
From what I see, ADApools, ADAStat, Koios all report 257 ADA as delegator rewards for mentioned pool at epoch 322. We'd predominantly have to check with the respective explorers to see how they extract[ed] the reward information to look at the anomaly.
@jiagengliu
What @rdlrt just said is exactly right. So this is not a bug for this repository. I'm closing it. I guess explorers could make more explicit what is exactly what they are showing and the method they use to calculate it, so that it is clear for the users.
Internal/External External
Area Other Query - Reward calculation
Summary Each explorer produces a different result for the same reward balance, and all are different from the result of
cardano-cli query
. I'm not sure who's responsible for the problem but it's weird how this is the case.Steps to reproduce Steps to reproduce the behavior:
cardano-cli query ledger-state --mainnet > ledger-state.json
. The JSON path isstateBefore - esLState - delegationState - dstate - rewards
.Expected behavior Explorers and Cardano CLI query should produce the same reward balance.
System info (please complete the following information):
Additional context The explorers report different rewards of the HEART pool for Epoch 322. Cardanoscan and PoolTool report 644 ADA. Adapools and AdaStat report 257 ADA. Cardano CLI doesn't seem to provide the data.