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

refactor: pass queried chains to account ID calculation logic #34

Merged
merged 1 commit into from
Oct 25, 2024

Conversation

jtourkos
Copy link
Contributor

This PR addresses the issue of a network-specific app deployment calling a provider from a different network (e.g., mainnet app failed because filecoin provider was down).

The bug was as follows: due to account IDs being the same across different chains, the existing logic was somehow randomly selecting any chain from all queryable chains to create contract clients and execute the logic. These queryable chains are defined in the RPC_CONFIG. As a result, a deployment on the mainnet could request an account ID from a filecoin contract instance (as long as it listed in the env var). Additionally, there was some more randomness involved, as the array of queryable chains was constructed based on the order of arbitrary JSON contract data.

What has changed now is that the chain selection happens only on the chains indicated in the query. If no chain is specified in the query, the API will still search through all queryable chains, as this suggests that the caller wants results from every available chain, but this shouldn't cause any issues.

@jtourkos jtourkos requested a review from efstajas October 24, 2024 16:27
Copy link

railway-app bot commented Oct 24, 2024

🚅 Previously deployed to Railway in the Drips App project. Environment has been deleted.

@railway-app railway-app bot temporarily deployed to graphql-api-pr-34 October 24, 2024 16:28 Destroyed
@jtourkos jtourkos merged commit 5934971 into main Oct 25, 2024
1 check failed
@railway-app railway-app bot requested a deployment to multiplayer-pr-21 October 25, 2024 11:55 Abandoned
@railway-app railway-app bot requested a deployment to multiplayer-pr-20 October 25, 2024 11:55 Abandoned
@railway-app railway-app bot requested a deployment to app-pr-1285 October 25, 2024 11:55 Abandoned
@railway-app railway-app bot requested a deployment to app-pr-1293 October 25, 2024 11:55 Abandoned
@jtourkos jtourkos deleted the fix-network-providers-interference branch October 25, 2024 12:01
@railway-app railway-app bot requested a deployment to app-pr-1308 October 25, 2024 13:06 Abandoned
@railway-app railway-app bot requested a deployment to app-pr-1317 October 28, 2024 12:01 Abandoned
@railway-app railway-app bot requested a deployment to app-pr-1323 October 29, 2024 11:41 Abandoned
@railway-app railway-app bot requested a deployment to app-pr-1324 October 29, 2024 12:45 Abandoned
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