diff --git a/.env b/.env index 9db2929..57ec9d3 100644 --- a/.env +++ b/.env @@ -2,10 +2,10 @@ ## the section below. ## 2k network -IMAGE=ghcr.io/filecoin-project/filecoin-fvm-localnet-preproofs-2k:sha-fa13f1a +IMAGE=ghcr.io/filecoin-project/filecoin-fvm-localnet-preproofs-2k:sha-7b316e4 SECTOR_SIZE=2048 ## 8M network -#IMAGE=ghcr.io/filecoin-project/filecoin-fvm-localnet-preproofs-8m:sha-fa13f1a +#IMAGE=ghcr.io/filecoin-project/filecoin-fvm-localnet-preproofs-8m:sha-7b316e4 #SECTOR_SIZE=8388608 diff --git a/README.md b/README.md index c0817b3..f8da092 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ # Filecoin FVM localnet -Filecoin FVM Localnet is a complete Filecoin [Lotus](https://lotus.filecoin.io/) and [Boost](https://boost.filecoin.io/) Docker image that allows you to spin up a localnet for FVM smart contract development. +Filecoin FVM Localnet is a complete Filecoin [Lotus](https://lotus.filecoin.io/) and [Boost](https://boost.filecoin.io/) Docker image that allows you to spin up a localnet for FVM smart contract development. You can also run two miners for testing things like replication between SPs. ## System requirements @@ -31,15 +31,21 @@ Ensure you have [Docker installed](https://docs.docker.com/get-docker/). 1. OPTIONAL: Edit the file `.env` if you wish to optionally run an 8M sector network, otherwise the default 2k sectors will be used -1. Run Docker `compose up`: +1. To run a single miner instance (default): run Docker `compose up`: ```sh docker compose up ``` +1. To run two miners and two Boost instances (replication): run: + + ```sh + docker compose --profile replication up + ``` + 1. To stop the network type `ctrl-c`. -Once the localnet is started, you can navigate the Boost UI at: `http://localhost:8080`. +Once the localnet is started, you can navigate the Boost UI at: `http://localhost:8080`. If you run in replication mode there is a second Boost instance at: `http://localhost:8081`. ## Metamask and Funding a Wallet @@ -93,5 +99,5 @@ In order to transact with the network, you will need some funds (tFIL) in your w - This network has a block time of 15 seconds (half the time of Filecoin mainnet). - +- Running in 'replication' mode will start up a second Lotus miner instance and a second boost instance connected to it. This allows you to test replication between miners, and smart contracts that need two miners to work.