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

Reward Calc should report consistent results across validators #336

Closed
3 tasks
idiom-bytes opened this issue Oct 10, 2022 · 0 comments · Fixed by #334 or #352
Closed
3 tasks

Reward Calc should report consistent results across validators #336

idiom-bytes opened this issue Oct 10, 2022 · 0 comments · Fixed by #334 or #352
Assignees

Comments

@idiom-bytes
Copy link
Member

idiom-bytes commented Oct 10, 2022

Problem:

  • The issue is that the blocknumber/timestamp can be different across users, within a small frame of time. We could perhaps do a mathy solution, round down the blocknumber/timestamp, or perhaps create an artifact/checkpoint.csv that we can distribute to validators, so everyone knows where to start/end.
  • We're going to add the candidate solutions to a ticket, research this a bit more, and figure out some better candidate solutions so we can move forward with next steps.

Candidate Solutions

Candidate A

  • Implement a math-based solution that calculates a consistent start/end block across all validators
    Candidate B
  • Implement a rounding/blocknumber solution where by rounding down, we reduce the likelyhood of getting different results
    Candidate C
  • Implement an artifact/csv that is distributed to validators so there are clear start/end blocks/time, eliminating any room for error

DoD:

  • Explore candidate solutions further and asses which one we'll use
  • Roughly estimate the effort/complexity and agree on it before signing off
  • Validators report consistent results that are low variance
@idiom-bytes idiom-bytes changed the title Reward Calc yield different results across validators Reward Calc should report consistent results across validators Oct 10, 2022
@idiom-bytes idiom-bytes transferred this issue from oceanprotocol/df-issues Oct 10, 2022
@trizin trizin mentioned this issue Oct 18, 2022
@trizin trizin linked a pull request Oct 18, 2022 that will close this issue
@trizin trizin reopened this Oct 28, 2022
trizin added a commit that referenced this issue Oct 31, 2022
* Add block search functions

* Add tests

* Fix test

* Linter

* Linter

* Use recursive function

* Update tests

* Remove comments

* Update function output and name

* Revert block time tests

* Move tests to a separate file

* Remove unused import

* Fix test

* Update function

* Fix dftool tests

* Linter

* Rename files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants