Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
bloxster committed Oct 31, 2024
1 parent b13b3a8 commit c2197dc
Show file tree
Hide file tree
Showing 8 changed files with 194 additions and 72 deletions.
27 changes: 19 additions & 8 deletions src/advanced/block-prod.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,45 +4,56 @@ How to propose and validate blockswith Erigon

Only remote miners are supported.

To enable, add
To enable, add the flags:

```bash
--mine --miner.etherbase=...
```
or

```bash
--mine --miner.miner.sigkey=... flags
--mine --miner.miner.sigkey=...
```

Other supported options: `--miner.extradata`, `--miner.notify`, `--miner.gaslimit`, `--miner.gasprice` , `--miner.gastarget`

JSON-RPC supports methods: eth_coinbase , eth_hashrate, eth_mining, eth_getWork, eth_submitWork, eth_submitHashrate
JSON-RPC supports methods: `eth_coinbase` , `eth_hashrate`, `eth_mining`, `eth_getWork`, `eth_submitWork`, `eth_submitHashrate`

JSON-RPC supports websocket methods: newPendingTransaction
JSON-RPC supports websocket methods: `newPendingTransaction`

# Using Caplin as validator

<div class="warning">

**Information**

Only Lighthouse, Lodestar and Teku are supported as Validator Clients.

To enable block production and Caplin's beacon API when using Caplin as the Consensus Layer (CL) engine, the flag --beacon.api must be added. For example:
</div>

To enable block production and Caplin's beacon API when using Caplin as the Consensus Layer (CL) engine, the flag `--beacon.api` must be added. For example:

```bash
--beacon.api=beacon,builder,config,debug,node,validator,lighthouse
```
<div class="warning">

**Information**

Enabling the Beacon API will lead to a 6 GB higher RAM usage.
</div>


For example, if you want to run Erigon + Caplin as a validator here following is the Erigon command:
For example, if you want to run Erigon and Caplin as a validator here is an example of configuration:

```bash
./build/bin/erigon --chain=holesky --prune.mode=full --beacon.api=beacon,builder,config,debug,node,validator,lighthouse
```

While here the command for Lighthouse would look like*:
While here the command for Lighthouse* would look like:

```bash
lighthouse validator_client --network holesky --beacon-nodes http://localhost:5555
```

*For adding validators and specific command syntax, refer to the documentation of your chosen Validator Client.
**For adding validators and specific command syntax, refer to the documentation of your chosen Validator Client.*
11 changes: 7 additions & 4 deletions src/advanced/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ The `--help` flag listing is reproduced below for your convenience.

# Commands

