Upgrading from a previous version
Updating to the latest version of Erigon gives you access to the latest features and ensures optimal performance and stability.
General Recommendations Before Upgrade
- Read Release Notes: Carefully review the Release Notes for breaking changes and new features relevant to your setup.
- Terminate your Erigon: End your current Erigon session by pressing
CTRL+C. - Backup: Always back up your
datadirbefore performing major upgrades.
Upgrading from 3.7 to 3.8
A 3.7.x node upgrades to 3.8 in place: there is no database migration and no re-sync. Before restarting on the new version, check the following:
- Standalone RPC daemon: the private ETHBACKEND API is now version 4.2. Upgrade a standalone
rpcdaemontogether with Erigon: a 3.7rpcdaemonconnected to a 3.8 Erigon, or the reverse, logsincompatible interface versionsand shuts down. - Database durability: batched database syncing is now the default (
--db.safe.nosync=true). It reduces disk-flush pauses, but a power loss can roll back the most recent commits. Set--db.safe.nosync=falseif you need every commit flushed to disk. - Caplin QUIC port: v3.7.1 used UDP
4001for QUIC; 3.8 uses UDP4002. Update firewall rules and container port mappings, or set--caplin.discovery.quicportexplicitly. If the QUIC port cannot be opened, the new--caplin.quic.disableflag turns QUIC off and keeps TCP. See Default Ports. - Caplin peer limits: connections are now capped per IPv4 and IPv6 network range. If many of your peers share a range, set
--caplin.ip-block-limits.trusted-cidrsor--caplin.ip-block-limits.disable. - Browser and GraphQL access: browser WebSocket connections are now checked against
--http.corsdomain. Without the flag, only pages served fromhttp://localhost,http://127.0.0.1,http://[::1]or the node's own hostname can connect; once it is set, only the listed origins can. Clients that send noOriginheader, such as scripts and backend services, are not affected. In addition,/graphqlanswers only host names listed in--http.vhosts.--rpc.accessListnow also applies to WebSocket, IPC and subscriptions, so an allow list must name the subscribe methods your clients use. See Configuring Erigon. - RPC resource limits: a node now holds at most 10,000 live filters and subscriptions, and each WebSocket or IPC connection at most 1,024 subscriptions. Requests above a limit fail with error
-32005. Raise the limits with--rpc.subscription.filters.maxsubscriptionsand--rpc.subscription.limit, or set either to0to remove it. - No cleartext HTTP/2: the plain HTTP RPC port serves HTTP/1.1 only. Clients and proxies that talk HTTP/2 to it without TLS must switch to HTTP/1.1, or enable HTTPS with
--https.enabled. - Health checks: the beacon API's
/eth/v1/node/healthreturns HTTP206while the node is syncing. A check that requires200should accept206, or add?syncing_status=200. - Gnosis and Chiado: Caplin now keeps data columns for 16,384 epochs (about 15 days) instead of 4,096, so these nodes need more disk.
- Engine API and JSON-RPC: nonstandard
engine_*methods such asengine_startare no longer served, and several JSON-RPC and tracing methods changed results or error codes. Review the v3.8.0 release notes if you run applications or integrations against the RPC.
Managing your Data
Erigon 3.1 introduces a new snapshot format while continuing to support the old one. This means that new releases are fully compatible with your existing data. However, users who want the latest data files and data-specific fixes can perform an optional manual data upgrade:
- Backup your datadir.
- Upgrade your Erigon installation whether from a binary, compiled source code, or Docker.
- Upgrade your snapshots using one of the options below.
- Run Erigon; it downloads any missing snapshots and resumes syncing.
Snapshots Upgrade Options
erigon snapshots update-to-new-ver-format --datadir /your/datadir: converts your existing snapshots in place to the latest format, keeping your data. Quicker, but you won't get the full performance benefits of freshly built snapshots.erigon snapshots reset --datadir /your/datadir: destructive — deleteschaindata/(and any leftoverheimdall/andpolygon-bridge/directories from a former Polygon datadir) and removes any snapshot files not in the preverified set (locally generated files, and torrents with a mismatched hash). Preverified snapshots already on disk are kept; on the next start Erigon downloads only missing or incorrect snapshots and rebuilds state.
erigon snapshots reset does not reuse your chaindata/ — it deletes the chaindata DB (and any leftover Polygon aux directories) and any locally generated or mismatched snapshots, then rebuilds state on the next start (downloading only missing or incorrect snapshots). Back up your --datadir first, and prefer update-to-new-ver-format if you want to keep your current data.
Choose update-to-new-ver-format to convert your data in place, or reset for a clean reset to the preverified snapshot set.
Why Upgrading Erigon Doesn't Always Fix Your Data
Upgrading Erigon involves a key distinction between its core software and its data files, which are managed separately. This approach is rooted in practicality and user control.
The Erigon software is the application that processes and interacts with blockchain data. However, the majority of the data itself, including the state of the network, exists in data files that you download and store locally.
If a bug is discovered, it is often in the data itself rather than a flaw in the Erigon code. In such a case, simply updating the Erigon binary won't resolve the issue because the faulty data remains on your disk. This is because Erigon upgrades do not normally alter the data files. You must reset and re-download the data snapshots to get the corrected files.
This separation prevents unnecessary and time-consuming processes. The Erigon team cannot regenerate months of data for every minor bug fix, and users shouldn't have to re-download terabytes of information with every new weekly software release.
This design also provides flexibility. A user might need a specific data fix but prefer to remain on an older software version due to a known bug or regression in the latest release. Similarly, a user might be satisfied with their current data set and only need to update the Erigon binary.
While this dual-versioning system may seem complex, it is a deliberate design choice that optimizes for both efficiency and user autonomy.
Snapshots Downgrade Options
If upgrading snapshots(3.0to 3.1) now happens automatically, you should follow these instructions for downgrading:
WARNING: This algorithm will remove incompatible 3.1 snapshot files because they are not backward-compatible.
- Make sure that you're running Erigon on a 3.1.x version; check with
erigon --version. - Run
erigon snapshots reset-to-old-ver-format --datadir /your/datadirto reset your snapshots to the old format. git checkout v3.0.xto check out the preferred3.0version. For example, the latest 3.0 release is:git checkout v3.0.17- Run your old version of Erigon.
Upgrading your Erigon Installation
Follow the below instructions depending on your installation method:
Pre-built Binaries (Linux only)
Download the latest binary file from https://github.com/erigontech/erigon/releases, verify the checksum, and reinstall it; no other operation is needed. Releases ship Linux binaries only (amd64 and arm64); on macOS, use Docker or build from source.
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.
Follow the Docker installation instructions to pull and launch the new version.
Compiled from source
To upgrade Erigon to a newer version when you've originally installed it via Git and manual compilation, follow the build from source instructions from step 2.2, "Check Out the Desired Stable Version (Tag)".