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

gRPC timeout blocked context #55

Open
HarleyAppleChoi opened this issue Mar 20, 2022 · 0 comments
Open

gRPC timeout blocked context #55

HarleyAppleChoi opened this issue Mar 20, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@HarleyAppleChoi
Copy link

Bug description

The chain may not respond when the resource is not ready. If you don't set a timeout to context, the context would possibly block forever.
Therefore, the parsing stops.

Steps to reproduce

Parse the latest block with only parse missing block option.

Expected behavior

The system should retry when there is a timeout.

Implementation Proposal

At https://github.com/forbole/juno/blob/3b5d944a0def1b47ae695422748c63d263833779/node/remote/node.go
It should set Exponential backoff for timeout and use a new context every time when the chain node grpc endpoint is called
Example:

ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
transaction, err := cp.flowClient.GetTransaction(ctx, txID)
cancel()
@RiccardoM RiccardoM added the enhancement New feature or request label Mar 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants