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

Restaked strategies indexing from RPC calls #20

Closed
seanmcgary opened this issue Sep 9, 2024 · 0 comments · Fixed by #34
Closed

Restaked strategies indexing from RPC calls #20

seanmcgary opened this issue Sep 9, 2024 · 0 comments · Fixed by #34
Assignees
Labels
enhancement New feature or request

Comments

@seanmcgary
Copy link
Member

seanmcgary commented Sep 9, 2024

Right now operator restaked strategies are only available via RPC contract calls to AVS contracts.

We need to capture this data for rewards calculation. Currently, it is pulled every 3600 blocks and we should keep it that in the new implementation. Since speed is a consideration now, we need to parallelize the existing implementation. Serially, it takes about 50 seconds to process so we should shoot to getting this below 10s if possible.

We should consider trying out using multicall to speed up this process: https://github.com/Layr-Labs/eigenpod-proofs-generation/blob/master/cli/core/multicall/multicall.go

@seanmcgary seanmcgary added the enhancement New feature or request label Sep 9, 2024
@seanmcgary seanmcgary self-assigned this Sep 9, 2024
@seanmcgary seanmcgary added this to the Rewards event storage milestone Sep 12, 2024
seanmcgary added a commit that referenced this issue Oct 8, 2024
# This is the 1st commit message:

Calculate rewards

Add state change table for AVS operators to make windowing easier

Convert avs operator windows query to sqlite

Queries for snapshots

Testing OperatorAVSRegistrationWindows

Window query passing

Some cleanup

Expand test dataset to be more than just up to 2024-09-01

Restaked strategy snapshots

Test tweaks

Generate snapshots rather than windows

Add custom sum_big function

Adding tests for operator share snapshots

Change operatorShares to be a sparse table

Change StakerShares to a sparse table

Add snapshot generation for operator shares

Calculate rewards

remove git attributes

# This is the commit message #2:

Adding query stubs

# This is the commit message #3:

Adding more custom functions for math

# This is the commit message #4:

Copy over queries for gold table generation

# This is the commit message #5:

Use custom sql functions

# This is the commit message #6:

Use file-based db for testing rewards

# This is the commit message #7:

Staker amounts for nile and amazon forks

# This is the commit message #8:

Calculation testing

# This is the commit message #9:

Floating point math is the absolute worst

# This is the commit message #10:

Fix compliation

# This is the commit message #11:

More number tests

# This is the commit message #12:

Trying to get sqlite lib working

# This is the commit message #13:

This compiles and runs

# This is the commit message #14:

Also compiles

# This is the commit message #15:

Compiles and runs with added python stuff

# This is the commit message #16:

Delete compiled stuff

# This is the commit message #17:

Python seems to be working

# This is the commit message #18:

Working pre_nile_tokens_per_day

# This is the commit message #19:

Works with go example

# This is the commit message #20:

Port amazonStakerTokenRewards to native C

# This is the commit message #21:

Port nile_staker_token_rewards to native C

# This is the commit message #22:

Port amazon_operator_token_rewards and nile_operator_token_rewards to native C

# This is the commit message #23:

Rename yolo to calculations

# This is the commit message #24:

Add pure functions for easier testing

# This is the commit message #25:

Token calcuations test works
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant