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

alchemy for large accounts #1278

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

onemicky
Copy link
Collaborator

@onemicky onemicky commented Sep 30, 2024


Copy link

netlify bot commented Sep 30, 2024

Deploy Preview for vigilant-albattani-df38ec ready!

Name Link
🔨 Latest commit e9001b4
🔍 Latest deploy log https://app.netlify.com/sites/vigilant-albattani-df38ec/deploys/66fd465e11b1600008e1de70
😎 Deploy Preview https://deploy-preview-1278--vigilant-albattani-df38ec.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

cloudflare-workers-and-pages bot commented Sep 30, 2024

Deploying gmx-interface with  Cloudflare Pages  Cloudflare Pages

Latest commit: e9001b4
Status: ✅  Deploy successful!
Preview URL: https://b577501e.gmx-interface.pages.dev
Branch Preview URL: https://alchemy-for-large-accounts.gmx-interface.pages.dev

View logs

const LARGE_ACCOUNT_CHAINS = [ARBITRUM, AVALANCHE];

export function useAccountVolumeStats(params: { account?: string; enabled?: boolean }) {
const { account, enabled = true } = params;
Copy link
Collaborator

Choose a reason for hiding this comment

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

enabled seems to be always true, you think it will be needed in the nearest future?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Indeed, removed this props

@@ -79,7 +83,7 @@ function trackRpcProviders({ warmUp = false } = {}) {
const hasMultipleProviders = Object.keys(providers).length > 1;
const isUnusedChain =
!lastUsage || differenceInMilliseconds(Date.now(), lastUsage) > DISABLE_UNUSED_TRACKING_TIMEOUT;
const isChainTrackingEnabled = (warmUp || !isUnusedChain) && hasMultipleProviders;
const isChainTrackingEnabled = !isLargeAccount && (warmUp || !isUnusedChain) && hasMultipleProviders;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this part of requirements wasn't implemented:

If paid RPC does not work, usual logic of RPC selection must be used (competitive selection, switching, etc, including free RPCs)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

My initial thought was that after the last ABs, we proved Alchemy is reliable and don't need this 'fallback for fallback.' However, after syncing with G, it became clear that it's better to do it.
Thank you for highlighting this point.

gmxer
gmxer previously approved these changes Oct 2, 2024
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.

2 participants