Shift HTTP server heavy-lifting to blocking executor (#1518)

## Issue Addressed

NA

## Proposed Changes

Shift practically all HTTP endpoint handlers to the blocking executor (some very light tasks are left on the core executor).

## Additional Info

This PR covers the `rest_api` which will soon be refactored to suit the standard API. As such, I've cut a few corners and left some existing issues open in this patch. What I have done here should leave the API in state that is not necessary *exactly* the same, but good enough for us to run validators with. Specifically, the number of blocking workers that can be spawned is unbounded and I have not implemented a queue; this will need to be fixed when we implement the standard API.
This commit is contained in:
Paul Hauner
2020-08-24 03:06:10 +00:00
parent 2bc9115a94
commit c895dc8971
22 changed files with 828 additions and 906 deletions

7
Cargo.lock generated
View File

@@ -4308,15 +4308,22 @@ dependencies = [
name = "rest_types"
version = "0.2.0"
dependencies = [
"beacon_chain",
"bls",
"environment",
"eth2_hashing",
"eth2_ssz",
"eth2_ssz_derive",
"hyper 0.13.7",
"procinfo",
"psutil",
"rayon",
"serde",
"serde_json",
"serde_yaml",
"state_processing",
"store",
"tokio 0.2.22",
"tree_hash",
"types",
]