RPC daemon

Remote Procedure Call

The RPC daemon is a crucial component of Erigon, enabling JSON remote procedure calls and providing access to various APIs.

This document provides guidelines for understanding and using the various RPC methods available in Erigon.

  1. Compatibility with eth namespace

  2. Compatibility with standard Geth methods

  3. Otterscan Methods (ots_)

    • In addition to the standard Geth methods, Erigon includes RPC methods prefixed with ots_ for Otterscan. These are specific to the Otterscan functionality integrated with Erigon. See more details herearrow-up-right.

  4. Erigon Extensions (erigon_)

    • Erigon introduces some small extensions to the Geth API, denoted by the erigon_ prefix aimed to enhance the functionality, see more details herearrow-up-right about implementation status.

  5. gRPC API

    • Erigon also exposes a gRPC API for lower-level data access. This is primarily used by Erigon’s components when they are deployed separately as independent processes (either on the same or different servers).

    • This gRPC API is also accessible to users. For more information, visit the Erigon Interfaces GitHub repositoryarrow-up-right.

  6. Trace Module (trace_)

    • Erigon includes the trace_ modulearrow-up-right, which originates from OpenEthereum. This module provides additional functionality related to tracing transactions and state changes, which is valuable for advanced debugging and analysis.

More information

For a comprehensive understanding of the RPC daemon's functionality, configuration, and usage, please refer to https://github.com/erigontech/erigon/blob/main/cmd/rpcdaemon/README.mdarrow-up-right* (also contained in your locally compiled Erigon folder at /cmd/rpcdaemon) which covers the following key topics:

  1. Introduction: An overview of the RPC daemon, its benefits, and how it integrates with Erigon.

  2. Getting Started: Step-by-step guides for running the RPC daemon locally and remotely, including configuration options and command-line flags.

  3. Healthcheck: Information on performing health checks using POST requests or GET requests with custom headers.

  4. Testing and debugging: Examples of testing the RPC daemon using curl commands and Postman, debugging.

  5. FAQ: Frequently asked questions and answers covering topics such as prune options, RPC implementation status, and securing communication between the RPC daemon and Erigon instance.

  6. For Developers: Resources for developers, including code generation and information on working with the RPC daemon.

  7. Relations between prune options and RPC methods: Explains how prune options affect RPC methods.

  8. RPC Implementation Status: Provides a table showing the current implementation status of Erigon's RPC daemon.

  9. Securing the communication between RPC daemon and Erigon instance via TLS and authentication: Outlines the steps to secure communication between the RPC daemon and Erigon instance.

  10. Ethstats: Describes how to run ethstats with the RPC daemon.

  11. Allowing only specific methods (Allowlist): Explains how to restrict access to specific RPC methods.

Command Line Options

Last updated

Was this helpful?