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

EraPointsJob: ensure reliable and correct retrieval of era points #2917

Merged
merged 2 commits into from
May 14, 2024

Conversation

FlorianFranzen
Copy link
Contributor

This PR contains to fixes that probably should be applied together.

  • Firstly, it ensures that findEraBlockHash checks the activeEra instead of currentEra, just as it does inside of findEraBlockNumber.
  • Secondly, the EraPointsJob uses the state from the next era, ensuring the retrieved era points were actually fully computed.

These two combined now ensure that the backend consistently retrieves the correct era rewards, without it would either fail (hash to early) or retrieve half computed scores.

@FlorianFranzen FlorianFranzen force-pushed the patches/active_era branch 2 times, most recently from 61af60a to 549c200 Compare May 13, 2024 20:37
@FlorianFranzen FlorianFranzen changed the base branch from master to staging May 13, 2024 20:37
@FlorianFranzen
Copy link
Contributor Author

Rebased on stagging.

@ironoa
Copy link
Contributor

ironoa commented May 14, 2024

Looks good, Thanks !

@ironoa ironoa merged commit e7eb7c6 into w3f:staging May 14, 2024
11 checks passed
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.

2 participants