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.

Add the capability of running --rpc-methods safe/unsafe RPC endpoints on different ports #12846

@PierreBesson

Description

@PierreBesson

At the Polkadot Barcamp in Lisbon, we hosted a workshop session on Substrate node operations. One piece of feedback we received is that to expose 2 endpoints, 1 with rpc-method=safe (usually public) and 1 with rpc-method=unsafe (usually only accessible to the node operator), you will need to manage 2 nodes as for each node you have to choose whether your RPC endpoint will be safe or unsafe (by setting the --rpc-methods flags). To solve this it was suggested that the node could expose 2 different endpoints, 1 safe and 1 unsafe.

I wonder if recent versions of jsonrpsee wouldn't make this easy to implement, especially as the current WS and HTTP endpoints are getting merged into one. ping @niklasad1

For example, we could use 9944 for the safe endpoints and 9933 for the unsafe one. This way the dual endpoints would no longer be about the supported protocol but about method safety. We could also use a totally different port number (eg.9955) for the rpc-method=unsafe endpoint.
Personally I think having things set up this way, would make it less confusing and less likely someone would mistakenly expose unsafe RPC methods publicly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    J0-enhancementAn additional feature request.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions