Skip to content

Commit

Permalink
Update .env file to latest images, that support replication mode with…
Browse files Browse the repository at this point in the history
… two miners. Update README
  • Loading branch information
Matt Hamilton committed Aug 27, 2023
1 parent 7b316e4 commit 5119b03
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -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

14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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.

0 comments on commit 5119b03

Please sign in to comment.