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

Merge Katana dev branch #1470

Merged
merged 3 commits into from
Jan 22, 2024
Merged

Merge Katana dev branch #1470

merged 3 commits into from
Jan 22, 2024

Conversation

kariy
Copy link
Member

@kariy kariy commented Jan 22, 2024

PRs included:

#1461
#1456
#1455

Issues resolved:

#1448

Refer to #1456 for full context.

The new timeout value has been chosen arbitrarily, I just thought it seems reasonable enough.
Resolves #1448

Creates new crate under `katana`, `katana-tasks`, for managing spawning blocking tasks. RPC calls that mostly perform blocking tasks are now sent to their designated threadpools and won't block the async threads.

- `TokioTaskSpawner`: mainly for spawning blocking IO-bound tasks (ie reading from storage)
- `BlockingThreadPool`: mainly for spawning expensive CPU-bound tasks

Depends on #1455 because now the RPC requests (that used to block the thread before) have to wait for the blocking tasks to finish and thus may be idling for more than 2 seconds which will result in a connection timeout.

Doing `sozo migrate` on 2s timeout will failed when calling `/esimateFee` for estimating the World contract declare tx with error `connection closed before message completed`.

Raw error message from `sozo` against the new changes:
```console
Caused by:
    Failed to deploy world: Failed to migrate world: Migrator(Provider(Other(TransportError(Reqwest(reqwest::Error { kind: Request, url: Url { scheme: "http", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("localhost")), port: Some(5050), path: "/", query: None, fragment: None }, source: hyper::Error(IncompleteMessage) })))))
```
@kariy kariy changed the title Merge dev branch Merge Katana dev branch Jan 22, 2024
@kariy kariy merged commit 30b900b into main Jan 22, 2024
10 checks passed
@kariy kariy deleted the dev/katana branch January 22, 2024 14:53
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.

1 participant