[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-10522":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":23,"hasPages":23,"topics":24,"createdAt":10,"pushedAt":10,"updatedAt":27,"readmeContent":28,"aiSummary":29,"trendingCount":16,"starSnapshotCount":16,"syncStatus":30,"lastSyncTime":31,"discoverSource":32},10522,"erigon","erigontech\u002Ferigon","erigontech","Ethereum implementation on the efficiency frontier ","https:\u002F\u002Fdocs.erigon.tech",null,"Go",3576,1522,58,402,0,1,14,31.55,"GNU Lesser General Public License v3.0",false,"main",true,[25,26],"blockchain","ethereum","2026-06-12 02:02:23","# Erigon\n\n[![Docs](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fdocs-up-green)](https:\u002F\u002Fdocs.erigon.tech\u002F)\n[![Blog](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fblog-up-green)](https:\u002F\u002Ferigon.tech\u002Fblog\u002F)\n[![Twitter](https:\u002F\u002Fimg.shields.io\u002Ftwitter\u002Ffollow\u002FErigonEth?style=social)](https:\u002F\u002Fx.com\u002FErigonEth)\n[![Discord](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDiscord-Join-5865F2?style=flat&logo=discord&logoColor=white)](https:\u002F\u002Fdsc.gg\u002Ferigon)\n[![Build status](https:\u002F\u002Fgithub.com\u002Ferigontech\u002Ferigon\u002Factions\u002Fworkflows\u002Fci.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Ferigontech\u002Ferigon\u002Factions\u002Fworkflows\u002Fci.yml)\n[![Coverage](https:\u002F\u002Fsonarcloud.io\u002Fapi\u002Fproject_badges\u002Fmeasure?project=erigontech_erigon&metric=coverage)](https:\u002F\u002Fsonarcloud.io\u002Fsummary\u002Fnew_code?id=erigontech_erigon)\n\nErigon is an implementation of Ethereum (execution layer with embeddable consensus layer), on the efficiency\nfrontier.\n\n- [Erigon](#erigon)\n- [System Requirements](#system-requirements)\n- [Sync Times](#sync-times)\n- [Usage](#usage)\n    - [Getting Started](#getting-started)\n    - [Datadir structure](#datadir-structure)\n    - [History on cheap disk](#history-on-cheap-disk)\n    - [Erigon3 datadir size](#erigon3-datadir-size)\n    - [Erigon3 changes from Erigon2](#erigon3-changes-from-erigon2)\n    - [Logging](#logging)\n    - [Modularity](#modularity)\n    - [Embedded Consensus Layer](#embedded-consensus-layer)\n    - [Testnets](#testnets)\n    - [Block Production (PoS Validator)](#block-production-pos-validator)\n    - [Config Files TOML](#config-files-toml)\n    - [Beacon Chain (Consensus Layer)](#beacon-chain-consensus-layer)\n    - [Caplin](#caplin)\n        - [Caplin's Usage](#caplins-usage)\n    - [Multiple Instances \u002F One Machine](#multiple-instances--one-machine)\n    - [Dev Chain](#dev-chain)\n- [Key features](#key-features)\n    - [Faster Initial Sync](#faster-initial-sync)\n    - [More Efficient State Storage](#more-efficient-state-storage)\n    - [JSON-RPC daemon](#json-rpc-daemon)\n    - [Grafana dashboard](#grafana-dashboard)\n- [FAQ](#faq)\n    - [Use as library](#use-as-library)\n    - [Default Ports and Firewalls](#default-ports-and-firewalls)\n        - [`erigon` ports](#erigon-ports)\n        - [`caplin` ports](#caplin-ports)\n        - [`beaconAPI` ports](#beaconapi-ports)\n        - [`shared` ports](#shared-ports)\n        - [`other` ports](#other-ports)\n        - [Hetzner expecting strict firewall rules](#hetzner-expecting-strict-firewall-rules)\n    - [Run as a separate user - `systemd` example](#run-as-a-separate-user---systemd-example)\n    - [Grab diagnostic for bug report](#grab-diagnostic-for-bug-report)\n    - [Run local devnet](#run-local-devnet)\n    - [Docker permissions error](#docker-permissions-error)\n    - [Public RPC](#public-rpc)\n    - [RaspberryPI](#raspberrypi)\n    - [Run all components by docker-compose](#run-all-components-by-docker-compose)\n        - [Optional: Setup dedicated user](#optional-setup-dedicated-user)\n        - [Environment Variables](#environment-variables)\n        - [Run](#run)\n    - [How to change db pagesize](#how-to-change-db-pagesize)\n    - [Erigon3 perf tricks](#erigon3-perf-tricks)\n    - [Windows](#windows)\n- [Getting in touch](#getting-in-touch)\n    - [Reporting security issues\u002Fconcerns](#reporting-security-issuesconcerns)\n\n\u003C!--te-->\n\n**Important defaults**: Erigon 3 is a Full Node by default. (Erigon 2 was an [Archive Node](https:\u002F\u002Fethereum.org\u002Fen\u002Fdevelopers\u002Fdocs\u002Fnodes-and-clients\u002Farchive-nodes\u002F#what-is-an-archive-node) by default.)\nSet `--prune.mode` to \"archive\" if you need an archive node or to \"minimal\" if you run a validator on a small disk (not allowed to change after first start).\n\n\u003Ccode>In-depth links are marked by the microscope sign (🔬) \u003C\u002Fcode>\n\nSystem Requirements\n===================\n\nRAM: >=32GB, [Golang >= 1.25](https:\u002F\u002Fgolang.org\u002Fdoc\u002Finstall); GCC 10+ or Clang; On Linux: kernel > v4. 64-bit\narchitecture.\n\n- ArchiveNode Ethereum Mainnet: 1.6TB (May 2025). FullNode: 1.1TB (May 2025)\n- ArchiveNode Gnosis: 640GB (May 2025). FullNode: 300GB (June 2024)\n- ArchiveNode Polygon Mainnet: 4.1TB (April 2024). FullNode: 2Tb (April 2024)\n\nSSD or NVMe. We do not recommend HDD — on HDD, Erigon will always stay a few blocks behind the chain tip but will not fall further behind.\nBear in mind that SSD performance deteriorates when close to capacity. CloudDrives (like\ngp3): Blocks Execution is slow\non [cloud-network-drives](https:\u002F\u002Fgithub.com\u002Ferigontech\u002Ferigon?tab=readme-ov-file#cloud-network-drives)\n\n🔬 More details on [Erigon3 datadir size](#erigon3-datadir-size)\n\n🔬 More details on what type of data stored [here](https:\u002F\u002Fledgerwatch.github.io\u002Fturbo_geth_release.html#Disk-space)\n\nSync Times\n==========\n\nThese are the approximate sync times for syncing from scratch to the tip of the chain (results may vary depending on hardware and bandwidth).\n\n\n| Chain      | Archive         | Full           | Minimal        |\n|------------|-----------------|----------------|----------------|\n| Ethereum   | 7 Hours, 55 Minutes | 4 Hours, 23 Minutes | 1 Hour, 41 Minutes |\n| Gnosis     | 2 Hours, 10 Minutes | 1 Hour, 5 Minutes  | 33 Minutes      |\n| Polygon    | 1 Day, 21 Hours    | 21 Hours, 41 Minutes | 11 Hours, 54 Minutes |\n\nUsage\n=====\n\n### Getting Started\n\n[Release Notes and Binaries](https:\u002F\u002Fgithub.com\u002Ferigontech\u002Ferigon\u002Freleases)\n\nBuild latest release (this will be suitable for most users just wanting to run a node):\n\n```sh\ngit clone --branch release\u002F\u003Cx.xx> --single-branch https:\u002F\u002Fgithub.com\u002Ferigontech\u002Ferigon.git\ncd erigon\nmake erigon\n.\u002Fbuild\u002Fbin\u002Ferigon\n```\n\nUse `--datadir` to choose where to store data.\n\nUse `--chain=gnosis` for [Gnosis Chain](https:\u002F\u002Fwww.gnosis.io\u002F), `--chain=bor-mainnet` for Polygon Mainnet,\nand `--chain=amoy` for Polygon Amoy.\nFor Gnosis Chain you need a [Consensus Layer](#beacon-chain-consensus-layer) client alongside\nErigon (https:\u002F\u002Fdocs.gnosischain.com\u002Fcategory\u002Fstep--3---run-consensus-client).\n\nRunning `make help` will list and describe the convenience commands available in the [Makefile](.\u002FMakefile).\n\n### Upgrading from 3.0 to 3.1\n\n1. Backup your datadir.\n2. Upgrade your Erigon binary.\n3. OPTIONAL: Upgrade snapshot files.\n   1. Update snapshot file names. To do this either run Erigon 3.1 until the sync stage completes, or run `erigon snapshots update-to-new-ver-format --datadir \u002Fyour\u002Fdatadir`.\n   2. Reset your datadir so that Erigon will sync to a newer snapshot. `erigon snapshots reset --datadir \u002Fyour\u002Fdatadir`. See [Resetting snapshots](#Resetting-snapshots) for more details.\n4. Run Erigon 3.1. Your snapshots file names will be migrated automatically if you didn't do this manually. If you reset your datadir, Erigon will sync to the latest remote snapshots.\n\n### Datadir structure\n\n```sh\ndatadir        \n    chaindata     # \"Recently-updated Latest State\", \"Recent History\", \"Recent Blocks\"\n    snapshots     # contains `.seg` files - it's old blocks\n        domain    # Latest State\n        history   # Historical values \n        idx       # InvertedIndices: can search\u002Ffiltering\u002Funion\u002Fintersect them - to find historical data. like eth_getLogs or trace_transaction\n        accessor # Additional (generated) indices of history - have \"random-touch\" read-pattern. They can serve only `Get` requests (no search\u002Ffilters).\n    txpool        # pending transactions. safe to remove.\n    nodes         # p2p peers. safe to remove.\n    temp          # used to sort data bigger than RAM. can grow to ~100gb. cleaned at startup.\n   \n# There is 4 domains: account, storage, code, commitment \n```\n\nSee the [lib](db\u002Fdownloader\u002FREADME.md) and [cmd](cmd\u002Fdownloader\u002FREADME.md) READMEs for more information.\n\n### History on cheap disk\n\nIf you can afford to store the datadir on a single NVMe RAID — great. If you can't, it's possible to store history on a cheaper drive.\n\n```sh\n# place (or ln -s) `datadir` on slow disk. link some sub-folders to fast (low-latency) disk.\n# Example: what need link to fast disk to speedup execution\ndatadir        \n    chaindata   # link to fast disk\n    snapshots   \n        domain    # link to fast disk\n        history   \n        idx       \n        accessor \n    temp # buffers to sort data >> RAM. sequential-buffered IO - is slow-disk-friendly   \n\n# Example: how to speedup history access: \n#   - go step-by-step - first try store `accessor` on fast disk\n#   - if speed is not good enough: `idx`\n#   - if still not enough: `history` \n```\n\n### Erigon3 datadir size\n\n```sh\n# eth-mainnet - archive - Nov 2024\n\ndu -hsc \u002Ferigon\u002Fchaindata\n15G \t\u002Ferigon\u002Fchaindata\n\ndu -hsc \u002Ferigon\u002Fsnapshots\u002F* \n120G \t\u002Ferigon\u002Fsnapshots\u002Faccessor\n300G\t\u002Ferigon\u002Fsnapshots\u002Fdomain\n280G\t\u002Ferigon\u002Fsnapshots\u002Fhistory\n430G\t\u002Ferigon\u002Fsnapshots\u002Fidx\n2.3T\t\u002Ferigon\u002Fsnapshots\n```\n\n```sh\n# bor-mainnet - archive - Nov 2024\n\ndu -hsc \u002Ferigon\u002Fchaindata\n20G \t\u002Ferigon\u002Fchaindata\n\ndu -hsc \u002Ferigon\u002Fsnapshots\u002F* \n360G\t\u002Ferigon-data\u002Fsnapshots\u002Faccessor\n1.1T\t\u002Ferigon-data\u002Fsnapshots\u002Fdomain\n750G\t\u002Ferigon-data\u002Fsnapshots\u002Fhistory\n1.5T\t\u002Ferigon-data\u002Fsnapshots\u002Fidx\n4.9T\t\u002Ferigon\u002Fsnapshots\n```\n\n### Erigon3 changes from Erigon2\n\n- **Initial sync doesn't re-exec from 0:** downloading 99% LatestState and History\n- **Per-Transaction granularity of history** (Erigon2 had per-block). Means:\n    - Can execute 1 historical transaction - without executing it's block\n    - If account X change V1->V2->V1 within 1 block (different transactions): `debug_getModifiedAccountsByNumber` return\n      it\n    - Erigon3 doesn't store Logs (aka Receipts) - it always re-executing historical txn (but it's cheaper)\n- **Validator mode**: added. `--internalcl` is enabled by default. to disable use `--externalcl`.\n- **Store most of data in immutable files (segments\u002Fsnapshots):**\n    - can symlink\u002Fmount latest state to fast drive and history to cheap drive\n  - `chaindata` is less than `15gb`. It's ok to `rm -rf chaindata`. (to prevent grow: recommend `--batchSize \u003C= 1G`)\n- **`--prune` flags changed**: see `--prune.mode` (default: `full`, archive: `archive`, EIP-4444: `minimal`)\n- **Other changes:**\n    - ExecutionStage included many E2 stages: stage_hash_state, stage_trie, log_index, history_index, trace_index\n    - Restart doesn't loose much partial progress: `--sync.loop.block.limit=5_000` enabled by default\n\n### Logging\n\n_Flags:_\n\n- `verbosity`\n- `log.console.verbosity` (overriding alias for `verbosity`)\n- `log.json`\n- `log.console.json` (alias for `log.json`)\n- `log.dir.path`\n- `log.dir.prefix`\n- `log.dir.verbosity`\n- `log.dir.json`\n- `torrent.verbosity`\n\nIn order to log only to the stdout\u002Fstderr the `--verbosity` (or `log.console.verbosity`) flag can be used to supply an\nint value specifying the highest output log level:\n\n```\n  LvlCrit = 0\n  LvlError = 1\n  LvlWarn = 2\n  LvlInfo = 3\n  LvlDebug = 4\n  LvlTrace = 5\n```\n\nTo set an output dir for logs to be collected on disk, please set `--log.dir.path` If you want to change the filename\nproduced from `erigon` you should also set the `--log.dir.prefix` flag to an alternate name. The\nflag `--log.dir.verbosity` is\nalso available to control the verbosity of this logging, with the same int value as above, or the string value e.g. '\ndebug' or 'info'. Default verbosity is 'debug' (4), for disk logging.\n\nLog format can be set to json by the use of the boolean flags `log.json` or `log.console.json`, or for the disk\noutput `--log.dir.json`.\n\n#### Torrent client logging\n\nThe torrent client in the Downloader logs to `logs\u002Ftorrent.log` at the level specified by `torrent.verbosity` or WARN, whichever is lower. Logs at `torrent.verbosity` or higher are also passed through to the top level Erigon dir and console loggers (which must have their own levels set low enough to log the messages in their respective handlers).\n\n### Resetting snapshots\n\nErigon 3.1 adds the command `erigon snapshots reset`. This modifies your datadir so that Erigon will sync to the latest remote snapshots on next run. You must pass `--datadir`. If the chain cannot be inferred from the chaindata, you must pass `--chain`. `--local=false` will prevent locally generated snapshots from also being removed. Pass `--dry-run` and\u002For `--verbosity=5` for more information.\n\n### Modularity\n\nErigon by default is \"all in one binary\" solution, but it's possible start TxPool as separated processes.\nSame true about: JSON RPC layer (RPCDaemon), p2p layer (Sentry), history download layer (Downloader), consensus.\nDon't start services as separate processes unless you have a clear reason to do so: resource limiting, scaling, replacing with\nyour own implementation, or security.\nHow to start Erigon's services as separated processes, see in [docker-compose.yml](.\u002Fdocker-compose.yml).\nEach service has own `.\u002Fcmd\u002F*\u002FREADME.md` file.\n[Erigon Blog](https:\u002F\u002Ferigon.tech\u002Fblog\u002F).\n\n### Embedded Consensus Layer\n\nBuilt-in consensus for Ethereum Mainnet, Sepolia, Hoodi, Gnosis, Chiado.\nTo use external Consensus Layer: `--externalcl`.\n\n### Testnets\n\nIf you would like to give Erigon a try: a good option is to start syncing one of the public testnets, Hoodi (or Chiado).\nIt syncs much quicker, and does not take so much disk space:\n\n```sh\ngit clone https:\u002F\u002Fgithub.com\u002Ferigontech\u002Ferigon.git\ncd erigon\nmake erigon\n.\u002Fbuild\u002Fbin\u002Ferigon --datadir=\u003Cyour_datadir> --chain=hoodi --prune.mode=full\n```\n\nPlease note the `--datadir` option that allows you to store Erigon files in a non-default location. Name of the\ndirectory `--datadir` does not have to match the name of the chain in `--chain`.\n\n### Block Production (PoS Validator)\n\nBlock production is fully supported for Ethereum & Gnosis Chain. It is still experimental for Polygon.\n\n### Config Files TOML\n\nYou can set Erigon flags through a TOML configuration file with the flag `--config`. The flags set in the\nconfiguration file can be overwritten by writing the flags directly on Erigon command line\n\n`.\u002Fbuild\u002Fbin\u002Ferigon --config .\u002Fconfig.toml --chain=sepolia`\n\nAssuming we have `chain : \"mainnet\"` in our configuration file, by adding `--chain=sepolia` allows the overwrite of the\nflag inside of the toml configuration file and sets the chain to sepolia\n\n```toml\ndatadir = 'your datadir'\nport = 1111\nchain = \"mainnet\"\nhttp = true\n\"private.api.addr\"=\"localhost:9090\"\n\n\"http.api\" = [\"eth\",\"debug\",\"net\"]\n```\n\n### Beacon Chain (Consensus Layer)\n\nErigon can be used as an Execution Layer (EL) for Consensus Layer clients (CL). Default configuration is OK.\n\nIf your CL client is on a different device, add `--authrpc.addr 0.0.0.0` ([Engine API] listens on localhost by default)\nas well as `--authrpc.vhosts \u003CCL host>` where `\u003CCL host>` is your source host or `any`.\n\n[Engine API]: https:\u002F\u002Fgithub.com\u002Fethereum\u002Fexecution-apis\u002Fblob\u002Fmain\u002Fsrc\u002Fengine\n\nIn order to establish a secure connection between the Consensus Layer and the Execution Layer, a JWT secret key is\nautomatically generated.\n\nThe JWT secret key will be present in the datadir by default under the name of `jwt.hex` and its path can be specified\nwith the flag `--authrpc.jwtsecret`.\n\nThis piece of info needs to be specified in the Consensus Layer as well in order to establish connection successfully.\nMore information can be found [here](https:\u002F\u002Fgithub.com\u002Fethereum\u002Fexecution-apis\u002Fblob\u002Fmain\u002Fsrc\u002Fengine\u002Fauthentication.md).\n\nOnce Erigon is running, you need to point your CL client to `\u003Cerigon address>:8551`,\nwhere `\u003Cerigon address>` is either `localhost` or the IP address of the device running Erigon, and also point to the JWT\nsecret path created by Erigon.\n\n### Caplin\n\nCaplin is a full-fledged validating Consensus Client like Prysm, Lighthouse, Teku, Nimbus and Lodestar. Its goal is:\n\n* provide better stability\n* Validation of the chain\n* Stay in sync\n* keep the execution of blocks on chain tip\n* serve the Beacon API using a fast and compact data model alongside low CPU and memory usage.\n\nThe main reason we developed a new Consensus Layer is to explore the potential benefits it can bring.\nFor example, The Engine API does not work well with Erigon. The Engine API sends data one block at a time, which does\nnot suit how Erigon works. Erigon is designed to handle many blocks simultaneously and needs to sort and process data\nefficiently. Therefore, it would be better for Erigon to handle the blocks independently instead of relying on the\nEngine API.\n\n#### Caplin's Usage\n\nCaplin is enabled by default. To disable it and use the Engine API instead, use the `--externalcl` flag. From that point\non, an external Consensus Layer will no longer be needed.\n\nCaplin also has an archival mode for historical states and blocks. it can be enabled through the `--caplin.archive`\nflag.\nIn order to enable the caplin's Beacon API, the flag `--beacon.api=\u003Cnamespaces>` must be added.\ne.g: `--beacon.api=beacon,builder,config,debug,node,validator,lighthouse` will enable all endpoints. \nNote: enabling the Beacon API will lead to a 6 GB higher RAM usage\n\n### Multiple Instances \u002F One Machine\n\nDefine 7 flags to avoid conflicts:\n`--datadir --port --http.port --authrpc.port --torrent.port --private.api.addr --mcp.port`.\nExample of multiple chains on the same machine:\n\n```\n# mainnet\n.\u002Fbuild\u002Fbin\u002Ferigon --datadir=\"\u003Cyour_mainnet_data_path>\" --chain=mainnet --port=30303 --http.port=8545 --authrpc.port=8551 --torrent.port=42069 --private.api.addr=127.0.0.1:9090 --mcp.port=8553 --http --ws --http.api=eth,debug,net,trace,web3,erigon\n\n\n# sepolia\n.\u002Fbuild\u002Fbin\u002Ferigon --datadir=\"\u003Cyour_sepolia_data_path>\" --chain=sepolia --port=30304 --http.port=8546 --authrpc.port=8552 --torrent.port=42068 --private.api.addr=127.0.0.1:9091 --mcp.port=8554 --http --ws --http.api=eth,debug,net,trace,web3,erigon\n```\n\nQuote your path if it has spaces.\n\n### Dev Chain\n\n\u003Ccode> 🔬 Detailed explanation is [DEV_CHAIN](\u002Fdocs\u002FDEV_CHAIN.md).\u003C\u002Fcode>\n\nKey features\n============\n\n### Faster Initial Sync\n\nOn a good network connection, an Ethereum Mainnet Full Node syncs in 3\nhours: [OtterSync](https:\u002F\u002Ferigon.substack.com\u002Fp\u002Ferigon-3-alpha-2-introducing-blazingly) can sync\n\n### More Efficient State Storage\n\n**Flat KV storage.** Erigon uses a key-value database and stores accounts and storage in a straightforward way.\n\n\u003Ccode> 🔬 See our detailed DB walkthrough [here](.\u002Fdocs\u002Fprogrammers_guide\u002Fdb_walkthrough.MD).\u003C\u002Fcode>\n\n**Preprocessing**. For some operations, Erigon uses temporary files to preprocess data before inserting it into the main\nDB. That reduces write amplification and DB inserts are orders of magnitude quicker.\n\n\u003Ccode> 🔬 See our detailed ETL explanation [here](https:\u002F\u002Fgithub.com\u002Ferigontech\u002Ferigon\u002Fblob\u002Fmain\u002Fdb\u002Fetl\u002FREADME.md).\u003C\u002Fcode>\n\n**Plain state**\n\n**Single accounts\u002Fstate trie**. Erigon uses a single Merkle trie for both accounts and the storage.\n\n\u003Ccode> 🔬 [Staged Sync Readme](\u002Fdocs\u002Freadthedocs\u002Fsource\u002Fstagedsync.rst)\u003C\u002Fcode>\n\n### JSON-RPC daemon\n\nMost of Erigon's components (txpool, rpcdaemon, snapshots downloader, sentry, ...) can run inside Erigon or as\nindependent processes on the same server (or a separate server). Example:\n\n```sh\nmake erigon rpcdaemon\n.\u002Fbuild\u002Fbin\u002Ferigon --datadir=\u002Fmy --http=false\n# To run RPCDaemon as separated process: use same `--datadir` as Erigon\n.\u002Fbuild\u002Fbin\u002Frpcdaemon --datadir=\u002Fmy --http.api=eth,erigon,web3,net,debug,trace,txpool --ws\n```\n\n- Supported JSON-RPC\n  calls: [eth](.\u002Frpc\u002Fjsonrpc\u002Feth_api.go), [debug](.\u002Frpc\u002Fjsonrpc\u002Fdebug_api.go), [net](.\u002Frpc\u002Fjsonrpc\u002Fnet_api.go), [web3](.\u002Frpc\u002Fjsonrpc\u002Fweb3_api.go)\n- increase throughput by: `--rpc.batch.concurrency`, `--rpc.batch.limit`, `--db.read.concurrency`\n- increase throughput by disabling: `--http.compression`, `--ws.compression`\n\n\u003Ccode>🔬 See [RPC-Daemon docs](.\u002Fcmd\u002Frpcdaemon\u002FREADME.md)\u003C\u002Fcode>\n\n### Grafana dashboard\n\n`docker compose up prometheus grafana`, [detailed docs](.\u002Fcmd\u002Fprometheus\u002FReadme.md).\n\nFAQ\n================\n\n### Use as library\n\n```\n# please use git branch name (or commit hash). don't use git tags\ngo get github.com\u002Ferigontech\u002Ferigon@main\ngo mod tidy\n```\n\n### Default Ports and Firewalls\n\n#### `erigon` ports\n\n| Component | Port  | Protocol  | Purpose                     | Should Expose |\n|-----------|-------|-----------|-----------------------------|---------------|\n| engine    | 9090  | TCP       | gRPC Server                 | Private       |\n| engine    | 42069 | TCP & UDP | Snap sync (Bittorrent)      | Public        |\n| engine    | 8551  | TCP       | Engine API (JWT auth)       | Private       |\n| sentry    | 30303 | TCP & UDP | eth\u002F69 peering              | Public        |\n| sentry    | 30304 | TCP & UDP | eth\u002F70 peering              | Public        |\n| sentry    | 9091  | TCP       | incoming gRPC Connections   | Private       |\n| rpcdaemon | 8545  | TCP       | HTTP & WebSockets & GraphQL | Private       |\n| mcp       | 8553  | TCP       | MCP server (AI assistants)  | Private       |\n| shutter   | 23102 | TCP       | Peering                     | Public        |\n\nTypically, 30303 and 30304 are exposed to the internet to allow incoming peering connections. 9090 is exposed only\ninternally for rpcdaemon or other connections, (e.g. rpcdaemon -> erigon).\nPort 8551 (JWT authenticated) is exposed only internally for [Engine API] JSON-RPC queries from the Consensus Layer\nnode.\nPort 8553 is the embedded MCP server for AI-assistant integration; it binds to localhost only and should never be\nexposed publicly. To disable it entirely, pass `--mcp.disable`.\n\n#### `caplin` ports\n\n| Component | Port | Protocol | Purpose | Should Expose |\n|-----------|------|----------|---------|---------------|\n| sentinel  | 4000 | UDP      | Peering | Public        |\n| sentinel  | 4001 | TCP      | Peering | Public        |\n\nIn order to configure the ports, use:\n\n```\n   --caplin.discovery.addr value                                                    Address for Caplin DISCV5 protocol (default: \"127.0.0.1\")\n   --caplin.discovery.port value                                                    Port for Caplin DISCV5 protocol (default: 4000)\n   --caplin.discovery.tcpport value                                                 TCP Port for Caplin DISCV5 protocol (default: 4001)\n```\n\n#### `beaconAPI` ports\n\n| Component | Port | Protocol | Purpose | Should Expose |\n|-----------|------|----------|---------|---------------|\n| REST      | 5555 | TCP      | REST    | Public        |\n\n#### `shared` ports\n\n| Component | Port | Protocol | Purpose | Should Expose |\n|-----------|------|----------|---------|---------------|\n| all       | 6060 | TCP      | pprof   | Private       |\n| all       | 6061 | TCP      | metrics | Private       |\n\nOptional flags can be enabled that enable pprof or metrics (or both). Use `--help` with the binary for more info.\n\n#### `other` ports\n\nReserved for future use: **gRPC ports**: `9092` consensus engine, `9093` snapshot downloader, `9094` TxPool\n\n#### Hetzner expecting strict firewall rules\n\n```\n0.0.0.0\u002F8             \"This\" Network             RFC 1122, Section 3.2.1.3\n10.0.0.0\u002F8            Private-Use Networks       RFC 1918\n100.64.0.0\u002F10         Carrier-Grade NAT (CGN)    RFC 6598, Section 7\n127.16.0.0\u002F12         Private-Use Networks       RFC 1918\n169.254.0.0\u002F16        Link Local                 RFC 3927\n172.16.0.0\u002F12         Private-Use Networks       RFC 1918\n192.0.0.0\u002F24          IETF Protocol Assignments  RFC 5736\n192.0.2.0\u002F24          TEST-NET-1                 RFC 5737\n192.88.99.0\u002F24        6to4 Relay Anycast         RFC 3068\n192.168.0.0\u002F16        Private-Use Networks       RFC 1918\n198.18.0.0\u002F15         Network Interconnect\nDevice Benchmark Testing   RFC 2544\n198.51.100.0\u002F24       TEST-NET-2                 RFC 5737\n203.0.113.0\u002F24        TEST-NET-3                 RFC 5737\n224.0.0.0\u002F4           Multicast                  RFC 3171\n240.0.0.0\u002F4           Reserved for Future Use    RFC 1112, Section 4\n255.255.255.255\u002F32    Limited Broadcast          RFC 919, Section 7\nRFC 922, Section 7\n```\n\nSame\nin [IpTables syntax](https:\u002F\u002Fethereum.stackexchange.com\u002Fquestions\u002F6386\u002Fhow-to-prevent-being-blacklisted-for-running-an-ethereum-client\u002F13068#13068)\n\n### Run as a separate user - `systemd` example\n\nRunning erigon from `build\u002Fbin` as a separate user requires the binaries to be *installed* using `make DIST=\u003Cpath> install`. You could use `$HOME\u002Ferigon`\nor `\u002Fopt\u002Ferigon` as the installation path, for example:\n\n```sh\nmake DIST=\u002Fopt\u002Ferigon install\n```\n\n### Grab diagnostic for bug report\n\n- Get stack trace: `kill -SIGUSR1 \u003Cpid>`, get trace and stop: `kill -6 \u003Cpid>`\n- Get CPU profiling: add `--pprof` flag and run  \n  `go tool pprof -png  http:\u002F\u002F127.0.0.1:6060\u002Fdebug\u002Fpprof\u002Fprofile\\?seconds\\=20 > cpu.png`\n- Get RAM profiling: add `--pprof` flag and run  \n  `go tool pprof -inuse_space -png  http:\u002F\u002F127.0.0.1:6060\u002Fdebug\u002Fpprof\u002Fheap > mem.png`\n\n### Run local devnet\n\n\u003Ccode> 🔬 Detailed explanation is [here](\u002Fdocs\u002FDEV_CHAIN.md).\u003C\u002Fcode>\n\n### Docker permissions error\n\nDocker uses user erigon with UID\u002FGID 1000 (for security reasons). You can see this user being created in the Dockerfile.\nCan fix by giving a host's user ownership of the folder, where the host's user UID\u002FGID is the same as the docker's user\nUID\u002FGID (1000).\nMore details\nin [post](https:\u002F\u002Fwww.fullstaq.com\u002Fknowledge-hub\u002Fblogs\u002Fdocker-and-the-host-filesystem-owner-matching-problem)\n\n### Public RPC\n\n- `--txpool.nolocals=true`\n- don't add `admin` in `--http.api` list\n- `--http.corsdomain=\"*\"` is bad-practice: set exact hostname or IP\n- protect from DOS by reducing: `--rpc.batch.concurrency`, `--rpc.batch.limit`\n\n### Why doesn't my full node have earlier blocks data?\n\n- `prune.mode=full` no longer downloads pre-merge blocks (see [partial history expiry](https:\u002F\u002Fblog.ethereum.org\u002F2025\u002F07\u002F08\u002Fpartial-history-exp)).\n   Now it only stores post-merge blocks data (i.e. blocks and transactions)\n- To include pre-merge blocks data, use `--prune.mode=blocks` (all blocks data + only recent state data) or `--prune.mode=archive` (all data)\n\n### RaspberryPI\n\nhttps:\u002F\u002Fgithub.com\u002FmathMakesArt\u002FErigon-on-RPi-4\n\n### Run all components by docker-compose\n\nDocker allows for building and running Erigon via containers. This alleviates the need for installing build dependencies\nonto the host OS.\n\n#### Optional: Setup dedicated user\n\nUser UID\u002FGID need to be synchronized between the host OS and container so files are written with correct permission.\n\nYou may wish to setup a dedicated user\u002Fgroup on the host OS, in which case the following `make` targets are available.\n\n```sh\n# create \"erigon\" user\nmake user_linux\n# or\nmake user_macos\n```\n\n#### Environment Variables\n\nThere is a `.env.example` file in the root of the repo.\n\n* `DOCKER_UID` - The UID of the docker user\n* `DOCKER_GID` - The GID of the docker user\n* `XDG_DATA_HOME` - The data directory which will be mounted to the docker containers\n\nIf not specified, the UID\u002FGID will use the current user.\n\nA good choice for `XDG_DATA_HOME` is to use the `~erigon\u002F.ethereum` directory created by helper\ntargets `make user_linux` or `make user_macos`.\n\n#### Run\n\nCheck permissions: In all cases, `XDG_DATA_HOME` (specified or default) must be writable by the user UID\u002FGID in docker,\nwhich will be determined by the `DOCKER_UID` and `DOCKER_GID` at build time. If a build or service startup is failing\ndue to permissions, check that all the directories, UID, and GID controlled by these environment variables are correct.\n\nNext command starts: Erigon on port 30303, rpcdaemon on port 8545, prometheus on port 9090, and grafana on port 3000.\n\n```sh\n#\n# Will mount ~\u002F.local\u002Fshare\u002Ferigon to \u002Fhome\u002Ferigon\u002F.local\u002Fshare\u002Ferigon inside container\n#\nmake docker-compose\n\n#\n# or\n#\n# if you want to use a custom data directory\n# or, if you want to use different uid\u002Fgid for a dedicated user\n#\n# To solve this, pass in the uid\u002Fgid parameters into the container.\n#\n# DOCKER_UID: the user id\n# DOCKER_GID: the group id\n# XDG_DATA_HOME: the data directory (default: ~\u002F.local\u002Fshare)\n#\n# Note: \u002Fpreferred\u002Fdata\u002Ffolder must be read\u002Fwriteable on host OS by user with UID\u002FGID given\n#       if you followed above instructions\n#\n# Note: uid\u002Fgid syntax below will automatically use uid\u002Fgid of running user so this syntax\n#       is intended to be run via the dedicated user setup earlier\n#\nDOCKER_UID=$(id -u) DOCKER_GID=$(id -g) XDG_DATA_HOME=\u002Fpreferred\u002Fdata\u002Ffolder DOCKER_BUILDKIT=1 COMPOSE_DOCKER_CLI_BUILD=1 make docker-compose\n\n#\n# if you want to run the docker, but you are not logged in as the $ERIGON_USER\n# then you'll need to adjust the syntax above to grab the correct uid\u002Fgid\n#\n# To run the command via another user, use\n#\nERIGON_USER=erigon\nsudo -u ${ERIGON_USER} DOCKER_UID=$(id -u ${ERIGON_USER}) DOCKER_GID=$(id -g ${ERIGON_USER}) XDG_DATA_HOME=~${ERIGON_USER}\u002F.ethereum DOCKER_BUILDKIT=1 COMPOSE_DOCKER_CLI_BUILD=1 make docker-compose\n```\n\nMakefile creates the initial directories for erigon, prometheus and grafana. The PID namespace is shared between erigon\nand rpcdaemon which is required to open Erigon's DB from another process (RPCDaemon local-mode).\nSee: https:\u002F\u002Fgithub.com\u002Ferigontech\u002Ferigon\u002Fpull\u002F2392\u002Ffiles\n\nIf your docker installation requires the docker daemon to run as root (which is by default), you will need to prefix\nthe command above with `sudo`. However, it is sometimes recommended running docker (and therefore its containers) as a\nnon-root user for security reasons. For more information about how to do this, refer to\n[this article](https:\u002F\u002Fdocs.docker.com\u002Fengine\u002Finstall\u002Flinux-postinstall\u002F#manage-docker-as-a-non-root-user).\n\n### How to change db pagesize\n\n[post](https:\u002F\u002Fgithub.com\u002Ferigontech\u002Ferigon\u002Fblob\u002Fmain\u002Fcmd\u002Fintegration\u002FReadme.md#copy-data-to-another-db)\n\n### Erigon3 perf tricks\n\n- on BorMainnet may help: `--sync.loop.block.limit=10_000`\n- on cloud-drives (good throughput, bad latency) - can enable OS's brain to pre-fetch: `SNAPSHOT_MADV_RND=false`\n- can lock latest state in RAM - to prevent from eviction (node may face high historical RPC traffic without impacting\n  Chain-Tip perf):\n\n```\nvmtouch -vdlw \u002Fmnt\u002Ferigon\u002Fsnapshots\u002Fdomain\u002F*bt\nls \u002Fmnt\u002Ferigon\u002Fsnapshots\u002Fdomain\u002F*.kv | parallel vmtouch -vdlw\n\n# if it failing with \"can't allocate memory\", try: \nsync && sudo sysctl vm.drop_caches=3\necho 1 > \u002Fproc\u002Fsys\u002Fvm\u002Fcompact_memory\n```\n\n### Windows\n\nWindows users may run erigon in 3 possible ways:\n\n* Build executable binaries natively for Windows using `make`. Example: `make erigon` builds the erigon\n  executable. All binaries are placed in `.\\build\\bin\\` subfolder. There are some requirements for a successful native\n  build on windows :\n    * [Git](https:\u002F\u002Fgit-scm.com\u002Fdownloads) for Windows must be installed (provides bash and MSYS2 environment). If\n      you're cloning this repository is very likely you already have it\n  * [GO Programming Language](https:\u002F\u002Fgolang.org\u002Fdl\u002F) must be installed. Minimum required version is 1.25\n    * [Chocolatey package manager](https:\u002F\u002Fchocolatey.org\u002F) for Windows must be installed. Then install the required\n      build tools: `choco install cmake make mingw` (provides GNU CC Compiler >= 13, GNU Make, and CMake). Make sure\n      Windows System \"Path\" variable has:\n      C:\\ProgramData\\chocolatey\\lib\\mingw\\tools\\install\\mingw64\\bin\n\n  **Important note about Anti-Viruses**\n  During MinGW's compiler detection phase some temporary executables are generated to test compiler capabilities. It's\n  been reported some anti-virus programs detect those files as possibly infected by `Win64\u002FKryptic.CIS` trojan horse (or\n  a variant of it). Although those are false positives we have no control over 100+ vendors of security products for\n  Windows and their respective detection algorithms and we understand this might make your experience with Windows\n  builds uncomfortable. To workaround the issue you might either set exclusions for your antivirus specifically\n  for `build\\bin\\mdbx\\CMakeFiles` sub-folder of the cloned repo or you can run erigon using the following other two\n  options\n\n* Use Docker :  see [docker-compose.yml](.\u002Fdocker-compose.yml)\n\n* Use WSL (Windows Subsystem for Linux) **strictly on version 2**. Under this option you can build Erigon just as you\n  would on a regular Linux distribution. You can point your data also to any of the mounted Windows partitions (\n  eg. `\u002Fmnt\u002Fc\u002F[...]`, `\u002Fmnt\u002Fd\u002F[...]` etc) but in such case be advised performance is impacted: this is due to the fact\n  those mount points use `DrvFS` which is\n  a [network file system](https:\u002F\u002Fgithub.com\u002Ferigontech\u002Ferigon?tab=readme-ov-file#cloud-network-drives)\n  and, additionally, MDBX locks the db for exclusive access which implies only one process at a time can access data.\n  This has consequences on the running of `rpcdaemon` which has to be configured as [Remote DB](#json-rpc-daemon) even if\n  it is executed on the very same computer. If instead your data is hosted on the native Linux filesystem non\n  limitations apply.\n  **Please also note the default WSL2 environment has its own IP address which does not match the one of the network\n  interface of Windows host: take this into account when configuring NAT for port 30303 on your router.**\n\nGetting in touch\n================\n\n### Reporting security issues\u002Fconcerns\n\nSend an email to `security [at] torquem.ch`.","Erigon是一个高效的以太坊实现，专注于执行层并内嵌共识层。它使用Go语言编写，具备更快的初始同步速度和更高效的状态存储机制，支持JSON-RPC守护进程和Grafana仪表盘监控。Erigon特别适合需要高性能、低资源消耗的区块链应用场景，如运行以太坊全节点或开发基于以太坊的应用程序。此外，其模块化设计允许用户根据需求灵活配置组件，进一步优化了资源利用效率。",2,"2026-06-11 03:28:58","top_topic"]