GraphQL indexer doesn't return staking rewards since epoch 11624 #701
-
Discord user IDNo response Describe your question in detail.Hi, I can see on the explorer that transaction 2815771509 (the last transaction of block 355456301 contains staking rewards (type However, when querying the GraphQL indexer API (URL: https://api.mainnet.aptoslabs.com/v1/graphql, Method: POST with valid API key) with the query: query RewardsByTransaction($end: bigint, $limit: Int, $offset: Int){
delegated_staking_activities(
where: {event_type: {_eq: "0x1::stake::DistributeRewardsEvent"}, transaction_version: {_eq: $end}}
order_by: {transaction_version: desc}
distinct_on: transaction_version
limit: $limit
offset: $offset
) {
amount
transaction_version
}
} and variables {
"end": 2815771509,
"limit": 100,
"offset": 0
} The result is: {
"data": {
"delegated_staking_activities": []
}
} In the past, when querying the last transaction of the last block of every epoch, we could successfuly fetch the staking rewards by validator. However, since epoch 11624 (included), it looks like this is empty. Any idea what went wrong here? What error, if any, are you getting?No response What have you tried or looked at? Or how can we reproduce the error?You can reproduce by using the Hashura interface with the below query: {
delegated_staking_activities(
where: {event_type: {_eq: "0x1::stake::DistributeRewardsEvent"}, transaction_version: {_eq: 2815771509}}
order_by: {transaction_version: desc}
distinct_on: transaction_version
limit: 100
offset: 0
) {
amount
transaction_version
}
} Which operating system are you using?Linux (Ubuntu, Fedora, Windows WSL, etc.) Which SDK or tool are you using? (if any)Indexer API Describe your environment or tooling in detailNo response |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Ok, after quite a lot of debugging, it looks like this is caused by a renaming of the event: old name was |
Beta Was this translation helpful? Give feedback.
-
I found this related issue: aptos-foundation/AIPs#367 and the code generating the event is here. |
Beta Was this translation helpful? Give feedback.
Ok, after quite a lot of debugging, it looks like this is caused by a renaming of the event: old name was
0x1::stake::DistributeRewardsEvent
, new name is0x1::stake::DistributeRewards
.Would have loved to have a heads up on this, but maybe I missed it! Let me know if you have other similar changes in mind that might cause an issue like that.