Skip to content

Experimental Sepolia Pre-merge History Expiry (25.6.0-RC1)

Pre-release
Pre-release
Compare
Choose a tag to compare
@github-actions github-actions released this 30 May 01:09
· 20 commits to main since this release
9459e4f

Caution

This is NOT a Mainnet-ready release

Experimental Sepolia Pre-merge History Expiry (25.6.0-RC1)

On June 1st 2025, for Sepolia testnet, Besu is set to support expiry of pre-merge block bodies on sepolia as specified here https://eips.ethereum.org/EIPS/eip-7927

This is a test run to prepare for a yet to be confirmed Mainnet date.

Note, the potential disk space saving with history expiry is only ~1 GiB for Sepolia but a good chance to test the new features. Mainnet space savings will be 400-500 GiB.

If you are launching a new Sepolia node, sync without pre-merge blocks.

If you are updating an existing Sepolia full node, you have several options:

  1. Do nothing - The only impact will be during sync
  2. Offline prune - A few minutes downtime and fastest path to space savings
  3. Online prune - Restart required then pruning occurs over the next few hours/days
  4. Resync without pre-merge blocks - longest downtime but best space savings

Support for era1 sync for archive nodes is coming soon.

How to perform an offline prune

The simplest and fastest option for pruning pre-merge blocks is to perform an offline prune.

  1. Stop Besu
  2. Run the prune command and wait for it to exit
./besu --network=sepolia --data-path=/path/to/your/database storage prune-pre-merge-blocks
  1. Add --Xhistory-expiry-prune flag to Besu and restart - this is important otherwise you won't actually reclaim any space.
  2. Wait until all space has been reclaimed, suggest waiting 24-48 hours
  3. It's optional, but we recommend removing --Xhistory-expiry-prune and restarting Besu.

--Xhistory-expiry-prune will apply some default database garbage collection options to help with freeing up disk space, as described here. These underlying GC options can be tweaked separately if necessary. Note this is the same flag used to activate the online pruner, but it will have no effect if you've already used the offline prune command.

Extra prune-pre-merge-blocks options

--threads will default to one less than the number of processors available on your system, so it is safe to omit
--prune-range-size will default to 10000 and can be adjusted if desired, although this may impact performance of the prune

e.g. ./besu --network=sepolia --data-path=/path/to/your/database --Xhistory-expiry-prune storage prune-pre-merge-blocks --threads=4 --prune-range-size=10000

How to perform an online prune

An alternative option for pruning is online pruning, which can be tuned to minimise impact on a running besu system

./besu --network=sepolia --Xhistory-expiry-prune

--Xhistory-expiry-prune will enable online pruning of pre-merge blocks and print progress in the logs, e.g.

Pruned pre-merge blocks up to 380000

When online prune is complete you will see this log message

Done pruning pre-merge blocks.

Note, --Xhistory-expiry-prune doubles up as a way to activate online pruning as well as the garbage collection settings that works for both online and offline pruning mechanisms.

Extra options

--Xpre-merge-pruning-quantity=100 is the default value and will tune the online pruning to remove 100 blocks from the beginning of the chain for every new block added. During testing on a 4 CPU machine, values up to 100 had neglible impact on besu's normal functioning.

Sync without pre-merge blocks

The final option for avoiding storage of pre-merge blocks is to delete your database and perform a fresh SNAP sync with the --Xsnapsync-synchronizer-pre-merge-headers-only-enabled option, e.g.

./besu --network=sepolia --sync-mode=SNAP --Xsnapsync-synchronizer-pre-merge-headers-only-enabled

Consider using RocketPool's https://rescuenode.com to minimise downtime if you're a solo staker (LSTs like Lido CSM should talk to the RocketPool grants committee).

Eth/69

Alongside pre-merge history expiry, EIP-7642 adds the Eth/69 protocol which broadcasts the new earliest block in the STATUS message. This can be enabled by starting besu with the --Xeth-capability-max=69 option. This usually defaults to allow all available protocol versions, but is currently defaulting to 68 to prevent unwanted Eth/69 activation.

This is optional and not required for history expiry sync or prune.

Further notes

Troubleshooting

Some of the same cli command troubleshooting tips may apply to prune-pre-merge-blocks: https://besu.hyperledger.org/public-networks/how-to/bonsai-limit-trie-logs#troubleshoot

sync-mode=CHECKPOINT

Some users may have sync-mode=CHECKPOINT instead of SNAP. Nothing will break however if you perform a fresh sync then you will delete the full pre-merge blocks instead of retaining the headers.
Once history expiry is live, we advise everyone to migrate from CHECKPOINT -> SNAP and will be deprecating CHECKPOINT sync in the future.

Mainnet readiness

Caution

This is NOT a Mainnet-ready release

Once Sepolia testing is complete, we will release a mainnet-ready version of history expiry for Besu. This will make the SNAP sync history expiry behaviour default.
The pruning features will be promoted from experimental to production-ready, e.g. --Xhistory-expiry-prune -> --history-expiry-prune


SHA 256

c38700c7adb333370967f5c336b511c694fd5994dfb0030a41e816574c2b8a65 besu-25.6.0-RC1.zip
9d53a47ad1a6bde924d86c6c2d7855b22f9e480de61624543aef4c8c5efa20d4 besu-25.6.0-RC1.tar.gz