Skip to content

Instantly share code, notes, and snippets.

Created March 31, 2020 18:31
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
start daemon with custom genesis block
#!/usr/bin/env bash
BASEDIR=$(mktemp -d -t "lotus-interopnet.XXXX")
git clone --branch "testnet/3" "${BASEDIR}/build"
mkdir -p "${BASEDIR}/scripts"
mkdir -p "${BASEDIR}/bin"
pushd "${BASEDIR}/build"
make clean deps lotus lotus-storage-miner lotus-shed lotus-seed
cp lotus lotus-storage-miner lotus-shed lotus-seed ../bin/
export PATH="${BASEDIR}/bin:${PATH}"
export LOTUS_PATH=${BASEDIR}/.lotus
export LOTUS_STORAGE_PATH=${BASEDIR}/.lotusstorage
HOME="${BASEDIR}" lotus-seed pre-seal --sector-size 2048 --num-sectors 2 --miner-addr "${genesis_miner_addr}"
lotus-seed genesis new "${BASEDIR}/localnet.json"
lotus-seed genesis add-miner "${BASEDIR}/localnet.json" "${BASEDIR}/.genesis-sectors/pre-seal-${genesis_miner_addr}.json"
lotus daemon --lotus-make-genesis=${BASEDIR}/dev.gen --genesis-template=${BASEDIR}/localnet.json --bootstrap=false 2>&1 | tee -a ${BASEDIR}/daemon.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment