How does one configure Erigon to work with Heimdall

I’ve tried syncing Bor for mainnet, but it takes way too long to download the snapshot. Therefore I’ve decided to use Erigon instead. Running on AWS on Ubuntu 20.04

16 GB RAM
3.75 TB drive
4 cores (8 vCPUs)

There aren’t any guides for configuring Erigon with Heimdall, I’d like to request instructions on what configuration to set, in order to allow Heimdall and Erigon to work successfully with each other.

I am doing the binary installation for both

Here’s my config:

root@polygon-archive-de-1 ~ # systemctl cat [email protected] 
# /etc/systemd/system/[email protected]
[Unit]
  Description=erigon
  StartLimitIntervalSec=500
  StartLimitBurst=5

[Service]
  EnvironmentFile=/etc/default/erigon-%i
  Restart=on-failure
  RestartSec=5s
  ExecStart=/usr/local/bin/erigon $ARGS
  Type=simple
  KillSignal=SIGINT
  User=erigon
  TimeoutStopSec=120

[Install]
  WantedBy=multi-user.target
root@polygon-archive-de-1 ~ # cat /etc/default/erigon-polygon 
ARGS=--datadir=/data/polygon/erigon \
	--db.size.limit 8246651162368 \
	--maxpeers=300 \
	--chain=bor-mainnet \
	--http.addr=0.0.0.0 \
	--bodies.cache=21474836480 \
	'--http.vhosts=*' \
	--http.port=8545

Heimdall is running as usual the same way as for bor:

root@polygon-archive-de-1 ~ # systemctl cat heimdalld.service 
# /lib/systemd/system/heimdalld.service
[Unit]
  Description=heimdalld
  StartLimitIntervalSec=500
  StartLimitBurst=5
[Service]
  Restart=on-failure
  RestartSec=5s
  WorkingDirectory=/usr/bin
  ExecStart=/usr/bin/heimdalld start --home "/var/lib/heimdall" \
    --chain=mainnet \
    --rest-server
  Type=simple
  LimitNOFILE=65536
  User=heimdall
[Install]
  WantedBy=multi-user.target

# /etc/systemd/system/heimdalld.service.d/override.conf
[Service]
  WorkingDirectory=/data/polygon/heimdall
  ExecStart=
  ExecStart=/usr/bin/heimdalld start --home "/data/polygon/heimdall" \
    --chain=mainnet \
    --rest-server

Snawots config doesn’t specify --bor.heimdall, which is set to "http://localhost:1317" by default, which will work if both binaries exist in the same environment, but might need to be specified if they’re not in the same machine instance, or using separate containers or vms or whatever.

1 Like