diff --git a/src/advanced.md b/src/advanced.md index 6f8a9cc..5daa33d 100644 --- a/src/advanced.md +++ b/src/advanced.md @@ -2,7 +2,7 @@ Erigon is by default an "all-in-one" binary solution, but it's possible start any internal component as a separated processes: -- [RPCDaemon](./advanced/rpc_daemon.md), the JSON RPC layer +- [RPCDaemon](./advanced/JSONRPC-daemon.md), the JSON RPC layer - [TxPool](./advanced/txpool.md), the transaction pool - [Sentry](./advanced/sentry.md), the p2p layer - [Downloader](./advanced/downloader.md), the history download layer diff --git a/src/advanced/options.md b/src/advanced/options.md index 4091877..a0ef80a 100644 --- a/src/advanced/options.md +++ b/src/advanced/options.md @@ -23,7 +23,7 @@ USAGE: erigon [command] [flags] VERSION: - 3.00.0-57625b40 + 3.0.2-cd286380 COMMANDS: init Bootstrap and initialize a new genesis block @@ -34,9 +34,9 @@ COMMANDS: 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/bloxster/.local/share/erigon-ethash) + --ethash.dagdir value Directory to store the ethash mining DAGs (default: /home/user/.local/share/erigon-ethash) --externalcl Enables the external consensus layer (default: false) - --txpool.disable Experimental external pool and block producer, see ./cmd/txpool/readme.md for more info. Disabling internal txpool and block producer. (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) --txpool.pricebump value Price bump percentage to replace an already existing transaction (default: 10) --txpool.blobpricebump value Price bump percentage to replace existing (type-3) blob transaction (default: 100) @@ -95,10 +95,10 @@ GLOBAL OPTIONS: --rpc.batch.limit value Maximum number of requests in a batch (default: 100) --rpc.returndata.limit value Maximum number of bytes returned from eth_call or similar invocations (default: 100000) --rpc.allow-unprotected-txs Allow for unprotected (non-EIP155 signed) transactions to be submitted via RPC (default: false) - --rpc.maxgetproofrewindblockcount.limit value Max GetProof rewind block count (default: 100000) --rpc.txfeecap value Sets a cap on transaction fee (in ether) that can be sent via the RPC APIs (0 = no cap) (default: 1) --txpool.api.addr value TxPool api network address, for example: 127.0.0.1:9090 (default: use value of --private.api.addr) --trace.maxtraces value Sets a limit on traces that can be returned in trace_filter (default: 200) + --experimental.commitment-history Enables blazing fast eth_getProof for executed block (default: false) --http.timeouts.read value Maximum duration for reading the entire request, including the body. (default: 30s) --http.timeouts.write value Maximum duration before timing out writes of the response. It is reset whenever a new request's header is read. (default: 30m0s) --http.timeouts.idle value Maximum amount of time to wait for the next request when keep-alives are enabled. If http.timeouts.idle is zero, the value of http.timeouts.read is used. (default: 2m0s) @@ -154,6 +154,7 @@ GLOBAL OPTIONS: --dev.period value Block period to use in developer mode (0 = mine only if transaction pending) (default: 0) --vmdebug Record information useful for VM and contract debugging (default: false) --networkid value Explicitly set network id (integer)(For testnets: use --chain instead) (default: 1) + --experiment.persist.receipts value Set > 0 to store receipts in chaindata db (only on chain-tip) - RPC for recent receipts/logs will be faster. Values: 1_000 good starting point. 10_000 receipts it's ~1Gb (not much IO increase). Please test before go over 100_000 (default: 0) --fakepow Disables proof-of-work verification (default: false) --gpo.blocks value Number of recent blocks to check for gas prices (default: 20) --gpo.percentile value Suggested gas price is the given percentile of a set of recent transaction gas prices (default: 60) @@ -197,9 +198,12 @@ GLOBAL OPTIONS: --caplin.checkpoint-sync-url value [ --caplin.checkpoint-sync-url value ] checkpoint sync endpoint --caplin.subscribe-all-topics Subscribe to all gossip topics (default: false) --caplin.max-peer-count value Max number of peers to connect (default: 128) + --caplin.max-peer-count value Max number of peers to connect (default: 128) --caplin.enable-upnp Enable NAT porting for Caplin (default: false) --caplin.max-inbound-traffic-per-peer value Max inbound traffic per second per peer (default: "1MB") --caplin.max-outbound-traffic-per-peer value Max outbound traffic per second per peer (default: "1MB") + --caplin.max-inbound-traffic-per-peer value Max inbound traffic per second per peer (default: "1MB") + --caplin.max-outbound-traffic-per-peer value Max outbound traffic per second per peer (default: "1MB") --caplin.adaptable-maximum-traffic-requirements Make the node adaptable to the maximum traffic requirement based on how many validators are being ran (default: true) --sentinel.addr value Address for sentinel (default: "localhost") --sentinel.port value Port for sentinel (default: 7777) @@ -277,3 +281,5 @@ GLOBAL OPTIONS: --version, -v print the version ``` +``` + diff --git a/src/advanced/performance.md b/src/advanced/performance.md index 122fc8d..d3124b7 100644 --- a/src/advanced/performance.md +++ b/src/advanced/performance.md @@ -10,6 +10,10 @@ These instructions are designed to improve the performance of Erigon 3, particul ```bash --sync.loop.block.limit=10_000 --batchSize=2g ``` +* Increase download speed with flag ```--torrent.download.rate=[value]``` setting your max speed (default value is 128MB). For example: +```bash +--torrent.download.rate=512mb +``` ## Optimize for Cloud Drives diff --git a/src/basic/disk-space.md b/src/basic/disk-space.md index 9f50c6f..33a3e07 100644 --- a/src/basic/disk-space.md +++ b/src/basic/disk-space.md @@ -9,9 +9,9 @@ Below is the size of the `--datadir` used by Erigon. | Network | Archive Node | Full Node | Minimal Node | |----------|--------------|-----------|--------------| -| Ethereum | 1.7 TB | 1000 GB | 310 GB | -| Gnosis | 535 GB | 365 GB | 210 GB | -| Polygon | 4.3 TB | 2 TB | 873 GB | +| Ethereum | 2.2 TB | 1.1 TB | 370 GB | +| Gnosis | 566 GB | 312 GB | 108 GB | +| Polygon | 4.3 TB | 2.6 TB | 1.1 TB | See also [sync times](https://github.com/erigontech/erigon?tab=readme-ov-file#sync-times). @@ -36,8 +36,9 @@ See also [sync times](https://github.com/erigontech/erigon?tab=readme-ov-file#sy | Network | Archive Node | Full Node | Minimal Node | |----------|--------------|-----------|--------------| -| Holesky | 170 GB | 110 GB | 53 GB | -| Sepolia | 950 GB | 510 GB | 122 GB | -| Chiado | 25 GB | 17 GB | 12 GB | +| Holesky | 268 GB | 187 GB | 117 GB | +| Sepolia | 708 GB | 510 GB | 122 GB | +| Hoodi | 16 GB | 16 GB | 15 GB | +| Chiado | 25 GB | 18 GB | 14 GB | See also hints on [optimizing storage](/basic/optimizing-storage.md). diff --git a/src/basic/yaml.md b/src/basic/yaml.md index 7d2cc9c..30afb6c 100644 --- a/src/basic/yaml.md +++ b/src/basic/yaml.md @@ -1,11 +1,14 @@ # Using TOML or YAML Config Files +You can configure Erigon using a YAML or TOML configuration file by specifying its path with the `--config` flag. -You can set Erigon flags via a YAML or TOML configuration file with the flag `--config`. The flags set in the configuration file can be overridden by writing the flags directly to the Erigon command line. +> Note: flags specified in the configuration file can be overridden by directly setting them in the Erigon command line. + +Both in YAML and TOML files boolean operators (`false`, `true`) and strings without spaces can be specified without quotes, while strings with spaces must be included in `""` or `''` quotes. ## YAML -Assuming we have `--chain=mainnet` in our configuration file, adding `--chain=holesky` will override the flag inside the yaml configuration file and set the chain to Holesky. +Use the `--config` flag to point at the YAML configuration file. ```bash ./build/bin/erigon --config ./config.yaml --chain=holesky @@ -13,22 +16,27 @@ Assuming we have `--chain=mainnet` in our configuration file, adding `--chain=ho Example of setting up a YAML config file: -```bash +```yaml datadir : 'your datadir' chain : "mainnet" http : true - http.api : ["eth","debug","net"] ``` +In this case the `--chain` flag in the command line will override the value in the YAML file and Erigon will run on the Holesky testnet. + ## TOML +```bash +./build/bin/erigon --config ./config.toml +``` + Example of setting up TOML config file: -```bash +```toml datadir = 'your datadir' chain = "mainnet" http = true - "http.api" = ["eth","debug","net"] -``` \ No newline at end of file +``` + diff --git a/src/installation/docker.md b/src/installation/docker.md index c1f98d9..dfad2d4 100644 --- a/src/installation/docker.md +++ b/src/installation/docker.md @@ -3,49 +3,50 @@ Using Docker allows starting Erigon packaged as a Docker image without installing the program directly on your system. -## General info +### General Info -* The released archive now comprises 10 key binaries: erigon, downloader, devnet, EVM, caplin, diag, integration, RPCDaemon, Sentry, and txpool; -* The new Docker images feature seven binaries: erigon, integration, diag, Sentry, txpool, downloader, and RPCDaemon (same binaries included in the released archive); -* Multi-platform docker image available for linux/amd64/v2 and linux/arm64 platforms and based on alpine:3.20.2; No need to pull another docker image for another different platform. -* The Docker image is now compatible with multiple platforms: Linux (amd64, v2) and arm64. It's built on top of Alpine 3.20.2; -* All build flags now passed to the release workflow — so, user can see previously missed build info in our released binaries (as well as in docker images) and also better build optimization expected; -* With recent updates, all build configurations are now included in the release process. This provides users with more comprehensive build information for both binaries and Docker images, along with enhanced build optimizations.. -* Images are stored at +* The new Docker images feature seven binaries as are included in the released archive: `erigon`, `integration`, `diag`, `sentry`, `txpool`, `downloader`, `rpcdaemon`. +* Multi-platform docker image available for linux/amd64/v2 and linux/arm64 platforms and based on alpine:3.20.2; no need to pull another docker image for another different platform. +* All build flags are now passed to the release workflow, allowing users to view previously missed build information in our released binaries and Docker images. Additionally, this change is expected to result in better build optimization. +* Docker images now contain the label “org.opencontainers.image.revision,” which refers to the commit ID from the Erigon project used to build the artifacts. +* With recent updates, all build configurations are now included in the release process. This provides users with more comprehensive build information for both binaries and Docker images, along with enhanced build optimizations. +* Images are stored at . -## Download and start Erigon in Docker -Here are the steps to download and start Erigon 3 in Docker: +## Prerequisites + +Having Docker Engine installed, see instructions [here](https://docs.docker.com/engine/install/). -1. Install the latest version of Docker Engine, see instructions [here](https://docs.docker.com/engine/install/). +## Download and start Erigon in Docker -2. Visit the Erigon Docker Hub page to view the available releases. For Erigon 3, search for the [latest available release](https://hub.docker.com/r/erigontech/erigon/tags?name=v3). +Here are the steps to download and start Erigon in Docker: -3. Download the latest version: +1. Download the latest version: ```bash -docker pull erigontech/erigon:v3.0.0 +docker pull erigontech/erigon ``` -* List the downloaded images to get the IMAGE ID: +2. List the downloaded images to get the IMAGE ID: ```bash docker images ``` -* Check which Erigon version has been downloaded: +3. Check which Erigon version has been downloaded: ```bash docker run -it --v ``` -* If you want to start Erigon add the options according to the [basic usage](/basic-usage.md) page or the advanced customization page. For example: +If you want to start Erigon add the options according to the [basic usage](/basic-usage.md) page or the advanced customization page. For example: ```bash docker run -it 36f25992dd1a --chain=holesky --prune.mode=minimal +docker run -it 36f25992dd1a --chain=holesky --prune.mode=minimal ``` -* When done, exit the container or press `Ctrl+C`. The container will stop. +To exit the container press `Ctrl+C`; the container will stop. ## Optional: Setup dedicated user @@ -83,7 +84,7 @@ If a build or service startup is failing due to permissions, check that all the ### Run -Next command starts: Erigon on port 30303, rpcdaemon on port 8545, prometheus on port 9090, and grafana on port 3000: +Next command starts: `erigon` on port `30303`, `rpcdaemon` on port `8545`, `prometheus` on port `9090`, and `grafana` on port `3000`: ``` # @@ -119,7 +120,7 @@ ERIGON_USER=erigon sudo -u ${ERIGON_USER} DOCKER_UID=$(id -u ${ERIGON_USER}) DOCKER_GID=$(id -g ${ERIGON_USER}) XDG_DATA_HOME=~${ERIGON_USER}/.ethereum DOCKER_BUILDKIT=1 COMPOSE_DOCKER_CLI_BUILD=1 make docker-compose ``` -`Makefile` creates the initial directories for Erigon, Prometheus and Grafana. The PID namespace is shared between erigon and rpcdaemon which is required to open Erigon's DB from another process (RPCDaemon local-mode). See: [https://github.com/ledgerwatch/erigon/pull/2392/files](https://github.com/ledgerwatch/erigon/pull/2392/files) +`makefile` creates the initial directories for `erigon`, `prometheus` and `grafana`. The PID namespace is shared between erigon and rpcdaemon which is required to open Erigon's DB from another process (RPCDaemon local-mode). See: [https://github.com/ledgerwatch/erigon/pull/2392/files](https://github.com/ledgerwatch/erigon/pull/2392/files) If your docker installation requires the docker daemon to run as root (which is by default), you will need to prefix the command above with `sudo`. However, it is sometimes recommended running docker (and therefore its containers) as a non-root user for security reasons. For more information about how to do this, refer to this [article](https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user). diff --git a/src/installation/upgrading.md b/src/installation/upgrading.md new file mode 100644 index 0000000..7653ead --- /dev/null +++ b/src/installation/upgrading.md @@ -0,0 +1,89 @@ +# Upgrading from a previous version + +To upgrade Erigon to a newer version when you've originally installed it via Git and manual compilation, you should follow these steps without needing to delete the entire folder: + +* **Terminate your Erigon** session by pressing CTRL+C + +* **Navigate to your Erigon directory** + +* **Fetch the latest changes from the repository**: You need to make sure your local repository is up-to-date with the main GitHub repository. Run: + + ```bash + git fetch --tags + ``` + +* **Check out** the [latest version](https://github.com/ledgerwatch/erigon/releases) and switch to it using: + + + ```bash + git checkout + ``` + + + Replace `` with the version tag of the new release, for example: + + ```bash + git checkout v3.0.0 + ``` + +* **Rebuild Erigon**: Since the codebase has changed, you need to compile the new version. Run: + + ```bash + make erigon + ``` + +This process updates your installation to the latest version you specify, while maintaining your existing data and configuration settings in the Erigon folder. You're essentially just replacing the executable with a newer version. + +# Docker +If you're using Docker to run Erigon, the process to upgrade to a newer version of the software is straightforward and revolves around pulling the latest Docker image and then running it. Here's how you can upgrade Erigon using Docker: + +* **Pull the Latest Docker Image**: First, find out the tag of the new release from the Erigon Docker Hub page. Once you know the tag, pull the new image: + + ```bash + docker pull erigontech/erigon: + ``` + + Replace `` with the actual version tag you wish to use. For example: + + ```bash + docker pull erigontech/erigon:v3.0.0-beta2 + ``` + + +* **List Your Docker Images**: Check your downloaded images to confirm the new image is there and get the new image ID: + + ```bash + docker images + ``` + + +* **Stop the Running Erigon Container**: If you have a currently running Erigon container, you'll need to stop it before you can start the new version. First, find the container ID by listing the running containers: + + ```bash + docker ps + ``` + + + Then stop the container using: + + ```bash + docker stop + ``` + + Replace `` with the actual ID of the container running Erigon. + +* **Remove the Old Container**: (Optional) If you want to clean up, you can remove the old container after stopping it: + + ```bash + docker rm + ``` + +* **Run the New Image**: Now you can start a new container with the new Erigon version using the new image ID: + + ```bash + docker run -it + ``` + +* **Verify Operation**: Ensure that Erigon starts correctly and connects to the desired network, verifying the logs for any initial errors. + +By following these steps, you'll keep your Docker setup clean and up-to-date with the latest Erigon version without needing to manually clean up or reconfigure your environment. Docker's ability to encapsulate software in containers simplifies upgrades and reduces conflicts with existing software on your machine. \ No newline at end of file diff --git a/src/nodes/polygon.md b/src/nodes/polygon.md index e619748..0e94d44 100644 --- a/src/nodes/polygon.md +++ b/src/nodes/polygon.md @@ -44,7 +44,7 @@ To start a Erigon full node for **Polygon mainnet** with remote Heimdall: For a **Amoy testnet** archive node with remote Heimdall: ```bash -./build/bin/erigon --chain=amoy --bor.heimdall=https://heimdall-api-amoy.polygon.technology +./build/bin/erigon --chain=amoy --bor.heimdall=https://heimdall-api-amoy.polygon.technology --prune.mode=archive ``` ## Basic Configuration​