Limit resource usage of state_call #1628
Labels
D2-substantial
Can be fixed by an experienced coder with a working knowledge of the codebase.
I5-enhancement
An additional feature request.
T0-node
This PR/Issue is related to the topic “node”.
T4-runtime_API
This PR/Issue is related to runtime APIs.
Previous issue: paritytech/substrate#12698
Do we have any resource limits of making runtime API calls via
state_call
RPC?For Ethereum nodes, we can submit RPC call to ask it to arbitrary EVM computation but up to some hard coded gas limit, which could be like 10x of the block gas limit. This ensures a single RPC call cannot consume too much CPU on the node.
I think we need a similar mechanism for
state_call
. Make it accept an optional Weight which capped to like 10x block weight limit and interrupt the wasm function call when it is taking too long.The text was updated successfully, but these errors were encountered: