Skip to main content

start_rpc

Function start_rpc 

Source
pub async fn start_rpc(
    database_url: Option<Url>,
    db_args: DbArgs,
    kv_args: KvArgs,
    consistent_reader_args: ConsistentReaderArgs,
    rpc_args: RpcArgs,
    node_args: NodeArgs,
    system_package_task_args: SystemPackageTaskArgs,
    rpc_config: RpcConfig,
    registry: &Registry,
) -> Result<Service>
Expand description

Set-up and run the RPC service, using the provided arguments (expected to be extracted from the command-line).

Access to most reads is controlled by the database_url – if it is None, reads will not work.

KV queries can optionally be served by a Ledger gRPC service, if kv_args.ledger_grpc_url is provided. Otherwise these requests are served by the database.

Access to writes (executing and dry-running transactions) is controlled by node_args.fullnode_grpc_url, which can be omitted to disable writes from this RPC.

The service may spin up auxiliary services (such as the system package task) to support itself, and will clean these up on shutdown as well.