Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Limit resource usage of state_call #12698

@xlc

Description

@xlc

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions