# Table of Contents - [Lotus Docs - Home](#lotus-docs-home) - [What is Lotus - Lotus Docs](#what-is-lotus-lotus-docs) - [Prerequisites - Lotus Docs](#prerequisites-lotus-docs) - [Manage FIL - Lotus Docs](#manage-fil-lotus-docs) - [Blog - Lotus Docs](#blog-lotus-docs) - [Building with Lotus APIs - Lotus Docs](#building-with-lotus-apis-lotus-docs) - [Overview - Lotus Docs](#overview-lotus-docs) - [Overview - Lotus Docs](#overview-lotus-docs) - [Knowledge Base - Lotus Docs](#knowledge-base-lotus-docs) - [Networks - Lotus Docs](#networks-lotus-docs) - [Node types - Lotus Docs](#node-types-lotus-docs) - [Run a disputer - Lotus Docs](#run-a-disputer-lotus-docs) - [This Week in Lotus - Week 1 - 2024 - Lotus Docs](#this-week-in-lotus-week-1-2024-lotus-docs) - [This Week in Lotus - Week 50 - 2023 - Lotus Docs](#this-week-in-lotus-week-50-2023-lotus-docs) - [Backfilling Messages in Lotus - Lotus Docs](#backfilling-messages-in-lotus-lotus-docs) - [Lotus on Linux - Lotus Docs](#lotus-on-linux-lotus-docs) - [This Week in Lotus - Week 49 - 2023 - Lotus Docs](#this-week-in-lotus-week-49-2023-lotus-docs) - [MacOS - Lotus Docs](#macos-lotus-docs) - [Start Lotus - Lotus Docs](#start-lotus-lotus-docs) - [Remote lotus-wallet management - Lotus Docs](#remote-lotus-wallet-management-lotus-docs) - [This Week in Lotus - Week 47 - 2023 - Lotus Docs](#this-week-in-lotus-week-47-2023-lotus-docs) - [Tasks - Lotus Docs](#tasks-lotus-docs) - [Grafana dashboard for Lotus - Lotus Docs](#grafana-dashboard-for-lotus-lotus-docs) - [This Week in Lotus - Week 46 - 2023 - Lotus Docs](#this-week-in-lotus-week-46-2023-lotus-docs) - [Economics - Lotus Docs](#economics-lotus-docs) - [Using Ledger - Lotus Docs](#using-ledger-lotus-docs) - [This Week in Lotus - Week 45 - 2023 - Lotus Docs](#this-week-in-lotus-week-45-2023-lotus-docs) - [Using Ledger on a remote machine - Lotus Docs](#using-ledger-on-a-remote-machine-lotus-docs) - [This Week in Lotus - Week 44 - 2023 - Lotus Docs](#this-week-in-lotus-week-44-2023-lotus-docs) - [Hardware requirements - Lotus Docs](#hardware-requirements-lotus-docs) - [Multisig - Lotus Docs](#multisig-lotus-docs) - [Chain management - Lotus Docs](#chain-management-lotus-docs) - [Lotus Miner Setup - Lotus Docs](#lotus-miner-setup-lotus-docs) - [bidbot - Lotus Docs](#bidbot-lotus-docs) - [Architectures - Lotus Docs](#architectures-lotus-docs) - [Switch networks - Lotus Docs](#switch-networks-lotus-docs) - [Add Seal Worker - Lotus Docs](#add-seal-worker-lotus-docs) - [Message pool - Lotus Docs](#message-pool-lotus-docs) - [Butterfly Network - Lotus Docs](#butterfly-network-lotus-docs) - [solution - Lotus Docs](#solution-lotus-docs) - [CUDA Setup - Lotus Docs](#cuda-setup-lotus-docs) - [Backup and restore - Lotus Docs](#backup-and-restore-lotus-docs) - [article - Lotus Docs](#article-lotus-docs) - [Connectivity - Lotus Docs](#connectivity-lotus-docs) - [Upgrade - Lotus Docs](#upgrade-lotus-docs) - [Prerequisites - Lotus Docs](#prerequisites-lotus-docs) - [SupraSeal C2 Setup - Lotus Docs](#supraseal-c2-setup-lotus-docs) - [Initialize - Lotus Docs](#initialize-lotus-docs) - [Lotus Slasher & Lotus Disputer - Lotus Docs](#lotus-slasher-lotus-disputer-lotus-docs) - [Troubleshooting - Lotus Docs](#troubleshooting-lotus-docs) - [Lotus CLI - Lotus Docs](#lotus-cli-lotus-docs) - [SupraSeal PC2 Setup - Lotus Docs](#supraseal-pc2-setup-lotus-docs) - [Claim Extension - Lotus Docs](#claim-extension-lotus-docs) - [Configuration - Lotus Docs](#configuration-lotus-docs) - [Advanced Configurations - Lotus Docs](#advanced-configurations-lotus-docs) - [env - Lotus Docs](#env-lotus-docs) - [Lite node - Lotus Docs](#lite-node-lotus-docs) - [Multisignature address as owner address - Lotus Docs](#multisignature-address-as-owner-address-lotus-docs) - [API access - Lotus Docs](#api-access-lotus-docs) - [Benchmarks - Lotus Docs](#benchmarks-lotus-docs) - [deprecated - Lotus Docs](#deprecated-lotus-docs) - [function - Lotus Docs](#function-lotus-docs) - [SplitStore - Lotus Docs](#splitstore-lotus-docs) - [Lotus Gateway - Lotus Docs](#lotus-gateway-lotus-docs) - [Auth - Lotus Docs](#auth-lotus-docs) - [leveldb - Lotus Docs](#leveldb-lotus-docs) - [Lotus Bootstrap Node - Lotus Docs](#lotus-bootstrap-node-lotus-docs) - [Addresses - Lotus Docs](#addresses-lotus-docs) - [Devnet - Local network - Lotus Docs](#devnet-local-network-lotus-docs) - [Custom storage layout - Lotus Docs](#custom-storage-layout-lotus-docs) - [Ethereum RPC - Lotus Docs](#ethereum-rpc-lotus-docs) - [Chain.Love - Lotus Docs](#chain-love-lotus-docs) - [Backup and restore - Lotus Docs](#backup-and-restore-lotus-docs) - [Beacon - Lotus Docs](#beacon-lotus-docs) - [Contribute - Lotus Docs](#contribute-lotus-docs) - [Linux - Lotus Docs](#linux-lotus-docs) - [Upgrades - Lotus Docs](#upgrades-lotus-docs) - [Lotus - Lotus Docs](#lotus-lotus-docs) - [Sector pledging - Lotus Docs](#sector-pledging-lotus-docs) - [Chain - Lotus Docs](#chain-lotus-docs) - [Lotus Build - Lotus Docs](#lotus-build-lotus-docs) - [Blog - Lotus Docs](#blog-lotus-docs) - [Snap-deals - Lotus Docs](#snap-deals-lotus-docs) - [Create - Lotus Docs](#create-lotus-docs) - [Chores - Lotus Docs](#chores-lotus-docs) - [Blog - Lotus Docs](#blog-lotus-docs) - [Maintenance - Lotus Docs](#maintenance-lotus-docs) - [lotus-shed - Lotus Docs](#lotus-shed-lotus-docs) - [Gas - Lotus Docs](#gas-lotus-docs) - [lotus-wallet - Lotus Docs](#lotus-wallet-lotus-docs) - [Lotus-miner CLI - Lotus Docs](#lotus-miner-cli-lotus-docs) - [Seal workers - Lotus Docs](#seal-workers-lotus-docs) - [Markets Node - Lotus Docs](#markets-node-lotus-docs) - [Lotus Worker - Lotus Docs](#lotus-worker-lotus-docs) - [Miner - Lotus Docs](#miner-lotus-docs) - [Workers - Lotus Docs](#workers-lotus-docs) - [Proving - Lotus Docs](#proving-lotus-docs) - [Sealing - Lotus Docs](#sealing-lotus-docs) - [PoSt workers - Lotus Docs](#post-workers-lotus-docs) - [mpool - Lotus Docs](#mpool-lotus-docs) - [Logging - Lotus Docs](#logging-lotus-docs) - [Lotus Miner - Lotus Docs](#lotus-miner-lotus-docs) - [I - Lotus Docs](#i-lotus-docs) - [Lotus Node - Lotus Docs](#lotus-node-lotus-docs) - [Overview - Lotus Docs](#overview-lotus-docs) - [Blog - Lotus Docs](#blog-lotus-docs) - [repo - Lotus Docs](#repo-lotus-docs) - [OS - Lotus Docs](#os-lotus-docs) - [unsupported - Lotus Docs](#unsupported-lotus-docs) - [Blog - Lotus Docs](#blog-lotus-docs) - [Blog - Lotus Docs](#blog-lotus-docs) - [Log - Lotus Docs](#log-lotus-docs) - [sealing - Lotus Docs](#sealing-lotus-docs) - [Replace message with updated gas fee - Lotus Docs](#replace-message-with-updated-gas-fee-lotus-docs) - [Common Connectivity Error - Lotus Docs](#common-connectivity-error-lotus-docs) - [Soft FD limit is low - Lotus Docs](#soft-fd-limit-is-low-lotus-docs) - [Where does the ImportData function get executed - Lotus Docs](#where-does-the-importdata-function-get-executed-lotus-docs) - [Market - Lotus Docs](#market-lotus-docs) - [How to join the Butterfly test network. - Lotus Docs](#how-to-join-the-butterfly-test-network-lotus-docs) - [Mark for upgrade is unsupported - Lotus Docs](#mark-for-upgrade-is-unsupported-lotus-docs) - [How to install lotus-shed - Lotus Docs](#how-to-install-lotus-shed-lotus-docs) - [Add swap on Linux - Lotus Docs](#add-swap-on-linux-lotus-docs) - [Unexpected genesis in repo - Lotus Docs](#unexpected-genesis-in-repo-lotus-docs) - [Using OpenCL or disabling GPU - Lotus Docs](#using-opencl-or-disabling-gpu-lotus-docs) - [Setting a user-defined Propagation Delay - Lotus Docs](#setting-a-user-defined-propagation-delay-lotus-docs) - [Miner - Lotus Docs](#miner-lotus-docs) - [Retrieval Error: failed to lookup index for mh - Lotus Docs](#retrieval-error-failed-to-lookup-index-for-mh-lotus-docs) - [Getting logs for hard to solve issues - Lotus Docs](#getting-logs-for-hard-to-solve-issues-lotus-docs) - [Error: Can't acquire bellman.lock - Lotus Docs](#error-can-t-acquire-bellman-lock-lotus-docs) - [Failed to create data store - Lotus Docs](#failed-to-create-data-store-lotus-docs) - [Mpool - Lotus Docs](#mpool-lotus-docs) - [StorageMiner repo directory does not exist - Lotus Docs](#storageminer-repo-directory-does-not-exist-lotus-docs) - [Debugging GetAPIInfo errors - Lotus Docs](#debugging-getapiinfo-errors-lotus-docs) - [Lotus-Miner Sectors renew command is removed from CLI - Lotus Docs](#lotus-miner-sectors-renew-command-is-removed-from-cli-lotus-docs) - [Troubleshooting Sector Removal - Lotus Docs](#troubleshooting-sector-removal-lotus-docs) - [Msig - Lotus Docs](#msig-lotus-docs) - [Sector redeclared in xxx-xxx-xxx logs - Lotus Docs](#sector-redeclared-in-xxx-xxx-xxx-logs-lotus-docs) - [LevelDB metadata corruption recovery - Lotus Docs](#leveldb-metadata-corruption-recovery-lotus-docs) - [Net - Lotus Docs](#net-lotus-docs) - [How to install lotus-wallet - Lotus Docs](#how-to-install-lotus-wallet-lotus-docs) - [Nodes in China - Lotus Docs](#nodes-in-china-lotus-docs) - [Actor Not Found - Lotus Docs](#actor-not-found-lotus-docs) - [Go command not found - Lotus Docs](#go-command-not-found-lotus-docs) - [Chain linked to block marked previously as bad - Lotus Docs](#chain-linked-to-block-marked-previously-as-bad-lotus-docs) - [Paych - Lotus Docs](#paych-lotus-docs) - [Dynamic retrieval pricing is being deprecated - Lotus Docs](#dynamic-retrieval-pricing-is-being-deprecated-lotus-docs) - [Index provider - Lotus Docs](#index-provider-lotus-docs) - [Dagstore - Lotus Docs](#dagstore-lotus-docs) - [Sync - Lotus Docs](#sync-lotus-docs) - [Retrieve data with the Legacy Markets - Lotus Docs](#retrieve-data-with-the-legacy-markets-lotus-docs) - [Resolving Failed to Find Sector Errors - Lotus Docs](#resolving-failed-to-find-sector-errors-lotus-docs) - [Redeclared in this block build error - Lotus Docs](#redeclared-in-this-block-build-error-lotus-docs) - [State - Lotus Docs](#state-lotus-docs) - [Wallet - Lotus Docs](#wallet-lotus-docs) - [Run an invariant check - Lotus Docs](#run-an-invariant-check-lotus-docs) - [How to disable premigration in network upgrade - Lotus Docs](#how-to-disable-premigration-in-network-upgrade-lotus-docs) - [Actor - Lotus Docs](#actor-lotus-docs) - [Auth - Lotus Docs](#auth-lotus-docs) - [Manage Storage Deals - Lotus-miner legacy markets - Lotus Docs](#manage-storage-deals-lotus-miner-legacy-markets-lotus-docs) - [Benchmark a Network Migration - Lotus Docs](#benchmark-a-network-migration-lotus-docs) - [Legacy lotus-miner markets connectivity - Lotus Docs](#legacy-lotus-miner-markets-connectivity-lotus-docs) - [Compute - Lotus Docs](#compute-lotus-docs) - [Lotus-miner legacy markets Configs - Lotus Docs](#lotus-miner-legacy-markets-configs-lotus-docs) - [Create - Lotus Docs](#create-lotus-docs) - [Dagstore - Lotus Docs](#dagstore-lotus-docs) - [Deals - Lotus Docs](#deals-lotus-docs) - [Split-Markets - Lotus Docs](#split-markets-lotus-docs) - [Indexer - Lotus Docs](#indexer-lotus-docs) - [I - Lotus Docs](#i-lotus-docs) - [Log - Lotus Docs](#log-lotus-docs) - [Mining - Lotus Docs](#mining-lotus-docs) - [Market - Lotus Docs](#market-lotus-docs) - [Net - Lotus Docs](#net-lotus-docs) - [Pieces - Lotus Docs](#pieces-lotus-docs) - [Pledge - Lotus Docs](#pledge-lotus-docs) - [Return - Lotus Docs](#return-lotus-docs) - [Runtime - Lotus Docs](#runtime-lotus-docs) - [Sealing - Lotus Docs](#sealing-lotus-docs) - [Sector - Lotus Docs](#sector-lotus-docs) - [Sectors - Lotus Docs](#sectors-lotus-docs) - [Storage - Lotus Docs](#storage-lotus-docs) - [Add - Lotus Docs](#add-lotus-docs) - [Worker - Lotus Docs](#worker-lotus-docs) - [Finalize - Lotus Docs](#finalize-lotus-docs) - [Generate - Lotus Docs](#generate-lotus-docs) - [Move - Lotus Docs](#move-lotus-docs) - [Process - Lotus Docs](#process-lotus-docs) - [Prove - Lotus Docs](#prove-lotus-docs) - [Release - Lotus Docs](#release-lotus-docs) - [Replica - Lotus Docs](#replica-lotus-docs) - [Set - Lotus Docs](#set-lotus-docs) - [Seal - Lotus Docs](#seal-lotus-docs) - [Storage - Lotus Docs](#storage-lotus-docs) - [Task - Lotus Docs](#task-lotus-docs) - [Unseal - Lotus Docs](#unseal-lotus-docs) - [Wait - Lotus Docs](#wait-lotus-docs) - [This Week in Lotus - Week 23 - 2023 - Lotus Docs](#this-week-in-lotus-week-23-2023-lotus-docs) - [This Week in Lotus - Week 17 - 2023 - Lotus Docs](#this-week-in-lotus-week-17-2023-lotus-docs) - [This Week in Lotus - Week 29 - 2023 - Lotus Docs](#this-week-in-lotus-week-29-2023-lotus-docs) - [This Week in Lotus - Week 36 - 2023 - Lotus Docs](#this-week-in-lotus-week-36-2023-lotus-docs) - [This Week in Lotus - Week 16 - 2023 - Lotus Docs](#this-week-in-lotus-week-16-2023-lotus-docs) - [This Week in Lotus - Week 22 - 2023 - Lotus Docs](#this-week-in-lotus-week-22-2023-lotus-docs) - [This Week in Lotus - Week 31 - 2023 - Lotus Docs](#this-week-in-lotus-week-31-2023-lotus-docs) - [This Week in Lotus - Week 37 - 2023 - Lotus Docs](#this-week-in-lotus-week-37-2023-lotus-docs) - [This Week in Lotus - Week 15 - 2023 - Lotus Docs](#this-week-in-lotus-week-15-2023-lotus-docs) - [This Week in Lotus - Week 39 - 2023 - Lotus Docs](#this-week-in-lotus-week-39-2023-lotus-docs) - [This Week in Lotus - Week 33 - 2023 - Lotus Docs](#this-week-in-lotus-week-33-2023-lotus-docs) - [This Week in Lotus - Week 35 - 2023 - Lotus Docs](#this-week-in-lotus-week-35-2023-lotus-docs) - [This Week in Lotus - Week 34 - 2023 - Lotus Docs](#this-week-in-lotus-week-34-2023-lotus-docs) - [This Week in Lotus - Week 43 - 2023 - Lotus Docs](#this-week-in-lotus-week-43-2023-lotus-docs) - [This Week in Lotus - Week 24 - 2023 - Lotus Docs](#this-week-in-lotus-week-24-2023-lotus-docs) - [This Week in Lotus - Week 19 - 2023 - Lotus Docs](#this-week-in-lotus-week-19-2023-lotus-docs) - [This Week in Lotus - Week 30 - 2023 - Lotus Docs](#this-week-in-lotus-week-30-2023-lotus-docs) - [This Week in Lotus - Week 18 - 2023 - Lotus Docs](#this-week-in-lotus-week-18-2023-lotus-docs) - [This Week in Lotus - Week 13 - Lotus Docs](#this-week-in-lotus-week-13-lotus-docs) - [This Week in Lotus - Week 25 - 2023 - Lotus Docs](#this-week-in-lotus-week-25-2023-lotus-docs) - [This Week in Lotus - Week 27 - 2023 - Lotus Docs](#this-week-in-lotus-week-27-2023-lotus-docs) - [This Week in Lotus - Week 20 - 2023 - Lotus Docs](#this-week-in-lotus-week-20-2023-lotus-docs) - [This Week in Lotus - Week 21 - 2023 - Lotus Docs](#this-week-in-lotus-week-21-2023-lotus-docs) - [This Week in Lotus - Week 28 - 2023 - Lotus Docs](#this-week-in-lotus-week-28-2023-lotus-docs) - [This Week in Lotus - Week 26 - 2023 - Lotus Docs](#this-week-in-lotus-week-26-2023-lotus-docs) - [This Week in Lotus - Week 14 - Lotus Docs](#this-week-in-lotus-week-14-lotus-docs) - [This Week in Lotus - Week 42 - 2023 - Lotus Docs](#this-week-in-lotus-week-42-2023-lotus-docs) - [This Week in Lotus - Week 41 - 2023 - Lotus Docs](#this-week-in-lotus-week-41-2023-lotus-docs) - [This Week in Lotus - Week 16 - Lotus Docs](#this-week-in-lotus-week-16-lotus-docs) - [This Week in Lotus - Week 38 - 2023 - Lotus Docs](#this-week-in-lotus-week-38-2023-lotus-docs) - [This Week in Lotus - Week 15 - Lotus Docs](#this-week-in-lotus-week-15-lotus-docs) - [This Week in Lotus - Week 32 - 2023 - Lotus Docs](#this-week-in-lotus-week-32-2023-lotus-docs) - [Blog - Lotus Docs](#blog-lotus-docs) - [Blog - Lotus Docs](#blog-lotus-docs) - [Blog - Lotus Docs](#blog-lotus-docs) - [Lotus Node Clusters (Deprecated) - Lotus Docs](#lotus-node-clusters-deprecated-lotus-docs) - [Blog - Lotus Docs](#blog-lotus-docs) - [Blog - Lotus Docs](#blog-lotus-docs) - [Blog - Lotus Docs](#blog-lotus-docs) - [This Week in Lotus - Week 7 - 2023 - Lotus Docs](#this-week-in-lotus-week-7-2023-lotus-docs) - [This Week in Lotus - Week 45 - Lotus Docs](#this-week-in-lotus-week-45-lotus-docs) - [This Week in Lotus - Week 31 - Lotus Docs](#this-week-in-lotus-week-31-lotus-docs) - [This Week in Lotus - Week 23 - Lotus Docs](#this-week-in-lotus-week-23-lotus-docs) - [This Week in Lotus - Week 22 - Lotus Docs](#this-week-in-lotus-week-22-lotus-docs) - [This Week in Lotus - Week 37 - Lotus Docs](#this-week-in-lotus-week-37-lotus-docs) - [This Week in Lotus - Week 13 - 2023 - Lotus Docs](#this-week-in-lotus-week-13-2023-lotus-docs) - [This Week in Lotus - Week 44 - Lotus Docs](#this-week-in-lotus-week-44-lotus-docs) - [This Week in Lotus - Week 6 - 2023 - Lotus Docs](#this-week-in-lotus-week-6-2023-lotus-docs) - [This Week in Lotus - Week 14 - 2023 - Lotus Docs](#this-week-in-lotus-week-14-2023-lotus-docs) - [This Week in Lotus - Week 38 - Lotus Docs](#this-week-in-lotus-week-38-lotus-docs) - [This Week in Lotus - Week 30 - Lotus Docs](#this-week-in-lotus-week-30-lotus-docs) --- # Lotus Docs - Home Lotus ===== Lotus is the reference implementation for the Filecoin network. It is written in Go. It was originally developed at Protocol Labs and is now maintained by the FilOz team. This website contains all the information you need to spin up a Lotus node, become a Filecoin storage provider, or just tinker around with the Filecoin network! [**Install Lotus →**](https://lotus.filecoin.io/lotus/install/prerequisites/) ![]() ![](data:image/svg+xml,%3Csvg height=%22400%22 viewBox=%220 0 400 400%22 width=%22400%22 xmlns=%22http://www.w3.org/2000/svg%22%3E%3Cg fill=%22none%22 fill-rule=%22evenodd%22 transform=%22translate(100 100)%22%3E%3Cpath d=%22m99.7000822 199.345425C44.6715107 199.556111-.24848926 154.53135.0 99.2018258c.25055836-54.6971429 44.9515107-99.53142859 100.353416-99.2018258 54.609523.3256353 99.460952 45.0189686 99.034285 100.514207-.419047 54.455238-44.817143 99.007619-99.6876188 98.831218%22 fill=%22%230090ff%22/%3E%3Cpath d=%22m112.082939 91.6172544c8.693334 1.2285714 17.190477 2.4266666 25.950477 3.6647619.737142-2.6361905 1.363809-4.8838096 2.081904-7.4533334-9.009524-1.3333333-17.607619-2.6057143-26.84-3.9714285 3.104762-10.9866667 5.786667-21.4914286 9.140953-31.7809524 1.104762-3.3866667 3.573333-6.5657143 6.089523-9.1961905 3.300953-3.4476191 7.868572-2.6838095 10.664762 1.1047619 1.171429 1.5866667 2.274286 3.2647619 3.678096 4.6228571 1.792381 1.7314286 4.434285 2.5733334 6.234285.8876191 1.182857-1.1066667 1.144762-3.7104762 1.255238-5.6685714.04381-.7866667-.883809-1.712381-1.525714-2.4380953-3.125714-3.5390476-7.348571-4.7923809-11.807619-4.9790476-9.948571-.4171429-17.087619 4.6552381-22.693333 12.3219048-5.554286 7.5980952-7.990476 16.5314285-10.641905 25.36-.773333 2.5771428-1.43619 5.1885714-2.213333 8.0171428-9.6857146-1.4019047-18.9771432-2.7466666-28.539048-4.127619-.3390476 2.5809524-.6552381 5.0019047-.9923809 7.5733333 9.4666666 1.4571429 18.5238095 2.8495238 27.8838095 4.2895238-1.2533333 5.28-2.4209524 10.207619-3.6209524 15.262857-9.1809524-1.283809-17.8857143-2.497143-26.6495238-3.723809-.3714286 2.830476-.6514286 4.969523-.9828571 7.487619 8.8019047 1.344762 17.287619 2.64 25.8304762 3.944762.0.963809.1047619 1.523809-.0171429 2.032381-2.7257143 11.617142-5.2609524 23.285714-8.3180952 34.813333-1.4609524 5.497143-3.8114286 10.803809-8.3809524 14.666667-3.7619048 3.179047-7.8952381 2.647619-10.7238095-1.297143-1.2780953-1.777143-2.344762-3.887619-4.032381-5.133334-1.232381-.912381-3.9752381-1.460952-4.88-.729523-1.3409524 1.085714-2.312381 3.487619-2.1980952 5.251428.0971428 1.56381 1.6019047 3.392381 2.9828571 4.459048 4.6533333 3.582857 10.1295238 4.102857 15.6780952 3.011428 9.2933334-1.830476 15.8476191-7.628571 19.9104762-15.828571 3.192381-6.445714 5.5828572-13.329524 7.8419052-20.180953 2.045714-6.203809 3.434285-12.624761 5.167619-19.169523 9.127619 1.323809 18.074285 2.620952 27.205714 3.944762.754286-2.605715 1.434286-4.96381 2.167619-7.502858-9.554286-1.403809-18.670476-2.746666-27.864762-4.099047 1.104762-5.396191 2.087619-10.2019049 3.158095-15.4361906%22 fill=%22%23fff%22/%3E%3C/g%3E%3C/svg%3E) What is Filecoin? ----------------- Filecoin is a network of computers that allows you to store your data online. But while online storage services aren't anything new, Filecoin is different. It doesn't use centralized servers to store your data or rely on aggressive analytics tactics to make a profit and pay its shareholders. You can find out more about Filecoin and how it works over at [docs.filecoin.io →](https://docs.filecoin.io/) What is Lotus? -------------- Lotus is a command-line application that lets you interact with Filecoin. You can do this by uploading and downloading files, renting out your storage to other users, and checking that computers are storing data correctly. The Lotus project is split into three main applications: the `lotus daemon`, `lotus miner`, and `lotus worker`. Still confused? [Take a look at the _What is Lotus_ page →](https://lotus.filecoin.io/lotus/get-started/what-is-lotus/) ![](https://lotus.filecoin.io/images/lotus-terminal-screenshot.png) Getting started with Lotus -------------------------- The Lotus project is actually a suite of command-line applications. The `lotus` daemon is available as a client for users to store data, the `miner` daemon is for storage providers to rent their storage to users, and the `worker` daemon allows storage-providers to split tasks across multiple computers. You can get started quickly by following these guides: * [Install and launch a Lotus node →](https://lotus.filecoin.io/lotus/install/prerequisites/) * [Create a wallet and send or receive FIL to your address →](https://lotus.filecoin.io/lotus/manage/manage-fil/) * [Learn about being a storage provider →](https://lotus.filecoin.io/storage-providers/get-started/overview/) Need help? ---------- Reach out to the Lotus team and the Filecoin community through these links: [![]()\ \ Lotus Discussions](https://github.com/filecoin-project/lotus/discussions) [![]()\ \ Filecoin Slack](https://filecoinproject.slack.com/archives/CP50PPW2X) [![]()\ \ GitHub Issues](https://github.com/filecoin-project/lotus/issues) --- # What is Lotus - Lotus Docs What is Lotus ============= This sounds like a simple question; what is Lotus? And the surface-level answer is: > Lotus is the reference node implementation for the Filecoin network. ![High Level Lotus Suite](https://lotus.filecoin.io/lotus/get-started/what-is-lotus/High-Level-Lotus-Suite_hu46f9931703ca6917a3d49082bcb430a7_87466_20x0_resize_box_3.png) At a high level the Lotus Suite consists of the `Lotus`, `Lotus-Miner` and `Lotus-Worker` programs. This section of the docs will focus on the `Lotus` programs. If you understood all that, great! You can leave this page and start diving into the rest of the documentation. However, if that sentence left you with more questions, then fear not! We’re going to cover everything you need to know _without_ assuming you know anything about crypto, blockchain, web3. By the end of this page you should understand each word in that surface-level answer. The Filecoin network [#](https://lotus.filecoin.io/lotus/get-started/what-is-lotus/#the-filecoin-network) ---------------------------------------------------------------------------------------------------------- Let’s start at the end. ### Network [#](https://lotus.filecoin.io/lotus/get-started/what-is-lotus/#network) A **network** is a group of computers that talk to each other and exchange information. The internet is the biggest network in the world, and you’re using it right now. But a network can also be very small, all you need is at least two computers that can communicate with each other. ### Filecoin [#](https://lotus.filecoin.io/lotus/get-started/what-is-lotus/#filecoin) **Filecoin** is a protocol. That means that it’s a collection of rules and processes that computers need to follow to be part of the network. If a computer does not follow the rules, then they are ignored by the rest of the computers on the network. You might have heard of HTTP before; it’s the thing right at the start of a website link: http://example.com HTTP is a set of rules that computers need to follow so that they can share websites with each other. If a computer doesn’t know what HTTP is then it won’t know what to do when you ask it to go to a website. The Filecoin protocol lets users store data on any of the computers in the network. Once the data has been stored, users can retrieve the data from the computers on the network. That data can be anything; pictures, music, videos, research data, encrypted archives, anything! If it can be stored digitally then it can be stored using Filecoin. So let’s review. _The Filecoin network_ is: * A group of computers that are all following the same set of rules to allow users to store pretty much anything on the computers A reference node implementation [#](https://lotus.filecoin.io/lotus/get-started/what-is-lotus/#a-reference-node-implementation) -------------------------------------------------------------------------------------------------------------------------------- Again, let’s start at the end. ### Implementation [#](https://lotus.filecoin.io/lotus/get-started/what-is-lotus/#implementation) An **implementation** is _one way_ to do _something_. Take this table from Ikea as an example: ![A wooden table from Ikea.](https://lotus.filecoin.io/lotus/get-started/what-is-lotus/ingo-table_hu5447662ea748c96b84cebeb0ffa2fcb0_45349_20x0_resize_box_3.png) It’s called Ingo, because Ikea likes to give their products fun names. Ingo is not the only table in the world; there are many more tables that exist. However, Ingo serves the primary functions of a table: it’s flat, has legs to keep the surface off the floor, and you can put things on top of it. It’s one implementation, or application, of the table idea. * _Ingo_ is an _object_ that you can use as a _table_. * _Lotus_ is an _application_ that a computer can use to do _Filecoin stuff_. ### Node [#](https://lotus.filecoin.io/lotus/get-started/what-is-lotus/#node) A **node** is a computer that can talk to other computers on a network. In your home network there’s probably a computer, a TV, and maybe a printer. Each node on your home network has programs that tell it how to talk to the other nodes on the network. Without these programs, the nodes wouldn’t be able to understand each other, and would be pretty useless. In the case of Lotus, a _Lotus node_ is a computer on a network that is running the Lotus application. ### Reference [#](https://lotus.filecoin.io/lotus/get-started/what-is-lotus/#reference) Other computers refer to this node for how to talk to other computers. So let’s review. A _node implementation_ is: * An application that tells computers how to talk to other computers on the Filecoin network In summary [#](https://lotus.filecoin.io/lotus/get-started/what-is-lotus/#in-summary) -------------------------------------------------------------------------------------- Hopefully that all made sense, so let’s put all this together. > Lotus is the reference node implementation for the Filecoin network. To translate, Lotus is: * An application that tells computers how to talk to other computers that are all following the same set of rules to allow users to store pretty much anything on the computers Why Filecoin [#](https://lotus.filecoin.io/lotus/get-started/what-is-lotus/#why-filecoin) ------------------------------------------------------------------------------------------ This page should have cleared things up regarding what Lotus is. But you may still have questions about Filecoin itself, like: * why do we need Filecoin? * what’s wrong with the normal way of storing things? * how can I store my stuff on Filecoin? * how much does it cost to store things on Filecoin? To get the answers to these questions, head on over to the [Filecoin documentation website](https://docs.filecoin.io/) . This website is specific to Lotus documentation only. [Edit this page on GitHub](https://github.com/filecoin-project/lotus-docs/blob/main/content/en/lotus/get-started/what-is-lotus/index.md) [← Devnet - Local network](https://lotus.filecoin.io/lotus/developers/local-network/) [Networks →](https://lotus.filecoin.io/lotus/get-started/networks/) --- # Prerequisites - Lotus Docs Prerequisites ============= Please make sure to read the pages in the [Get started section](https://lotus.filecoin.io/lotus/get-started/what-is-lotus/) before proceeding with the installation of Lotus. This page provide details on prerequisites before Lotus installation prerequisites and supported platforms. Minimal requirements [#](https://lotus.filecoin.io/lotus/install/prerequisites/#minimal-requirements) ------------------------------------------------------------------------------------------------------ To run a Lotus node your computer must have: * macOS or Linux installed. Windows is not yet supported. * 8-core CPU and 32 GiB RAM. Models with support for _Intel SHA Extensions_ (AMD since Zen microarchitecture or Intel since Ice Lake) will significantly speed things up. * Enough space to store the current Lotus chain (preferably on an SSD storage medium). The chain grows at approximately 38 GiB per day. The chain can be [synced from trusted state snapshots and compacted or pruned](https://lotus.filecoin.io/lotus/manage/chain-management/) . ❗ These are the minimal requirements to run a Lotus node. [Hardware requirements for storage providers](https://lotus.filecoin.io/storage-providers/get-started/hardware-requirements/) are different. Supported Platforms [#](https://lotus.filecoin.io/lotus/install/prerequisites/#supported-platforms) ---------------------------------------------------------------------------------------------------- Currently, lotus installation is supported on the following platforms. * [Linux](https://lotus.filecoin.io/lotus/install/linux/) * [MacOS](https://lotus.filecoin.io/lotus/install/macos/) [Edit this page on GitHub](https://github.com/filecoin-project/lotus-docs/blob/main/content/en/lotus/install/prerequisites.md) [← Contribute](https://lotus.filecoin.io/lotus/developers/contribute/) [Lotus on Linux →](https://lotus.filecoin.io/lotus/install/linux/) --- # Manage FIL - Lotus Docs Manage FIL ========== This guide will show you how to create and manage a Lotus wallet and how to use it to send some Filecoin to a different address. Each node can have multiple addresses. To receive and send FIL with Lotus, you will need to have a Lotus node installed and running. About Wallet Addresses [#](https://lotus.filecoin.io/lotus/manage/manage-fil/#about-wallet-addresses) ------------------------------------------------------------------------------------------------------ When using a wallet, an account is identified by its [address](https://docs.filecoin.io/basics/what-is-filecoin/overview/) . A Filecoin address always starts with the letter `f` (`t` for testnets) and a digit that indicates what type of address it is. Filecoin accounts have two kinds of address, longer **public key** addresses, and shorter **ID** addresses. Both addresses refer to the same account and can be used to send and receive FIL using a wallet. ### Public Key Address [#](https://lotus.filecoin.io/lotus/manage/manage-fil/#public-key-address) A [public key address](https://docs.filecoin.io/basics/the-blockchain/addresses/#public-keys) is derived directly from a cryptographic key. Public key addresses start with the characters `f1` (secp256k1) or `f3` (BLS), depending on the type of encryption key used. Here’s an example of a secp256k1 public key address: `f1abjxfbp274xpdqcpuaykwkfb43omjotacm2p3za`. Public key addresses are the most common way to refer to Filecoin accounts, and they are supported by hardware wallets like [Ledger](https://ledger.com/) . Because a public key address does not depend on any blockchain state, they are considered [robust](https://docs.filecoin.io/basics/the-blockchain/addresses/#actor-ids) and are recommended for most use cases involving transfers of FIL, for example, when sending FIL to another user through an exchange. ### ID Address [#](https://lotus.filecoin.io/lotus/manage/manage-fil/#id-address) ID addresses are a compact and more “human friendly” way to refer to an account than public key addresses. ID addresses always start with the characters `f0` (or `t0` for testnets), followed by a sequence of digits, for example: `f033259`. Every ID address for a Filecoin account has an alternative public key address that corresponds to the same account. You can find the ID address for any public key address by searching for the public key address on [FilFox](https://filfox.info/) , a Filecoin block explorer. Because they are more compact than public key addresses, ID addresses are often used when referring to storage providers and other long-lived Filecoin [Actors](https://docs.filecoin.io/basics/the-blockchain/actors/) . As these actors receive a large volume of messages, the compact address can result in meaningful savings in gas fees. A multisig wallet is a type of Actor. While you can send FIL to an ID address using a wallet, you should first check the details for the account on [FilFox](https://filfox.info/) to see when the account was created, as well as the corresponding public key address. If the address was created very recently (within the [finality period](https://docs.filecoin.io/reference/glossary/#finality) ) there is a small chance that it could be re-assigned as the network reaches consensus, and the public key address should be used instead. More information about addresses can be found in the [Filecoin address docs](https://docs.filecoin.io/basics/the-blockchain/addresses/) . Creating a wallet [#](https://lotus.filecoin.io/lotus/manage/manage-fil/#creating-a-wallet) -------------------------------------------------------------------------------------------- Creating wallets using Lotus is very simple. There are multiple wallet types to choose from. ❗ The information for the addresses in your wallet is stored in the `~/.lotus/keystore` (or `$LOTUS_PATH/keystore`). Removing these folders will also remove the keys, and you will lose control of any funds in those wallets. We recommend [backing up your wallets](https://lotus.filecoin.io/lotus/manage/manage-fil/#exporting-and-importing-addresses) as soon as they have been created or using a [hardware wallet](https://lotus.filecoin.io/lotus/manage/ledger/) . ### Create a BLS wallet [#](https://lotus.filecoin.io/lotus/manage/manage-fil/#create-a-bls-wallet) lotus wallet new bls f3ryb26aqsxkq6cj6bs5inp5ssxkkw24l3st2uojcc5kh3vhtdqjt67zdhougqwrsvm4baagm7bclhmxs5crbq ### Create a secp256k1 wallet [#](https://lotus.filecoin.io/lotus/manage/manage-fil/#create-a-secp256k1-wallet) lotus wallet new f1x37y5ekmq2yq5phcine3jvtrqgaxsjrdhpvmksa ### Create a multisig wallet [#](https://lotus.filecoin.io/lotus/manage/manage-fil/#create-a-multisig-wallet) A multi-signature (multisig) wallet refers to a wallet that requires multiple keys to authorize a `FIL` transactions. lotus msig create address1 address2.. sent create in message: bafy2bzaceagbn6eb643pirmqvuvy23pbhi6reh3yr6wtlqr2ywetomlo2giku waiting for confirmation.. Created new multisig: t01004 t2ff7ch2h7qr6f4q5lmvq3ajo6lxucei46attp3ai If you want to read more about multisignature wallets and how they function, you can go to the [multisig page](https://lotus.filecoin.io/lotus/manage/multisig/) . Listing addresses [#](https://lotus.filecoin.io/lotus/manage/manage-fil/#listing-addresses) -------------------------------------------------------------------------------------------- You can create as many addresses as you need. One of them will be the _default address_. You can see a list of all addresses for your current node: lotus wallet list Address Balance Nonce Default f1x37y5ekmq2yq5phcine3jvtrqgaxsjrdhpvmksa 100 FIL 1 f3ryb26aqsxkq6cj6bs5inp5ssxkkw24l3st2uojcc5kh3vhtdqjt67zdhougqwrsvm4baagm7bclhmxs5crbq 10 FIL 4 X You can see that your default address is marked with an X in the `lotus wallet list` output. You can also check it with: lotus wallet default f3ryb26aqsxkq6cj6bs5inp5ssxkkw24l3st2uojcc5kh3vhtdqjt67zdhougqwrsvm4baagm7bclhmxs5crbq If you wish, you can change the default address to a different one with the `set-default` command: lotus wallet set-default
Default address set to: t1ehwusalfn3wrng3zis4rhybdexgrtgsj6vp7fly Obtaining FIL [#](https://lotus.filecoin.io/lotus/manage/manage-fil/#obtaining-fil) ------------------------------------------------------------------------------------ For non-mainnet networks like Calibration, `FIL` can be obtained from several faucets. You can find a list of Calibration network faucets in the [Calibration network resources section in the Filecoin](https://docs.filecoin.io/networks/calibration#resources) documentation. For mainnet, there is a [Forest faucet available](https://docs.filecoin.io/networks/mainnet#resources) that distributes very small amounts of FIL (0.01 FIL). For larger amounts, the easiest way is to buy `FIL` from an exchange. Not all exchanges support `FIL`, so do your research before signing up. Once you have received some `FIL`, use `wallet balance` to check your balance: lotus wallet balance
100 FIL 💡 Remember that you will only see the latest balance when your daemon is fully synced. Sending FIL [#](https://lotus.filecoin.io/lotus/manage/manage-fil/#sending-fil) -------------------------------------------------------------------------------- Use the `send` command followed by the receiving address and the amount of `FIL` you want to send # lotus send lotus send f1zp2... 3 bafy1... Lotus will output a transaction hash after a successful transaction. You can view details of this transaction using a [Filecoin explorer](https://docs.filecoin.io/get-started/explore-the-network/#block-explorers) . Lotus assumes you want to send `FIL` from the _default address_. To send FIL from a specific address, use `--from` followed by the address you want to send `FIL` from. This address must have been created or imported to your Lotus node. # lotus send --from= lotus send --from f1zp2... f15zt... 3.141 bafy2... For more advanced sending options you can always check out the command line helptext by adding `--help` or `-h` after the command: lotus send --help NAME: lotus send - Send funds between accounts USAGE: lotus send [command options] [targetAddress] [amount] CATEGORY: BASIC OPTIONS: --force Deprecated: use global 'force-send' (default: false) --from value optionally specify the account to send funds from --gas-feecap value specify gas fee cap to use in AttoFIL (default: "0") --gas-limit value specify gas limit (default: 0) --gas-premium value specify gas price to use in AttoFIL (default: "0") --method value specify method to invoke (default: 0) --nonce value specify the nonce to use (default: 0) --params-hex value specify invocation parameters in hex --params-json value specify invocation parameters in json ### Specify Invocation Parameters [#](https://lotus.filecoin.io/lotus/manage/manage-fil/#specify-invocation-parameters) If you want specify invocation parameters using `lotus send`, you can use the following code-snippet to get the encoded parameters lotus chain encode params --encoding=hex Mapped method <> method id can be found in the [Filecoin GitHub repository](https://github.com/filecoin-project/specs-actors/blob/master/actors/builtin/methods.go) . Then to send it, run: lotus send --params-hex= ### Transaction fees [#](https://lotus.filecoin.io/lotus/manage/manage-fil/#transaction-fees) Every transaction that sends `FIL` pays an additional fee based on its _gas_ usage. Gas and fees are explained in the [How Filecoin Works guide](https://docs.filecoin.io/about-filecoin/how-filecoin-works/#the-network) . By default, Lotus automatically sets all the necessary values. However, you may want to use the `--gas-feecap` flag in the `send` command to avoid surprises when network congestion is high. For more information about messages and fees, see the [Message Pool guide](https://lotus.filecoin.io/lotus/manage/message-pool/) and [Gas fees](https://docs.filecoin.io/smart-contracts/filecoin-evm-runtime/how-gas-works/) sections. ### Transfer FIL from/to ETH addresses [#](https://lotus.filecoin.io/lotus/manage/manage-fil/#transfer-fil-fromto-eth-addresses) Lotus users can use the Lotus CLI to transfer FIL from an `f1...` address to a `0xb...` address using the following process: 1. Get the f04 address from an Ethereum-style address: lotus evm stat 0xb.... Filecoin address: f410fx... Eth address: 0xb... Actor lookup failed for faddr f410fx... with error: resolution lookup failed (f410fx...): resolve address f410fx...: actor not found The above error is because the `f410fx...` address doesn’t exist on-chain yet. 2. Send FIL to initialize the address on-chain: lotus send --from f1... f410... 1.00 bafy2bza... 3. Check the chain info to see the new actor for 0xb… lotus evm stat 0xb... Filecoin address: f410fx... Eth address: 0xb... ID address: f02... Code cid: bafk2bz... Actor Type: fil/11/placeholder Exporting and importing addresses [#](https://lotus.filecoin.io/lotus/manage/manage-fil/#exporting-and-importing-addresses) ---------------------------------------------------------------------------------------------------------------------------- ❗ Keep your addresses' private keys safe! Do not share them with anyone! Store them in a secure location! You can export a wallet from a Lotus node, and re-import it to a different Lotus node. Use `wallet export` to export an address from a node: lotus wallet export
>
.key Use `wallet import` to import an address into a node: lotus wallet import /path/to/
.key imported key t1x37y5ekmq2yq5phcine3jvtrqgaxsjrdhpvmksa successfully! ### Offline nodes [#](https://lotus.filecoin.io/lotus/manage/manage-fil/#offline-nodes) If your Lotus nodes is offline and not synced, you can still import the addresses to another Lotus node. Each Lotus node stores its wallet in `~/.lotus/keystore`: ~/.lotus/keystore/ ├── MF2XI2... ├── MRSWMYLVNR... ├── NRUWE4BSOA... ├── O5QWY3DFOQWWMM3RNZSXI6TKOJYHQYTMMQZHQNDBNRY... └── O5QWY3DFOQWWMM3VOBZHAZLCOIZGINLDMRZWWNLMNJS... The filename for the keys are base32 encoded, so you can find which address is which by decoding the string. To export a wallet when a node is offline, copy these files _from_ `~/.lotus/keystore` to another location. To import this wallet, copy these files _into_ `~/.lotus/keystore`. The Lotus node will automatically use these keys when it next starts. ### Deleting addresses [#](https://lotus.filecoin.io/lotus/manage/manage-fil/#deleting-addresses) ❗ Please note that Lotus only performs a soft deletion of the address with the `delete` command, marking the address as unusable, without erasing the data itself from the database. You will have to manually go into `~/.lotus/keystore` and actually deleting the address itself for permanent removal. You can delete an address in your wallet with the `lotus wallet delete` command. lotus wallet delete
Soft deleting address: t1ceuikq3zsznu5tghv3ft7j6mmtdygqx7sjpezlq Hard deletion of the address in `~/.lotus/keystore` is needed for permanent removal ❗ Please note that Lotus only performs a soft deletion of the address with the `delete` command, marking the address as unusable, without erasing the data itself from the database. You will have to manually go into `~/.lotus/keystore` and actually deleting the address itself for permanent removal. [Edit this page on GitHub](https://github.com/filecoin-project/lotus-docs/blob/main/content/en/lotus/manage/manage-fil/index.md) [← Lotus Bootstrap Node](https://lotus.filecoin.io/lotus/configure/bootstrap/) [Using Ledger →](https://lotus.filecoin.io/lotus/manage/ledger/) --- # Blog - Lotus Docs Blog ==== [This Week in Lotus - Week 1 - 2024](https://lotus.filecoin.io/blog/this-week-in-lotus-week-1-2024/) ----------------------------------------------------------------------------------------------------- Posted January 7, 2024 by  ‐ **3 min read** [This Week in Lotus - Week 50 - 2023](https://lotus.filecoin.io/blog/this-week-in-lotus-week-50-2023/) ------------------------------------------------------------------------------------------------------- Posted December 16, 2023 by  ‐ **3 min read** [This Week in Lotus - Week 49 - 2023](https://lotus.filecoin.io/blog/this-week-in-lotus-week-49-2023/) ------------------------------------------------------------------------------------------------------- Posted December 8, 2023 by  ‐ **3 min read** [This Week in Lotus - Week 47 - 2023](https://lotus.filecoin.io/blog/this-week-in-lotus-week-47-2023/) ------------------------------------------------------------------------------------------------------- Posted November 25, 2023 by  ‐ **2 min read** [This Week in Lotus - Week 46 - 2023](https://lotus.filecoin.io/blog/this-week-in-lotus-week-46-2023/) ------------------------------------------------------------------------------------------------------- Posted November 19, 2023 by  ‐ **2 min read** [This Week in Lotus - Week 45 - 2023](https://lotus.filecoin.io/blog/this-week-in-lotus-week-45-2023/) ------------------------------------------------------------------------------------------------------- Posted November 13, 2023 by  ‐ **2 min read** [This Week in Lotus - Week 44 - 2023](https://lotus.filecoin.io/blog/this-week-in-lotus-week-44-2023/) ------------------------------------------------------------------------------------------------------- Posted November 3, 2023 by  ‐ **2 min read** * [««](https://lotus.filecoin.io/blog#) * [«](https://lotus.filecoin.io/blog#) * [1](https://lotus.filecoin.io/blog#) * [2](https://lotus.filecoin.io/blog/page/2/) * [3](https://lotus.filecoin.io/blog/page/3/) * [4](https://lotus.filecoin.io/blog/page/4/) * [5](https://lotus.filecoin.io/blog/page/5/) * [»](https://lotus.filecoin.io/blog/page/2/) * [»»](https://lotus.filecoin.io/blog/page/13/) --- # Building with Lotus APIs - Lotus Docs Building with Lotus APIs ======================== Several API client libraries are available. These libraries manage the low-level logic of connecting to Lotus node, making requests, and handing the responses. * [filecoin.js](https://filecoin-shipyard.github.io/filecoin.js/) * [filecoin-js-signer](https://github.com/blitslabs/filecoin-js-signer) * [Filecoin Signing Tools](https://github.com/Zondax/filecoin-signing-tools) To use the complete API, we’ll need to run our own node locally. For read-only access, you can also use a hosted node such as those provided by [Chain.Love](https://lotus.filecoin.io/developers/chain-love/) . In this tutorial we’ll set up a Lotus node locally and use the filecoin.js library to interact with it. Prerequisites [#](https://lotus.filecoin.io/tutorials/lotus/build-with-lotus-api/#prerequisites) ------------------------------------------------------------------------------------------------- Before getting started, you should be familiar with: * [How Filecoin works](https://docs.filecoin.io/basics/what-is-filecoin/overview/) * [What is Lotus](https://lotus.filecoin.io/lotus/get-started/what-is-lotus/) * [Using the Lotus command line](https://lotus.filecoin.io/lotus/manage/lotus-cli/) Also, make sure you have the following dependencies installed with the latest version: * [Node.js](https://nodejs.org/) * [NPM](https://www.npmjs.com/) * The dependencies listed on the [Install a Lotus node page](https://lotus.filecoin.io/lotus/install/prerequisites/) Setup [#](https://lotus.filecoin.io/tutorials/lotus/build-with-lotus-api/#setup) --------------------------------------------------------------------------------- In this section, we’ll set up a Lotus node, install the filecoin.js library, and confirm that they work together correctly. ### Lotus node [#](https://lotus.filecoin.io/tutorials/lotus/build-with-lotus-api/#lotus-node) The following steps walk through how to install a Lotus node.. Further, more detailed, instructions are available on the [Install a Lotus node page](https://lotus.filecoin.io/docs/set-up/install/) . 1. Download the Lotus source code. The version number of the latest release can be found on the [lotus releases](https://github.com/filecoin-project/lotus/releases) page: git clone https://github.com/filecoin-project/lotus.git cd lotus LATEST_RELEASE=$(git tag -l 'v*' | grep -v "-" | sort -V -r | head -n 1) # Finds the latest Lotus Node release git checkout $LATEST_RELEASE # if you need a specific release use git checkout 2. Build and install Lotus for the Calibration network: make clean calibnet sudo make install 3. Download the latest chain snapshot using the [CID listed under `Genesis CAR file`](https://docs.filecoin.io/networks/mainnet/details/) . Then sync to the network which will take several hours to fully sync the chain: lotus daemon --import-snapshot curl -sI https://snapshots.calibrationnet.filops.net/minimal/latest.zst 4. [Create a wallet](https://lotus.filecoin.io/lotus/manage/manage-fil/#creating-a-wallet) and request some test FIL from the [Faucet](https://faucet.calibnet.chainsafe-fil.io/) . 5. [Enable remote API access to your Lotus node](https://lotus.filecoin.io/developers/api-access/) . ### Verify your setup [#](https://lotus.filecoin.io/tutorials/lotus/build-with-lotus-api/#verify-your-setup) To make sure everything’s running and set up properly, we should check a couple of things. 1. First, check the status of your local node: lotus sync wait > Worker: 10161; Base: 778820; Target: 778820 (diff: 0) > State: complete; Current Epoch: 778820; Todo: 0 > > Done! This tells us that our node is fully synced and ready to go. 2. Next, let’s check that the test FIL has landed in your wallet: lotus wallet list Address Balance Nonce t154xvuihhicgluafwmohwzwmtmqp44pwwgewyvma 100 FIL 0 This tells us that the testnet’s faucet was able to send us some test FIL. ### Create a Node.js project [#](https://lotus.filecoin.io/tutorials/lotus/build-with-lotus-api/#create-a-nodejs-project) Let us set up a Node.js project with the necessary dependencies. 1. Create a new Node.js project. mkdir build-with-lotus && cd build-with-lotus npm init 2. Install the filecoin.js library. npm install filecoin.js ### Test a simple function [#](https://lotus.filecoin.io/tutorials/lotus/build-with-lotus-api/#test-a-simple-function) Now we are ready to connect to our Lotus node and interact with the Lotus APIs. Let us write a simple script to query the Lotus version to verify if everything works as expected. 1. Create a `chainDataQuery.mjs` file in your project and add the following code. // Import necessary packages import { HttpJsonRpcConnector, LotusClient } from "filecoin.js"; // Use the local node URL to create a connection to your Lotus node const localNodeUrl = "http://127.0.0.1:1234/rpc/v0"; const localConnector = new HttpJsonRpcConnector({ url: localNodeUrl }); // lotusClient exposes all Lotus APIs const lotusClient = new LotusClient(localConnector); const version = await lotusClient.common.version(); console.log(version); 2. Run the following command in your project directory: node chainDataQuery.mjs This will output something like: { Version: '1.15.0+calibnet+git.0ac1bbc7a', APIVersion: 66816, BlockDelay: 30 } If everything is set up correctly, your code will be able to connect to the Lotus node and return the chain data as shown above. Check the [Lotus Troubleshooting](https://lotus.filecoin.io/lotus/manage/troubleshooting/) if you run into any errors here. Get chain data [#](https://lotus.filecoin.io/tutorials/lotus/build-with-lotus-api/#get-chain-data) --------------------------------------------------------------------------------------------------- Blockchain data is a fundamental part of any blockchain network. Using the Lotus API you can query chain data, including tipsets, blocks, messages, network status, storage deals, storage provider details, and more. Let’s look at some common chain data-related packages in the filecoin.js library’s LotusClient: * `LotusClient.common` - get node info * `LotusClient.chain` - interact with the blockchain * `LotusClient.wallet` - manage wallets on the Lotus node * `LotusClient.client` - interact with the storage and retrieval markets as a client * `LotusClient.paych` - interact with and manage payment channels * `LotusClient.state` - query, inspect, and interact with chain state In the previous step, we created a `chainDataQuery.mjs` file to demonstrate the basic steps to connect to the Lotus node and initialize a `LotusClient` to query chain data. Next, let’s use some more functions that don’t require an authentication token. 1. Get current chain head: We can add the following code in `chainDataQuery.mjs` to query current head of the chain. //Query the current block head const chainHead = await lotusClient.chain.getHead(); console.log(chainHead); As a result, it will return the current head of the chain, including current block height, a list of blocks, and a list of CIDs. { Cids: [\ {'/': 'bafy2bzacecdkonmhngylnnhrk4azkg2wkgcm6cnm5qn5sk4ww5cszjlvkgkd6'},\ {'/': 'bafy2bzaceaglcpzhd5gfrzdyt7ce3e5asnbfz3s3stbqyxniziny5snewbpbg'}\ ], Blocks: [\ {...} # long list of additional blocks\ ], Height: 781268 } 2. Get messages in a block //Query all the messages in a block const tipSet = await lotusClient.chain.getTipSetByHeight(781267); const messages = await lotusClient.chain.getBlockMessages(tipSet.Cids[0]); console.log(messages); Using the above code in`chainDataQuery.mjs`, we can also retrieve messages from a certain block height. And the returned message body will look like the following. { BlsMessages: [\ {\ Version: 0,\ To: 't3ukhj6tpkgxjknu54opiaej2vrjz7nh7gzodkqlhpfphc6gxkogzmojv2cnlpgcuwkvnyhloctnc6lmlvceuq',\ From: 't3ws4jhb7g4n5s7t3mwsc2enzfija2kzo3p7vkqdqbiaqrabqhmfxzzy3knrvn3ykp75okab6pse2nxud3ineq',\ ...\ }\ ], SecpkMessages: [ { Message: [Object], Signature: [Object], CID: [Object] } ], Cids: [\ {'/': 'bafy2bzaceapv6ms4m3x4gdaefmpilgsqfhfsrvrciw4iux4n7va47es4vudpa'},\ {'/': 'bafy2bzaceaxaz5ews6a2jnwmeafhi2p5xpwjz7kogilakblp3q3wpxa3ax2xy'}\ ] } 3. Get wallet balance With a given Calibration wallet address, you can query its balance by calling lotusClient.wallet.balance() function. //Query Wallet balance const walletBalance = await lotusClient.wallet.balance("t1ne72cbn6r55wea7ifjv4ypyti7t2df5dumsjhzq"); Apart from the basic data queries shown above, there are many more features. Please see the [Lotus JSON-RPC API Reference](https://lotus.filecoin.io/developers/apis/json-rpc/) for all Lotus API definitions. Note that some API calls require an [authorization token](https://lotus.filecoin.io/developers/api-access/#obtaining-tokens) . Manage wallets and FIL tokens [#](https://lotus.filecoin.io/tutorials/lotus/build-with-lotus-api/#manage-wallets-and-fil-tokens) --------------------------------------------------------------------------------------------------------------------------------- Filecoin wallets hold the addresses that you can use to manage FIL tokens, sign transactions, and pay for gas fees. In this section, we will demonstrate different ways to manage your Filecoin wallet. There are two types of Filecoin wallet: 1. [Lotus wallets](https://lotus.filecoin.io/tutorials/lotus/build-with-lotus-api/#lotus-wallets) that are held directly in Lotus node. 2. [Light wallets](https://lotus.filecoin.io/tutorials/lotus/build-with-lotus-api/#light-wallet) that are detached from any node, and are managed by key-pairs. ### Lotus wallets [#](https://lotus.filecoin.io/tutorials/lotus/build-with-lotus-api/#lotus-wallets) Lotus wallets are created and hosted in the Lotus node. When the Lotus node is running, the wallet is opened in the node and you can manage your wallet’s addresses and balances using the command line or API calls. You will need an authorization token with sign permissions to interact with a wallet. Authorization tokens are often called _auth tokens_. 1. First, let’s make sure your local Lotus node is running and the wallet address contains some testnet FIL. lotus wallet list This will output something like: Address Balance Nonce t154xvuihhicgluafwmohwzwmtmqp44pwwgewyvma 100 FIL 0 2. Next, generate an authorization token with _sign_ permission: lotus auth create-token --perm sign This will output your auth token. Save this somewhere, we’ll be using it later: eyJhbGciOiJIUzI1NiIsInRaaaaaa.xxxxxxx.bbbbbbbbbbbvq1W0ZjqrXHygd6fBRk 3. Create a new file called `lotusWallet.mjs` in the same project as earlier. This is where we’ll write all out wallet-related code. 4. In `lotusWallet.mjs` import modules from filecoin.js and initialize the `HttpJsonRpcConnector`, `LotusClient`, and `LotusWalletProvider` components: import { HttpJsonRpcConnector, LotusWalletProvider, LotusClient} from "filecoin.js"; import BigNumber from "bignumber.js"; // Use your localNodeUrl and auth token to interact with Lotus wallet const localNodeUrl = "http://127.0.0.1:1234/rpc/v0"; const signAuthToken ="" const httpConnector = new HttpJsonRpcConnector({ url: localNodeUrl, token: signAuthToken }); const lotusClient = new LotusClient(httpConnector); const lotusWallet = new LotusWalletProvider(lotusClient); 5. Let’s create a second wallet address so we can test transfers. The new address will be created in your Lotus node and start with 0 token balance: async function newWallet(){ try { const account = await lotusWallet.newAddress(); const hasWallet = await lotusWallet.hasAddress(account); if(hasWallet){console.log("new wallet address: ", account)} } catch (error) { console.log(error); } } // Test newWallet function. newWallet(); 6. Run the script to create the new address: node lotusWallet.mjs This will output something like: new wallet address: t1ax5kdqxrrecxpyys6svvxjing7shqju26ytcsoa 7. You can also verify if the new wallet address is created in your local Lotus node using Lotus CLI command: lotus wallet list This will output something like: Address Balance Nonce Default t154xvuihhicgluafwmohwzwmtmqp44pwwgewyvma 100 FIL 0 X t1ax5kdqxrrecxpyys6svvxjing7shqju26ytcsoa 0 FIL 0 #This is the new created address 8. Now, let’s try to transfer the FIL token to this new address. Under the hood, this will create a transaction to transfer FIL token from `fromAddress` to `toAddress`, sign the transaction using the Lotus wallet, and send the signed transaction to the Lotus node. Fortunately, these processes are taken care of by filecoin.js so that you can do all these by calling the `lotusWallet.sendMessage(params)` methods. Add the following code to `lotusWallet.mjs`: async function transferFIL(){ try { const fromAddress = await lotusWallet.getDefaultAddress(); const toAddress = "t1ax5kdqxrrecxpyys6svvxjing7shqju26ytcsoa"; // SendMessage will create a message, assign a nounce, // Sign the message using the fromAddress and push it to mpool const msgResult = await lotusWallet.sendMessage({ From: fromAddress, To: toAddress, Value: new BigNumber(10000000000000000000)//in autoFIL }); console.log("message: ", msgResult); } catch (error) { console.log(error); } } // Test FIL transfer function transferFIL(); 9. Run the code to test the transfer of FIL: node lotusWallet.mjs This will output a message CID. You can use this CID to check the message by pasting it into a block explorer: message CID: { '/': 'bafy2bzacecrrnelqjqhsspfayzcxmx4nhaw6t7j5dpexuxix5jkgloyze2jpu' } 10. Now, you should have created a new address in your Lotus node and also transferred some FIL tokens to it. Next, let’s query the balance of all your wallet addresses in the Lotus node: async function walletBalance(){ try { //Get the list of wallet address on your Lotus node & query their balance const walletAdds = await lotusWallet.getAddresses(); walletAdds.forEach(async(address) => { try { const balance = await lotusWallet.getBalance(address); console.log(address + " : "+balance); } catch (error) { console.log(error); } }); } catch (error) { console.log(error); } } // Test walletBalance function walletBalance(); 11. Run the code to test the FIL transfer: node lotusWallet.mjs This will output the FIL values in attoFIL: t154xvuihhicgluafwmohwzwmtmqp44pwwgewyvma : 89999999675971952500 t1ax5kdqxrrecxpyys6svvxjing7shqju26ytcsoa : 10000000000000000000 12. You can also check the balance directly in your Lotus node through the command line: lotus wallet list This will output something like: Address Balance Nonce Default t154xvuihhicgluafwmohwzwmtmqp44pwwgewyvma 89.9999996759719525 FIL 2 X t1ax5kdqxrrecxpyys6svvxjing7shqju26ytcsoa 10 FIL Notice that the sum of both balances is slightly less than 100 FIL. This is because we had to pay gas to transfer FIL from one address to another. Every process that makes a _state change_ on the blockchain incurs a gas cost. ### Light wallets [#](https://lotus.filecoin.io/tutorials/lotus/build-with-lotus-api/#light-wallets) The `filecoin.js` library also supports creating a light wallet using a _mnemonic_ and a password. As long as you have the mnemonic and password of your wallet, you can recover it anywhere and use it by sending PRC requests to any Lotus full nodes. 1. In your `build-with-lotus` project, let’s create a `lightWallet.mjs` file. Since we are using a light wallet, we will use the Chain.Love hosted endpoint as the connection to the Filecoin network to send transactions. First, we import all the modules and create a connection and lightWallet client using the Chain.Love’s endpoint’s URL: import { HttpJsonRpcConnector, LotusClient, LightWalletProvider,MnemonicWalletProvider} from "filecoin.js"; import BigNumber from "bignumber.js"; const chainLoveNodeurl = "https://calibration.filecoin.chain.love"; const chainLoveNodeConn = new HttpJsonRpcConnector({url:chainLoveNodeurl}); const chainLoveClient = new LotusClient(chainLoveNodeConn); 2. When creating a light wallet using the BIP39 standard, it is very important to backup the mnemonic code, the `encryptedWallet` object, and your password. Do not share them — anyone who has this information will have control of your light wallet and assets! async function createLightWallet(){ try { const lightWallet = new LightWalletProvider(chainLoveClient, () => { return '' }, 'test'); let mnemonic = await lightWallet.createLightWallet(''); console.log(mnemonic); let encryptedWallet = lightWallet.keystore.serialize(); console.log(encryptedWallet); const lightWalletAddress = await lightWallet.getDefaultAddress(); console.log(lightWalletAddress); } catch (error) { console.log(error); } } // Test the function createLightWallet() 3. Calling the `createLightWallet()` function will output your mnemonic, `encryptedWallet` object, and your wallet address: mnemonic: mouse escape tilt destroy xxx top yyy spice art zzz price image encryptedWallet: {......} Wallet Address: t1qfyuosiqgoycy5ojwsxtpnlp44orxg4gtmuhhaq Make sure to backup these three items by saving and storing `encryptedWallet` as a json file, and recording mnemonic and wallet address somewhere safe. 4. Request some FIL tokens from the [Calibration Faucet](https://faucet.calibnet.chainsafe-fil.io/funds.html) using the wallet address you just received. 5. Next let’s transfer some FIL from your light wallet to another wallet: async function sendFromLightWallet(){ try { //This is just for demo. We do NOT recommend exposing your mnemonic and password in code. const mnemonic = ''; const pw = ''; const lightWallet = new LightWalletProvider(glifClient, () => { return pw }, 'test'); await lightWallet.recoverLightWallet(mnemonic, pw); const lightWalletAddress = await lightWalletHttp.getDefaultAddress(); //Create a FIL transfer message const message = await lightWallet.createMessage({ From: lightWalletAddress, To: "t1ax5kdqxrrecxpyys6svvxjing7shqju26ytcsoa", Value: new BigNumber(15000000000000000000)//in autoFIL }); //Sign and send the message const signedMessage = await lightWallet.signMessage(message); const msgCid = await lightWallet.sendSignedMessage(signedMessage); console.log(msgCid); } catch (error) { console.log(error); } } // Test the function sendFromLightWallet(); 6. Run the code to test this transfer: node lightWallet.mjs This will output a message CID. { '/': 'bafy2bzaceamdsqcc3jccrhvwrz6kmpujfkg6crwynmrtal2nsmwkqv22bktrs' } After the message containing this transfer makes it on-chain, you will be able to see it using the [Filecoin Calibration Explorer](https://calibration.filscan.io/tipset/message-list) website. By this point we’ve learned how to create a wallet on the Lotus node using an RPC API call, as well as create a light wallet and manage its assets through a hosted Chain.Love nodes. To explore more features of the Lotus API, keep following this tutorial. You can also go to the [Lotus JSON-RPC API](https://lotus.filecoin.io/developers/apis/json-rpc/) and start creating your own projects on Filecoin. Make a storage deal [#](https://lotus.filecoin.io/tutorials/lotus/build-with-lotus-api/#make-a-storage-deal) ------------------------------------------------------------------------------------------------------------- Storing data is one of the most important features of Filecoin. In this section, we’ll walk through the end-to-end process of storing your data on the Filecoin network. We’ll start by importing your data to the local Lotus node, then make a storage deal with a storage provider, and finally wait for the deal to complete. _Note that the simplest way to store data on Filecoin is by using one of the many [storage helper tools](https://docs.filecoin.io/store/overview/) which wrap all of the following steps into a single API call. However, we include this section of the tutorial for anyone who wants to explore Filecoin storage at the protocol level in order to build developer tools or deepen their understanding._ Let us dive in! 1. Start by generating an admin auth token. This is required to import data into the Lotus node: lotus auth create-token --perm admin This will output your auth token. Make a note of this, we’ll be using it later. eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9......n7ugba1aJECuZXkMgJxHUH08MKTENQ-hAtsosDu-HXg 2. Create a `storeFile.mjs` file in your `build-with-lotus` project and add the following boilerplate code: import { HttpJsonRpcConnector, LotusClient} from "filecoin.js"; const localNode = "http://127.0.0.1:1234/rpc/v0"; const adminAuthToken="" const localConnector = new HttpJsonRpcConnector({ url: localNode, token: adminAuthToken }); const lotusClient = new LotusClient(localConnector); const lotusWallet = new LotusWalletProvider(lotusClient); async function storeFile(){ try { //1. import data to lotus //2. query storage provider's offer for storing this file //3. start storage deal with SP } catch (error) { console.log(error); } } storeFile(); 3. The next step is to import your data to the Lotus node: const importResult = await lotusClient.client.import({ Path: "PATH_TO_YOUR_FILE", IsCAR: false, }); console.log(importResult.Root); This returns a CID of your data we’ll use to refer to the data in future steps: { '/': 'bafykbzaceclwpu76hyjemz3ggynjek4y2mh47pwamfp3rk3icnjvsmhsumio6' } 4. Next, we need to find a storage provider that is willing to accept your storage deal. Since we are using the calibration network for this tutorial, we can use the `list-asks` to find storage providers. It will return a list of `asks` from the storage providers which are actively accepting deals, containing the details of their storage asks: lotus client list-asks This will output something like: .. querying asks * Queried 43 asks, got 8 responses t029598: min:256 B max:32 GiB price:0 FIL/GiB/Epoch verifiedPrice:0 FIL/GiB/Epoch ping:340.644025ms t031337: min:256 B max:32 GiB price:0 FIL/GiB/Epoch verifiedPrice:0 FIL/GiB/Epoch ping:342.296042ms t01105: min:256 B max:32 GiB price:0.0000000002 FIL/GiB/Epoch verifiedPrice:0.00000000002 FIL/GiB/Epoch ping:589.173496ms t032368: min:256 B max:32 GiB price:0.0000000005 FIL/GiB/Epoch verifiedPrice:0.00000000005 FIL/GiB/Epoch ping:294.554013ms As a side note; if you were working on Filecoin Mainnet, you could use the [Filecoin Plus](https://lotus.filecoin.io/tutorials/store-and-retrieve/store-data/#find-a-storage-provider-via-filecoin-plus) program to find storage providers offering free storage for verified clients: 5. Pick a storage provider ID from the `list-asks` response and add it into the following code. Replace `t00001` with the storage provider ID you picked: //2. query Miner offers for storing this file const queryOffer = await lotusClient.client.minerQueryOffer('t00001', importResult.Root); console.log(queryOffer); const isActive = importResult.Root["/"] === queryOffer.Root["/"]; console.log("Provider is active: ", isActive); If the storage provider you picked is active, the above code will output: Provider is active: true 6. Create a storage deal with a storage provider. Replace `t00001` with the storage provider ID you chose: //3. start storage deal with SP if(isActive){ const dealCid = await lotusClient.client.startDeal({ Data: { TransferType: 'graphsync', Root: importResult.Root, }, Miner: 't00001', Wallet: await lotusWallet.getDefaultAddress(), EpochPrice: , MinBlocksDuration: 518400, }); console.log("dealCID is ", dealCid); } 7. Let us run the js code to store a file on Filecoin: node lightWallet.mjs If everything runs successfully the script will output a deal CID: { '/': 'bafy2bzaceamdsqcc3jccrhvwrz6kmpujfkg6crwynmrtal2nsmwkqv22bktrs' } By this step, you have made a storage deal with a storage provider successfully. The Lotus node will start processing the data and sending it to the storage provider. Your storage deal will need to go through many sub-processes to be finalized on-chain. See the [Deal states](https://lotus.filecoin.io/tutorials/lotus/store-and-retrieve/store-data/#deal-states) table for more details. You can check the status of your storage deal via the Lotus command line using its CID. lotus client list-deals --show-failed This should output something like: DealCid DealId Provider State On Chain? Slashed? PieceCID Size Price Duration Verified ...dbuwcbjq 0 t024557 StorageDealFundsReserved N N ...7rkejcnq 3.969 MiB 0 FIL 522909 false ...pkbhfkju 0 t01105 StorageDealError N N ...7rkejcnq 3.969 MiB 0.0000177158 FIL 88579 false ...wb4wiuwq 0 t01105 StorageDealClientFunding N N ...7rkejcnq 3.969 MiB 0.0001041094 FIL 520547 false Congrats on making it all the way through this tutorial! In this tutorial, we learned the basics of interacting with the Filecoin network using an API client library and local Lotus node. This can serve as the foundation for you explore the complete [Lotus JSON-RPC API](https://lotus.filecoin.io/developers/apis/json-rpc/) . [Edit this page on GitHub](https://github.com/filecoin-project/lotus-docs/blob/main/content/en/tutorials/lotus/build-with-lotus-api.md) [Run a disputer →](https://lotus.filecoin.io/tutorials/lotus/disputer/) --- # Overview - Lotus Docs Overview ======== Storage providers in the Filecoin network are in charge of storing, providing content and creating consensus. This section contains guides to initialize and run a successful storage provider operation using Lotus and should be approached by **advanced users only**. You should read through and be familiar with the concepts outlined in the [Becoming a storage provider guide](https://docs.filecoin.io/storage-provider/basics/overview/) , as well as having a Lotus node running. ![High Level Full Lotus System](https://lotus.filecoin.io/storage-providers/get-started/overview/High-Level-Full-Lotus-System_hue455ef3df5b8675621540ee8b4f1fdc8_198943_20x0_resize_box_3.png) At a high level, this section will cover documentation and guides about the `lotus-miner` and `lotus-worker` binaries. For markets related operations, storage providers are advised to use Boost, you can check out the [Boost documentation here](https://boost.filecoin.io/) ❗ Being a storage provider on the _mainnet_ has stringent minimal **[hardware requirements](https://lotus.filecoin.io/storage-providers/get-started/hardware-requirements/) **. Do not attempt this installation if your server does not meet the minimum requirements. How to read the storage provider documentation [#](https://lotus.filecoin.io/storage-providers/get-started/overview/#how-to-read-the-storage-provider-documentation) --------------------------------------------------------------------------------------------------------------------------------------------------------------------- The guides in this section are meant to introduce high-level concepts early in the documentation and bring in more advanced topics and configurations later on. * The `Get started` segment contains a high-level overview of the tasks the `lotus-miner` binary does, introduces the basic economics of being a storage provider, and outlines some hardware and architectural requirements. * The `Setup` segment contains all the necessary information for initializing the storage provider on the network. * The `Operate` segment contains the necessary information about operating the storage provider daily and introduces more complex operations like SnapDeals, Batching and Index Provider. * The `Workers` segment contains guides for setting up dedicated workers for offloading tasks from the `lotus-miner` binary. * The `Advanced configurations` segment details all the configurations you can tune to optimize your storage provider setup. We recommend careful reading of every existing section and gaining as much background as possible before proceeding with a Lotus storage provider deployment. Key concepts [#](https://lotus.filecoin.io/storage-providers/get-started/overview/#key-concepts) ------------------------------------------------------------------------------------------------- You should be familiar with these key concepts related to being a storage provider before moving on to the next page. The Filecoin [glossary](https://spec.filecoin.io/#section-glossary) is handy when you need to look up a word or subject. ### Sectors [#](https://lotus.filecoin.io/storage-providers/get-started/overview/#sectors) A sector is the default unit of storage that storage providers submit to the Filecoin network. Storage providers can decide if they want to commit 32 GiB or 64 GiB sector sizes when they first initialize their storage provider. It’s not possible to change the sector size once it has been initialized on-chain. A sector can contain data from multiple deals and clients. A storage provider can also submit “Committed Capacity” (CC) sectors. CC sectors are available to the Filecoin network as committed storage power but do not initially contain storage deals. Actively proving CC sectors can be upgraded at a later date to include storage deals in a process known as Snap Deals. **Sealed sectors** A sealed sector is a sector that has been encoded to prepare it for the continuous proving process. **Unsealed sectors** An unsealed sector is the raw data. Some clients request that their unsealed data be kept for fast retrievals. ### Epoch [#](https://lotus.filecoin.io/storage-providers/get-started/overview/#epoch) The passing of time on the Filecoin network is divided into epochs of 30 seconds in duration. For every new epoch, a subset of storage providers are elected to add a new block to the chain. [Edit this page on GitHub](https://github.com/filecoin-project/lotus-docs/blob/main/content/en/storage-providers/get-started/overview/index.md) [Tasks →](https://lotus.filecoin.io/storage-providers/get-started/tasks/) --- # Overview - Lotus Docs Overview ======== This section contains reference information for the Lotus API and CLI. Most commands found within the CLI have an equivalent in the API. Lotus [#](https://lotus.filecoin.io/reference/basics/overview/#lotus) ---------------------------------------------------------------------- These are the methods available from the `lotus` daemon. Miner [#](https://lotus.filecoin.io/reference/basics/overview/#miner) ---------------------------------------------------------------------- These are the methods available from the `lotus-miner` daemon. Worker [#](https://lotus.filecoin.io/reference/basics/overview/#worker) ------------------------------------------------------------------------ These are the methods available from the `lotus-worker` daemon. [Edit this page on GitHub](https://github.com/filecoin-project/lotus-docs/blob/main/content/en/reference/basics/overview/index.md) [Troubleshooting →](https://lotus.filecoin.io/reference/basics/troubleshooting/) --- # Knowledge Base - Lotus Docs Knowledge Base ============== The knowledge base for Lotus. This knowledge base is divided into articles and solutions. Articles are informative, while solutions deal with specific errors. ##### [Replace Message With Updated Gas Fee](https://lotus.filecoin.io/kb/update-msg-gas-fee/) ##### [Common Connectivity Error](https://lotus.filecoin.io/kb/connectivity-errors/) This article lists out the common … ##### [Soft FD Limit Is Low](https://lotus.filecoin.io/kb/soft-fd-limit/) ##### [Where Does the ImportData Function Get Executed](https://lotus.filecoin.io/kb/importdata/) ##### [Mark for Upgrade Is Unsupported](https://lotus.filecoin.io/kb/mark-for-upgrade-unsupported/) ##### [How to Join the Butterfly Test Network.](https://lotus.filecoin.io/kb/butterfly-network/) ##### [How to Install Lotus-Shed](https://lotus.filecoin.io/kb/lotus-shed-not-installed/) ##### [Add Swap on Linux](https://lotus.filecoin.io/kb/add-swap/) ##### [Using OpenCL or Disabling GPU](https://lotus.filecoin.io/kb/using-opencl/) ##### [Unexpected Genesis in Repo](https://lotus.filecoin.io/kb/unexpected-genesis/) ##### [Setting a User-Defined Propagation Delay](https://lotus.filecoin.io/kb/propagation-delay/) ##### [Retrieval Error: Failed to Lookup Index for Mh](https://lotus.filecoin.io/kb/dagstore-register/) ##### [Getting Logs for Hard to Solve Issues](https://lotus.filecoin.io/kb/deadlocks/) ##### [Failed to Create Data Store](https://lotus.filecoin.io/kb/failed-to-create-datastore/) ##### [Error: Can't Acquire Bellman.lock](https://lotus.filecoin.io/kb/bellman-lock/) ##### [Actor Not Found](https://lotus.filecoin.io/kb/actor-not-found/) ##### [StorageMiner Repo Directory Does Not Exist](https://lotus.filecoin.io/kb/repo-directory-does-not-exist/) ##### [Debugging GetAPIInfo Errors](https://lotus.filecoin.io/kb/api-info/) ##### [Troubleshooting Sector Removal](https://lotus.filecoin.io/kb/sector-removal/) ##### [Lotus-Miner Sectors Renew Command Is Removed From CLI](https://lotus.filecoin.io/kb/sectors-renew-cmd/) ##### [Sector Redeclared in Xxx-Xxx-Xxx Logs](https://lotus.filecoin.io/kb/redeclared-sector-log/) ##### [LevelDB Metadata Corruption Recovery](https://lotus.filecoin.io/kb/leveldb-corruption/) ##### [How to Install Lotus-Wallet](https://lotus.filecoin.io/kb/install-lotus-wallet/) ##### [Nodes in China](https://lotus.filecoin.io/kb/nodes-in-china/) ##### [Go Command Not Found](https://lotus.filecoin.io/kb/go-cmd-not-found/) ##### [Chain Linked to Block Marked Previously as Bad](https://lotus.filecoin.io/kb/block-marked-as-bad/) ##### [Index Provider](https://lotus.filecoin.io/kb/index-provider/) ##### [Dynamic Retrieval Pricing Is Being Deprecated](https://lotus.filecoin.io/kb/dynamic-retrieval-pricing/) ##### [Dagstore](https://lotus.filecoin.io/kb/dagstore/) ##### [Split-Markets](https://lotus.filecoin.io/kb/split-markets/) ##### [Retrieve Data With the Legacy Markets](https://lotus.filecoin.io/kb/legacy-retrieve-data/) ##### [Redeclared in This Block Build Error](https://lotus.filecoin.io/kb/redeclared-in-this-block/) ##### [Resolving Failed to Find Sector Errors](https://lotus.filecoin.io/kb/failed-to-find-sector/) ##### [Manage Storage Deals - Lotus-Miner Legacy Markets](https://lotus.filecoin.io/kb/manage-storage-deals-legacy/) ##### [Legacy Lotus-Miner Markets Connectivity](https://lotus.filecoin.io/kb/legacy-miner-connectivety/) ##### [Lotus-Miner Legacy Markets Configs](https://lotus.filecoin.io/kb/legacy-markets-config/) ##### [Benchmark a Network Migration](https://lotus.filecoin.io/kb/test-migration/) ##### [How to Disable Premigration in Network Upgrade](https://lotus.filecoin.io/kb/disable-premigration/) ##### [Run an Invariant Check](https://lotus.filecoin.io/kb/run-invariant-check/) --- # Networks - Lotus Docs Networks ======== There are three networks available for Filecoin: * [Mainnet](https://lotus.filecoin.io/lotus/get-started/networks/#mainnet) , the only production Filecoin network. * [Calibration](https://lotus.filecoin.io/lotus/get-started/networks/#calibration) , the primary testing network for Filecoin. * [Devnet](https://lotus.filecoin.io/lotus/developers/local-network/) , the local development network designed to run with minimal resources for development testing. ### Mainnet [#](https://lotus.filecoin.io/lotus/get-started/networks/#mainnet) Mainnet is the primary Filecoin network. Mainnet began on block 148,888. It supports 32 GiB and 64 GiB sectors. **Genesis**: * CAR File: `QmavMCf95w2UMYGD1J5GpHcWBWXR2jTFYmtAkgeroMmpk1` * Reset Timestamp: `2020-08-24T22:00:00Z` * Genesis Block CID: `bafy2bzacecnamqgqmifpluoeldx7zzglxcljo6oja4vrmtj7432rphldpdmm2` * sha1 Digest: `4782cb42b4b01793b5cd9f593cc3dc87b6d3c7b4` **Network parameters**: * Supported Sector Sizes: `32 GiB` and `64 GiB` * Consensus Miner Min Power: `10 TiB` * Epoch Duration Seconds: `30` * Expected Leaders per Epoch: `5` * WindowPoSt Proving Period: `2880` * WindowPoSt Challenge Window: `60` * WindowPoSt Period Deadlines: `48` * Pre-Commit Challenge Delay: `150` **Bootstrap peers**: See https://github.com/filecoin-project/lotus/blob/master/build/bootstrap/mainnet.pi **Resources**: * [Latest chain snapshot (lightweight)](https://forest-archive.chainsafe.dev/latest/mainnet/) * [Status page and incidents](https://filecoin.statuspage.io/) * [Stats dashboard: Starboard](https://dashboard.starboard.ventures/dashboard) * [Slack Channel for Updates: #fil-network-announcements](https://filecoinproject.slack.com/archives/C01AC6999KQ) * [Slack Channel for Questions: #fil-help](https://filecoinproject.slack.com/archives/CEGN061C5) * [Block explorer: Filfox](https://filfox.info/en) * [Block explorer: Filscan](https://filscan.io/) * [Block explorer: Filutils](https://www.filutils.com/) * [Block explorer: Beryx](https://beryx.io/) ### Calibration [#](https://lotus.filecoin.io/lotus/get-started/networks/#calibration) Calibration network is the most realistic simulation of the Filecoin mainnet: * Prospective storage providers can experience realistic sealing performance and hardware requirements due to the use of final proofs constructions and parameters. * Prospective storage clients can store and retrieve real data on the network. Clients can participate in deal-making workflows and storage + retrieval functionality. * Same sector size as mainnet. The calibration network supports 32 GiB and 64 GiB sectors. **Maintainer**: [ChainSafe](https://chainsafe.io/) **Genesis**: * CAR File: `QmY581cXXtNwHweiC69jECupu9EBx274huHjSgxPNv1zAAj` * Reset Timestamp: `2021-02-19T23:10:00Z` * Genesis Block CID: `bafy2bzaceapb7hfdkewspic7udnogw4xnhjvhm74xy5snwa24forre5z4s2lm` * sha1 Digest: `944c0c13172b9f552dfed5dfaffaba95113c8254` **Network parameters**: * Supported Sector Sizes: `32 GiB` and `64 GiB` * Consensus Miner Min Power: `32 GiB` * Epoch Duration Seconds: `30` * Expected Leaders per Epoch: `5` * WindowPoSt Proving Period: `2880` * WindowPoSt Challenge Window: `60` * WindowPoSt Period Deadlines: `48` * Pre-Commit Challenge Delay: `150` **Bootstrap peers**: See https://github.com/filecoin-project/lotus/blob/master/build/bootstrap/calibnet.pi **Resources**: * [Latest chain snapshot (lightweight)](https://forest-archive.chainsafe.dev/latest/calibnet/) * [Calibration Faucet - ChainSafe](https://faucet.calibnet.chainsafe-fil.io/funds.html) * [Calibration Faucet - Zondax](https://beryx.zondax.ch/faucet) * [Slack Channel for Updates: #fil-network-announcements](https://filecoinproject.slack.com/archives/C01AC6999KQ) * [Slack Channel for Questions: #fil-net-calibration-discuss](https://filecoinproject.slack.com/archives/C01D42NNLMS) * [Block explorer - Filfox for Calibration](https://calibration.filfox.info/en) * [Block explorer - Filscan for Calibration](https://calibration.filscan.io/) * [Block explorer - Beryx for Calibration](https://beryx.io/) ### Devnet [#](https://lotus.filecoin.io/lotus/get-started/networks/#devnet) The development network is designed to run locally with minimal resources for development testing. You can read the [setup guide here](https://lotus.filecoin.io/lotus/developers/local-network/) . **Network parameters**: * Supported Sector Sizes: `2 KiB` and `8 MiB` * Consensus Miner Min Power: `2 KiB` * Epoch Duration Seconds: `4` * Pre-Commit Challenge Delay: `10` [Edit this page on GitHub](https://github.com/filecoin-project/lotus-docs/blob/main/content/en/lotus/get-started/networks.md) [← What is Lotus](https://lotus.filecoin.io/lotus/get-started/what-is-lotus/) [Chain.Love →](https://lotus.filecoin.io/lotus/developers/chain-love/) --- # Node types - Lotus Docs Node types ========== This page provide details on different lotus node types and their use case. Full node [#](https://lotus.filecoin.io/lotus/get-started/use-cases/#full-node) -------------------------------------------------------------------------------- A Lotus full node is required to interact with the Filecoin blockchain. These nodes are also required when running a storage provider on the Filecoin network. Usually, the Lotus full nodes are kept small, with regular chain compactions, or by using the SplitStore-feature which discards older chain data. Lotus full nodes are usually synced from snapshots to reduce the time required to get in sync with the Filecoin Network. Full historical node [#](https://lotus.filecoin.io/lotus/get-started/use-cases/#full-historical-node) ------------------------------------------------------------------------------------------------------ A Lotus full historical node differs from a typical Lotus full node in just one aspect. A full historical node is synced from epoch “0” or the “genesis block” of the filecoin blockchain. These nodes require a huge amount of space to store the full chain data, and take a very long time be synced from the beginning. A Lotus full historical node is useful in very limited cases. Most users that need to extract and inspect pieces of the Filecoin chain, usually uses tools like [lily](https://lilium.sh/software/lily/introduction/) , which allows for structured data extraction into a PostgreSQL/TimescaleDB database or CSV dumps for later query and analysis. Please do note that historical queries on a Lotus full historical node are slow due to the size of the chain, and can take anywhere between a few minutes to hours to get a response. Lite client node [#](https://lotus.filecoin.io/lotus/get-started/use-cases/#lite-client-node) ---------------------------------------------------------------------------------------------- Lite nodes are a scaled-down version of a Lotus full node. These nodes require a connection to a Lotus full node to function. Once connected to the Lotus full node, these Lotus Lite client nodes can only perform message signing and deal transactions. A lite node is useful when there are hardware constraints, as a lite node requires significantly fewer resources than a Lotus full node. Another use case would be to process transactions in parallel with other lite client nodes behind a Lotus full node. This increases the efficiency of the system. [Edit this page on GitHub](https://github.com/filecoin-project/lotus-docs/blob/main/content/en/lotus/get-started/use-cases.md) [← Chain.Love](https://lotus.filecoin.io/lotus/developers/chain-love/) [Contribute →](https://lotus.filecoin.io/lotus/developers/contribute/) --- # Run a disputer - Lotus Docs Run a disputer ============== Verifying submitted Window PoSts is expensive, and that cost can drastically increase when network congestion causes the gas base fee to rise. To address this, Filecoin Improvement Proposal FIP-0010 enables node operators to optimistically accept Window PoSts on-chain without verification, allowing them to be disputed later by off-chain-verifiers. [Window PoSt](https://docs.filecoin.io/reference/glossary/#window-proof-of-spacetime-windowpost) messages are necessary for ongoing maintenance of storage power. Verifying the submitted proofs is expensive, and when the gas base fee rises due to congestion, these messages become even more costly. For storage providers with mostly empty partitions, this cost can exceed their expected rewards from maintaining power. We need to ensure that these messages are cheap for miners, even when specifying a very high gas fee cap. The Filecoin Improvement Proposal 0010 (FIP0010) allows storage providers to _optimistically_ accept Window Proof of Spacetime proofs (Windows PoSt) on-chain without verification, allowing them to be disputed later by off-chain verifiers. Any Lotus node may dispute any on-chain storage proofs submitted in the past 1800 epochs (~15h) by invoking `DisputeWindowedPoSt`. When a dispute successfully refutes an optimistically accepted Window PoSt, the storage provider is fined one invalid proof fee (IPF) per active sector in the partition at the moment when said storage provider submitted the proof, plus a flat fee of 20 FIL. All incorrectly proved sectors are marked faulty, and the address that submitted the dispute is awarded a fixed `DisputeReward`. Penalties and rewards [#](https://lotus.filecoin.io/tutorials/lotus/disputer/#penalties-and-rewards) ----------------------------------------------------------------------------------------------------- The penalty for submitting an invalid Window PoSt and the reward for submitting a valid dispute are both subject to change. At the time of writing, those values are: | Fee/Reward | Value | | --- | --- | | Invalid proof fee (IPF) | (5.51 \* the expected block reward per sector in 24 hours) + 20 FIL | | Valid dispute reward | 4 FIL | Run the disputer [#](https://lotus.filecoin.io/tutorials/lotus/disputer/#run-the-disputer) ------------------------------------------------------------------------------------------- You can run the disputer by using the `chain disputer` command within Lotus. The following examples were run on a local devnet. 1. Fully sync a Lotus node. 2. Call the `chain disputer` function with the following options, following by the `start` command: | Name | Description | | --- | --- | | `--max-fee` | The maximum amount of `FIL` that you are willing to spend for a `DisputeWindowedPoSt` message. | | `--from` | The address you want to send the messages from. If an address is not specified, Lotus will use the default address. | lotus chain disputer --max-fee 1 --from t3r25povzrwpomqlwtxtt25ou76galexvgr3ucgvvtwxiwy2gtqltlzshmtdyz4ys7mt5phoouedengajltbka start > checking sync status > Worker: 101; Base: 0; Target: 0 (diff: 0) > State: ; Current Epoch: 0; Todo: 0 > Validated 4 messages (1 per second) 3. The disputer will continue to verify submitted WinPoSts. To end the disputer press `CTRL` + `c`: > Exit by user > setting up window post disputer > 2021-02-22T17:44:11.362-0500 ERROR rpc go-jsonrpc@v0.1.2/client.go:392 got rpc message with cancelled context: context canceled > ERROR: Notify stream was invalid You can safely ignore any stream errors when exiting the disputer. ### Manual dispute [#](https://lotus.filecoin.io/tutorials/lotus/disputer/#manual-dispute) You can manually send a specific dispute message using the `dispute` command. This feature has a very narrow use-case and is for advanced users only. To perform a manual dispute run `lotus chain disputer dispute [minerAddress] [index] [postIndex]`, where: | Variable name | Description | | --- | --- | | `minerAddress` | The miner id that submitted the proof you want to dispute. The same address is also the recipient of the message | | `index` | The deadline index of the proof you want to dispute for the miner. | | `postIndex` | The post snapshot index. | [Edit this page on GitHub](https://github.com/filecoin-project/lotus-docs/blob/main/content/en/tutorials/lotus/disputer.md) [← Building with Lotus APIs](https://lotus.filecoin.io/tutorials/lotus/build-with-lotus-api/) [Backfilling Messages in Lotus →](https://lotus.filecoin.io/tutorials/lotus/backfill-messages/) --- # This Week in Lotus - Week 1 - 2024 - Lotus Docs This Week in Lotus - Week 1 - 2024 ================================== Posted January 7, 2024 by  ‐ **3 min read** First of all, Happy New Year 🎆! We hope everyone had time to recharge over the holiday and are ready for 2024! **🆙 Network version 22 timeline & scope** We start the new year where we left off and are preparing code by implementing FIPs for the coming network upgrade - network version 22. Some important preliminary dates for the coming network upgrade: * **January 30th:** Actor/FVM code freeze * **February 19th:** Calibration upgrade * **March 18th:** Mainnet upgrade Check the more detailed estimated nv22 timeline in the image attached in. So what is in scope for nv22: * [FIP-0063: Switching to new Drand mainnet network](https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0063.md) * [FIP-0074: Remove cron-based automatic deal settlement](https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0074.md) * [FIP-0076: Direct Data Onboarding](https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0076.md) * [FIP-0081: Introduce lower bound for sector initial pledge](https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0081.md) * [FIP-0083: Actor events for the verified registry, miner, and market actors](https://github.com/filecoin-project/FIPs/blob/7eb8da9f5d50f2664e059bd56c930272d6189a57/FIPS/fip-0083.md) * [FIP-XXXX: Convert f090 Mining Reserve actor to a keyless account actor](https://github.com/filecoin-project/FIPs/discussions/901) ❗Please note that many of these proposals are currently in a draft state and need to enter last call, as well as being accepted or rejected by the governance process before being confirmed for network version 22. Either way, the implementer teams want to prepare code in case these proposals get accepted. You can check out the [summary from the last implementers sync between Lotus, Forest and Venus here.](https://github.com/filecoin-project/core-devs/discussions/148#discussioncomment-7858442) 📣 We would also like to extend an early invitation to the community to help us test **Direct Data Onboarding** and built-in actor events later in January. Direct Data Onboarding provides methods for direct data commitment into sectors, offering a more cost-effective approach. It also introduces a new deal activation scheme to facilitate transactions via user-programmed smart contracts. The **initial built-in actor events** will provide observability for events from the Verified Registry, Storage Market, and Storage Miner Actors, simplifying the process for clients to obtain necessary information by subscribing to these events and querying the chain state. **🏎️ Fast Finality - F3 update** [Fast Finality in Filecoin](https://github.com/filecoin-project/FIPs/discussions/809) , often referred to as F3, aims to finalize tipsets within tens of seconds during regular network operation, a significant improvement over the current 900-epoch finalization delay. All implementers concurred in the last sync that [Fast Finality is a high-priority project](https://github.com/filecoin-project/FIPs/discussions/809) , as it unlocks various opportunities within the Filecoin ecosystem. Therefore, the Lotus team will continue to dedicate resources and give priority to implementing F3 in January, with the goal of having it ready as quickly and securely as possible. However, given the challenges associated with delivering a well-tested and audited implementation, we recognize that it may not be feasible within the proposed timeline for network version 22 (nv22). **🚉 v1.25.2 update** We expect to release the stable version of Lotus v1.25.2 next week. It introduces a very exciting alpha feature that we encourage the community to test on testnets and provide feedback. Additionally, it includes bug fixes for the synchronization issues some users encountered during and after the network upgrade. * **🆕 Alpha release of Lotus-Provider binary - High Availability of WindowPoSt and WinningPoSt.** * Lotus-Provider is an entirely new binary in the Lotus ecosystem, often referred to as “Lotus-Miner-V2”. It is designed for high availability, simplicity and durability in mind. [Checkout how you can test it out in a test network here.](https://lotus.filecoin.io/storage-providers/lotus-provider/setup/) It currently supports **High Availability of WindowPoSt and WinningPoSt.** But on the near term development map, **multiple MinerIDs** and **sealing** is of the highest priority. * **Ability to call external PC2-binaries** - This allows storage providers to levereage the SupraSeal PC2 binary, which has been shown to improve sealing speed in the PC2-phase. Check out the docs for it here. Again, Happy new year! 🎆 **The Lotus team is excited to continue :cattyping: and make Filecoin better with y’all in 2024!** --- # This Week in Lotus - Week 50 - 2023 - Lotus Docs This Week in Lotus - Week 50 - 2023 =================================== Posted December 16, 2023 by  ‐ **3 min read** **Watermelon Has Arrived** Network Version 21 went live on Mainnet at [Epoch 3469380](https://filfox.info/en/tipset/3469380) on the 12th of December 2023 at 13:30 UTC and we are already seeing SPs taking advantage of the new [Synthetic PoRep feature](https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0059.md) as a growing number of `PreCommitSectorBatch2` are appearing on-chain! Additionally, Storage Providers are eagerly utilizing the [new 3.5-year maximum sector durations](https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0052.md) that landed with the upgrade! _Remember:_ * You can enable [Synthetic PoRep](https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0059.md) on your own SP operations by simply setting `UseSyntheticPoRep = true` in your miner `config.toml`! * If you would like to change the default duration of your freshly squeezed CC sectors to leverage the new [3.5-year sector terms](https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0052.md) , just change the `CommittedCapacitySectorLifetime` setting in your miner `config.toml`. **Lotus Releases Update** Lotus versions and [v1.24.](https://github.com/filecoin-project/lotus/releases/tag/v1.24.1) and [v1.25.1](https://github.com/filecoin-project/lotus/releases/tag/v1.25.1) landed a few days in direct response to syncing issues caused by a rapid increase in the number of messages on the network over the weekend! Please check out the detailed release notes for more information! Lotus [v1.24.1](https://github.com/filecoin-project/lotus/releases/tag/v1.24.1) and [v1.25.1](https://github.com/filecoin-project/lotus/releases/tag/v1.25.1) are highly recommended but optional patch releases! The team also released [v.1.25.2-rc1](https://github.com/filecoin-project/lotus/releases/tag/v1.25.2-rc1) which includes the message volume mitigation as well as the new Lotus Provider alpha and SupraSeal PC2 optimisations that the [team announced last week.](https://filecoinproject.slack.com/archives/C027TQMUVJN/p1702053984695599) _Please make sure to read all of the new release notes thoroughly before any upgrades on your systems!_ The team are also currently working with a small group of Storage Providers who are still experiencing unrelated random and intermittent sync loss on some of their nodes. A huge thank you to all the SPs who have made a massive effort to engage with the team and provide logs and feedback! Mitigations are being actively tested as we speak! Please keep monitoring #fil-lotus-help for updates and let us know if you experience any extended episodes of sync loss on your own nodes! **Calling all Ecosystem Node Operators!!** We [recently announced](https://filecoinproject.slack.com/archives/C01AC6999KQ/p1702655688246009) the launch of the new [Node Operator Survey](https://docs.google.com/forms/d/e/1FAIpQLScpkM9Rr81d_9m7pNXK1u8CnyvONQLGbrHzzUcfgOQbARl4Tw/viewform) , led by our friends in the Forest Team! This is a unique opportunity for you to share your insights and experiences! Whether you’re navigating the network with Lotus, Venus, or Forest, your input is incredibly important to us! Please take a few moments of your time to [fill out this brief survey](https://docs.google.com/forms/d/e/1FAIpQLScpkM9Rr81d_9m7pNXK1u8CnyvONQLGbrHzzUcfgOQbARl4Tw/viewform) . Your perspective is crucial in helping each implementation team gear up for a dynamic 2024 and really hit the ground running!! **The Holiday Season is Almost Here** As the holiday season draws closer and team members head off for their festive breaks, we may take a little longer to respond to your messages than usual. Please bear with us during this time if you have to wait a bit longer than usual for a reply and rest assured that 24-hour network monitoring and emergency response will always continue uninterrupted throughout! The entire Lotus Team would like to take this opportunity to wish you all a truly magical holiday season and a prosperous 2024! Thank you to our amazing community for an incredible 2023, we can’t wait to continue working and innovating with you in the New Year! 💙 That’s it for the week! **Have a great weekend!** ☀️ --- # Backfilling Messages in Lotus - Lotus Docs Backfilling Messages in Lotus ============================= This tutorial guides you through the process of backfilling messages in Lotus, ensuring your Lotus node is up-to-date with the blockchain's history. Overview [#](https://lotus.filecoin.io/tutorials/lotus/backfill-messages/#overview) ------------------------------------------------------------------------------------ This tutorial guides you through the process of **backfilling FEVM indexes (i.e., to serve Filecoin Ethereum JSON RPC queries of Filecoin’s EVM.** Prerequisites [#](https://lotus.filecoin.io/tutorials/lotus/backfill-messages/#prerequisites) ---------------------------------------------------------------------------------------------- * Lotus version 1.25.1 or higher installed. * Basic understanding of Lotus configuration and command-line tools. Configuration Settings [#](https://lotus.filecoin.io/tutorials/lotus/backfill-messages/#configuration-settings) ---------------------------------------------------------------------------------------------------------------- Update Lotus `config.toml`: Ensure your `config.toml` file includes the following settings: EnableEthRPC = true EthTxHashMappingLifetimeDays = 0 DisableRealTimeFilterAPI = false DisableHistoricFilterAPI = false EnableMsgIndex = true Backfill Process [#](https://lotus.filecoin.io/tutorials/lotus/backfill-messages/#backfill-process) ---------------------------------------------------------------------------------------------------- ### Step 1: Verify or Adjust Configuration [#](https://lotus.filecoin.io/tutorials/lotus/backfill-messages/#step-1-verify-or-adjust-configuration) Ensure the `config.toml` settings are correctly set as described above. ### Step 2: Initiate Backfill [#](https://lotus.filecoin.io/tutorials/lotus/backfill-messages/#step-2-initiate-backfill) Run the backfill command via `lotus-shed`. For a comprehensive backfill, use a high epoch number: lotus-shed indexes backfill-msgindex --epochs=9999999 In the output of the backfill command, the `nrRowsAffected` metric indicates how many messages have been backfilled. A value of 0 means no new messages were backfilled, as they already exist in the database. By default, `backfill-msgindex` starts from the current head and processes back through the chain for the specified number of epochs. If necessary, you can stop the backfill process and restart it from an earlier point in the chain by using the `--from option` to ensure thorough coverage. This can be verified if `nrRowsAffected` remains 0, indicating no missed messages. 💡 Optional Database Location Override: For complex setups, use `--repo=/path/to/repo` to specify the database location ❗ Continued running of backfill process beyong the specified FEVM epoch yields no additional benefit ### Step 3: Check Database Index Size [#](https://lotus.filecoin.io/tutorials/lotus/backfill-messages/#step-3-check-database-index-size) Use `ls -l /data/node/sqlite/` to inspect the size of your indexes, indicating the backfill’s extent. ### Step 4: Additional Backfill Steps [#](https://lotus.filecoin.io/tutorials/lotus/backfill-messages/#step-4-additional-backfill-steps) Repeat the backfill process for transaction hashes and events using similar commands, ensuring comprehensive coverage of all blockchain data. lotus-shed indexes backfill-txhash --epochs=9999999 lotus-shed indexes backfill-events --epochs=9999999 Performance Considerations [#](https://lotus.filecoin.io/tutorials/lotus/backfill-messages/#performance-considerations) ------------------------------------------------------------------------------------------------------------------------ Backfilling can be resource-intensive. Consider hardware requirements and possibly setting up additional nodes for load balancing. Conclusion [#](https://lotus.filecoin.io/tutorials/lotus/backfill-messages/#conclusion) ---------------------------------------------------------------------------------------- Following these steps ensures your Lotus node is fully synchronized with the network’s history, enhancing performance and reliability. Troubleshooting [#](https://lotus.filecoin.io/tutorials/lotus/backfill-messages/#troubleshooting) -------------------------------------------------------------------------------------------------- If backfilling results in the error “failed to load events for tipset,” then those events may not exist in the chainstore. The FEVM backfilling script in Lotus only indexes the events but cannot get the events themselves. In this case, please recompute those missing events by running: lotus state --tipset @2849740 compute-state Where `2849740` represents the height of a tipset for which you are missing events. Related Resources [#](https://lotus.filecoin.io/tutorials/lotus/backfill-messages/#related-resources) ------------------------------------------------------------------------------------------------------ GitHub issues and pull requests related to backfilling and performance improvements. * [PR #10932](https://github.com/filecoin-project/lotus/pull/10932) * [PR #11088](https://github.com/filecoin-project/lotus/pull/11088) * [PR #10941](https://github.com/filecoin-project/lotus/pull/10941) * [Issue #11007](https://github.com/filecoin-project/lotus/issues/11007) * [Issue #10178](https://github.com/filecoin-project/lotus/issues/10178) * [Issue #10807](https://github.com/filecoin-project/lotus/issues/10807) [Edit this page on GitHub](https://github.com/filecoin-project/lotus-docs/blob/main/content/en/tutorials/lotus/backfill-messages.md) [← Run a disputer](https://lotus.filecoin.io/tutorials/lotus/disputer/) [Remote lotus-wallet management →](https://lotus.filecoin.io/tutorials/lotus/remote-lotus-wallet/) --- # Lotus on Linux - Lotus Docs Lotus on Linux ============== The following instructions are specific to Linux installations. There are several ways to install Lotus on Linux: * [Downloading from Github](https://lotus.filecoin.io/lotus/install/linux/#downloading-from-github) * [Building from source](https://lotus.filecoin.io/lotus/install/linux/#building-from-source) . ❗ **Storage providers should build from source**. Building Lotus from source allows you to strictly configure how Lotus runs and how it communicates with its dependencies. Storage providers looking to improve their system efficiency should [install Lotus by building from source](https://lotus.filecoin.io/lotus/install/linux/#building-from-source) . Downloading from Github [#](https://lotus.filecoin.io/lotus/install/linux/#downloading-from-github) ---------------------------------------------------------------------------------------------------- 1. Install Lotus dependencies: Arch: sudo pacman -Syu hwloc Ubuntu/Debian: sudo apt install -y hwloc Fedora: sudo dnf -y install hwloc OpenSUSE: sudo zypper in hwloc Amazon Linux 2: sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm; sudo yum install -y hwloc-devel 2. Download the latest Linux bundle from the [Lotus GitHub releases page](https://github.com/filecoin-project/lotus/releases/latest) : wget https://github.com/filecoin-project/lotus/releases/download/v1.35.1/lotus_v1.35.1_linux_amd64_v1.tar.gz 3. Extract tar -xvf archive.tar.gz executable: tar -xvf lotus_v1.35.1_linux_amd64_v1.tar.gz 4. Move the `lotus` binary to `/usr/local/bin`: sudo mv lotus_1.35.1_linux_amd64/lotus /usr/local/bin/lotus 5. Set execute permissions on the binary: chmod ugo+x /usr/local/bin/lotus Building from source [#](https://lotus.filecoin.io/lotus/install/linux/#building-from-source) ---------------------------------------------------------------------------------------------- You can build the Lotus executables from source by following these steps. ### Software dependencies [#](https://lotus.filecoin.io/lotus/install/linux/#software-dependencies) You will need the following software installed to install and run Lotus. ### System-specific [#](https://lotus.filecoin.io/lotus/install/linux/#system-specific) Building Lotus requires some system dependencies, usually provided by your distribution. Arch: sudo pacman -Syu opencl-icd-loader gcc git jq pkg-config opencl-icd-loader opencl-headers opencl-nvidia hwloc Ubuntu/Debian: sudo apt install mesa-opencl-icd ocl-icd-opencl-dev gcc git jq pkg-config curl clang build-essential hwloc libhwloc-dev wget -y && sudo apt upgrade -y Fedora: sudo dnf -y install gcc make git jq pkgconfig mesa-libOpenCL mesa-libOpenCL-devel opencl-headers ocl-icd ocl-icd-devel clang llvm wget hwloc hwloc-devel OpenSUSE: sudo zypper in gcc git jq make libOpenCL1 opencl-headers ocl-icd-devel clang llvm hwloc && sudo ln -s /usr/lib64/libOpenCL.so.1 /usr/lib64/libOpenCL.so Amazon Linux 2: sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm; sudo yum install -y git gcc jq pkgconfig clang llvm mesa-libGL-devel opencl-headers ocl-icd ocl-icd-devel hwloc-devel ### Rustup [#](https://lotus.filecoin.io/lotus/install/linux/#rustup) Lotus needs [rustup](https://rustup.rs/) . The easiest way to install it is: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh ### Go [#](https://lotus.filecoin.io/lotus/install/linux/#go) To build Lotus, you need a working installation of [Go 1.25.0 or higher](https://golang.org/dl/) : wget -c https://golang.org/dl/go1.25.0.linux-amd64.tar.gz -O - | sudo tar -xz -C /usr/local 💡 You’ll need to add `/usr/local/go/bin` to your path. For most Linux distributions, you can run something like: echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.bashrc && source ~/.bashrc See the [official Golang installation instructions](https://golang.org/doc/install) if you get stuck. System Configuration [#](https://lotus.filecoin.io/lotus/install/linux/#system-configuration) ---------------------------------------------------------------------------------------------- Before you proceed with the installation, you should increase the UDP buffer. You can do this by running the following commands: sudo sysctl -w net.core.rmem_max=2097152 sudo sysctl -w net.core.rmem_default=2097152 ### Build and install Lotus [#](https://lotus.filecoin.io/lotus/install/linux/#build-and-install-lotus) Once all the dependencies are installed, you can build and install Lotus. 1. Clone the repository: git clone https://github.com/filecoin-project/lotus.git cd lotus/ 2. Switch to the latest stable release branch: git pull LATEST_RELEASE=$(git tag -l 'v*' | grep -v "-" | sort -V -r | head -n 1) # Finds the latest Lotus Node release git checkout $LATEST_RELEASE The latest production release can be found on [GitHub](https://github.com/filecoin-project/lotus/releases) or via the [command line](https://github.com/filecoin-project/lotus/blob/master/LOTUS_RELEASE_FLOW.md#why-is-the-releases-branch-deprecated-and-what-are-alternatives) . 3. If you are in China, see “[Lotus: tips when running in China](https://lotus.filecoin.io/kb/nodes-in-china/) ”. 4. Depending on your CPU model, you will want to export additional environment variables: a. If you have **an AMD Zen or Intel Ice Lake CPU (or later)**, enable the use of SHA extensions by adding these two environment variables: export RUSTFLAGS="-C target-cpu=native -g" export FFI_BUILD_FROM_SOURCE=1 See the [Native Filecoin FFI section](https://lotus.filecoin.io/lotus/install/linux/#native-filecoin-ffi) for more details about this process. a. Some older Intel and AMD processors without the ADX instruction support may panic with illegal instruction errors. To solve this, add the `CGO_CFLAGS` environment variable: export CGO_CFLAGS_ALLOW="-D__BLST_PORTABLE__" export CGO_CFLAGS="-D__BLST_PORTABLE__" a. By default, a ‘multicore-sdr’ option is used in the proofs library. This feature is also used in FFI unless explicitly disabled. To disable building with the ‘multicore-sdr’ dependency, set `FFI_USE_MULTICORE_SDR` to `0`: export FFI_USE_MULTICORE_SDR=0 5. Build and install Lotus Lotus is compiled to operate on a single network. Choose the network you want to join, then run the corresponding command to build the Lotus node: # For Mainnet: make all # For Calibration Testnet: make calibnet Install Lotus: sudo make install This will put `lotus`, `lotus-miner` and `lotus-worker` in `/usr/local/bin`. `lotus` will use the `$HOME/.lotus` folder by default for storage (configuration, chain data, wallets). See [advanced options](https://lotus.filecoin.io/storage-providers/setup/configuration/) for information on how to customize the Lotus folder. Once the installation is finished, use the command below to ensure lotus is installed successfully for the right network. lotus --version lotus version 1.23.3+mainnet+git.7bb1f98ac # or lotus version 1.23.3+calibnet+git.7bb1f98ac 6. You should now have Lotus installed. You can now [start the Lotus daemon](https://lotus.filecoin.io/lotus/install/start-lotus/#start-the-lotus-daemon) ### Native Filecoin FFI [#](https://lotus.filecoin.io/lotus/install/linux/#native-filecoin-ffi) Some newer CPU architectures like AMD’s Zen and Intel’s Ice Lake have support for SHA extensions. Having these extensions enabled significantly speeds up your Lotus node. To make full use of your processor’s capabilities, make sure you set the following variables **before building from source**: export RUSTFLAGS="-C target-cpu=native -g" export FFI_BUILD_FROM_SOURCE=1 This method of building does not produce portable binaries. Make sure you run the binary on the same computer as you built it. ### Systemd service files [#](https://lotus.filecoin.io/lotus/install/linux/#systemd-service-files) Lotus provides **generic** Systemd service files. They can be installed with: make install-daemon-service make install-miner-service ❗ Provided service files should be **inspected and edited** according to user needs as they are very generic and may lack specific environment variables and settings needed by the users. One example is that logs are redirected to files in `/var/log/lotus` by default and not visible in `journalctl`. [Edit this page on GitHub](https://github.com/filecoin-project/lotus-docs/blob/main/content/en/lotus/install/linux.md) [← Prerequisites](https://lotus.filecoin.io/lotus/install/prerequisites/) [MacOS →](https://lotus.filecoin.io/lotus/install/macos/) --- # This Week in Lotus - Week 49 - 2023 - Lotus Docs This Week in Lotus - Week 49 - 2023 =================================== Posted December 8, 2023 by  ‐ **3 min read** **Lotus v1.25.1-rc1 - Alpha Release of Lotus-Provider** Exciting news! The Lotus Team is thrilled to announce the alpha release of [Lotus-Provider!](https://github.com/filecoin-project/lotus/releases/tag/v1.25.1-rc1) Key features include: * High Availability: Run multiple instances for WindowPoSt and WinningPoSt, with support for clustered Yugabyte configurations. * Simplicity: Easy setup with configurations stored in YugabyteDB. * Durability: Robust design for consistent performance. Stay updated with forthcoming documentation and join the `#fil-lotus-announcements` channel where we will be posting testing opportunities on the Calibration network! **Lotus v1.25.1-rc1 - SupraSeal PC2** [Lotus v1.25.1-rc1](https://github.com/filecoin-project/lotus/releases/tag/v1.25.1-rc1) also allows SPs to use the new SupraSeal PC2! Testing benchmarks with an NVIDIA RTX A5000 show a significant reduction in sealing time, down to approximately 2.5 minutes! While SupraSeal PC2 works efficiently with Committed Capacity (CC) it currently encounters known issues with deal sectors. We recommend using SupraSeal PC2 for specific sector types and in testing environments only, pending future updates for deal sector compatibility. For detailed usage and benchmarking instructions with SupraSeal PC2, [please consult the provided documentation.](https://lotus.filecoin.io/tutorials/lotus-miner/supra-seal-pc2/) **Final Call for Feedback on FIP-0076: Direct Data Onboarding** [FIP-0076](https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0076.md) has now entered the Last Call phase. Don’t miss the opportunity to share your final thoughts! [DDO](https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0076.md) proposes innovative onboarding methods for direct data commitment into sectors, offering a more cost-effective approach. Additionally, it introduces a new deal activation scheme to support transactions through user-programmed smart contracts. Initially focused on the built-in market actor, this could expand to others in the future. Share your feedback and be a part of shaping our network’s future! **Are you ready for Watermelon?** The Mainnet Network Version 21 upgrade is fast approaching! Epoch `3469380` on the `12th of December 2023 at 13:30 UTC`. Please make sure you upgrade to either [v1.24.0](https://github.com/filecoin-project/lotus/releases/tag/v1.24.0) or [v1.25.0](https://github.com/filecoin-project/lotus/releases/tag/v1.25.0) as soon as possible and don’t forget to upgrade your Go versions to at least [v1.20.7](https://go.dev/dl/) (v1.21.X is not supported). The minimum Boost version for both Lotus releases is [v2.1.0](https://github.com/filecoin-project/boost/releases/tag/v2.1.0) . **For users who will be upgrading directly from an earlier version of Lotus such as v1.22.0, please note the following important changes that have taken place in interim releases:** * **The SplitStore feature is now enabled by default on all new nodes.** For existing users, the Lotus node will now fail to start unless the `EnableSplitstore` config setting is explicitly set to either `true` or `false` prior to daemon start - [ref v1.23.](https://github.com/filecoin-project/lotus/releases/tag/v1.23.0) * **The proofs libraries now have CUDA enabled by default** which will require a fully functional [CUDA installation](https://lotus.filecoin.io/tutorials/lotus-miner/cuda/) . Users can still opt to use OpenCL instead by setting the `FFI_USE_OPENCL=1` when building from source or disable GPU usage entirely by setting the `FFI_USE_GPU=0` flag - ref [v1.23.0](https://github.com/filecoin-project/lotus/releases/tag/v1.23.0) . * **The `lotus-miner sectors renew` command has been deprecated** and all functionality moved to the `lotus-miner sectors extend` command. * **Exchanges/Node operators/RPC providers please note** that execution traces have changed to account for changes introduced by the FVM. Please make sure to read the `Execution trace format change` section at [this link](https://github.com/filecoin-project/lotus/releases/tag/v1.23.0) for full details - ref [v1.23.0](https://github.com/filecoin-project/lotus/releases/tag/v1.23.0) That’s it for the week! **Have a great weekend!** ☀️ --- # MacOS - Lotus Docs MacOS ===== These instructions are specific to macOS. You can install Lotus on macOS 10.11 El Capitan or higher. If you are installing Lotus on a Linux distribution, head over to the [Linux section](https://lotus.filecoin.io/lotus/install/macos/#linux) . There are several ways to install Lotus on macOS: * [Install with Homebrew](https://lotus.filecoin.io/lotus/install/macos/#install-with-homebrew) . * [Build from source](https://lotus.filecoin.io/lotus/install/macos/#build-from-source) . ❗ **Storage providers should build from source.** Building Lotus from source allows you to strictly configure how Lotus runs and how it communicates with its dependencies. Storage providers looking to improve their system efficiency should [install Lotus by building from source](https://lotus.filecoin.io/lotus/install/macos/#build-from-source) . Install with Homebrew [#](https://lotus.filecoin.io/lotus/install/macos/#install-with-homebrew) ------------------------------------------------------------------------------------------------ You can quickly install Lotus using Homebrew on macOS. 1. Add the `filecoin-project/lotus` tap: brew tap filecoin-project/lotus 2. Install Lotus: brew install lotus --formula 3. You should now have Lotus installed. You can now [start the Lotus daemon](https://lotus.filecoin.io/lotus/install/macos/) . 💡 You can also start the node in Lite mode if you leverage a public RPC provider, or have access to a full-node. Check out the [Start the lite-node](https://lotus.filecoin.io/lotus/install/lotus-lite/#start-the-lite-node) article. Build from source [#](https://lotus.filecoin.io/lotus/install/macos/#build-from-source) ---------------------------------------------------------------------------------------- You can build the Lotus executables from source by following these steps. ### Software dependencies [#](https://lotus.filecoin.io/lotus/install/macos/#software-dependencies) You must have XCode and Homebrew installed to build Lotus from source. #### XCode Command Line Tools [#](https://lotus.filecoin.io/lotus/install/macos/#xcode-command-line-tools) Lotus requires that X-Code CLI tools be installed before building the Lotus binaries. 1. Check if you already have the XCode Command Line Tools installed via the CLI, run: xcode-select -p This should output something like: /Library/Developer/CommandLineTools If this command returns a path, then you have Xcode already installed! You can [move on to installing dependencies with Homebrew](https://lotus.filecoin.io/lotus/install/macos/#homebrew) . If the above command doesn’t return a path, install Xcode: xcode-select --install Next up is installing Lotus' dependencies using Homebrew. #### Homebrew [#](https://lotus.filecoin.io/lotus/install/macos/#homebrew) We recommend that macOS users use [Homebrew](https://brew.sh/) to install each of the necessary packages. 1. Use the command `brew install` to install the following packages: brew install go jq pkg-config hwloc coreutils Next up is cloning the Lotus repository and building the executables. #### Rust [#](https://lotus.filecoin.io/lotus/install/macos/#rust) Rustup is an installer for the systems programming language Rust. Run the installer and follow the onscreen prompts. The default installation option should be chosen unless you are familiar with customisation: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh ### Build and install Lotus [#](https://lotus.filecoin.io/lotus/install/macos/#build-and-install-lotus) The installation instructions are different depending on which CPU is in your Mac: * [M1-based CPUs](https://lotus.filecoin.io/lotus/install/macos/#m1-based-cpus) * [Intel CPUs](https://lotus.filecoin.io/lotus/install/macos/#intel-cpus) #### M1-based CPUs [#](https://lotus.filecoin.io/lotus/install/macos/#m1-based-cpus) 1. Clone the repository: git clone https://github.com/filecoin-project/lotus.git cd lotus/ 2. Switch to the latest stable release branch: git pull LATEST_RELEASE=$(git tag -l 'v*' | grep -v "-" | sort -V -r | head -n 1) # Finds the latest Lotus Node release git checkout $LATEST_RELEASE The latest production release can be found on [GitHub](https://github.com/filecoin-project/lotus/releases) or via the [command line](https://github.com/filecoin-project/lotus/blob/master/LOTUS_RELEASE_FLOW.md#why-is-the-releases-branch-deprecated-and-what-are-alternatives) . 3. Create the necessary environment variables to allow Lotus to run on M1 architecture: export LIBRARY_PATH=/opt/homebrew/lib export FFI_BUILD_FROM_SOURCE=1 export PATH="$(brew --prefix coreutils)/libexec/gnubin:/usr/local/bin:$PATH" 4. Build the `lotus` daemon: make all 5. Run the final `make` command to move this `lotus` executable to `/usr/local/bin`. This allows you to run `lotus` from any directory. sudo make install 6. You should now have Lotus installed. You can now [start the Lotus daemon](https://lotus.filecoin.io/lotus/install/macos/#start-the-lotus-daemon-and-sync-the-chain) . #### Intel CPUs [#](https://lotus.filecoin.io/lotus/install/macos/#intel-cpus) ❗ These instructions are for installing Lotus on an Intel Mac. If you have an M1-based CPU, use the [M1-based CPU instructions ↑](https://lotus.filecoin.io/lotus/install/macos/#m1-based-cpus) 1. Clone the repository: git clone https://github.com/filecoin-project/lotus.git cd lotus/ 2. Switch to the latest stable release branch: git pull LATEST_RELEASE=$(git tag -l 'v*' | grep -v "-" | sort -V -r | head -n 1) # Finds the latest Lotus Node release git checkout $LATEST_RELEASE The latest production release can be found on [GitHub](https://github.com/filecoin-project/lotus/releases) or via the [command line](https://github.com/filecoin-project/lotus/blob/master/LOTUS_RELEASE_FLOW.md#why-is-the-releases-branch-deprecated-and-what-are-alternatives) . 3. If you are in China, take a look at some [tips for running Lotus in China](https://lotus.filecoin.io/kb/nodes-in-china/) ". 4. Build and install Lotus: make clean all sudo make install [Edit this page on GitHub](https://github.com/filecoin-project/lotus-docs/blob/main/content/en/lotus/install/macos.md) [← Lotus on Linux](https://lotus.filecoin.io/lotus/install/linux/) [Start Lotus →](https://lotus.filecoin.io/lotus/install/start-lotus/) --- # Start Lotus - Lotus Docs Start Lotus =========== Now that we have installed Lotus we can download a lightweight chain snapshot and start syncing the chain. Download snapshot [#](https://lotus.filecoin.io/lotus/install/start-lotus/#download-snapshot) ---------------------------------------------------------------------------------------------- 1. Download the most recent lightweight snapshot for the mainnet: aria2c -x5 https://forest-archive.chainsafe.dev/latest/mainnet/ 💡 If you are looking for the snapshot for the Calibration test network, you can get the latest snapshot with this link [https://forest-archive.chainsafe.dev/latest/calibnet/](https://forest-archive.chainsafe.dev/latest/calibnet/) Now that we have downloaded a recent snapshot we can import the snapshot to Lotus and start the daemon process. Import snapshot and start the Lotus daemon [#](https://lotus.filecoin.io/lotus/install/start-lotus/#import-snapshot-and-start-the-lotus-daemon) ------------------------------------------------------------------------------------------------------------------------------------------------ The `lotus` application runs as a daemon and a client to control and interact with that daemon. A daemon is a long-running program that is usually run in the background. During the first run, Lotus will: * Set up its data folder at `~/.lotus`. * Download the necessary proof parameters. This is a few gigabytes of data that is downloaded once. If you do not want the chain data folder at the default `~/.lotus` location, you can specify its location by exporting the environment variable `LOTUS_PATH=path/to/.lotus`. If you want this environment variable to persist across sessions, you need to export the variable from the user’s profile script. ### Import the snapshot: [#](https://lotus.filecoin.io/lotus/install/start-lotus/#import-the-snapshot) # Replace the filename for the `.car` file based on the snapshot you downloaded. lotus daemon --import-snapshot path/to/forest_snapshot_mainnet_2024-01-11_height_3555440.forest.car.zst --halt-after-import With this command Lotus will import the snapshot and halt after the import process has finished. After the process has halted we can start the daemon and sync the remaining blocks. ### Start the Lotus daemon [#](https://lotus.filecoin.io/lotus/install/start-lotus/#start-the-lotus-daemon) nohup lotus daemon > ~/lotus.log 2>&1 & This command makes the daemon run in the background and log messages to `~/lotus.log`. You can change the path of the lotus.log file if you want the logs to be logged elsewhere. ### Check syncing status [#](https://lotus.filecoin.io/lotus/install/start-lotus/#check-syncing-status) After the Lotus daemon has been running for a few minutes, use `lotus sync wait` to check the sync status of your lotus node. lotus sync wait lotus sync wait Worker: 78534; Base: 2403099; Target: 2403099 (diff: 0) State: message sync; Current Epoch: 2403099; Todo: 0 Done! When the `lotus sync wait` command shows done you are fully synced with the chain. ### Watch the logs [#](https://lotus.filecoin.io/lotus/install/start-lotus/#watch-the-logs) watch tail -30 ~/lotus.log 💡 Do not be concerned by the number of warnings and sometimes errors showing in the logs. They are a normal part of the daemon lifecycle as it participates in the globally distributed consensus network. Interact with the daemon [#](https://lotus.filecoin.io/lotus/install/start-lotus/#interact-with-the-daemon) ------------------------------------------------------------------------------------------------------------ The `lotus` command allows you to interact with a _running_ Lotus daemon. The `lotus-miner` and `lotus-worker` commands work in the same way. Lotus comes with built-in CLI documentation. lotus - chain: Interact with filecoin blockchain - client: Make deals, store data, retrieve data - wallet: Manage wallet - net: Manage P2P Network - sync: Inspect or interact with the chain syncer ... # Show general help lotus --help # Show help for the "client" to make deals, store data, retrieve data lotus client --help You can use the `lotus net peers` to check the number of other peers that it is connected to in the Filecoin network. lotus net peers 12D3KooWSDqWSDNZtpJae15FBGpJLeLmyabUfZmWDWEjqEGtUF8N, [/ip4/58.144.221.27/tcp/33425] 12D3KooWRTQoDUhWVZH9z5u9XmaFDvFw14YkcW7dSBFJ8CuzDHnu, [/ip4/67.212.85.202/tcp/10906] Or check the current version of your Lotus node as well as network. lotus version Daemon: 1.23.0+mainnet+git.d1d4b35ad+api1.5.0 Local: lotus version 1.23.0+mainnet+git.d1d4b35ad Stop the Lotus daemon [#](https://lotus.filecoin.io/lotus/install/start-lotus/#stop-the-lotus-daemon) ------------------------------------------------------------------------------------------------------ To gracefully stop the running lotus daemon (required when restarting the daemon to update Lotus), use the following command: lotus daemon stop ## When running with systemd do: # systemctl stop lotus-daemon [Edit this page on GitHub](https://github.com/filecoin-project/lotus-docs/blob/main/content/en/lotus/install/start-lotus.md) [← MacOS](https://lotus.filecoin.io/lotus/install/macos/) [Advanced Configurations →](https://lotus.filecoin.io/lotus/configure/defaults/) --- # Remote lotus-wallet management - Lotus Docs Remote lotus-wallet management ============================== This is a step-by-step guide on how to set up the lotus-wallet for remote wallet management. This tutorial is for experienced Lotus users. This tutorial is based on a setup with two different servers, one to run the `lotus daemon` while the other runs the `lotus-wallet` application. Prerequisites [#](https://lotus.filecoin.io/tutorials/lotus/remote-lotus-wallet/#prerequisites) ------------------------------------------------------------------------------------------------ * [lotus-wallet](https://lotus.filecoin.io/kb/install-lotus-wallet/) installed on a separate server. * Backup of your [addresses private keys](https://lotus.filecoin.io/lotus/manage/manage-fil/#exporting-and-importing-addresses/) . Initial setup [#](https://lotus.filecoin.io/tutorials/lotus/remote-lotus-wallet/#initial-setup) ------------------------------------------------------------------------------------------------ On the server that is going to run the `lotus-wallet` binary. Run `lotus-wallet get-api-key` to initialize the `~/.lotuswallet` repo and generate the API key for it. If you want to create the .lotuswallet repo in a custom location, you can specify the repo with the `--wallet-repo` option, or by exporting a `WALLET_PATH=/path/to/lotuswallet` environment variable. 2022-08-12T12:56:53.817Z INFO repo repo/fsrepo.go:267 Initializing repo at '/home/server/.lotuswallet' 2022-08-12T12:56:53.817Z WARN modules modules/core.go:148 Generating new API secret eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJBbGxvdyI6WyJhZG1pbiJdLCJDcmVhdGVkIjoiMjAyMi0wOC0xMlQxMjo1Njo1My44MTc0MTUzMzlaIiwiUnVsZXMiOm51bGx9.bS-6hLG1csJu8Pa8c8AQ_5IUX98iAfyxlMRiO61X1_g After that you can run the lotus-wallet with `lotus-wallet run`. Depending on your network setup and where you are planning to run the `lotus-wallet` you might want to specify the host address and port the wallet api will listen on with the `--listen` option. ./lotus-wallet run --listen 123.123.12.123:1777 2022-08-12T13:26:46.976Z INFO main lotus-wallet/main.go:286 Starting lotus wallet 2022-08-12T13:26:46.977Z INFO main lotus-wallet/main.go:331 Setting up API endpoint at 123.123.12.123:1777 2022-08-12T13:26:46.978Z INFO main lotus-wallet/main.go:378 API auth enabled, use 'lotus-wallet get-api-key' to get API key Now we need to configure our lotus daemon node. Edit your lotus config (~/.lotus/config.toml), and locate the \[Wallet\] section. Set the the `RemoteBackend` to `[api key]:http://[wallet ip]:[wallet port]` (the default port is 1777). So in our example that would be: [Wallet] # type: string # env var: LOTUS_WALLET_REMOTEBACKEND RemoteBackend = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJBbGxvdyI6WyJhZG1pbiJdLCJDcmVhdGVkIjoiMjAyMi0wOC0xMlQxMjo1Njo1My44MTc0MTUzMzlaIiwiUnVsZXMiOm51bGx9.bS-6hLG1csJu8Pa8c8AQ_5IUX98iAfyxlMRiO61X1_g:http://123.123.12.123:1777" Then restart (or run) your lotus daemon node. You can confirm that your `lotus-wallet` remote backend is properly set up by running the `lotus wallet list` command on the lotus daemon. On the server that is running `lotus wallet` you should be able to see that action being logged: 2022-08-12T13:44:10.181Z INFO main lotus-wallet/logged.go:35 WalletList ### Importing addresses [#](https://lotus.filecoin.io/tutorials/lotus/remote-lotus-wallet/#importing-addresses) For now stop the `lotus-wallet` and restart it in the `interactive` mode while we import the addresses. lotus-wallet run --interactive=true --listen 123.123.12.123:1777 On your lotus daemon node start importing the backup keys for the addresses you want to have on the `lotus-wallet`. lotus wallet import /path/to/backup/lotus-wallet.key On your `lotus-wallet` node you should now see a prompt, asking you if you want to import the private key. Authorize the import to finalize the address import on the `lotus-wallet`. ----- ACTION: WalletImport - Import private key TYPE: bls Accept the above? (Authorize/No): Authorize approved Repeat the process for all the addresses you want to be managed by the `lotus-wallet`. After importing all the keys stop the `lotus-wallet` process and restart the lotus daemon with the RemoteBackend config turned off: [Wallet] # type: string # env var: LOTUS_WALLET_REMOTEBACKEND #RemoteBackend = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJBbGxvdyI6WyJhZG1pbiJdLCJDcmVhdGVkIjoiMjAyMi0wOC0xMlQxMjo1Njo1My44MTc0MTUzMzlaIiwiUnVsZXMiOm51bGx9.bS-6hLG1csJu8Pa8c8AQ_5IUX98iAfyxlMRiO61X1_g:http://123.123.12.123:1777" Now you can start removing the addresses on the lotus daemon node with `lotus wallet delete`. ❗ The `lotus wallet delete` cmd is just a soft-deletion of your addresses' private keys in the Lotus database. A hard deletion of the private keys in the `~/.lotus/keystore` folder is needed to make them non-retrievable. NB! Make sure that you have a backup of your addresses' private keys in a safe and secure place before you hard-delete them. After all that is done, you can now restart the `lotus-wallet` without the `--interactive` mode. When you run the `lotus wallet list` on the lotus daemon node you should be able to see all your keys. You have now successfully set up the `lotus-wallet` binary to handle your keys and addresses. Extra steps [#](https://lotus.filecoin.io/tutorials/lotus/remote-lotus-wallet/#extra-steps) -------------------------------------------------------------------------------------------- If you want to create any new wallets that you **do not want** to be on the remote `lotus-wallet` service (such as PoSt-control addresses for example) will require you to turn of the RemoteBackend config, restart the daemon and create them such that they land on the server running `lotus-daemon` and not the `lotus-wallet`. [Edit this page on GitHub](https://github.com/filecoin-project/lotus-docs/blob/main/content/en/tutorials/lotus/remote-lotus-wallet.md) [← Backfilling Messages in Lotus](https://lotus.filecoin.io/tutorials/lotus/backfill-messages/) [Grafana dashboard for Lotus →](https://lotus.filecoin.io/tutorials/lotus/grafana-dashboard/) --- # This Week in Lotus - Week 47 - 2023 - Lotus Docs This Week in Lotus - Week 47 - 2023 =================================== Posted November 25, 2023 by  ‐ **2 min read** **Calibration Upgrade Successful** The Calibration network upgrade has been a success! Thanks to all the operators and testers for your invaluable contributions. **Network Version 21 - 🍉Watermelon🍉** _Mark your calendars!_ The mandatory nv21 upgrade is scheduled to upgrade at `2023-12-12T13:30:00Z`, epoch `346938`. Use the [Filecoin chain time calculator to find out the exact time, for your timezone](https://observablehq.com/@jbenet/filecoin-chain-time-calculator) . * [Lotus v1.24.0](https://github.com/filecoin-project/lotus/releases/tag/v1.24.0) - Stable release * The corresponding Boost version for this release is [v2.1.0](https://github.com/filecoin-project/boost/releases/tag/v2.1.0) . * [Lotus v1.25.0](https://github.com/filecoin-project/lotus/releases/tag/v1.25.0) - Feature release * The corresponding Boost version for this release is \[v2.1.0\] Please note, that the minimum :golang: Go version is now `v1.20.7`. _Go version 1.21.x is not supported yet._ Make sure to check out the full changelog for each version 📖! **Pre network upgrade checklist:** * Make sure that your system is either running **Lotus v1.24.0** or **Lotus v1.25.0**. * Run `lotus state actor-cids --network-version 21` and check that the manifest CID matches this CID: Network Version: 21 Actor Version: 12 Manifest CID: bafy2bzaceapkgfggvxyllnmuogtwasmsv5qi2qzhc2aybockd6kag2g5lzaio **In the upcoming release candidate next week:** **High Availability WindowPoSt and PC2 SupraSeal:** * Our team has made significant progress with the High Availability (HA) for WindowPoSt and it’s soon ready for community testing. Keep an eye on the `#fil-lotus-announcements` * SupraSeal for PC2 is showing impressive performance, with benchmark times around 150 seconds on a A5000! **Highlights** * **Storage Miner Actor Updates:** We’ve implemented batch calls to ClaimAllocations during ProveCommitAggregate. This enhancement streamlines the process, reducing the gas cost per sector. ([#1304](https://github.com/filecoin-project/builtin-actors/pull/1304) ) * **Verified Registry Actor Optimization:** Now processing allocation claims in batches by sector. This not only optimizes our system but also translates to lower costs for our users. ([#1337](https://github.com/filecoin-project/builtin-actors/pull/1337) ) * **Storage Miner/Market Actors Improvement:** We’ve made batch calls to ActivateDeals by sector during ProveCommitAggregate. This improvement is a direct response to the gas increases since FIP0045. ([#1310](https://github.com/filecoin-project/builtin-actors/pull/1310) ) That’s it for the week! **Have a great weekend!** ☀️ --- # Tasks - Lotus Docs Tasks ===== An explanation of the tasks the lotus-miner daemon is responsible for We can split the tasks the `lotus-miner` daemon and its sub-components are responsible for into a couple of different categories. **Sealing tasks**: Before a sector can be committed to network, the storage provider _must_ seal the sector, meaning it needs to encode the data in the sector to prepare it for the proving tasks. Sealing a sector is a multi-step process and is time-intensive to create, because the encrypted version of each chunk of data depends on every other chunk of input data. **Proving tasks**: These tasks allow storage providers to verifiably prove they have the data they have committed to the network on disk. **Scheduling tasks**: These are background tasks for controlling and optimizing work across all the sub-components of `lotus-miner`. Since Lotus is highly configurable and many of the `lotus-miner` sub-components can be split into separate machines, scheduling work efficiently and securely is important. **SnapDeal tasks:** These tasks are a special type of sealing tasks which allow a storage provider to take empty committed sectors and place deal data into them. ![Overview of the lotus-miner tasks](https://lotus.filecoin.io/storage-providers/get-started/tasks/lotus-miner-tasks_hu4cee2f045dbf9713fb1e1c871f3acd98_395097_20x0_resize_box_3.png) Sealing tasks [#](https://lotus.filecoin.io/storage-providers/get-started/tasks/#sealing-tasks) ------------------------------------------------------------------------------------------------ Before a sector can be committed to the network, the storage provider _must_ seal the sector, meaning the data needs to be encoded in the sector to prepare it for the proving tasks. Sealing a sector is a multi-step process and is time-intensive to create because the encrypted version of each chunk of data depends on every other chunk of input data. ### Add piece [#](https://lotus.filecoin.io/storage-providers/get-started/tasks/#add-piece) `Add piece` is the task where deal data, and padding if required, is written to a sector. A sector will be left open and waiting for more deal data until it’s full, then it will move on to the PreCommit 1 task. If no sectors with enough space are open when an `Add piece` task happens, a new sector will be created. ### PreCommit 1 [#](https://lotus.filecoin.io/storage-providers/get-started/tasks/#precommit-1) The PreCommit 1 task is the first phase of the Proof-of-Replication process and is where encoding and replication of the data take place. The PreCommit 1 task is predominantly using a single CPU core, and is heavily utilizing the SHA256 instruction set. Using a CPU that has the SHA256 instruction set is therefore recommended. All 11 layers of calculation, layer by layer, are calculated sequentially. Each layer is 32GiB in size. When the PreCommit 1 process is finished, you will have generated data to the amount of 384GiB (A 32GiB unsealed sector + (11 layers x 32GiB)). ### PreCommit 2 [#](https://lotus.filecoin.io/storage-providers/get-started/tasks/#precommit-2) In the PreCommit 2 task, a column hash computation based on the 11 layers generated in PreCommit 1 is calculated, and a merkle tree gets constructed. These tasks can either be done by a CPU or accelerated by using a GPU. During this phase, an additional 64GiB file (32GiB sectors) that represents the merkle tree is stored, in addition to the sealed 32GiB sector. Bringing the total amount of storage needed to approximately 500 GiB for one sector. ### WaitSeed [#](https://lotus.filecoin.io/storage-providers/get-started/tasks/#waitseed) The WaitSeed state is a security wait requirement by the network that is initiated between the PreCommit 2 and the start of the Commit 1 phase. It is fixed at 150 epochs, i.e 75 minutes long. At the end of the wait seed state, the sector acquires some randomness from the chain. ### Commit 1 [#](https://lotus.filecoin.io/storage-providers/get-started/tasks/#commit-1) The randomness acquired at the end of the wait seed state is used in the Commit 1 phase to select a random subset of leaf nodes from the merkle tree generated in the PreCommit 2 phase. From the subset of leaf nodes it checks, it generates a much smaller file than the full merkle tree. That file is approximately 16MiB in size. ### Commit 2 [#](https://lotus.filecoin.io/storage-providers/get-started/tasks/#commit-2) In the Commit 2 phase, the file from the Commit 1 gets compressed into a much smaller proof using zk-SNARKs. The proof generated at the end of Commit 2 can be verified that is correct very fast, and is small enough to be suitable for a blockchain. The final size of the proof is approximately 2KiB, and gets published on the blockchain. The generation of the zk-SNARK can be done by the CPU or accelerated by using a GPU. Proving tasks [#](https://lotus.filecoin.io/storage-providers/get-started/tasks/#proving-tasks) ------------------------------------------------------------------------------------------------ These tasks allow storage providers to verifiably prove they have the data they have committed to the network on disk to create a verifiable and public record attesting to the storage provider’s continued commitment to storing the data, or for the network to reward storage providers for their contributions. ### WindowPoSt [#](https://lotus.filecoin.io/storage-providers/get-started/tasks/#windowpost) Window Proof-of-SpaceTime (WindowPoSt) is a proving task where the storage provider is asked to compute a proof that they are actually storing the data they have committed to the network. Every 24-hour period is broken into a series of windows, where each window is 30 minutes long. In a given window, a storage provider is asked to generate a proof based on random parts of the sealed sectors the storage provider has in that window. If they don’t have the data anymore, they won’t be able to respond with their proof in time, and will be penalized. In this way, every sector is audited at least once in any 24-hour period, and a permanent, verifiable, and public record attesting to each storage provider’s continued commitment is kept. ### WinningPoSt [#](https://lotus.filecoin.io/storage-providers/get-started/tasks/#winningpost) Winning Proof-of-SpaceTime (WinningPoSt) is the mechanism by which storage providers are rewarded by the Filecoin network for their contributions to it. As a requirement for doing so, each storage provider is tasked with submitting a compressed Proof-of-Spacetime for a specified sector. Each elected storage provider who successfully creates a block is granted FIL, as well as the opportunity to charge other Filecoin participants fees to include messages in the block. Storage providers who fail to do this in the necessary window will forfeit their opportunity to mine a block. Messages [#](https://lotus.filecoin.io/storage-providers/get-started/tasks/#messages) -------------------------------------------------------------------------------------- During the sealing phase, the storage provider sends a couple of messages to the Filecoin network: ![Overview of sealing messages](https://lotus.filecoin.io/storage-providers/get-started/tasks/sealing-messages_hu9e4d4cbc1378f00b0e08e7a5d8257535_85425_20x0_resize_box_3.png) ### PreCommitSector [#](https://lotus.filecoin.io/storage-providers/get-started/tasks/#precommitsector) Through the `PreCommitSector` message, a storage provider submits a deposit for a given sector’s sealed data, often referred to as the SealedCID, or commitment to replica (commR). After the message is included on-chain, the sector is registered to the storage provider, and the sector enters the WaitSeed state, which is a security wait requirement by the network. This message type can also be batched to include multiple PreCommitSector messages in a single message to save gas fees paid to the network. These batched messages are called `PreCommitSectorBatch`. ### ProveCommitSector [#](https://lotus.filecoin.io/storage-providers/get-started/tasks/#provecommitsector) Through the `ProveCommitSector` message, the storage provider provides a Proof of Replication (PoRep) for the sector committed in the `PreCommitSector` message. This proof must be submitted AFTER the security wait requirement by the network (WaitSeed), and before the PreCommit expiration of the sector. This message type can also be aggregated to include multiple ProveCommitSector messages in a single message. These aggregated messages are called `ProveCommitAggregate`. SnapDeal tasks [#](https://lotus.filecoin.io/storage-providers/get-started/tasks/#snapdeal-tasks) -------------------------------------------------------------------------------------------------- SnapDeal sealing tasks are a special type of sealing tasks which allow a storage provider to take already committed sealed sectors and place deal data into them. ### Replica Update [#](https://lotus.filecoin.io/storage-providers/get-started/tasks/#replica-update) The Replica Update tasks (also known as UpdateReplica in the sealing jobs output) are similar to the PreCommit 2 task, with some additional logic that makes it impossible to know beforehand which bytes come out of the new sealed sector. This is to maintain security in the network. This task encodes the incoming unsealed data (deal data) into an existing sealed sector. ### Prove Replica Update 1 [#](https://lotus.filecoin.io/storage-providers/get-started/tasks/#prove-replica-update-1) This task is similar to the Commit 1 task, only with slightly lighter proofs, because we only need to prove that we have encoded new data into the existing sealed sector. ### Prove Replica Update 2 [#](https://lotus.filecoin.io/storage-providers/get-started/tasks/#prove-replica-update-2) In the Prove Replica Update 2 phase, the output from the Prove Replica Update 1 task gets compressed into a smaller proof using zk-SNARKs. The zk-SNARK generated after the Prove Replica Update 2 can verify that the new data is encoded in the new sealed sector, and is small enough to be suitable for a blockchain. The generation of the zk-SNARK can be done by the CPU or accelerated by using a GPU. Tips [#](https://lotus.filecoin.io/storage-providers/get-started/tasks/#tips) ------------------------------------------------------------------------------ ### Safely restarting the `lotus-miner` daemon [#](https://lotus.filecoin.io/storage-providers/get-started/tasks/#safely-restarting-the-lotus-miner-daemon) The process of shutting down a storage provider and starting it again is complicated. Several factors need to be taken into account to be able to do it with all the guarantees: * How long the storage provider plans to be offline. * The existence and distribution of the proving deadlines for the storage provider. * The presence of open payment channels and ongoing retrieval deals. * The occurrence of ongoing sealing operations. ### Reducing time offline [#](https://lotus.filecoin.io/storage-providers/get-started/tasks/#reducing-time-offline) Given the need to continuously send proofs to the network, a storage provider should be offline as little as possible. Offline time includes the time it takes for the server to restart the `lotus-miner` daemon fully. [Edit this page on GitHub](https://github.com/filecoin-project/lotus-docs/blob/main/content/en/storage-providers/get-started/tasks/index.md) [← Overview](https://lotus.filecoin.io/storage-providers/get-started/overview/) [Economics →](https://lotus.filecoin.io/storage-providers/get-started/economics/) --- # Grafana dashboard for Lotus - Lotus Docs Grafana dashboard for Lotus =========================== Lotus supports exporting a wide range of metrics that can be visualized with Grafana. This tutorial guides you through setting up Prometheus and Grafana to monitor your Lotus node. Overview [#](https://lotus.filecoin.io/tutorials/lotus/grafana-dashboard/#overview) ------------------------------------------------------------------------------------ Lotus nodes export metrics that can be collected and visualized to gain insights into node performance and behavior. This tutorial will show you how to: 1. Set up Prometheus to collect metrics from your Lotus node 2. Set up Grafana to visualize these metrics 3. Import the pre-configured dashboards from the Lotus repository Prerequisites [#](https://lotus.filecoin.io/tutorials/lotus/grafana-dashboard/#prerequisites) ---------------------------------------------------------------------------------------------- * A Linux or macOS system with a running Lotus node * Administrative/root access to install software * The Lotus repository cloned on your system (for config files and dashboards) Setting up monitoring [#](https://lotus.filecoin.io/tutorials/lotus/grafana-dashboard/#setting-up-monitoring) -------------------------------------------------------------------------------------------------------------- The Lotus repository includes detailed instructions for setting up Prometheus and Grafana, along with pre-configured dashboards in its [metrics documentation](https://github.com/filecoin-project/lotus/blob/master/metrics/README.md) . Follow these steps: 1. Clone the Lotus repository if you haven’t already: git clone https://github.com/filecoin-project/lotus.git cd lotus 2. Follow the instructions in the [Lotus metrics README](https://github.com/filecoin-project/lotus/blob/master/metrics/README.md) to: * Install and configure Prometheus * Install and configure Grafana * Import the pre-configured dashboards Available Dashboards [#](https://lotus.filecoin.io/tutorials/lotus/grafana-dashboard/#available-dashboards) ------------------------------------------------------------------------------------------------------------ The Lotus repository includes several pre-configured dashboards: * **F3Dashboard.json**: Monitors F3 metrics like GPBFT instance completion rates, error counts, phase transitions, and encoding performance. * **MessageExecution.json**: Provides insights into message execution metrics, focusing on ApplyBlocks timing data. * **Node system health**: When using node\_exporter, you can monitor system-level metrics like CPU, memory, disk, and network usage. Troubleshooting [#](https://lotus.filecoin.io/tutorials/lotus/grafana-dashboard/#troubleshooting) -------------------------------------------------------------------------------------------------- If you encounter issues: 1. Make sure your Lotus node is running and exporting metrics 2. Verify Prometheus is configured to scrape your Lotus node endpoint 3. Check that Grafana can connect to your Prometheus instance 4. Ensure you’re importing the dashboard JSON files correctly For more detailed troubleshooting, refer to the [Lotus metrics documentation](https://github.com/filecoin-project/lotus/blob/master/metrics/README.md) . Additional Resources [#](https://lotus.filecoin.io/tutorials/lotus/grafana-dashboard/#additional-resources) ------------------------------------------------------------------------------------------------------------ * [Prometheus documentation](https://prometheus.io/docs/introduction/overview/) * [Grafana documentation](https://grafana.com/docs/) * [Lotus metrics documentation](https://github.com/filecoin-project/lotus/blob/master/metrics/README.md) [Edit this page on GitHub](https://github.com/filecoin-project/lotus-docs/blob/main/content/en/tutorials/lotus/grafana-dashboard.md) [← Remote lotus-wallet management](https://lotus.filecoin.io/tutorials/lotus/remote-lotus-wallet/) [Lotus Miner Setup →](https://lotus.filecoin.io/tutorials/lotus-miner/run-a-miner/) --- # This Week in Lotus - Week 46 - 2023 - Lotus Docs This Week in Lotus - Week 46 - 2023 =================================== Posted November 19, 2023 by  ‐ **2 min read** **Network Version 21 - Watermelon - Scope & Timeline Update** In last week’s update, we outlined the difficulties encountered while [integrating FIP-0070](https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0070.md) into the upcoming Network Version 21 upgrade. To tackle these challenges, [the governance team initiated a decision matrix](https://www.notion.so/pl-strflt/nv21-decision-matrix-for-FIP0070-bug-a39174216ee1479eab9a55b2f23da520) , enabling our teams to thoroughly investigate the issues and provide a clear path forward. Following several days of intense discussion, we’re now able to reveal the revised scope and timeline for the Watermelon NV21 upgrade. You might have already noticed this announcement in the `#fil-lotus-announcement` channel recently. * 🛠️ **FIP-0070 Update -** We’ve decided to [descope FIP-0070](https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0070.md) from the upcoming 🍉 NV21 upgrade, prioritizing the security and stability of the network. But don’t worry, FIP-0070 is still on the way! Our FIP authors and implementers are refining its design and implementation and you can look forward to seeing it in a future upgrade. Stay tuned! 📻 * **Mainnet upgrade timeline -** The Mainnet upgrade will now be taking place at `epoch 3469380` which falls on the **12th of December 2023 at 01:30 PM UTC.** **🚨 Attention Calibrator Crew!! 🚨** Heads up, team Calibration! The various implementation teams have also decided to perform another minor CodeCID migration on the Calibration network. This is to completely remove all remnants of the now-descoped FIP-0070 from the v12 actor code and fully align our Calibration testnet with the new scope for NV21 on Mainnet! This also means more Calibration testing time before 🍉 NV21 officially lands!! 🛬 **👀 This new migration will be taking place on Calibration at epoch 1108174, which falls on Tuesday, November the 21st 2023, at 01:00PM UTC.** ⚠️ All Calibration operators should be running a minimum of [Lotus v1.24.0-rc6](https://github.com/filecoin-project/lotus/releases/tag/v1.24.0-rc6) or [v1.25.0-rc5](https://github.com/filecoin-project/lotus/releases/tag/v1.25.0-rc5) prior to the Calibration migration on Tuesday in order to maintain uninterrupted operations! ⚠️ **Lotus Releases Update** Lotus versions [v1.24.0-rc6](https://github.com/filecoin-project/lotus/releases/tag/v1.24.0-rc6) and [v1.25.0-rc5](https://github.com/filecoin-project/lotus/releases/tag/v1.25.0-rc5) have now officially landed! Please check out the detailed release notes for all the juicy info! The team is now aiming to publish **final releases of v1.24.0 and v1.25.0 on the 23rd of November 2023**, which gives node operators over 2 weeks to update their nodes before the Mainnet upgrade on the 12th of December! That’s it for the week! **Have a great weekend!** ☀️ --- # Economics - Lotus Docs Economics ========= This guide documents the basic economics of being a storage provider in filecoin. Rewards [#](https://lotus.filecoin.io/storage-providers/get-started/economics/#rewards) ---------------------------------------------------------------------------------------- There are two main types of rewards for their efforts: storage fees and block rewards. ### Storage fees [#](https://lotus.filecoin.io/storage-providers/get-started/economics/#storage-fees) _PoSt (Proof-of-Spacetime)_ window checks are performed at 24 hour intervals across the network to ensure that storage providers are continuing to host their required sectors as normal. Correspondingly, each storage provider’s set of pledged sectors is partitioned into subsets, one subset for each window. Within a given window, each storage provider must submit a PoSt for each sector in their respective subset. For each day a storage provider is inactive it will receive a [fault fee](https://lotus.filecoin.io/storage-providers/get-started/economics/#penalty) . **Storage fees** are the fees paid regularly by clients after a deal has been reached, in exchange for storing data. These fees are automatically deposited into a provider’s associated withdrawal wallet as they continue to perform their duties over time, and are briefly locked upon being received. ### Block rewards [#](https://lotus.filecoin.io/storage-providers/get-started/economics/#block-rewards) **Block rewards** are large sums that are given to the storage provider credited for a new block. Unlike storage fees, these rewards do not come from an associated client; rather, the network “prints” new FIL as both an inflationary measure and an incentive to providers advancing the chain. All active storage providers on the network have a chance at receiving a block reward, their chance at such being directly proportional to the amount of storage space currently being contributed to the network. ❗ A storage provider needs to have 10 TiB minimum raw power in the network to be eligible for block rewards. The mechanism to earn the right to _provide_ a new block is called _WinningPoSt_. In the Filecoin network, time is discretized into a series of epochs – the blockchain’s height corresponds to the number of elapsed epochs. At the beginning of each epoch, a small number of storage providers are elected to provide new blocks. Additionally to the block reward, each storage provider can collect the fees associated to each message included in the block. The number of blocks on every tipset is based on a Poisson distribution of a random variable with λ = 5. Provider implementations may use several strategies to choose which messages to include in every block to minimize overlap. Only the “first execution” of each message will collect the associated fees, with executions ordered per the hash of the VRF (Verifiable Random Function) ticket associated to the block. When storage provider get block rewards from the network, 25% percent of the reward will be immediately released to your storage provider actor’s available balance and the remaining 75% will become locked funds and be released linearly in 180 days. ### Verified clients [#](https://lotus.filecoin.io/storage-providers/get-started/economics/#verified-clients) To further incentivize the storage of “useful” data over simple capacity commitments, storage providers have the additional opportunity to compete for special deals offered by _verified clients_. Such clients are certified with respect to their intent to offer deals involving the storage of meaningful data, and the power a storage provider earns for these deals is augmented by a multiplier. The total amount of power a given storage provider has, after accounting for this multiplier, is known as **quality-adjusted power**. ### Retrieval fees [#](https://lotus.filecoin.io/storage-providers/get-started/economics/#retrieval-fees) Retrieval fees are paid incrementally using _payment channels_ as the retrieval deals are fulfilled (by sending portions of the data to the client. This happens off-chain. Penalty [#](https://lotus.filecoin.io/storage-providers/get-started/economics/#penalty) ---------------------------------------------------------------------------------------- In Filecoin, storage providers are succeptible to two different kinds of slashing: _storage fault slashing_, and _consensus fault slashing_. ### Storage fault slashing [#](https://lotus.filecoin.io/storage-providers/get-started/economics/#storage-fault-slashing) This term encompasses a broader set of penalties which are to be paid by storage providers if they fail to provide sector reliability or decide to voluntarily exit the network. These include: * **Fault fees**: a penalty that a storage provider incurs for each day a storage provider’s sector is offline (fails to submit Proofs-of-Spacetime to the chain). Fault fees continue until the associated wallet is empty and the storage provider is removed from the network. In the case of a faulted sector, there will be an additional sector penalty added immediately following the fault fee. * **Sector penalties**: a penalty that a storage provider incurs for a faulted sector that was not declared faulted before a _WindowPoSt_ check occurs. The sector will pay a fault fee after a Sector Penalty once the fault is detected. * **Termination fees** is a penalty that a storage provider incurs when a sector is voluntarily or involuntarily terminated and is removed from the network. ### Consensus fault slashing [#](https://lotus.filecoin.io/storage-providers/get-started/economics/#consensus-fault-slashing) This penalty is incurred when committing consensus faults. This penalty is applied to storage providers that have acted maliciously against the network’s consensus functionality. Storage provider accounting [#](https://lotus.filecoin.io/storage-providers/get-started/economics/#storage-provider-accounting) -------------------------------------------------------------------------------------------------------------------------------- A storage provider’s financial gain or loss is affected by the following three actions: 1. The deposited tokens to act as collateral for their PreCommitted and ProveCommitted Sectors 2. Storage providers earn tokens from block rewards when they are elected to mine a new block and extend the blockchain. 3. Storage providers lose tokens if they fail to prove storage of a sector and are given penalties as a result. ### Balance requirements [#](https://lotus.filecoin.io/storage-providers/get-started/economics/#balance-requirements) A storage provider’s token balance MUST cover ALL of the following: * **PreCommit Deposits**: When a storage provider PreCommits a Sector, they must supply a “precommit deposit” for the Sector, which acts as collateral. If the Sector is not ProveCommitted on time, this deposit is removed and burned. * **Initial Pledge**: When a storage provider ProveCommits a Sector, they must supply an “initial pledge” for the Sector, which acts as collateral. If the Sector is terminated, this deposit is removed and burned along with rewards earned by this sector up to a limit. * **Locked Funds**: When a storage provider receives tokens from block rewards, the tokens are locked and added to the storage provider vesting table to be unlocked linearly over future epochs. ### Faults, Penalties and Fee Debt [#](https://lotus.filecoin.io/storage-providers/get-started/economics/#faults-penalties-and-fee-debt) **Faults** A Sector’s PoSts must be submitted on time, or that Sector is marked “faulty.” There are three types of faults: * **Declared Fault**: When the storage provider explicitly declares a Sector “faulty” _before_ its Deadline’s FaultCutoff. Recall that `WindowPoSt` proofs are submitted per partition for a specific `ChallengeWindow`. A storage provider has to declare the sector as faulty before the `ChallengeWindow` for the particular partition opens. Until the sectors are recovered they will be masked from proofs in subsequent proving periods. * **Detected Fault**: Partitions of sectors without PoSt proof verification records, which have not been declared faulty before the `FaultCutoff` epoch’s deadline are marked as detected faults. * **Skipped Fault**: If a sector is currently in active or recovering state and has not been declared faulty before, but the storage provider’s PoSt submission does not include a proof for this sector, then this is a “skipped fault” sector (also referred to as “skipped undeclared fault”). In other words, when a storage provider submits PoSt proofs for a partition but does not include proofs for some sectors in the partition, then these sectors are in “skipped fault” state. This is in contrast to the “detected fault” state, where the storage provider does not submit a PoSt proof for any section in the partition at all. The skipped fault is helpful in case a sector becomes faulty after the `FaultCutoff` epoch. Skip faults happen when windowPost process is not able to acquire certain sectors on the disk during the deadline. These sectors can be found in the wdPost message submitted to the chain. Note that the “skipped fault” allows for sector-wise fault penalties, as compared to partition-wide faults and penalties, as is the case with “detected faults”. [Edit this page on GitHub](https://github.com/filecoin-project/lotus-docs/blob/main/content/en/storage-providers/get-started/economics.md) [← Tasks](https://lotus.filecoin.io/storage-providers/get-started/tasks/) [Hardware requirements →](https://lotus.filecoin.io/storage-providers/get-started/hardware-requirements/) --- # Using Ledger - Lotus Docs Using Ledger ============ This guide will show you how to use Lotus with a Ledger hardware wallet. You can either use the Glif wallet or manually manage your funds using the Lotus node with Ledger integration. [Filecoin is now available on Ledger Live!](https://filecoin.io/blog/posts/zondax-brings-filecoin-to-ledger-live/) Clients, Storage Providers, and other network participants can send and receive FIL directly from Ledger devices while their private keys remain secure and are never exposed to third parties. Before you select a wallet, setup your Ledger device. Setup your Ledger device [#](https://lotus.filecoin.io/lotus/manage/ledger/#setup-your-ledger-device) ------------------------------------------------------------------------------------------------------ 1. Install [Ledger Live](https://www.ledger.com/start/) and follow the instructions to set up your device. ❗ Linux users may need to add the [necessary udev rules](https://support.ledger.com/hc/en-us/articles/115005165269-Fix-USB-connection-issues-with-Ledger-Live?support=true) 2. Navigate to the Ledger Live dashboard. 3. Select **My Ledger** in the left-hand menu pane: ![ledger-enable-dev-mode](https://lotus.filecoin.io/lotus/manage/ledger/ledger_hu69eef44f44375669881e5f1c2ea2e47a_124321_20x0_resize_box_3.png) 4. After approving the request to allow **Ledger Manager** on your Ledger device, search for and install the **Filecoin** app. Now that you’ve setup your ledger device, select your wallet UI option. Ledger Wallet UI Options [#](https://lotus.filecoin.io/lotus/manage/ledger/#ledger-wallet-ui-options) ------------------------------------------------------------------------------------------------------ You can either manually manage your funds using the [Lotus node and Ledger integration](https://lotus.filecoin.io/lotus/manage/ledger/#lotus) or use the [browser-based Glif wallet](https://lotus.filecoin.io/lotus/manage/ledger/#glif-wallet) . ### Using Lotus [#](https://lotus.filecoin.io/lotus/manage/ledger/#using-lotus) To use a Filecoin Lotus node with Ledger hardware to manage your funds, add your Ledger to a Lotus node. #### Add your Ledger to a Lotus node [#](https://lotus.filecoin.io/lotus/manage/ledger/#add-your-ledger-to-a-lotus-node) ❗ Ensure that you fully trust the Lotus node you are connecting to. 1. Navigate to `~/.lotus/config.toml`. 2. In the Lotus configuration file, remove “#” and set `EnableLedger = true` in the `[Wallet]` section: [Wallet] EnableLedger = true 3. Unlock your Ledger device. 4. Open the Filecoin app on your Ledger device and keep it connected to your computer. 5. Create a Ledger-backed (`secp256k1-ledger`) wallet using the `lotus wallet` command: lotus wallet new secp256k1-ledger ❗ Calling `lotus wallet new secp256k1-ledger` will provide a new Ledger-backed key whenever called. When called on a different Lotus node or in one that has been reset, the same keys will be generated as they are based on the Ledger device master key. 6. On your Ledger device, confirm the creation of the wallet. **From this point, any [FIL send operation](https://lotus.filecoin.io/lotus/manage/ledger/#sending-fil) from a Ledger wallet must be approved on the Ledger device.** Ensure that the Ledger device is connected, unlocked, and running the Filecoin app when performing any FIL send operation. ❗ The `lotus-shed` application provides additional Ledger functionality, like listing the keys in the device and providing information about them. ### Using Glif Wallet [#](https://lotus.filecoin.io/lotus/manage/ledger/#using-glif-wallet) Previously, Ledger Live users were required to install Glif Wallet to store FIL. The Ledger Live integration launched by Zondax is a convenient alternative where holders can enjoy the same benefits within the Ledger Live app without the need for a browser-based solution. The Glif wallet integration is still available at [glif.io](https://www.glif.io/en) . Glif is an open-source, browser-based Filecoin wallet. It uses the [Filecoin Ledger integration library](https://github.com/Zondax/ledger-filecoin/) , which has been security audited by a third-party. [Edit this page on GitHub](https://github.com/filecoin-project/lotus-docs/blob/main/content/en/lotus/manage/ledger/index.md) [← Manage FIL](https://lotus.filecoin.io/lotus/manage/manage-fil/) [Multisig →](https://lotus.filecoin.io/lotus/manage/multisig/) --- # This Week in Lotus - Week 45 - 2023 - Lotus Docs This Week in Lotus - Week 45 - 2023 =================================== Posted November 13, 2023 by  ‐ **2 min read** 📢 **Network Version 21 - Watermelon - Update: FIP0070** 📢 The Lotus team continued to put the Calibration Network through its paces last week and unfortunately we have uncovered an additional bug in the FIP0070 implementation which aims to bring movable partition functionality to the Filecoin network. The bug is related to sector expiration tracking 📅. When a sector is moved between deadlines, its expiration date isn’t updating correctly in all cases. This could potentially cause expiration tracking issues, especially if there’s a fault and subsequent recovery of a sector/partition. **Considering the 🍉 Watermelon Mainnet upgrade is just around the corner**, the governance team has initiated a decision matrix for FIP0070. This will allow our teams to thoroughly investigate and resolve the issue in addition to providing a clear path forward. The team is now laser-focused on resolving the issue and gearing up for NV21. **Over the next few days, we might need to fine-tune the upgrade timeline, so please ensure you’re subscribed to `#fil-network-announcements` and `#fil-lotus-announcements` to stay in the loop!** 📢👀 Head to this [discussion](https://filecoinproject.slack.com/archives/C015KQQLQQ1/p1699496711571029) in the `#fil-actors` channel if you have any questions or would like to dig into the technical details of the issue. **High Availability of Window and Winning PoSTs is Getting Closer!** ⏱️ The team has made great progress over the last week with High Availability (HA) for Window (and now Winning) PoSTs - Codename: **SturdyPost!** 🛠️ Testing is now well underway and we are already seeing successfully submitted PoSTs using the new HA architecture! Check out the images below which show WindowPoST entries successfully recorded in Yugabyte! **LabWeek23 - A Decentralized Conference by Protocol Labs Network** Many members of the real-lotus team are now in either Istanbul 🇹🇷 or Barcelona 🇪🇸 for LabWeek23! You can check out the [schedule here](https://23.labweek.io/schedule/calendar) and if you can’t make it in person, look out for new videos landing on the Protocol Labs channel during the course of the week. You can [also follow along on Twitter!](https://twitter.com/protocollabs) The team will still be online to answers any questions that you might have but please bear with us if it takes a little bit longer than usual to reply over the next few days. 🙏 💙 That’s it for the week! **Have a great weekend!** ☀️ --- # Using Ledger on a remote machine - Lotus Docs Using Ledger on a remote machine ================================ This is a step-by-step guide on how to use Ledger on a remote machine Lotus users might want to use a Ledger device for the owner-address of an SPs for higher security. Often This tutorial is based on a setup with two different servers, one to run the `lotus daemon` while the other runs the `lotus-wallet` application. Prerequisites [#](https://lotus.filecoin.io/tutorials/lotus/remote-ledger/#prerequisites) ------------------------------------------------------------------------------------------ * A lotus daemon running and being in-sync on a separate server, hereafter called `lotus-node operator`. * A machine where you plan to plug in and use the Ledger device, hereafter called `ledger-provider`. As the “Ledger-provider” (Linux specific) [#](https://lotus.filecoin.io/tutorials/lotus/remote-ledger/#as-the-ledger-provider-linux-specific) ---------------------------------------------------------------------------------------------------------------------------------------------- 1. Install `lotus-shed` and `lotus-wallet` (Linux specific): sudo apt install As the “Ledger-provider” (Mac specific) [#](https://lotus.filecoin.io/tutorials/lotus/remote-ledger/#as-the-ledger-provider-mac-specific) ------------------------------------------------------------------------------------------------------------------------------------------ 1. Install `lotus-shed` and `lotus-wallet` (Mac specific): Install the required depencies with: brew install go jq pkg-config hwloc Clone the Lotus-repo with: git clone https://github.com/filecoin-project/lotus Change directory to Lotus with: cd lotus Install `lotus-shed` and `lotus-wallet` make lotus-shed lotus-wallet As the “lotus-node operator” [#](https://lotus.filecoin.io/tutorials/lotus/remote-ledger/#as-the-lotus-node-operator) ---------------------------------------------------------------------------------------------------------------------- 1. On your node that is in sync with the chain, setup a remote wallet backend: In your `.lotus/config.toml` file: [Wallet] RemoteBackend = "http://127.0.0.1:1777" 2. Import the wallet: lotus wallet import --format json-lotus And paste the JSON-line that was given to you in the third step in the `As the "Ledger-provider"` section. 3. That is it! 🚀 As long as the ssh reverse-tunnel is alive, you will be required to confirm transactions on the Ledger whenever the Lotus node makes them. [Edit this page on GitHub](https://github.com/filecoin-project/lotus-docs/blob/main/content/en/tutorials/lotus/remote-ledger.md) [← Multisignature address as owner address](https://lotus.filecoin.io/tutorials/lotus-miner/msig-as-owner/) --- # This Week in Lotus - Week 44 - 2023 - Lotus Docs This Week in Lotus - Week 44 - 2023 =================================== Posted November 3, 2023 by  ‐ **2 min read** **Network Version 21 - Watermelon - Timeline Update** **Mainnet upgrade:** `Epoch 3431940` on Wednesday the 29th of November at 13:30 UTC. **Calibrationeers, Operation rotten watermelon:** The implementer teams (Venus, Lotus, Forest) has decided to patch the Calibration network, fixing the issue where partitions with expired sectors needed to be compacted before they can be moved ([more details here](https://github.com/filecoin-project/builtin-actors/pull/1455) ). Fortunately, we caught it on the Testnet before it’s launched on Mainnet! And unfortunately, to fix this bug on calibration needs an upgrade as it is a consensus breaking change. **Calibration upgrade:** `Epoch 1070494` on Thursday the 19th of October at approximately 13:00 UTC. We ask all the calibration network operators and storage providers to update to the new release candidates as soon as possible and continue testing! * [v1.24.0-rc4](https://github.com/filecoin-project/lotus/releases/tag/v1.24.0-rc4) * [v1.25.0-rc3](https://github.com/filecoin-project/lotus/releases/tag/v1.25.0-rc3) _Feel free to reach out in `#fil-net-calibration-discuss` if you have any question!_ **Last Call for FIP0074 & FIP0079 🔔** After several months of deliberation, feedback, and design changes, the following FIPs are in Last Call: * **FIP0074 - Remove cron-based automatic deal settlement:** This FIP proposes to add a method to the built-in market actor to allow storage providers to settle deal payments manually. * Authored by Authored by anorth & Alex Su \[Helix\] * [Link to FIP draft](https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0074.md) * [Link to discussion post](https://github.com/filecoin-project/FIPs/discussions/800) * **FIP0079 - Add BLS Aggregate Signatures to FVM:** This FIP proposes the addition of a syscall for BLS aggregate signature verification and the removal of the syscall currently used for generic signature (i.e. Secp256k1 and non-aggregate BLS) validation, and refactoring of its associated SDK function in terms of existing Secp256k1 signature syscalls and the added aggregate BLS syscall. * Authored by Jake * [Link to FIP draft](https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0079.md) * [Link to discussion post](https://github.com/filecoin-project/FIPs/discussions/840) **Boost Upgrade Reminder 📣** A friendly reminder that Boost has a mandatory update from **v1 -> v2**, action is required before the nv21 upgrade to continue serving and onboarding deals seamlessly! If your having problems or issues setting up YugaBytesDB, [these examples](https://github.com/filecoin-project/boost/discussions/1797) from the community might help. Checkout their [latest announcement](https://filecoinproject.slack.com/archives/C0328PT17JR/p1698930345859939) , and channels #boost-announcements #boost-help ❗ **LabWeek23** The team will be traveling to Istanbul and Spain to take part in LabWeek23, Nov 13-17. For further information and to check out the upcoming tracks head over to https://23.labweek.io/ where you will find all the details. That’s it for the week! **Have a great weekend!** ☀️ --- # Hardware requirements - Lotus Docs Hardware requirements ===================== The hardware requirements for storage providers are tied to the computational resources needed to seal a sector and generate regular Proof of Spacetime for every sealed sector. The Filecoin network requires storage providers to run computationally expensive operations to generate sealed sectors. The cost of these operations depends on which network the storage provider is running; some testnets use a smaller sector size to increase the speed of sealing artificially. For reference, the requirements listed below correspond to **32GiB sectors**, as used by mainnet and the calibration network (testnetwork). General hardware requirements [#](https://lotus.filecoin.io/storage-providers/get-started/hardware-requirements/#general-hardware-requirements) ------------------------------------------------------------------------------------------------------------------------------------------------ The Filecoin consensus relies on multiple stages, which are very difficult to execute on a single type of hardware. Therefore, it is strongly not recommended to try to run all parts of an SP from a single machine, as supporting such a setup economically is impossible. To complement the hardware recommendations for each task type or process, it is advisable to configure and delegate sealing phases to [`lotus-worker`](https://lotus.filecoin.io/storage-providers/seal-workers/seal-workers/) , particularly in setups where multiple sectors need to be sealed in parallel. This will help ensure that each [specific operation requirement](https://lotus.filecoin.io/storage-providers/get-started/hardware-requirements/#specific-operation-requirements) is met and that the `lotus-miner` process runs smoothly. | Hardware | Specification | | --- | --- | | CPU | 8-core processor | | CPU Support | Models with support for _Intel SHA Extensions_ (AMD since Zen microarchitecture or Intel since Ice Lake) will significantly speed up the processes. | | RAM | 256 GiB RAM + Swap | | GPU | Nvidia GPU with at least 11GB VRAM | | Disk | 2 TB NVMe disk | CPU [#](https://lotus.filecoin.io/storage-providers/get-started/hardware-requirements/#cpu) -------------------------------------------------------------------------------------------- To run just the `lotus-miner` process without any sealing tasks, it is recommended to have at least a **CPU with 8 cores**. ### PC1 [#](https://lotus.filecoin.io/storage-providers/get-started/hardware-requirements/#pc1) For the [PreCommit1 task](https://lotus.filecoin.io/storage-providers/get-started/tasks/#precommit-1) , a CPU model with support for _Intel SHA Extensions_: AMD since Zen microarchitecture, or Intel since Ice Lake, is a must. Lack of SHA Extensions results in a very significant slowdown. ### PC2 [#](https://lotus.filecoin.io/storage-providers/get-started/hardware-requirements/#pc2) For the [PreCommit2 task](https://lotus.filecoin.io/storage-providers/get-started/tasks/#precommit-2) a CPU with a lot of cores will speed up the process, unless the task is offloaded to a GPU, **which is highly recommended to speed up the task.** ### C2 [#](https://lotus.filecoin.io/storage-providers/get-started/hardware-requirements/#c2) For the [Commit2 task](https://lotus.filecoin.io/storage-providers/get-started/tasks/#commit-2) a CPU with a lot of cores will speed up the process, unless the task is offloaded to a GPU, **which is highly recommended to speed up the task.** RAM [#](https://lotus.filecoin.io/storage-providers/get-started/hardware-requirements/#ram) -------------------------------------------------------------------------------------------- **128 GiB of RAM** are recommended at the very least if the `lotus-miner` when the windowPoSt task is not outsourced to a windowPoSt worker. This **should** be complemented with **128 GiB of swap on a fast NVMe SSD**. If the windowPoSt task is outsourced to a separate windowPoSt worker, one can expect that both the RAM and swap requirements to just run the `lotus-miner` process to be lower. See the specific operation requirements for more information about the [windowPoSt hardware requirements](https://lotus.filecoin.io/storage-providers/get-started/hardware-requirements/#specific-operation-requirements) ### Sealing tasks [#](https://lotus.filecoin.io/storage-providers/get-started/hardware-requirements/#sealing-tasks) Check the [specific task hardware requirements table](https://lotus.filecoin.io/storage-providers/get-started/hardware-requirements/#specific-operation-requirements) for RAM usage per task. GPU [#](https://lotus.filecoin.io/storage-providers/get-started/hardware-requirements/#gpu) -------------------------------------------------------------------------------------------- If windowPoSt tasks are not outsourced to a separate windowPoSt worker, a **powerful GPU is highly recommended** to have on the server that runs the `lotus-miner` process, as it speeds up the proving tasks significantly. ### PC2 [#](https://lotus.filecoin.io/storage-providers/get-started/hardware-requirements/#pc2-1) The PreCommit 2 tasks are significantly faster when running on a GPU compared to when running on the CPU. The minimum VRAM requirement to run the PC2 process on a GPU is 5GiB VRAM. ### C2 [#](https://lotus.filecoin.io/storage-providers/get-started/hardware-requirements/#c2-1) The Commit 2 tasks is significantly faster when running on a GPU compared to when running on the CPU. The minimum VRAM requirement to run the C2 process on a GPU is 11GiB VRAM. ❗ Mixing AMD and Nvidia GPUs in the same machine is known to cause issues with OpenCL and should be avoided. In general, Nvidia GPUs have better support than AMD cards. Disk [#](https://lotus.filecoin.io/storage-providers/get-started/hardware-requirements/#disk) ---------------------------------------------------------------------------------------------- The `lotus-miner` process in itself does not require a very large disk space. But it is recommended to have the process running on a fast storage medium like an NVMe disk, especially if the windowPoSt process is not outsourced to a separate worker. ### PC1 [#](https://lotus.filecoin.io/storage-providers/get-started/hardware-requirements/#pc1-1) Each PreCommit 1 sector will generate data to the amount of 384GiB. Since this sealing task can be write heavy if many sectors are sealing in parallel, it is recommended to use SSDs or NVMe drives. ### PC2 [#](https://lotus.filecoin.io/storage-providers/get-started/hardware-requirements/#pc2-2) Each PreCommit 2 task will read all the previously generated data by the PreCommit 1 sealing task, which means that this process is very read heavy. Running this task on NVMe drives with great read speeds are recommended. ### C2 [#](https://lotus.filecoin.io/storage-providers/get-started/hardware-requirements/#c2-2) Each Commit 2 task uses the 16MiB file generated in the [Commit1 phase](https://lotus.filecoin.io/storage-providers/get-started/tasks/#commit-1) . This process can comfortably be run on SSDs. Specific operation requirements [#](https://lotus.filecoin.io/storage-providers/get-started/hardware-requirements/#specific-operation-requirements) ---------------------------------------------------------------------------------------------------------------------------------------------------- The following table shows what hardware resources are needed to run a single task of the given sealing phase or proof calculation: | Operation | CPU used | GPU used | VRAM | Memory (32Gib sectors) | Notes | | --- | --- | --- | --- | --- | --- | | Sealing: AddPiece | Yes (all cores) | No | \- | 0.2GiB | Write heavy | | Sealing: preCommit phase 1 | Yes (1 core or 1 core-complex) | No | \- | 64GiB | PoRep SDR encoding. Not amenable to parallelization. Core usage depends on the value of [`FIL_PROOFS_USE_MULTICORE_SDR`](https://github.com/filecoin-project/rust-fil-proofs/)
. | | Sealing: preCommit phase 2 | Yes (when no GPU, all cores) | Yes | 5 GiB | 30GiB | Read-heavy operation, fast NVMe disks recommended. **Highly recommended to run on a GPU** | | Sealing: commit phase 1 | Yes | No | \- | \- | Extremely light computation, usually faster then 1 second | | Sealing: commit phase 2 | Yes (when no GPU, all cores) | Yes | 11 GiB | ~ 192GiB | **Highly recommended to run on a GPU**. Using 128GiB RAM and 64GiB SWAP is possible, but comes at a performance hit. | | Unsealing | Yes (1 core or 1 core-complex) | No | \- | 64GiB | Same process as preCommit phase 1. Not amenable to parallelization. Core usage depends on the value of [`FIL_PROOFS_USE_MULTICORE_SDR`](https://github.com/filecoin-project/rust-fil-proofs/)
. | | SnapDeals: Update Replica (RU) | Yes (when no GPU, all cores) | Yes | 5 GiB | 64GiB | **Highly recommended to run on a GPU**. | | SnapDeals: PRU2 | Yes (when no GPU, all cores) | Yes | 11 GiB | ~ 192GiB | **Highly recommended to run on a GPU**. Using 128GiB RAM and 64GiB SWAP is possible, but comes at a performance hit. | | Proving _WindowPoSt_ | Yes (all cores, when no GPU) | Yes | 11 GiB | 96GiB | _WindowPoSts_ must be submitted in 30 minute windows. When no GPU is available, the more CPU cores, the faster. **Highly recommended to run on a GPU**. | | Proving _WinningPoSt_ | Yes | No | 6 GiB | 16GiB | _WinningPoSt_ is a less intensive computation and must be completed in a 25-second window. **It is highly recommended to run on a GPU.** | Future proofing [#](https://lotus.filecoin.io/storage-providers/get-started/hardware-requirements/#future-proofing) -------------------------------------------------------------------------------------------------------------------- The above requirements will not increase in the foreseeable future, and money spent on hardware should provide users with many years of reliable service. [Edit this page on GitHub](https://github.com/filecoin-project/lotus-docs/blob/main/content/en/storage-providers/get-started/hardware-requirements.md) [← Economics](https://lotus.filecoin.io/storage-providers/get-started/economics/) [Architectures →](https://lotus.filecoin.io/storage-providers/get-started/architectures/) --- # Multisig - Lotus Docs Multisig ======== A multi-signature (multisig) wallet refers to a wallet that requires multiple keys to authorize a \`FIL\` transactions. Create a multisig wallet [#](https://lotus.filecoin.io/lotus/manage/multisig/#create-a-multisig-wallet) -------------------------------------------------------------------------------------------------------- You can use the `lotus msig create` command to create a multisig wallet: lotus msig create signerAddress1 signerAddress2 signerAddress3... Created new multisig: f01002 f24mscgjtgymb3dqtm4ycwydh4nhygktgxm3nbgva In the above example, the `f01002` output is the id address and `f24mscgjtgymb3dqtm4ycwydh4nhygktgxm3nbgva` is the actor address. Both addresses represent the newly created multisig wallet. By default, signatures from all signers are required for approving a transaction. However, you can change the number of required approvals by using the `--required` option: lotus msig create --required=2 signerAddress1 signerAddress2 signerAddress3 The above example creates a multisig wallet with three signers but only requires two approvals for a transaction to be executed. Propose and approve a transaction [#](https://lotus.filecoin.io/lotus/manage/multisig/#propose-and-approve-a-transaction) -------------------------------------------------------------------------------------------------------------------------- Any signer of a multisig wallet can _propose_ a transaction. The _proposer_ automatically approves a transaction upon the proposal. A transaction will only be executed when the number of approvals received equals the number of required approvals. A [multisig wallet can be inspected](https://lotus.filecoin.io/lotus/manage/multisig/#inspect-a-multisig-wallet) to get the number of required approvals. If a multisig wallet only requires one signer, then a transaction will be executed immediately upon its proposal. Use `lotus msig propose` to propose a transaction: lotus msig propose --from=proposerAddress walletAddress destinationAddress value send proposal in message: bafy2bzaceajm2mghc5rludlbcr3bnpqgcz5m6gmldq6ycrc4trkejz36tnrqe Transaction ID: 0 In the above example `bafy2bzaceajm2mghc5rludlbcr3bnpqgcz5m6gmldq6ycrc4trkejz36tnrqe` is the `messageID`, and `0` is the `transactionID`. Other signers can then use `lotus msig approve` to approve this messages: lotus msig approve walletAddress transactionID proposerAddress destinationAddress value The value of `transactionID`, `proposerAddress`, `destinationAddress` and `value` must match the values used in the proposal. Cancel a pending multisig proposal [#](https://lotus.filecoin.io/lotus/manage/multisig/#cancel-a-pending-multisig-proposal) ---------------------------------------------------------------------------------------------------------------------------- Use `lotus msig cancel` to cancel a pending multisig transaction. lotus msig cancel walletAddress transactionID destinationAddress value The value of `walletAddress`, `transactionID`, `destinationAddress` and `value` must match the values used in the proposal. Output of a successful cancel process. sent cancel in message: bafy2bzacebjy2limeu6mw4b6x5yqgdupxaqabprojwu72xlfhwkhgb5jcyr7c Inspect a multisig wallet [#](https://lotus.filecoin.io/lotus/manage/multisig/#inspect-a-multisig-wallet) ---------------------------------------------------------------------------------------------------------- Use `lotus msig inspect` to get information about the multisig wallet: lotus msig inspect walletaddress Balance: 0 FIL Spendable: 0 FIL Threshold: 2 / 3 # number of signature required / number of signers the wallet has Signers: ID Address t01001 t1ai2gcr2xlpyxcbjlegojbpr3ovdyfdyzigjoyza t0100 t3r4d3avth4agwxy6ko35reeuydcqaa6cq4mt6owg3zjq23pxqc6xvn7scb43dyhaf2cjnjhtioek6innbpgda t01003 t3rpukrggza4jjt6vpihiqoekth6tiopzhvxbp36qhrzfu4xpk6n3mxo5geh6bdavkkkhqk7owt2an2wrundtq Transactions: 1 ID State Approvals To Value Method Params 0 pending 1 t1fjswymsauvfh5zxw34t2pgz7iev2fn56unyw6ci 20 FIL Send(0) Changing the approval threshold [#](https://lotus.filecoin.io/lotus/manage/multisig/#changing-the-approval-threshold) ---------------------------------------------------------------------------------------------------------------------- You can propose setting a different signing threshold on a multisignature wallet with the `lotus msig propose-threshold` command. lotus msig propose-threshold --from signerAddress multisigAddress newThreshold This will send a propose message that the other signers will need to approve. The new threshold will be approved when the old `propose-threshold` has been met. Inspect a multisig proposal [#](https://lotus.filecoin.io/lotus/manage/multisig/#inspect-a-multisig-proposal) -------------------------------------------------------------------------------------------------------------- Use `lotus-shed msg` to inspect the params of a message. The `lotus-shed` tool can be installed [following the steps here](https://lotus.filecoin.io/kb/lotus-shed-not-installed/) lotus-shed msg messageID Output of a successful inspection on a multisig message. --- Message Details: Value: 0 FIL Max Fees: 0.00000031548776754 FIL Max Total Cost: 0.00000031548776754 FIL Method: Propose Params: { "To": "t1m2oqtdwx2kporl3dgq4schl46jnu63fqwchf4wq", "Value": "5000000000000000000", "Method": 0, "Params": null } --- Params message: Msig Propose: HEX: 845501669d098ed7d29ee8af633439211d7cf25b4f6cb049004563918244f400000040 B64: hFUBZp0JjtfSnuivYzQ5IR188ltPbLBJAEVjkYJE9AAAAEA= JSON: { "To": "t1m2oqtdwx2kporl3dgq4schl46jnu63fqwchf4wq", "Value": "5000000000000000000", "Method": 0, "Params": null } --- [Edit this page on GitHub](https://github.com/filecoin-project/lotus-docs/blob/main/content/en/lotus/manage/multisig.md) [← Using Ledger](https://lotus.filecoin.io/lotus/manage/ledger/) [Chain management →](https://lotus.filecoin.io/lotus/manage/chain-management/) --- # Chain management - Lotus Docs Chain management ================ The Lotus chain carries the information necessary to compute the current state of the Filecoin network. This guide explains how to manage several aspects of the chain, including how to decrease your node's sync time by loading the chain from a snapshot. Syncing [#](https://lotus.filecoin.io/lotus/manage/chain-management/#syncing) ------------------------------------------------------------------------------ Lotus will automatically sync to the latest _chain head_ by fetching the block headers from the current _head_ down to the last synced epoch. The node then retrieves and verifies all the blocks from the last synced epoch to the current head. Once Lotus is synced, it will learn about new blocks as they are mined for every epoch and verify them accordingly. Every epoch might see a variable number of mined blocks. Filecoin’s blockchain is complex and grows relatively fast. It takes about 4 seconds to verify a tipset, which in turn means it takes about 1 month to validate 700,000 tipsets. As syncing the chain from genesis is no longer practical, an alternative is to obtain a collection of all IPLD blocks one needs to continue validating the chain state going forward. Such a collection is called a snapshot. Currently one such snapshot is available | Name | End height | Message start height | State start height | | --- | --- | --- | --- | | [Lightweight](https://lotus.filecoin.io/lotus/manage/chain-management/#lightweight-snapshot) | Recent block | Recent block - 2000 blocks | Current block - 2000 blocks | ### Lightweight snapshot [#](https://lotus.filecoin.io/lotus/manage/chain-management/#lightweight-snapshot) We recommend most users perform the initial node sync from a lightweight snapshot. These snapshots do not contain the full states of the chain and are not suitable for nodes that need to perform queries against historical state information, such as block explorers. However, they are significantly smaller than full chain snapshots and should be sufficient for most use-cases. ❗ These lightweight state snapshots **do not contain any message receipts**. To get message receipts, you need to sync your Lotus node from the genesis block without using any of these snapshots. 1. Download the most recent lightweight snapshot: a. For **mainnet**, command always contains the latest snapshot available for mainnet: aria2c -x5 https://forest-archive.chainsafe.dev/latest/mainnet/ a. For **calibnet**, command always contains the latest snapshot available for the calibration testnet: aria2c -x5 https://forest-archive.chainsafe.dev/latest/calibnet/ 💡 We strongly recommend that you use `aria2c` for faster a download. However, you can replace `aria2c` with `wget` before snapshot URL if you prefer. 1. Start the Lotus daemon using `--import-snapshot`: # Replace the filename for the `.car` file based on the snapshot you downloaded. lotus daemon --import-snapshot forest_snapshot_mainnet_2024-01-11_height_3555440.forest.car.zst #### Sync wait [#](https://lotus.filecoin.io/lotus/manage/chain-management/#sync-wait) Use `sync wait` to output the state of your current chain as an ongoing process: lotus sync wait This will output something like: Worker: 0; Base: 0; Target: 414300 (diff: 414300) State: header sync; Current Epoch: 410769; Todo: 3531 Validated 0 messages (0 per second) ... Use `chain getblock` to check when the last synced block was mined: date -d @$(./lotus chain getblock $(./lotus chain head | sed 1q) | jq .Timestamp) This will output something like: Mon 24 Aug 2020 06:00:00 PM EDT Creating a snapshot [#](https://lotus.filecoin.io/lotus/manage/chain-management/#creating-a-snapshot) ------------------------------------------------------------------------------------------------------ A lightweight chain CAR-snapshot can be created with `chain export`: lotus chain export --recent-stateroots=2000 --skip-old-msgs ❗ This is a resource demanding task for the node. It will take over an hour to create the CAR-snapshot, and the process will use around 100GB of RAM. Restoring a custom snapshot [#](https://lotus.filecoin.io/lotus/manage/chain-management/#restoring-a-custom-snapshot) ---------------------------------------------------------------------------------------------------------------------- You can restore snapshots by starting the daemon with the `--import-snapshot` option: lotus daemon --import-snapshot If you do not want the daemon to start once the snapshot has finished, add the `--halt-after-import` flag: lotus daemon --halt-after-import --import-snapshot Compacting the chain data [#](https://lotus.filecoin.io/lotus/manage/chain-management/#compacting-the-chain-data) ------------------------------------------------------------------------------------------------------------------ It is possible to _prune_ the current chain data used by Lotus to reduce the node’s disk footprint by resyncing from a minimal snapshot. 1. Download a lightweight snapshot following the steps in [Lightweight Snapshots](https://lotus.filecoin.io/lotus/manage/chain-management/#lightweight-snapshot) 2. Stop the Lotus daemon: lotus daemon stop 3. Back up the chain data and create a directory for chain data: mv ~/.lotus/datastore/chain ~/.lotus/datastore/chain_backup mkdir ~/.lotus/datastore/chain 4. Import the chain data: lotus daemon --import-snapshot my-snapshot.car --halt-after-import 5. Start the daemon: lotus daemon 6. Open another ssh connection or terminal to check sync status : lotus sync status lotus sync wait 7. That’s it! [Edit this page on GitHub](https://github.com/filecoin-project/lotus-docs/blob/main/content/en/lotus/manage/chain-management.md) [← Multisig](https://lotus.filecoin.io/lotus/manage/multisig/) [Message pool →](https://lotus.filecoin.io/lotus/manage/message-pool/) --- # Lotus Miner Setup - Lotus Docs Lotus Miner Setup ================= This is a step by step guide on how to set up a lotus miner in calibnet. Some of the steps are specific to the hardware and configuration used in this setup and might not be applicable for everyone. Please follow the documentation to set up your miner and use this guide only as a reference point. Setup details [#](https://lotus.filecoin.io/tutorials/lotus-miner/run-a-miner/#setup-details) ---------------------------------------------------------------------------------------------- Below are the details of the physical servers used in this tutorial. One of these machines will run a lotus node and other will be used to run a lotus-miner node. ### Machine One [#](https://lotus.filecoin.io/tutorials/lotus-miner/run-a-miner/#machine-one) * CPU: 2 x Intel(R) Xeon(R) Gold 6242 CPU @ 2.80GHz * RAM: 502 GiB * GPU: 4 x Quadro RTX 6000 * Process: Lotus Node, Seal Worker * OS: Ubuntu * Private IP: x.x.x.x * Public IP: A.A.A.A ### Machine Two [#](https://lotus.filecoin.io/tutorials/lotus-miner/run-a-miner/#machine-two) * CPU: 2 x Intel(R) Xeon(R) Gold 6242 CPU @ 2.80GHz * RAM: 502 GiB * GPU: 4 x Quadro RTX 6000 * Process: Lotus Miner(Seal worker) * OS: Ubuntu * Private IP: y.y.y.y * Public IP: B.B.B.B All lotus processes will run as a non-root user. Please make sure to open relevant ports in your firewall to allow connections. Lotus node setup [#](https://lotus.filecoin.io/tutorials/lotus-miner/run-a-miner/#lotus-node-setup) ---------------------------------------------------------------------------------------------------- This section will cover the installation, configuration and starting a lotus node to be used in the tutorial. ### Installation [#](https://lotus.filecoin.io/tutorials/lotus-miner/run-a-miner/#installation) 1. We have bundled all the install steps into the below code snippets so you can just copy and paste them into your terminal. If you would prefer to run each command step by step, take a look at the [Installation guide](https://lotus.filecoin.io/lotus/install/linux/#building-from-source) . `FFI_USE_CUDA=1` variable forces the use of CUDA architecture instead of OpenCL for Nvidia cards. `RUST_GPU_TOOLS_CUSTOM_GPU` variable need to be set after driver 475+ due to a change in naming convention. sudo apt install mesa-opencl-icd ocl-icd-opencl-dev gcc git jq pkg-config curl clang build-essential hwloc libhwloc-dev wget -y && sudo apt upgrade -y curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh Follow the prompts to install Rust, and then run these commands: wget -c https://golang.org/dl/go1.19.12.linux-amd64.tar.gz -O - | sudo tar -xz -C /usr/local echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.bashrc && source ~/.bashrc git clone https://github.com/filecoin-project/lotus.git cd lotus/ LATEST_RELEASE=$(git tag -l 'v*' | grep -v "-" | sort -V -r | head -n 1) # Finds the latest Lotus Node release git checkout $LATEST_RELEASE export CGO_CFLAGS_ALLOW="-D__BLST_PORTABLE__" export CGO_CFLAGS="-D__BLST_PORTABLE__" export FFI_BUILD_FROM_SOURCE=1 export RUSTFLAGS="-C target-cpu=native -g" export FFI_USE_CUDA=1 export RUST_GPU_TOOLS_CUSTOM_GPU="Quadro RTX 6000:4608" make clean calibnet ./lotus --version 2. Add sufficient swap to the machines based on the [hardware requirements guide](https://lotus.filecoin.io/storage-providers/get-started/hardware-requirements/#specific-operation-requirements) . ### Configuration [#](https://lotus.filecoin.io/tutorials/lotus-miner/run-a-miner/#configuration) 1. Initialize the lotus node and wait for the sync to complete. If you are configuring the miner for mainnet then, please [import a snapshot](https://lotus.filecoin.io/lotus/manage/chain-management/#lightweight-snapshot) and wait for the lotus node to get synced: export GOLOG_OUTPUT=file >> ~/.bashrc export GOLOG_FILE="$HOME/miner.log" >> ~/.bashrc && source ~/.bashrc lotus daemon & 2. Configure lotus node to allow remote API access. Please do not listen on a public IP as it will allow anyone from the internet to be able to connect to this node. Ideally, use a private IP and in case there is no private IP available, please ensure that the firewall is configured to reject all packets except from miner/market APIs for security [API] # Binding address for the Lotus API # # type: string # env var: LOTUS_API_LISTENADDRESS ListenAddress = "/ip4/x.x.x.x/tcp/1234/http" # type: string # env var: LOTUS_API_REMOTELISTENADDRESS #RemoteListenAddress = "x.x.x.x:1234" # type: Duration # env var: LOTUS_API_TIMEOUT # Timeout = "30s" Restart the Lotus node for the changes to take effect. 3. Generate an API token for the miner: lotus auth create-token --perm admin 4. Verify that the lotus node is in sync and that lotus is listening on the specified port: telnet x.x.x.x 1234 ### Setup wallets for the miner [#](https://lotus.filecoin.io/tutorials/lotus-miner/run-a-miner/#setup-wallets-for-the-miner) 1. Create wallets for the lotus-miner on the Lotus node machine: lotus wallet new bls lotus wallet new bls 2. Send some FIL to the owner wallet from the [calibnet faucet](https://faucet.calibnet.chainsafe-fil.io/funds.html) . For the mainnet, the user can send fils from an exchange or other sources. 3. Send some fils from the owner wallet to the worker wallet: lotus send --from 10 4. Verify that fils are present in both wallets: lotus wallet list Lotus miner setup [#](https://lotus.filecoin.io/tutorials/lotus-miner/run-a-miner/#lotus-miner-setup) ------------------------------------------------------------------------------------------------------ This section will cover the installation, configuration, and how to start the lotus-miner node. ### Installation [#](https://lotus.filecoin.io/tutorials/lotus-miner/run-a-miner/#installation-1) 1. We have bundled all the install steps into the below code snippets so you can just copy and paste them into your terminal. If you would prefer to run each command step by step, take a look at the [Installation guide](https://lotus.filecoin.io/lotus/install/linux/#building-from-source) . `FFI_USE_CUDA=1` variable forces the use of CUDA architecture instead of OpenCL for Nvidia cards. `RUST_GPU_TOOLS_CUSTOM_GPU` variable need to be set after driver 475+ due to a change in naming convention: sudo apt install mesa-opencl-icd ocl-icd-opencl-dev gcc git jq pkg-config curl clang build-essential hwloc libhwloc-dev wget -y && sudo apt upgrade -y curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh Follow the prompts to install Rust, and then run these commands: wget -c https://golang.org/dl/go1.19.12.linux-amd64.tar.gz -O - | sudo tar -xz -C /usr/local echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.bashrc && source ~/.bashrc git clone https://github.com/filecoin-project/lotus.git cd lotus/ LATEST_RELEASE=$(git tag -l 'miner/v*' | grep -v "-" | sort -V -r | head -n 1) # Finds the latest Lotus Miner release git checkout $LATEST_RELEASE export CGO_CFLAGS_ALLOW="-D__BLST_PORTABLE__" export CGO_CFLAGS="-D__BLST_PORTABLE__" export FFI_BUILD_FROM_SOURCE=1 export RUSTFLAGS="-C target-cpu=native -g" export FFI_USE_CUDA=1 export RUST_GPU_TOOLS_CUSTOM_GPU="Quadro RTX 6000:4608" make clean calibnet ./lotus --version 2. Add sufficient swap to the machines based on the [hardware requirements guide](https://lotus.filecoin.io/storage-providers/get-started/hardware-requirements/#specific-operation-requirements) . 3. On the miner machines, create directories to store the cache. Make sure these directories are on a fast NVME disk. Otherwise, it will slow down your miner: mkdir ~/parent_cache mkdir ~/parameter_cache ### Setup [#](https://lotus.filecoin.io/tutorials/lotus-miner/run-a-miner/#setup) 1. Add the following variables to the `~/.bashrc` file: # See https://github.com/filecoin-project/rust-fil-proofs/ export FIL_PROOFS_USE_GPU_COLUMN_BUILDER=1 # precommit2 GPU acceleration export FIL_PROOFS_USE_GPU_TREE_BUILDER=1 # The following increases speed of PreCommit1 at the cost of using a full # CPU Core-Complex rather than a single core. Should be used with CPU affinities set! # See https://github.com/filecoin-project/rust-fil-proofs/ and the seal workers guide. export FIL_PROOFS_USE_MULTICORE_SDR=1 export FULLNODE_API_INFO=:/ip4/x.x.x.x/tcp/1234/http export FIL_PROOFS_PARAMETER_CACHE=/home/miner/param_cache # > 100GiB! export FIL_PROOFS_PARENT_CACHE=/home/miner/parent_cache # > 50GiB! export FFI_USE_CUDA=1 export RUST_GPU_TOOLS_CUSTOM_GPU="Quadro RTX 6000:4608" export LOTUS_MINER_PATH=~/.lotusminer export GOLOG_OUTPUT=file export GOLOG_FILE="$HOME/miner.log" Now `source` the file to load these variable to the current shell. source ~/.bashrc 2. Download parameters: lotus-miner fetch-params 32GiB lotus-miner fetch-params 64GiB 3. Initialize the miner: lotus-miner init --owner=
--worker=
--no-local-storage 4. Start the miner lotus-miner run ### Lotus miner configuration [#](https://lotus.filecoin.io/tutorials/lotus-miner/run-a-miner/#lotus-miner-configuration) 1. Add storage for sealing, as well as permanent storage for the sectors: mkdir ~/storage mkdir ~/tmp Please make sure that ~/tmp directory is backed by a fast disk like NVME. lotus-miner storage attach --init --seal ~/tmp lotus-miner storage attach --init --store ~/storage lotus-miner storage list 2. Enable remote API access on the lotus-miner to allow the remote seal-workers connection to the miner: [API] # Binding address for the miner API ListenAddress = "/ip4/y.y.y.y/tcp/2345/http" # This should be set to the miner API address as seen externally RemoteListenAddress = "y.y.y.y:2345" # General network timeout value Timeout = "30s" 3. Restart the `lotus-miner` process. 4. Verify that all the resources are visible on the miner and are ready to use: lotus-miner sealing workers > Worker xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, host miner-host > CPU: [ ] 0/64 core(s) in use > RAM: [|||||| ] 9% 46.38 GiB/502.6 GiB > VMEM: [|| ] 3% 46.38 GiB/1.4 TiB > GPU: [ ] 0% 0.00/4 gpu(s) in use > GPU: Quadro RTX 6000, not used > GPU: Quadro RTX 6000, not used > GPU: Quadro RTX 6000, not used > GPU: Quadro RTX 6000, not used Now the miner is ready to start sealing. ### Generate auth token for seal-worker [#](https://lotus.filecoin.io/tutorials/lotus-miner/run-a-miner/#generate-auth-token-for-seal-worker) Generate the JWT token for the seal workers. This token can be used to add additional seal-workers to speed up the sealing process. lotus-miner auth api-info --perm admin [Edit this page on GitHub](https://github.com/filecoin-project/lotus-docs/blob/main/content/en/tutorials/lotus-miner/run-a-miner.md) [← Grafana dashboard for Lotus](https://lotus.filecoin.io/tutorials/lotus/grafana-dashboard/) [Add Seal Worker →](https://lotus.filecoin.io/tutorials/lotus-miner/add-seal-worker/) --- # bidbot - Lotus Docs Bidbot ====== ##### [Where Does the ImportData Function Get Executed](https://lotus.filecoin.io/kb/importdata/) --- # Architectures - Lotus Docs Architectures ============= This section provides examples for Filecoin Storage mining setups to guide miners to plan and make the right choices when acquiring and setting up their mining infrastructure. Any storage mining setup must meet the minimal hardware requirements. 💬 We are working to improve this section. If you would like to share your mining setup, please create an issue in the [Lotus-docs Github](https://github.com/filecoin-project/lotus-docs/issues) ! Community suggestions [#](https://lotus.filecoin.io/storage-providers/get-started/architectures/#community-suggestions) ------------------------------------------------------------------------------------------------------------------------ Hardware requirements and architecture suggestions constantly evolve based on market demands and available hardware. Because of this, we aren’t listing any recommendations or examples on this page. Instead, look at the [Example Miner Hardware Profiles](https://github.com/filecoin-project/lotus/discussions/6071) in the Lotus project GitHub discussions. [](https://github.com/filecoin-project/lotus/discussions/6071) [![Screenshot of a community discussion on GitHub.](https://lotus.filecoin.io/storage-providers/get-started/architectures/github-arch-discussion_hu7bc900a231a389b789a09a4dd00e70cb_205393_20x0_resize_box_3.png)](https://github.com/filecoin-project/lotus/discussions/6071) This discussion is ongoing and frequently updated with the new recommendation from community storage providers. Solo storage providing [#](https://lotus.filecoin.io/storage-providers/get-started/architectures/#solo-storage-providing) -------------------------------------------------------------------------------------------------------------------------- Benjamin Hoejsbo recently gave a presentation on how to create a solo storage provider setup. [Check out the video on YouTube](https://www.youtube.com/watch?v=LKMjCgo-fkA) . [Edit this page on GitHub](https://github.com/filecoin-project/lotus-docs/blob/main/content/en/storage-providers/get-started/architectures/index.md) [← Hardware requirements](https://lotus.filecoin.io/storage-providers/get-started/hardware-requirements/) [Prerequisites →](https://lotus.filecoin.io/storage-providers/setup/prerequisites/) --- # Switch networks - Lotus Docs Switch networks =============== This guide will show you how to switch between various Filecoin networks with Lotus, depending on your testing or development needs. Lotus is compiled to operate on a single network, and the information in the configuration folder corresponds to that network. * Local devnet - [You can run a local devnet](https://lotus.filecoin.io/lotus/developers/local-network/) * Testnets * [Calibnet](https://network.filecoin.io/#calibration) - The calibration network is a testnetwork that mimics the properties of the mainnet. It is planned to be long-running, and will only be reset in case of critical bugs that are uncovered during network upgrade testing. * [Mainnet](https://network.filecoin.io/#mainnet) You can choose one of the following methods to switch to a different network on your setup: Clean, rebuild, reinstall [#](https://lotus.filecoin.io/lotus/manage/switch-networks/#clean-rebuild-reinstall) --------------------------------------------------------------------------------------------------------------- The first method is the simplest. In this approach, you remove or change the path for the data related to the network you were running on before and launch a Lotus binary built to run on the new one: ❗ **Switching from Mainnet to Calibnet?** This process deletes everything from the old network, including wallets. If you are on `mainnet` and are switching to `calibnet` but you want to keep all your `mainnet` data intact for when you switch back, make sure to change your `$LOTUS_PATH` before running `lotus daemon`: To change your `$LOTUS_PATH` run: `export LOTUS_PATH=~/.new-lotus-path`. 1. Shut down the Lotus daemon if it is currently running. 2. Remove the `~/.lotus` folder, or whatever you set `$LOTUS_PATH` to. The default is `~/.lotus`. 3. Clone the Lotus repository and move into the `lotus` folder: git clone https://github.com/filecoin-project/lotus cd lotus 4. Build the `lotus` executable using `make clean ...` to specify which network you want to join: | Network | Build command | Description | | --- | --- | --- | | Mainnet | `make clean all` | The production Filecoin network. FIL has real-world value on this network. | | Calibnet | `make clean calibnet` | A test network with a minimum sector size of 32 GiB. FIL has no real-world value on this network. | 5. Start the Lotus daemon again and let it sync to the new network: lotus daemon Backing up Lotus data [#](https://lotus.filecoin.io/lotus/manage/switch-networks/#backing-up-lotus-data) --------------------------------------------------------------------------------------------------------- If you wish to backup Lotus data, copy the `~/.lotus` (or `$LOTUS_PATH`) folder somewhere. This will take quite a while if the Lotus node has synced the whole network. Another alternative is to [export your wallets](https://lotus.filecoin.io/lotus/manage/manage-fil/#exporting-and-importing-addresses) and also [export the chain](https://lotus.filecoin.io/lotus/manage/chain-management/#creating-a-snapshot) for later re-import on a newly installed Lotus Node. [Edit this page on GitHub](https://github.com/filecoin-project/lotus-docs/blob/main/content/en/lotus/manage/switch-networks.md) [← Message pool](https://lotus.filecoin.io/lotus/manage/message-pool/) [Backup and restore →](https://lotus.filecoin.io/lotus/manage/backup-and-restore/) --- # Add Seal Worker - Lotus Docs Add Seal Worker =============== This is a step by step guide on how to set up a Lotus seal-worker and connect it to the miner in calibnet. Some of the steps are specific to the hardware and configuration used in this setup and might not be applicable for everyone. Please follow the documentation to set up your miner and use this guide only as a reference point. Setup Details [#](https://lotus.filecoin.io/tutorials/lotus-miner/add-seal-worker/#setup-details) -------------------------------------------------------------------------------------------------- Below are the details of the physical server used in this tutorial. ### PC1 Worker [#](https://lotus.filecoin.io/tutorials/lotus-miner/add-seal-worker/#pc1-worker) * CPU: 2 x AMD EPYC 7F32 8-Core Processor * RAM: 1007 GiB * GPU: None * Process: PC1 Seal Worker * OS: Ubuntu * Private IP: z.z.z.z * Public IP: C.C.C.C All Lotus processes will run as a non-root user. Please make sure to open relevant ports in your firewall to allow connections. This tutorial will use the same miner created under the [How To Run A Miner tutorial](https://lotus.filecoin.io/tutorials/lotus-miner/run-a-miner/) . Lotus Worker Setup [#](https://lotus.filecoin.io/tutorials/lotus-miner/add-seal-worker/#lotus-worker-setup) ------------------------------------------------------------------------------------------------------------ This section will cover the installation, configuration and running a Lotus seal-worker. ### Installation [#](https://lotus.filecoin.io/tutorials/lotus-miner/add-seal-worker/#installation) 1. We have bundled all the install steps into the below code snippets so you can just copy and paste them into your terminal. If you would prefer to run each command step by step, take a look at the [Installation guide](https://lotus.filecoin.io/lotus/install/linux/#building-from-source) . As this is a PC1-only worker, we have not used any `CUDA` variables, but you can use them if you are building a worker that requires GPU usage. sudo apt install mesa-opencl-icd ocl-icd-opencl-dev gcc git jq pkg-config curl clang build-essential hwloc libhwloc-dev wget -y && sudo apt upgrade -y curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh Follow the prompts to install Rust, and then run these commands: wget -c https://golang.org/dl/go1.19.12.linux-amd64.tar.gz -O - | sudo tar -xz -C /usr/local echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.bashrc && source ~/.bashrc git clone https://github.com/filecoin-project/lotus.git cd lotus/ LATEST_RELEASE=$(git tag -l 'miner/v*' | grep -v "-" | sort -V -r | head -n 1) # Finds the latest Lotus Miner release git checkout $LATEST_RELEASE export CGO_CFLAGS_ALLOW="-D__BLST_PORTABLE__" export CGO_CFLAGS="-D__BLST_PORTABLE__" export FFI_BUILD_FROM_SOURCE=1 export RUSTFLAGS="-C target-cpu=native -g" make clean calibnet ./lotus --version 2. Add sufficient swap to the machines based on the [hardware requirements guide](https://lotus.filecoin.io/storage-providers/get-started/hardware-requirements/#specific-operation-requirements) . ### Configuration [#](https://lotus.filecoin.io/tutorials/lotus-miner/add-seal-worker/#configuration) 1. Add the below variables to enable logging to a file. export GOLOG_OUTPUT=file >> ~/.bashrc export GOLOG_FILE="$HOME/worker.log" >> ~/.bashrc && source ~/.bashrc 2. On the seal-worker machines, create directories to store the cache. Make sure these directories are on a fast NVME disk. Otherwise, it will slow down your seal-worker. mkdir ~/parent_cache mkdir ~/parameter_cache ### Setup [#](https://lotus.filecoin.io/tutorials/lotus-miner/add-seal-worker/#setup) 1. Add the following variables to the `~/.bashrc` file and then source the file. The token used for API authentication is the same as generated in the [previous tutorial](https://lotus.filecoin.io/tutorials/lotus-miner/run-a-miner/#generate-auth-token-for-seal-worker) . # The following increases speed of PreCommit1 at the cost of using a full # CPU Core-Complex rather than a single core. Should be used with CPU affinities set! # See https://github.com/filecoin-project/rust-fil-proofs/ and the seal-workers guide. export FIL_PROOFS_USE_MULTICORE_SDR=1 export MINER_API_INFO=:/ip4/y.y.y.y/tcp/2345/http export LOTUS_MINER_PATH=$HOME/.lotusminer export FIL_PROOFS_PARAMETER_CACHE=$HOME/param_cache # > 100GiB! export FIL_PROOFS_PARENT_CACHE=$HOME/parent_cache # > 50GiB! export GOLOG_OUTPUT=file export GOLOG_FILE="$HOME/miner.log" 2. You then need to load these changes: source ~/.bashrc 3. Copy the parameters from the miner node to the seal-worker node. 4. Start the seal-worker lotus-worker run --addpiece=true --precommit1=true --unseal=false --precommit2=false --commit=false & 5. Verify that the seal-worker is running lotus-worker info lotus-miner sealing workers # This command need to be run on the lotus-miner node 6. Add storage for sealing the sectors. mkdir ~/tmp Please make sure that the ~/tmp directory is backed by a fast disk like NVME. lotus-worker storage attach --init --seal ~/tmp lotus-worker storage list Now, the seal-worker is ready to start performing PC1 for the sectors. [Edit this page on GitHub](https://github.com/filecoin-project/lotus-docs/blob/main/content/en/tutorials/lotus-miner/add-seal-worker.md) [← Lotus Miner Setup](https://lotus.filecoin.io/tutorials/lotus-miner/run-a-miner/) [CUDA Setup →](https://lotus.filecoin.io/tutorials/lotus-miner/cuda/) --- # Message pool - Lotus Docs Message pool ============ The Message Pool (mpool) is the component of lotus that handles pending messages for inclusion in the chain. Messages are added to the mpool either directly for locally published messages or through pubsub propagation. Whenever a storage provider is ready to create a block for a tipset, it invokes the mpool selection algorithm which selects an appropriate set of messages such that it optimizes storage provider reward and chain capacity. When messages are executed, they use _gas_. The amount of _gas_ used, the parameters attached to each message and the Network’s current _BaseFee_ determine the final FIL-cost to include the transaction in the chain. Part of that cost is burned by the network. The other part is given to the storager provider of the first block that includes the transaction as a reward. The different caps and fees for messages are explained below, along with instructions on how to inspect and interact with the message pool. 💡 Lotus provides the tooling to interact with the message pool with the `lotus mpool` subcommands. Message selection [#](https://lotus.filecoin.io/lotus/manage/message-pool/#message-selection) ---------------------------------------------------------------------------------------------- When mining a new block, storage providers must select a set of messages for inclusion in a way that maximizes the reward. Given how message distribution works, using pubsub, and that storage provider do not communicate their tickets to each other, it is not possible to fully determine if a different storage provider will also include the message on a different block in the new tipset, and perhaps get the reward instead if their block executes first. The problem is NP-hard (an instance of knapsack packing) so, at best, an approximation can be made to the optimal selection in a reasonable amount of time. Lotus employs a sophisticated algorithm for selecting messages for inclusion from the pool, given the ticket quality of a storage provider. The ticket quality reflects the probability of execution order for a block in the tipset. Given the ticket quality the algorithm computes the probability of each block, and picks dependent chains of messages such that the reward is maximized, while also optimizing the capacity of the chain. If the ticket quality is sufficiently high, then a greedy selection algorithm is used instead that simply picks dependent chains of maximum reward. Note that pending message chains from priority addresses are always selected, regardless of their profitability. Gas, fees, limits and caps [#](https://lotus.filecoin.io/lotus/manage/message-pool/#gas-fees-limits-and-caps) -------------------------------------------------------------------------------------------------------------- When a message is executed it consumes _gas_. The total gas consumed by a message directly affects the cost to place that message in the blockchain, which is a price that the sender will have to pay. 💡 Lotus can be configured with several addresses to have more granular control over fees and limits depending on the operation and avoid head-of-line blocking, particularly for high value operations such as _WindowPoSts_. Check the [addresses guide](https://lotus.filecoin.io/storage-providers/operate/addresses/#control-addresses) . The [How Filecoin works page](https://docs.filecoin.io/basics/what-is-filecoin/overview/) explains gas-usage and fee in more detail. As an additional tip, you can use Lotus to find the current _BaseFee_: # Will print the last BaseFee in attoFIL lotus chain head | xargs lotus chain getblock | jq -r .ParentBaseFee Checking for pending messages [#](https://lotus.filecoin.io/lotus/manage/message-pool/#checking-for-pending-messages) ---------------------------------------------------------------------------------------------------------------------- If messages are not deemed attractive enough by storage providers to be included in new blocks, they may become stuck in the message pool. This is usually a consequence of the _GasFeeCap_ being too low, for example, when the Network’s _BaseFee_ is high. It can also be a consequence of the _GasPremium_ being too low if the network is congested. You can check for messages currently in the pool and specifically sent by your node with: lotus mpool pending --local For each message you will be able to see key information like the _GasLimit_, the _GasFeeCap_ and the _GasPremium_ values, explained above. To reduce the output to the messages key values you can use: lotus mpool pending --local | grep "Nonce" -A5 In order to avoid messages from staying long periods in the pool when they are sent, it is possible to adjust the [fees in the configuration](https://lotus.filecoin.io/storage-providers/setup/configuration/#fees-section) and use [additional control addresses for _WindowPoSts_](https://lotus.filecoin.io/storage-providers/operate/addresses/) . Existing messages can be replaced at any time with the procedure explained below. Replacing messages in the pool [#](https://lotus.filecoin.io/lotus/manage/message-pool/#replacing-messages-in-the-pool) ------------------------------------------------------------------------------------------------------------------------ You can replace messages in the pool by pushing a new message with the same `Nonce` that has a **new `GasPremium` that is at least 25% larger than that of the original message**. The easiest way to do this is: lotus mpool replace --auto The above command will replace the associated message in the pool and automatically reprice it with a new _GasPremium_ and _GasFeeCap_ as estimated from the current network conditions. You can also set `--fee-limit` if you wish to limit the total amount to spend for the message. All other flags are ignored. ❗ `--fee-limit` uses units of FIL with decimals support, whereas `--max-fee` uses `attoFIL`. Alternatively, the _GasPremium_, _GasFeeCap_ can be set manually with their respective flags: lotus mpool replace --gas-feecap --gas-premium If the new _gas premium_ is lower than the 1.25 ratio to the original, the message will not be included in the pool. Additional message fields, like the recipient of the transaction, can be changed when using the [`MpoolPush` API method](https://lotus.filecoin.io/reference/lotus/mpool/#mpoolpush) directly. In this case the new message will need to be locally signed first. The _GasLimit_ should not be changed under normal circumstances. For instructions on how to use the optional flag to replace the _GasLimit_ please consult lotus mpool replace --help [Edit this page on GitHub](https://github.com/filecoin-project/lotus-docs/blob/main/content/en/lotus/manage/message-pool.md) [← Chain management](https://lotus.filecoin.io/lotus/manage/chain-management/) [Switch networks →](https://lotus.filecoin.io/lotus/manage/switch-networks/) --- # Butterfly Network - Lotus Docs Butterfly Network ================= ##### [How to Join the Butterfly Test Network.](https://lotus.filecoin.io/kb/butterfly-network/) --- # solution - Lotus Docs Solution ======== ##### [Replace Message With Updated Gas Fee](https://lotus.filecoin.io/kb/update-msg-gas-fee/) ##### [Soft FD Limit Is Low](https://lotus.filecoin.io/kb/soft-fd-limit/) ##### [Where Does the ImportData Function Get Executed](https://lotus.filecoin.io/kb/importdata/) ##### [Unexpected Genesis in Repo](https://lotus.filecoin.io/kb/unexpected-genesis/) ##### [Retrieval Error: Failed to Lookup Index for Mh](https://lotus.filecoin.io/kb/dagstore-register/) ##### [Failed to Create Data Store](https://lotus.filecoin.io/kb/failed-to-create-datastore/) ##### [Error: Can't Acquire Bellman.lock](https://lotus.filecoin.io/kb/bellman-lock/) ##### [Actor Not Found](https://lotus.filecoin.io/kb/actor-not-found/) ##### [StorageMiner Repo Directory Does Not Exist](https://lotus.filecoin.io/kb/repo-directory-does-not-exist/) ##### [Troubleshooting Sector Removal](https://lotus.filecoin.io/kb/sector-removal/) ##### [LevelDB Metadata Corruption Recovery](https://lotus.filecoin.io/kb/leveldb-corruption/) ##### [Go Command Not Found](https://lotus.filecoin.io/kb/go-cmd-not-found/) ##### [Chain Linked to Block Marked Previously as Bad](https://lotus.filecoin.io/kb/block-marked-as-bad/) ##### [Redeclared in This Block Build Error](https://lotus.filecoin.io/kb/redeclared-in-this-block/) ##### [Resolving Failed to Find Sector Errors](https://lotus.filecoin.io/kb/failed-to-find-sector/) --- # CUDA Setup - Lotus Docs CUDA Setup ========== This is a step by step guide on how to configure and use CUDA architecture for Lotus instead of OpenCL for Nvidia cards. Installing latest stable Nvidia drivers [#](https://lotus.filecoin.io/tutorials/lotus-miner/cuda/#installing-latest-stable-nvidia-drivers) ------------------------------------------------------------------------------------------------------------------------------------------- Many Linux distributions provide packages of the NVIDIA Linux Graphics Driver in the distribution’s native package management format. These packages may interact better with the rest of your distribution’s framework, and you may want to use these packages rather than NVIDIA’s official package. 1. Download the latest stable package for your card using [the Nvidia website](https://www.nvidia.com/download/index.aspx) . 2. Once you have downloaded the driver, change to the directory containing the driver package and install the driver by running, as root, `sh ./NVIDIA-Linux-x86_64-.run`: mkdir ~/nvidia-drivers cd ~/nvidia-drivers wget https://us.download.nvidia.com/XFree86/Linux-x86_64/510.54/NVIDIA-Linux-x86_64-510.54.run sudo sh NVIDIA-Linux-x86_64-510.54.run 3. One of the last installation steps will prompt to update your X configuration file (for X-server). Either accept that offer, edit your X configuration file manually so that the NVIDIA X driver will be used, or run `nvidia-xconfig`. There are some changes in the latest Nvidia driver, so if you upgrade your driver, remember to check `nvidia-smi`; it will always display the correct name for the GPU. If you are using an nvidia driver below < `460.91.03` export RUST_GPU_TOOLS_CUSTOM_GPU="GeForce RTX 3090:10496" If you are using an Nvidia driver above > `510.47.03` export RUST_GPU_TOOLS_CUSTOM_GPU="NVIDIA GeForce RTX 3090:10496" Nvidia RTX 3090 was used in this example. Remember to replace the GPU model and the number of CUDA cores. Installing the latest CUDA toolkit [#](https://lotus.filecoin.io/tutorials/lotus-miner/cuda/#installing-the-latest-cuda-toolkit) --------------------------------------------------------------------------------------------------------------------------------- 1. Download the latest CUDA toolkit from [the Nvidia website.](https://developer.nvidia.com/cuda-toolkit) . 2. Once you have downloaded the cuda-toolkit, change to the directory containing the installer and install by running, as root, `sh cuda_.run`: mkdir ~/cuda cd ~/cuda wget https://developer.download.nvidia.com/compute/cuda/11.6.1/local_installers/cuda_11.6.1_510.47.03_linux.run sudo sh cuda_11.6.1_510.47.03_linux.run 3. Use `SPACEBAR` to select and deselect an installation option. Only install the CUDA toolkit. You do not need any other packages. 4. Press `ENTER` to begin the installation and wait for it to finish. Configuring the variables [#](https://lotus.filecoin.io/tutorials/lotus-miner/cuda/#configuring-the-variables) --------------------------------------------------------------------------------------------------------------- 1. We need to add the newly installed CUDA to the PATH environment variable for the Linux user that will compile and run Lotus: echo -e `export PATH=$PATH:/usr/local/cuda-11.6/bin \n export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-11.6/lib64` >> ~/.bashrc && source ~/.bashrc 2. Reboot the system for the changes to take effect, and then verify that the new CUDA toolkit and Nvidia driver versions are in use: sudo nvidia-smi > +-----------------------------------------------------------------------------+ > | NVIDIA-SMI 510.47.03 Driver Version: 510.47.03 CUDA Version: 11.6 | > |-------------------------------+----------------------+----------------------+ > | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | > | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | > | | | MIG M. | > |===============================+======================+======================| > | 0 NVIDIA GeForce ... Off | 00000000:41:00.0 On | N/A | > | 54% 49C P8 43W / 390W | 490MiB / 24576MiB | 1% Default | > | | | N/A | > +-------------------------------+----------------------+----------------------+ > | 1 NVIDIA GeForce ... Off | 00000000:61:00.0 Off | N/A | > | 0% 30C P8 33W / 390W | 6MiB / 24576MiB | 0% Default | > | | | N/A | > +-------------------------------+----------------------+----------------------+ [Edit this page on GitHub](https://github.com/filecoin-project/lotus-docs/blob/main/content/en/tutorials/lotus-miner/cuda.md) [← Add Seal Worker](https://lotus.filecoin.io/tutorials/lotus-miner/add-seal-worker/) [SupraSeal C2 Setup →](https://lotus.filecoin.io/tutorials/lotus-miner/supra-seal/) --- # Backup and restore - Lotus Docs Backup and restore ================== You can backup your Lotus node. You can then restore this backup if something goes wrong, or you simply wish to move your Lotus node from one computer to another. This backup process is different to that of the [`lotus-miner` backup](https://lotus.filecoin.io/storage-providers/operate/backup-and-restore/) . This backup process does not retain information related to a storage provider, it only backs up metadata for the Lotus daemon. ❗ This does not backup your addresses private keys. For that you need to [export your wallet addresses](https://lotus.filecoin.io/lotus/manage/manage-fil/#exporting-and-importing-addresses) Backup [#](https://lotus.filecoin.io/lotus/manage/backup-and-restore/#backup) ------------------------------------------------------------------------------ 1. Stop your `lotus` daemon if it is already running. 2. Run `lotus daemon backup`: lotus backup --offline ~/lotus-backup.cbor 2021-09-24T20:21:03.986Z INFO backupds backupds/datastore.go:75Starting datastore backup 2021-09-24T20:21:03.987Z INFO backupds backupds/datastore.go:130 Datastore backup done 3. Your Lotus daemon data is now backed up into `lotus-backup.cbor`. Restore [#](https://lotus.filecoin.io/lotus/manage/backup-and-restore/#restore) -------------------------------------------------------------------------------- 1. Stop your `lotus` daemon if it is already running. 2. Run `lotus daemon` while using the `--restore` option: lotus daemon 2>&1 --restore=offline-backup.cbor 2021-09-24T20:24:51.729Z INFO main lotus/daemon.go:218 lotus repo: /root/.lotus 2021-09-24T20:24:51.730Z INFO paramfetch go-paramfetch@v0.0.2/paramfetch.go:191 Parameter file /var/tmp/filecoin-proof-parameters/v28-proof-of-spacetime-fallback-merkletree-poseidon_hasher-8-0-0-7d739b8cf60f1b0709eeebee7730e297683552e4b69cab6984ec0285663c5781.vk is ok ... 2021-09-24T20:24:52.296Z INFO badger v2@v2.2007.2/value.go:1178 Replay took: 2.975µs 2021-09-24T20:24:52.297Z INFO backupds backupds/log.go:125 opening log {"file": "/root/.lotus/kvlog/metadata/1632514590.log.cbor"} 3. The `lotus daemon` should continue to run from the block height at which your backup was taken. [Edit this page on GitHub](https://github.com/filecoin-project/lotus-docs/blob/main/content/en/lotus/manage/backup-and-restore.md) [← Switch networks](https://lotus.filecoin.io/lotus/manage/switch-networks/) [Upgrade →](https://lotus.filecoin.io/lotus/manage/upgrade/) --- # article - Lotus Docs Article ======= ##### [Common Connectivity Error](https://lotus.filecoin.io/kb/connectivity-errors/) This article lists out the common … ##### [Mark for Upgrade Is Unsupported](https://lotus.filecoin.io/kb/mark-for-upgrade-unsupported/) ##### [How to Join the Butterfly Test Network.](https://lotus.filecoin.io/kb/butterfly-network/) ##### [How to Install Lotus-Shed](https://lotus.filecoin.io/kb/lotus-shed-not-installed/) ##### [Add Swap on Linux](https://lotus.filecoin.io/kb/add-swap/) ##### [Using OpenCL or Disabling GPU](https://lotus.filecoin.io/kb/using-opencl/) ##### [Setting a User-Defined Propagation Delay](https://lotus.filecoin.io/kb/propagation-delay/) ##### [Getting Logs for Hard to Solve Issues](https://lotus.filecoin.io/kb/deadlocks/) ##### [Debugging GetAPIInfo Errors](https://lotus.filecoin.io/kb/api-info/) ##### [Lotus-Miner Sectors Renew Command Is Removed From CLI](https://lotus.filecoin.io/kb/sectors-renew-cmd/) ##### [Sector Redeclared in Xxx-Xxx-Xxx Logs](https://lotus.filecoin.io/kb/redeclared-sector-log/) ##### [How to Install Lotus-Wallet](https://lotus.filecoin.io/kb/install-lotus-wallet/) ##### [Nodes in China](https://lotus.filecoin.io/kb/nodes-in-china/) ##### [Index Provider](https://lotus.filecoin.io/kb/index-provider/) ##### [Dynamic Retrieval Pricing Is Being Deprecated](https://lotus.filecoin.io/kb/dynamic-retrieval-pricing/) ##### [Dagstore](https://lotus.filecoin.io/kb/dagstore/) ##### [Split-Markets](https://lotus.filecoin.io/kb/split-markets/) ##### [Retrieve Data With the Legacy Markets](https://lotus.filecoin.io/kb/legacy-retrieve-data/) ##### [Manage Storage Deals - Lotus-Miner Legacy Markets](https://lotus.filecoin.io/kb/manage-storage-deals-legacy/) ##### [Legacy Lotus-Miner Markets Connectivity](https://lotus.filecoin.io/kb/legacy-miner-connectivety/) ##### [Lotus-Miner Legacy Markets Configs](https://lotus.filecoin.io/kb/legacy-markets-config/) ##### [Benchmark a Network Migration](https://lotus.filecoin.io/kb/test-migration/) ##### [How to Disable Premigration in Network Upgrade](https://lotus.filecoin.io/kb/disable-premigration/) ##### [Run an Invariant Check](https://lotus.filecoin.io/kb/run-invariant-check/) --- # Connectivity - Lotus Docs Connectivity ============ ##### [Common Connectivity Error](https://lotus.filecoin.io/kb/connectivity-errors/) This article lists out the common … --- # Upgrade - Lotus Docs Upgrade ======= This guide will show you how to safely upgrade a Lotus node to a newer version. Installing an update [#](https://lotus.filecoin.io/lotus/manage/upgrade/#installing-an-update) ----------------------------------------------------------------------------------------------- Usually, if you are updating Lotus, it as simple as rebuilding and re-installing the software after pulling the latest state for the chosen branch and repository. You can do that with: git pull LATEST_RELEASE=$(git tag -l 'v*' | grep -v "-" | sort -V -r | head -n 1) # Finds the latest Lotus Node release git checkout $LATEST_RELEASE # if you need a specific release use # git checkout git submodule update Once the new version is checked-out, rebuild and re-install as explained in the installation guide. You can verify your current version with: lotus --version # for the lotus binary lotus version # for the currently running daemon 💬 **You will need to stop and start the daemon again after installing the new version**. Cross-check your config file [#](https://lotus.filecoin.io/lotus/manage/upgrade/#cross-check-your-config-file) --------------------------------------------------------------------------------------------------------------- All upgrades require that you double-check that your configuration files are up-to-date. You can do this by exporting the default configuration files from Lotus and comparing them to your configuration files. To export the default configuration files from Lotus, run: lotus config default This will output something like: [API] # Binding address for the Lotus API # # type: string # env var: LOTUS_API_LISTENADDRESS #ListenAddress = "/ip4/127.0.0.1/tcp/1234/http" ... If you would prefer to have Lotus export the default configuration to a file, run: lotus config default >> ~/default-lotus-client-configuration.toml Once you have the default configuration file, compare it with your configuration file and make sure that you’re not missing any sections. See the [Lotus release notes](https://github.com/filecoin-project/lotus/releases) for details on what new sections have been added. Switching networks [#](https://lotus.filecoin.io/lotus/manage/upgrade/#switching-networks) ------------------------------------------------------------------------------------------- If you want to switch networks, use the [switching networks guide](https://lotus.filecoin.io/lotus/manage/switch-networks/) . [Edit this page on GitHub](https://github.com/filecoin-project/lotus-docs/blob/main/content/en/lotus/manage/upgrade.md) [← Backup and restore](https://lotus.filecoin.io/lotus/manage/backup-and-restore/) [Lotus CLI →](https://lotus.filecoin.io/lotus/manage/lotus-cli/) --- # Prerequisites - Lotus Docs Prerequisites ============= This guide describes the necessary prerequisites before configuring a storage provider for production. Being a storage provider will only work if you fully comply with the [minimal hardware requirements](https://lotus.filecoin.io/storage-providers/get-started/hardware-requirements/) for the network in which you will be a storage provider. The sealing process is very resource-intensive and is dependent on precise configuration. We strongly recommend Linux systems administration experience before embarking. 💬 Be warned: if you decide to skip any of the sections below, things will not work! Read carefully. Please make sure that the following prerequites are met whether you are planning to run the `lotus miner` on the same machine as the lotus daemon or a different machine. 1. Make sure your Lotus Node is running, as the storage provider will communicate with it and cannot work otherwise. 2. If you are in China, read the [tips for running in China](https://lotus.filecoin.io/lotus/install/prerequisites/#node-in-china) page first. 3. Make sure to [add swap](https://lotus.filecoin.io/kb/add-swap/) to the machine if needed. 4. Permanently raise your [fd-limit](https://lotus.filecoin.io/kb/soft-fd-limit/#resolution) . ### Install CUDA [#](https://lotus.filecoin.io/storage-providers/setup/prerequisites/#install-cuda) 1. Install the latest stable [Nvidia drivers and Cuda](https://lotus.filecoin.io/tutorials/lotus-miner/cuda/) if you have an Nvidia card on your machine. Nvidia cards have a better performance with Cuda when compared to OpenCL. 2. Make sure you have followed the instructions to [install the Lotus suite](https://lotus.filecoin.io/lotus/install/linux/#building-from-source) to build the `lotus-miner` binary. Make sure that you have built Lotus with “Native Filecoin FFI”. If you want to use OpenCL, or disable the GPU when building Lotus, [check out this article](https://lotus.filecoin.io/kb/using-opencl/) . ### Configure parameters location [#](https://lotus.filecoin.io/storage-providers/setup/prerequisites/#configure-parameters-location) For the storage provider to start, it will need to read and verify the Filecoin proof parameters. The proof parameters consist of several files, which in the case of 32 GiB sectors, total **over 100 GiB**. We recommend setting a custom location to store the parameters and proofs parent cache: export FIL_PROOFS_PARAMETER_CACHE=/path/to/folder/in/fast/disk export FIL_PROOFS_PARENT_CACHE=/path/to/folder/in/fast/disk2 Make sure the `ListenAddress` has [remote access enabled](https://lotus.filecoin.io/reference/basics/api-access/#enable-remote-api-access) . Instructions on how to obtain a token are [available here](https://lotus.filecoin.io/reference/basics/api-access/#api-tokens) . ### Performance tweaks [#](https://lotus.filecoin.io/storage-providers/setup/prerequisites/#performance-tweaks) Parameters are read on every (re)start, so using disks with very fast access, like NVMe drives, will speed up `lotus-miner` and workers (re)boots. When the above variables are not set, things will end up in `/var/tmp/` by default. To download the parameters: # Use sectors supported by the Filecoin network that the storage provider will join and use. # lotus-miner fetch-params lotus-miner fetch-params 32GiB lotus-miner fetch-params 64GiB ### Running the storage provider on a different machine as the Lotus Node [#](https://lotus.filecoin.io/storage-providers/setup/prerequisites/#running-the-storage-provider-on-a-different-machine-as-the-lotus-node) If you opt to run the `lotus-miner` on a different machine than the Lotus Node, set: export FULLNODE_API_INFO=:/ip4//tcp//http Make sure the `ListenAddress` has [remote access enabled](https://lotus.filecoin.io/reference/basics/api-access/#enable-remote-api-access) . Instructions on how to obtain a token are [available here](https://lotus.filecoin.io/reference/basics/api-access/#api-tokens) . ### Creating wallets for the storage provider [#](https://lotus.filecoin.io/storage-providers/setup/prerequisites/#creating-wallets-for-the-storage-provider) You will need at least a BLS wallet (`f3...` for mainnet) to initialize. We recommend using [separate owner and worker addresses](https://lotus.filecoin.io/storage-providers/operate/addresses/) : # A new BLS address to use as owner address: lotus wallet new bls f3... # A new BLS address to use as worker address: lotus wallet new bls f3... 💬 Next make sure to [send some funds](https://lotus.filecoin.io/lotus/manage/manage-fil/) to the **worker address** so that the storage provider setup can be completed. The amount you should initialize with varies with gas fees, but 0.1 FIL is generally a safe amount. The sender doesn’t have to be any particular address and can be specified using the `from` flag. If `from` is unspecified, the sender will default to the `owner` address, in which case the `owner` must have the 0.1 FIL. If the `owner` is also unspecified, the wallet’s default address is used as the owner and that address must have the 0.1 FIL. For additional information about the different wallets that a storage provider can use and how to configure them, read the [addresses guide](https://lotus.filecoin.io/storage-providers/operate/addresses/) . 💡 Safely [backup your wallets](https://lotus.filecoin.io/lotus/manage/manage-fil/#exporting-and-importing-addresses) ! ### Cuda variables [#](https://lotus.filecoin.io/storage-providers/setup/prerequisites/#cuda-variables) There are some changes in the latest Nvidia driver, so if you upgrade your driver remember to check `nvidia-smi` - it will always display the correct name for the GPU. The new names are not picked by FFI automatically and need to be exported manually. If you are using an Nvidia driver below `460.91.03` export RUST_GPU_TOOLS_CUSTOM_GPU="GeForce RTX 3090:10496" If you are using an Nvidia driver above `510.47.03` export RUST_GPU_TOOLS_CUSTOM_GPU="NVIDIA GeForce RTX 3090:10496" Nvidia RTX 3090 was used in this example. Remember to edit it with your GPU and number of Cuda cores. [Edit this page on GitHub](https://github.com/filecoin-project/lotus-docs/blob/main/content/en/storage-providers/setup/prerequisites.md) [← Architectures](https://lotus.filecoin.io/storage-providers/get-started/architectures/) [Initialize →](https://lotus.filecoin.io/storage-providers/setup/initialize/) --- # SupraSeal C2 Setup - Lotus Docs SupraSeal C2 Setup ================== This is a step by step guide on how to enable the experimental SupraSeal C2 feature on your Lotus-Workers. Pre-requisites [#](https://lotus.filecoin.io/tutorials/lotus-miner/supra-seal/#pre-requisites) ----------------------------------------------------------------------------------------------- * You need to have CUDA configured on your setup. Checkout the Cuda installation tutorial. * CUDA-version 11.x or higher is needed. * Ubuntu 20.04.4 LTS or higher. Benchmarks [#](https://lotus.filecoin.io/tutorials/lotus-miner/supra-seal/#benchmarks) --------------------------------------------------------------------------------------- Some early benchmarks with different GPUs: | GPU | Speedup | CUDA (sec) | SupraSeal C2 (sec) | | --- | --- | --- | --- | | Quadro RTX 6000 | 4.86 | 1104 | 227 | | RTX 4090 | 3.67 | 525 | 143 | | A4000 | 2.03 | 1091 | 538 | | RTX 3090 | 3.88 | 535 | 138 | Setup [#](https://lotus.filecoin.io/tutorials/lotus-miner/supra-seal/#setup) ----------------------------------------------------------------------------- 1. [Checkout the latest Lotus release](https://github.com/filecoin-project/lotus/releases/) 2. [Build from source](https://lotus.filecoin.io/lotus/install/linux/#native-filecoin-ffi) with the environment variable `FFI_USE_CUDA_SUPRASEAL=1` exported. You can see that it’s being enabled by checking that `supraseal-c2` is being downloaded when downloading the crates: Downloading crates ... ------ Downloaded supraseal-c2 v0.1.0 <----- Downloaded sppark v0.1.5 Troubleshooting [#](https://lotus.filecoin.io/tutorials/lotus-miner/supra-seal/#troubleshooting) ------------------------------------------------------------------------------------------------- If you encounter the following issue when building: /usr/local/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1 /usr/bin/ld: cannot find -lcudart_static /usr/bin/ld: cannot find -lcudart_static You can fix it by running `find /usr/ -name libcudart_static*`: find /usr/ -name libcudart_static* /usr/local/cuda-11.6/targets/x86_64-linux/lib/libcudart_static.a On most modern systems, you can fix this by updating the `LIBRARY_PATH` environment variable. This variable is used by the linker to find required libraries. By adding the path to the CUDA libraries, you’re helping the linker find them when building your project. Here’s how you can do it: export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/cuda/targets/x86_64-linux/lib/ Finally, source it. And rebuild: source ~/.bashrc [Edit this page on GitHub](https://github.com/filecoin-project/lotus-docs/blob/main/content/en/tutorials/lotus-miner/supra-seal.md) [← CUDA Setup](https://lotus.filecoin.io/tutorials/lotus-miner/cuda/) [SupraSeal PC2 Setup →](https://lotus.filecoin.io/tutorials/lotus-miner/supra-seal-pc2/) --- # Initialize - Lotus Docs Initialize ========== This guide describes the necessary steps to initialize a storage provider on-chain. Checklist [#](https://lotus.filecoin.io/storage-providers/setup/initialize/#checklist) --------------------------------------------------------------------------------------- Make sure that: * All the [prerequisite steps](https://lotus.filecoin.io/storage-providers/setup/prerequisites/) have been completed. * Wallets have been created for the owner and worker address, and the _worker address_ has funds so that the storage provider can be initialized. * The following environment variables have been defined and will be available for all `lotus-miner` instances: export LOTUS_MINER_PATH=/path/to/miner/config/storage export LOTUS_PATH=/path/to/lotus/node/folder # When using a local node. export FULLNODE_API_INFO=:/ip4//tcp//http # When using a remote Lotus node. export FIL_PROOFS_PARAMETER_CACHE=/fast/disk/folder # > 100GiB! export FIL_PROOFS_PARENT_CACHE=/fast/disk/folder2 # > 50GiB! * Parameters have been prefetched to the cache folders specified above. * The system has enough swap if needed. * The lotus api has been configured and the variable has been exported in the environment where lotus miner runs. Initialization [#](https://lotus.filecoin.io/storage-providers/setup/initialize/#initialization) ------------------------------------------------------------------------------------------------- Before we can run the storage provider we need to initialize it by sending a message to the chain to tell the Filecoin network that we want to start a storage provider: lotus-miner init --owner=
--worker= --no-local-storage --sector-size=<32GiB or 64GiB> * The Lotus Miner configuration folder is created in `~/.lotusminer/` or in your `$LOTUS_MINER_PATH` if set. * The difference between _owner_ and _worker_ addresses is explained in the [miner addresses guide](https://lotus.filecoin.io/storage-providers/operate/addresses/) . As mentioned above, we recommend using two separate addresses. If the `--worker` flag is not provided, the owner address will be used. _Control addresses_ can be added later when the storage provider is running. * The `--no-local-storage` flag is used so that we can later configure [specific locations for storage](https://lotus.filecoin.io/storage-providers/operate/custom-storage-layout/) the location of our sealing storage, and our long term storage. * The `--sector-size` specifies the sector size, and can not be changed after the init. The default is 32GiB. Running the storage provider [#](https://lotus.filecoin.io/storage-providers/setup/initialize/#running-the-storage-provider) ----------------------------------------------------------------------------------------------------------------------------- You are now ready to start the `lotus-miner` process: lotus-miner run or if you are using the systemd service file: systemctl start lotus-miner Next steps [#](https://lotus.filecoin.io/storage-providers/setup/initialize/#next-steps) ----------------------------------------------------------------------------------------- Your storage provider should now be preliminarily initialized and running, but **there are still a few more things you need to configure** to be ready for prime-time. We will go through these in the [configuration section](https://lotus.filecoin.io/storage-providers/setup/configuration/) . [Edit this page on GitHub](https://github.com/filecoin-project/lotus-docs/blob/main/content/en/storage-providers/setup/initialize.md) [← Prerequisites](https://lotus.filecoin.io/storage-providers/setup/prerequisites/) [Configuration →](https://lotus.filecoin.io/storage-providers/setup/configuration/) --- # Lotus Slasher & Lotus Disputer - Lotus Docs Lotus Slasher & Lotus Disputer ============================== Lotus Slasher and Lotus Disputer are essential services provided by the Filecoin protocol. They help maintain network integrity, prevent bad actors, and reward active participants. The Slasher and Disputer services are designed to be highly efficient and lightweight processes that require minimal resources. Enabling these services will have no detrimental effect on the performance of your Lotus node. Lotus Slasher [#](https://lotus.filecoin.io/lotus/manage/slasher-and-disputer/#lotus-slasher) ============================================================================================== The Filecoin protocol enforces penalties for three types of Consensus Faults that can be committed by block producers. To detect and report these faults, any user running a Lotus node can leverage the Lotus Slasher service. This service monitors all incoming blocks for potential Consensus Faults, and invokes the `ReportConsensusFault` method on the respective miner actor. Detailed information about these three Consensus Faults can be found [here](https://github.com/filecoin-project/lotus/blob/dbbcf4b2ee9626796e23a096c66e67ff350810e4/chain/vm/fvm.go#L113-L132) . When a consensus fault is successfully identified by the Lotus Slasher, the block producer responsible for the fault is subjected to a fine equivalent to 5 times the current epoch’s block reward value. Additionally, they are ineligible to produce any further blocks for a full finality period of 900 epochs. Furthermore, the offending block producer is prohibited from pre-committing or recovering storage during the same finality period. The successful Lotus Slasher operator receives a reward equal to 25% of the current epoch’s block reward value. Run the Slasher [#](https://lotus.filecoin.io/lotus/manage/slasher-and-disputer/#run-the-slasher) -------------------------------------------------------------------------------------------------- The Lotus Slasher is already packagaed with Lotus so no additional installation steps are required. You **do not** need to be running `lotus-miner` to operate a Slasher. The Lotus Slasher functionality is configured and activated in the Lotus daemon `config.toml`. Simply set `EnableConsensusFaultReporter` to `true` and provide a local directory path for `ConsensusFaultReporterDataDir`. A specific wallet address may be set using the `ConsensusFaultReporterAddress` which will be responsible for submitting `ReportConsensusFault` messages. If no wallet address is specified, the default wallet will be used. [FaultReporter] # EnableConsensusFaultReporter controls whether the node will monitor and # report consensus faults. When enabled, the node will watch for malicious # behaviors like double-mining and parent grinding, and submit reports to the # network. This can earn reporter rewards, but is not guaranteed. Nodes should # enable fault reporting with care, as it may increase resource usage, and may # generate gas fees without earning rewards. # # type: bool # env var: LOTUS_FAULTREPORTER_ENABLECONSENSUSFAULTREPORTER EnableConsensusFaultReporter = true # ConsensusFaultReporterDataDir is the path where fault reporter state will be # persisted. This directory should have adequate space and permissions for the # node process. # # type: string # env var: LOTUS_FAULTREPORTER_CONSENSUSFAULTREPORTERDATADIR ConsensusFaultReporterDataDir = "/path/to/slasher/directory" # ConsensusFaultReporterAddress is the wallet address used for submitting # ReportConsensusFault messages. It will pay for gas fees, and receive any # rewards. This address should have adequate funds to cover gas fees. # # type: string # env var: LOTUS_FAULTREPORTER_CONSENSUSFAULTREPORTERADDRESS ConsensusFaultReporterAddress = "f1123..." Lotus Disputer [#](https://lotus.filecoin.io/lotus/manage/slasher-and-disputer/#lotus-disputer) ================================================================================================ WindowPoSTs are important proofs submitted daily to ensure continued storage of all data on the Filecoin network. These proofs are accepted and recorded off-chain, reducing the burden on Storage Providers and network bandwidth by eliminating the need for extensive on-chain proof checking. Instead, the network relies on third-party Lotus node operators who enable off-chain verification of accepted WindowPoST proofs through the use of the Lotus Disputer service, utilizing the `DisputeWindowedPoSt` functionality. In the event that a Lotus Disputer successfully challenges an optimistically accepted Window PoST, the Storage Provider responsible for the faulty proof is fined based on the proportion of the expected block reward they would have received from each incorrectly proved sector. Additionally, all sectors with incorrect proofs are appropriately labelled as faulty. The successful Lotus Disputer operator is also rewarded with a fixed `DisputeReward`, which is presently set at 4FIL. Any Lotus node operator is eligible to run a Lotus Disputer as outlined below. Configure the Disputer [#](https://lotus.filecoin.io/lotus/manage/slasher-and-disputer/#configure-the-disputer) ---------------------------------------------------------------------------------------------------------------- The Lotus Disputer is already packagaed with Lotus so no additional installation steps are required. You **do not** need to be running `lotus-miner` to operate a Disputer. Once the node is fully synced, you can configure `lotus chain disputer` with the following options: --max-fee value Spend up to X FIL per DisputeWindowedPoSt message --from value optionally specify the account to send messages from Run the Disputer [#](https://lotus.filecoin.io/lotus/manage/slasher-and-disputer/#run-the-disputer) ---------------------------------------------------------------------------------------------------- Simply run `lotus chain disputer start` to start the disputer. The Disputer will automatically begin to dispute proofs from the current epoch unless a specific height is set using the `--start-epoch` flag. 💡 The Lotus Disputer will take a couple of minutes to fully start. Any `rpc output message buffer` warning messages displayed during the the initiation process can be safely ignored. [Edit this page on GitHub](https://github.com/filecoin-project/lotus-docs/blob/main/content/en/lotus/manage/slasher-and-disputer.md) [← Lotus CLI](https://lotus.filecoin.io/lotus/manage/lotus-cli/) [Claim Extension →](https://lotus.filecoin.io/lotus/manage/claim-extension/) --- # Troubleshooting - Lotus Docs Troubleshooting =============== This page offers some troubleshooting advice for Lotus API users by listing some of the most common errors that they can come across. Store [#](https://lotus.filecoin.io/reference/basics/troubleshooting/#store) ----------------------------------------------------------------------------- Error: Failed to start deal [#](https://lotus.filecoin.io/reference/basics/troubleshooting/#error-failed-to-start-deal) ------------------------------------------------------------------------------------------------------------------------ WARN main lotus/main.go:72 failed to start deal: computing commP failed: generating CommP: Piece must be at least 127 bytes This error means that there is a minimum file size of 127 bytes. Error: 0kb file response during retrieval [#](https://lotus.filecoin.io/reference/basics/troubleshooting/#error-0kb-file-response-during-retrieval) ---------------------------------------------------------------------------------------------------------------------------------------------------- This means that the file to be retrieved may have not yet been sealed and is thus, not retrievable yet. Miners can check sealing progress with this command: lotus-miner sectors list When sealing is complete, `pSet: NO` will become `pSet: YES`. API [#](https://lotus.filecoin.io/reference/basics/troubleshooting/#api) ------------------------------------------------------------------------- ### Types: params [#](https://lotus.filecoin.io/reference/basics/troubleshooting/#types-params) `params` must be an array. If there are no `params` you should still pass an empty array. ### Types: TipSet [#](https://lotus.filecoin.io/reference/basics/troubleshooting/#types-tipset) For methods such as `Filecoin.StateMinerPower`, where the method accepts the argument of the type `TipSet`, you can pass `null` to use the current chain head. curl -X POST \ -H "Content-Type: application/json" \ --data '{ "jsonrpc": "2.0", "method": "Filecoin.StateMinerPower", "params": ["t0101", null], "id": 3 }' \ 'http://127.0.0.1:1234/rpc/v0' ### Types: Sending a CID [#](https://lotus.filecoin.io/reference/basics/troubleshooting/#types-sending-a-cid) If you do not serialize the CID as a [JSON IPLD link](https://did-ipid.github.io/ipid-did-method/#txref) , you will receive an error. Here is an example of a broken CURL request: curl -X POST \ -H "Content-Type: application/json" \ --data '{ "jsonrpc": "2.0", "method":"Filecoin.ClientGetDealInfo", "params": ["bafyreiaxl446wlnu6t6dpq4ivrjf4gda4gvsoi4rr6mpxau7z25xvk5pl4"], "id": 0 }' \ 'http://127.0.0.1:1234/rpc/v0' To fix it, change the `params` property to: curl -X POST \ -H "Content-Type: application/json" \ --data '{ "jsonrpc": "2.0", "method":"Filecoin.ClientGetDealInfo", "params": [{"/": "bafyreiaxl446wlnu6t6dpq4ivrjf4gda4gvsoi4rr6mpxau7z25xvk5pl4"}], "id": 0 }' \ 'http://127.0.0.1:1234/rpc/v0' [Edit this page on GitHub](https://github.com/filecoin-project/lotus-docs/blob/main/content/en/reference/basics/troubleshooting.md) [← Overview](https://lotus.filecoin.io/reference/basics/overview/) [API access →](https://lotus.filecoin.io/reference/basics/api-access/) --- # Lotus CLI - Lotus Docs Lotus CLI ========= Reference documentation for the Lotus command-line interface. This documentation was automatically generated using Lotus latest release. lotus ===== NAME: lotus - Filecoin decentralized storage network client USAGE: lotus [global options] command [command options] VERSION: 1.35.1 COMMANDS: daemon Start a lotus daemon process backup Create node metadata backup config Manage node config version Print version help, h Shows a list of commands or help for one command BASIC: send Send funds between accounts wallet Manage wallet info Print node info msig Interact with a multisig wallet filplus Interact with the verified registry actor used by Filplus paych Manage payment channels DEVELOPER: auth Manage RPC permissions mpool Manage message pool state Interact with and query filecoin chain state chain Interact with filecoin blockchain log Manage logging wait-api Wait for lotus api to come online fetch-params Fetch proving parameters evm Commands related to the Filecoin EVM runtime index Commands related to managing the chainindex NETWORK: net Manage P2P Network sync Inspect or interact with the chain syncer f3 Manages Filecoin Fast Finality (F3) interactions STATUS: status Check node status GLOBAL OPTIONS: --color use color in display output (default: depends on output being a TTY) --interactive setting to false will disable interactive functionality of commands (default: false) --force-send if true, will ignore pre-send checks (default: false) --vv enables very verbose mode, useful for debugging the CLI (default: false) --help, -h show help --version, -v print the version lotus daemon ------------ NAME: lotus daemon - Start a lotus daemon process USAGE: lotus daemon [command options] COMMANDS: stop Stop a running lotus daemon help, h Shows a list of commands or help for one command OPTIONS: --api value (default: "1234") --genesis value genesis file to use for first node run, which may be a zstd compressed CAR or an uncompressed CAR file. --bootstrap (default: true) --import-chain value on first run, load chain from given file or url and validate --import-snapshot value import chain state from a given chain export file or url --remove-existing-chain remove existing chain and splitstore data on a snapshot-import (default: false) --halt-after-import halt the process after importing chain from file (default: false) --lite start lotus in lite mode (default: false) --pprof value specify name of file for writing cpu profile to --profile value specify type of node --manage-fdlimit manage open file limit (default: true) --config value specify path of config file to use --api-max-req-size value maximum API request size accepted by the JSON RPC server (default: 0) --restore value restore from backup file --restore-config value config file to use when restoring from backup --help, -h show help ### lotus daemon stop NAME: lotus daemon stop - Stop a running lotus daemon USAGE: lotus daemon stop [command options] OPTIONS: --help, -h show help lotus backup ------------ NAME: lotus backup - Create node metadata backup USAGE: lotus backup [command options] [backup file path] DESCRIPTION: The backup command writes a copy of node metadata under the specified path Online backups: For security reasons, the daemon must have LOTUS_BACKUP_BASE_PATH env var set to a path where backup files are supposed to be saved, and the path specified in this command must be within this base path OPTIONS: --offline create backup without the node running (default: false) --help, -h show help lotus config ------------ NAME: lotus config - Manage node config USAGE: lotus config [command options] COMMANDS: default Print default node config updated Print updated node config help, h Shows a list of commands or help for one command OPTIONS: --help, -h show help ### lotus config default NAME: lotus config default - Print default node config USAGE: lotus config default [command options] OPTIONS: --no-comment don't comment default values (default: false) --help, -h show help ### lotus config updated NAME: lotus config updated - Print updated node config USAGE: lotus config updated [command options] OPTIONS: --no-comment don't comment default values (default: false) --help, -h show help lotus version ------------- NAME: lotus version - Print version USAGE: lotus version [command options] OPTIONS: --help, -h show help lotus send ---------- NAME: lotus send - Send funds between accounts USAGE: lotus send [command options] [targetAddress] [amount] CATEGORY: BASIC OPTIONS: --from value optionally specify the account to send funds from --from-eth-addr value optionally specify the eth addr to send funds from --gas-premium value specify gas price to use in AttoFIL (default: "0") --gas-feecap value specify gas fee cap to use in AttoFIL (default: "0") --gas-limit value specify gas limit (default: 0) --nonce value specify the nonce to use (default: 0) --method value specify method to invoke (default: 0) --params-json value specify invocation parameters in json --params-hex value specify invocation parameters in hex --force Deprecated: use global 'force-send' (default: false) --csv value send multiple transactions from a CSV file (format: Recipient,FIL,Method,Params) --help, -h show help lotus wallet ------------ NAME: lotus wallet - Manage wallet USAGE: lotus wallet [command options] CATEGORY: BASIC COMMANDS: new Generate a new key of the given type list List wallet address balance Get account balance export export keys import import keys default Get default wallet address set-default Set default wallet address sign sign a message verify verify the signature of a message delete Soft delete an address from the wallet - hard deletion needed for permanent removal market Interact with market balances help, h Shows a list of commands or help for one command OPTIONS: --help, -h show help ### lotus wallet new NAME: lotus wallet new - Generate a new key of the given type USAGE: lotus wallet new [command options] [bls|secp256k1|delegated (default secp256k1)] OPTIONS: --help, -h show help ### lotus wallet list NAME: lotus wallet list - List wallet address USAGE: lotus wallet list [command options] OPTIONS: --addr-only, -a Only print addresses (default: false) --id, -i Output ID addresses (default: false) --market, -m Output market balances (default: false) --help, -h show help ### lotus wallet balance NAME: lotus wallet balance - Get account balance USAGE: lotus wallet balance [command options] [address] OPTIONS: --help, -h show help ### lotus wallet export NAME: lotus wallet export - export keys USAGE: lotus wallet export [command options] [address] OPTIONS: --help, -h show help ### lotus wallet import NAME: lotus wallet import - import keys USAGE: lotus wallet import [command options] [ (optional, will read from stdin if omitted)] OPTIONS: --format value specify input format for key (default: "hex-lotus") --as-default import the given key as your new default key (default: false) --help, -h show help ### lotus wallet default NAME: lotus wallet default - Get default wallet address USAGE: lotus wallet default [command options] OPTIONS: --help, -h show help ### lotus wallet set-default NAME: lotus wallet set-default - Set default wallet address USAGE: lotus wallet set-default [command options] [address] OPTIONS: --help, -h show help ### lotus wallet sign NAME: lotus wallet sign - sign a message USAGE: lotus wallet sign [command options] OPTIONS: --raw sign raw bytes without FRC-0102 envelope (not recommended) (default: false) --help, -h show help ### lotus wallet verify NAME: lotus wallet verify - verify the signature of a message USAGE: lotus wallet verify [command options] OPTIONS: --raw verify raw bytes without FRC-0102 envelope (not recommended) (default: false) --help, -h show help ### lotus wallet delete NAME: lotus wallet delete - Soft delete an address from the wallet - hard deletion needed for permanent removal USAGE: lotus wallet delete [command options]
OPTIONS: --help, -h show help ### lotus wallet market NAME: lotus wallet market - Interact with market balances USAGE: lotus wallet market [command options] COMMANDS: withdraw Withdraw funds from the Storage Market Actor add Add funds to the Storage Market Actor help, h Shows a list of commands or help for one command OPTIONS: --help, -h show help #### lotus wallet market withdraw NAME: lotus wallet market withdraw - Withdraw funds from the Storage Market Actor USAGE: lotus wallet market withdraw [command options] [amount (FIL) optional, otherwise will withdraw max available] OPTIONS: --wallet value, -w value Specify address to withdraw funds to, otherwise it will use the default wallet address --address value, -a value Market address to withdraw from (account or miner actor address, defaults to --wallet address) --confidence value number of block confirmations to wait for (default: 5) --help, -h show help #### lotus wallet market add NAME: lotus wallet market add - Add funds to the Storage Market Actor USAGE: lotus wallet market add [command options] OPTIONS: --from value, -f value Specify address to move funds from, otherwise it will use the default wallet address --address value, -a value Market address to move funds to (account or miner actor address, defaults to --from address) --help, -h show help lotus info ---------- NAME: lotus info - Print node info USAGE: lotus info [command options] CATEGORY: BASIC OPTIONS: --help, -h show help lotus msig ---------- NAME: lotus msig - Interact with a multisig wallet USAGE: lotus msig [command options] CATEGORY: BASIC COMMANDS: create Create a new multisig wallet inspect Inspect a multisig wallet propose Propose a multisig transaction propose-remove Propose to remove a signer approve Approve a multisig message cancel Cancel a multisig message add-propose Propose to add a signer add-approve Approve a message to add a signer add-cancel Cancel a message to add a signer swap-propose Propose to swap signers swap-approve Approve a message to swap signers swap-cancel Cancel a message to swap signers lock-propose Propose to lock up some balance lock-approve Approve a message to lock up some balance lock-cancel Cancel a message to lock up some balance vested Gets the amount vested in an msig between two epochs propose-threshold Propose setting a different signing threshold on the account help, h Shows a list of commands or help for one command OPTIONS: --confidence value number of block confirmations to wait for (default: 5) --help, -h show help ### lotus msig create NAME: lotus msig create - Create a new multisig wallet USAGE: lotus msig create [command options] [address1 address2 ...] OPTIONS: --required value number of required approvals (uses number of signers provided if omitted) (default: 0) --value value initial funds to give to multisig (default: "0") --duration value length of the period over which funds unlock (default: "0") --from value account to send the create message from --help, -h show help ### lotus msig inspect NAME: lotus msig inspect - Inspect a multisig wallet USAGE: lotus msig inspect [command options] [address] OPTIONS: --vesting Include vesting details (default: false) --decode-params Decode parameters of transaction proposals (default: false) --help, -h show help ### lotus msig propose NAME: lotus msig propose - Propose a multisig transaction USAGE: lotus msig propose [command options] [multisigAddress destinationAddress value (optional)] OPTIONS: --from value account to send the propose message from --help, -h show help ### lotus msig propose-remove NAME: lotus msig propose-remove - Propose to remove a signer USAGE: lotus msig propose-remove [command options] [multisigAddress signer] OPTIONS: --decrease-threshold whether the number of required signers should be decreased (default: false) --from value account to send the propose message from --help, -h show help ### lotus msig approve NAME: lotus msig approve - Approve a multisig message USAGE: lotus msig approve [command options] [proposerAddress destination value [methodId methodParams]] OPTIONS: --from value account to send the approve message from --help, -h show help ### lotus msig cancel NAME: lotus msig cancel - Cancel a multisig message USAGE: lotus msig cancel [command options] [destination value [methodId methodParams]] OPTIONS: --from value account to send the cancel message from --help, -h show help ### lotus msig add-propose NAME: lotus msig add-propose - Propose to add a signer USAGE: lotus msig add-propose [command options] [multisigAddress signer] OPTIONS: --increase-threshold whether the number of required signers should be increased (default: false) --from value account to send the propose message from --help, -h show help ### lotus msig add-approve NAME: lotus msig add-approve - Approve a message to add a signer USAGE: lotus msig add-approve [command options] [multisigAddress proposerAddress txId newAddress increaseThreshold] OPTIONS: --from value account to send the approve message from --help, -h show help ### lotus msig add-cancel NAME: lotus msig add-cancel - Cancel a message to add a signer USAGE: lotus msig add-cancel [command options] [multisigAddress txId newAddress increaseThreshold] OPTIONS: --from value account to send the approve message from --help, -h show help ### lotus msig swap-propose NAME: lotus msig swap-propose - Propose to swap signers USAGE: lotus msig swap-propose [command options] [multisigAddress oldAddress newAddress] OPTIONS: --from value account to send the approve message from --help, -h show help ### lotus msig swap-approve NAME: lotus msig swap-approve - Approve a message to swap signers USAGE: lotus msig swap-approve [command options] [multisigAddress proposerAddress txId oldAddress newAddress] OPTIONS: --from value account to send the approve message from --help, -h show help ### lotus msig swap-cancel NAME: lotus msig swap-cancel - Cancel a message to swap signers USAGE: lotus msig swap-cancel [command options] [multisigAddress txId oldAddress newAddress] OPTIONS: --from value account to send the approve message from --help, -h show help ### lotus msig lock-propose NAME: lotus msig lock-propose - Propose to lock up some balance USAGE: lotus msig lock-propose [command options] [multisigAddress startEpoch unlockDuration amount] OPTIONS: --from value account to send the propose message from --help, -h show help ### lotus msig lock-approve NAME: lotus msig lock-approve - Approve a message to lock up some balance USAGE: lotus msig lock-approve [command options] [multisigAddress proposerAddress txId startEpoch unlockDuration amount] OPTIONS: --from value account to send the approve message from --help, -h show help ### lotus msig lock-cancel NAME: lotus msig lock-cancel - Cancel a message to lock up some balance USAGE: lotus msig lock-cancel [command options] [multisigAddress txId startEpoch unlockDuration amount] OPTIONS: --from value account to send the cancel message from --help, -h show help ### lotus msig vested NAME: lotus msig vested - Gets the amount vested in an msig between two epochs USAGE: lotus msig vested [command options] [multisigAddress] OPTIONS: --start-epoch value start epoch to measure vesting from (default: 0) --end-epoch value end epoch to stop measure vesting at (default: -1) --help, -h show help ### lotus msig propose-threshold NAME: lotus msig propose-threshold - Propose setting a different signing threshold on the account USAGE: lotus msig propose-threshold [command options] OPTIONS: --from value account to send the proposal from --help, -h show help lotus filplus ------------- NAME: lotus filplus - Interact with the verified registry actor used by Filplus USAGE: lotus filplus [command options] CATEGORY: BASIC COMMANDS: grant-datacap give allowance to the specified verified client address list-notaries list all notaries list-clients list all verified clients check-client-datacap check verified client remaining bytes check-notary-datacap check a notary's remaining bytes sign-remove-data-cap-proposal allows a notary to sign a Remove Data Cap Proposal list-allocations List allocations available in verified registry actor or made by a client if specified list-claims List claims available in verified registry actor or made by provider if specified remove-expired-allocations remove expired allocations (if no allocations are specified all eligible allocations are removed) remove-expired-claims remove expired claims (if no claims are specified all eligible claims are removed) extend-claim extends claim expiration (TermMax) help, h Shows a list of commands or help for one command OPTIONS: --help, -h show help ### lotus filplus grant-datacap NAME: lotus filplus grant-datacap - give allowance to the specified verified client address USAGE: lotus filplus grant-datacap [command options] [clientAddress datacap] OPTIONS: --from value specify your notary address to send the message from --help, -h show help ### lotus filplus list-notaries NAME: lotus filplus list-notaries - list all notaries USAGE: lotus filplus list-notaries [command options] OPTIONS: --help, -h show help ### lotus filplus list-clients NAME: lotus filplus list-clients - list all verified clients USAGE: lotus filplus list-clients [command options] OPTIONS: --help, -h show help ### lotus filplus check-client-datacap NAME: lotus filplus check-client-datacap - check verified client remaining bytes USAGE: lotus filplus check-client-datacap [command options] clientAddress OPTIONS: --help, -h show help ### lotus filplus check-notary-datacap NAME: lotus filplus check-notary-datacap - check a notary's remaining bytes USAGE: lotus filplus check-notary-datacap [command options] notaryAddress OPTIONS: --help, -h show help ### lotus filplus sign-remove-data-cap-proposal NAME: lotus filplus sign-remove-data-cap-proposal - allows a notary to sign a Remove Data Cap Proposal USAGE: lotus filplus sign-remove-data-cap-proposal [command options] [verifierAddress clientAddress allowanceToRemove] OPTIONS: --id value specify the RemoveDataCapProposal ID (will look up on chain if unspecified) (default: 0) --help, -h show help ### lotus filplus list-allocations NAME: lotus filplus list-allocations - List allocations available in verified registry actor or made by a client if specified USAGE: lotus filplus list-allocations [command options] clientAddress OPTIONS: --expired list only expired allocations (default: false) --json output results in json format (default: false) --help, -h show help ### lotus filplus list-claims NAME: lotus filplus list-claims - List claims available in verified registry actor or made by provider if specified USAGE: lotus filplus list-claims [command options] providerAddress OPTIONS: --expired list only expired claims (default: false) --json output results in json format (default: false) --help, -h show help ### lotus filplus remove-expired-allocations NAME: lotus filplus remove-expired-allocations - remove expired allocations (if no allocations are specified all eligible allocations are removed) USAGE: lotus filplus remove-expired-allocations [command options] clientAddress Optional[...allocationId] OPTIONS: --from value optionally specify the account to send the message from --help, -h show help ### lotus filplus remove-expired-claims NAME: lotus filplus remove-expired-claims - remove expired claims (if no claims are specified all eligible claims are removed) USAGE: lotus filplus remove-expired-claims [command options] providerAddress Optional[...claimId] OPTIONS: --from value optionally specify the account to send the message from --help, -h show help ### lotus filplus extend-claim NAME: lotus filplus extend-claim - extends claim expiration (TermMax) USAGE: Extends claim expiration (TermMax). If the client is original client then claim can be extended to maximum 5 years and no Datacap is required. If the client id different then claim can be extended up to maximum 5 years from now and Datacap is required. OPTIONS: --term-max value, --tmax value The maximum period for which a provider can earn quality-adjusted power for the piece (epochs). Default is 5 years. (default: 5256000) --client value the client address that will used to send the message --all automatically extend TermMax of all claims for specified miner[s] to --term-max (default: 5 years from claim start epoch) (default: false) --miner value, -m value, --provider value, -p value [ --miner value, -m value, --provider value, -p value ] storage provider address[es] --assume-yes, -y, --yes automatic yes to prompts; assume 'yes' as answer to all prompts and run non-interactively (default: false) --confidence value number of block confirmations to wait for (default: 5) --batch-size value number of extend requests per batch. If set incorrectly, this will lead to out of gas error (default: 100) --help, -h show help lotus paych ----------- NAME: lotus paych - Manage payment channels USAGE: lotus paych [command options] CATEGORY: BASIC COMMANDS: add-funds Add funds to the payment channel between fromAddress and toAddress. Creates the payment channel if it doesn't already exist. list List all locally registered payment channels voucher Interact with payment channel vouchers settle Settle a payment channel status Show the status of an outbound payment channel status-by-from-to Show the status of an active outbound payment channel by from/to addresses collect Collect funds for a payment channel help, h Shows a list of commands or help for one command OPTIONS: --help, -h show help ### lotus paych add-funds NAME: lotus paych add-funds - Add funds to the payment channel between fromAddress and toAddress. Creates the payment channel if it doesn't already exist. USAGE: lotus paych add-funds [command options] [fromAddress toAddress amount] OPTIONS: --reserve mark funds as reserved (default: false) --help, -h show help ### lotus paych list NAME: lotus paych list - List all locally registered payment channels USAGE: lotus paych list [command options] OPTIONS: --help, -h show help ### lotus paych voucher NAME: lotus paych voucher - Interact with payment channel vouchers USAGE: lotus paych voucher [command options] COMMANDS: create Create a signed payment channel voucher check Check validity of payment channel voucher add Add payment channel voucher to local datastore list List stored vouchers for a given payment channel best-spendable Print vouchers with highest value that is currently spendable for each lane submit Submit voucher to chain to update payment channel state help, h Shows a list of commands or help for one command OPTIONS: --help, -h show help #### lotus paych voucher create NAME: lotus paych voucher create - Create a signed payment channel voucher USAGE: lotus paych voucher create [command options] [channelAddress amount] OPTIONS: --lane value specify payment channel lane to use (default: 0) --help, -h show help #### lotus paych voucher check NAME: lotus paych voucher check - Check validity of payment channel voucher USAGE: lotus paych voucher check [command options] [channelAddress voucher] OPTIONS: --help, -h show help #### lotus paych voucher add NAME: lotus paych voucher add - Add payment channel voucher to local datastore USAGE: lotus paych voucher add [command options] [channelAddress voucher] OPTIONS: --help, -h show help #### lotus paych voucher list NAME: lotus paych voucher list - List stored vouchers for a given payment channel USAGE: lotus paych voucher list [command options] [channelAddress] OPTIONS: --export Print voucher as serialized string (default: false) --help, -h show help #### lotus paych voucher best-spendable NAME: lotus paych voucher best-spendable - Print vouchers with highest value that is currently spendable for each lane USAGE: lotus paych voucher best-spendable [command options] [channelAddress] OPTIONS: --export Print voucher as serialized string (default: false) --help, -h show help #### lotus paych voucher submit NAME: lotus paych voucher submit - Submit voucher to chain to update payment channel state USAGE: lotus paych voucher submit [command options] [channelAddress voucher] OPTIONS: --help, -h show help ### lotus paych settle NAME: lotus paych settle - Settle a payment channel USAGE: lotus paych settle [command options] [channelAddress] OPTIONS: --help, -h show help ### lotus paych status NAME: lotus paych status - Show the status of an outbound payment channel USAGE: lotus paych status [command options] [channelAddress] OPTIONS: --help, -h show help ### lotus paych status-by-from-to NAME: lotus paych status-by-from-to - Show the status of an active outbound payment channel by from/to addresses USAGE: lotus paych status-by-from-to [command options] [fromAddress toAddress] OPTIONS: --help, -h show help ### lotus paych collect NAME: lotus paych collect - Collect funds for a payment channel USAGE: lotus paych collect [command options] [channelAddress] OPTIONS: --help, -h show help lotus auth ---------- NAME: lotus auth - Manage RPC permissions USAGE: lotus auth [command options] CATEGORY: DEVELOPER COMMANDS: create-token Create token api-info Get token with API info required to connect to this node help, h Shows a list of commands or help for one command OPTIONS: --help, -h show help ### lotus auth create-token NAME: lotus auth create-token - Create token USAGE: lotus auth create-token [command options] OPTIONS: --perm value permission to assign to the token, one of: read, write, sign, admin --help, -h show help ### lotus auth api-info NAME: lotus auth api-info - Get token with API info required to connect to this node USAGE: lotus auth api-info [command options] OPTIONS: --perm value permission to assign to the token, one of: read, write, sign, admin --help, -h show help lotus mpool ----------- NAME: lotus mpool - Manage message pool USAGE: lotus mpool [command options] CATEGORY: DEVELOPER COMMANDS: pending Get pending messages sub Subscribe to mpool changes stat print mempool stats replace replace a message in the mempool find find a message in the mempool config get or set current mpool configuration gas-perf Check gas performance of messages in mempool manage help, h Shows a list of commands or help for one command OPTIONS: --help, -h show help ### lotus mpool pending NAME: lotus mpool pending - Get pending messages USAGE: lotus mpool pending [command options] OPTIONS: --local print pending messages for addresses in local wallet only (default: false) --cids only print cids of messages in output (default: false) --to value return messages to a given address --from value return messages from a given address --help, -h show help ### lotus mpool sub NAME: lotus mpool sub - Subscribe to mpool changes USAGE: lotus mpool sub [command options] OPTIONS: --help, -h show help ### lotus mpool stat NAME: lotus mpool stat - print mempool stats USAGE: lotus mpool stat [command options] OPTIONS: --local print stats for addresses in local wallet only (default: false) --basefee-lookback value number of blocks to look back for minimum basefee (default: 60) --help, -h show help ### lotus mpool replace NAME: lotus mpool replace - replace a message in the mempool USAGE: lotus mpool replace [command options] | OPTIONS: --gas-feecap value gas feecap for new message (burn and pay to miner, attoFIL/GasUnit) --gas-premium value gas price for new message (pay to miner, attoFIL/GasUnit) --gas-limit value gas limit for new message (GasUnit) (default: 0) --auto automatically reprice the specified message (default: false) --fee-limit max-fee Spend up to X FIL for this message in units of FIL. Previously when flag was max-fee units were in attoFIL. Applicable for auto mode --help, -h show help ### lotus mpool find NAME: lotus mpool find - find a message in the mempool USAGE: lotus mpool find [command options] OPTIONS: --from value search for messages with given 'from' address --to value search for messages with given 'to' address --method value search for messages with given method (default: 0) --help, -h show help ### lotus mpool config NAME: lotus mpool config - get or set current mpool configuration USAGE: lotus mpool config [command options] [new-config] OPTIONS: --help, -h show help ### lotus mpool gas-perf NAME: lotus mpool gas-perf - Check gas performance of messages in mempool USAGE: lotus mpool gas-perf [command options] OPTIONS: --all print gas performance for all mempool messages (default only prints for local) (default: false) --help, -h show help ### lotus mpool manage NAME: lotus mpool manage USAGE: lotus mpool manage [command options] OPTIONS: --help, -h show help lotus state ----------- NAME: lotus state - Interact with and query filecoin chain state USAGE: lotus state [command options] CATEGORY: DEVELOPER COMMANDS: power Query network or miner power sectors Query the sector set of a miner active-sectors Query the active sector set of a miner list-actors list all actors in the network list-miners list all miners in the network circulating-supply Get the exact current circulating supply of Filecoin sector, sector-info Get miner sector info get-actor Print actor information lookup Find corresponding ID address replay Replay a particular message sector-size Look up miners sector size read-state View a json representation of an actors state list-messages list messages on chain matching given criteria compute-state Perform state computations call Invoke a method on an actor locally get-deal View on-chain deal info wait-msg, wait-message Wait for a message to appear on chain search-msg, search-message Search to see whether a message has appeared on chain miner-info Retrieve miner information market Inspect the storage market actor exec-trace Get the execution trace of a given message network-version Returns the network version miner-proving-deadline Retrieve information about a given miner's proving deadline actor-cids Returns the built-in actor bundle manifest ID & system actor cids help, h Shows a list of commands or help for one command OPTIONS: --tipset value specify tipset to call method on (pass comma separated array of cids) --help, -h show help ### lotus state power NAME: lotus state power - Query network or miner power USAGE: lotus state power [command options] [ (optional)] OPTIONS: --help, -h show help ### lotus state sectors NAME: lotus state sectors - Query the sector set of a miner USAGE: lotus state sectors [command options] [minerAddress] OPTIONS: --show-partitions show sector deadlines and partitions (default: false) --help, -h show help ### lotus state active-sectors NAME: lotus state active-sectors - Query the active sector set of a miner USAGE: lotus state active-sectors [command options] [minerAddress] OPTIONS: --show-partitions show sector deadlines and partitions (default: false) --help, -h show help ### lotus state list-actors NAME: lotus state list-actors - list all actors in the network USAGE: lotus state list-actors [command options] OPTIONS: --help, -h show help ### lotus state list-miners NAME: lotus state list-miners - list all miners in the network USAGE: lotus state list-miners [command options] OPTIONS: --sort-by value criteria to sort miners by (none, num-deals) --help, -h show help ### lotus state circulating-supply NAME: lotus state circulating-supply - Get the exact current circulating supply of Filecoin USAGE: lotus state circulating-supply [command options] OPTIONS: --vm-supply calculates the approximation of the circulating supply used internally by the VM (instead of the exact amount) (default: false) --help, -h show help ### lotus state sector NAME: lotus state sector - Get miner sector info USAGE: lotus state sector [command options] [minerAddress] [sectorNumber] OPTIONS: --help, -h show help ### lotus state get-actor NAME: lotus state get-actor - Print actor information USAGE: lotus state get-actor [command options] [actorAddress] OPTIONS: --help, -h show help ### lotus state lookup NAME: lotus state lookup - Find corresponding ID address USAGE: lotus state lookup [command options] [address] OPTIONS: --reverse, -r Perform reverse lookup (default: false) --help, -h show help ### lotus state replay NAME: lotus state replay - Replay a particular message USAGE: lotus state replay [command options] OPTIONS: --show-trace print out full execution trace for given message (default: false) --detailed-gas print out detailed gas costs for given message (default: false) --help, -h show help ### lotus state sector-size NAME: lotus state sector-size - Look up miners sector size USAGE: lotus state sector-size [command options] [minerAddress] OPTIONS: --help, -h show help ### lotus state read-state NAME: lotus state read-state - View a json representation of an actors state USAGE: lotus state read-state [command options] [actorAddress] OPTIONS: --help, -h show help ### lotus state list-messages NAME: lotus state list-messages - list messages on chain matching given criteria USAGE: lotus state list-messages [command options] OPTIONS: --to value return messages to a given address --from value return messages from a given address --toheight value don't look before given block height (default: 0) --cids print message CIDs instead of messages (default: false) --order-by-nonce order messages by nonce (only applies when filtering by 'from' address) (default: false) --help, -h show help ### lotus state compute-state NAME: lotus state compute-state - Perform state computations USAGE: lotus state compute-state [command options] OPTIONS: --vm-height value set the height that the vm will see (default: 0) --apply-mpool-messages apply messages from the mempool to the computed state (default: false) --show-trace print out full execution trace for given tipset (default: false) --html generate html report (default: false) --json generate json output (default: false) --compute-state-output value a json file containing pre-existing compute-state output, to generate html reports without rerunning state changes --no-timing don't show timing information in html traces (default: false) --help, -h show help ### lotus state call NAME: lotus state call - Invoke a method on an actor locally USAGE: lotus state call [command options] [toAddress methodId params (optional)] OPTIONS: --from value (default: "f00") --value value specify value field for invocation (default: "0") --ret value specify how to parse output (raw, decoded, base64, hex) (default: "decoded") --encoding value specify params encoding to parse (base64, hex) (default: "base64") --help, -h show help ### lotus state get-deal NAME: lotus state get-deal - View on-chain deal info USAGE: lotus state get-deal [command options] [dealId] OPTIONS: --help, -h show help ### lotus state wait-msg NAME: lotus state wait-msg - Wait for a message to appear on chain USAGE: lotus state wait-msg [command options] [messageCid] OPTIONS: --timeout value (default: "10m") --help, -h show help ### lotus state search-msg NAME: lotus state search-msg - Search to see whether a message has appeared on chain USAGE: lotus state search-msg [command options] [messageCid] OPTIONS: --help, -h show help ### lotus state miner-info NAME: lotus state miner-info - Retrieve miner information USAGE: lotus state miner-info [command options] [minerAddress] OPTIONS: --help, -h show help ### lotus state market NAME: lotus state market - Inspect the storage market actor USAGE: lotus state market [command options] COMMANDS: balance Get the market balance (locked and escrowed) for a given account proposal-pending check if a given proposal CID is pending in the market actor help, h Shows a list of commands or help for one command OPTIONS: --help, -h show help #### lotus state market balance NAME: lotus state market balance - Get the market balance (locked and escrowed) for a given account USAGE: lotus state market balance [command options] [address] OPTIONS: --help, -h show help #### lotus state market proposal-pending NAME: lotus state market proposal-pending - check if a given proposal CID is pending in the market actor USAGE: lotus state market proposal-pending [command options] [proposal CID] OPTIONS: --help, -h show help ### lotus state exec-trace NAME: lotus state exec-trace - Get the execution trace of a given message USAGE: lotus state exec-trace [command options] OPTIONS: --help, -h show help ### lotus state network-version NAME: lotus state network-version - Returns the network version USAGE: lotus state network-version [command options] OPTIONS: --help, -h show help ### lotus state miner-proving-deadline NAME: lotus state miner-proving-deadline - Retrieve information about a given miner's proving deadline USAGE: lotus state miner-proving-deadline [command options] [minerAddress] OPTIONS: --help, -h show help ### lotus state actor-cids NAME: lotus state actor-cids - Returns the built-in actor bundle manifest ID & system actor cids USAGE: lotus state actor-cids [command options] OPTIONS: --network-version value specify network version (default: 0) --help, -h show help lotus chain ----------- NAME: lotus chain - Interact with filecoin blockchain USAGE: lotus chain [command options] CATEGORY: DEVELOPER COMMANDS: head Print chain head get-block, getblock Get a block and print its details read-obj Read the raw bytes of an object delete-obj Delete an object from the chain blockstore stat-obj Collect size and ipld link counts for objs getmessage, get-message, get-msg Get and print a message by its cid sethead, set-head manually set the local nodes head tipset (Caution: normally only used for recovery) list, love View a segment of the chain get Get chain DAG node by path bisect bisect chain for an event export export chain to a car file export-range export chain to a car file slash-consensus Report consensus fault gas-price Estimate gas prices inspect-usage Inspect block space usage of a given tipset decode decode various types encode encode various types disputer interact with the window post disputer prune splitstore gc help, h Shows a list of commands or help for one command OPTIONS: --help, -h show help ### lotus chain head NAME: lotus chain head - Print chain head USAGE: lotus chain head [command options] OPTIONS: --height print just the epoch number of the chain head (default: false) --help, -h show help ### lotus chain get-block NAME: lotus chain get-block - Get a block and print its details USAGE: lotus chain get-block [command options] [blockCid] OPTIONS: --raw print just the raw block header (default: false) --help, -h show help ### lotus chain read-obj NAME: lotus chain read-obj - Read the raw bytes of an object USAGE: lotus chain read-obj [command options] [objectCid] OPTIONS: --help, -h show help ### lotus chain delete-obj NAME: lotus chain delete-obj - Delete an object from the chain blockstore USAGE: lotus chain delete-obj [command options] [objectCid] DESCRIPTION: WARNING: Removing wrong objects from the chain blockstore may lead to sync issues OPTIONS: --really-do-it (default: false) --help, -h show help ### lotus chain stat-obj NAME: lotus chain stat-obj - Collect size and ipld link counts for objs USAGE: lotus chain stat-obj [command options] [cid] DESCRIPTION: Collect object size and ipld link count for an object. When a base is provided it will be walked first, and all links visited will be ignored when the passed in object is walked. OPTIONS: --base value ignore links found in this obj --help, -h show help ### lotus chain getmessage NAME: lotus chain getmessage - Get and print a message by its cid USAGE: lotus chain getmessage [command options] [messageCid] OPTIONS: --help, -h show help ### lotus chain sethead NAME: lotus chain sethead - manually set the local nodes head tipset (Caution: normally only used for recovery) USAGE: lotus chain sethead [command options] [tipsetkey] OPTIONS: --genesis reset head to genesis (default: false) --epoch value reset head to given epoch (default: 0) --help, -h show help ### lotus chain list NAME: lotus chain list - View a segment of the chain USAGE: lotus chain list [command options] OPTIONS: --epoch value, --height value (default: current head) --count value (default: 30) --format value specify the format to print out tipsets using placeholders: ,