-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: rewards 2.1 calculation #215
Conversation
f1c652c
to
79bad9a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good overall, just a handful of comments.
@0xrajath can you also add the corresponding inserts for the staker-operator table for rewards v2.1 as well? You should be able to follow what I did for the regular rewards v2 queries.
pkg/postgres/migrations/202501301458_operatorSetSplitSnapshots/up.go
Outdated
Show resolved
Hide resolved
pkg/postgres/migrations/202501301502_operatorSetOperatorRegistrationSnapshots/up.go
Outdated
Show resolved
Hide resolved
pkg/postgres/migrations/202501301505_operatorSetStrategyRegistrationSnapshots/up.go
Outdated
Show resolved
Hide resolved
pkg/postgres/migrations/202501301945_operatorDirectedOperatorSetRewards/up.go
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally looks good, main comment is the 2 day log on strategy<>opSet relationship. We don't do the same for the current avs<>strat relationship (see operatorAvsStrategySnapshots.go
- we can do something much simpler than this).
pkg/postgres/migrations/202501301945_operatorDirectedOperatorSetRewards/up.go
Outdated
Show resolved
Hide resolved
@seanmcgary I've added the staker-operator calculation in 089c94a |
# Motivation We need to support Rewards v2.1 calculation. This PR builds on top of #197 which supported the Eigen state models for `OperatorDirectedOperatorSetRewardSubmissions`, `OperatorSetSplits`, `OperatorSetOperatorRegistrations`, `OperatorSetStrategyRegistrations`. # Modifications * Snapshot generation for: `OperatorDirectedOperatorSetRewardSubmissions`, `OperatorSetSplits`, `OperatorSetOperatorRegistrations`, `OperatorSetStrategyRegistrations`. * Refactoring Staging and Final numbering from 11 and 12 to 15 and 16. * Mississippi hard fork for Rewards v2.1. * New Operator Directed Operator Set rewards calculation to be triggered after Mississippi hard fork. * Updated Rewards For All Earners (Programmatic Incentives) calculation to include operators registered to operator sets after Mississippi hard fork. * Staker-operator calculation for Rewards v2.1. # Results Rewards v2.1 calculation. # Tests Existing Rewards tests passing. <img width="660" alt="Screenshot 2025-01-31 at 1 33 38 PM" src="https://github.com/user-attachments/assets/876c2d7c-be22-48b6-a046-55ead8a12530" />
Motivation
We need to support Rewards v2.1 calculation.
This PR builds on top of #197 which supported the Eigen state models for
OperatorDirectedOperatorSetRewardSubmissions
,OperatorSetSplits
,OperatorSetOperatorRegistrations
,OperatorSetStrategyRegistrations
.Modifications
OperatorDirectedOperatorSetRewardSubmissions
,OperatorSetSplits
,OperatorSetOperatorRegistrations
,OperatorSetStrategyRegistrations
.Results
Rewards v2.1 calculation.
Tests
Existing Rewards tests passing.