Skip to content

Add timeouts to DeepSpace GRPC methods #28

@jkilpatr

Description

@jkilpatr

While the contact struct defines a user desired timeout it's not actually ever used anywhere in the code.

Meaning when we make a grpc connection to a server it's actually subject to the system tcp socket timeout of a couple of hours.

Behavior wise this is very bad in Rita where payment_validator currently tries to call the althea payment validation code for every incoming payment, at which point the code will hang for a few hours before moving on since there is no server on the other end of that rpc url (we just moved it) and there is also no shorter timeout set.

In order to resolve this issue every grpc connect, request, and send method needs to use the tokio timeout routine. Example in the top comment on this branch https://github.com/althea-net/deep_space/tree/jkilpatr/add_timeouts

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions