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

feat: add root gauges and refactor workflows #225

Merged
merged 12 commits into from
Mar 20, 2024
Merged

feat: add root gauges and refactor workflows #225

merged 12 commits into from
Mar 20, 2024

Conversation

gosuto-inzasheru
Copy link
Member

@gosuto-inzasheru gosuto-inzasheru commented Mar 7, 2024

closes #180

wip, currently only refactors the workflows

@gosuto-inzasheru
Copy link
Member Author

  • adds root gauges to the address book in the same way as there are gauges now (dumps a json, is a property of the addy book object, etc.)
  • the generation of new (root) gauges and pools jsons is now its own separate workflow, to not overcrowd the weekly diffs

@gosuto-inzasheru gosuto-inzasheru marked this pull request as ready for review March 13, 2024 16:02
@Tritium-VLK
Copy link
Member

Can we merge ecosystem balances first so I can review against that delta?

bal_addresses/pools_gauges.py Show resolved Hide resolved
gen_pools_and_gauges.py Show resolved Hide resolved
@gosuto-inzasheru
Copy link
Member Author

gosuto-inzasheru commented Mar 14, 2024

all good points, no rush with merging this so will work on getting those changes in here

Copy link
Member

@Tritium-VLK Tritium-VLK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few more things to take alook at. Mostly just think about the process query stuff.

I think we can rethink the action scheduling in another PR.

Once you do nore more onceover, the last thing I want to od is run all available actions on this branch and make sure they all work right/render decent results. Once we merge we should run any new ones to also make sure they work.

@@ -24,15 +24,13 @@ jobs:
git clone https://github.com/balancer/balancer-deployments.git
export DEPLOYMENTS_REPO_ROOT_URL=`pwd`/balancer-deployments
pip3 install -r bal_addresses/requirements.txt
python3 gen_core_pools.py
python3 gen_pools_and_gauges.py
python3 transform-deployments.py
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Transform deployments is the thing that generates addressbook.json, which is the thing that most people use.

It looks like you ru generate_addresses after each thing, but not transform_deployments.

Maybe in the end we need to just refactor gen_addresses and transform deployments. For now it's a bit strange to be running one and not the other.

Not sure if we should block this PR because of this, eveything will end up eventually consistent, but given the current setup it could take a couple weeks.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm ok good point. i shuffled the workflows in 389d983 a bit:

  • generate_addressbooks.yaml: create jsons for pools, gauges, chains, and the mono addressbook
  • generate_permissions.yaml: create permissions jsons
  • generate_core_pools.yaml: create core pools json

@@ -70,9 +70,45 @@ def process_query_preferential_gauges(result) -> dict:
return df.set_index("symbol")["id"].to_dict()


def process_query_root_gauges(result, gauges) -> dict:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it make sense to move this kind of logic to the subgraphs object?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not really, this is very specific to the gen_pools_and_gauges.py workflow imo

@Tritium-VLK Tritium-VLK merged commit 8220e64 into main Mar 20, 2024
2 checks passed
@gosuto-inzasheru gosuto-inzasheru deleted the issue/180 branch April 25, 2024 09:37
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.

feat: add root gauges
2 participants