```pre
```
NAME:
erigon - erigon
USAGE:
erigon [command] [flags]
VERSION:
3.00.0-alpha4-c0d9a2b9
3.00.0-alpha5-78f3647d
COMMANDS:
init Bootstrap and initialize a new genesis block
Expand Down Expand Up @@ -52,7 +52,7 @@ GLOBAL OPTIONS:
--txpool.commit.every value How often transactions should be committed to the storage (default: 15s)
--prune.distance value Keep state history for the latest N blocks (default: everything) (default: 0)
--prune.distance.blocks value Keep block history for the latest N blocks (default: everything) (default: 0)
--prune.mode value Choose a pruning preset to run onto. Avaiable values: "archive","full","minimal".
--prune.mode value Choose a pruning preset to run onto. Available values: "archive","full","minimal".
Archive: Keep the entire indexed database, aka. no pruning. (Pruning is flexible),
Full: Keep only blocks and latest state (Pruning is not flexible)
Minimal: Keep only latest state (Pruning is not flexible) (default: "archive")
Expand Down Expand Up @@ -196,6 +196,8 @@ GLOBAL OPTIONS:
--caplin.discovery.port value Port for Caplin DISCV5 protocol (default: 4000)
--caplin.discovery.tcpport value TCP Port for Caplin DISCV5 protocol (default: 4001)
--caplin.checkpoint-sync-url value [ --caplin.checkpoint-sync-url value ] checkpoint sync endpoint
--caplin.subscibe-all-topics Subscribe to all gossip topics (default: false)
--caplin.max-peer-count value Max number of peers to connect (default: 128)
--sentinel.addr value Address for sentinel (default: "localhost")
--sentinel.port value Port for sentinel (default: 7777)
--sentinel.bootnodes value [ --sentinel.bootnodes value ] Comma separated enode URLs for P2P discovery bootstrap
Expand All @@ -211,7 +213,7 @@ GLOBAL OPTIONS:
--silkworm.rpc.log.response Dump responses in interface logs for embedded Silkworm RPC service (default: false)
--silkworm.rpc.workers value Number of worker threads used in embedded Silkworm RPC service (zero means use default in Silkworm) (default: 0)
--silkworm.rpc.compatibility Preserve JSON-RPC compatibility using embedded Silkworm RPC service (default: true)
--beacon.api value [ --beacon.api value ] Enable beacon API (avaiable endpoints: beacon, builder, config, debug, events, node, validator, lighthouse)
--beacon.api value [ --beacon.api value ] Enable beacon API (available endpoints: beacon, builder, config, debug, events, node, validator, lighthouse)
--beacon.api.addr value sets the host to listen for beacon api requests (default: "localhost")
--beacon.api.cors.allow-methods value [ --beacon.api.cors.allow-methods value ] set the cors' allow methods (default: "GET", "POST", "PUT", "DELETE", "OPTIONS")
--beacon.api.cors.allow-origins value [ --beacon.api.cors.allow-origins value ] set the cors' allow origins
Expand All @@ -226,6 +228,7 @@ GLOBAL OPTIONS:
--caplin.backfilling.blob.no-pruning disable blob pruning in caplin (default: false)
--caplin.checkpoint-sync.disable disable checkpoint sync in caplin (default: false)
--caplin.archive enables archival node in caplin (default: false)
--caplin.snapgen enables snapshot generation in caplin (default: false)
--caplin.mev-relay-url value MEV relay endpoint. Caplin runs in builder mode if this is set
--caplin.validator-monitor Enable caplin validator monitoring metrics (default: false)
--caplin.custom-config value set the custom config for caplin
Expand Down
6 changes: 3 additions & 3 deletions src/basic-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ The default Consensus Layer utilized is [Caplin](./advanced/caplin.md), the Erig
# 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=<your_data_dir>
```
```bash
--datadir=<your_data_dir>
```

* 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.
Expand Down
11 changes: 6 additions & 5 deletions src/basic/disk-space.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,18 @@

| Network | Archive Node | Full Node | Minimal Node |
|----------|--------------|-----------|--------------|
| Ethereum | 1.7 TB | 900 GB | 310 GB |
| Gnosis | 511 GB | 354 GB | 200 GB |
| Polygon | 4.3 TB | 2 TB | 873 GB |
| Ethereum | --- TB | --- GB | --- GB |
| Gnosis | --- GB | --- GB | --- GB |
| Polygon | --- TB | --- TB | --- GB |


# Testnets
## Erigon with Caplin

| Network | Archive Node | Full Node | Minimal Node |
|----------|--------------|-----------|--------------|
| Holesky | 170 GB | 110 GB | 53 GB |
| Sepolia | ... GB | ... GB | ... GB |
| Holesky | 170 GB | 110 GB | 53 GB |
| Sepolia | 186 GB | 116 GB | ... GB |
| Chiado | ... GB | ... GB | ... GB |
| Amoy | ... GB | ... GB | ... GB |
Expand Down
29 changes: 16 additions & 13 deletions src/installation/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,22 @@ Here are the steps to download and start Erigon 3 in Docker:
* Check the Erigon Docker Hub page to see the available releases.

* Download the latest version:
```bash
docker pull erigontech/erigon:main-latest
```
```bash
docker pull erigontech/erigon:main-latest
```
* List the downloaded images to get the IMAGE ID:
```bash
docker images
```
```bash
docker images
```
* Check which Erigon version has been downloaded:
```bash
docker run -it <image_id> --v
```
```bash
docker run -it <image_id> --v
```
* If you want to start Erigon add the options according to the usage page or the advanced customization page. For example:
```bash
docker run -it a3867a12bd23 --chain=holesky --prune.mode=minimal
```
* When done, exit the container or press `Ctrl+C`. The container will stop.
```bash
docker run -it a3867a12bd23 --chain=holesky --prune.mode=minimal
```
When done, exit the container or press `Ctrl+C`. The container will stop.

## Optional: Setup dedicated user

Expand Down Expand Up @@ -117,5 +117,8 @@ sudo -u ${ERIGON_USER} DOCKER_UID=$(id -u ${ERIGON_USER}) DOCKER_GID=$(id -g ${E
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).
<div class="warning">
**Information**
Windows support for docker-compose is not ready yet.
</div>
74 changes: 37 additions & 37 deletions src/installation/upgrading-md
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,24 @@ To upgrade Erigon to a newer version when you've originally installed it via Git
* **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
```
```bash
git fetch --tags
```
* **Check out** the [latest version](https://github.com/ledgerwatch/erigon/releases) and switch to it using:
```bash
git checkout <new_version_tag>
```
Replace `<new_version_tag>` with the version tag of the new release, for example:
```bash
git checkout <new_version_tag>
```
Replace `<new_version_tag>` with the version tag of the new release, for example:

```bash
git checkout v3.0.0-alpha4
```
```bash
git checkout v3.0.0-alpha5
```

* **Rebuild Erigon**: Since the codebase has changed, you need to compile the new version. Run:

```bash
make erigon
```
```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.

Expand All @@ -31,43 +31,43 @@ If you're using Docker to run Erigon, the process to upgrade to a newer version

* **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:<new_version_tag>
```
Replace `<new_version_tag>` with the actual version tag you wish to use. For example:
```bash
docker pull erigontech/erigon:<new_version_tag>
```
Replace `<new_version_tag>` with the actual version tag you wish to use. For example:

```bash
docker pull erigontech/erigon:3.0.0
```
```bash
docker pull erigontech/erigon:3.0.0
```
* **List Your Docker Images**: Check your downloaded images to confirm the new image is there and get the new image ID:

```bash
docker images
```
```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 ps
```
Then stop the container using:

```bash
docker stop <container_id>
```
```bash
docker stop <container_id>
```

Replace `<container_id>` with the actual ID of the container running Erigon.
Replace `<container_id>` 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 <container_id>
```
```bash
docker rm <container_id>
```

* **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 <new_image_id>
```
```bash
docker run -it <new_image_id>
```

* **Verify Operation**: Ensure that Erigon starts correctly and connects to the desired network, verifying the logs for any initial errors.

Expand Down
2 changes: 1 addition & 1 deletion src/installation/windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Then click on the "**New**" button and paste the path here:
Open the Command Prompt and type the following:

```bash
git clone --branch 3.0.0 --single-branch https://github.com/ledgerwatch/erigon.git
git clone --branch v3.0.0-alpha5 --single-branch https://github.com/erigontech/erigon.git
```

### Compiling Erigon
Expand Down
Loading

0 comments on commit c2197dc

Please sign in to comment.