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

Fetch weights/fee _state changes_ from GBQ, not the reconstructed state #76

Open
markusbkoch opened this issue Mar 7, 2021 · 0 comments

Comments

@markusbkoch
Copy link

The following is downloading the reconstructed state from GBQ, which is very resource intensive. GBQ has to process all state changes to reconstruct the state at every block and the downloaded dataset is much larger than it needed be, since most of the time weights and fees remains constant. Most pools are finalized and those parameters can't change at all.

with open("view_pools_fees.sql", "r") as f:
fees_sql = f.read().format(pool_address)
with open("view_pools_tokens_denorm_weights.sql", "r") as f:
denorms_sql = f.read().format(pool_address)

I suggest this be modified so as to only download the state changes (basically the events subquery in view_pools_fees.sql and view_pools_weights.sql) and the state be reconstructed as part of the cadCAD simulation. This would be analogous to the current approach for swaps, joins, exits.

@markusbkoch markusbkoch changed the title Fetch weights/fee state changes from GBQ, not the reconstructed state Fetch weights/fee _state changes_ from GBQ, not the reconstructed state Mar 7, 2021
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

No branches or pull requests

1 participant