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

WIP: fix: update balancer-sdk to fix fetchPools() error #1054

Closed
wants to merge 3 commits into from

Conversation

pocin
Copy link
Contributor

@pocin pocin commented Jul 6, 2024

Description

FE swap feature fails with fetchPools() error.
Is likely caused by old subgraph being deprecated, fix is deployed in this beta release balancer/balancer-sdk#581 (comment). The linked issue also mentions new SDK being developed with a dedicated API. We might need to follow this and update when ready.

image

To verify this fixes it try previewing a swap with a wallet containing some TEMPLE

Fixes # (issue)

Checklist

  • Code follows the style guide
  • I have performed a self-review of my own code
  • New and existing tests pass locally
  • This PR is targeting the correct branch

@pocin pocin requested a review from a team as a code owner July 6, 2024 20:32
@github-actions github-actions bot added the dapp dapp related issues/PRs label Jul 6, 2024
@pocin pocin added the preview-deploy PRs tagged with this will get a preview deployment label Jul 6, 2024
@marshall2112
Copy link
Collaborator

marshall2112 commented Jul 6, 2024

Deploy preview for core ready!

✅ Preview
https://core-oiliv53d8-templedao.vercel.app
https://pr-1054-preview.templedao.link

Built with commit dae681a.
This pull request is being automatically deployed with vercel-action

@pocin
Copy link
Contributor Author

pocin commented Jul 6, 2024

Aah not so easy. When balancer-sdk calls llamarpc, it gives CORS error but that is a red herring, in reality the actual reason/response is Request Entity Too Large which does not set proper CORS header.
Looks like there are some limitations with the public llamarpc node (already asking in discord).
THe smallest balancer-sdk request is content-length: 120000 the larger ones are 400k

image

E: I tested it with a free-tier api llamarpc apikey and i am getting the same error

@pocin pocin changed the title fix: update balancer-sdk to fix fetchPools() error WIP: fix: update balancer-sdk to fix fetchPools() error Jul 6, 2024
@@ -20,7 +20,7 @@
"codegen:safe-api-v1": "yarn safe-api-v1-host && openapi --input ./src/safe/open-api/apiV1.json --output ./src/safe/open-api/client"
},
"dependencies": {
"@balancer-labs/sdk": "^1.0.4",
"@balancer-labs/sdk": "1.1.6-beta.23",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not sure about using a beta? Perhaps the largest main release?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Did some more testing:

  • ankr rpc seems to be handling the balancer-sdk requests just fine
  • 1.1.5 does not work (still references old subgraph)
  • i tried 1.1.5 with subgraph urls that i found floating around in discord, but it gives various different errors
  • only the beta release works. It also seems to be calling the new balancer api
    image used in the new sdk https://github.com/balancer/b-sdk?tab=readme-ov-file#swap

no reply from balancer yet when the release goes out of beta, will keep trying

Copy link
Contributor Author

Choose a reason for hiding this comment

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

image proper release should be done soon

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No prod release yet, not sure what is the best course of action.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Do you know why our dapp is broken but no one else's is?

I mean if we're broken at the moment we can just push the beta out?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you know why our dapp is broken

from my research so far it's because the hosted subgraph endpoints got deprecrated (by thegraph.com)

but no one else's is

maybe they silently went with the beta release, or not all parts of the sdk depend on the subgraphs (my understadning of balancer does not go very deep), can't tell.

we can just push the beta out?

you mean use the beta release in our app deploy? The beta seems to be working as far as the dapp functionality goes.

@pocin
Copy link
Contributor Author

pocin commented Jul 7, 2024 via email

@frontier159
Copy link
Collaborator

There is no main release yet, the updated subgraphs are in the beta one as far as i could find. On Monday i can try injecting them into the older version, or be loud enough in balancer discord to get a release.

Oh so the latest v1.1.5 is broken?
https://www.npmjs.com/package/@balancer-labs/sdk?activeTab=versions

@marshall2112 marshall2112 mentioned this pull request Aug 26, 2024
@marshall2112
Copy link
Collaborator

Closed in favor of #1076

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dapp dapp related issues/PRs preview-deploy PRs tagged with this will get a preview deployment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants