Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 36 additions & 15 deletions docs/gitbook/src/fundamentals/configuring-erigon/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,7 @@ Flags for managing how old chain data is handled and stored.
* Default: `0`
* `--prune.distance.blocks value`: Keeps block history for the latest `N` blocks.
* Default: `0`
* `--prune.include-commitment-history, --prune.experimental.include-commitment-history, --experimental.commitment-history`: (
experimental) Enables blazing fast `eth_getProof` for executed blocks by storing commitment history.
* `--prune.include-commitment-history, --prune.experimental.include-commitment-history, --experimental.commitment-history`: Enables blazing fast `eth_getProof` for executed blocks by storing commitment history.
* Default: `false`
* `--snap.keepblocks`: Keeps ancient blocks in the database for debugging.
* Default: `false`
Expand Down Expand Up @@ -161,6 +160,9 @@ Flags for configuring various RPC servers and their behavior.
* Default: `127.0.0.1:9090`
* `--private.api.ratelimit value`: Limits the number of simultaneous internal API requests.
* Default: `31872`
* `--ipcdisable`: Disables the IPC-RPC server.
* Default: `false`
* `--ipcpath value`: Filename for the IPC socket/pipe within the datadir (explicit paths escape it).
* `--http`: Enables the JSON-RPC HTTP server.
* Default: `true`
* `--http.enabled`: An alternative flag to enable the HTTP server.
Expand All @@ -187,10 +189,20 @@ Flags for configuring various RPC servers and their behavior.
* Default: `eth,erigon,engine`
* `--ws`: Enables the WS-RPC server.
* Default: `false`
* `--ws.addr value`: The WS-RPC server listening interface.
* Default: `localhost`
* `--ws.port value`: The WS-RPC server listening port.
* Default: `8546`
* `--ws.api value`: The APIs offered over the WS-RPC interface.
* `--ws.origins value`: Origins from which to accept WebSocket requests.
* `--ws.compression`: Enables compression over WebSocket.
* Default: `true`
* `--rpc.gethcompat`: Enables Geth-compatible storage iteration order for `debug_storageRangeAt` (sorted by keccak256 hash). Disabled by default for performance.
* Default: `false`
* `--rpc.txsync.defaulttimeout value`: Default timeout for `eth_sendRawTransactionSync`.
* Default: `25s`
* `--rpc.txsync.maxtimeout value`: Maximum allowed timeout for `eth_sendRawTransactionSync`.
* Default: `1m0s`
* `--rpc.batch.concurrency value`: Limits the number of goroutines for batch requests.
* Default: `2`
* `--rpc.streaming.disable`: Disables JSON streaming for heavy endpoints.
Expand Down Expand Up @@ -309,8 +321,11 @@ Flags related to consensus mechanisms and network forks.
* Default: `20`
* `--gpo.percentile value`: The percentile of recent transaction gas prices to use for a suggested gas price.
* Default: `60`
* `--gpo.maxprice value`: The maximum gas price recommended by the gas price oracle.
* Default: `500000000000` (500 GWei)
* `--proposer.disable`: Disables the PoS proposer.
* Default: `false`
* `--builder.maxblobs value`: Cap the number of blob transactions included in a built block.
* `--bor.heimdall value`: The URL of the Heimdall service.
* Default: `http://localhost:1317`
* `--bor.withoutheimdall`: Runs without the Heimdall service.
Expand Down Expand Up @@ -574,19 +589,19 @@ In order to see all the available options (flags) you must run the command:
./build/bin/erigon --help
```


The flag listing is reproduced below for your convenience:

{% code overflow="wrap" fullWidth="true" %}
```bash
./build/bin/erigon -h
```
NAME:
erigon - erigon

USAGE:
erigon [command] [flags]

VERSION:
3.3.7-9a898cf7
3.3.9-8d7d33c2

COMMANDS:
init Bootstrap and initialize a new genesis block
Expand All @@ -597,8 +612,8 @@ COMMANDS:
help, h Shows a list of commands or help for one command

GLOBAL OPTIONS:
--datadir value Data directory for the databases (default: /home/user/.local/share/erigon)
--ethash.dagdir value Directory to store the ethash mining DAGs (default: /home/user/.local/share/erigon-ethash)
--datadir value Data directory for the databases (default: /home/node/.local/share/erigon)
--ethash.dagdir value Directory to store the ethash mining DAGs (default: /home/node/.local/share/erigon-ethash)
--externalcl Enables the external consensus layer (default: false)
--txpool.disable External pool and block producer, see ./cmd/txpool/readme.md for more info. Disabling internal txpool and block producer. (default: false)
--txpool.pricelimit value Minimum gas price (fee cap) limit to enforce for acceptance into the pool (default: 1)
Expand All @@ -622,7 +637,6 @@ GLOBAL OPTIONS:
--prune.include-commitment-history, --experimental.commitment-history, --prune.experimental.include-commitment-history Enables blazing fast eth_getProof for executed block (default: false)
--fcu.timeout value FCU timeout before it switches to being process async (use 0 to disable) (default: 1s)
--fcu.background.prune Enables background pruning post fcu (default: true)
--fcu.background.commit Enables background flush and commit post fcu (default: false)
--batchSize value Batch size for the execution stage (default: "512M")
--bodies.cache value Limit on the cache for block bodies (default: "268435456")
--database.verbosity value Enabling internal db logs. Very high verbosity levels may require recompile db. Default: 2, means warning. (default: 2)
Expand Down Expand Up @@ -657,7 +671,7 @@ GLOBAL OPTIONS:
--state.cache value Amount of data to store in StateCache (enabled if no --datadir set). Set 0 to disable StateCache. Defaults to 0MB (default: "0MB")
--rpc.batch.concurrency value Does limit amount of goroutines to process 1 batch request. Means 1 bach request can't overload server. 1 batch still can have unlimited amount of request (default: 2)
--rpc.streaming.disable Erigon has enabled json streaming for some heavy endpoints (like trace_*). It's a trade-off: greatly reduce amount of RAM (in some cases from 30GB to 30mb), but it produce invalid json format if error happened in the middle of streaming (because json is not streaming-friendly format) (default: false)
--db.read.concurrency value Does limit amount of parallel db reads. Default: equal to GOMAXPROCS (or number of CPU) (default: 1408)
--db.read.concurrency value Does limit amount of parallel db reads. Default: equal to GOMAXPROCS (or number of CPU) (default: 768)
--rpc.accessList value Specify granular (method-by-method) API allowlist
--trace.compat Bug for bug compatibility with OE for trace_ routines (default: false)
--rpc.gascap value Sets a cap on gas that can be used in eth_call/estimateGas (default: 50000000)
Expand Down Expand Up @@ -711,7 +725,7 @@ GLOBAL OPTIONS:
"stun" Uses STUN to detect an external IP using a default server
"stun:<server>" Uses STUN to detect an external IP using the given server (host:port)
--nodiscover Disables the peer discovery mechanism (manual peer addition) (default: false)
--discovery.v4, --discv4 Enables the V4 discovery mechanism (default: false)
--discovery.v4, --discv4 Enables the V4 discovery mechanism (default: true)
--discovery.v5, --discv5, --v5disc Enables the V5 discovery mechanism (default: true)
--netrestrict value Restricts network communication to the given IP networks (CIDR masks)
--nodekey value P2P node key file
Expand Down Expand Up @@ -748,9 +762,6 @@ GLOBAL OPTIONS:
--no-downloader Disables downloader component (default: false)
--downloader.verify Verify snapshots on startup. It will not report problems found, but re-download broken pieces. (default: false)
--healthcheck Enable grpc health check (default: false)
--mcp.disable Disables the embedded MCP server (default: false)
--mcp.addr value MCP server listening interface (default: "127.0.0.1")
--mcp.port value MCP server listening port (default: 8553)
--bor.heimdall value URL of Heimdall service (default: "http://localhost:1317")
--webseed value Comma-separated URL's, holding metadata about network-support infrastructure (like S3 buckets with snapshots, bootnodes, etc...)
--bor.withoutheimdall Run without Heimdall service (for testing purposes) (default: false)
Expand All @@ -759,7 +770,6 @@ GLOBAL OPTIONS:
--aa Enable AA transactions (default: false)
--ethstats value Reporting URL of a ethstats service (nodename:secret@host:port)
--override.osaka value Manually specify the Osaka fork time, overriding the bundled setting (default: 0)
--override.amsterdam value Manually specify the Amsterdam fork time, overriding the bundled setting (default: 0)
--override.balancer value Manually specify the Balancer fork time, overriding the bundled setting (default: 0)
--keep.stored.chain.config Avoid overriding chain config already stored in the DB (default: false)
--caplin.discovery.addr value Address for Caplin DISCV5 protocol (default: "0.0.0.0")
Expand All @@ -777,6 +787,17 @@ GLOBAL OPTIONS:
--sentinel.bootnodes value [ --sentinel.bootnodes value ] Comma separated enode URLs for P2P discovery bootstrap
--sentinel.staticpeers value [ --sentinel.staticpeers value ] connect to comma-separated Consensus static peers
--ots.search.max.pagesize value Max allowed page size for search methods (default: 25)
--silkworm.exec Enable Silkworm block execution (default: false)
--silkworm.rpc Enable embedded Silkworm RPC service (default: false)
--silkworm.sentry Enable embedded Silkworm Sentry service (default: false)
--silkworm.verbosity value Set the log level for Silkworm console logs (default: "info")
--silkworm.contexts value Number of I/O contexts used in embedded Silkworm RPC and Sentry services (zero means use default in Silkworm) (default: 0)
--silkworm.rpc.log Enable interface log for embedded Silkworm RPC service (default: false)
--silkworm.rpc.log.maxsize value Max interface log file size in MB for embedded Silkworm RPC service (default: 1)
--silkworm.rpc.log.maxfiles value Max interface log files for embedded Silkworm RPC service (default: 100)
--silkworm.rpc.log.response Dump responses in interface logs for embedded Silkworm RPC service (default: false)
--silkworm.rpc.workers value Number of worker threads used in embedded Silkworm RPC service (zero means use default in Silkworm) (default: 0)
--silkworm.rpc.compatibility Preserve JSON-RPC compatibility using embedded Silkworm RPC service (default: true)
--beacon.api value [ --beacon.api value ] Enable beacon API (available endpoints: beacon, builder, config, debug, events, node, validator, lighthouse)
--beacon.api.addr value sets the host to listen for beacon api requests (default: "localhost")
--beacon.api.cors.allow-methods value [ --beacon.api.cors.allow-methods value ] set the cors' allow methods (default: "GET", "POST", "PUT", "DELETE", "OPTIONS")
Expand Down Expand Up @@ -834,7 +855,7 @@ GLOBAL OPTIONS:
--log.dir.disable disable disk logging (default: false)
--log.dir.path value Path to store user and error logs to disk
--log.dir.prefix value The file name prefix for logs stored to disk
--log.dir.verbosity value Set the log verbosity for logs stored to disk (default: "dbug")
--log.dir.verbosity value Set the log verbosity for logs stored to disk (default: "info")
--log.delays Enable block delay logging (default: false)
--config value Sets erigon flags from YAML/TOML file
--help, -h show help
Expand Down
27 changes: 27 additions & 0 deletions docs/gitbook/src/fundamentals/logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,30 @@ All log messages follow a consistent structured format with key-value pairs for
The sync engine uses a sophisticated prefix system to identify stage context.

The prefix format includes stage position and total count (e.g., "1/10 Headers") for easy identification of sync progress.

## Log Directory Permissions

Erigon applies secure default permissions to the log directory and log files to protect potentially sensitive operational data.

**Default permissions:**

* The `logs/` directory is created with permissions `0700` (owner read/write/execute only).
* Individual log files are created with permissions `0640` (owner read/write, group read-only).

**Existing directories with broader permissions:**

If the `logs/` directory already exists with permissions that grant access to group or world (e.g., `0755` or `0775`), Erigon will emit a warning at startup but will continue to operate normally. The warning looks like:

```
WARN log directory has broader permissions than recommended path=<datadir>/logs
```

**Enabling group access (e.g., for log aggregation):**

If you need a log aggregation agent such as Loki, Filebeat, or Promtail to read Erigon logs, grant read and execute permissions to the group:

```bash
chmod 750 <datadir>/logs
```

Make sure the aggregation agent's user is a member of the same group that owns the directory.
6 changes: 6 additions & 0 deletions docs/gitbook/src/fundamentals/mcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ This mode uses **SSE (Server-Sent Events)** transport over HTTP and is the simpl

A separate `mcp` binary that connects to an existing Erigon node either via its JSON-RPC endpoint or directly via the MDBX database. Supports both **stdio** (for Claude Desktop) and **SSE** transports.

The `mcp` binary is available in the following ways:

* **Official GitHub Releases**: The `mcp` binary is bundled with every official Erigon release on [GitHub Releases](https://github.com/erigontech/erigon/releases). Download the archive for your platform and find the binary alongside `erigon`.
* **Docker image**: The binary is included in the official Erigon Docker image at `/usr/local/bin/mcp`.
* **Build from source**:

```bash
make mcp
./build/bin/mcp --help
Expand Down
Loading
Loading