diff --git a/src/SUMMARY.md b/src/SUMMARY.md index 061a879..c8b0e0f 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -13,7 +13,7 @@ - [Docker](./installation/docker.md) - [Upgrading from a previous version](./installation/upgrading-md) -- [Basic Usage](./usage.md) +- [Basic Usage](./basic-usage.md) - [Type of Node](./basic/node.md) - [Disk Space Required](./basic/disk-space.md) - [Optimizing Storage](./basic/optimizing-storage.md) diff --git a/src/basic-usage.md b/src/basic-usage.md new file mode 100644 index 0000000..00214e2 --- /dev/null +++ b/src/basic-usage.md @@ -0,0 +1,98 @@ +# Basic Usage + +# All-in-One Client + +The all-in-one client is the preferred option for most users: + +```bash +./build/bin/erigon +``` + +This CLI command allows you to run an Ethereum archive node where every process is integrated and no special configuration is needed. + +The default Consensus Layer utilized is [Caplin](./advanced/caplin.md), the Erigon flagship embedded CL. + +# Basic Configuration​ + +* Default data directory is `/home/admin/.local/share/erigon`. If you want to store Erigon files in a non-default location, add flag: +```bash +--datadir= +``` + +* Based on the [type of node](basic/node.md) you want to run you can add ```--prune.mode=full``` to run a full node or ```--prune.mode=minimal``` to run a minimal node. +The default node is archive node. + +* ```--chain=mainnet```, add the flag --chain=goerli for Goerli testnet, --chain=sepolia for Sepolia testnet or --chain=holesky for Holesky 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 the node with several [options](/advanced/options.md). + + +# Testnets + +If you would like to give Erigon a try, but do not have spare 2TB on your drive, a good option is to start syncing one of the public [testnets](basic/networks.md#testnets), Holesky, adding the option `--chain=holesky` and using the default Consensus Layer, Caplin. You can also had the flag `--prune.mode=minimal` to have a node that is syncing fast while taking not so much disk space: + +```bash +./build/bin/erigon --chain=holesky --prune.mode=minimal +``` + +# Help + +To learn about the available commands, open your terminal in your Erigon 3 installation directory and run: + +```bash +make help +``` + +This command will display a list of convenience commands available in the Makefile, along with their descriptions. + + +``` + go-version: print and verify go version + validate_docker_build_args: ensure docker build args are valid + docker: validate, update submodules and build with docker + setup_xdg_data_home: TODO + docker-compose: validate build args, setup xdg data home, and run docker-compose up + dbg debug build allows see C stack traces, run it with GOTRACEBACK=crash. You don't need debug build for C pit for profiling. To profile C code use SETCGOTRCKEBACK=1 + erigon: build erigon + all: run erigon with all commands + db-tools: build db tools + test: run unit tests with a 100s timeout + test-integration: run integration tests with a 30m timeout + lint-deps: install lint dependencies + lintci: run golangci-lint linters + lint: run all linters + clean: cleans the go cache, build dir, libmdbx db dir + devtools: installs dev tools (and checks for npm installation etc.) + mocks: generate test mocks + mocks-clean: cleans all generated test mocks + solc: generate all solidity contracts + abigen: generate abis using abigen + gencodec: generate marshalling code using gencodec + graphql: generate graphql code + gen: generate all auto-generated code in the codebase + bindings: generate test contracts and core contracts + prometheus: run prometheus and grafana with docker-compose + escape: run escape path={path} to check for memory leaks e.g. run escape path=cmd/erigon + git-submodules: update git submodules + install: copies binaries and libraries to DIST + user_linux: create "erigon" user (Linux) + user_macos: create "erigon" user (MacOS) + hive: run hive test suite locally using docker e.g. OUTPUT_DIR=~/results/hive SIM=ethereum/engine make hive + automated-tests run automated tests (BUILD_ERIGON=0 to prevent erigon build with local image tag) + help: print commands help + +``` + +For example, from your Erigon 3 installation directory, run: + +```bash +make clean +``` + +This will execute the clean target in the Makefile, which cleans the ```go cache```, ```build``` directory, and ```libmdbx``` db directory. \ No newline at end of file diff --git a/src/basic/disk-space.md b/src/basic/disk-space.md index 39461d7..020ea93 100644 --- a/src/basic/disk-space.md +++ b/src/basic/disk-space.md @@ -17,7 +17,6 @@ | Holesky | 170 GB | 110 GB | 53 GB | | Sepolia | ... GB | ... GB | ... GB | | Chiado | ... GB | ... GB | ... GB | -| Mumbai | ... GB | ... GB | ... GB | | Amoy | ... GB | ... GB | ... GB | diff --git a/src/basic/optimizing-storage.md b/src/basic/optimizing-storage.md index 0448f3d..6dd1c84 100644 --- a/src/basic/optimizing-storage.md +++ b/src/basic/optimizing-storage.md @@ -5,7 +5,7 @@ For optimal performance, it's recommended to store the datadir on a fast NVMe-RA ## Step 1: Store datadir on the slow disk -Place the datadir on the slower disk. Then, create symbolic links (using `ln -s`) to the **fast disk** for the following sub-folders: +Place the `datadir` on the slower disk. Then, create symbolic links (using `ln -s`) to the **fast disk** for the following sub-folders: - chaindata - domain diff --git a/src/basic/ports.md b/src/basic/ports.md index d2bc10a..61938df 100644 --- a/src/basic/ports.md +++ b/src/basic/ports.md @@ -40,22 +40,24 @@ Other ports Hetzner firewall rules ---------------------- -* `0.0.0.0/8`: "This" Network (RFC 1122, Section 3.2.1.3) -* `10.0.0.0/8`: Private-Use Networks (RFC 1918) -* `100.64.0.0/10`: Carrier-Grade NAT (CGN) (RFC 6598, Section 7) -* `127.16.0.0/12`: Private-Use Networks (RFC 1918) -* `169.254.0.0/16`: Link Local (RFC 3927) -* `172.16.0.0/12`: Private-Use Networks (RFC 1918) -* `192.0.0.0/24`: IETF Protocol Assignments (RFC 5736) -* `192.0.2.0/24`: TEST-NET-1 (RFC 5737) -* `192.88.99.0/24`: 6to4 Relay Anycast (RFC 3068) -* `192.168.0.0/16`: Private-Use Networks (RFC 1918) -* `198.18.0.0/15`: Network Interconnect Device Benchmark Testing (RFC 2544) -* `198.51.100.0/24`: TEST-NET-2 (RFC 5737) -* `203.0.113.0/24`: TEST-NET-3 (RFC 5737) -* `224.0.0.0/4`: Multicast (RFC 3171) -* `240.0.0.0/4`: Reserved for Future Use (RFC 1112, Section 4) -* `255.255.255.255/32`: Limited Broadcast (RFC 919, Section 7) -* `255.255.255.255/32`: RFC 922, Section 7 +| IP Range | Description | +| ------------------------------| -------------------------------------------------------------------------------------------------------------| +| 0.0.0.0/8 | "This" Network (RFC 1122, Section 3.2.1.3) | +| 10.0.0.0/8 | Private-Use Networks (RFC 1918) | +| 100.64.0.0/10 | Carrier-Grade NAT (CGN) (RFC 6598, Section 7) | +| 127.16.0.0/12 | Private-Use Networks (RFC 1918) | +| 169.254.0.0/16 | Link Local (RFC 3927) | +| 172.16.0.0/12 | Private-Use Networks (RFC 1918) | +| 192.0.0.0/24 | IETF Protocol Assignments (RFC 5736) | +| 192.0.2.0/24 | TEST-NET-1 (RFC 5737) | +| 192.88.99.0/24 | 6to4 Relay Anycast (RFC 3068) | +| 192.168.0.0/16 | Private-Use Networks (RFC 1918) | +| 198.18.0.0/15 | Network Interconnect Device Benchmark Testing (RFC 2544) | +| 198.51.100.0/24 | TEST-NET-2 (RFC 5737) | +| 203.0.113.0/24 | TEST-NET-3 (RFC 5737) | +| 224.0.0.0/4 | Multicast (RFC 3171) | +| 240.0.0.0/4 | Reserved for Future Use (RFC 1112, Section 4) | +| 255.255.255.255/32 | Limited Broadcast (RFC 919, Section 7) | +| 255.255.255.255/32 | RFC 922, Section 7 | Same in [IpTables](https://ethereum.stackexchange.com/questions/6386/how-to-prevent-being-blacklisted-for-running-an-ethereum-client/13068#13068) syntax. \ No newline at end of file diff --git a/src/usage.md b/src/usage.md index 3d2a8f3..e2a86b0 100644 --- a/src/usage.md +++ b/src/usage.md @@ -1,100 +1 @@ -# Usage - -# All-in-One Client - -The all-in-one client is the preferred option for most users: - -```bash -./build/bin/erigon -``` - -This CLI command allows you to run an Ethereum archive node where every process is integrated and no special configuration is needed. - -The default Consensus Layer utilized is [Caplin](.caplin.md), the Erigon flagship embedded CL. - -# Basic Configuration​ - -If you want to store Erigon files in a non-default location, add flag -```bash ---datadir= -``` - -Default data directory is /home/admin/.local/share/erigon. - -* Based on the [type of node](/node.md) you want to run you can add ```--prune.mode=full``` to run a full node or ```--prune.mode=minimal``` to run a minimal node. -The default node is archive node. - -* ```--chain=mainnet```, add the flag --chain=goerli for Goerli testnet, --chain=sepolia for Sepolia testnet or --chain=holesky for Holesky 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](/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 the node with several [options](/advanced/options.md). - - -# Testnets - -If you would like to give Erigon a try, but do not have spare 2TB on your drive, a good option is to start syncing one of the public [testnets](/networks.md), Holesky, adding the option `--chain=holesky` and using the default Consensus Layer, Caplin. You can also had the flag `--prune.mode=minimal` to have a node that is syncing fast while taking not so much disk space: - -```bash -./build/bin/erigon --chain=holesky --prune.mode=minimal -``` - -# Help - -To learn about the available commands, open your terminal in your Erigon 3 installation directory and run: - -```bash -make help -``` - -This command will display a list of convenience commands available in the Makefile, along with their descriptions. - - -``` - go-version: print and verify go version - validate_docker_build_args: ensure docker build args are valid - docker: validate, update submodules and build with docker - setup_xdg_data_home: TODO - docker-compose: validate build args, setup xdg data home, and run docker-compose up - dbg debug build allows see C stack traces, run it with GOTRACEBACK=crash. You don't need debug build for C pit for profiling. To profile C code use SETCGOTRCKEBACK=1 - erigon: build erigon - all: run erigon with all commands - db-tools: build db tools - test: run unit tests with a 100s timeout - test-integration: run integration tests with a 30m timeout - lint-deps: install lint dependencies - lintci: run golangci-lint linters - lint: run all linters - clean: cleans the go cache, build dir, libmdbx db dir - devtools: installs dev tools (and checks for npm installation etc.) - mocks: generate test mocks - mocks-clean: cleans all generated test mocks - solc: generate all solidity contracts - abigen: generate abis using abigen - gencodec: generate marshalling code using gencodec - graphql: generate graphql code - gen: generate all auto-generated code in the codebase - bindings: generate test contracts and core contracts - prometheus: run prometheus and grafana with docker-compose - escape: run escape path={path} to check for memory leaks e.g. run escape path=cmd/erigon - git-submodules: update git submodules - install: copies binaries and libraries to DIST - user_linux: create "erigon" user (Linux) - user_macos: create "erigon" user (MacOS) - hive: run hive test suite locally using docker e.g. OUTPUT_DIR=~/results/hive SIM=ethereum/engine make hive - automated-tests run automated tests (BUILD_ERIGON=0 to prevent erigon build with local image tag) - help: print commands help - -``` - -For example, from your Erigon 3 installation directory, run: - -```bash -make clean -``` - -This will execute the clean target in the Makefile, which cleans the ```go cache```, ```build``` directory, and ```libmdbx``` db directory. \ No newline at end of file +# Basic Usage