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

Add a way to skip rpc checks #139

Merged
merged 1 commit into from
Apr 26, 2024
Merged

Add a way to skip rpc checks #139

merged 1 commit into from
Apr 26, 2024

Conversation

0xngmi
Copy link
Member

@0xngmi 0xngmi commented Apr 25, 2024

No description provided.

@@ -41,6 +41,9 @@ export class LlamaProvider extends FallbackProvider {
}

async _ready() {
if(process.env["SKIP_RPC_CHECK"] === "true"){
Copy link
Member

Choose a reason for hiding this comment

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

not a good idea since we will no longer be filtering out lagging or unreachable nodes. After this part, we never check if a rpc works or not, will lead to random failures

Copy link
Member Author

Choose a reason for hiding this comment

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

isnt there a fallback provider that will keep trying rpcs if one fails?

Copy link
Member

Choose a reason for hiding this comment

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

yeah, but if all3-5 are bad then...

Copy link
Member Author

Choose a reason for hiding this comment

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

then wouldnt the call fail? which is the same result that we would have gotten otherwise, with an error about no rpcs being available

the difference would be if an rpc is stale, which your code will catch but if we skip setup we wont, but i think this would be ok since its the same behaviour we had before

@0xngmi 0xngmi merged commit 8d237e1 into master Apr 26, 2024
@g1nt0ki g1nt0ki deleted the skip-rpc-check branch April 26, 2024 13:48
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.

None yet

2 participants