diff --git a/src/SUMMARY.md b/src/SUMMARY.md index 2a00542..78282ae 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -27,15 +27,15 @@ - [Quick nodes](quick_nodes.md) - [How to run an Ethereum node](nodes/ethereum.md) + - [Ethereum with an external CL](nodes/eth_extcl.md) - [How to run a Gnosis Chain node](nodes/gnosis.md) + - [Gnosis Chain with an external CL](nodes/gno_extcl.md) - [How to run a Polygon node](nodes/polygon.md) - [Advanced Usage](advanced.md) - [Configuring Erigon](advanced/configuring.md) - [Consensus Layer](advanced/consensus_layer.md) - [Caplin](advanced/caplin.md) - - [Prysm](advanced/prysm.md) - - [Lighthouse](advanced/lighthouse.md) - [JWT secret](advanced/jwt.md) - [Options](advanced/options.md) - [RPC Daemon](advanced/JSONRPC-daemon.md) diff --git a/src/advanced/consensus_layer.md b/src/advanced/consensus_layer.md index 484688e..33bc675 100644 --- a/src/advanced/consensus_layer.md +++ b/src/advanced/consensus_layer.md @@ -1,27 +1,27 @@ # Consensus Layer -The Consensus Layer is a critical component of a decentralized network, responsible for reaching agreement on the state of the network. In the context of blockchain technology, the Consensus Layer is the layer that ensures the security and integrity of the blockchain by validating transactions and blocks. +The Consensus Layer (CL) is a critical component of a decentralized network, responsible for reaching agreement on the state of the network. In the context of blockchain technology, the CL ensures the security and integrity of the blockchain by validating transactions and blocks. -Historically, an Execution Layer (EL) client alone was enough to run a full Ethereum node. However, as Ethereum has moved from proof-of-work (PoW) to proof-of-stake (PoS) based consensus with "The Merge", a Consensus Layer (CL) client needs to run alongside the EL to run a full Ethereum node, a Gnosis Chain node or a Polygon node. +Historically, an Execution Layer (EL) client alone was sufficient to run a full Ethereum node. However, as Ethereum transitioned from proof-of-work (PoW) to proof-of-stake (PoS) based consensus with "The Merge," a CL client must run alongside the EL to operate an Ethereum node, a Gnosis Chain node, or a Polygon node. -The execution client listens to new transactions, executes them in the Ethereum Virtual Machine (EVM), and holds the latest state and database of all current Ethereum data. +The execution client listens to new transactions, executes them in the Ethereum Virtual Machine (EVM), and maintains the latest state and database of all current Ethereum data. -The consensus client, also known as the *Beacon Node* or *CL client*, implements the Proof-of-Stake consensus algorithm, which enables the network to achieve agreement based on validated data from the execution client. Both clients work together to keep track of the head of the Ethereum chain and allow users to interact with the Ethereum network. +The CL client, also known as the Beacon Node, implements the Proof-of-Stake consensus algorithm. This enables the network to achieve agreement based on validated data from the execution client. Both clients work together to keep track of the head of the Ethereum chain and allow users to interact with the Ethereum network. + +Basically, without a CL client, the EL will never sync.
**Information** -By default, Erigon is configured to run with [Caplin](/advanced/caplin.md), the embedded Consensus Layer. +By default, Erigon is configured to run with [Caplin](/advanced/caplin.md), the embedded CL.
-## Choosing the Consensus Layer client - -A Consensus Layer (CL) client needs to run alongside Erigon to run a full Ethereum node, a Gnosis Chain node and a Polygon node and its respective testnets. Basically, without a CL client the EL will never get in sync. +## Choosing an external CL client -Below are the links to examples on how to configure Lighhouse and Prysm to run along with Erigon: +While Erigon runs by default with Caplin, the embedded CL, it is possible to run Erigon with any external CL. Below are some examples of how to configure Lighthouse and Prysm to run alongside Erigon: -- [Ethereum](/nodes/ethereum.md#erigon-with-prysm-as-the-external-consensus-layer) -- [Gnosis Chain](/nodes/gnosis.md#erigon-with-lighthouse) +- [Ethereum](/nodes/eth_extcl.md) +- [Gnosis Chain](/nodes/gno_extcl.md) -> **important Note**: When configuring a CL client, always refer to the official CL documentation for the most up-to-date and accurate configuration instructions. This will ensure that you set up your CL client correctly and avoid any potential issues. \ No newline at end of file +> **Important note**: When configuring a CL client, always refer to the official CL documentation for the most up-to-date and accurate configuration instructions to avoid any potential issues. diff --git a/src/advanced/eth_extcl.md b/src/advanced/eth_extcl.md new file mode 100644 index 0000000..0e374f1 --- /dev/null +++ b/src/advanced/eth_extcl.md @@ -0,0 +1 @@ +# Ethereum with an external CL diff --git a/src/advanced/gno_extcl.md b/src/advanced/gno_extcl.md new file mode 100644 index 0000000..289b78f --- /dev/null +++ b/src/advanced/gno_extcl.md @@ -0,0 +1 @@ +# Gnosis Chain with an external CL diff --git a/src/advanced/options.md b/src/advanced/options.md index a0ef80a..8e358ab 100644 --- a/src/advanced/options.md +++ b/src/advanced/options.md @@ -23,7 +23,7 @@ USAGE: erigon [command] [flags] VERSION: - 3.0.2-cd286380 + 3.0.4-406d855f COMMANDS: init Bootstrap and initialize a new genesis block @@ -33,8 +33,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/bloxster/.local/share/erigon) + --ethash.dagdir value Directory to store the ethash mining DAGs (default: /home/bloxster/.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) @@ -118,12 +118,12 @@ GLOBAL OPTIONS: --snap.state.stop Workaround to stop producing new state files, if you meet some state-related critical bug. It will stop aggregate DB history in a state files. DB will grow and may slightly slow-down - and removing this flag in future will not fix this effect (db size will not greatly reduce). (default: false) --snap.skip-state-snapshot-download Skip state download and start from genesis block (default: false) --db.pagesize value DB is splitted to 'pages' of fixed size. Can't change DB creation. Must be power of 2 and '256b <= pagesize <= 64kb'. Default: equal to OperationSystem's pageSize. Bigger pageSize causing: 1. More writes to disk during commit 2. Smaller b-tree high 3. Less fragmentation 4. Less overhead on 'free-pages list' maintainance (a bit faster Put/Commit) 5. If expecting DB-size > 8Tb then set pageSize >= 8Kb (default: "4KB") - --db.size.limit value Runtime limit of chaindata db size (can change at any time) (default: "200GB") + --db.size.limit value Runtime limit of chaindata db size (can change at any time) (default: "1TB") --db.writemap Enable WRITE_MAP feature for fast database writes and fast commit times (default: true) --torrent.port value Port to listen and serve BitTorrent protocol (default: 42069) --torrent.maxpeers value Unused parameter (reserved for future use) (default: 100) --torrent.conns.perfile value Number of connections per file (default: 10) - --torrent.download.slots value Amount of files to download in parallel. (default: 128) + --torrent.download.slots value Amount of files to download in parallel. (default: 32) --torrent.staticpeers value Comma separated host:port to connect to --torrent.upload.rate value Bytes per second, example: 32mb (default: "4mb") --torrent.download.rate value Bytes per second, example: 32mb (default: "128mb") @@ -154,7 +154,8 @@ 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) + --experiment.persist.receipts value Set > 0 to store receipts in chaindata db (only on chain-tip) - RPC for recent receit/logs will be faster. Values: 1_000 good starting point. 10_000 receitps it's ~1Gb (not much IO increase). Please test before go over 100_000 (default: 0) + --experiment.persist.receipts.v2 To store receipts in chaindata db (only on chain-tip) - RPC for recent receit/logs will be faster. Values: 1_000 good starting point. 10_000 receitps it's ~1Gb (not much IO increase). Please test before go over 100_000 (default: false) --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) @@ -190,6 +191,7 @@ GLOBAL OPTIONS: --bor.waypoints Enabling bor waypont recording (default: false) --polygon.sync Enabling syncing using the new polygon sync component (default: true) --polygon.sync.stage Enabling syncing with a stage that uses the polygon sync component (default: false) + --polygon.logindex Workaround for incorrect logIndex in RPC (default: false) --ethstats value Reporting URL of a ethstats service (nodename:secret@host:port) --override.prague value Manually specify the Prague fork time, overriding the bundled setting (default: 0) --caplin.discovery.addr value Address for Caplin DISCV5 protocol (default: "0.0.0.0") @@ -198,12 +200,9 @@ 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) @@ -242,6 +241,7 @@ GLOBAL OPTIONS: --caplin.validator-monitor Enable caplin validator monitoring metrics (default: false) --caplin.custom-config value set the custom config for caplin --caplin.custom-genesis value set the custom genesis for caplin + --caplin.use-engine-api Use engine API for internal Caplin. useful for testing and if CL network is degraded (default: false) --trusted-setup-file value Absolute path to trusted_setup.json file --rpc.slow value Print in logs RPC requests slower than given threshold: 100ms, 1s, 1m. Exluded methods: eth_getBlock,eth_getBlockByNumber,eth_getBlockByHash,eth_blockNumber,erigon_blockNumber,erigon_getHeaderByNumber,erigon_getHeaderByHash,erigon_getBlockByTimestamp,eth_call (default: 0s) --txpool.gossip.disable Disabling p2p gossip of txs. Any txs received by p2p - will be dropped. Some networks like 'Optimism execution engine'/'Optimistic Rollup' - using it to protect against MEV attacks (default: false) @@ -262,7 +262,7 @@ GLOBAL OPTIONS: --metrics Enable metrics collection and reporting (default: false) --metrics.addr value Enable stand-alone metrics HTTP server listening interface (default: "127.0.0.1") --metrics.port value Metrics HTTP server listening port (default: 6061) - --diagnostics.disabled Disable diagnostics (default: false) + --diagnostics.disabled Disable diagnostics (default: true) --diagnostics.endpoint.addr value Diagnostics HTTP server listening interface (default: "127.0.0.1") --diagnostics.endpoint.port value Diagnostics HTTP server listening port (default: 6062) --diagnostics.speedtest Enable speed test (default: false) @@ -280,6 +280,3 @@ GLOBAL OPTIONS: --help, -h show help --version, -v print the version ``` - -``` - diff --git a/src/getting-started/sw-requirements.md b/src/getting-started/sw-requirements.md index 3915895..a14b937 100644 --- a/src/getting-started/sw-requirements.md +++ b/src/getting-started/sw-requirements.md @@ -1,18 +1,11 @@ # Software Requirements -Before we start, please note that building software from source can be complex. If you're not comfortable with technical tasks, you might want to check the [Docker](/installation/docker.md) installation. +If you plan to compile Erigon from source, ensure that the following prerequisites are met. Erigon works only from command line interface (CLI), so it is advisable to have a good confidence with basic commands. -Please ensure that the following prerequisites are met. +> Please note that building software from source can be complex. If you're not comfortable with technical tasks, we recommend you use other [installation](/installation.md) methods like pre-built images or Docker and skip these requirements. -### Build essential (only for Linux) - -Install **Build-essential** and **Cmake**: - -```bash -sudo apt install build-essential cmake -y -``` ### Git @@ -21,13 +14,21 @@ Git is a tool that helps download and manage the Erigon source code. To install [https://git-scm.com/downloads](https://git-scm.com/downloads). -### Go Programming Language +### Build essential (only for Linux) + +Install **Build-essential** and **Cmake**: + +```bash +sudo apt install build-essential cmake -y +``` + +### Go Programming Language (only for Linux and MacOS) -Erigon utilizes Go (also known as Golang) version 1.22 or newer for part of its development. It is recommended to have a fresh Go installation. If you have an older version, consider deleting the /usr/local/go folder (you may need to use sudo) and re-extract the new version in its place. +Erigon utilizes Go (also known as Golang) version 1.23 or newer for part of its development. It is recommended to have a fresh Go installation. If you have an older version, consider deleting the /usr/local/go folder (you may need to use sudo) and re-extract the new version in its place. To install the latest Go version, visit the official documentation at [https://golang.org/doc/install](https://golang.org/doc/install). -### C++ Compiler +### C++ Compiler (only for Linux and MacOS) This turns the C++ part of Erigon's code into a program your computer can run. You can use either **Clang** or **GCC**: diff --git a/src/installation.md b/src/installation.md index ffb3725..cdb93b8 100644 --- a/src/installation.md +++ b/src/installation.md @@ -1,6 +1,6 @@ # Installation -In order to use Erigon, the software has to be installed first. There are several ways to install Erigon, depending on the operating system and the user's choice of installation method, e.g. using a package manager, container or building from source. +In order to use Erigon, the software has to be installed first. There are several ways to install Erigon, depending on the operating system and the user's choice of installation method, e.g. using a pre-built image, container or building from source. > Always check the [list of releases](https://github.com/erigontech/erigon/releases) for release notes. diff --git a/src/nodes/eth_extcl.md b/src/nodes/eth_extcl.md new file mode 100644 index 0000000..73e585c --- /dev/null +++ b/src/nodes/eth_extcl.md @@ -0,0 +1,60 @@ +# Ethereum with an external CL + +Alternatively, you can run an Ethereum node with an external Consensus Layer (CL). + +Both [Prysm](#erigon-with-prysm-as-the-external-cl) and [Lighthouse](#erigon-with-lighthouse-as-the-external-cl), or any other Consensus Layer client can be used alongside Erigon by adding the `--externalcl` flag. This allows you to access the Ethereum blockchain directly and manage your keys to stake your ETH and produce blocks. + + +## Erigon with Prysm as the external CL + +1. Start Erigon with the `--externalcl` flag: + + ```bash + erigon --externalcl + ``` + + If your Consensus Layer (CL) client is on a different device, add the following flags: + - `--authrpc.addr 0.0.0.0`, since the Engine API listens on localhost by default; + - `--authrpc.vhosts ` where is the source host or the appropriate hostname that your CL client is using. + +2. Install and run **Prysm** by following the official guide: . + + Prysm must fully synchronize before Erigon can start syncing, since Erigon requires an existing target head to sync to. The quickest way to get Prysm synced is to use a public checkpoint synchronization endpoint from the list at . + +3. To communicate with Erigon, the `--execution-endpoint` must be specified as `:8551`, where `` is either `http://localhost` or the IP address of the device running Erigon. + +4. Prysm must point to the [JWT secret](/advanced/jwt.md) automatically created by Erigon in the `--datadir` directory. + + ```bash + ./prysm.sh beacon-chain \ + --execution-endpoint http://localhost:8551 \ + --mainnet --jwt-secret=/jwt.hex \ + --checkpoint-sync-url=https://beaconstate.info \ + --genesis-beacon-api-url=https://beaconstate.info + ``` + + +## Erigon with Lighthouse as the external CL + +1. Start Erigon: + + ```bash + ./build/bin/erigon --externalcl + ``` + +2. Install and run Lighthouse by following the official guide: + +3. Because Erigon needs a target head in order to sync, Lighthouse must be synced before Erigon can synchronize. The fastest way to synchronize Lighthouse is to use one of the many public checkpoint synchronization endpoints at . + +4. To communicate with Erigon, the `--execution-endpoint` must be specified as `:8551`, where `` is either `http://localhost` or the IP address of the device running Erigon. + +5. Lighthouse must point to the [JWT secret](/advanced/jwt.md) automatically created by Erigon in the `--datadir` directory. + + ```bash + lighthouse bn \ + --network mainnet \ + --execution-endpoint http://localhost:8551 \ + --execution-jwt /jwt.hex \ + --checkpoint-sync-url https://mainnet.checkpoint.sigp.io \ + ``` + diff --git a/src/nodes/ethereum.md b/src/nodes/ethereum.md index 9ab342f..22fb036 100644 --- a/src/nodes/ethereum.md +++ b/src/nodes/ethereum.md @@ -1,109 +1,49 @@ # How to run an Ethereum node -Follow the [hardware](/getting-started/hw-requirements.md) and [software](/getting-started/sw-requirements.md) prerequisites. +## Prerequisites -Check which [type of node](/basic/node.md) you might want to run and the [disk space](/basic/disk-space.md) required. +- Check the [hardware](/getting-started/hw-requirements.md) prerequisites; +- Check which [type of node](/basic/node.md) you want to run and the [disk space](/basic/disk-space.md) required. -
- -**Information** - -**Do not use HDD**: Hard Disk Drives (HDD) are not recommended for running Erigon, as it may cause the node to stay N blocks behind the chain tip and lead to performance issues. +## Install Erigon​ -**Use SSD or NVMe**: Solid State Drives (SSD) or Non-Volatile Memory Express (NVMe) drives are recommended for optimal performance. These storage devices provide faster read/write speeds and can handle the demanding requirements of an Erigon node. -
+To set up Erigon quickly, we recommend the following: +- For Linux and MacOS users, use our [pre-built binaries](/installation/prebuilt.md); +- For Windows users, [build executable binaries natively](/installation/build_exec_win.md). -## Install Erigon​ +# Start Erigon​ -For MacOS and Linux, run the following commands to build from source the latest Erigon version: +To execute a Ethereum full node using pre-compiled binaries, use the following basic command: ```bash -git clone --branch release/3.0 --single-branch https://github.com/erigontech/erigon.git -cd erigon -make erigon +erigon ``` -This should create the binary at ./build/bin/erigon - -
- -**Information** - -If you are using [Windows](/installation/windows.md) follow the dedicated installation guide or use [Docker](/installation/docker.md). - -
- - -## Start Erigon​ - -If you want to be able to send transactions with your wallet and access the Ethereum network directly, contribute to the network decentralization it is advised to run [Erigon with Caplin](#erigon-with-caplin), the internal Consensus Layer (CL). - -Alternatively you can also run [Prysm](#erigon-with-prysm-as-the-external-consensus-layer), [Lighthouse](#erigon-with-lighthouse-as-the-external-consensus-layer) or any other Consensus Layer client alongside with Erigon by adding the `--externalcl` flag. This will also allow you to access the Ethereum blockchain directly and give you the possibility to stake your ETH and do block production. - -### Erigon with Caplin - -The basic command to run Erigon with Caplin on Ethereum mainnet is: +## Example of basic configuration​ +The command above allows you to run your local Erigon node on the Ethereum mainnet with Caplin, the embedded Consesus Layer. Additionally, you can include several options, as shown in the following example: ```bash -./build/bin/erigon +erigon \ +--datadir= \ +--prune.mode=minimal \ +--http.addr="0.0.0.0" \ +--http.api=eth,web3,net,debug,trace,txpool \ +--torrent.download.rate=512mb ``` -### Erigon with Prysm as the external consensus layer - -1. Start Erigon with the `--externalcl` flag: - - ```bash - ./build/bin/erigon --externalcl - ``` +### Flags explanation -2. Install and run **Prysm** by following the official guide: . - - Prysm must fully synchronize before Erigon can start syncing, since Erigon requires an existing target head to sync to. The quickest way to get Prysm synced is to use a public checkpoint synchronization endpoint from the list at . - -3. To communicate with Erigon, the **execution endpoint** must be specified as :8551, where is either `//localhost` or the IP address of the device running Erigon. - -4. Prysm must point to the **[JWT secret](/advanced/jwt.md)** automatically created by Erigon in the datadir directory. In the following example the default data directory is used. - - ```bash - ./prysm.sh beacon-chain --execution-endpoint=http://localhost:8551 --mainnet --jwt-secret=/home/usr/.local/share/erigon/jwt.hex --checkpoint-sync-url=https://beaconstate.info --genesis-beacon-api-url=https://beaconstate.info - ``` - - If your Prysm is on a different device, add `--authrpc.addr 0.0.0.0` (Engine API listens on localhost by default) as well as `--authrpc.vhosts ` to your Prysm configuration. - -### Erigon with Lighthouse as the external consensus layer - -1. Start Erigon: - - ```bash - ./build/bin/erigon --externalcl - ``` - -2. Install and run Lighthouse by following the official guide: - -3. Because Erigon needs a target head in order to sync, Lighthouse must be synced before Erigon may synchronize. The fastest way to synchronize Lighthouse is to use one of the many public checkpoint synchronization endpoints at . - -4. To communicate with Erigon, the **execution endpoint** must be specified as :8551, where is either `//localhost` or the IP address of the device running Erigon. +- `--datadir=` to store Erigon files in a non-default location. Default data directory is `./home/user/.local/share/erigon`. +- Erigon is full node by default, use `--prune.mode=archive` to run a archive node or `--prune.mode=minimal` (EIP-4444). If you want to change [type of node](/basic/node.md) delete the `--datadir` folder content and restart Erigon with the appropriate flags. +- `--http.addr="0.0.0.0" --http.api=eth,web3,net,debug,trace,txpool` to use RPC and e.g. be able to connect your [wallet](/basic/wallet.md). +- `--torrent.download.rate=512mb` to increase download speed. While the default downloading speed is 128mb, with this flag Erigon will use as much download speed as it can, up to a maximum of 512 megabytes per second. This means it will try to download data as quickly as possible, but it won't exceed the 512 MB/s limit you've set. +- Default chain is `--chain=mainnet` for Ethereum mainnet. Use the flag `--chain=holesky` for Holesky testnet, `--chain=sepolia` for Sepolia testnet or `--chain=hoodi` for Hoodi testnet. -5. Lighthouse must point to the **[JWT secret](/advanced/jwt.md)** automatically created by Erigon in the datadir director. In the following example the default data directory is used. +To stop your Erigon node you can use the `CTRL+C` command. - ```bash - lighthouse bn \ - --network mainnet \ - --execution-endpoint http://localhost:8551 \ - --execution-jwt /home/admin/.local/share/erigon/jwt.hex \ - --checkpoint-sync-url https://mainnet.checkpoint.sigp.io \ - ``` +When you get familiar with running Erigon from CLI you may also consider [staking](/staking.md) and/or run a [Ethereum node with an external Consensus Layer](/nodes/eth_extcl.md). +Additional flags can be added to [configure](/advanced/configuring.md) Erigon with several [options](/advanced/options.md). -## Basic Configuration​ -- If you want to store Erigon files in a non-default location, add flag `--datadir=`. Default data directory is `/home/usr/.local/share/erigon`. -- Erigon is full node by default, use `--prune.mode=archive` to run a archive node or `--prune.mode=minimal` (EIP-4444). If you want to change [type of node](/basic/node.md) delete the `--datadir` folder content and restart Erigon with the appropriate flags. -- Default chain is `--chain=mainnet` for Ethereum mainnet: - - add the flag `--chain=holesky` for Holesky testnet; - - `--chain=sepolia` for Sepolia testnet. -- `--http.addr="0.0.0.0" --http.api=eth,web3,net,debug,trace,txpool` to use RPC and e.g. be able to connect your [wallet](/basic/wallet.md). -- To increase download speed add `--torrent.download.rate=512mb` (default is 16mb) -- To stop the Erigon node you can use the `CTRL+C` command. -Additional flags can be added to [configure](/advanced/configuring.md) Erigon with several options. \ No newline at end of file diff --git a/src/nodes/gno_extcl.md b/src/nodes/gno_extcl.md new file mode 100644 index 0000000..f6786fa --- /dev/null +++ b/src/nodes/gno_extcl.md @@ -0,0 +1,50 @@ +# Gnosis Chain with an external CL + +Alternatively, you can also run a Ethereum node as an Execution Layer (EL) and couple it with an external Consensus Layer (CL). Here is an example of configuration with Lighthouse. + +1. Start Erigon: + + ```bash + erigon --chain=gnosis --externalcl + ``` + + If your CL client is on a different device, add the following flags: + - `--authrpc.addr 0.0.0.0`, since the Engine API listens on localhost by default; + - `--authrpc.vhosts ` where `` is the source host or the appropriate hostname that your CL client is using. + + + +2. - Install Lighthouse, following instructions at . + - Compile with a feature flag to enable Gnosis Chain: + ```bash + env FEATURES=gnosis make + ``` + + +3. Because Erigon needs a target head in order to sync, Lighthouse must be synced before Erigon can synchronize. The fastest way to synchronize Lighthouse is to use one of the many public checkpoint synchronization endpoints, for example: + + - `https://checkpoint.gnosischain.com` for Gnosis Chain; + - `https://checkpoint.chiadochain.net` for Chiado testnet. + + +4. To communicate with Erigon, the execution endpoint must be specified as `:8551`, where `` is either `http://localhost` or the IP address of the device running Erigon. + +5. Lighthouse must point to the [JWT secret](/advanced/jwt.md) automatically created by Erigon in the `--datadir` directory. In the following example the default data directory is used. + + lighthouse \ + --network gnosis beacon_node \ + --datadir=data \ + --http \ + --execution-endpoint http://localhost:8551 \ + --execution-jwt /home/user/.local/share/erigon/jwt.hex \ + --checkpoint-sync-url "https://checkpoint.gnosischain.com" + + Here is an example of Lighthouse running the Chiado testnet: + + lighthouse \ + --network chiado \ + --datadir=data \ + --http \ + --execution-endpoint http://localhost:8551 \ + --execution-jwt /home/user/.local/share/erigon/jwt.hex \ + --checkpoint-sync-url "https://checkpoint.chiadochain.net" diff --git a/src/nodes/gnosis.md b/src/nodes/gnosis.md index d3e880a..d0a1dfc 100644 --- a/src/nodes/gnosis.md +++ b/src/nodes/gnosis.md @@ -1,110 +1,48 @@ # How to run a Gnosis Chain node -Follow the [hardware](/getting-started/hw-requirements.md) and [software](/getting-started/sw-requirements.md) prerequisites. +## Prerequisites -Check which [type of node](/basic/node.md) you might want to run and the [disk space](/basic/disk-space.md) required. +- Check the [hardware](/getting-started/hw-requirements.md) prerequisites; +- Check which [type of node](/basic/node.md) you want to run and the [disk space](/basic/disk-space.md) required. -
- -**Information** - -**Do not use HDD**: Hard Disk Drives (HDD) are not recommended for running Erigon, as it may cause the node to stay N blocks behind the chain tip and lead to performance issues. +## Install Erigon​ -**Use SSD or NVMe**: Solid State Drives (SSD) or Non-Volatile Memory Express (NVMe) drives are recommended for optimal performance. These storage devices provide faster read/write speeds and can handle the demanding requirements of an Erigon node. -
+To set up Erigon quickly, we recommend the following: +- For Linux and MacOS users, use our [pre-built binaries](/installation/prebuilt.md); +- For Windows users, [build executable binaries natively](/installation/build_exec_win.md). -## Install Erigon​ +# Start Erigon​ -For MacOS and Linux, run the following commands to build from source the latest Erigon version: +To execute a Gnosis Chain full node using pre-compiled binaries, use the following basic command: ```bash -git clone --branch release/3.0 --single-branch https://github.com/erigontech/erigon.git -cd erigon -make erigon +erigon --chain=gnosis ``` -This should create the binary at ./build/bin/erigon - -
- -**Information** - -If you are using [Windows](/installation/windows.md) follow the dedicated installation guide or use [Docker](/installation/docker.md). - -
+## Example of basic configuration​ - -## Start Erigon​ - -If you want to be able to send transactions with your wallet and access the Gnosis Chain network directly, contribute to the network decentralization it is advised to run Erigon with [Caplin](/advanced/caplin.md), the internal Consensus Layer (CL). - -Alternatively you can also run Prysm, Lighthouse or any other Consensus Layer client alongside with Erigon by adding the `--externalcl` flag. This will also allow you to access the Ethereum blockchain directly and give you the possibility to stake your ETH and do block production. - -### Erigon with Caplin - -The basic command to run Erigon with Caplin on Gnosis Chain is: +The command above allows you to run your local Erigon node on the Gnosis Chain. Additionally, you can include several options, as shown in the following example: ```bash -./build/bin/erigon --chain=gnosis +erigon \ +--chain=gnosis \ +--datadir= \ +--prune.mode=minimal \ +--http.addr="0.0.0.0" \ +--http.api=eth,web3,net,debug,trace,txpool \ +--torrent.download.rate=512mb ``` -### Erigon with Lighthouse - -1. Start Erigon: - - ```bash - ./build/bin/erigon --chain=gnosis --externalcl - ``` +### Flags explanation -2. Install Lighthouse, another popular client that can be used with Erigon for block building. Follow the instructions until the chapter **Build Lighthouse**, skipping the `make` instruction.: - -3. Now compile Lighthouse in order to run Gnosis Chain using the feature flags : - - ```bash - cd lighthouse - env FEATURES=gnosis make - ``` - -4. Because Erigon needs a target head in order to sync, Lighthouse must be synced before Erigon may synchronize. The fastest way to synchronize Lighthouse is to use one of the many public checkpoint synchronization endpoints: - - `https://checkpoint.gnosischain.com` for Gnosis Chain - - `https://checkpoint.chiadochain.net` for Chiado Testnet - - -5. To communicate with Erigon, the **execution endpoint** must be specified as :8551, where is either `//localhost` or the IP address of the device running Erigon. - -6. Lighthouse must point to the **[JWT secret](/advanced/jwt.md)** automatically created by Erigon in the datadir director. In the following example the default data directory is used. - -Below is an example of Lighthouse running **Gnosis Chain**: - - ```bash - lighthouse \ - --network gnosis beacon_node \ - --datadir=data \ - --http \ - --execution-endpoint http://localhost:8551 \ - --execution-jwt /home/usr/.local/share/erigon/jwt.hex \ - --checkpoint-sync-url "https://checkpoint.gnosischain.com" - ``` - -And an example of Lighthouse running Chiado testnet: - - ```bash - lighthouse \ - --network chiado \ - --datadir=data \ - --http \ - --execution-endpoint http://localhost:8551 \ - --execution-jwt /home/usr/.local/share/erigon/jwt.hex \ - --checkpoint-sync-url "https://checkpoint.chiadochain.net" - ``` - -## Basic Configuration​ - -- If you want to store Erigon files in a non-default location, add flag `--datadir=`. Default data directory is `/home/usr/.local/share/erigon`. +- `--chain=gnosis` specifies the Gnosis Chain network, use `--chain=chiado` for Chiado testnet. +- `--datadir=` to store Erigon files in a non-default location. Default data directory is `./home/user/.local/share/erigon`. - Erigon is full node by default, use `--prune.mode=archive` to run a archive node or `--prune.mode=minimal` (EIP-4444). If you want to change [type of node](/basic/node.md) delete the `--datadir` folder content and restart Erigon with the appropriate flags. -- Add the flag `--chain=chiado` for Chiado testnet. - `--http.addr="0.0.0.0" --http.api=eth,web3,net,debug,trace,txpool` to use RPC and e.g. be able to connect your [wallet](/basic/wallet.md). -- To increase download speed add `--torrent.download.rate=512mb` (default is 16mb) -- To stop the Erigon node you can use the `CTRL+C` command. +- `--torrent.download.rate=512mb` to increase download speed. While the default downloading speed is 128mb, with this flag Erigon will use as much download speed as it can, up to a maximum of 512 megabytes per second. This means it will try to download data as quickly as possible, but it won't exceed the 512 MB/s limit you've set. + +To stop your Erigon node you can use the `CTRL+C` command. + +When you get familiar with running Erigon from CLI you may also consider [staking](/staking.md) and/or run a [Gnosis chain node with an external Consensus Layer](/nodes/gno_extcl.md). -Additional flags can be added to [configure](/advanced/configuring.md) Erigon with several options. \ No newline at end of file +Additional flags can be added to [configure](/advanced/configuring.md) Erigon with several [options](/advanced/options.md). \ No newline at end of file diff --git a/src/nodes/polygon.md b/src/nodes/polygon.md index 0e94d44..677ec50 100644 --- a/src/nodes/polygon.md +++ b/src/nodes/polygon.md @@ -1,58 +1,48 @@ # How to run a Polygon node -Follow the [hardware](/getting-started/hw-requirements.md) and [software](/getting-started/sw-requirements.md) prerequisites. +## Prerequisites -Check which [type of node](/basic/node.md) you might want to run and the [disk space](/basic/disk-space.md) required. - -
- -**Information** - -**Do not use HDD**: Hard Disk Drives (HDD) are not recommended for running Erigon, as it may cause the node to stay N blocks behind the chain tip and lead to performance issues. - -**Use SSD or NVMe**: Solid State Drives (SSD) or Non-Volatile Memory Express (NVMe) drives are recommended for optimal performance. These storage devices provide faster read/write speeds and can handle the demanding requirements of an Erigon node. -
+- Check the [hardware](/getting-started/hw-requirements.md) prerequisites; +- Check which [type of node](/basic/node.md) you want to run and the [disk space](/basic/disk-space.md) required. ## Install Erigon​ -For MacOS and Linux, run the following commands to build from source the latest Erigon version: - -```bash -git clone --branch release/3.0 --single-branch https://github.com/erigontech/erigon.git -cd erigon -make erigon -``` - -This should create the binary at ./build/bin/erigon - -
- -**Information** - -If you are using [Windows](/installation/windows.md) follow the dedicated installation guide or use [Docker](/installation/docker.md). - -
+To set up Erigon quickly, we recommend the following: +- For Linux and MacOS users, use our [pre-built binaries](/installation/prebuilt.md); +- For Windows users, [build executable binaries natively](/installation/build_exec_win.md). # Start Erigon -To start a Erigon full node for **Polygon mainnet** with remote Heimdall: +To execute an Erigon full node on the Polygon mainnet with remote Heimdall using pre-compiled binaries, use the following basic command: ```bash -./build/bin/erigon --chain=bor-mainnet --bor.heimdall=https://heimdall-api.polygon.technology +erigon --chain=bor-mainnet --bor.heimdall=https://heimdall-api.polygon.technology ``` -For a **Amoy testnet** archive node with remote Heimdall: +## Example of basic configuration​ + +The command above allows you to run your local Erigon node on the Polygon mainnet. Additionally, you can include several options, as shown in the following example: ```bash -./build/bin/erigon --chain=amoy --bor.heimdall=https://heimdall-api-amoy.polygon.technology --prune.mode=archive +erigon \ +--chain=bor-mainnet \ +--bor.heimdall=https://heimdall-api.polygon.technology \ +--datadir= \ +--prune.mode=minimal \ +--http.addr="0.0.0.0" \ +--http.api=eth,web3,net,debug,trace,txpool \ +--torrent.download.rate=512mb ``` -## Basic Configuration​ +### Flags explanation -- If you want to store Erigon files in a non-default location, add flag `--datadir=`. Default data directory is `/home/usr/.local/share/erigon`. +- `--chain=bor-mainnet` and `--bor.heimdall=https://heimdall-api.polygon.technologyspecifies` specify respctevely the Polygon mainnet and the API endpoint for the Heimdall network; to use Amoy tesnet replace with flags `--chain=amoy --bor.heimdall=https://heimdall-api-amoy.polygon.technology`. +- `--datadir=` to store Erigon files in a non-default location. Default data directory is `./home/user/.local/share/erigon`. - Erigon is full node by default, use `--prune.mode=archive` to run a archive node or `--prune.mode=minimal` (EIP-4444). If you want to change [type of node](/basic/node.md) delete the `--datadir` folder content and restart Erigon with the appropriate flags. - `--http.addr="0.0.0.0" --http.api=eth,web3,net,debug,trace,txpool` to use RPC and e.g. be able to connect your [wallet](/basic/wallet.md). -- To increase download speed add `--torrent.download.rate=512mb` (default is 16mb) -- To stop the Erigon node you can use the `CTRL+C` command. +- `--torrent.download.rate=512mb` to increase download speed. While the default downloading speed is 128mb, with this flag Erigon will use as much download speed as it can, up to a maximum of 512 megabytes per second. This means it will try to download data as quickly as possible, but it won't exceed the 512 MB/s limit you've set. + + +To stop your Erigon node you can use the `CTRL+C` command. -Additional flags can be added to [configure](/advanced/configuring.md) Erigon with several options. +Several other [configurations](/advanced/configuring.md) and [options](/advanced/options.md) are available. \ No newline at end of file diff --git a/src/quick_nodes.md b/src/quick_nodes.md index 4abb4e4..d20c78b 100644 --- a/src/quick_nodes.md +++ b/src/quick_nodes.md @@ -1,6 +1,6 @@ # Quick nodes -These guides are recommended if you want to test Erigon and have your node up and running without reading all the documentation. +These guides are recommended if you want to test Erigon and have your node up and running in minutes without reading all the documentation. - [Ethereum node](nodes/ethereum.md) - [Gnosis Chain node](nodes/gnosis.md)