-
Notifications
You must be signed in to change notification settings - Fork 688
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
PVF: Consider removing Executor
struct
#622
Comments
polkadot-sdk/polkadot/node/core/pvf/execute-worker/src/lib.rs Lines 192 to 197 in 2b4b33d
Does this call construct a runtime every time? If so, this may be worth doing. Or am I missing anything? |
Not sure I'm following @eagr. But this issue would be a nice simplification if you wanna take it on. :) |
|
Interesting idea @eagr. The runtime construction depends on the artifact, so we can't re-use the same runtime for every job. But there's maybe an idea here of keeping around all runtimes in memory. If they use 30mb of RAM each, a validator could keep 30 (or however many to cover all parachains). However I think the runtime construction is a very small part of execution, and this cache would probably be less useful when pay-as-you-go arrives. @eskimor |
closes #622 Pros: * simpler interface, just functions: `create_runtime_from_artifact_bytes()` and `execute_artifact()` Cons: * extra overhead of constructing executor semantics each time I could make it a combination of * `create_runtime_config(params)` (such that we could clone the constructed semantics) * `create_runtime(blob, config)` * `execute_artifact(blob, config, params)` Not sure if it's worth it though. --------- Co-authored-by: Bastian Köcher <git@kchr.de>
closes paritytech#622 Pros: * simpler interface, just functions: `create_runtime_from_artifact_bytes()` and `execute_artifact()` Cons: * extra overhead of constructing executor semantics each time I could make it a combination of * `create_runtime_config(params)` (such that we could clone the constructed semantics) * `create_runtime(blob, config)` * `execute_artifact(blob, config, params)` Not sure if it's worth it though. --------- Co-authored-by: Bastian Köcher <git@kchr.de>
ISSUE
Overview
This struct doesn't seem that useful now that the rayon threadpool has been removed. It used to look like this. Without that, its methods can be standalone functions that take a
Config
. This would slightly simplify some of the code. I won't remove it just yet in case it could be useful again later.From paritytech/polkadot#7246 (comment)
The text was updated successfully, but these errors were encountered: