filecoin-project / filecoin-fvm-localnet

A complete filecoin lotus and boost docker image to spin up a localnet for smart contract development
MIT License
13 stars 8 forks source link

Download size #5

Closed hammertoe closed 1 year ago

hammertoe commented 1 year ago

The default is to run an 8MiB sector size miner. This results in 5.8GB of proof data needed on startup:

matt@Matts-MacBook-Pro filecoin-proof-parameters-8k % du -sh .
5.8G    .

Perhaps we can start with a 2K sector size miner by default, and give the option to run 8M if wanted, as 2K sector size is a lot smaller.

matt@Matts-MacBook-Pro filecoin-proof-parameters % du -sh .
2.0G    .

Also the image itself is 1.5GB. Most of that is the lotus/boost binaries. These are not stripped, and constitute 1.3GB. By stripping this can be reduced down to 783MB:

root@497c71917abc:/usr/local/bin# ls -l 
total 1304520
-rwxr-xr-x 1 root root 179700016 Apr 14 09:45 boost
-rwxr-xr-x 1 root root 189575672 Apr 14 09:48 boostd
-rwxr-xr-x 1 root root 139131032 Apr 14 09:52 booster-bitswap
-rwxr-xr-x 1 root root 145816536 Apr 14 09:51 booster-http
-rwxr-xr-x 1 root root 146361656 Apr 14 09:46 boostx
-rwxr-xr-x 1 root root 199370624 Apr  6 02:59 lotus
-rwxr-xr-x 1 root root 185908304 Apr  6 03:01 lotus-miner
-rwxr-xr-x 1 root root 149914032 Apr  6 03:06 lotus-seed
root@497c71917abc:/usr/local/bin# du -sh .
1.3G    .
root@497c71917abc:/usr/local/bin# strip *
root@497c71917abc:/usr/local/bin# ls -l
total 801416
-rwxr-xr-x 1 root root 112016856 Apr 14 20:20 boost
-rwxr-xr-x 1 root root 119805080 Apr 14 20:20 boostd
-rwxr-xr-x 1 root root  80601576 Apr 14 20:20 booster-bitswap
-rwxr-xr-x 1 root root  85259496 Apr 14 20:20 booster-http
-rwxr-xr-x 1 root root  85657352 Apr 14 20:20 boostx
-rwxr-xr-x 1 root root 129836112 Apr 14 20:21 lotus
-rwxr-xr-x 1 root root 116600240 Apr 14 20:21 lotus-miner
-rwxr-xr-x 1 root root  90854312 Apr 14 20:21 lotus-seed
root@497c71917abc:/usr/local/bin# du -sh .
783M    .
hammertoe commented 1 year ago

Docker image has been reduced down to 1GB by stripping the binaries. The default is now a 2k network. 8M can be selected in the .env file

This means the total download on first run is about 3GB vs the original 7.5GB.