Remove option for using existing snapshot

This commit is contained in:
Nabarun 2024-05-23 14:53:16 +05:30
parent 1f85ad09ac
commit 0177fff7d6
3 changed files with 4 additions and 27 deletions

View File

@ -6,13 +6,11 @@ volumes:
services:
lotus:
environment:
- DOCKER_LOTUS_IMPORT_SNAPSHOT=/var/lotus-snapshots/snapshot
- LOTUS_FEVM_ENABLEETHRPC=true
- LOTUS_API_LISTENADDRESS=/ip4/0.0.0.0/tcp/1234/http
- LOTUS_LIBP2P_LISTENADDRESSES=/ip4/0.0.0.0/tcp/1235,/ip6/::/tcp/1235,/ip4/0.0.0.0/udp/1235/quic-v1,/ip6/::/udp/1235/quic-v1,/ip4/0.0.0.0/udp/1235/quic-v1/webtransport,/ip6/::/udp/1235/quic-v1/webtransport
image: cerc/lotus-mainnet:local
image: cerc/lotus-node:local
volumes:
- ${CERC_LOTUS_SNAPSHOT_PATH}:/var/lotus-snapshots/snapshot
- parameters:/var/tmp/filecoin-proof-parameters
- lotus-repo:/var/lib/lotus
- lotus_shared:/root/.lotus
@ -28,5 +26,5 @@ services:
test: ["CMD", "nc", "-vz", "localhost", "1234"]
interval: 30s
timeout: 10s
retries: 40
retries: 90
start_period: 3s

View File

@ -1,12 +1,11 @@
#!/usr/bin/env bash
# Build cerc/mainnet-lotus
# Build cerc/lotus-node
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
git stash
# Replace repo's Dockerfile with modified one
cp ${SCRIPT_DIR}/Dockerfile ${CERC_REPO_BASE_DIR}/lotus/Dockerfile
docker build -t cerc/lotus-mainnet:local ${build_command_args} ${CERC_REPO_BASE_DIR}/lotus
docker build -t cerc/lotus-node:local ${build_command_args} ${CERC_REPO_BASE_DIR}/lotus

View File

@ -2,16 +2,6 @@
Instructions for deploying a Lotus snap-synced node (for both mainnet and calibnet )
## Prerequisite
Downloaded chain snapshot
```bash
aria2c -o mainnet-snapshot -x5 https://forest-archive.chainsafe.dev/latest/mainnet/
# or using wget
wget -O mainnet-snapshot https://forest-archive.chainsafe.dev/latest/mainnet/
```
## Clone the stack repo
```bash
@ -42,16 +32,6 @@ $ laconic-so --stack ~/cerc/lotus-stack/stack-orchestrator/stacks/lotus-node dep
$ laconic-so --stack ~/cerc/lotus-stack/stack-orchestrator/stacks/lotus-node deploy create --spec-file lotus-node.yml --deployment-dir lotus-node-deployment
```
## Setup config
Set filepath of downloaded mainnet snapshot in config.env
Inside deployment directory, open the `config.env` file and set following env variables:
```bash
# Filepath of downloaded mainnet snapshot
CERC_LOTUS_SNAPSHOT_PATH=/path-to-file/mainnet-snapshot
```
## Start the container
```bash