Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nomination pools rewards #21

Merged
merged 29 commits into from
Jul 27, 2023
Merged

Nomination pools rewards #21

merged 29 commits into from
Jul 27, 2023

Conversation

vovunku
Copy link
Contributor

@vovunku vovunku commented Jul 11, 2023

Base implementation that will be extended

@vovunku
Copy link
Contributor Author

vovunku commented Jul 17, 2023

Tested on last blocks of Polkadot, Kusama, Westend and Aleph-zero:
16441533, 18727735, 16648478, 52955467

There are no slashes yet:
Screenshot from 2023-07-17 19-23-13

Screenshot from 2023-07-17 19-23-49

Log:

test.log

@vovunku vovunku requested review from ERussel and valentunn July 17, 2023 17:33
src/mappings/aleph-zero.ts Outdated Show resolved Hide resolved
src/mappings/rewards/history/relaychain.ts Outdated Show resolved Hide resolved
src/mappings/rewards/history/relaychain.ts Outdated Show resolved Hide resolved
src/mappings/rewards/history/relaychain.ts Outdated Show resolved Hide resolved
src/mappings/rewards/history/relaychain.ts Outdated Show resolved Hide resolved
src/mappings/rewards/history/relaychain.ts Outdated Show resolved Hide resolved
src/mappings/rewards/history/relaychain.ts Outdated Show resolved Hide resolved
src/mappings/rewards/history/relaychain.ts Outdated Show resolved Hide resolved
@vovunku vovunku requested a review from valentunn July 18, 2023 14:49
Copy link
Contributor

@ERussel ERussel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should cache pool members storage to avoid cases when for each event we will fetch it from blockchain. But we can do this in a separate PR

return
}

const members = await api.query.nominationPools.poolMembers.entries()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's cache this request for a given block number

@vovunku vovunku merged commit 67c0d2d into master Jul 27, 2023
@vovunku vovunku deleted the feature/nomination-pools-rewards branch July 27, 2023 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants