Cap light client execution proof request processing time - #12500
Cap light client execution proof request processing time#12500dmitry-markin wants to merge 30 commits into
Conversation
|
/cmd prdoc --audience node_dev --bump major |
A sloppy analysis of whether 10ms is enough for different classes of web3-app calls
|
|
Benchmarks of
|
|
Due to issues with syncing Moonbeam (state not fitting into RAM for warp-sync, sync from genesis broken, snapshot links dead), Moonbeam was not benchmarked. The current timeout of 3s should give plenty of headroom, and we can revisit tightening the default timeout later. |
Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: Sebastian Kunert <mail@skunert.dev>
bkchr
left a comment
There was a problem hiding this comment.
As said already and now with looking closer into the pr, we should directly initialize our own executor inside the light client request handler. You get the params and the name and do not need any client that forwards the execution request.
@bkchr not sure if this is feasible. We need complete May be there is a way around this circular dependency issue, but I don't see it now. |
|
For a future reference, here is the actual slowdown with epoch interrupts enabled. Measured on Asset Hub Kusama, each data point was collected in a 10-second loop.
The measured slowdown seems to be around 8%, which matches the docs and indeed is unacceptable overhead for a main executor. Lower slowdown for quicker calls might indicate a constant overhead in every call, so real slowdown of WASM execution can be indeed around 10%. |
|
This branch became too much of a scratch pad, so I extracted core changes as meaningful commits into a new PR #12725. |
Introduce a capped WASM executor using epoch-based wasmtime interruption mechanism and use it for serving light client execution proof requests.
The execution is bounded by 3s per runtime call. This gives plenty of headroom for legitimate requests. We can consider reducing the default in the future.
Follow-ups
Add metrics for light request processing time #12541