From fe52c475703ad417178667477c003e6cd5d930bc Mon Sep 17 00:00:00 2001 From: Hector Sanjuan Date: Mon, 31 Aug 2020 17:11:01 +0200 Subject: [PATCH 01/13] Docs review and re-organization This: * Re-organizes the docs into sections that align with what docs.filecoin.io becoming: * An installation section * A "getting started" section (lotus client focused) * A "storing" section (lotus client focused) * A "mining" section (miner focused) * A "build" section (developer focused) * An legacy "architecture" section is left in the last place. A few high-value documentation pages have been reviewed and updated with the latest recommendations: * Installation section and lotus setup * Miner setup * etc. ... Other pages have been correctly merged into the new relevant sections. Some pages have not been touched. The filesystem layout of the documentation has been changed into folders corresponding to the sections (as requested by @cw). Some pages that were not linked at all and/or where hidden, have been moved to "unclassified". This should make the porting of the Lotus documentation to docs.filecoin.io much easier, while ensuring it is more up to date than it was before. For the moment, this breaks most links as link-aliasing is not supported in lotus-docs. --- Makefile | 2 +- documentation/en/.library.json | 353 +++++++++--------- documentation/en/about.md | 14 + documentation/en/api-scripting-support.md | 25 -- documentation/en/api.md | 85 ----- .../en/{ => architecture}/architecture.md | 2 +- documentation/en/{ => architecture}/mpool.md | 0 .../en/{ => building}/api-methods.md | 0 .../en/{ => building}/api-troubleshooting.md | 0 documentation/en/building/api.md | 38 ++ documentation/en/building/building.md | 5 + .../jaeger-tracing.md} | 0 .../local-devnet.md} | 0 .../en/{ => building}/payment-channels.md | 0 documentation/en/building/remote-api.md | 69 ++++ documentation/en/cli.md | 108 ------ documentation/en/dev-tools.md | 3 - documentation/en/environment-vars.md | 65 ---- documentation/en/faqs.md | 36 +- documentation/en/getting-started.md | 23 -- .../en/getting-started/getting-started.md | 3 + .../setup-troubleshooting.md | 13 +- documentation/en/getting-started/setup.md | 169 +++++++++ documentation/en/getting-started/wallet.md | 58 +++ documentation/en/hardware-mining.md | 54 --- documentation/en/hardware.md | 7 - documentation/en/install-lotus-arch.md | 51 --- documentation/en/install-lotus-fedora.md | 54 --- documentation/en/install-lotus-ubuntu.md | 54 --- documentation/en/install-systemd-services.md | 145 ------- .../en/installation/install-linux.md | 129 +++++++ .../install-macos.md} | 2 +- documentation/en/installation/installation.md | 39 ++ documentation/en/installation/update.md | 72 ++++ documentation/en/join-testnet.md | 93 ----- documentation/en/miner-deals.md | 39 -- documentation/en/mining.md | 149 -------- documentation/en/mining/gpus.md | 17 + .../lotus-seal-worker.md} | 58 +-- documentation/en/mining/managing-deals.md | 19 + documentation/en/mining/miner-setup.md | 241 ++++++++++++ .../en/{ => mining}/mining-troubleshooting.md | 9 +- documentation/en/mining/mining.md | 8 + documentation/en/retrieving-data.md | 27 -- documentation/en/setting-a-static-port.md | 54 --- .../adding-from-ipfs.md} | 6 +- documentation/en/store/making-deals.md | 71 ++++ documentation/en/store/retrieve.md | 27 ++ .../storage-troubleshooting.md} | 13 +- documentation/en/store/store.md | 11 + documentation/en/storing-data.md | 62 --- .../WIP-arch-complementary-notes.md | 0 .../en/{ => unclassified}/block-validation.md | 0 .../en/{dev => unclassified}/create-miner.md | 0 .../{ => unclassified}/dev-tools-pond-ui.md | 0 .../en/{ => unclassified}/sealing-procs.md | 0 documentation/en/updating-lotus.md | 14 - 57 files changed, 1239 insertions(+), 1357 deletions(-) create mode 100644 documentation/en/about.md delete mode 100644 documentation/en/api-scripting-support.md delete mode 100644 documentation/en/api.md rename documentation/en/{ => architecture}/architecture.md (99%) rename documentation/en/{ => architecture}/mpool.md (100%) rename documentation/en/{ => building}/api-methods.md (100%) rename documentation/en/{ => building}/api-troubleshooting.md (100%) create mode 100644 documentation/en/building/api.md create mode 100644 documentation/en/building/building.md rename documentation/en/{dev-tools-jaeger-tracing.md => building/jaeger-tracing.md} (100%) rename documentation/en/{local-dev-net.md => building/local-devnet.md} (100%) rename documentation/en/{ => building}/payment-channels.md (100%) create mode 100644 documentation/en/building/remote-api.md delete mode 100644 documentation/en/cli.md delete mode 100644 documentation/en/dev-tools.md delete mode 100644 documentation/en/environment-vars.md delete mode 100644 documentation/en/getting-started.md create mode 100644 documentation/en/getting-started/getting-started.md rename documentation/en/{ => getting-started}/setup-troubleshooting.md (60%) create mode 100644 documentation/en/getting-started/setup.md create mode 100644 documentation/en/getting-started/wallet.md delete mode 100644 documentation/en/hardware-mining.md delete mode 100644 documentation/en/hardware.md delete mode 100644 documentation/en/install-lotus-arch.md delete mode 100644 documentation/en/install-lotus-fedora.md delete mode 100644 documentation/en/install-lotus-ubuntu.md delete mode 100644 documentation/en/install-systemd-services.md create mode 100644 documentation/en/installation/install-linux.md rename documentation/en/{install-lotus-macos.md => installation/install-macos.md} (85%) create mode 100644 documentation/en/installation/installation.md create mode 100644 documentation/en/installation/update.md delete mode 100644 documentation/en/join-testnet.md delete mode 100644 documentation/en/miner-deals.md delete mode 100644 documentation/en/mining.md create mode 100644 documentation/en/mining/gpus.md rename documentation/en/{mining-lotus-worker.md => mining/lotus-seal-worker.md} (60%) create mode 100644 documentation/en/mining/managing-deals.md create mode 100644 documentation/en/mining/miner-setup.md rename documentation/en/{ => mining}/mining-troubleshooting.md (90%) create mode 100644 documentation/en/mining/mining.md delete mode 100644 documentation/en/retrieving-data.md delete mode 100644 documentation/en/setting-a-static-port.md rename documentation/en/{storing-ipfs-integration.md => store/adding-from-ipfs.md} (79%) create mode 100644 documentation/en/store/making-deals.md create mode 100644 documentation/en/store/retrieve.md rename documentation/en/{storing-data-troubleshooting.md => store/storage-troubleshooting.md} (51%) create mode 100644 documentation/en/store/store.md delete mode 100644 documentation/en/storing-data.md rename documentation/en/{dev => unclassified}/WIP-arch-complementary-notes.md (100%) rename documentation/en/{ => unclassified}/block-validation.md (100%) rename documentation/en/{dev => unclassified}/create-miner.md (100%) rename documentation/en/{ => unclassified}/dev-tools-pond-ui.md (100%) rename documentation/en/{ => unclassified}/sealing-procs.md (100%) delete mode 100644 documentation/en/updating-lotus.md diff --git a/Makefile b/Makefile index 4f6ece417..2e91cfa65 100644 --- a/Makefile +++ b/Makefile @@ -280,7 +280,7 @@ method-gen: gen: type-gen method-gen docsgen: - go run ./api/docgen > documentation/en/api-methods.md + go run ./api/docgen > documentation/en/building/api-methods.md print-%: @echo $*=$($*) diff --git a/documentation/en/.library.json b/documentation/en/.library.json index 3fab0df9b..87c7353c1 100644 --- a/documentation/en/.library.json +++ b/documentation/en/.library.json @@ -1,214 +1,207 @@ { "posts": [ { - "title": "Hardware Requirements", - "slug": "en+hardware", - "github": "en/hardware.md", + "title": "About Lotus", + "slug": "en+lotus", + "github": "en/about.md", + "value": null, + "posts": [] + }, + { + "title": "Installation", + "slug": "en+install", + "github": "en/installation/installation.md", "value": null, "posts": [ - { - "title": "Testing Configuration", - "slug": "en+hardware-mining", - "github": "en/hardware-mining.md", - "value": null - } + { + "title": "Linux installation", + "slug": "en+install-linux", + "github": "en/installation/install-linux.md", + "value": null + }, + { + "title": "MacOS installation", + "slug": "en+install-macos", + "github": "en/installation/install-macos.md", + "value": null + }, + { + "title": "Updating Lotus", + "slug": "en+update", + "github": "en/installation/update.md", + "value": null + } ] }, { - "title": "Setup", + "title": "Getting started", "slug": "en+getting-started", - "github": "en/getting-started.md", + "github": "en/getting-started/getting-started.md", "value": null, "posts": [ - { - "title": "Arch Linux Installation", - "slug": "en+install-lotus-arch", - "github": "en/install-lotus-arch.md", - "value": null - }, - { - "title": "Ubuntu Installation", - "slug": "en+install-lotus-ubuntu", - "github": "en/install-lotus-ubuntu.md", - "value": null - }, - { - "title": "Fedora Installation", - "slug": "en+install-lotus-fedora", - "github": "en/install-lotus-fedora.md", - "value": null - }, - { - "title": "MacOS Installation", - "slug": "en+install-lotus-macos", - "github": "en/install-lotus-macos.md", - "value": null - }, - { - "title": "Updating Lotus", - "slug": "en+updating-lotus", - "github": "en/updating-lotus.md", - "value": null - }, - { - "title": "Join Testnet", - "slug": "en+join-testnet", - "github": "en/join-testnet.md", - "value": null - }, - { - "title": "Use Lotus with systemd", - "slug": "en+install-systemd-services", - "github": "en/install-systemd-services.md", - "value": null - }, - { - "title": "Setup Troubleshooting", - "slug": "en+setup-troubleshooting", - "github": "en/setup-troubleshooting.md", - "value": null - }, - { - "title": "Environment Variables", - "slug": "en+env-vars", - "github": "en/environment-vars.md", - "value": null - } + { + "title": "Setting up Lotus", + "slug": "en+setup", + "github": "en/getting-started/setup.md", + "value": null + }, + { + + "title": "Obtaining and sending FIL", + "slug": "en+wallet", + "github": "en/getting-started/wallet.md", + "value": null + }, + { + "title": "Setup troubleshooting", + "slug": "en+setup-troubleshooting", + "github": "en/getting-started/setup-troubleshooting.md", + "value": null + } ] }, { - "title": "Architecture", - "slug": "en+arch", - "github": "en/architecture.md", + "title": "Storing and retrieving data", + "slug": "en+store", + "github": "en/store/store.md", "value": null, "posts": [ - { - "title": "The Message Pool", - "slug": "en+mpool", - "github": "en/mpool.md", - "value": null - } + { + "title": "Making storage deals", + "slug": "en+making-deals", + "github": "en/store/making-deals.md", + "value": null + }, + { + "title": "Adding data from IPFS", + "slug": "en+adding-from-ipfs", + "github": "en/store/adding-from-ipfs.md", + "value": null + }, + { + "title": "Retrieving data", + "slug": "en+retriving", + "github": "en/store/retrieve.md", + "value": null + }, + { + "title": "Storage Troubleshooting", + "slug": "en+storage-troubleshooting", + "github": "en/store/storage-troubleshooting.md", + "value": null + } ] }, { - "title": "Storage Mining", + "title": "Storage mining", "slug": "en+mining", - "github": "en/mining.md", + "github": "en/mining/mining.md", "value": null, "posts": [ - { - "title": "Lotus Worker", - "slug": "en+lotus-worker", - "github": "en/mining-lotus-worker.md", - "value": null - }, - { - "title": "Static Ports", - "slug": "en+setting-a-static-port", - "github": "en/setting-a-static-port.md", - "value": null - }, - { - "title": "Mining Troubleshooting", - "slug": "en+mining-troubleshooting", - "github": "en/mining-troubleshooting.md", - "value": null - } + { + "title": "Miner setup", + "slug": "en+miner-setup", + "github": "en/mining/miner-setup.md", + "value": null + }, + { + "title": "Managing deals", + "slug": "en+managing-deals", + "github": "en/mining/managing-deals.md", + "value": null + }, + { + "title": "Lotus Worker", + "slug": "en+lotus-worker", + "github": "en/mining/lotus-seal-worker.md", + "value": null + }, + { + "title": "Benchmarking GPUs", + "slug": "en+gpus", + "github": "en/mining/gpus.md", + "value": null + }, + { + "title": "Mining Troubleshooting", + "slug": "en+mining-troubleshooting", + "github": "en/mining/mining-troubleshooting.md", + "value": null + } ] }, { - "title": "Storing Data", - "slug": "en+storing-data", - "github": "en/storing-data.md", + "title": "Building", + "slug": "en+building", + "github": "en/building/building.md", "value": null, "posts": [ - { - "title": "Storage Troubleshooting", - "slug": "en+storing-data-troubleshooting", - "github": "en/storing-data-troubleshooting.md", - "value": null - }, - { - "title": "Information for Miners", - "slug": "en+info-for-miners", - "github": "en/miner-deals.md", - "value": null - }, - { - "title": "IPFS Integration", - "slug": "en+ipfs-client-integration", - "github": "en/storing-ipfs-integration.md", - "value": null - } + { + "title": "Setting up remote API access", + "slug": "en+remote-api", + "github": "en/building/remote-api.md", + "value": null, + "posts": [] + }, + { + "title": "API endpoints and methods", + "slug": "en+api", + "github": "en/building/api.md", + "value": null, + "posts": [] + }, + { + "title": "API Reference", + "slug": "en+api-methods", + "github": "en/building/api-methods.md", + "value": null, + "posts": [] + }, + + { + "title": "Payment Channels", + "slug": "en+payment-channels", + "github": "en/building/payment-channels.md", + "value": null, + "posts": [] + }, + + { + "title": "Running a local devnet", + "slug": "en+local-devnet", + "github": "en/building/local-devnet.md", + "value": null, + "posts": [] + }, + { + "title": "Jaeger Tracing", + "slug": "en+jaeger-tracing", + "github": "en/building/jaeger-tracing.md", + "value": null, + "posts": [] + }, + + { + "title": "API Troubleshooting", + "slug": "en+api-troubleshooting", + "github": "en/building/api-troubleshooting.md", + "value": null, + "posts": [] + } ] }, { - "title": "Retrieving Data", - "slug": "en+retrieving-data", - "github": "en/retrieving-data.md", - "value": null, - "posts": [] - }, - { - "title": "Payment Channels", - "slug": "en+payment-channels", - "github": "en/payment-channels.md", - "value": null, - "posts": [] - }, - { - "title": "Command Line Interface", - "slug": "en+cli", - "github": "en/cli.md", - "value": null, - "posts": [] - }, - { - "title": "API", - "slug": "en+api", - "github": "en/api.md", + "title": "Lotus Architecture (WIP)", + "slug": "en+arch", + "github": "en/architectiure/architecture.md", "value": null, "posts": [ - { - "title": "Remote API Support", - "slug": "en+api-scripting-support", - "github": "en/api-scripting-support.md", - "value": null - }, - { - "title": "API Methods", - "slug": "en+api-methods", - "github": "en/api-methods.md", - "value": null - }, - { - "title": "API Troubleshooting", - "slug": "en+api-troubleshooting", - "github": "en/api-troubleshooting.md", - "value": null - } - ] - }, - { - "title": "Developer Tools", - "slug": "en+dev-tools", - "github": "en/dev-tools.md", - "value": null, - "posts": [ - { - "title": "Setup Local Devnet", - "slug": "en+setup-local-dev-net", - "github": "en/local-dev-net.md", - "value": null, - "posts": [] - }, - { - "title": "Jaeger Tracing", - "slug": "en+dev-tools-jaeger-tracing", - "github": "en/dev-tools-jaeger-tracing.md", - "value": null, - "posts": [] - } + { + "title": "The Message Pool", + "slug": "en+mpool", + "github": "en/architecture/mpool.md", + "value": null + } ] }, { @@ -224,7 +217,7 @@ "github": "en/.glossary.json", "value": null, "custom": { - "glossary": true + "glossary": true }, "posts": [] } diff --git a/documentation/en/about.md b/documentation/en/about.md new file mode 100644 index 000000000..ee8536ac9 --- /dev/null +++ b/documentation/en/about.md @@ -0,0 +1,14 @@ +# Lotus + +Lotus is an implementation of the **Filecoin Distributed Storage Network**. + +The **Lotus Node** (and the mining applications) can be built to join any of the [Filecoin networks](https://docs.filecoin.io/how-to/networks/). + +For more details about Filecoin, check out the [Filecoin Docs](https://docs.filecoin.io) and [Filecoin Spec](https://filecoin-project.github.io/specs/). + +## What can I learn here? + +* How to [install](en+installation) and [setup](en+setup) the Lotus software +* How to [store data on the Filecoin network](en+store) +* How to [setup a high performance FIL miner](en+miner-setup) +* How to [configure and access Lotus APIs](en+remote-api) diff --git a/documentation/en/api-scripting-support.md b/documentation/en/api-scripting-support.md deleted file mode 100644 index 653f144ed..000000000 --- a/documentation/en/api-scripting-support.md +++ /dev/null @@ -1,25 +0,0 @@ -# Remote API Support - -You may want to delegate the work **Lotus Miner** or **Lotus Node** performs to other machines. -Here is how to setup the necessary authorization and environment variables. - -## Environment variables - -Environmental variables are variables that are defined for the current shell and are inherited by any child shells or processes. Environmental variables are used to pass information into processes that are spawned from the shell. - -Using the [JWT you generated](https://lotu.sh/en+api#how-do-i-generate-a-token-18865), you can assign it and the **multiaddr** to the appropriate environment variable. - -```sh -# Lotus Node -FULLNODE_API_INFO="JWT_TOKEN:/ip4/127.0.0.1/tcp/1234/http" - -# Lotus Miner -MINER_API_INFO="JWT_TOKEN:/ip4/127.0.0.1/tcp/2345/http" -``` - -You can also use `lotus auth api-info --perm admin` to quickly create _API_INFO env vars - -- The **Lotus Node**'s `mutliaddr` is in `~/.lotus/api`. -- The default token is in `~/.lotus/token`. -- The **Lotus Miner**'s `multiaddr` is in `~/.lotusminer/config`. -- The default token is in `~/.lotusminer/token`. diff --git a/documentation/en/api.md b/documentation/en/api.md deleted file mode 100644 index 9760e2f32..000000000 --- a/documentation/en/api.md +++ /dev/null @@ -1,85 +0,0 @@ -# API - -Here is an early overview of how to make API calls. - -Implementation details for the **JSON-RPC** package are [here](https://github.com/filecoin-project/go-jsonrpc). - -## Overview: How do you modify the config.toml to change the API endpoint? - -API requests are made against `127.0.0.1:1234` unless you modify `.lotus/config.toml`. - -Options: - -- `http://[api:port]/rpc/v0` - HTTP endpoint -- `ws://[api:port]/rpc/v0` - Websocket endpoint -- `PUT http://[api:port]/rest/v0/import` - File import, it requires write permissions. - -## What methods can I use? - -For now, you can look into different files to find methods available to you based on your needs: - -- [Both Lotus node + miner APIs](https://github.com/filecoin-project/lotus/blob/master/api/api_common.go) -- [Lotus node API](https://github.com/filecoin-project/lotus/blob/master/api/api_full.go) -- [Lotus miner API](https://github.com/filecoin-project/lotus/blob/master/api/api_storage.go) - -The necessary permissions for each are in [api/struct.go](https://github.com/filecoin-project/lotus/blob/master/api/struct.go). - -## How do I make an API request? - -To demonstrate making an API request, we will take the method `ChainHead` from [api/api_full.go](https://github.com/filecoin-project/lotus/blob/master/api/api_full.go). - -```go -ChainHead(context.Context) (*types.TipSet, error) -``` - -And create a CURL command. In this command, `ChainHead` is included as `{ "method": "Filecoin.ChainHead" }`: - -```sh -curl -X POST \ - -H "Content-Type: application/json" \ - --data '{ "jsonrpc": "2.0", "method": "Filecoin.ChainHead", "params": [], "id": 3 }' \ - 'http://127.0.0.1:1234/rpc/v0' -``` - -If the request requires authorization, add an authorization header: - -```sh -curl -X POST \ - -H "Content-Type: application/json" \ - -H "Authorization: Bearer $(cat ~/.lotusminer/token)" \ - --data '{ "jsonrpc": "2.0", "method": "Filecoin.ChainHead", "params": [], "id": 3 }' \ - 'http://127.0.0.1:1234/rpc/v0' -``` - -> In the future we will add a playground to make it easier to build and experiment with API requests. - -## CURL authorization - -To authorize your request, you will need to include the **JWT** in a HTTP header, for example: - -```sh --H "Authorization: Bearer $(cat ~/.lotusminer/token)" -``` - -Admin token is stored in `~/.lotus/token` for the **Lotus Node** or `~/.lotusminer/token` for the **Lotus Miner**. - -## How do I generate a token? - -To generate a JWT with custom permissions, use this command: - -```sh -# Lotus Node -lotus auth create-token --perm admin - -# Lotus Miner -lotus-miner auth create-token --perm admin -``` - -## What authorization level should I use? - -When viewing [api/apistruct/struct.go](https://github.com/filecoin-project/lotus/blob/master/api/apistruct/struct.go), you will encounter these types: - -- `read` - Read node state, no private data. -- `write` - Write to local store / chain, and `read` permissions. -- `sign` - Use private keys stored in wallet for signing, `read` and `write` permissions. -- `admin` - Manage permissions, `read`, `write`, and `sign` permissions. diff --git a/documentation/en/architecture.md b/documentation/en/architecture/architecture.md similarity index 99% rename from documentation/en/architecture.md rename to documentation/en/architecture/architecture.md index 619e04f05..8c4d7be5c 100644 --- a/documentation/en/architecture.md +++ b/documentation/en/architecture/architecture.md @@ -6,7 +6,7 @@ Filecoin protocol, validating the blocks and state transitions. The specification for the Filecoin protocol can be found [here](https://filecoin-project.github.io/specs/). For information on how to setup and operate a Lotus node, -please follow the instructions [here](https://lotu.sh/en+getting-started). +please follow the instructions [here](en+getting-started). # Components diff --git a/documentation/en/mpool.md b/documentation/en/architecture/mpool.md similarity index 100% rename from documentation/en/mpool.md rename to documentation/en/architecture/mpool.md diff --git a/documentation/en/api-methods.md b/documentation/en/building/api-methods.md similarity index 100% rename from documentation/en/api-methods.md rename to documentation/en/building/api-methods.md diff --git a/documentation/en/api-troubleshooting.md b/documentation/en/building/api-troubleshooting.md similarity index 100% rename from documentation/en/api-troubleshooting.md rename to documentation/en/building/api-troubleshooting.md diff --git a/documentation/en/building/api.md b/documentation/en/building/api.md new file mode 100644 index 000000000..626193ee2 --- /dev/null +++ b/documentation/en/building/api.md @@ -0,0 +1,38 @@ +# API endpoints and methods + +The API can be accessed on: + +- `http://[api:port]/rpc/v0` - HTTP RPC-API endpoint +- `ws://[api:port]/rpc/v0` - Websocket RPC-API endpoint +- `PUT http://[api:port]/rest/v0/import` - REST endpoint for file import (multipart upload). It requires write permissions. + +The RPC methods can be found in the [Reference](en+api-methods) and directly in the source code: + +- [Both Lotus node + miner APIs](https://github.com/filecoin-project/lotus/blob/master/api/api_common.go) +- [Lotus node API](https://github.com/filecoin-project/lotus/blob/master/api/api_full.go) +- [Lotus miner API](https://github.com/filecoin-project/lotus/blob/master/api/api_storage.go) + + +## JSON-RPC client + +Lotus uses its own Go library implementation of [JSON-RPC](https://github.com/filecoin-project/go-jsonrpc). + +## cURL example + +To demonstrate making an API request, we will take the method `ChainHead` from [api/api.go](https://github.com/filecoin-project/lotus/blob/master/api/api_full.go). + +```go +ChainHead(context.Context) (*types.TipSet, error) +``` + +And create a CURL command. In this command, `ChainHead` is included as `{ "method": "Filecoin.ChainHead" }`: + +```sh +curl -X POST \ + -H "Content-Type: application/json" \ + -H "Authorization: Bearer $(cat ~/.lotusminer/token)" \ + --data '{ "jsonrpc": "2.0", "method": "Filecoin.ChainHead", "params": [], "id": 3 }' \ + 'http://127.0.0.1:1234/rpc/v0' +``` + +(See [this section](en+remote-api) to learn how to generate authorization tokens). diff --git a/documentation/en/building/building.md b/documentation/en/building/building.md new file mode 100644 index 000000000..5194f8314 --- /dev/null +++ b/documentation/en/building/building.md @@ -0,0 +1,5 @@ +# Building with Lotus + +Lotus applications provide HTTP (JSON-RPC) APIs that allow developers to control Lotus programatically. + +This section dives into how to setup and use these APIs, additionally providing information on advanced Lotus features and workflows, like Payment Channels or how to setup a fully local Lotus development network. diff --git a/documentation/en/dev-tools-jaeger-tracing.md b/documentation/en/building/jaeger-tracing.md similarity index 100% rename from documentation/en/dev-tools-jaeger-tracing.md rename to documentation/en/building/jaeger-tracing.md diff --git a/documentation/en/local-dev-net.md b/documentation/en/building/local-devnet.md similarity index 100% rename from documentation/en/local-dev-net.md rename to documentation/en/building/local-devnet.md diff --git a/documentation/en/payment-channels.md b/documentation/en/building/payment-channels.md similarity index 100% rename from documentation/en/payment-channels.md rename to documentation/en/building/payment-channels.md diff --git a/documentation/en/building/remote-api.md b/documentation/en/building/remote-api.md new file mode 100644 index 000000000..d0fedb51b --- /dev/null +++ b/documentation/en/building/remote-api.md @@ -0,0 +1,69 @@ +# Setting up remote API access + +The **Lotus Miner** and the **Lotus Node** applications come with their own local API endpoints setup by default when they are running. + +These endpoints are used by `lotus` and `lotus-miner` to interact with the running process. In this section we will explain how to enable remote access to the Lotus APIs. + +Note that instructions are the same for `lotus` and `lotus-miner`. For simplicity, we will just show how to do it with `lotus`. + +## Setting the listening interface for the API endpoint + +By default, the API listens on the local "loopback" interface (`127.0.0.1`). This is configured in the `config.toml` file: + +```toml +[API] +# ListenAddress = "/ip4/127.0.0.1/tcp/1234/http" +# RemoteListenAddress = "" +# Timeout = "30s" +``` + +To access the API remotely, Lotus needs to listen on the right IP/interface. The IP associated to each interface can be usually found with the command `ip a`. Once the right IP is known, it can be set in the configuration: + +```toml +[API] +ListenAddress = "/ip4//tcp/3453/http" # port is an example + +# Only relevant for lotus-miner +# This should be the IP:Port pair where the miner is reachable from anyone trying to dial to it. +# If you have placed a reverse proxy or a NAT'ing device in front of it, this may be different from +# the EXTERNAL_INTERFACE_IP. +RemoteListenAddress = "" +``` + +> `0.0.0.0` can be used too. This is a wildcard that means "all interfaces". Depending on the network setup, this may affect security (listening on the wrong, exposed interface). + +After making these changes, please restart the affected process. + +## Issuing tokens + +Any client wishing to talk to the API endpoints will need a token. Tokens can be generated with: + +```sh +lotus auth create-token --perm +``` + +(similarly for the Lotus Miner). + +The permissions work as follows: + +- `read` - Read node state, no private data. +- `write` - Write to local store / chain, and `read` permissions. +- `sign` - Use private keys stored in wallet for signing, `read` and `write` permissions. +- `admin` - Manage permissions, `read`, `write`, and `sign` permissions. + + +Tokens can then be used in applications by setting an Authorization header as: + +``` +Authorization: Bearer +``` + + +## Environment variables + +`lotus`, `lotus-miner` and `lotus-worker` can actually interact with their respective applications running on a different node. All is needed to configure them are the following the *environment variables*: + +```sh +FULLNODE_API_INFO="TOKEN:/ip4//tcp//http" +MINER_API_INFO="TOKEN:/ip4//tcp//http" +``` diff --git a/documentation/en/cli.md b/documentation/en/cli.md deleted file mode 100644 index fd26400d0..000000000 --- a/documentation/en/cli.md +++ /dev/null @@ -1,108 +0,0 @@ -# Lotus Command Line Interface - -The Command Line Interface (CLI) is a convenient way to interact with -a Lotus node. You can use the CLI to operate your node, -get information about the blockchain, -manage your accounts and transfer funds, -create storage deals, and much more! - -The CLI is intended to be self-documenting, so when in doubt, simply add `--help` -to whatever command you're trying to run! This will also display all of the -input parameters that can be provided to a command. - -We highlight some of the commonly -used features of the CLI below. -All CLI commands should be run from the home directory of the Lotus project. - -## Operating a Lotus node - -### Starting up a node - -```sh -lotus daemon -``` -This command will start up your Lotus node, with its API port open at 1234. -You can pass `--api=` to use a different port. - -### Checking your sync progress - -```sh -lotus sync status -``` -This command will print your current tipset height under `Height`, and the target tipset height -under `Taregt`. - -You can also run `lotus sync wait` to get constant updates on your sync progress. - -### Getting the head tipset - -```sh -lotus chain head -``` - -### Control the logging level - -```sh -lotus log set-level -``` -This command can be used to toggle the logging levels of the different -systems of a Lotus node. In decreasing order -of logging detail, the levels are `debug`, `info`, `warn`, and `error`. - -As an example, -to set the `chain` and `blocksync` to log at the `debug` level, run -`lotus log set-level --system chain --system blocksync debug`. - -To see the various logging system, run `lotus log list`. - -### Find out what version of Lotus you're running - -```sh -lotus version -``` - -## Managing your accounts - -### Listing accounts in your wallet - -```sh -lotus wallet list -``` - -### Creating a new account - -```sh -lotus wallet new bls -``` -This command will create a new BLS account in your wallet; these -addresses start with the prefix `t3`. Running `lotus wallet new secp256k1` -(or just `lotus wallet new`) will create -a new Secp256k1 account, which begins with the prefix `t1`. - -### Getting an account's balance - -```sh -lotus wallet balance
-``` - -### Transferring funds - -```sh -lotus send --source= -``` -This command will transfer `amount` (in attoFIL) from `source address` to `destination address`. - -### Importing an account into your wallet - -```sh -lotus wallet import -``` -This command will import an account whose private key is saved at the specified file. - -### Exporting an account from your wallet - -```sh -lotus wallet export
-``` -This command will print out the private key of the specified address -if it is in your wallet. Always be careful with your private key! diff --git a/documentation/en/dev-tools.md b/documentation/en/dev-tools.md deleted file mode 100644 index 60b9b26d4..000000000 --- a/documentation/en/dev-tools.md +++ /dev/null @@ -1,3 +0,0 @@ -# Developer Tools - -> Running a local network can be a great way to understand how Lotus works and test your setup. diff --git a/documentation/en/environment-vars.md b/documentation/en/environment-vars.md deleted file mode 100644 index 9d455a74d..000000000 --- a/documentation/en/environment-vars.md +++ /dev/null @@ -1,65 +0,0 @@ -# Lotus Environment Variables - -## Building - -## Common - -The environment variables are common across most lotus binaries. - -### `LOTUS_FD_MAX` - -Sets the file descriptor limit for the process. This should be set high (8192 -or higher) if you ever notice 'too many open file descriptor' errors. - -### `LOTUS_JAEGER` - -This can be set to enable jaeger trace reporting. The value should be the url -of the jaeger trace collector, the default for most jaeger setups should be -`localhost:6831`. - -### `LOTUS_DEV` - -If set to a non-empty value, certain parts of the application will print more -verbose information to aid in development of the software. Not recommended for -end users. - -## Lotus Daemon - -### `LOTUS_PATH` - -Sets the location for the lotus daemon on-disk repo. If left empty, this defaults to `~/.lotus`. - -### `LOTUS_SKIP_GENESIS_CHECK` - -Can be set to `_yes_` if you wish to run a lotus network with a different -genesis than the default one built into your lotus binary. - -### `LOTUS_CHAIN_TIPSET_CACHE` - -Sets the cache size for the chainstore tipset cache. The default value is 8192, -but if your usage of the lotus API involves frequent arbitrary tipset lookups, -you may want to increase this. - -### `LOTUS_CHAIN_INDEX_CACHE` - -Sets the cache size for the chainstore epoch index cache. The default value is 32768, -but if your usage of the lotus API involves frequent deep chain lookups for -block heights that are very far from the current chain height, you may want to -increase this. - - -### `LOTUS_BSYNC_MSG_WINDOW` - -Set the initial maximum window size for message fetching blocksync requests. If -you have a slower internet connection and are having trouble syncing, you might -try lowering this down to 10-20 for a 'poor' internet connection. - -## Lotus Miner - -A number of environment variables are respected for configuring the behavior of the filecoin proving subsystem. For more details on those [see here](https://github.com/filecoin-project/rust-fil-proofs/#settings). - -### `LOTUS_MINER_PATH` - -Sets the location for the lotus miners on-disk repo. If left empty, this defaults to `~/.lotusminer`. - - diff --git a/documentation/en/faqs.md b/documentation/en/faqs.md index c2d526830..74119a5b6 100644 --- a/documentation/en/faqs.md +++ b/documentation/en/faqs.md @@ -11,7 +11,6 @@ go [here](https://filecoin.io/faqs/). Lotus is an implementation of the **Filecoin Distributed Storage Network**, written in Go. It is designed to be modular and interoperable with any other implementation of the Filecoin Protocol. -More information about Lotus can be found [here](https://lotu.sh/). ### What are the components of Lotus? @@ -30,21 +29,19 @@ to a Lotus Node over the JSON-RPC API. ### How do I set up a Lotus Node? -Follow the instructions found [here](https://lotu.sh/en+getting-started). +Follow the instructions found [here](en+install) and [here](en+setup). ### Where can I get the latest version of Lotus? -Download the binary tagged as the `Latest Release` from the - [Lotus Github repo](https://github.com/filecoin-project/lotus/releases). +Download the binary tagged as the `Latest Release` from the [Lotus Github repo](https://github.com/filecoin-project/lotus/releases) or checkout the `master` branch of the source repository. ### What operating systems can Lotus run on? -Lotus can build and run on most Linux and MacOS systems with at least -8GB of RAM. Windows is not yet supported. +Lotus can build and run on most Linux and MacOS systems with [at least 8GB of RAM](en+install#hardware-requirements-1). Windows is not yet supported. ### How can I update to the latest version of Lotus? -To update Lotus, follow the instructions [here](https://lotu.sh/en+updating-lotus). +To update Lotus, follow the instructions [here](en+update). ### How do I prepare a fresh installation of Lotus? @@ -52,7 +49,7 @@ Stop the Lotus daemon, and delete all related files, including sealed and chain running `rm ~/.lotus ~/.lotusminer`. Then, install Lotus afresh by following the instructions -found [here](https://lotu.sh/en+getting-started). +found [here](en+install). ### Can I configure where the node's config and data goes? @@ -73,48 +70,45 @@ directory for more. ### How can I send a request over the JSON-RPC API? Information on how to send a `cURL` request to the JSON-RPC API can be found -[here](https://lotu.sh/en+api). A JavaScript client is under development. +[here](en+api). ### What are the requests I can send over the JSON-RPC API? -Please have a look at the -[source code](https://github.com/filecoin-project/lotus/blob/master/api/api_full.go) -for a list of methods supported by the JSON-RPC API. +Please have a look [here](en+api). + + ## The Test Network ### What is Testnet? Testnet is a live network of Lotus Nodes run by the community for testing purposes. - It has 2 PiB of storage (and growing!) dedicated to it. ### Is FIL on the Testnet worth anything? -Nothing at all! Real-world incentives may be provided in a future phase of Testnet, but this is -yet to be confirmed. +Nothing at all! ### How can I see the status of Testnet? The [dashboard](https://stats.testnet.filecoin.io/) displays the status of the network as -well as a ton -of other metrics you might find interesting. +well as a ton of other metrics you might find interesting. ## Mining with a Lotus Node on Testnet ### How do I get started mining with Lotus? -Follow the instructions found [here](https://lotu.sh/en+mining). +Follow the instructions found [here](en+mining). ### What are the minimum hardware requirements? An example test configuration, and minimum hardware requirements can be found -[here](https://lotu.sh/en+hardware-mining). +[here](en+install#hardware-requirements-8). Note that these might NOT be the minimum requirements for mining on Mainnet. ### What are some GPUs that have been tested? -A list of benchmarked GPUs can be found [here](https://lotu.sh/en+hardware-mining#benchmarked-gpus-7393). +See previous question. ### Why is my GPU not being used when sealing a sector? @@ -135,4 +129,4 @@ You can do so by changing the storage path variable for the second miner, e.g., ### How do I setup my own local devnet? -Follow the instructions found [here](https://lotu.sh/en+setup-local-dev-net). +Follow the instructions found [here](en+local-devnet). diff --git a/documentation/en/getting-started.md b/documentation/en/getting-started.md deleted file mode 100644 index e38a2ab97..000000000 --- a/documentation/en/getting-started.md +++ /dev/null @@ -1,23 +0,0 @@ -# Lotus - -Lotus is an implementation of the **Filecoin Distributed Storage Network**. You can run the Lotus software client to join the **Filecoin Testnet**. - -For more details about Filecoin, check out the [Filecoin Docs](https://docs.filecoin.io) and [Filecoin Spec](https://filecoin-project.github.io/specs/). - -## What can I learn here? - -- How to install Lotus on [Arch Linux](https://lotu.sh/en+install-lotus-arch), [Ubuntu](https://lotu.sh/en+install-lotus-ubuntu), or [MacOS](https://lotu.sh/en+install-lotus-macos). -- Joining the [Lotus Testnet](https://lotu.sh/en+join-testnet). -- [Storing](https://lotu.sh/en+storing-data) or [retrieving](https://lotu.sh/en+retrieving-data) data. -- Mining Filecoin using the **Lotus Miner** in your [CLI](https://lotu.sh/en+mining). - -## How is Lotus designed? - -Lotus is architected modularly to keep clean API boundaries while using the same process. Installing Lotus will include two separate programs: - -- The **Lotus Node** -- The **Lotus Miner** - -The **Lotus Miner** is intended to be run on the machine that manages a single miner instance, and is meant to communicate with the **Lotus Node** via the websocket **JSON-RPC** API for all of the chain interaction needs. - -This way, a mining operation may easily run a **Lotus Miner** or many of them, connected to one or many **Lotus Node** instances. diff --git a/documentation/en/getting-started/getting-started.md b/documentation/en/getting-started/getting-started.md new file mode 100644 index 000000000..99b4095d4 --- /dev/null +++ b/documentation/en/getting-started/getting-started.md @@ -0,0 +1,3 @@ +# Getting started + +This section will get you started with Lotus. We will setup the Lotus daemon (that should already be [installed](en+install)), start it, create a wallet and use it to send and receive some Filecoin. diff --git a/documentation/en/setup-troubleshooting.md b/documentation/en/getting-started/setup-troubleshooting.md similarity index 60% rename from documentation/en/setup-troubleshooting.md rename to documentation/en/getting-started/setup-troubleshooting.md index a1c78b51b..f27a3faa5 100644 --- a/documentation/en/setup-troubleshooting.md +++ b/documentation/en/getting-started/setup-troubleshooting.md @@ -1,5 +1,12 @@ # Setup Troubleshooting + +## Error: initializing node error: cbor input had wrong number of fields + +This happens when you are starting Lotus which has been compiled for one network, but it encounters data in the Lotus data folder which is for a different network, or for an older incompatible version. + +The solution is to clear the data folder (see below). + ## Config: Clearing data Here is a command that will delete your chain data, stored wallets, stored data and any miners you have set up: @@ -8,7 +15,7 @@ Here is a command that will delete your chain data, stored wallets, stored data rm -rf ~/.lotus ~/.lotusminer ``` -This command usually resolves any issues with running `lotus` but it is not always required for updates. We will share information about when resetting your chain data and miners is required for an update in the future. +Note you do not always need to clear your data for [updating](en+update). ## Error: Failed to connect bootstrap peer @@ -33,6 +40,8 @@ ERROR hello hello/hello.go:81 other peer has different genesis! ## Config: Open files limit +Lotus will attempt to set up the file descriptor (FD) limit automatically. If that does not work, you can still configure your system to allow higher than the default values. + On most systems you can check the open files limit with: ```sh @@ -44,3 +53,5 @@ You can also modify this number by using the `ulimit` command. It gives you the ```sh ulimit -n 10000 ``` + +Note that this is not persisted and that systemd manages its own FD limits for services. Please use your favourite search engine to find instructions on how to persist and configure FD limits for your system. diff --git a/documentation/en/getting-started/setup.md b/documentation/en/getting-started/setup.md new file mode 100644 index 000000000..e751da80b --- /dev/null +++ b/documentation/en/getting-started/setup.md @@ -0,0 +1,169 @@ +# Setting up Lotus + +Your Lotus binaries have been installed and you are ready to start participating in the Filecoin network. + +## Selecting the right network + +You should have built the Lotus binaries from the right Github branch and Lotus will be fully setup to join the matching [Filecoin network](https://docs.filecoin.io/how-to/networks/). For more information on switching networks, check the [updating Lotus section](en+update). + +## Starting the daemon + +To start the daemon simply run: + +```sh +lotus daemon +``` + +or if you are using the provided systemd service files, do: + +```sh +systemctl start lotus-daemon +``` + +__If you are using Lotus from China__, make sure you set the following environment variable before running Lotus: + +``` +export IPFS_GATEWAY="https://proof-parameters.s3.cn-south-1.jdcloud-oss.com/ipfs/" +``` + + +During the first start, Lotus: + +* Will setup its data folder at `~/.lotus` +* Will download the necessary parameters +* Start syncing the Lotus chain + +If you started lotus using systemd, the logs will appear in `/var/log/lotus/daemon.log` (not in journalctl as usual), otherwise you will see them in your screen. + +Do not be appalled by the amount of warnings and sometimes errors showing in the logs, there are usually part of the usual functioning of the daemon as part of a distributed network. + +## Waiting to sync + +After the first start, the chain will start syncing until it has reached the tip. You can check how far the syncing process is with: + +```sh +lotus sync status +``` + +You can also interactively wait for the chain to be fully synced with: + +```sh +lotus sync wait +``` + +## Interacting with the Lotus daemon + +As shown above, the `lotus` command allows to interact with the running daemon. You will see it getting used in many of the documentation examples. + +This command-line-interface is self-documenting: + +```sh +# Show general help +lotus --help +# Show specific help for the "client" subcommand +lotus client --help +``` + +For example, after your Lotus daemon has been running for a few minutes, use `lotus` to check the number of other peers that it is connected to in the Filecoin network: + +```sh +lotus net peers +``` + +## Controlling the logging level + +```sh +lotus log set-level +``` +This command can be used to toggle the logging levels of the different +systems of a Lotus node. In decreasing order +of logging detail, the levels are `debug`, `info`, `warn`, and `error`. + +As an example, +to set the `chain` and `blocksync` to log at the `debug` level, run +`lotus log set-level --system chain --system blocksync debug`. + +To see the various logging system, run `lotus log list`. + + +## Configuration + +### Configuration file + +The Lotus daemon stores a configuration file in `~/.lotus/config.toml`. Note that by default all settings are commented. Here is an example configuration: + +```toml +[API] + # Binding address for the Lotus API + ListenAddress = "/ip4/127.0.0.1/tcp/1234/http" + # Not used by lotus daemon + RemoteListenAddress = "" + # General network timeout value + Timeout = "30s" + +# Libp2p provides connectivity to other Filecoin network nodes +[Libp2p] + # Binding address swarm - 0 means random port. + ListenAddresses = ["/ip4/0.0.0.0/tcp/0", "/ip6/::/tcp/0"] + # Insert any addresses you want to explicitally + # announce to other peers here. Otherwise, they are + # guessed. + AnnounceAddresses = [] + # Insert any addresses to avoid announcing here. + NoAnnounceAddresses = [] + # Connection manager settings, decrease if your + # machine is overwhelmed by connections. + ConnMgrLow = 150 + ConnMgrHigh = 180 + ConnMgrGrace = "20s" + +# Pubsub is used to broadcast information in the network +[Pubsub] + Bootstrapper = false + RemoteTracer = "/dns4/pubsub-tracer.filecoin.io/tcp/4001/p2p/QmTd6UvR47vUidRNZ1ZKXHrAFhqTJAD27rKL9XYghEKgKX" + +# This section can be used to enable adding and retriving files from IPFS +[Client] + UseIpfs = false + IpfsMAddr = "" + IpfsUseForRetrieval = false + +# Metrics configuration +[Metrics] + Nickname = "" + HeadNotifs = false +``` + +### Ensuring connectivity to your Lotus daemon + +Usually your lotus daemon will establish connectivity with others in the network and try to make itself diallable using uPnP. If you wish to manually ensure that your daemon is reachable: + +* Set a fixed port of your choice in the `ListenAddresses` in the Libp2p section (i.e. 6665). +* Open a port in your router that is forwarded to this port. This is usually called featured as "Port forwarding" and the instructions differ from router model to model but there are many guides online. +* Add your public IP/port to `AnnounceAddresses`. i.e. `/ip4//tcp/6665/`. + +Note that it is not a requirement to use Lotus as a client to the network to be fully reachable, as your node already connects to others directly. + + +### Environment variables + +Common to most Lotus binaries: + +* `LOTUS_FD_MAX`: Sets the file descriptor limit for the process +* `LOTUS_JAEGER`: Sets the Jaeger URL to send traces. See TODO. +* `LOTUS_DEV`: Any non-empty value will enable more verbose logging, useful only for developers. + +Specific to the *Lotus daemon*: + +* `LOTUS_PATH`: Location to store Lotus data (defaults to `~/.lotus`). +* `LOTUS_SKIP_GENESIS_CHECK=_yes_`: Set only if you wish to run a lotus network with a different genesis block. +* `LOTUS_CHAIN_TIPSET_CACHE`: Sets the size for the chainstore tipset cache. Defaults to `8192`. Increase if you perform frequent arbitrary tipset lookups. +* `LOTUS_CHAIN_INDEX_CACHE`: Sets the size for the epoch index cache. Defaults to `32768`. Increase if you perform frequent deep chain lookups for block heights far from the latest height. +* `LOTUS_BSYNC_MSG_WINDOW`: Set the initial maximum window size for message fetching blocksync request. Set to 10-20 if you have an internet connection with low bandwidth. + +Specific to the *Lotus miner*: + +* `LOTUS_MINER_PATH`: Location for the miner's on-disk repo. Defaults to `./lotusminer`. +* A number of environment variables are respected for configuring the behaviour of the Filecoin proving subsystem. [See here](en+miner-setup). + + diff --git a/documentation/en/getting-started/wallet.md b/documentation/en/getting-started/wallet.md new file mode 100644 index 000000000..25a67fb09 --- /dev/null +++ b/documentation/en/getting-started/wallet.md @@ -0,0 +1,58 @@ +# Obtaining and sending FIL + +In order to receive and send FIL with Lotus you will need to have installed the program and be running the Lotus daemon. + +## Creating a wallet + + +```sh +lotus wallet new bls +``` + +This will print your Filecoin address. + +Your wallet information is stored in the `~/.lotus/keystore` (or `$LOTUS_PATH/keystore`). For instructions on export/import, see below. + +You can create multiple wallets and list them with: + +```sh +lotus wallet list +``` + +## Obtaining FIL + +FIL can be obtained either by using one of the Faucets (available for the test networks) or by buying it from an exchange supporting FIL trading (once mainnet has launched). + +Once you have received some FIL you can check your balance with: + +```sh +lotus wallet balance +``` + +Remember that your will only see the latest balance when your daemon is fully synced to the chain. + +## Sending FIL + +Sending some FIL can be achieved by running: + +```sh +lotus wallet send
+``` + +Make sure to check `lotus wallet send --help` for additional options. + +## Exporting and importing a wallet + +You can export and re-import a wallet with: + +```sh +lotus wallet export
> wallet.private +``` + +and: + +```sh +lotus wallet import wallet.private +``` + +Keep your wallet's private key safe! diff --git a/documentation/en/hardware-mining.md b/documentation/en/hardware-mining.md deleted file mode 100644 index d421f6fb1..000000000 --- a/documentation/en/hardware-mining.md +++ /dev/null @@ -1,54 +0,0 @@ -# Protocol Labs Standard Testing Configuration - -> This documentation page describes the standard testing configuration the Protocol Labs team has used to test **Lotus Miner**s on Lotus. There is no guarantee this testing configuration will be suitable for Filecoin storage mining at MainNet launch. If you need to buy new hardware to join the Filecoin Testnet, we recommend to buy no more hardware than you require for testing. To learn more please read this [Protocol Labs Standard Testing Configuration post](https://filecoin.io/blog/filecoin-testnet-mining/). - -**Sector sizes** and **minimum pledged storage** required to mine blocks are two very important Filecoin Testnet parameters that impact hardware decisions. We will continue to refine all parameters during Testnet. - -BECAUSE OF THIS, OUR STANDARD TESTING CONFIGURATION FOR FILECOIN MAINNET CAN AND WILL CHANGE. YOU HAVE BEEN WARNED. - -## Example configuration - -The setup below is a minimal example for sealing 32 GiB sectors on Lotus: - -- 2 TB of hard drive space. -- 8 core CPU -- 128 GiB of RAM - -Note that 1GB sectors don't require as high of specs, but are likely to be removed as we improve the performance of 32GB sector sealing. - -For the first part of the sealing process, AMD CPU's are __highly recommended__, because of the `Intel SHA Extensions` instruction set that is available there ever since the `Zen` microarchitecture. Hence, AMD CPU's seem to perform much better on the testnet than other CPU's. Contrary to what the name implies, this extended instruction set is not available on recent Intel desktop/server chips. - -## Testnet discoveries - -- If you only have 128GiB of ram, enabling 256GB of **NVMe** swap on an SSD will help you avoid out-of-memory issues while mining. - -## Benchmarked GPUs - -GPUs are a must for getting **block rewards**. Here are a few that have been confirmed to generate **SNARKs** quickly enough to successfully mine blocks on the Lotus Testnet. - -- GeForce RTX 2080 Ti -- GeForce RTX 2080 SUPER -- GeForce RTX 2080 -- GeForce GTX 1080 Ti -- GeForce GTX 1080 -- GeForce GTX 1060 - -## Testing other GPUs - -If you want to test a GPU that is not explicitly supported, use the following global **environment variable**: - -```sh -BELLMAN_CUSTOM_GPU=":" -``` - -Here is an example of trying a GeForce GTX 1660 Ti with 1536 cores. - -```sh -BELLMAN_CUSTOM_GPU="GeForce GTX 1660 Ti:1536" -``` - -To get the number of cores for your GPU, you will need to check your card’s specifications. - -## Benchmarking - -Here is a [benchmarking tool](https://github.com/filecoin-project/lotus/tree/master/cmd/lotus-bench) and a [GitHub issue thread](https://github.com/filecoin-project/lotus/issues/694) for those who wish to experiment with and contribute hardware setups for the **Filecoin Testnet**. diff --git a/documentation/en/hardware.md b/documentation/en/hardware.md deleted file mode 100644 index f6250548a..000000000 --- a/documentation/en/hardware.md +++ /dev/null @@ -1,7 +0,0 @@ -# Hardware - -> This page is a work in progress. Exact mining requirements are still in the works. - -Lotus can build and run on most [Linux](https://ubuntu.com/) and [MacOS](https://www.apple.com/macos) systems with at least 8GiB of RAM. - -Windows is not yet supported. diff --git a/documentation/en/install-lotus-arch.md b/documentation/en/install-lotus-arch.md deleted file mode 100644 index 8e06aae4e..000000000 --- a/documentation/en/install-lotus-arch.md +++ /dev/null @@ -1,51 +0,0 @@ -# Arch Linux Instructions - -These steps will install the following dependencies: - -- go (1.14 or higher) -- gcc (7.4.0 or higher) -- git (version 2 or higher) -- bzr (some go dependency needs this) -- jq -- pkg-config -- opencl-icd-loader -- opencl driver (like nvidia-opencl on arch) (for GPU acceleration) -- opencl-headers (build) -- rustup (proofs build) -- llvm (proofs build) -- clang (proofs build) - -### Install dependencies - -```sh -sudo pacman -Syu opencl-icd-loader gcc git bzr jq pkg-config opencl-icd-loader opencl-headers -``` - -### Install Go 1.14 - -Install the latest version of Go by following [the docs on their website](https://golang.org/doc/install). - -### Clone the Lotus repository - -```sh -git clone https://github.com/filecoin-project/lotus.git -cd lotus/ -``` - -### Build the Lotus binaries from source and install - -! **If you are running an AMD platform or if your CPU supports SHA extensions you will want to build the Filecoin proofs natively** - -```sh -make clean && make all -sudo make install -``` - -#### Native Filecoin FFI building - -```sh -env env RUSTFLAGS="-C target-cpu=native -g" FFI_BUILD_FROM_SOURCE=1 make clean deps all -sudo make install -``` - -After installing Lotus, you can run the `lotus` command directly from your CLI to see usage documentation. Next, you can join the [Lotus Testnet](https://lotu.sh/en+join-testnet). diff --git a/documentation/en/install-lotus-fedora.md b/documentation/en/install-lotus-fedora.md deleted file mode 100644 index c37161b7a..000000000 --- a/documentation/en/install-lotus-fedora.md +++ /dev/null @@ -1,54 +0,0 @@ -# Fedora Instructions - -> tested on 30 - -**NOTE:** If you have an AMD GPU the opencl instructions may be incorrect... - -These steps will install the following dependencies: - -- go (1.14 or higher) -- gcc (7.4.0 or higher) -- git (version 2 or higher) -- bzr (some go dependency needs this) -- jq -- pkg-config -- rustup (proofs build) -- llvm (proofs build) -- clang (proofs build) - -### Install dependencies - -```sh -$ sudo dnf -y update -$ sudo dnf -y install gcc git bzr jq pkgconfig mesa-libOpenCL mesa-libOpenCL-devel opencl-headers ocl-icd ocl-icd-devel clang llvm -$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -``` - -### Install Go 1.14 - -Install the latest version of Go by following [the docs on their website](https://golang.org/doc/install). - -### Clone the Lotus repository - -```sh -git clone https://github.com/filecoin-project/lotus.git -cd lotus/ -``` - -### Build the Lotus binaries from source and install - -! **If you are running an AMD platform or if your CPU supports SHA extensions you will want to build the Filecoin proofs natively** - -```sh -$ make clean && make all -$ sudo make install -``` - -#### Native Filecoin FFI building - -```sh -env env RUSTFLAGS="-C target-cpu=native -g" FFI_BUILD_FROM_SOURCE=1 make clean deps all -sudo make install -``` - -After installing Lotus, you can run the `lotus` command directly from your CLI to see usage documentation. Next, you can join the [Lotus TestNet](https://lotu.sh/en+join-testnet). diff --git a/documentation/en/install-lotus-ubuntu.md b/documentation/en/install-lotus-ubuntu.md deleted file mode 100644 index 500650692..000000000 --- a/documentation/en/install-lotus-ubuntu.md +++ /dev/null @@ -1,54 +0,0 @@ -# Ubuntu Instructions - -These steps will install the following dependencies: - -- go (1.14 or higher) -- gcc (7.4.0 or higher) -- git (version 2 or higher) -- bzr (some go dependency needs this) -- jq -- pkg-config -- opencl-icd-loader -- opencl driver (like nvidia-opencl on arch) (for GPU acceleration) -- opencl-headers (build) -- rustup (proofs build) -- llvm (proofs build) -- clang (proofs build) - -### Install dependencies - -```sh -sudo apt update -sudo apt install mesa-opencl-icd ocl-icd-opencl-dev gcc git bzr jq pkg-config curl -sudo apt upgrade -``` - -### Install Go 1.14 - -Install the latest version of Go by following [the docs on their website](https://golang.org/doc/install). - -### Clone the Lotus repository - -```sh -git clone https://github.com/filecoin-project/lotus.git -cd lotus/ -``` - -### Build the Lotus binaries from source and install - -! **If you are running an AMD platform or if your CPU supports SHA extensions you will want to build the Filecoin proofs natively** - -```sh -make clean && make all -sudo make install -``` - -#### Native Filecoin FFI building - -```sh -env env RUSTFLAGS="-C target-cpu=native -g" FFI_BUILD_FROM_SOURCE=1 make clean deps all -sudo make install -``` - - -After installing Lotus, you can run the `lotus` command directly from your CLI to see usage documentation. Next, you can join the [Lotus Testnet](https://lotu.sh/en+join-testnet). diff --git a/documentation/en/install-systemd-services.md b/documentation/en/install-systemd-services.md deleted file mode 100644 index fbde1feec..000000000 --- a/documentation/en/install-systemd-services.md +++ /dev/null @@ -1,145 +0,0 @@ -# Use Lotus with systemd - -Lotus is capable of running as a systemd service daemon. You can find installable service files for systemd in the [lotus repo scripts directory](https://github.com/filecoin-project/lotus/tree/master/scripts) as files with `.service` extension. In order to install these service files, you can copy these `.service` files to the default systemd unit load path. - -The services expect their binaries to be present in `/usr/local/bin/`. You can use `make` to install them by running: - -```sh -$ sudo make install -``` - -for `lotus` and `lotus-storage-miner` and - -```sh -$ sudo make install-chainwatch -``` - -for the `chainwatch` tool. - -## Installing services via `make` - -If your host uses the default systemd unit load path, the `lotus-daemon` and `lotus-miner` services can be installed by running: - -```sh -$ sudo make install-services -``` - -To install the the `lotus-chainwatch` service run: - -```sh -$ sudo make install-chainwatch-service -``` - -You can install all services together by running: - -```sh -$ sudo make install-all-services -``` - -The `lotus-daemon` and the `lotus-miner` services can be installed individually too by running: - -```sh -$ sudo make install-daemon-service -``` - -and - -```sh -$ sudo make install-miner-service -``` - -### Notes - -When installing the `lotus-miner` and/or `lotus-chainwatch` service the `lotus-daemon` service gets automatically installed since the other two services depend on it being installed to run. - -All `install-*-service*` commands will install the latest binaries in the lotus build folders to `/usr/local/bin/`. If you do not want to use the latest build binaries please copy the `*.service` files by hand. - -## Removing via `make` - -All services can beremoved via `make`. To remove all services together run: - -```sh -$ sudo make clean-all-services -``` - -Individual services can be removed by running: - -```sh -$ sudo make clean-chainwatch-services -$ sudo make clean-miner-services -$ sudo make clean-daemon-services -``` - -### Notes - -The services will be stoppend and disabled when removed. - -Removing the `lotus-daemon` service will automatically remove the depending services `lotus-miner` and `lotus-chainwatch`. - - -## Controlling services - -All service can be controlled with the `systemctl`. A few basic control commands are listed below. To get detailed infos about the capabilities of the `systemctl` command please consult your distributions man pages by running: - -```sh -$ man systemctl -``` - -### Start/Stop services - -You can start the services by running: - -```sh -$ sudo systemctl start lotus-daemon -$ sudo systemctl start lotus-miner -$ sudo systemctl start lotus-chainwatch -``` - -and can be stopped by running: - -```sh -$ sudo systemctl stop lotus-daemon -$ sudo systemctl stop lotus-miner -$ sudo systemctl stop lotus-chainwatch -``` - -### Enabling services on startup - -To enable the services to run automatically on startup execute: - -```sh -$ sudo systemctl enable lotus-daemon -$ sudo systemctl enable lotus-miner -$ sudo systemctl enable lotus-chainwatch -``` - -To disable the services on startup run: - -```sh -$ sudo systemctl disable lotus-daemon -$ sudo systemctl disable lotus-miner -$ sudo systemctl disable lotus-chainwatch -``` -### Notes - -Systemd will not let services be enabled or started without their requirements. Starting the `lotus-chainwatch` and/or `lotus-miner` service with automatically start the `lotus-daemon` service (if installed!). Stopping the `lotus-daemon` service will stop the other two services. The same pattern is executed for enabling and disabling the services. - -## Interacting with service logs - -Logs from the services can be reviewed using `journalctl`. - -### Follow logs from a specific service unit - -```sh -$ sudo journalctl -u lotus-daemon -f -``` - -### View logs in reverse order - -```sh -$ sudo journalctl -u lotus-miner -r -``` - -### Log files - -Besides the systemd service logs all services save their own log files in `/var/log/lotus/`. diff --git a/documentation/en/installation/install-linux.md b/documentation/en/installation/install-linux.md new file mode 100644 index 000000000..6fe12996e --- /dev/null +++ b/documentation/en/installation/install-linux.md @@ -0,0 +1,129 @@ +# Linux installation + +This page will show you the steps to build and install Lotus in your Linux computer. + +## Dependencies + +### System dependencies + +First of all, building Lotus will require installing some system dependencies, usually provided by your distribution. + +For Arch Linux: + +```sh +sudo pacman -Syu opencl-icd-loader gcc git bzr jq pkg-config opencl-icd-loader opencl-headers +``` + +For Ubuntu: + +```sh +sudo apt update +sudo apt install mesa-opencl-icd ocl-icd-opencl-dev gcc git bzr jq pkg-config curl +sudo apt upgrade +``` + +For Fedora: + +```sh +sudo dnf -y update +sudo dnf -y install gcc git bzr jq pkgconfig mesa-libOpenCL mesa-libOpenCL-devel opencl-headers ocl-icd ocl-icd-devel clang llvm +``` + +For OpenSUSE: + +```sh +sudo zypper in gcc git jq make libOpenCL1 opencl-headers ocl-icd-devel clang llvm +sudo ln -s /usr/lib64/libOpenCL.so.1 /usr/lib64/libOpenCL.so +``` + +### Rustup + +Lotus needs [rustup](https://rustup.rs/): + +```sh +curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh +``` + +Please make sure your `$PATH` variable is correctly configured after the rustup installation so that `cargo` and `rustc` are found in their rustup-configured locations. + +### Go + +To build lotus you will need a working installation of **[Go1.14](https://golang.org/dl/)**. Follow the [installation instructions](https://golang.org/doc/install), which generally amount to: + +```sh +# Example! Check the installation instructions. +wget -c https://dl.google.com/go/go1.14.7.linux-amd64.tar.gz -O - | sudo tar -xz -C /usr/local +``` + +## Build and install Lotus + +With all the above, you are ready to build and install the Lotus suite (`lotus`, `lotus-miner` and `lotus-worker`): + +```sh +git clone https://github.com/filecoin-project/lotus.git +cd lotus/ +``` + +__IF YOU ARE IN CHINA__, set `export GOPROXY=https://goproxy.cn` before building + +Now, choose the network that you will be joining: + +* For `testnet`: `git checkout master` +* For `nerpa`: `git checkout ntwk-nerpa` +* For `butterfly`: `git checkout ntwk-butterfly` + +Once on the right branch, do: + +```sh +make clean install +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...). `lotus-miner` will use `$HOME/.lotusminer` respectively. See the *environment variables* section below for how to customize these. + +> Remeber to [move your Lotus folder](en+update) if you are switching between different networks, or there has been a network reset. + + +### Native Filecoin FFI + +Some newer processors (AMD Zen (and later), Intel Ice Lake) have support SHA extensions. To make full use of your processor's capabilities, make sure you set the following variables BEFORE building from source (as described above): + +```sh +export RUSTFLAGS="-C target-cpu=native -g" +export FFI_BUILD_FROM_SOURCE=1 +``` + +> __NOTE__: This method of building does not produce portable binaries! Make sure you run the binary in the same machine as you built it. + +### systemd service files + +Lotus provides Systemd service files. They can be installed with: + +```sh +make install-daemon-service +make install-miner-service +``` + +After that, you should be able to control Lotus using `systemctl`. + +## Troubleshooting + +This section mentions some of the common pitfalls for building Lotus. Check the [getting started](en+getting-started) section for more tips on issues when running the lotus daemon. + +### Build errors + +Please check the build logs closely. If you have a dirty state in your git branch make sure to: + +```sh +git checkout +git reset origin/ --hard +make clean +``` + +### Slow builds from China + +Users from China can speed up their builds by setting: + +```sh +export GOPROXY=https://goproxy.cn +``` diff --git a/documentation/en/install-lotus-macos.md b/documentation/en/installation/install-macos.md similarity index 85% rename from documentation/en/install-lotus-macos.md rename to documentation/en/installation/install-macos.md index 371832c96..ea9ecb8ca 100644 --- a/documentation/en/install-lotus-macos.md +++ b/documentation/en/installation/install-macos.md @@ -59,4 +59,4 @@ make clean && make all sudo make install ``` -After installing Lotus, you can run the `lotus` command directly from your CLI to see usage documentation. Next, you can join the [Lotus Testnet](https://lotu.sh/en+join-testnet). +After intalling Lotus you will be ready to [setup and run the daemon](en+setup.md). diff --git a/documentation/en/installation/installation.md b/documentation/en/installation/installation.md new file mode 100644 index 000000000..98534da92 --- /dev/null +++ b/documentation/en/installation/installation.md @@ -0,0 +1,39 @@ +# Installation + +Lotus can be installed in [Linux](en-install-linux) and [MacOS](en-install-macos) machines by building it from source. Windows is not supported yet. + +This section contains guides to install Lotus in the supported platforms. + +Lotus is made of 3 binaries: + +* `lotus`: the main [Lotus node](en+setup) (Lotus client) +* `lotus-miner`: an application specifically for [Filecoin mining](en+miner-setup) +* `lotus-worker`: an additional [application to offload some heavy-processing tasks](en+lotus-worker) from the Lotus Miner. + +These applications are written in Go, but also import several Rust libraries. Lotus does not distribute +pre-compiled builds. + +## Hardware requirements + +### For client nodes + +* 8GiB of RAM +* Recommended for syncing speed: CPU with support for *Intel SHA Extensions* (AMD since Zen microarchitecture, Intel since Ice Lake). +* Recommended for speed: SSD hard drive (the bigger the better) + +### For miners + +The following correspond to the latest testing configuration: + +* 2 TB of hard drive space +* 8 core CPU +* 128 GiB of RAM with 256 GiB of NVMe SSD storage for swap (or simply, more RAM). +* Recommended for speed: CPU with support for *Intel SHA Extensions* (AMD since Zen microarchitecture, Intel since Ice Lake). +* GPU for block mining. The following have been [confirmed to be fast enough](en+gpus): + +- GeForce RTX 2080 Ti +- GeForce RTX 2080 SUPER +- GeForce RTX 2080 +- GeForce GTX 1080 Ti +- GeForce GTX 1080 +- GeForce GTX 1060 diff --git a/documentation/en/installation/update.md b/documentation/en/installation/update.md new file mode 100644 index 000000000..5d76592c9 --- /dev/null +++ b/documentation/en/installation/update.md @@ -0,0 +1,72 @@ +# Updating and restarting Lotus + +Updating Lotus is as simple as rebuilding and re-installing the software as explained in the previous sections. + +You can verify which version of Lotus you are running with: + +```sh +lotus version +``` + +Make sure that you `git pull` the branch that corresponds to the network that your Lotus daemon is using: + +```sh +git pull origin +make clean +make all +sudo make install # if necessary +``` + +Finally, restart the Lotus Node and/or Lotus Miner(s). + +__CAVEAT__: If you are running miners: check if your miner is safe to shut down and restart: `lotus-miner proving info`. If any deadline shows a block height in the past, do not restart: + +In the following example, Deadline Open is 454 which is earlier than Current Epoch of 500. This miner should **not** be shut down or restarted. + +``` +$ sudo lotus-miner proving info +Miner: t01001 +Current Epoch: 500 +Proving Period Boundary: 154 +Proving Period Start: 154 (2h53m0s ago) +Next Period Start: 3034 (in 21h7m0s) +Faults: 768 (100.00%) +Recovering: 768 +Deadline Index: 5 +Deadline Sectors: 0 +Deadline Open: 454 (23m0s ago) +Deadline Close: 514 (in 7m0s) +Deadline Challenge: 434 (33m0s ago) +Deadline FaultCutoff: 384 (58m0s ago) +``` + +In this next example, the miner can be safely restarted because no Deadlines are earlier than Current Epoch of 497. You have ~45 minutes before the miner must be back online to declare faults (FaultCutoff). If the miner has no faults, you have about an hour. + +``` +$ sudo lotus-miner proving info +Miner: t01000 +Current Epoch: 497 +Proving Period Boundary: 658 +Proving Period Start: 658 (in 1h20m30s) +Next Period Start: 3538 (in 25h20m30s) +Faults: 0 (0.00%) +Recovering: 0 +Deadline Index: 0 +Deadline Sectors: 768 +Deadline Open: 658 (in 1h20m30s) +Deadline Close: 718 (in 1h50m30s) +Deadline Challenge: 638 (in 1h10m30s) +Deadline FaultCutoff: 588 (in 45m30s) +``` + +## Switching networks and network resets + +If you wish to switch to a different lotus network or there has been a network reset, you will need to: + +* Checkout the appropiate repository branch and rebuild +* Ensure you do not mix Lotus data (`LOTUS_PATH`, usually `~/.lotus`) from a previous or different network. For this, either: + * Rename the folder to something else or, + * Set a different `LOTUS_PATH` for the new network. +* Same for `~/.lotusminer` if you are running a miner. + +Note that deleting the Lotus data folder will wipe all the chain data, wallets and configuration, so think twice before taking any non-reversible action. diff --git a/documentation/en/join-testnet.md b/documentation/en/join-testnet.md deleted file mode 100644 index 6660d26d8..000000000 --- a/documentation/en/join-testnet.md +++ /dev/null @@ -1,93 +0,0 @@ -# Join Testnet - -## Introduction - -Anyone can set up a **Lotus Node** and connect to the **Lotus Testnet**. This is the best way to explore the current CLI and the **Filecoin Decentralized Storage Market**. - -## Note: Using the Lotus Node from China - -If you are trying to use `lotus` from China. You should set this **environment variable** on your machine: - -```sh -export IPFS_GATEWAY="https://proof-parameters.s3.cn-south-1.jdcloud-oss.com/ipfs/" -``` - -## Get started - -Start the **daemon** using the default configuration in `./build`: - -```sh -lotus daemon -``` - -In another terminal window, check your connection with peers: - -```sh -lotus net peers | wc -l -``` - -In order to connect to the network, you need to be connected to at least 1 peer. If you’re seeing 0 peers, read our [troubleshooting notes](https://lotu.sh/en+setup-troubleshooting). - -Make sure that you have a reasonable "open files limit" set on your machine, such as 10000. If you're seeing a lower value, such as 256 (default on macOS), read our [troubleshooting notes](https://lotu.sh/en+setup-troubleshooting) on how to update it prior to starting the Lotus daemon. - -## Chain sync - -While the daemon is running, the next requirement is to sync the chain. Run the command below to view the chain sync progress. To see current chain height, visit the [network stats page](https://stats.testnet.filecoin.io/). - -```sh -lotus sync wait -``` - -- This step will take anywhere between a few hours to a couple of days. -- You will be able to perform **Lotus Testnet** operations after it is finished. - -## Create your first address - -Initialize a new wallet: - -```sh -lotus wallet new -``` - -Sometimes your operating system may limit file name length to under 150 characters. You need to use a file system that supports long filenames. - -Here is an example of the response: - -```sh -t1aswwvjsae63tcrniz6x5ykvsuotlgkvlulnqpsi -``` - -- Visit the [faucet](http://spacerace.faucet.glif.io/) to add funds. -- Paste the address you created under REQUEST. -- Press the Request button. - -## Check wallet address balance - -Wallet balances in the Lotus Testnet are in **FIL**, the smallest denomination of FIL is an **attoFil**, where 1 attoFil = 10^-18 FIL. - -```sh -lotus wallet balance -``` - -You will not see any attoFIL in your wallet if your **chain** is not fully synced. - -## Send FIL to another wallet - -To send FIL to another wallet from your default account, use this command: - -``` -lotus send -``` - -## Configure your node's connectivity - -To effectively accept incoming storage & retrieval deals, your Lotus node needs to be accessible to other nodes on the network. To improve your connectivity, be sure to: - -- [Set the multiaddresses for you miner to listen on](https://docs.filecoin.io/mine/connectivity/#setting-multiaddresses) -- [Maintain a healthy peer count](https://docs.filecoin.io/mine/connectivity/#checking-peer-count) -- [Enable port forwarding](https://docs.filecoin.io/mine/connectivity/#port-forwarding) -- [Configure your public IP address and port](https://docs.filecoin.io/mine/connectivity/#setting-a-public-ip-address) - -## Monitor the dashboard - -To see the latest network activity, including **chain block height**, **block height**, **blocktime**, **total network power**, largest **block producer miner**, check out the [monitoring dashboard](https://stats.testnet.filecoin.io). diff --git a/documentation/en/miner-deals.md b/documentation/en/miner-deals.md deleted file mode 100644 index 0aee0e1af..000000000 --- a/documentation/en/miner-deals.md +++ /dev/null @@ -1,39 +0,0 @@ -# Information for Miners - -Here is how a miner can get set up to accept storage deals. The first step is -to install a Lotus node and sync to the top of the chain. - -## Set up an ask - -``` -lotus-miner set-price -``` - -This command will set up your miner to accept deal proposals that meet the input price. -The price is inputted in FIL per GiB per epoch, and the default is 0.0000000005. - -## Ensure you can be discovered - -Clients need to be able to find you in order to make storage deals with you. -While there isn't necessarily anything you need to do to become discoverable, here are some things you can -try to check that people can connect to you. - -To start off, make sure you are connected to at least some peers, and your port is -open and working. - -### Connect to your own node - -If you are in contact with someone else running Lotus, you can ask them to try connecting -to your node. To do so, provide them your peer ID, which you can get by running `lotus net id` on -your node. - -They can then try running `lotus net findpeer ` to get your address(es), and can then -run `lotus net connect
` to connect to you. If successful, your node will now -appear on their peers list (run `lotus net peers` to check). - -You can also check this by running a second instance of Lotus yourself. - -### Query your own ask - -A client should be able to find your ask by running `lotus client query-ask `. If -someone is not able to retrieve your ask by doing so, then there is an issue with your node. \ No newline at end of file diff --git a/documentation/en/mining.md b/documentation/en/mining.md deleted file mode 100644 index 32c3c51d2..000000000 --- a/documentation/en/mining.md +++ /dev/null @@ -1,149 +0,0 @@ -# Storage Mining - -Here are instructions to learn how to perform storage mining. For hardware specifications please read [this](https://lotu.sh/en+hardware-mining). - -It is useful to [join the Testnet](https://lotu.sh/en+join-testnet) prior to attempting storage mining for the first time. - -## Note: Using the Lotus Miner from China - -If you are trying to use `lotus-miner` from China. You should set this **environment variable** on your machine. - -```sh -export IPFS_GATEWAY="https://proof-parameters.s3.cn-south-1.jdcloud-oss.com/ipfs/" -``` - -## Get started - -Please ensure that at least one **BLS address** (starts with `t3`) in your wallet exists with the following command: - -```sh -lotus wallet list -``` - -If you do not have a bls address, create a new bls wallet: - -```sh -lotus wallet new bls -``` - -With your wallet address: - -- Visit the [faucet](http://spacerace.faucet.glif.io/) -- Paste the address you created under REQUEST. -- Press the Request button. -- Run `/lotus-miner init --owner= --worker=` - -You will have to wait some time for this operation to complete. - -## Mining - -To mine: - -```sh -lotus-miner run -``` - -If you are downloading **Filecoin Proof Parameters**, the download can take some time. - -Get information about your miner: - -```sh -lotus-miner info -# example: miner id `t0111` -``` - -**Seal** random data to start producing **PoSts**: - -```sh -lotus-miner sectors pledge -``` - -- Warning: On Linux configurations, this command will write data to `$TMPDIR` which is not usually the largest partition. You should point the value to a larger partition if possible. - -Get **miner power** and **sector usage**: - -```sh -lotus state power -# returns total power - -lotus state power - -lotus state sectors -``` - -## Performance tuning - -### `FIL_PROOFS_MAXIMIZE_CACHING=1` Environment variable - -This env var can be used with `lotus-miner`, `lotus-worker`, and `lotus-bench` to make the precommit1 step faster at the cost of some memory use (1x sector size) - -### `FIL_PROOFS_USE_GPU_COLUMN_BUILDER=1` Environment variable - -This env var can be used with `lotus-miner`, `lotus-worker`, and `lotus-bench` to enable experimental precommit2 GPU acceleration - -### Setting multiaddresses - -Set multiaddresses for the miner to listen on in a miner's `config.toml` file -(by default, it is located at `~/.lotusminer/config.toml`). The `ListenAddresses` in this file should be interface listen addresses (usually `/ip4/0.0.0.0/tcp/PORT`), and the `AnnounceAddresses` should match the addresses being passed to `set-addrs`. - -The addresses passed to `set-addrs` parameter in the commands below should be currently active and dialable; confirm they are before entering them. - -Once the config file has been updated, set the on-chain record of the miner's listen addresses: - -``` -lotus-miner actor set-addrs ... -``` - -This updates the `MinerInfo` object in the miner's actor, which will be looked up -when a client attempts to make a deal. Any number of addresses can be provided. - -Example: - -``` -lotus-miner actor set-addrs /ip4/123.123.73.123/tcp/12345 /ip4/223.223.83.223/tcp/23456 -``` - -# Separate address for windowPoSt messages - -WindowPoSt is the mechanism through which storage is verified in Filecoin. It requires miners to submit proofs for all sectors every 24h, which require sending messages to the chain. - -Because many other mining related actions require sending messages to the chain, and not all of those are "high value", it may be desirable to use a separate account to send PoSt messages from. This allows for setting lower GasFeeCaps on the lower value messages without creating head-of-line blocking problems for the PoSt messages in congested chain conditions - -To set this up, first create a new account, and send it some funds for gas fees: -```sh -lotus wallet new bls -t3defg... - -lotus send t3defg... 100 -``` - -Next add the control address -```sh -lotus-miner actor control set t3defg... -Add t3defg... -Pass --really-do-it to actually execute this action -``` - -Now actually set the addresses -```sh -lotus-miner actor control set --really-do-it t3defg... -Add t3defg... -Message CID: bafy2.. -``` - -Wait for the message to land on chain -```sh -lotus state wait-msg bafy2.. -... -Exit Code: 0 -... -``` - -Check miner control address list to make sure the address was correctly setup -```sh -lotus-miner actor control list -name ID key use balance -owner t01111 t3abcd... other 300 FIL -worker t01111 t3abcd... other 300 FIL -control-0 t02222 t3defg... post 100 FIL -``` diff --git a/documentation/en/mining/gpus.md b/documentation/en/mining/gpus.md new file mode 100644 index 000000000..ad0ed4f66 --- /dev/null +++ b/documentation/en/mining/gpus.md @@ -0,0 +1,17 @@ +# Benchmarking additional GPUs + +If you want to test a GPU that is not explicitly supported, set the following *environment variable*: + +```sh +BELLMAN_CUSTOM_GPU=":" +``` + +Here is an example of trying a GeForce GTX 1660 Ti with 1536 cores. + +```sh +BELLMAN_CUSTOM_GPU="GeForce GTX 1660 Ti:1536" +``` + +To get the number of cores for your GPU, you will need to check your card’s specifications. + +To perform the benchmark you can use Lotus' [benchmarking tool](https://github.com/filecoin-project/lotus/tree/master/cmd/lotus-bench). Results and discussion are tracked in a [GitHub issue thread](https://github.com/filecoin-project/lotus/issues/694). diff --git a/documentation/en/mining-lotus-worker.md b/documentation/en/mining/lotus-seal-worker.md similarity index 60% rename from documentation/en/mining-lotus-worker.md rename to documentation/en/mining/lotus-seal-worker.md index f93780c44..62dde9bfb 100644 --- a/documentation/en/mining-lotus-worker.md +++ b/documentation/en/mining/lotus-seal-worker.md @@ -2,24 +2,14 @@ The **Lotus Worker** is an extra process that can offload heavy processing tasks from your **Lotus Miner**. The sealing process automatically runs in the **Lotus Miner** process, but you can use the Worker on another machine communicating over a fast network to free up resources on the machine running the mining process. -## Note: Using the Lotus Worker from China +## Installation -If you are trying to use `lotus-worker` from China. You should set this **environment variable** on your machine: - -```sh -export IPFS_GATEWAY="https://proof-parameters.s3.cn-south-1.jdcloud-oss.com/ipfs/" -``` - -## Get Started - -Make sure that the `lotus-worker` is compiled and installed by running: - -```sh -make lotus-worker -``` +The `lotus-worker` application is installed along with the others when running `sudo make install` as shown in the [Installation section](en+install-linux). For simplicity, we recommend following the same procedure in the machines that will run the Lotus Workers (even if the Lotus miner and the Lotus daemon are not used there). ## Setting up the Miner +### Allow external connections to the miner API + First, you will need to ensure your `lotus-miner`'s API is accessible over the network. To do this, open up `~/.lotusminer/config.toml` (Or if you manually set `LOTUS_MINER_PATH`, look under that directory) and look for the API field. @@ -32,30 +22,49 @@ ListenAddress = "/ip4/127.0.0.1/tcp/2345/http" RemoteListenAddress = "127.0.0.1:2345" ``` -To make your node accessible over the local area network, you will need to determine your machines IP on the LAN, and change the `127.0.0.1` in the file to that address. +To make your node accessible over the local area network, you will need to determine your machine's IP on the LAN (`ip a`), and change the `127.0.0.1` in the file to that address. -A more permissive and less secure option is to change it to `0.0.0.0`. This will allow anyone who can connect to your computer on that port to access the [API](https://lotu.sh/en+api). They will still need an auth token. +A more permissive and less secure option is to change it to `0.0.0.0`. This will allow anyone who can connect to your computer on that port to access the miner's API, though they will still need an auth token. `RemoteListenAddress` must be set to an address which other nodes on your network will be able to reach. -Next, you will need to [create an authentication token](https://lotu.sh/en+api-scripting-support#generate-a-jwt-46). All Lotus APIs require authentication tokens to ensure your processes are as secure against attackers attempting to make unauthenticated requests to them. +### Create an authentication token -### Connect the Lotus Worker +Write down the output of: -On the machine that will run `lotus-worker`, set the `MINER_API_INFO` environment variable to `TOKEN:MINER_NODE_MULTIADDR`. Where `TOKEN` is the token we created above, and `NIMER_NODE_MULTIADDR` is the `multiaddr` of the **Lotus Miner** API that was set in `config.toml`. +```sh +lotus-miner auth api-info --perm admin +``` -Once this is set, run: +The Lotus Workers will need this token to connect to the miner. + +## Connecting the Lotus Workers + +On each machine that will run the `lotus-worker` application you will need to define the following *environment variable*: + +```sh +export MINER_API_INFO::/ip4//tcp/2345` +``` + +If you are trying to use `lotus-worker` from China. You should additionally set: + +```sh +export IPFS_GATEWAY="https://proof-parameters.s3.cn-south-1.jdcloud-oss.com/ipfs/" +``` + + +Once that is done, you can run the Worker with: ```sh lotus-worker run ``` -If you are running multiple workers on the same host, you will need to specify the `--listen` flag and ensure each worker is on a different port. +> If you are running multiple workers on the same host, you will need to specify the `--listen` flag and ensure each worker is on a different port. -To check that the **Lotus Worker** is connected to your **Lotus Miner**, run `lotus-miner sealing workers` and check that the remote worker count has increased. +On your Lotus miner, check that the workers are correctly connected: ```sh -why@computer ~/lotus> lotus-miner sealing workers +lotus-miner sealing workers Worker 0, host computer CPU: [ ] 0 core(s) in use RAM: [|||||||||||||||||| ] 28% 18.1 GiB/62.7 GiB @@ -69,9 +78,10 @@ Worker 1, host othercomputer GPU: GeForce RTX 2080, not used ``` -### Running locally for manually managing process priority +## Running locally for manually managing process priority You can also run the **Lotus Worker** on the same machine as your **Lotus Miner**, so you can manually manage the process priority. + To do so you have to first __disable all seal task types__ in the miner config. This is important to prevent conflicts between the two processes. You can then run the miner on your local-loopback interface; diff --git a/documentation/en/mining/managing-deals.md b/documentation/en/mining/managing-deals.md new file mode 100644 index 000000000..5f73a6a2d --- /dev/null +++ b/documentation/en/mining/managing-deals.md @@ -0,0 +1,19 @@ +# Managing deals + + +While the Lotus Miner is running as a daemon, the `lotus-miner` application can be used to manage and configure the miner: + + +```sh +lotus-miner storage-deals --help +``` + +Running the above command will show the different options related to deals. For example, `lotus-miner storage-deals set-ask` allows to set the price for storage that your miner uses to respond ask requests from clients. + +If deals are ongoing, you can check the data transfers with: + +```sh +lotus-miner data-transfers list +``` + +Make sure you explore the `lotus-miner` CLI. Every command is self-documented and takes a `--help` flag that offers specific information about it. diff --git a/documentation/en/mining/miner-setup.md b/documentation/en/mining/miner-setup.md new file mode 100644 index 000000000..cafa1e7b1 --- /dev/null +++ b/documentation/en/mining/miner-setup.md @@ -0,0 +1,241 @@ +# Miner setup + +This page will guide you through all you need to know to sucessfully run a **Lotus Miner**. Before proceeding, remember that you should be running the Lotus daemon on a fully synced chain. + +## Performance tweaks + +This is a list of performance tweaks to consider before starting the miner: + +### Building + +As [explained already](en+install-linux#native-filecoin-ffi-10) should have exported the following variables before building the Lotus applications: + +```sh +export RUSTFLAGS="-C target-cpu=native -g" +export FFI_BUILD_FROM_SOURCE=1 +``` + +### Environment + +For high performance mining, we recommend setting the following variables in your environment so that they are available when running any of the Lotus applications: + +```sh +# See https://github.com/filecoin-project/bellman +export BELLMAN_CPU_UTILIZATION=0.875 + +# See https://github.com/filecoin-project/rust-fil-proofs/ +export FIL_PROOFS_MAXIMIZE_CACHING=1 # More speed at RAM cost (1x sector-size of RAM - 32 GB). +export FIL_PROOFS_USE_GPU_COLUMN_BUILDER=1 # precommit2 GPU acceleration +export FIL_PROOFS_USE_GPU_TREE_BUILDER=1 +``` + +IF YOU ARE RUNNING FROM CHINA: + +```sh +export IPFS_GATEWAY="https://proof-parameters.s3.cn-south-1.jdcloud-oss.com/ipfs/" +``` + +IF YOUR MINER RUNS IN A DIFFERENT MACHINE AS THE LOTUS DAEMON: + +```sh +export FULLNODE_API_INFO=:/ip4//tcp//http +``` + +If you will be using systemd service files to run the Lotus daemon and miner, make sure you include these variables manually in the service files. + +### Adding swap + +If you have only 128GiB of RAM, you will need to make sure your system provides at least an extra 256GiB of fast swap (preferably NVMe SSD): + +```sh +sudo fallocate -l 256G /swapfile +sudo chmod 600 /swapfile +sudo mkswap /swapfile +sudo swapon /swapfile +# show current swap spaces and take note of the current highest priority +swapon --show +# append the following line to /etc/fstab (ensure highest priority) and then reboot +# /swapfile swap swap pri=50 0 0 +sudo reboot +# check a 256GB swap file is automatically mounted and has the highest priority +swapon --show +``` + +## Creating a new BLS wallet + +You will need a BLS wallet (`t3...`) for mining. To create it, if you don't have one already, run: + +```sh +lotus wallet new bls +``` + +Next make sure to [send some funds](en+wallet) to this address so that the miner setup can be completed. + +## Initializing the miner + +> SPACE RACE: +> To participate in the Space race, please register your miner: +> +> - Visit the [faucet](http://spacerace.faucet.glif.io/) +> - Paste the address you created under REQUEST. +> - Press the Request button. + +Now that you have a miner address you can initialize the Lotus Miner: + +```sh +lotus-miner init --owner= --no-local-storage +``` + +* The `--no-local-storage` flag is used so that we configure specific locations for storage later below. +* The init process will download over 100GiB of initialization parameters to /var/tmp/filecoin-proof-parameters. Make sure there is space or set `FIL_PROOFS_PARAMETER_CACHE` to somewhere else. +* The Lotus Miner configuration folder is created at `~/.lotusminer/` or `$LOTUS_MINER_PATH` if set. + +## Reachability + +Before you start your miner, it is __very important__ to configure it so that it is reachable from any peer in the Filecoin network. For this you will need a stable public IP and edit your `~/.lotusminer/config.toml` as follows: + +```toml +... +[Libp2p] + ListenAddresses = ["/ip4/0.0.0.0/tcp/24001"] # choose a fixed port + AnnounceAddresses = ["/ip4//tcp/24001"] # important! +... +``` + +Once you start your miner, make sure you can connect to its public IP/port (you can use `telnet`, `nc` for the task...). If you have an active firewall or some sort, you may need to additionally open ports in it. + + +## Starting the miner + +You are now ready to start your Lotus miner: + +```sh +lotus-miner run +``` + +or if you are using the systemd service file: + +```sh +systemctl start lotus-miner +``` + +> __Do not proceed__ from here until you have verified that your miner not only is running, but also __reachable on its public IP address__. + +## Publishing the miner addresses + +Once the miner is up and running, publish your miner address (which you configured above) on the chain (please ensure it is dialable): + +```sh +lotus-miner actor set-addrs /ip4//tcp/24001 +``` + +## Setting locations for sealing and long-term storage + +If you used the `--no-local-storage` flag during initialization, you can now specify the disk locations for sealing (SSD recommended) and long-term storage (otherwise you can skip this): + +``` +lotus-miner storage attach --init --seal +lotus-miner storage attach --init --store +lotus-miner storage list +``` + +## Pledging sectors + +If you would like to compete for block rewards by increasing your power in the network as soon as possible, you can optionally pledge one or several sectors, depending on your storage. It can also be used to test that the sealing process works correctly. Pledging is equivalent to storing random data instead of real data obtained through storage deals. + +> Note that pledging sectors to the mainnet network makes most sense when trying to obtain a reasonable amount of total power in the network, thus obtaining real chances to mine new blocks. Otherwise it is only useful for testing purposes. + +If you decide to go ahead, then do: + +```sh +lotus-miner sectors pledge +``` + +This will write data to `$TMPDIR` so make sure that there is enough space available. + +You shoud check that your sealing job has started with: + +```sh +lotus-miner sealing jobs +``` + +This will be accommpanied by a file in `/unsealed`. + +After some minutes, you can check the sealing progress with: + +```sh +lotus-miner sectors list +# and +lotus-miner sealing workers +``` + +When sealing for the new is complete, `pSet: NO` will become `pSet: YES`. + +Once the sealing is finished, you will want to configure how long it took your miner to seal this sector and configure the miner accordingly. To find out how long it took use: + +``` +lotus-miner sectors status --log 0 +``` + +Once you know, you can edit the Miner's `~/.lotusminer/config.toml` accordingly: + +``` +... +[Dealmaking] +... + ExpectedSealDuration = "12h0m0s" # The time it took your miner +``` + +You can also take the chance to edit other values, such as `WaitForDealsDelay` which specifies the delay between accepting the first deal and sealing, allowing to place multiple deals in the same sector. + +Once you are done editing the configuration, [restart your miner](en+update). + +If you wish to be able to re-use a pledged sector for real storage deals before the pledged period of 6 months ends, you will need to mark them for upgrade: + +```sh +lotus-miner sectors mark-for-upgrade +``` + +The sector should become inactive within 24 hours. From that point, the pledged storage can be re-used to store real data associated with real storage deals. + +## Separate address for windowPoSt messages + +WindowPoSt is the mechanism through which storage is verified in Filecoin. It requires miners to submit proofs for all sectors every 24h, which require sending messages to the chain. + +Because many other mining related actions require sending messages to the chain, and not all of those are "high value", it may be desirable to use a separate account to send PoSt messages from. This allows for setting lower GasFeeCaps on the lower value messages without creating head-of-line blocking problems for the PoSt messages in congested chain conditions + +To set this up, first create a new account, and send it some funds for gas fees: + +```sh +lotus wallet new bls +t3defg... + +lotus send t3defg... 100 +``` + +Next add the control address: + +```sh +lotus-miner actor control set --really-do-it t3defg... +Add t3defg... +Message CID: bafy2.. +``` + +Wait for the message to land on chain: + +```sh +lotus state wait-msg bafy2.. +... +Exit Code: 0 +... +``` + +Finally, check the miner control address list to make sure the address was correctly setup: + +```sh +lotus-miner actor control list +name ID key use balance +owner t01111 t3abcd... other 300 FIL +worker t01111 t3abcd... other 300 FIL +control-0 t02222 t3defg... post 100 FIL +``` diff --git a/documentation/en/mining-troubleshooting.md b/documentation/en/mining/mining-troubleshooting.md similarity index 90% rename from documentation/en/mining-troubleshooting.md rename to documentation/en/mining/mining-troubleshooting.md index 5aaf9f6ef..758929075 100644 --- a/documentation/en/mining-troubleshooting.md +++ b/documentation/en/mining/mining-troubleshooting.md @@ -25,7 +25,7 @@ lotus-miner info # WARN main lotus-storage-miner/main.go:73 failed to get api endpoint: (/Users/myrmidon/.lotusminer) %!w(*errors.errorString=&{API not running (no endpoint)}): ``` -If you see this, that means your **Lotus Miner** isn't ready yet. You need to finish [syncing the chain](https://lotu.sh/en+join-testnet). +If you see this, that means your **Lotus Miner** isn't ready yet. You need to finish [syncing the chain](en+setup#waiting-to-sync-370). ## Error: Your computer may not be fast enough @@ -57,10 +57,3 @@ make bench This process uses a fair amount of GPU, and generally takes ~4 minutes to complete. If you do not see any activity in nvtop from lotus during the entire process, it is likely something is misconfigured with your GPU. -## Checking Sync Progress - -You can use this command to check how far behind you are on syncing: - -```sh -date -d @$(./lotus chain getblock $(./lotus chain head) | jq .Timestamp) -``` diff --git a/documentation/en/mining/mining.md b/documentation/en/mining/mining.md new file mode 100644 index 000000000..b1b944c6e --- /dev/null +++ b/documentation/en/mining/mining.md @@ -0,0 +1,8 @@ +# Storage Mining + +This section of the documentation explains how to do storage mining with Lotus. Please note that not everyone can do storage mining, and that you should not attempt it on on networks where sector sizes are 32GB+ unless you meet the [hardware requirements](en+install#hardware-requirements-1). + +From this point we assume that you have setup and are running the [Lotus Node](en+setup), that it has fully synced the Filecoin chain and that you are familiar with how to interact with it using the `lotus` command-line interface. + +In order to perform storage mining, apart from the Lotus daemon, you will be additionally interacting with the `lotus-miner` and potentially the `lotus-worker` applications (which you should have [installed](en+install-linux) along the `lotus` application already). + diff --git a/documentation/en/retrieving-data.md b/documentation/en/retrieving-data.md deleted file mode 100644 index 7cb0e31be..000000000 --- a/documentation/en/retrieving-data.md +++ /dev/null @@ -1,27 +0,0 @@ -# Retrieving Data - -> There are recent bug reports with these instructions. If you happen to encounter any problems, please create a [GitHub issue](https://github.com/filecoin-project/lotus/issues/new) and a maintainer will address the problem as soon as they can. - -Here are the operations you can perform after you have stored and sealed a **Data CID** with the **Lotus Miner** in the network. - -If you would like to learn how to store a **Data CID** on a miner, read the instructions [here](https://lotu.sh/en+storing-data). - -## Find by Data CID - -```sh -lotus client find -# LOCAL -# RETRIEVAL @-- -``` - -## Retrieve by Data CID - -All fields are required. - -```sh -lotus client retrieve -``` - -If the outfile does not exist it will be created in the Lotus repository directory. - -This command will initiate a **retrieval deal** and write the data to your computer. This process may take 2 to 10 minutes. diff --git a/documentation/en/setting-a-static-port.md b/documentation/en/setting-a-static-port.md deleted file mode 100644 index 97ac6528e..000000000 --- a/documentation/en/setting-a-static-port.md +++ /dev/null @@ -1,54 +0,0 @@ -# Static Ports - -Depending on how your network is set up, you may need to set a static port to successfully connect to peers to perform storage deals with your **Lotus Miner**. - -## Setup - -To change the random **swarm port**, you may edit the `config.toml` file located under `$LOTUS_MINER_PATH`. The default location of this file is `$HOME/.lotusminer`. - -To change the port to `1347`: - -```sh -[Libp2p] - ListenAddresses = ["/ip4/0.0.0.0/tcp/1347", "/ip6/::/tcp/1347"] -``` - -After changing the port value, restart your **daemon**. - -## Announce Addresses - -If the **swarm port** is port-forwarded from another address, it is possible to control what addresses -are announced to the network. - -```sh -[Libp2p] - AnnounceAddresses = ["/ip4//tcp/1347"] -``` - -If non-empty, this array specifies the swarm addresses to announce to the network. If empty, the daemon will announce inferred swarm addresses. - -Similarly, it is possible to set `NoAnnounceAddresses` with an array of addresses to not announce to the network. - -## Ubuntu's Uncomplicated Firewall - -Open firewall manually: - -```sh -ufw allow 1347/tcp -``` - -Or open and modify the profile located at `/etc/ufw/applications.d/lotus-daemon`: - -```sh -[Lotus Daemon] -title=Lotus Daemon -description=Lotus Daemon firewall rules -ports=1347/tcp -``` - -Then run these commands: - -```sh -ufw update lotus-daemon -ufw allow lotus-daemon -``` diff --git a/documentation/en/storing-ipfs-integration.md b/documentation/en/store/adding-from-ipfs.md similarity index 79% rename from documentation/en/storing-ipfs-integration.md rename to documentation/en/store/adding-from-ipfs.md index 041364380..2f6b097cc 100644 --- a/documentation/en/storing-ipfs-integration.md +++ b/documentation/en/store/adding-from-ipfs.md @@ -1,10 +1,10 @@ -# IPFS Integration +# Adding data from IPFS Lotus supports making deals with data stored in IPFS, without having to re-import it into lotus. To enable this integration, you need to have an IPFS daemon running in the background. -Then, open up `~/.lotus/config.toml` (or if you manually set `LOTUS_PATH`, look under that directory) -and look for the Client field, and set `UseIpfs` to `true`. + +Then, open up `~/.lotus/config.toml` (or if you manually set `LOTUS_PATH`, look under that directory) and look for the Client field, and set `UseIpfs` to `true`. ```toml [Client] diff --git a/documentation/en/store/making-deals.md b/documentation/en/store/making-deals.md new file mode 100644 index 000000000..ca3a47182 --- /dev/null +++ b/documentation/en/store/making-deals.md @@ -0,0 +1,71 @@ +# Making storage deals + +## Adding a file to Lotus + +Before sending data to a Filecoin miner for storage, the data needs to be correctly formatted and packed. This can be achieved by locally importing the data into Lotus with: + +```sh +lotus client import ./your-example-file.txt +``` + +Upon success, this command will return a **Data CID**. This is a very important piece of information, as it will be used to make deals to both store and retrieve the data in the future. + +You can list the data CIDs of the files you locally imported with: + +```sh +lotus client local +``` + +## Storing data in the network + +To store data in the network you will need to: + +* Find a Filecoin miner willing to store it +* Make a deal with the miner agreeing on the price to pay and the duration for which the data should be stored. + +You can obtain a list of all miners in the network with: + +```sh +lotus state list-miners +t0xxxx +t0xxxy +t0xxxz +... +``` + +This will print a list of miner IDs. In order to ask for the terms offered by a particular miner, you can then run: + +```sh +lotus client query-ask +``` + +If you are satisfied with the terms, you can proceed to propose a deal to the miner, using the **Data CID** that you obtained during the import step: + + +```sh +lotus client deal +``` + +This command will interactively ask you for the CID, miner ID and duration in days for the deal. You can also call it with arguments: + +```sh +lotus client deal +``` + +where the `duration` is expressed in blocks (1 block is equivalent to 30s). + +## Checking the status of the deals + +You can list deals with: + +```sh +lotus client list-deals +``` + +Among other things, this will give you information about the current state on your deals, whether they have been published on chain (by the miners) and whether the miners have been slashed for not honoring them. + +For a deal to succeed, the miner needs to be correctly configured and running, accept the deal and *seal* the file correctly. Otherwise, the deal will appear in error state. + +You can make deals with multiple miners for the same data. + +Once a deal is sucessful and the data is *sealed*, it can be [retrieved](en+retrieving). diff --git a/documentation/en/store/retrieve.md b/documentation/en/store/retrieve.md new file mode 100644 index 000000000..1e8db65af --- /dev/null +++ b/documentation/en/store/retrieve.md @@ -0,0 +1,27 @@ +# Retrieving Data + +Once data has been succesfully [stored](en+making-deals) and sealed by a Filecoin miner, it can be retrieved. + +In order to do this we will need to create a **retrieval deal**. + +## Finding data by CID + +In order to retrieve some data you will need the **Data CID** that was used to create the storage deal. + +You can find who is storing the data by running: + +```sh +lotus client find +``` + +## Making a retrieval deal + +You can then make a retrieval deal with: + +```sh +lotus client retrieve +``` + +This commands take other optional flags (check `--help`). + +If the outfile does not exist it will be created in the Lotus repository directory. This process may take 2 to 10 minutes. diff --git a/documentation/en/storing-data-troubleshooting.md b/documentation/en/store/storage-troubleshooting.md similarity index 51% rename from documentation/en/storing-data-troubleshooting.md rename to documentation/en/store/storage-troubleshooting.md index c8a0254fa..7087ec3d0 100644 --- a/documentation/en/storing-data-troubleshooting.md +++ b/documentation/en/store/storage-troubleshooting.md @@ -2,11 +2,11 @@ ## Error: Routing: not found -```sh +``` WARN main lotus/main.go:72 routing: not found ``` -- This miner is offline. +This error means that the miner is offline. ## Error: Failed to start deal @@ -14,14 +14,17 @@ WARN main lotus/main.go:72 routing: not found WARN main lotus/main.go:72 failed to start deal: computing commP failed: generating CommP: Piece must be at least 127 bytes ``` -- There is a minimum file size of 127 bytes. +This error means that there is a minimum file size of 127 bytes. ## Error: 0kb file response during retrieval -In order to retrieve a file, it must be sealed. Miners can check sealing progress with this command: +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: ```sh lotus-miner sectors list ``` -When sealing is complete, `pSet: NO` will become `pSet: YES`. From now on the **Data CID** is [retrievable](https://lotu.sh/en+retrieving-data) from the **Lotus Miner**. +When sealing is complete, `pSet: NO` will become `pSet: YES`. + diff --git a/documentation/en/store/store.md b/documentation/en/store/store.md new file mode 100644 index 000000000..205bd0e23 --- /dev/null +++ b/documentation/en/store/store.md @@ -0,0 +1,11 @@ +# Storing and retrieving data + +Lotus enables you to store any data on the Filecoin network and retrieve it later. This is achieved by making *deals* with miners. + +A *storage deal* specifies that a miner should store ceratin data for a previously agreed period and price. + +Once a deal is made, the data is then sent to the miners, which regularly proves that it is storing it. If they fail to do so, the miner is penalized (slashed). + +The data can be retrieved with a *retrieval deal*. + +This section explains how to use Lotus to [store](en+making-deals) and [retrieve](en+retrieving) data from the Filecoin network. diff --git a/documentation/en/storing-data.md b/documentation/en/storing-data.md deleted file mode 100644 index 67d2b1533..000000000 --- a/documentation/en/storing-data.md +++ /dev/null @@ -1,62 +0,0 @@ -# Storing Data - -> There are recent bug reports with these instructions. If you happen to encounter any problems, please create a [GitHub issue](https://github.com/filecoin-project/lotus/issues/new) and a maintainer will address the problem as soon as they can. - -Here are instructions for how to store data on the **Lotus Testnet**. - -## Adding a file locally - -Adding a file locally allows you to make miner deals on the **Lotus Testnet**. - -```sh -lotus client import ./your-example-file.txt -``` - -Upon success, this command will return a **Data CID**. - -## List your local files - -The command to see a list of files by `CID`, `name`, `size` in bytes, and `status`: - -```sh -lotus client local -``` - -An example of the output: - -```sh -bafkreierupr5ioxn4obwly4i2a5cd2rwxqi6kwmcyyylifxjsmos7hrgpe Development/sample-1.txt 2332 ok -bafkreieuk7h4zs5alzpdyhlph4lxkefowvwdho3a3pml6j7dam5mipzaii Development/sample-2.txt 30618 ok -``` - -## Make a Miner Deal on Lotus Testnet - -Get a list of all miners that can store data: - -```sh -lotus state list-miners -``` - -Get the requirements of a miner you wish to store data with: - -```sh -lotus client query-ask -``` - -Store a **Data CID** with a miner: - -```sh -lotus client deal -``` - -Check the status of a deal: - -```sh -lotus client list-deals -``` - -- The `duration`, which represents how long the miner will keep your file hosted, is represented in blocks. Each block represents 25 seconds. - -Upon success, this command will return a **Deal CID**. - -The miner will need to **seal** the file before it can be retrieved. If the **Lotus Miner** is not running on a machine designed for sealing, the process will take a very long time. diff --git a/documentation/en/dev/WIP-arch-complementary-notes.md b/documentation/en/unclassified/WIP-arch-complementary-notes.md similarity index 100% rename from documentation/en/dev/WIP-arch-complementary-notes.md rename to documentation/en/unclassified/WIP-arch-complementary-notes.md diff --git a/documentation/en/block-validation.md b/documentation/en/unclassified/block-validation.md similarity index 100% rename from documentation/en/block-validation.md rename to documentation/en/unclassified/block-validation.md diff --git a/documentation/en/dev/create-miner.md b/documentation/en/unclassified/create-miner.md similarity index 100% rename from documentation/en/dev/create-miner.md rename to documentation/en/unclassified/create-miner.md diff --git a/documentation/en/dev-tools-pond-ui.md b/documentation/en/unclassified/dev-tools-pond-ui.md similarity index 100% rename from documentation/en/dev-tools-pond-ui.md rename to documentation/en/unclassified/dev-tools-pond-ui.md diff --git a/documentation/en/sealing-procs.md b/documentation/en/unclassified/sealing-procs.md similarity index 100% rename from documentation/en/sealing-procs.md rename to documentation/en/unclassified/sealing-procs.md diff --git a/documentation/en/updating-lotus.md b/documentation/en/updating-lotus.md deleted file mode 100644 index 862cea136..000000000 --- a/documentation/en/updating-lotus.md +++ /dev/null @@ -1,14 +0,0 @@ -# Updating Lotus - -If you installed Lotus on your machine, you can upgrade to the latest version by doing the following: - -```sh -# get the latest -git pull origin master - -# clean and remake the binaries -make clean && make build - -# instal binaries in correct location -make install # or sudo make install if necessary -``` From a153e1d5862b67a031fe7ee7306a7e430c517187 Mon Sep 17 00:00:00 2001 From: Hector Sanjuan Date: Mon, 31 Aug 2020 21:18:50 +0200 Subject: [PATCH 02/13] Fix #2334: Specify seal options to disable with co-located storage worker --- documentation/en/mining/lotus-seal-worker.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/documentation/en/mining/lotus-seal-worker.md b/documentation/en/mining/lotus-seal-worker.md index 62dde9bfb..47e201ca5 100644 --- a/documentation/en/mining/lotus-seal-worker.md +++ b/documentation/en/mining/lotus-seal-worker.md @@ -82,7 +82,15 @@ Worker 1, host othercomputer You can also run the **Lotus Worker** on the same machine as your **Lotus Miner**, so you can manually manage the process priority. -To do so you have to first __disable all seal task types__ in the miner config. This is important to prevent conflicts between the two processes. +To do so you have to first __disable all seal task types__ in the miner config. This is important to prevent conflicts between the two processes: + +```toml +[Storage] + AllowPreCommit1 = false + AllowPreCommit2 = false + AllowCommit = false + AllowUnseal = false +``` You can then run the miner on your local-loopback interface; From af38c902f88d5c7be13f24eca4e8d19b395e963f Mon Sep 17 00:00:00 2001 From: Hector Sanjuan Date: Tue, 1 Sep 2020 15:12:07 +0200 Subject: [PATCH 03/13] Fix architecture entry --- documentation/en/.library.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/en/.library.json b/documentation/en/.library.json index 87c7353c1..59cc01e29 100644 --- a/documentation/en/.library.json +++ b/documentation/en/.library.json @@ -193,7 +193,7 @@ { "title": "Lotus Architecture (WIP)", "slug": "en+arch", - "github": "en/architectiure/architecture.md", + "github": "en/architecture/architecture.md", "value": null, "posts": [ { From bd0c6a4cccd5a5e21ae3f4939cf9d8822ea9ca37 Mon Sep 17 00:00:00 2001 From: Hector Sanjuan Date: Thu, 3 Sep 2020 16:35:55 +0200 Subject: [PATCH 04/13] Fix filename --- documentation/en/building/api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/en/building/api.md b/documentation/en/building/api.md index 626193ee2..3a2c2902b 100644 --- a/documentation/en/building/api.md +++ b/documentation/en/building/api.md @@ -19,7 +19,7 @@ Lotus uses its own Go library implementation of [JSON-RPC](https://github.com/fi ## cURL example -To demonstrate making an API request, we will take the method `ChainHead` from [api/api.go](https://github.com/filecoin-project/lotus/blob/master/api/api_full.go). +To demonstrate making an API request, we will take the method `ChainHead` from [api/api_full.go](https://github.com/filecoin-project/lotus/blob/master/api/api_full.go). ```go ChainHead(context.Context) (*types.TipSet, error) From a4fd356fcbc20f38657c128ceb291c2db42f150a Mon Sep 17 00:00:00 2001 From: Hector Sanjuan Date: Thu, 17 Sep 2020 20:35:19 +0200 Subject: [PATCH 05/13] Delete most docs. Update about page with links to docs.filecoin.io --- documentation/en/.glossary.json | 147 +- documentation/en/.library.json | 202 +- documentation/en/about.md | 19 +- documentation/en/building/api-methods.md | 4567 ----------------- .../en/building/api-troubleshooting.md | 36 - documentation/en/building/api.md | 38 - documentation/en/building/building.md | 5 - documentation/en/building/jaeger-tracing.md | 26 - documentation/en/building/local-devnet.md | 54 - documentation/en/building/payment-channels.md | 111 - documentation/en/building/remote-api.md | 69 - .../en/getting-started/getting-started.md | 3 - .../getting-started/setup-troubleshooting.md | 57 - documentation/en/getting-started/setup.md | 169 - documentation/en/getting-started/wallet.md | 58 - .../en/installation/install-linux.md | 129 - .../en/installation/install-macos.md | 62 - documentation/en/installation/installation.md | 39 - documentation/en/installation/update.md | 72 - documentation/en/mining/gpus.md | 17 - documentation/en/mining/lotus-seal-worker.md | 99 - documentation/en/mining/managing-deals.md | 19 - documentation/en/mining/miner-setup.md | 241 - .../en/mining/mining-troubleshooting.md | 59 - documentation/en/mining/mining.md | 8 - documentation/en/store/adding-from-ipfs.md | 20 - documentation/en/store/making-deals.md | 71 - documentation/en/store/retrieve.md | 27 - .../en/store/storage-troubleshooting.md | 30 - documentation/en/store/store.md | 11 - 30 files changed, 14 insertions(+), 6451 deletions(-) delete mode 100644 documentation/en/building/api-methods.md delete mode 100644 documentation/en/building/api-troubleshooting.md delete mode 100644 documentation/en/building/api.md delete mode 100644 documentation/en/building/building.md delete mode 100644 documentation/en/building/jaeger-tracing.md delete mode 100644 documentation/en/building/local-devnet.md delete mode 100644 documentation/en/building/payment-channels.md delete mode 100644 documentation/en/building/remote-api.md delete mode 100644 documentation/en/getting-started/getting-started.md delete mode 100644 documentation/en/getting-started/setup-troubleshooting.md delete mode 100644 documentation/en/getting-started/setup.md delete mode 100644 documentation/en/getting-started/wallet.md delete mode 100644 documentation/en/installation/install-linux.md delete mode 100644 documentation/en/installation/install-macos.md delete mode 100644 documentation/en/installation/installation.md delete mode 100644 documentation/en/installation/update.md delete mode 100644 documentation/en/mining/gpus.md delete mode 100644 documentation/en/mining/lotus-seal-worker.md delete mode 100644 documentation/en/mining/managing-deals.md delete mode 100644 documentation/en/mining/miner-setup.md delete mode 100644 documentation/en/mining/mining-troubleshooting.md delete mode 100644 documentation/en/mining/mining.md delete mode 100644 documentation/en/store/adding-from-ipfs.md delete mode 100644 documentation/en/store/making-deals.md delete mode 100644 documentation/en/store/retrieve.md delete mode 100644 documentation/en/store/storage-troubleshooting.md delete mode 100644 documentation/en/store/store.md diff --git a/documentation/en/.glossary.json b/documentation/en/.glossary.json index e8a9e0846..0967ef424 100644 --- a/documentation/en/.glossary.json +++ b/documentation/en/.glossary.json @@ -1,146 +1 @@ -{ - "bellman": { - "title": "Bellman", - "value": "Bellman is a rust crate for building zk-SNARK circuits. It provides circuit traits and primitive structures, as well as basic gadget implementations such as booleans and number abstractions." - }, - "nvme": { - "title": "NVMe", - "value": "(non-volatile memory express) is a host controller interface and storage protocol created to accelerate the transfer of data between enterprise and client systems and solid-state drives (SSDs) over a computer's high-speed Peripheral Component Interconnect Express (PCIe) bus." - }, - "multiaddr": { - "title": "Multiaddr", - "value": "Multiaddr is a format for encoding addresses from various well-established network protocols. It is useful to write applications that future-proof their use of addresses, and allow multiple transport protocols and addresses to coexist." - }, - "attofil": { - "title": "attoFIL", - "value": "AttoFIL is a word used to describe 10^-18 FIL. The word atto comes from the Norwegian and Danish term: atten eighteen." - }, - "fil": { - "title": "FIL", - "value": "A ticker symbol is an abbreviation used to uniquely identify Filecoin when it is used in a wallet exchange or a cryptocurrency exchange." - }, - "epost": { - "title": "Election Proof-of-Spacetime", - "value": "Election Proof-of-Spacetime couples the Proof-of-Spacetime process with block production, meaning that in order to produce a block, the miner must produce a valid Proof-of-Spacetime proof (snark output)." - }, - "jwt": { - "title": "JWT", - "value": "JSON Web Tokens are an open, industry standard RFC 7519 method for representing claims securely between two parties." - }, - "json-rpc": { - "title": "JSON-RPC", - "value": "JSON-RPC is a remote procedure call protocol encoded in JSON. It is a very simple protocol (and very similar to XML-RPC), defining only a few data types and commands." - }, - "bls-address": { - "title": "BLS Signature (Address)", - "value": "A Boneh–Lynn–Shacham (BLS) signature is a digital signature scheme that allows a user to determine the authenticity of a signer, and is a commonly used signature scheme in the Filecoin Distributed Storage Network." - }, - "faucet": { - "title": "Filecoin Test Faucet", - "value": "A webpage where you can get free test Filecoin to participate in the Testnet." - }, - "chain": { - "title": "Chain", - "value": "The Filecoin Blockchain is a distributed virtual machine that achieves consensus, processes messages, accounts for storage, and maintains security in the Filecoin Protocol. It is the main interface linking various actors in the Filecoin system." - }, - "miner-power": { - "title": "Miner Power", - "value": "Miner storage in relation to network storage, tracked in the power table." - }, - "sector": { - "title": "Sector", - "value": "A fixed-size block of data of SECTOR_SIZE bytes which generally contains client's data." - }, - "sealing": { - "title": "Sealing", - "value": "A slow encoding process that returns commitments and proofs for data being stored in a sector." - }, - "seal": { - "title": "Seal", - "value": "A slow encoding process that returns commitments and proofs for data being stored in a sector." - }, - "posts": { - "title": "Proof-of-Spacetime(s)", - "value": "Filecoin is a protocol token whose blockchain runs on a novel proof, called Proof-of-Spacetime, where blocks are created by miners that are storing data." - }, - "filecoin-testnet": { - "title": "Filecoin Testnet", - "value": "Until we launch, we are making lots of changes to Lotus. The Testnet is expected to bring a few significant fixes/improvements. During Testnet, you can retrieve test filecoin from our network faucet to use as collateral to start mining. Test filecoin do not have any value – the official filecoin tokens will not be released until Mainnet launch." - }, - "filecoin-decentralized-storage-market": { - "title": "Filecoin Decentralized Storage Market", - "value": "Storage Market subsystem is the data entry point into the network. Miners only earn power from data stored in a storage deal and all deals live on the Filecoin network." - }, - "filecoin-proof-parameters": { - "title": "Filecoin Proof Parameters", - "value": "The proving algorithms rely on a large binary parameter file." - }, - "lotus-devnet": { - "title": "DevNet", - "value": "On the DevNets, you can store data as a storage client and also try how Filecoin mining works. The devnets are an important development tool for those who anticipate building applications on top of the Filecoin protocol or storing data on the decentralized storage market. " - }, - "filecoin-distributed-storage-network": { - "title": "Filecoin Distributed Storage Network", - "value": "Filecoin is a distributed storage network based on a blockchain mechanism. Filecoin miners can elect to provide storage capacity for the network, and thereby earn units of the Filecoin cryptocurrency (FIL) by periodically producing cryptographic proofs that certify that they are providing the capacity specified." - }, - "lotus-node": { - "title": "Lotus Node", - "value": "The Lotus Node is full of capabilities. It runs the Blockchain system, makes retrieval deals, does data transfer, supports block producer logic, and syncs and validates the chain." - }, - "block-rewards": { - "title": "Block Reward", - "value": "Over the entire lifetime of the protocol, 1,400,000,000 FIL (TotalIssuance) will be given out to miners. The rate at which the funds are given out is set to halve every six years, smoothly (not a fixed jump like in Bitcoin)." - }, - "block-producer-miner": { - "title": "Miner (Block Producer)", - "value": "The Block Producer Miner's logic. It currently shares an interface and process with the Lotus Node. A Block Producer chooses which messages to include in a block and is rewarded according to each message’s gas price and consumption, forming a market." - }, - "lotus-miner": { - "title": "Miner (lotus-miner)", - "value": "The Miner's logic. It has its own dedicated process. Contributes to the network through Sector commitments and Proofs of Spacetime to prove that it is storing the sectors it has commited to." - }, - "swarm-port": { - "title": "Swarm Port (Libp2p)", - "value": "The LibP2P Swarm manages groups of connections to peers, handles incoming and outgoing streams, and is part of the miners implementation. The port value is part of the Host interface." - }, - "daemon": { - "title": "Lotus Daemon", - "value": "A Daemon is a program that runs as a background process. A Daemon in the context of the Filecoin Distributed Storage Network may enable applications to communicate with peers, handle protocols, participate in pubsub, and interact with a distributed hash table (DHT)." - }, - "storage-deal": { - "title": "Storage deal", - "value": "One of the two types of deals in Filecoin markets. Storage deals are recorded on the blockchain and enforced by the protocol." - }, - "retrieval-deal": { - "title": "Retrieval deal", - "value": "One of the two types of deals in Filecoin markets. Retrieval deals are off chain and enabled by micropayment channel by transacting parties." - }, - "deal-cid": { - "title": "Deal CID", - "value": "CID is a format for referencing content in distributed information systems, it is a way to store information so it can be retrieved based on its content, not its location. DealCID specifically is used in storage deals." - }, - "data-cid": { - "title": "Data CID", - "value": "CID is a format for referencing content in distributed information systems, it is a way to store information so it can be retrieved based on its content, not its location. DataCID specifically is used to represent the file that is stored in the Filecoin Distributed Storage Network." - }, - "cid": { - "title": "CID", - "value": "A CID is a self-describing content-addressed identifier. It uses cryptographic hashes to achieve content addressing. It uses several multiformats to achieve flexible self-description, namely multihash for hashes, multicodec for data content types, and multibase to encode the CID itself into strings." - }, - "total-network-power": { - "title": "Total Network Power", - "value": "A reference to all the Power Tables for every subchain, accounting for each Lotus Miner on chain." - }, - "chain-block-height": { - "title": "Chain Block Height", - "value": "Chain block height is defined as the number of blocks in the chain between any given block and the very first block in the blockchain." - }, - "block-height": { - "title": "Block Height", - "value": "Height of the Merkle Tree of a sector. A sector is a contiguous array of bytes that a miner puts together, seals, and performs Proofs of Spacetime on." - }, - "blocktime": { - "title": "Blocktime", - "value": "The time it takes for a Block to propagate to the whole network." - } -} +{} diff --git a/documentation/en/.library.json b/documentation/en/.library.json index 59cc01e29..e31f09950 100644 --- a/documentation/en/.library.json +++ b/documentation/en/.library.json @@ -2,194 +2,11 @@ "posts": [ { "title": "About Lotus", - "slug": "en+lotus", + "slug": "", "github": "en/about.md", "value": null, "posts": [] }, - { - "title": "Installation", - "slug": "en+install", - "github": "en/installation/installation.md", - "value": null, - "posts": [ - { - "title": "Linux installation", - "slug": "en+install-linux", - "github": "en/installation/install-linux.md", - "value": null - }, - { - "title": "MacOS installation", - "slug": "en+install-macos", - "github": "en/installation/install-macos.md", - "value": null - }, - { - "title": "Updating Lotus", - "slug": "en+update", - "github": "en/installation/update.md", - "value": null - } - ] - }, - { - "title": "Getting started", - "slug": "en+getting-started", - "github": "en/getting-started/getting-started.md", - "value": null, - "posts": [ - { - "title": "Setting up Lotus", - "slug": "en+setup", - "github": "en/getting-started/setup.md", - "value": null - }, - { - - "title": "Obtaining and sending FIL", - "slug": "en+wallet", - "github": "en/getting-started/wallet.md", - "value": null - }, - { - "title": "Setup troubleshooting", - "slug": "en+setup-troubleshooting", - "github": "en/getting-started/setup-troubleshooting.md", - "value": null - } - ] - }, - { - "title": "Storing and retrieving data", - "slug": "en+store", - "github": "en/store/store.md", - "value": null, - "posts": [ - { - "title": "Making storage deals", - "slug": "en+making-deals", - "github": "en/store/making-deals.md", - "value": null - }, - { - "title": "Adding data from IPFS", - "slug": "en+adding-from-ipfs", - "github": "en/store/adding-from-ipfs.md", - "value": null - }, - { - "title": "Retrieving data", - "slug": "en+retriving", - "github": "en/store/retrieve.md", - "value": null - }, - { - "title": "Storage Troubleshooting", - "slug": "en+storage-troubleshooting", - "github": "en/store/storage-troubleshooting.md", - "value": null - } - ] - }, - { - "title": "Storage mining", - "slug": "en+mining", - "github": "en/mining/mining.md", - "value": null, - "posts": [ - { - "title": "Miner setup", - "slug": "en+miner-setup", - "github": "en/mining/miner-setup.md", - "value": null - }, - { - "title": "Managing deals", - "slug": "en+managing-deals", - "github": "en/mining/managing-deals.md", - "value": null - }, - { - "title": "Lotus Worker", - "slug": "en+lotus-worker", - "github": "en/mining/lotus-seal-worker.md", - "value": null - }, - { - "title": "Benchmarking GPUs", - "slug": "en+gpus", - "github": "en/mining/gpus.md", - "value": null - }, - { - "title": "Mining Troubleshooting", - "slug": "en+mining-troubleshooting", - "github": "en/mining/mining-troubleshooting.md", - "value": null - } - ] - }, - { - "title": "Building", - "slug": "en+building", - "github": "en/building/building.md", - "value": null, - "posts": [ - { - "title": "Setting up remote API access", - "slug": "en+remote-api", - "github": "en/building/remote-api.md", - "value": null, - "posts": [] - }, - { - "title": "API endpoints and methods", - "slug": "en+api", - "github": "en/building/api.md", - "value": null, - "posts": [] - }, - { - "title": "API Reference", - "slug": "en+api-methods", - "github": "en/building/api-methods.md", - "value": null, - "posts": [] - }, - - { - "title": "Payment Channels", - "slug": "en+payment-channels", - "github": "en/building/payment-channels.md", - "value": null, - "posts": [] - }, - - { - "title": "Running a local devnet", - "slug": "en+local-devnet", - "github": "en/building/local-devnet.md", - "value": null, - "posts": [] - }, - { - "title": "Jaeger Tracing", - "slug": "en+jaeger-tracing", - "github": "en/building/jaeger-tracing.md", - "value": null, - "posts": [] - }, - - { - "title": "API Troubleshooting", - "slug": "en+api-troubleshooting", - "github": "en/building/api-troubleshooting.md", - "value": null, - "posts": [] - } - ] - }, { "title": "Lotus Architecture (WIP)", "slug": "en+arch", @@ -203,23 +20,6 @@ "value": null } ] - }, - { - "title": "FAQs", - "slug": "en+faqs", - "github": "en/faqs.md", - "value": null, - "posts": [] - }, - { - "title": "Glossary", - "slug": "en+glossary", - "github": "en/.glossary.json", - "value": null, - "custom": { - "glossary": true - }, - "posts": [] } ] } diff --git a/documentation/en/about.md b/documentation/en/about.md index ee8536ac9..f2051e00b 100644 --- a/documentation/en/about.md +++ b/documentation/en/about.md @@ -2,13 +2,18 @@ Lotus is an implementation of the **Filecoin Distributed Storage Network**. -The **Lotus Node** (and the mining applications) can be built to join any of the [Filecoin networks](https://docs.filecoin.io/how-to/networks/). +It is written in Go and provides a suite of command-line applications: -For more details about Filecoin, check out the [Filecoin Docs](https://docs.filecoin.io) and [Filecoin Spec](https://filecoin-project.github.io/specs/). +- Lotus Node (`lotus`): a Filecoin Node: validates network transactions, manages a FIL wallet, can perform storage and retrieval deals. +- Lotus Miner (`lotus-miner`): a Filecoin miner. See the the respective Lotus Miner section in the Mine documentation. +- Lotus Worker (`lotus-worker`): a worker that assists miners to perform mining-related tasks. See its respective guide for more information. -## What can I learn here? +The [Lotus user documentation](https://docs.filecoin.io/get-started/lotus) is part of the [Filecoin documentation site](https://docs.filecoin.io): + +* To install and get started with Lotus, visit the [Get Started section](https://docs.filecoin.io/get-started/lotus). +* Information about how to perform deals on the Filecoin network using Lotus can be found in the [Store section](https://docs.filecoin.io/store/lotus). +* Miners looking to provide storage to the Network can find the latest guides in the [Mine section](https://docs.filecoin.io/mine/lotus). +* Developers and integrators that wish to use the Lotus APIs can start in the [Build section](https://docs.filecoin.io/mine/lotus). + +For more details about Filecoin, check out the [Filecoin Docs](https://docs.filecoin.io) and [Filecoin Spec](https://spec.filecoin.io/). -* How to [install](en+installation) and [setup](en+setup) the Lotus software -* How to [store data on the Filecoin network](en+store) -* How to [setup a high performance FIL miner](en+miner-setup) -* How to [configure and access Lotus APIs](en+remote-api) diff --git a/documentation/en/building/api-methods.md b/documentation/en/building/api-methods.md deleted file mode 100644 index 2f3164bb7..000000000 --- a/documentation/en/building/api-methods.md +++ /dev/null @@ -1,4567 +0,0 @@ -# Groups -* [](#) - * [Closing](#Closing) - * [Shutdown](#Shutdown) - * [Version](#Version) -* [Auth](#Auth) - * [AuthNew](#AuthNew) - * [AuthVerify](#AuthVerify) -* [Beacon](#Beacon) - * [BeaconGetEntry](#BeaconGetEntry) -* [Chain](#Chain) - * [ChainExport](#ChainExport) - * [ChainGetBlock](#ChainGetBlock) - * [ChainGetBlockMessages](#ChainGetBlockMessages) - * [ChainGetGenesis](#ChainGetGenesis) - * [ChainGetMessage](#ChainGetMessage) - * [ChainGetNode](#ChainGetNode) - * [ChainGetParentMessages](#ChainGetParentMessages) - * [ChainGetParentReceipts](#ChainGetParentReceipts) - * [ChainGetPath](#ChainGetPath) - * [ChainGetRandomnessFromBeacon](#ChainGetRandomnessFromBeacon) - * [ChainGetRandomnessFromTickets](#ChainGetRandomnessFromTickets) - * [ChainGetTipSet](#ChainGetTipSet) - * [ChainGetTipSetByHeight](#ChainGetTipSetByHeight) - * [ChainHasObj](#ChainHasObj) - * [ChainHead](#ChainHead) - * [ChainNotify](#ChainNotify) - * [ChainReadObj](#ChainReadObj) - * [ChainSetHead](#ChainSetHead) - * [ChainStatObj](#ChainStatObj) - * [ChainTipSetWeight](#ChainTipSetWeight) -* [Client](#Client) - * [ClientCalcCommP](#ClientCalcCommP) - * [ClientDataTransferUpdates](#ClientDataTransferUpdates) - * [ClientDealSize](#ClientDealSize) - * [ClientFindData](#ClientFindData) - * [ClientGenCar](#ClientGenCar) - * [ClientGetDealInfo](#ClientGetDealInfo) - * [ClientGetDealUpdates](#ClientGetDealUpdates) - * [ClientHasLocal](#ClientHasLocal) - * [ClientImport](#ClientImport) - * [ClientListDataTransfers](#ClientListDataTransfers) - * [ClientListDeals](#ClientListDeals) - * [ClientListImports](#ClientListImports) - * [ClientMinerQueryOffer](#ClientMinerQueryOffer) - * [ClientQueryAsk](#ClientQueryAsk) - * [ClientRemoveImport](#ClientRemoveImport) - * [ClientRetrieve](#ClientRetrieve) - * [ClientRetrieveTryRestartInsufficientFunds](#ClientRetrieveTryRestartInsufficientFunds) - * [ClientRetrieveWithEvents](#ClientRetrieveWithEvents) - * [ClientStartDeal](#ClientStartDeal) -* [Gas](#Gas) - * [GasEstimateFeeCap](#GasEstimateFeeCap) - * [GasEstimateGasLimit](#GasEstimateGasLimit) - * [GasEstimateGasPremium](#GasEstimateGasPremium) - * [GasEstimateMessageGas](#GasEstimateMessageGas) -* [I](#I) - * [ID](#ID) -* [Log](#Log) - * [LogList](#LogList) - * [LogSetLevel](#LogSetLevel) -* [Market](#Market) - * [MarketEnsureAvailable](#MarketEnsureAvailable) -* [Miner](#Miner) - * [MinerCreateBlock](#MinerCreateBlock) - * [MinerGetBaseInfo](#MinerGetBaseInfo) -* [Mpool](#Mpool) - * [MpoolClear](#MpoolClear) - * [MpoolGetConfig](#MpoolGetConfig) - * [MpoolGetNonce](#MpoolGetNonce) - * [MpoolPending](#MpoolPending) - * [MpoolPush](#MpoolPush) - * [MpoolPushMessage](#MpoolPushMessage) - * [MpoolSelect](#MpoolSelect) - * [MpoolSetConfig](#MpoolSetConfig) - * [MpoolSub](#MpoolSub) -* [Msig](#Msig) - * [MsigAddApprove](#MsigAddApprove) - * [MsigAddCancel](#MsigAddCancel) - * [MsigAddPropose](#MsigAddPropose) - * [MsigApprove](#MsigApprove) - * [MsigCancel](#MsigCancel) - * [MsigCreate](#MsigCreate) - * [MsigGetAvailableBalance](#MsigGetAvailableBalance) - * [MsigGetVested](#MsigGetVested) - * [MsigPropose](#MsigPropose) - * [MsigSwapApprove](#MsigSwapApprove) - * [MsigSwapCancel](#MsigSwapCancel) - * [MsigSwapPropose](#MsigSwapPropose) -* [Net](#Net) - * [NetAddrsListen](#NetAddrsListen) - * [NetAgentVersion](#NetAgentVersion) - * [NetAutoNatStatus](#NetAutoNatStatus) - * [NetBandwidthStats](#NetBandwidthStats) - * [NetBandwidthStatsByPeer](#NetBandwidthStatsByPeer) - * [NetBandwidthStatsByProtocol](#NetBandwidthStatsByProtocol) - * [NetConnect](#NetConnect) - * [NetConnectedness](#NetConnectedness) - * [NetDisconnect](#NetDisconnect) - * [NetFindPeer](#NetFindPeer) - * [NetPeers](#NetPeers) - * [NetPubsubScores](#NetPubsubScores) -* [Paych](#Paych) - * [PaychAllocateLane](#PaychAllocateLane) - * [PaychAvailableFunds](#PaychAvailableFunds) - * [PaychAvailableFundsByFromTo](#PaychAvailableFundsByFromTo) - * [PaychCollect](#PaychCollect) - * [PaychGet](#PaychGet) - * [PaychGetWaitReady](#PaychGetWaitReady) - * [PaychList](#PaychList) - * [PaychNewPayment](#PaychNewPayment) - * [PaychSettle](#PaychSettle) - * [PaychStatus](#PaychStatus) - * [PaychVoucherAdd](#PaychVoucherAdd) - * [PaychVoucherCheckSpendable](#PaychVoucherCheckSpendable) - * [PaychVoucherCheckValid](#PaychVoucherCheckValid) - * [PaychVoucherCreate](#PaychVoucherCreate) - * [PaychVoucherList](#PaychVoucherList) - * [PaychVoucherSubmit](#PaychVoucherSubmit) -* [State](#State) - * [StateAccountKey](#StateAccountKey) - * [StateAllMinerFaults](#StateAllMinerFaults) - * [StateCall](#StateCall) - * [StateChangedActors](#StateChangedActors) - * [StateCirculatingSupply](#StateCirculatingSupply) - * [StateCompute](#StateCompute) - * [StateDealProviderCollateralBounds](#StateDealProviderCollateralBounds) - * [StateGetActor](#StateGetActor) - * [StateGetReceipt](#StateGetReceipt) - * [StateListActors](#StateListActors) - * [StateListMessages](#StateListMessages) - * [StateListMiners](#StateListMiners) - * [StateLookupID](#StateLookupID) - * [StateMarketBalance](#StateMarketBalance) - * [StateMarketDeals](#StateMarketDeals) - * [StateMarketParticipants](#StateMarketParticipants) - * [StateMarketStorageDeal](#StateMarketStorageDeal) - * [StateMinerActiveSectors](#StateMinerActiveSectors) - * [StateMinerAvailableBalance](#StateMinerAvailableBalance) - * [StateMinerDeadlines](#StateMinerDeadlines) - * [StateMinerFaults](#StateMinerFaults) - * [StateMinerInfo](#StateMinerInfo) - * [StateMinerInitialPledgeCollateral](#StateMinerInitialPledgeCollateral) - * [StateMinerPartitions](#StateMinerPartitions) - * [StateMinerPower](#StateMinerPower) - * [StateMinerPreCommitDepositForPower](#StateMinerPreCommitDepositForPower) - * [StateMinerProvingDeadline](#StateMinerProvingDeadline) - * [StateMinerRecoveries](#StateMinerRecoveries) - * [StateMinerSectorCount](#StateMinerSectorCount) - * [StateMinerSectors](#StateMinerSectors) - * [StateMsgGasCost](#StateMsgGasCost) - * [StateNetworkName](#StateNetworkName) - * [StateReadState](#StateReadState) - * [StateReplay](#StateReplay) - * [StateSearchMsg](#StateSearchMsg) - * [StateSectorExpiration](#StateSectorExpiration) - * [StateSectorGetInfo](#StateSectorGetInfo) - * [StateSectorPartition](#StateSectorPartition) - * [StateSectorPreCommitInfo](#StateSectorPreCommitInfo) - * [StateVerifiedClientStatus](#StateVerifiedClientStatus) - * [StateWaitMsg](#StateWaitMsg) -* [Sync](#Sync) - * [SyncCheckBad](#SyncCheckBad) - * [SyncCheckpoint](#SyncCheckpoint) - * [SyncIncomingBlocks](#SyncIncomingBlocks) - * [SyncMarkBad](#SyncMarkBad) - * [SyncState](#SyncState) - * [SyncSubmitBlock](#SyncSubmitBlock) - * [SyncUnmarkBad](#SyncUnmarkBad) -* [Wallet](#Wallet) - * [WalletBalance](#WalletBalance) - * [WalletDefaultAddress](#WalletDefaultAddress) - * [WalletDelete](#WalletDelete) - * [WalletExport](#WalletExport) - * [WalletHas](#WalletHas) - * [WalletImport](#WalletImport) - * [WalletList](#WalletList) - * [WalletNew](#WalletNew) - * [WalletSetDefault](#WalletSetDefault) - * [WalletSign](#WalletSign) - * [WalletSignMessage](#WalletSignMessage) - * [WalletVerify](#WalletVerify) -## - - -### Closing - - -Perms: read - -Inputs: `null` - -Response: `{}` - -### Shutdown - - -Perms: admin - -Inputs: `null` - -Response: `{}` - -### Version - - -Perms: read - -Inputs: `null` - -Response: -```json -{ - "Version": "string value", - "APIVersion": 3584, - "BlockDelay": 42 -} -``` - -## Auth - - -### AuthNew - - -Perms: admin - -Inputs: -```json -[ - null -] -``` - -Response: `"Ynl0ZSBhcnJheQ=="` - -### AuthVerify - - -Perms: read - -Inputs: -```json -[ - "string value" -] -``` - -Response: `null` - -## Beacon -The Beacon method group contains methods for interacting with the random beacon (DRAND) - - -### BeaconGetEntry -BeaconGetEntry returns the beacon entry for the given filecoin epoch. If -the entry has not yet been produced, the call will block until the entry -becomes available - - -Perms: read - -Inputs: -```json -[ - 10101 -] -``` - -Response: -```json -{ - "Round": 42, - "Data": "Ynl0ZSBhcnJheQ==" -} -``` - -## Chain -The Chain method group contains methods for interacting with the -blockchain, but that do not require any form of state computation. - - -### ChainExport -ChainExport returns a stream of bytes with CAR dump of chain data. -The exported chain data includes the header chain from the given tipset -back to genesis, the entire genesis state, and the most recent 'nroots' -state trees. -If oldmsgskip is set, messages from before the requested roots are also not included. - - -Perms: read - -Inputs: -```json -[ - 10101, - true, - [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ] -] -``` - -Response: `"Ynl0ZSBhcnJheQ=="` - -### ChainGetBlock -ChainGetBlock returns the block specified by the given CID. - - -Perms: read - -Inputs: -```json -[ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - } -] -``` - -Response: -```json -{ - "Miner": "t01234", - "Ticket": { - "VRFProof": "Ynl0ZSBhcnJheQ==" - }, - "ElectionProof": { - "WinCount": 9, - "VRFProof": "Ynl0ZSBhcnJheQ==" - }, - "BeaconEntries": null, - "WinPoStProof": null, - "Parents": null, - "ParentWeight": "0", - "Height": 10101, - "ParentStateRoot": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "ParentMessageReceipts": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "Messages": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "BLSAggregate": { - "Type": 2, - "Data": "Ynl0ZSBhcnJheQ==" - }, - "Timestamp": 42, - "BlockSig": { - "Type": 2, - "Data": "Ynl0ZSBhcnJheQ==" - }, - "ForkSignaling": 42, - "ParentBaseFee": "0" -} -``` - -### ChainGetBlockMessages -ChainGetBlockMessages returns messages stored in the specified block. - - -Perms: read - -Inputs: -```json -[ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - } -] -``` - -Response: -```json -{ - "BlsMessages": null, - "SecpkMessages": null, - "Cids": null -} -``` - -### ChainGetGenesis -ChainGetGenesis returns the genesis tipset. - - -Perms: read - -Inputs: `null` - -Response: -```json -{ - "Cids": null, - "Blocks": null, - "Height": 0 -} -``` - -### ChainGetMessage -ChainGetMessage reads a message referenced by the specified CID from the -chain blockstore. - - -Perms: read - -Inputs: -```json -[ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - } -] -``` - -Response: -```json -{ - "Version": 42, - "To": "t01234", - "From": "t01234", - "Nonce": 42, - "Value": "0", - "GasLimit": 9, - "GasFeeCap": "0", - "GasPremium": "0", - "Method": 1, - "Params": "Ynl0ZSBhcnJheQ==" -} -``` - -### ChainGetNode -There are not yet any comments for this method. - -Perms: read - -Inputs: -```json -[ - "string value" -] -``` - -Response: -```json -{ - "Cid": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "Obj": {} -} -``` - -### ChainGetParentMessages -ChainGetParentMessages returns messages stored in parent tipset of the -specified block. - - -Perms: read - -Inputs: -```json -[ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - } -] -``` - -Response: `null` - -### ChainGetParentReceipts -ChainGetParentReceipts returns receipts for messages in parent tipset of -the specified block. - - -Perms: read - -Inputs: -```json -[ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - } -] -``` - -Response: `null` - -### ChainGetPath -ChainGetPath returns a set of revert/apply operations needed to get from -one tipset to another, for example: -``` - to - ^ -from tAA - ^ ^ -tBA tAB - ^---*--^ - ^ - tRR -``` -Would return `[revert(tBA), apply(tAB), apply(tAA)]` - - -Perms: read - -Inputs: -```json -[ - [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ], - [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ] -] -``` - -Response: `null` - -### ChainGetRandomnessFromBeacon -ChainGetRandomnessFromBeacon is used to sample the beacon for randomness. - - -Perms: read - -Inputs: -```json -[ - [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ], - 2, - 10101, - "Ynl0ZSBhcnJheQ==" -] -``` - -Response: `null` - -### ChainGetRandomnessFromTickets -ChainGetRandomnessFromTickets is used to sample the chain for randomness. - - -Perms: read - -Inputs: -```json -[ - [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ], - 2, - 10101, - "Ynl0ZSBhcnJheQ==" -] -``` - -Response: `null` - -### ChainGetTipSet -ChainGetTipSet returns the tipset specified by the given TipSetKey. - - -Perms: read - -Inputs: -```json -[ - [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ] -] -``` - -Response: -```json -{ - "Cids": null, - "Blocks": null, - "Height": 0 -} -``` - -### ChainGetTipSetByHeight -ChainGetTipSetByHeight looks back for a tipset at the specified epoch. -If there are no blocks at the specified epoch, a tipset at an earlier epoch -will be returned. - - -Perms: read - -Inputs: -```json -[ - 10101, - [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ] -] -``` - -Response: -```json -{ - "Cids": null, - "Blocks": null, - "Height": 0 -} -``` - -### ChainHasObj -ChainHasObj checks if a given CID exists in the chain blockstore. - - -Perms: read - -Inputs: -```json -[ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - } -] -``` - -Response: `true` - -### ChainHead -ChainHead returns the current head of the chain. - - -Perms: read - -Inputs: `null` - -Response: -```json -{ - "Cids": null, - "Blocks": null, - "Height": 0 -} -``` - -### ChainNotify -ChainNotify returns channel with chain head updates. -First message is guaranteed to be of len == 1, and type == 'current'. - - -Perms: read - -Inputs: `null` - -Response: `null` - -### ChainReadObj -ChainReadObj reads ipld nodes referenced by the specified CID from chain -blockstore and returns raw bytes. - - -Perms: read - -Inputs: -```json -[ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - } -] -``` - -Response: `"Ynl0ZSBhcnJheQ=="` - -### ChainSetHead -ChainSetHead forcefully sets current chain head. Use with caution. - - -Perms: admin - -Inputs: -```json -[ - [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ] -] -``` - -Response: `{}` - -### ChainStatObj -ChainStatObj returns statistics about the graph referenced by 'obj'. -If 'base' is also specified, then the returned stat will be a diff -between the two objects. - - -Perms: read - -Inputs: -```json -[ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - } -] -``` - -Response: -```json -{ - "Size": 42, - "Links": 42 -} -``` - -### ChainTipSetWeight -ChainTipSetWeight computes weight for the specified tipset. - - -Perms: read - -Inputs: -```json -[ - [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ] -] -``` - -Response: `"0"` - -## Client -The Client methods all have to do with interacting with the storage and -retrieval markets as a client - - -### ClientCalcCommP -ClientCalcCommP calculates the CommP for a specified file - - -Perms: read - -Inputs: -```json -[ - "string value" -] -``` - -Response: -```json -{ - "Root": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "Size": 1024 -} -``` - -### ClientDataTransferUpdates -There are not yet any comments for this method. - -Perms: write - -Inputs: `null` - -Response: -```json -{ - "TransferID": 3, - "Status": 1, - "BaseCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "IsInitiator": true, - "IsSender": true, - "Voucher": "string value", - "Message": "string value", - "OtherPeer": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", - "Transferred": 42 -} -``` - -### ClientDealSize -ClientDealSize calculates real deal data size - - -Perms: read - -Inputs: -```json -[ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - } -] -``` - -Response: -```json -{ - "PayloadSize": 9, - "PieceSize": 1032 -} -``` - -### ClientFindData -ClientFindData identifies peers that have a certain file, and returns QueryOffers (one per peer). - - -Perms: read - -Inputs: -```json -[ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - null -] -``` - -Response: `null` - -### ClientGenCar -ClientGenCar generates a CAR file for the specified file. - - -Perms: write - -Inputs: -```json -[ - { - "Path": "string value", - "IsCAR": true - }, - "string value" -] -``` - -Response: `{}` - -### ClientGetDealInfo -ClientGetDealInfo returns the latest information about a given deal. - - -Perms: read - -Inputs: -```json -[ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - } -] -``` - -Response: -```json -{ - "ProposalCid": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "State": 42, - "Message": "string value", - "Provider": "t01234", - "DataRef": { - "TransferType": "string value", - "Root": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "PieceCid": null, - "PieceSize": 1024 - }, - "PieceCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "Size": 42, - "PricePerEpoch": "0", - "Duration": 42, - "DealID": 5432, - "CreationTime": "0001-01-01T00:00:00Z" -} -``` - -### ClientGetDealUpdates -ClientGetDealUpdates returns the status of updated deals - - -Perms: read - -Inputs: `null` - -Response: -```json -{ - "ProposalCid": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "State": 42, - "Message": "string value", - "Provider": "t01234", - "DataRef": { - "TransferType": "string value", - "Root": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "PieceCid": null, - "PieceSize": 1024 - }, - "PieceCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "Size": 42, - "PricePerEpoch": "0", - "Duration": 42, - "DealID": 5432, - "CreationTime": "0001-01-01T00:00:00Z" -} -``` - -### ClientHasLocal -ClientHasLocal indicates whether a certain CID is locally stored. - - -Perms: write - -Inputs: -```json -[ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - } -] -``` - -Response: `true` - -### ClientImport -ClientImport imports file under the specified path into filestore. - - -Perms: admin - -Inputs: -```json -[ - { - "Path": "string value", - "IsCAR": true - } -] -``` - -Response: -```json -{ - "Root": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "ImportID": 50 -} -``` - -### ClientListDataTransfers -ClientListTransfers returns the status of all ongoing transfers of data - - -Perms: write - -Inputs: `null` - -Response: `null` - -### ClientListDeals -ClientListDeals returns information about the deals made by the local client. - - -Perms: write - -Inputs: `null` - -Response: `null` - -### ClientListImports -ClientListImports lists imported files and their root CIDs - - -Perms: write - -Inputs: `null` - -Response: `null` - -### ClientMinerQueryOffer -ClientMinerQueryOffer returns a QueryOffer for the specific miner and file. - - -Perms: read - -Inputs: -```json -[ - "t01234", - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - null -] -``` - -Response: -```json -{ - "Err": "string value", - "Root": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "Piece": null, - "Size": 42, - "MinPrice": "0", - "UnsealPrice": "0", - "PaymentInterval": 42, - "PaymentIntervalIncrease": 42, - "Miner": "t01234", - "MinerPeer": { - "Address": "t01234", - "ID": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", - "PieceCID": null - } -} -``` - -### ClientQueryAsk -ClientQueryAsk returns a signed StorageAsk from the specified miner. - - -Perms: read - -Inputs: -```json -[ - "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", - "t01234" -] -``` - -Response: -```json -{ - "Ask": { - "Price": "0", - "VerifiedPrice": "0", - "MinPieceSize": 1032, - "MaxPieceSize": 1032, - "Miner": "t01234", - "Timestamp": 10101, - "Expiry": 10101, - "SeqNo": 42 - }, - "Signature": { - "Type": 2, - "Data": "Ynl0ZSBhcnJheQ==" - } -} -``` - -### ClientRemoveImport -ClientRemoveImport removes file import - - -Perms: admin - -Inputs: -```json -[ - 50 -] -``` - -Response: `{}` - -### ClientRetrieve -ClientRetrieve initiates the retrieval of a file, as specified in the order. - - -Perms: admin - -Inputs: -```json -[ - { - "Root": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "Piece": null, - "Size": 42, - "Total": "0", - "UnsealPrice": "0", - "PaymentInterval": 42, - "PaymentIntervalIncrease": 42, - "Client": "t01234", - "Miner": "t01234", - "MinerPeer": { - "Address": "t01234", - "ID": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", - "PieceCID": null - } - }, - { - "Path": "string value", - "IsCAR": true - } -] -``` - -Response: `{}` - -### ClientRetrieveTryRestartInsufficientFunds -ClientRetrieveTryRestartInsufficientFunds attempts to restart stalled retrievals on a given payment channel -which are stuck due to insufficient funds - - -Perms: write - -Inputs: -```json -[ - "t01234" -] -``` - -Response: `{}` - -### ClientRetrieveWithEvents -ClientRetrieveWithEvents initiates the retrieval of a file, as specified in the order, and provides a channel -of status updates. - - -Perms: admin - -Inputs: -```json -[ - { - "Root": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "Piece": null, - "Size": 42, - "Total": "0", - "UnsealPrice": "0", - "PaymentInterval": 42, - "PaymentIntervalIncrease": 42, - "Client": "t01234", - "Miner": "t01234", - "MinerPeer": { - "Address": "t01234", - "ID": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", - "PieceCID": null - } - }, - { - "Path": "string value", - "IsCAR": true - } -] -``` - -Response: -```json -{ - "Event": 5, - "Status": 0, - "BytesReceived": 42, - "FundsSpent": "0", - "Err": "string value" -} -``` - -### ClientStartDeal -ClientStartDeal proposes a deal with a miner. - - -Perms: admin - -Inputs: -```json -[ - { - "Data": { - "TransferType": "string value", - "Root": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "PieceCid": null, - "PieceSize": 1024 - }, - "Wallet": "t01234", - "Miner": "t01234", - "EpochPrice": "0", - "MinBlocksDuration": 42, - "ProviderCollateral": "0", - "DealStartEpoch": 10101, - "FastRetrieval": true, - "VerifiedDeal": true - } -] -``` - -Response: `null` - -## Gas - - -### GasEstimateFeeCap -GasEstimateFeeCap estimates gas fee cap - - -Perms: read - -Inputs: -```json -[ - { - "Version": 42, - "To": "t01234", - "From": "t01234", - "Nonce": 42, - "Value": "0", - "GasLimit": 9, - "GasFeeCap": "0", - "GasPremium": "0", - "Method": 1, - "Params": "Ynl0ZSBhcnJheQ==" - }, - 9, - [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ] -] -``` - -Response: `"0"` - -### GasEstimateGasLimit -GasEstimateGasLimit estimates gas used by the message and returns it. -It fails if message fails to execute. - - -Perms: read - -Inputs: -```json -[ - { - "Version": 42, - "To": "t01234", - "From": "t01234", - "Nonce": 42, - "Value": "0", - "GasLimit": 9, - "GasFeeCap": "0", - "GasPremium": "0", - "Method": 1, - "Params": "Ynl0ZSBhcnJheQ==" - }, - [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ] -] -``` - -Response: `9` - -### GasEstimateGasPremium -GasEstimateGasPremium estimates what gas price should be used for a -message to have high likelihood of inclusion in `nblocksincl` epochs. - - -Perms: read - -Inputs: -```json -[ - 42, - "t01234", - 9, - [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ] -] -``` - -Response: `"0"` - -### GasEstimateMessageGas -GasEstimateMessageGas estimates gas values for unset message gas fields - - -Perms: read - -Inputs: -```json -[ - { - "Version": 42, - "To": "t01234", - "From": "t01234", - "Nonce": 42, - "Value": "0", - "GasLimit": 9, - "GasFeeCap": "0", - "GasPremium": "0", - "Method": 1, - "Params": "Ynl0ZSBhcnJheQ==" - }, - { - "MaxFee": "0" - }, - [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ] -] -``` - -Response: -```json -{ - "Version": 42, - "To": "t01234", - "From": "t01234", - "Nonce": 42, - "Value": "0", - "GasLimit": 9, - "GasFeeCap": "0", - "GasPremium": "0", - "Method": 1, - "Params": "Ynl0ZSBhcnJheQ==" -} -``` - -## I - - -### ID - - -Perms: read - -Inputs: `null` - -Response: `"12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf"` - -## Log - - -### LogList - - -Perms: write - -Inputs: `null` - -Response: `null` - -### LogSetLevel - - -Perms: write - -Inputs: -```json -[ - "string value", - "string value" -] -``` - -Response: `{}` - -## Market - - -### MarketEnsureAvailable -MarketFreeBalance - - -Perms: sign - -Inputs: -```json -[ - "t01234", - "t01234", - "0" -] -``` - -Response: -```json -{ - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" -} -``` - -## Miner - - -### MinerCreateBlock -There are not yet any comments for this method. - -Perms: write - -Inputs: -```json -[ - { - "Miner": "t01234", - "Parents": [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ], - "Ticket": { - "VRFProof": "Ynl0ZSBhcnJheQ==" - }, - "Eproof": { - "WinCount": 9, - "VRFProof": "Ynl0ZSBhcnJheQ==" - }, - "BeaconValues": null, - "Messages": null, - "Epoch": 10101, - "Timestamp": 42, - "WinningPoStProof": null - } -] -``` - -Response: -```json -{ - "Header": { - "Miner": "t01234", - "Ticket": { - "VRFProof": "Ynl0ZSBhcnJheQ==" - }, - "ElectionProof": { - "WinCount": 9, - "VRFProof": "Ynl0ZSBhcnJheQ==" - }, - "BeaconEntries": null, - "WinPoStProof": null, - "Parents": null, - "ParentWeight": "0", - "Height": 10101, - "ParentStateRoot": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "ParentMessageReceipts": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "Messages": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "BLSAggregate": { - "Type": 2, - "Data": "Ynl0ZSBhcnJheQ==" - }, - "Timestamp": 42, - "BlockSig": { - "Type": 2, - "Data": "Ynl0ZSBhcnJheQ==" - }, - "ForkSignaling": 42, - "ParentBaseFee": "0" - }, - "BlsMessages": null, - "SecpkMessages": null -} -``` - -### MinerGetBaseInfo -There are not yet any comments for this method. - -Perms: read - -Inputs: -```json -[ - "t01234", - 10101, - [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ] -] -``` - -Response: -```json -{ - "MinerPower": "0", - "NetworkPower": "0", - "Sectors": null, - "WorkerKey": "t01234", - "SectorSize": 34359738368, - "PrevBeaconEntry": { - "Round": 42, - "Data": "Ynl0ZSBhcnJheQ==" - }, - "BeaconEntries": null, - "HasMinPower": true -} -``` - -## Mpool -The Mpool methods are for interacting with the message pool. The message pool -manages all incoming and outgoing 'messages' going over the network. - - -### MpoolClear -MpoolClear clears pending messages from the mpool - - -Perms: write - -Inputs: -```json -[ - true -] -``` - -Response: `{}` - -### MpoolGetConfig -MpoolGetConfig returns (a copy of) the current mpool config - - -Perms: read - -Inputs: `null` - -Response: -```json -{ - "PriorityAddrs": null, - "SizeLimitHigh": 123, - "SizeLimitLow": 123, - "ReplaceByFeeRatio": 12.3, - "PruneCooldown": 60000000000, - "GasLimitOverestimation": 12.3 -} -``` - -### MpoolGetNonce -MpoolGetNonce gets next nonce for the specified sender. -Note that this method may not be atomic. Use MpoolPushMessage instead. - - -Perms: read - -Inputs: -```json -[ - "t01234" -] -``` - -Response: `42` - -### MpoolPending -MpoolPending returns pending mempool messages. - - -Perms: read - -Inputs: -```json -[ - [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ] -] -``` - -Response: `null` - -### MpoolPush -MpoolPush pushes a signed message to mempool. - - -Perms: write - -Inputs: -```json -[ - { - "Message": { - "Version": 42, - "To": "t01234", - "From": "t01234", - "Nonce": 42, - "Value": "0", - "GasLimit": 9, - "GasFeeCap": "0", - "GasPremium": "0", - "Method": 1, - "Params": "Ynl0ZSBhcnJheQ==" - }, - "Signature": { - "Type": 2, - "Data": "Ynl0ZSBhcnJheQ==" - } - } -] -``` - -Response: -```json -{ - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" -} -``` - -### MpoolPushMessage -MpoolPushMessage atomically assigns a nonce, signs, and pushes a message -to mempool. -maxFee is only used when GasFeeCap/GasPremium fields aren't specified - -When maxFee is set to 0, MpoolPushMessage will guess appropriate fee -based on current chain conditions - - -Perms: sign - -Inputs: -```json -[ - { - "Version": 42, - "To": "t01234", - "From": "t01234", - "Nonce": 42, - "Value": "0", - "GasLimit": 9, - "GasFeeCap": "0", - "GasPremium": "0", - "Method": 1, - "Params": "Ynl0ZSBhcnJheQ==" - }, - { - "MaxFee": "0" - } -] -``` - -Response: -```json -{ - "Message": { - "Version": 42, - "To": "t01234", - "From": "t01234", - "Nonce": 42, - "Value": "0", - "GasLimit": 9, - "GasFeeCap": "0", - "GasPremium": "0", - "Method": 1, - "Params": "Ynl0ZSBhcnJheQ==" - }, - "Signature": { - "Type": 2, - "Data": "Ynl0ZSBhcnJheQ==" - } -} -``` - -### MpoolSelect -MpoolSelect returns a list of pending messages for inclusion in the next block - - -Perms: read - -Inputs: -```json -[ - [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ], - 12.3 -] -``` - -Response: `null` - -### MpoolSetConfig -MpoolSetConfig sets the mpool config to (a copy of) the supplied config - - -Perms: write - -Inputs: -```json -[ - { - "PriorityAddrs": null, - "SizeLimitHigh": 123, - "SizeLimitLow": 123, - "ReplaceByFeeRatio": 12.3, - "PruneCooldown": 60000000000, - "GasLimitOverestimation": 12.3 - } -] -``` - -Response: `{}` - -### MpoolSub -There are not yet any comments for this method. - -Perms: read - -Inputs: `null` - -Response: -```json -{ - "Type": 0, - "Message": { - "Message": { - "Version": 42, - "To": "t01234", - "From": "t01234", - "Nonce": 42, - "Value": "0", - "GasLimit": 9, - "GasFeeCap": "0", - "GasPremium": "0", - "Method": 1, - "Params": "Ynl0ZSBhcnJheQ==" - }, - "Signature": { - "Type": 2, - "Data": "Ynl0ZSBhcnJheQ==" - } - } -} -``` - -## Msig -The Msig methods are used to interact with multisig wallets on the -filecoin network - - -### MsigAddApprove -MsigAddApprove approves a previously proposed AddSigner message -It takes the following params: , , , -, , - - -Perms: sign - -Inputs: -```json -[ - "t01234", - "t01234", - 42, - "t01234", - "t01234", - true -] -``` - -Response: -```json -{ - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" -} -``` - -### MsigAddCancel -MsigAddCancel cancels a previously proposed AddSigner message -It takes the following params: , , , -, - - -Perms: sign - -Inputs: -```json -[ - "t01234", - "t01234", - 42, - "t01234", - true -] -``` - -Response: -```json -{ - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" -} -``` - -### MsigAddPropose -MsigAddPropose proposes adding a signer in the multisig -It takes the following params: , , -, - - -Perms: sign - -Inputs: -```json -[ - "t01234", - "t01234", - "t01234", - true -] -``` - -Response: -```json -{ - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" -} -``` - -### MsigApprove -MsigApprove approves a previously-proposed multisig message -It takes the following params: , , , , , -, , - - -Perms: sign - -Inputs: -```json -[ - "t01234", - 42, - "t01234", - "t01234", - "0", - "t01234", - 42, - "Ynl0ZSBhcnJheQ==" -] -``` - -Response: -```json -{ - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" -} -``` - -### MsigCancel -MsigCancel cancels a previously-proposed multisig message -It takes the following params: , , , , -, , - - -Perms: sign - -Inputs: -```json -[ - "t01234", - 42, - "t01234", - "0", - "t01234", - 42, - "Ynl0ZSBhcnJheQ==" -] -``` - -Response: -```json -{ - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" -} -``` - -### MsigCreate -MsigCreate creates a multisig wallet -It takes the following params: , , -, , - - -Perms: sign - -Inputs: -```json -[ - 42, - null, - 10101, - "0", - "t01234", - "0" -] -``` - -Response: -```json -{ - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" -} -``` - -### MsigGetAvailableBalance -MsigGetAvailableBalance returns the portion of a multisig's balance that can be withdrawn or spent - - -Perms: read - -Inputs: -```json -[ - "t01234", - [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ] -] -``` - -Response: `"0"` - -### MsigGetVested -MsigGetVested returns the amount of FIL that vested in a multisig in a certain period. -It takes the following params: , , - - -Perms: read - -Inputs: -```json -[ - "t01234", - [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ], - [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ] -] -``` - -Response: `"0"` - -### MsigPropose -MsigPropose proposes a multisig message -It takes the following params: , , , -, , - - -Perms: sign - -Inputs: -```json -[ - "t01234", - "t01234", - "0", - "t01234", - 42, - "Ynl0ZSBhcnJheQ==" -] -``` - -Response: -```json -{ - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" -} -``` - -### MsigSwapApprove -MsigSwapApprove approves a previously proposed SwapSigner -It takes the following params: , , , -, , - - -Perms: sign - -Inputs: -```json -[ - "t01234", - "t01234", - 42, - "t01234", - "t01234", - "t01234" -] -``` - -Response: -```json -{ - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" -} -``` - -### MsigSwapCancel -MsigSwapCancel cancels a previously proposed SwapSigner message -It takes the following params: , , , -, - - -Perms: sign - -Inputs: -```json -[ - "t01234", - "t01234", - 42, - "t01234", - "t01234" -] -``` - -Response: -```json -{ - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" -} -``` - -### MsigSwapPropose -MsigSwapPropose proposes swapping 2 signers in the multisig -It takes the following params: , , -, - - -Perms: sign - -Inputs: -```json -[ - "t01234", - "t01234", - "t01234", - "t01234" -] -``` - -Response: -```json -{ - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" -} -``` - -## Net - - -### NetAddrsListen - - -Perms: read - -Inputs: `null` - -Response: -```json -{ - "Addrs": null, - "ID": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf" -} -``` - -### NetAgentVersion - - -Perms: read - -Inputs: -```json -[ - "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf" -] -``` - -Response: `"string value"` - -### NetAutoNatStatus - - -Perms: read - -Inputs: `null` - -Response: -```json -{ - "Reachability": 1, - "PublicAddr": "string value" -} -``` - -### NetBandwidthStats - - -Perms: read - -Inputs: `null` - -Response: -```json -{ - "TotalIn": 9, - "TotalOut": 9, - "RateIn": 12.3, - "RateOut": 12.3 -} -``` - -### NetBandwidthStatsByPeer - - -Perms: read - -Inputs: `null` - -Response: -```json -{ - "12D3KooWSXmXLJmBR1M7i9RW9GQPNUhZSzXKzxDHWtAgNuJAbyEJ": { - "TotalIn": 174000, - "TotalOut": 12500, - "RateIn": 100, - "RateOut": 50 - } -} -``` - -### NetBandwidthStatsByProtocol - - -Perms: read - -Inputs: `null` - -Response: -```json -{ - "/fil/hello/1.0.0": { - "TotalIn": 174000, - "TotalOut": 12500, - "RateIn": 100, - "RateOut": 50 - } -} -``` - -### NetConnect - - -Perms: write - -Inputs: -```json -[ - { - "Addrs": null, - "ID": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf" - } -] -``` - -Response: `{}` - -### NetConnectedness - - -Perms: read - -Inputs: -```json -[ - "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf" -] -``` - -Response: `1` - -### NetDisconnect - - -Perms: write - -Inputs: -```json -[ - "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf" -] -``` - -Response: `{}` - -### NetFindPeer - - -Perms: read - -Inputs: -```json -[ - "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf" -] -``` - -Response: -```json -{ - "Addrs": null, - "ID": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf" -} -``` - -### NetPeers - - -Perms: read - -Inputs: `null` - -Response: `null` - -### NetPubsubScores - - -Perms: read - -Inputs: `null` - -Response: `null` - -## Paych -The Paych methods are for interacting with and managing payment channels - - -### PaychAllocateLane -There are not yet any comments for this method. - -Perms: sign - -Inputs: -```json -[ - "t01234" -] -``` - -Response: `42` - -### PaychAvailableFunds -There are not yet any comments for this method. - -Perms: sign - -Inputs: -```json -[ - "t01234" -] -``` - -Response: -```json -{ - "Channel": "\u003cempty\u003e", - "From": "t01234", - "To": "t01234", - "ConfirmedAmt": "0", - "PendingAmt": "0", - "PendingWaitSentinel": null, - "QueuedAmt": "0", - "VoucherReedeemedAmt": "0" -} -``` - -### PaychAvailableFundsByFromTo -There are not yet any comments for this method. - -Perms: sign - -Inputs: -```json -[ - "t01234", - "t01234" -] -``` - -Response: -```json -{ - "Channel": "\u003cempty\u003e", - "From": "t01234", - "To": "t01234", - "ConfirmedAmt": "0", - "PendingAmt": "0", - "PendingWaitSentinel": null, - "QueuedAmt": "0", - "VoucherReedeemedAmt": "0" -} -``` - -### PaychCollect -There are not yet any comments for this method. - -Perms: sign - -Inputs: -```json -[ - "t01234" -] -``` - -Response: -```json -{ - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" -} -``` - -### PaychGet -There are not yet any comments for this method. - -Perms: sign - -Inputs: -```json -[ - "t01234", - "t01234", - "0" -] -``` - -Response: -```json -{ - "Channel": "t01234", - "WaitSentinel": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - } -} -``` - -### PaychGetWaitReady -There are not yet any comments for this method. - -Perms: sign - -Inputs: -```json -[ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - } -] -``` - -Response: `"t01234"` - -### PaychList -There are not yet any comments for this method. - -Perms: read - -Inputs: `null` - -Response: `null` - -### PaychNewPayment -There are not yet any comments for this method. - -Perms: sign - -Inputs: -```json -[ - "t01234", - "t01234", - null -] -``` - -Response: -```json -{ - "Channel": "t01234", - "WaitSentinel": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "Vouchers": null -} -``` - -### PaychSettle -There are not yet any comments for this method. - -Perms: sign - -Inputs: -```json -[ - "t01234" -] -``` - -Response: -```json -{ - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" -} -``` - -### PaychStatus -There are not yet any comments for this method. - -Perms: read - -Inputs: -```json -[ - "t01234" -] -``` - -Response: -```json -{ - "ControlAddr": "t01234", - "Direction": 1 -} -``` - -### PaychVoucherAdd -There are not yet any comments for this method. - -Perms: write - -Inputs: -```json -[ - "t01234", - { - "ChannelAddr": "t01234", - "TimeLockMin": 10101, - "TimeLockMax": 10101, - "SecretPreimage": "Ynl0ZSBhcnJheQ==", - "Extra": { - "Actor": "t01234", - "Method": 1, - "Data": "Ynl0ZSBhcnJheQ==" - }, - "Lane": 42, - "Nonce": 42, - "Amount": "0", - "MinSettleHeight": 10101, - "Merges": null, - "Signature": { - "Type": 2, - "Data": "Ynl0ZSBhcnJheQ==" - } - }, - "Ynl0ZSBhcnJheQ==", - "0" -] -``` - -Response: `"0"` - -### PaychVoucherCheckSpendable -There are not yet any comments for this method. - -Perms: read - -Inputs: -```json -[ - "t01234", - { - "ChannelAddr": "t01234", - "TimeLockMin": 10101, - "TimeLockMax": 10101, - "SecretPreimage": "Ynl0ZSBhcnJheQ==", - "Extra": { - "Actor": "t01234", - "Method": 1, - "Data": "Ynl0ZSBhcnJheQ==" - }, - "Lane": 42, - "Nonce": 42, - "Amount": "0", - "MinSettleHeight": 10101, - "Merges": null, - "Signature": { - "Type": 2, - "Data": "Ynl0ZSBhcnJheQ==" - } - }, - "Ynl0ZSBhcnJheQ==", - "Ynl0ZSBhcnJheQ==" -] -``` - -Response: `true` - -### PaychVoucherCheckValid -There are not yet any comments for this method. - -Perms: read - -Inputs: -```json -[ - "t01234", - { - "ChannelAddr": "t01234", - "TimeLockMin": 10101, - "TimeLockMax": 10101, - "SecretPreimage": "Ynl0ZSBhcnJheQ==", - "Extra": { - "Actor": "t01234", - "Method": 1, - "Data": "Ynl0ZSBhcnJheQ==" - }, - "Lane": 42, - "Nonce": 42, - "Amount": "0", - "MinSettleHeight": 10101, - "Merges": null, - "Signature": { - "Type": 2, - "Data": "Ynl0ZSBhcnJheQ==" - } - } -] -``` - -Response: `{}` - -### PaychVoucherCreate -There are not yet any comments for this method. - -Perms: sign - -Inputs: -```json -[ - "t01234", - "0", - 42 -] -``` - -Response: -```json -{ - "Voucher": { - "ChannelAddr": "t01234", - "TimeLockMin": 10101, - "TimeLockMax": 10101, - "SecretPreimage": "Ynl0ZSBhcnJheQ==", - "Extra": { - "Actor": "t01234", - "Method": 1, - "Data": "Ynl0ZSBhcnJheQ==" - }, - "Lane": 42, - "Nonce": 42, - "Amount": "0", - "MinSettleHeight": 10101, - "Merges": null, - "Signature": { - "Type": 2, - "Data": "Ynl0ZSBhcnJheQ==" - } - }, - "Shortfall": "0" -} -``` - -### PaychVoucherList -There are not yet any comments for this method. - -Perms: write - -Inputs: -```json -[ - "t01234" -] -``` - -Response: `null` - -### PaychVoucherSubmit -There are not yet any comments for this method. - -Perms: sign - -Inputs: -```json -[ - "t01234", - { - "ChannelAddr": "t01234", - "TimeLockMin": 10101, - "TimeLockMax": 10101, - "SecretPreimage": "Ynl0ZSBhcnJheQ==", - "Extra": { - "Actor": "t01234", - "Method": 1, - "Data": "Ynl0ZSBhcnJheQ==" - }, - "Lane": 42, - "Nonce": 42, - "Amount": "0", - "MinSettleHeight": 10101, - "Merges": null, - "Signature": { - "Type": 2, - "Data": "Ynl0ZSBhcnJheQ==" - } - }, - "Ynl0ZSBhcnJheQ==", - "Ynl0ZSBhcnJheQ==" -] -``` - -Response: -```json -{ - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" -} -``` - -## State -The State methods are used to query, inspect, and interact with chain state. -All methods take a TipSetKey as a parameter. The state looked up is the state at that tipset. -A nil TipSetKey can be provided as a param, this will cause the heaviest tipset in the chain to be used. - - -### StateAccountKey -StateAccountKey returns the public key address of the given ID address - - -Perms: read - -Inputs: -```json -[ - "t01234", - [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ] -] -``` - -Response: `"t01234"` - -### StateAllMinerFaults -StateAllMinerFaults returns all non-expired Faults that occur within lookback epochs of the given tipset - - -Perms: read - -Inputs: -```json -[ - 10101, - [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ] -] -``` - -Response: `null` - -### StateCall -StateCall runs the given message and returns its result without any persisted changes. - - -Perms: read - -Inputs: -```json -[ - { - "Version": 42, - "To": "t01234", - "From": "t01234", - "Nonce": 42, - "Value": "0", - "GasLimit": 9, - "GasFeeCap": "0", - "GasPremium": "0", - "Method": 1, - "Params": "Ynl0ZSBhcnJheQ==" - }, - [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ] -] -``` - -Response: -```json -{ - "Msg": { - "Version": 42, - "To": "t01234", - "From": "t01234", - "Nonce": 42, - "Value": "0", - "GasLimit": 9, - "GasFeeCap": "0", - "GasPremium": "0", - "Method": 1, - "Params": "Ynl0ZSBhcnJheQ==" - }, - "MsgRct": { - "ExitCode": 0, - "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 - }, - "ExecutionTrace": { - "Msg": { - "Version": 42, - "To": "t01234", - "From": "t01234", - "Nonce": 42, - "Value": "0", - "GasLimit": 9, - "GasFeeCap": "0", - "GasPremium": "0", - "Method": 1, - "Params": "Ynl0ZSBhcnJheQ==" - }, - "MsgRct": { - "ExitCode": 0, - "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 - }, - "Error": "string value", - "Duration": 60000000000, - "GasCharges": null, - "Subcalls": null - }, - "Error": "string value", - "Duration": 60000000000 -} -``` - -### StateChangedActors -StateChangedActors returns all the actors whose states change between the two given state CIDs -TODO: Should this take tipset keys instead? - - -Perms: read - -Inputs: -```json -[ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - } -] -``` - -Response: -```json -{ - "t01236": { - "Code": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "Head": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "Nonce": 42, - "Balance": "0" - } -} -``` - -### StateCirculatingSupply -StateCirculatingSupply returns the circulating supply of Filecoin at the given tipset - - -Perms: read - -Inputs: -```json -[ - [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ] -] -``` - -Response: -```json -{ - "FilVested": "0", - "FilMined": "0", - "FilBurnt": "0", - "FilLocked": "0", - "FilCirculating": "0" -} -``` - -### StateCompute -StateCompute is a flexible command that applies the given messages on the given tipset. -The messages are run as though the VM were at the provided height. - - -Perms: read - -Inputs: -```json -[ - 10101, - null, - [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ] -] -``` - -Response: -```json -{ - "Root": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "Trace": null -} -``` - -### StateDealProviderCollateralBounds -StateDealProviderCollateralBounds returns the min and max collateral a storage provider -can issue. It takes the deal size and verified status as parameters. - - -Perms: read - -Inputs: -```json -[ - 1032, - true, - [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ] -] -``` - -Response: -```json -{ - "Min": "0", - "Max": "0" -} -``` - -### StateGetActor -StateGetActor returns the indicated actor's nonce and balance. - - -Perms: read - -Inputs: -```json -[ - "t01234", - [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ] -] -``` - -Response: -```json -{ - "Code": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "Head": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "Nonce": 42, - "Balance": "0" -} -``` - -### StateGetReceipt -StateGetReceipt returns the message receipt for the given message - - -Perms: read - -Inputs: -```json -[ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ] -] -``` - -Response: -```json -{ - "ExitCode": 0, - "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 -} -``` - -### StateListActors -StateListActors returns the addresses of every actor in the state - - -Perms: read - -Inputs: -```json -[ - [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ] -] -``` - -Response: `null` - -### StateListMessages -StateListMessages looks back and returns all messages with a matching to or from address, stopping at the given height. - - -Perms: read - -Inputs: -```json -[ - { - "Version": 42, - "To": "t01234", - "From": "t01234", - "Nonce": 42, - "Value": "0", - "GasLimit": 9, - "GasFeeCap": "0", - "GasPremium": "0", - "Method": 1, - "Params": "Ynl0ZSBhcnJheQ==" - }, - [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ], - 10101 -] -``` - -Response: `null` - -### StateListMiners -StateListMiners returns the addresses of every miner that has claimed power in the Power Actor - - -Perms: read - -Inputs: -```json -[ - [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ] -] -``` - -Response: `null` - -### StateLookupID -StateLookupID retrieves the ID address of the given address - - -Perms: read - -Inputs: -```json -[ - "t01234", - [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ] -] -``` - -Response: `"t01234"` - -### StateMarketBalance -StateMarketBalance looks up the Escrow and Locked balances of the given address in the Storage Market - - -Perms: read - -Inputs: -```json -[ - "t01234", - [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ] -] -``` - -Response: -```json -{ - "Escrow": "0", - "Locked": "0" -} -``` - -### StateMarketDeals -StateMarketDeals returns information about every deal in the Storage Market - - -Perms: read - -Inputs: -```json -[ - [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ] -] -``` - -Response: -```json -{ - "t026363": { - "Proposal": { - "PieceCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "PieceSize": 1032, - "VerifiedDeal": true, - "Client": "t01234", - "Provider": "t01234", - "Label": "string value", - "StartEpoch": 10101, - "EndEpoch": 10101, - "StoragePricePerEpoch": "0", - "ProviderCollateral": "0", - "ClientCollateral": "0" - }, - "State": { - "SectorStartEpoch": 10101, - "LastUpdatedEpoch": 10101, - "SlashEpoch": 10101 - } - } -} -``` - -### StateMarketParticipants -StateMarketParticipants returns the Escrow and Locked balances of every participant in the Storage Market - - -Perms: read - -Inputs: -```json -[ - [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ] -] -``` - -Response: -```json -{ - "t026363": { - "Escrow": "0", - "Locked": "0" - } -} -``` - -### StateMarketStorageDeal -StateMarketStorageDeal returns information about the indicated deal - - -Perms: read - -Inputs: -```json -[ - 5432, - [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ] -] -``` - -Response: -```json -{ - "Proposal": { - "PieceCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "PieceSize": 1032, - "VerifiedDeal": true, - "Client": "t01234", - "Provider": "t01234", - "Label": "string value", - "StartEpoch": 10101, - "EndEpoch": 10101, - "StoragePricePerEpoch": "0", - "ProviderCollateral": "0", - "ClientCollateral": "0" - }, - "State": { - "SectorStartEpoch": 10101, - "LastUpdatedEpoch": 10101, - "SlashEpoch": 10101 - } -} -``` - -### StateMinerActiveSectors -StateMinerActiveSectors returns info about sectors that a given miner is actively proving. - - -Perms: read - -Inputs: -```json -[ - "t01234", - [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ] -] -``` - -Response: `null` - -### StateMinerAvailableBalance -StateMinerAvailableBalance returns the portion of a miner's balance that can be withdrawn or spent - - -Perms: read - -Inputs: -```json -[ - "t01234", - [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ] -] -``` - -Response: `"0"` - -### StateMinerDeadlines -StateMinerDeadlines returns all the proving deadlines for the given miner - - -Perms: read - -Inputs: -```json -[ - "t01234", - [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ] -] -``` - -Response: `null` - -### StateMinerFaults -StateMinerFaults returns a bitfield indicating the faulty sectors of the given miner - - -Perms: read - -Inputs: -```json -[ - "t01234", - [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ] -] -``` - -Response: -```json -[ - 5, - 1 -] -``` - -### StateMinerInfo -StateMinerInfo returns info about the indicated miner - - -Perms: read - -Inputs: -```json -[ - "t01234", - [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ] -] -``` - -Response: -```json -{ - "Owner": "t01234", - "Worker": "t01234", - "NewWorker": "t01234", - "ControlAddresses": null, - "WorkerChangeEpoch": 10101, - "PeerId": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", - "Multiaddrs": null, - "SealProofType": 3, - "SectorSize": 34359738368, - "WindowPoStPartitionSectors": 42 -} -``` - -### StateMinerInitialPledgeCollateral -StateMinerInitialPledgeCollateral returns the initial pledge collateral for the specified miner's sector - - -Perms: read - -Inputs: -```json -[ - "t01234", - { - "SealProof": 3, - "SectorNumber": 9, - "SealedCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "SealRandEpoch": 10101, - "DealIDs": null, - "Expiration": 10101, - "ReplaceCapacity": true, - "ReplaceSectorDeadline": 42, - "ReplaceSectorPartition": 42, - "ReplaceSectorNumber": 9 - }, - [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ] -] -``` - -Response: `"0"` - -### StateMinerPartitions -StateMinerPartitions loads miner partitions for the specified miner/deadline - - -Perms: read - -Inputs: -```json -[ - "t01234", - 42, - [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ] -] -``` - -Response: `null` - -### StateMinerPower -StateMinerPower returns the power of the indicated miner - - -Perms: read - -Inputs: -```json -[ - "t01234", - [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ] -] -``` - -Response: -```json -{ - "MinerPower": { - "RawBytePower": "0", - "QualityAdjPower": "0" - }, - "TotalPower": { - "RawBytePower": "0", - "QualityAdjPower": "0" - } -} -``` - -### StateMinerPreCommitDepositForPower -StateMinerInitialPledgeCollateral returns the precommit deposit for the specified miner's sector - - -Perms: read - -Inputs: -```json -[ - "t01234", - { - "SealProof": 3, - "SectorNumber": 9, - "SealedCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "SealRandEpoch": 10101, - "DealIDs": null, - "Expiration": 10101, - "ReplaceCapacity": true, - "ReplaceSectorDeadline": 42, - "ReplaceSectorPartition": 42, - "ReplaceSectorNumber": 9 - }, - [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ] -] -``` - -Response: `"0"` - -### StateMinerProvingDeadline -StateMinerProvingDeadline calculates the deadline at some epoch for a proving period -and returns the deadline-related calculations. - - -Perms: read - -Inputs: -```json -[ - "t01234", - [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ] -] -``` - -Response: -```json -{ - "CurrentEpoch": 10101, - "PeriodStart": 10101, - "Index": 42, - "Open": 10101, - "Close": 10101, - "Challenge": 10101, - "FaultCutoff": 10101, - "WPoStPeriodDeadlines": 42, - "WPoStProvingPeriod": 10101, - "WPoStChallengeWindow": 10101, - "WPoStChallengeLookback": 10101, - "FaultDeclarationCutoff": 10101 -} -``` - -### StateMinerRecoveries -StateMinerRecoveries returns a bitfield indicating the recovering sectors of the given miner - - -Perms: read - -Inputs: -```json -[ - "t01234", - [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ] -] -``` - -Response: -```json -[ - 5, - 1 -] -``` - -### StateMinerSectorCount -StateMinerSectorCount returns the number of sectors in a miner's sector set and proving set - - -Perms: read - -Inputs: -```json -[ - "t01234", - [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ] -] -``` - -Response: -```json -{ - "Sectors": 42, - "Active": 42 -} -``` - -### StateMinerSectors -StateMinerSectors returns info about the given miner's sectors. If the filter bitfield is nil, all sectors are included. -If the filterOut boolean is set to true, any sectors in the filter are excluded. -If false, only those sectors in the filter are included. - - -Perms: read - -Inputs: -```json -[ - "t01234", - [ - 0 - ], - true, - [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ] -] -``` - -Response: `null` - -### StateMsgGasCost -StateMsgGasCost searches for a message in the chain, and returns details of the messages gas costs, including the penalty and miner tip - - -Perms: read - -Inputs: -```json -[ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ] -] -``` - -Response: -```json -{ - "Message": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "GasUsed": "0", - "BaseFeeBurn": "0", - "OverEstimationBurn": "0", - "MinerPenalty": "0", - "MinerTip": "0", - "Refund": "0", - "TotalCost": "0" -} -``` - -### StateNetworkName -StateNetworkName returns the name of the network the node is synced to - - -Perms: read - -Inputs: `null` - -Response: `"lotus"` - -### StateReadState -StateReadState returns the indicated actor's state. - - -Perms: read - -Inputs: -```json -[ - "t01234", - [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ] -] -``` - -Response: -```json -{ - "Balance": "0", - "State": {} -} -``` - -### StateReplay -StateReplay returns the result of executing the indicated message, assuming it was executed in the indicated tipset. - - -Perms: read - -Inputs: -```json -[ - [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ], - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - } -] -``` - -Response: -```json -{ - "Msg": { - "Version": 42, - "To": "t01234", - "From": "t01234", - "Nonce": 42, - "Value": "0", - "GasLimit": 9, - "GasFeeCap": "0", - "GasPremium": "0", - "Method": 1, - "Params": "Ynl0ZSBhcnJheQ==" - }, - "MsgRct": { - "ExitCode": 0, - "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 - }, - "ExecutionTrace": { - "Msg": { - "Version": 42, - "To": "t01234", - "From": "t01234", - "Nonce": 42, - "Value": "0", - "GasLimit": 9, - "GasFeeCap": "0", - "GasPremium": "0", - "Method": 1, - "Params": "Ynl0ZSBhcnJheQ==" - }, - "MsgRct": { - "ExitCode": 0, - "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 - }, - "Error": "string value", - "Duration": 60000000000, - "GasCharges": null, - "Subcalls": null - }, - "Error": "string value", - "Duration": 60000000000 -} -``` - -### StateSearchMsg -StateSearchMsg searches for a message in the chain, and returns its receipt and the tipset where it was executed - - -Perms: read - -Inputs: -```json -[ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - } -] -``` - -Response: -```json -{ - "Message": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "Receipt": { - "ExitCode": 0, - "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 - }, - "ReturnDec": {}, - "TipSet": [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ], - "Height": 10101 -} -``` - -### StateSectorExpiration -StateSectorExpiration returns epoch at which given sector will expire - - -Perms: read - -Inputs: -```json -[ - "t01234", - 9, - [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ] -] -``` - -Response: -```json -{ - "OnTime": 10101, - "Early": 10101 -} -``` - -### StateSectorGetInfo -StateSectorGetInfo returns the on-chain info for the specified miner's sector. Returns null in case the sector info isn't found -NOTE: returned info.Expiration may not be accurate in some cases, use StateSectorExpiration to get accurate -expiration epoch - - -Perms: read - -Inputs: -```json -[ - "t01234", - 9, - [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ] -] -``` - -Response: -```json -{ - "SectorNumber": 9, - "SealProof": 3, - "SealedCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "DealIDs": null, - "Activation": 10101, - "Expiration": 10101, - "DealWeight": "0", - "VerifiedDealWeight": "0", - "InitialPledge": "0", - "ExpectedDayReward": "0", - "ExpectedStoragePledge": "0" -} -``` - -### StateSectorPartition -StateSectorPartition finds deadline/partition with the specified sector - - -Perms: read - -Inputs: -```json -[ - "t01234", - 9, - [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ] -] -``` - -Response: -```json -{ - "Deadline": 42, - "Partition": 42 -} -``` - -### StateSectorPreCommitInfo -StateSectorPreCommitInfo returns the PreCommit info for the specified miner's sector - - -Perms: read - -Inputs: -```json -[ - "t01234", - 9, - [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ] -] -``` - -Response: -```json -{ - "Info": { - "SealProof": 3, - "SectorNumber": 9, - "SealedCID": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "SealRandEpoch": 10101, - "DealIDs": null, - "Expiration": 10101, - "ReplaceCapacity": true, - "ReplaceSectorDeadline": 42, - "ReplaceSectorPartition": 42, - "ReplaceSectorNumber": 9 - }, - "PreCommitDeposit": "0", - "PreCommitEpoch": 10101, - "DealWeight": "0", - "VerifiedDealWeight": "0" -} -``` - -### StateVerifiedClientStatus -StateVerifiedClientStatus returns the data cap for the given address. -Returns nil if there is no entry in the data cap table for the -address. - - -Perms: read - -Inputs: -```json -[ - "t01234", - [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ] -] -``` - -Response: `"0"` - -### StateWaitMsg -StateWaitMsg looks back in the chain for a message. If not found, it blocks until the -message arrives on chain, and gets to the indicated confidence depth. - - -Perms: read - -Inputs: -```json -[ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - 42 -] -``` - -Response: -```json -{ - "Message": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "Receipt": { - "ExitCode": 0, - "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 - }, - "ReturnDec": {}, - "TipSet": [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ], - "Height": 10101 -} -``` - -## Sync -The Sync method group contains methods for interacting with and -observing the lotus sync service. - - -### SyncCheckBad -SyncCheckBad checks if a block was marked as bad, and if it was, returns -the reason. - - -Perms: read - -Inputs: -```json -[ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - } -] -``` - -Response: `"string value"` - -### SyncCheckpoint -SyncCheckpoint marks a blocks as checkpointed, meaning that it won't ever fork away from it. - - -Perms: admin - -Inputs: -```json -[ - [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ] -] -``` - -Response: `{}` - -### SyncIncomingBlocks -SyncIncomingBlocks returns a channel streaming incoming, potentially not -yet synced block headers. - - -Perms: read - -Inputs: `null` - -Response: -```json -{ - "Miner": "t01234", - "Ticket": { - "VRFProof": "Ynl0ZSBhcnJheQ==" - }, - "ElectionProof": { - "WinCount": 9, - "VRFProof": "Ynl0ZSBhcnJheQ==" - }, - "BeaconEntries": null, - "WinPoStProof": null, - "Parents": null, - "ParentWeight": "0", - "Height": 10101, - "ParentStateRoot": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "ParentMessageReceipts": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "Messages": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "BLSAggregate": { - "Type": 2, - "Data": "Ynl0ZSBhcnJheQ==" - }, - "Timestamp": 42, - "BlockSig": { - "Type": 2, - "Data": "Ynl0ZSBhcnJheQ==" - }, - "ForkSignaling": 42, - "ParentBaseFee": "0" -} -``` - -### SyncMarkBad -SyncMarkBad marks a blocks as bad, meaning that it won't ever by synced. -Use with extreme caution. - - -Perms: admin - -Inputs: -```json -[ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - } -] -``` - -Response: `{}` - -### SyncState -SyncState returns the current status of the lotus sync system. - - -Perms: read - -Inputs: `null` - -Response: -```json -{ - "ActiveSyncs": null -} -``` - -### SyncSubmitBlock -SyncSubmitBlock can be used to submit a newly created block to the. -network through this node - - -Perms: write - -Inputs: -```json -[ - { - "Header": { - "Miner": "t01234", - "Ticket": { - "VRFProof": "Ynl0ZSBhcnJheQ==" - }, - "ElectionProof": { - "WinCount": 9, - "VRFProof": "Ynl0ZSBhcnJheQ==" - }, - "BeaconEntries": null, - "WinPoStProof": null, - "Parents": null, - "ParentWeight": "0", - "Height": 10101, - "ParentStateRoot": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "ParentMessageReceipts": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "Messages": { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - "BLSAggregate": { - "Type": 2, - "Data": "Ynl0ZSBhcnJheQ==" - }, - "Timestamp": 42, - "BlockSig": { - "Type": 2, - "Data": "Ynl0ZSBhcnJheQ==" - }, - "ForkSignaling": 42, - "ParentBaseFee": "0" - }, - "BlsMessages": null, - "SecpkMessages": null - } -] -``` - -Response: `{}` - -### SyncUnmarkBad -SyncUnmarkBad unmarks a blocks as bad, making it possible to be validated and synced again. - - -Perms: admin - -Inputs: -```json -[ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - } -] -``` - -Response: `{}` - -## Wallet - - -### WalletBalance -WalletBalance returns the balance of the given address at the current head of the chain. - - -Perms: read - -Inputs: -```json -[ - "t01234" -] -``` - -Response: `"0"` - -### WalletDefaultAddress -WalletDefaultAddress returns the address marked as default in the wallet. - - -Perms: write - -Inputs: `null` - -Response: `"t01234"` - -### WalletDelete -WalletDelete deletes an address from the wallet. - - -Perms: write - -Inputs: -```json -[ - "t01234" -] -``` - -Response: `{}` - -### WalletExport -WalletExport returns the private key of an address in the wallet. - - -Perms: admin - -Inputs: -```json -[ - "t01234" -] -``` - -Response: -```json -{ - "Type": "string value", - "PrivateKey": "Ynl0ZSBhcnJheQ==" -} -``` - -### WalletHas -WalletHas indicates whether the given address is in the wallet. - - -Perms: write - -Inputs: -```json -[ - "t01234" -] -``` - -Response: `true` - -### WalletImport -WalletImport receives a KeyInfo, which includes a private key, and imports it into the wallet. - - -Perms: admin - -Inputs: -```json -[ - { - "Type": "string value", - "PrivateKey": "Ynl0ZSBhcnJheQ==" - } -] -``` - -Response: `"t01234"` - -### WalletList -WalletList lists all the addresses in the wallet. - - -Perms: write - -Inputs: `null` - -Response: `null` - -### WalletNew -WalletNew creates a new address in the wallet with the given sigType. - - -Perms: write - -Inputs: -```json -[ - 2 -] -``` - -Response: `"t01234"` - -### WalletSetDefault -WalletSetDefault marks the given address as as the default one. - - -Perms: admin - -Inputs: -```json -[ - "t01234" -] -``` - -Response: `{}` - -### WalletSign -WalletSign signs the given bytes using the given address. - - -Perms: sign - -Inputs: -```json -[ - "t01234", - "Ynl0ZSBhcnJheQ==" -] -``` - -Response: -```json -{ - "Type": 2, - "Data": "Ynl0ZSBhcnJheQ==" -} -``` - -### WalletSignMessage -WalletSignMessage signs the given message using the given address. - - -Perms: sign - -Inputs: -```json -[ - "t01234", - { - "Version": 42, - "To": "t01234", - "From": "t01234", - "Nonce": 42, - "Value": "0", - "GasLimit": 9, - "GasFeeCap": "0", - "GasPremium": "0", - "Method": 1, - "Params": "Ynl0ZSBhcnJheQ==" - } -] -``` - -Response: -```json -{ - "Message": { - "Version": 42, - "To": "t01234", - "From": "t01234", - "Nonce": 42, - "Value": "0", - "GasLimit": 9, - "GasFeeCap": "0", - "GasPremium": "0", - "Method": 1, - "Params": "Ynl0ZSBhcnJheQ==" - }, - "Signature": { - "Type": 2, - "Data": "Ynl0ZSBhcnJheQ==" - } -} -``` - -### WalletVerify -WalletVerify takes an address, a signature, and some bytes, and indicates whether the signature is valid. -The address does not have to be in the wallet. - - -Perms: read - -Inputs: -```json -[ - "t01234", - "Ynl0ZSBhcnJheQ==", - { - "Type": 2, - "Data": "Ynl0ZSBhcnJheQ==" - } -] -``` - -Response: `true` - diff --git a/documentation/en/building/api-troubleshooting.md b/documentation/en/building/api-troubleshooting.md deleted file mode 100644 index 0cb3a6800..000000000 --- a/documentation/en/building/api-troubleshooting.md +++ /dev/null @@ -1,36 +0,0 @@ -# API Troubleshooting - -## Types: params - -`params` must be an array. If there are no `params` you should still pass an empty array. - -## 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. - -```sh -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 - -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: - -```sh -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: - -```sh -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' -``` diff --git a/documentation/en/building/api.md b/documentation/en/building/api.md deleted file mode 100644 index 3a2c2902b..000000000 --- a/documentation/en/building/api.md +++ /dev/null @@ -1,38 +0,0 @@ -# API endpoints and methods - -The API can be accessed on: - -- `http://[api:port]/rpc/v0` - HTTP RPC-API endpoint -- `ws://[api:port]/rpc/v0` - Websocket RPC-API endpoint -- `PUT http://[api:port]/rest/v0/import` - REST endpoint for file import (multipart upload). It requires write permissions. - -The RPC methods can be found in the [Reference](en+api-methods) and directly in the source code: - -- [Both Lotus node + miner APIs](https://github.com/filecoin-project/lotus/blob/master/api/api_common.go) -- [Lotus node API](https://github.com/filecoin-project/lotus/blob/master/api/api_full.go) -- [Lotus miner API](https://github.com/filecoin-project/lotus/blob/master/api/api_storage.go) - - -## JSON-RPC client - -Lotus uses its own Go library implementation of [JSON-RPC](https://github.com/filecoin-project/go-jsonrpc). - -## cURL example - -To demonstrate making an API request, we will take the method `ChainHead` from [api/api_full.go](https://github.com/filecoin-project/lotus/blob/master/api/api_full.go). - -```go -ChainHead(context.Context) (*types.TipSet, error) -``` - -And create a CURL command. In this command, `ChainHead` is included as `{ "method": "Filecoin.ChainHead" }`: - -```sh -curl -X POST \ - -H "Content-Type: application/json" \ - -H "Authorization: Bearer $(cat ~/.lotusminer/token)" \ - --data '{ "jsonrpc": "2.0", "method": "Filecoin.ChainHead", "params": [], "id": 3 }' \ - 'http://127.0.0.1:1234/rpc/v0' -``` - -(See [this section](en+remote-api) to learn how to generate authorization tokens). diff --git a/documentation/en/building/building.md b/documentation/en/building/building.md deleted file mode 100644 index 5194f8314..000000000 --- a/documentation/en/building/building.md +++ /dev/null @@ -1,5 +0,0 @@ -# Building with Lotus - -Lotus applications provide HTTP (JSON-RPC) APIs that allow developers to control Lotus programatically. - -This section dives into how to setup and use these APIs, additionally providing information on advanced Lotus features and workflows, like Payment Channels or how to setup a fully local Lotus development network. diff --git a/documentation/en/building/jaeger-tracing.md b/documentation/en/building/jaeger-tracing.md deleted file mode 100644 index bbe4d3052..000000000 --- a/documentation/en/building/jaeger-tracing.md +++ /dev/null @@ -1,26 +0,0 @@ -# Jaeger Tracing - -Lotus has tracing built into many of its internals. To view the traces, first download [Jaeger](https://www.jaegertracing.io/download/) (Choose the 'all-in-one' binary). Then run it somewhere, start up the lotus daemon, and open up localhost:16686 in your browser. - -## Open Census - -Lotus uses [OpenCensus](https://opencensus.io/) for tracing application flow. This generates spans through the execution of annotated code paths. - -Currently it is set up to use Jaeger, though other tracing backends should be fairly easy to swap in. - -## Running Locally - -To easily run and view tracing locally, first, install jaeger. The easiest way to do this is to [download the binaries](https://www.jaegertracing.io/download/) and then run the `jaeger-all-in-one` binary. This will start up jaeger, listen for spans on `localhost:6831`, and expose a web UI for viewing traces on `http://localhost:16686/`. - -Now, to start sending traces from Lotus to Jaeger, set the environment variable `LOTUS_JAEGER` to `localhost:6831`, and start the `lotus daemon`. - -Now, to view any generated traces, open up `http://localhost:16686/` in your browser. - -## Adding Spans - -To annotate a new codepath with spans, add the following lines to the top of the function you wish to trace: - -```go -ctx, span := trace.StartSpan(ctx, "put function name here") -defer span.End() -``` diff --git a/documentation/en/building/local-devnet.md b/documentation/en/building/local-devnet.md deleted file mode 100644 index 3382b6471..000000000 --- a/documentation/en/building/local-devnet.md +++ /dev/null @@ -1,54 +0,0 @@ -# Setup Local Devnet - -Build the Lotus Binaries in debug mode, This enables the use of 2048 byte sectors. - -```sh -make 2k -``` - -Set the `LOTUS_SKIP_GENESIS_CHECK` environment variable to `_yes_`. This tells your -Lotus node that it's okay if the genesis being used doesn't match any baked-in -genesis. - -```sh -export LOTUS_SKIP_GENESIS_CHECK=_yes_ -``` - -Download the 2048 byte parameters: -```sh -./lotus fetch-params 2048 -``` - -Pre-seal some sectors: - -```sh -./lotus-seed pre-seal --sector-size 2KiB --num-sectors 2 -``` - -Create the genesis block and start up the first node: - -```sh -./lotus-seed genesis new localnet.json -./lotus-seed genesis add-miner localnet.json ~/.genesis-sectors/pre-seal-t01000.json -./lotus daemon --lotus-make-genesis=devgen.car --genesis-template=localnet.json --bootstrap=false -``` - -Then, in another console, import the genesis miner key: - -```sh -./lotus wallet import --as-default ~/.genesis-sectors/pre-seal-t01000.key -``` - -Set up the genesis miner: - -```sh -./lotus-miner init --genesis-miner --actor=t01000 --sector-size=2KiB --pre-sealed-sectors=~/.genesis-sectors --pre-sealed-metadata=~/.genesis-sectors/pre-seal-t01000.json --nosync -``` - -Now, finally, start up the miner: - -```sh -./lotus-miner run --nosync -``` - -If all went well, you will have your own local Lotus Devnet running. diff --git a/documentation/en/building/payment-channels.md b/documentation/en/building/payment-channels.md deleted file mode 100644 index afddcdc40..000000000 --- a/documentation/en/building/payment-channels.md +++ /dev/null @@ -1,111 +0,0 @@ -# Payment Channels - -Payment channels are used to transfer funds between two actors. - -For example in lotus a payment channel is created when a client wants to fetch data from a provider. -The client sends vouchers for the payment channel, and the provider sends data in response. - -The payment channel is created on-chain with an initial amount. -Vouchers allow the client and the provider to exchange funds incrementally off-chain. -The provider can submit vouchers to chain at any stage. -Either party to the payment channel can settle the payment channel on chain. -After a settlement period (currently 12 hours) either party to the payment channel can call collect on chain. -Collect sends the value of submitted vouchers to the channel recipient (the provider), and refunds the remaining channel balance to the channel creator (the client). - -Vouchers have a lane, a nonce and a value, where vouchers with a higher nonce supersede vouchers with a lower nonce in the same lane. -Each deal is created on a different lane. - -Note that payment channels and vouchers can be used for any situation in which two parties need to incrementally transfer value between each other off-chain. - -## Using the CLI - -For example a client creates a payment channel to a provider with value 10 FIL. - -```sh -$ lotus paych add-funds 10 - -``` - -The client creates a voucher in lane 0 (implied) with nonce 1 (implied) and value 2. - -```sh -$ lotus paych voucher create 2 - -``` - -The client sends the voucher to the provider and the provider adds the voucher to their local store. - -```sh -$ lotus paych voucher add -``` - -The provider sends some data to the client. - -The client creates a voucher in lane 0 (implied) with nonce 2 (implied) and value 4. - -```sh -$ lotus paych voucher create 4 - -``` - -The client sends the voucher to the provider and the provider adds the voucher and sends back more data. -etc. - -The client can add value to the channel after it has been created by calling `paych add-funds` with the same client and provider addresses. - -```sh -$ lotus paych add-funds 5 - # Same address as above. Channel now has 15 -``` - -Once the client has received all their data, they may settle the channel. -Note that settlement doesn't have to be done immediately. -For example the client may keep the channel open as long as it wants to continue making deals with the provider. - -```sh -$ lotus paych settle -``` - -The provider can submit vouchers to chain (note that lotus does this automatically when it sees a settle message appear on chain). -The provider may have received many vouchers with incrementally higher values. -The provider should submit the best vouchers. Note that there will be one best voucher for each lane. - -```sh -$ lotus paych voucher best-spendable - - - - -$ lotus paych voucher submit -``` - -Once the settlement period is over, either the client or provider can call collect to disburse funds. - -```sh -$ lotus paych collect -``` - -Check the status of a channel that is still being created using `lotus paych status-by-from-to`. - -```sh -$ lotus paych status-by-from-to -Creating channel - From: t3sb6xzvs6rhlziatagevxpp3dwapdolurtkpn4kyh3kgoo4tn5o7lutjqlsnvpceztlhxu3lzzfe34rvpsjgq - To: t1zip4sblhyrn4oxygzsm6nafbsynp2avmk3xafea - Pending Amt: 10000 - Wait Sentinel: bafy2bzacedk2jidsyxcynusted35t5ipkhu2kpiodtwyjr3pimrhke6f5pqbm -``` - -Check the status of a channel that has been created using `lotus paych status`. - -```sh -$ lotus paych status -Channel exists - Channel: t2nydpzhmeqkmid5smtqnowlr2mr5az6rexpmyv6i - From: t3sb6xzvs6rhlziatagevxpp3dwapdolurtkpn4kyh3kgoo4tn5o7lutjqlsnvpceztlhxu3lzzfe34rvpsjgq - To: t1zip4sblhyrn4oxygzsm6nafbsynp2avmk3xafea - Confirmed Amt: 10000 - Pending Amt: 6000 - Queued Amt: 3000 - Voucher Redeemed Amt: 2000 -``` diff --git a/documentation/en/building/remote-api.md b/documentation/en/building/remote-api.md deleted file mode 100644 index d0fedb51b..000000000 --- a/documentation/en/building/remote-api.md +++ /dev/null @@ -1,69 +0,0 @@ -# Setting up remote API access - -The **Lotus Miner** and the **Lotus Node** applications come with their own local API endpoints setup by default when they are running. - -These endpoints are used by `lotus` and `lotus-miner` to interact with the running process. In this section we will explain how to enable remote access to the Lotus APIs. - -Note that instructions are the same for `lotus` and `lotus-miner`. For simplicity, we will just show how to do it with `lotus`. - -## Setting the listening interface for the API endpoint - -By default, the API listens on the local "loopback" interface (`127.0.0.1`). This is configured in the `config.toml` file: - -```toml -[API] -# ListenAddress = "/ip4/127.0.0.1/tcp/1234/http" -# RemoteListenAddress = "" -# Timeout = "30s" -``` - -To access the API remotely, Lotus needs to listen on the right IP/interface. The IP associated to each interface can be usually found with the command `ip a`. Once the right IP is known, it can be set in the configuration: - -```toml -[API] -ListenAddress = "/ip4//tcp/3453/http" # port is an example - -# Only relevant for lotus-miner -# This should be the IP:Port pair where the miner is reachable from anyone trying to dial to it. -# If you have placed a reverse proxy or a NAT'ing device in front of it, this may be different from -# the EXTERNAL_INTERFACE_IP. -RemoteListenAddress = "" -``` - -> `0.0.0.0` can be used too. This is a wildcard that means "all interfaces". Depending on the network setup, this may affect security (listening on the wrong, exposed interface). - -After making these changes, please restart the affected process. - -## Issuing tokens - -Any client wishing to talk to the API endpoints will need a token. Tokens can be generated with: - -```sh -lotus auth create-token --perm -``` - -(similarly for the Lotus Miner). - -The permissions work as follows: - -- `read` - Read node state, no private data. -- `write` - Write to local store / chain, and `read` permissions. -- `sign` - Use private keys stored in wallet for signing, `read` and `write` permissions. -- `admin` - Manage permissions, `read`, `write`, and `sign` permissions. - - -Tokens can then be used in applications by setting an Authorization header as: - -``` -Authorization: Bearer -``` - - -## Environment variables - -`lotus`, `lotus-miner` and `lotus-worker` can actually interact with their respective applications running on a different node. All is needed to configure them are the following the *environment variables*: - -```sh -FULLNODE_API_INFO="TOKEN:/ip4//tcp//http" -MINER_API_INFO="TOKEN:/ip4//tcp//http" -``` diff --git a/documentation/en/getting-started/getting-started.md b/documentation/en/getting-started/getting-started.md deleted file mode 100644 index 99b4095d4..000000000 --- a/documentation/en/getting-started/getting-started.md +++ /dev/null @@ -1,3 +0,0 @@ -# Getting started - -This section will get you started with Lotus. We will setup the Lotus daemon (that should already be [installed](en+install)), start it, create a wallet and use it to send and receive some Filecoin. diff --git a/documentation/en/getting-started/setup-troubleshooting.md b/documentation/en/getting-started/setup-troubleshooting.md deleted file mode 100644 index f27a3faa5..000000000 --- a/documentation/en/getting-started/setup-troubleshooting.md +++ /dev/null @@ -1,57 +0,0 @@ -# Setup Troubleshooting - - -## Error: initializing node error: cbor input had wrong number of fields - -This happens when you are starting Lotus which has been compiled for one network, but it encounters data in the Lotus data folder which is for a different network, or for an older incompatible version. - -The solution is to clear the data folder (see below). - -## Config: Clearing data - -Here is a command that will delete your chain data, stored wallets, stored data and any miners you have set up: - -```sh -rm -rf ~/.lotus ~/.lotusminer -``` - -Note you do not always need to clear your data for [updating](en+update). - -## Error: Failed to connect bootstrap peer - -```sh -WARN peermgr peermgr/peermgr.go:131 failed to connect to bootstrap peer: failed to dial : all dials failed - * [/ip4/147.75.80.17/tcp/1347] failed to negotiate security protocol: connected to wrong peer -``` - -- Try running the build steps again and make sure that you have the latest code from GitHub. - -```sh -ERROR hello hello/hello.go:81 other peer has different genesis! -``` - -- Try deleting your file system's `~/.lotus` directory. Check that it exists with `ls ~/.lotus`. - -```sh -- repo is already locked -``` - -- You already have another lotus daemon running. - -## Config: Open files limit - -Lotus will attempt to set up the file descriptor (FD) limit automatically. If that does not work, you can still configure your system to allow higher than the default values. - -On most systems you can check the open files limit with: - -```sh -ulimit -n -``` - -You can also modify this number by using the `ulimit` command. It gives you the ability to control the resources available for the shell or process started by it. If the number is below 10000, you can change it with the following command prior to starting the Lotus daemon: - -```sh -ulimit -n 10000 -``` - -Note that this is not persisted and that systemd manages its own FD limits for services. Please use your favourite search engine to find instructions on how to persist and configure FD limits for your system. diff --git a/documentation/en/getting-started/setup.md b/documentation/en/getting-started/setup.md deleted file mode 100644 index e751da80b..000000000 --- a/documentation/en/getting-started/setup.md +++ /dev/null @@ -1,169 +0,0 @@ -# Setting up Lotus - -Your Lotus binaries have been installed and you are ready to start participating in the Filecoin network. - -## Selecting the right network - -You should have built the Lotus binaries from the right Github branch and Lotus will be fully setup to join the matching [Filecoin network](https://docs.filecoin.io/how-to/networks/). For more information on switching networks, check the [updating Lotus section](en+update). - -## Starting the daemon - -To start the daemon simply run: - -```sh -lotus daemon -``` - -or if you are using the provided systemd service files, do: - -```sh -systemctl start lotus-daemon -``` - -__If you are using Lotus from China__, make sure you set the following environment variable before running Lotus: - -``` -export IPFS_GATEWAY="https://proof-parameters.s3.cn-south-1.jdcloud-oss.com/ipfs/" -``` - - -During the first start, Lotus: - -* Will setup its data folder at `~/.lotus` -* Will download the necessary parameters -* Start syncing the Lotus chain - -If you started lotus using systemd, the logs will appear in `/var/log/lotus/daemon.log` (not in journalctl as usual), otherwise you will see them in your screen. - -Do not be appalled by the amount of warnings and sometimes errors showing in the logs, there are usually part of the usual functioning of the daemon as part of a distributed network. - -## Waiting to sync - -After the first start, the chain will start syncing until it has reached the tip. You can check how far the syncing process is with: - -```sh -lotus sync status -``` - -You can also interactively wait for the chain to be fully synced with: - -```sh -lotus sync wait -``` - -## Interacting with the Lotus daemon - -As shown above, the `lotus` command allows to interact with the running daemon. You will see it getting used in many of the documentation examples. - -This command-line-interface is self-documenting: - -```sh -# Show general help -lotus --help -# Show specific help for the "client" subcommand -lotus client --help -``` - -For example, after your Lotus daemon has been running for a few minutes, use `lotus` to check the number of other peers that it is connected to in the Filecoin network: - -```sh -lotus net peers -``` - -## Controlling the logging level - -```sh -lotus log set-level -``` -This command can be used to toggle the logging levels of the different -systems of a Lotus node. In decreasing order -of logging detail, the levels are `debug`, `info`, `warn`, and `error`. - -As an example, -to set the `chain` and `blocksync` to log at the `debug` level, run -`lotus log set-level --system chain --system blocksync debug`. - -To see the various logging system, run `lotus log list`. - - -## Configuration - -### Configuration file - -The Lotus daemon stores a configuration file in `~/.lotus/config.toml`. Note that by default all settings are commented. Here is an example configuration: - -```toml -[API] - # Binding address for the Lotus API - ListenAddress = "/ip4/127.0.0.1/tcp/1234/http" - # Not used by lotus daemon - RemoteListenAddress = "" - # General network timeout value - Timeout = "30s" - -# Libp2p provides connectivity to other Filecoin network nodes -[Libp2p] - # Binding address swarm - 0 means random port. - ListenAddresses = ["/ip4/0.0.0.0/tcp/0", "/ip6/::/tcp/0"] - # Insert any addresses you want to explicitally - # announce to other peers here. Otherwise, they are - # guessed. - AnnounceAddresses = [] - # Insert any addresses to avoid announcing here. - NoAnnounceAddresses = [] - # Connection manager settings, decrease if your - # machine is overwhelmed by connections. - ConnMgrLow = 150 - ConnMgrHigh = 180 - ConnMgrGrace = "20s" - -# Pubsub is used to broadcast information in the network -[Pubsub] - Bootstrapper = false - RemoteTracer = "/dns4/pubsub-tracer.filecoin.io/tcp/4001/p2p/QmTd6UvR47vUidRNZ1ZKXHrAFhqTJAD27rKL9XYghEKgKX" - -# This section can be used to enable adding and retriving files from IPFS -[Client] - UseIpfs = false - IpfsMAddr = "" - IpfsUseForRetrieval = false - -# Metrics configuration -[Metrics] - Nickname = "" - HeadNotifs = false -``` - -### Ensuring connectivity to your Lotus daemon - -Usually your lotus daemon will establish connectivity with others in the network and try to make itself diallable using uPnP. If you wish to manually ensure that your daemon is reachable: - -* Set a fixed port of your choice in the `ListenAddresses` in the Libp2p section (i.e. 6665). -* Open a port in your router that is forwarded to this port. This is usually called featured as "Port forwarding" and the instructions differ from router model to model but there are many guides online. -* Add your public IP/port to `AnnounceAddresses`. i.e. `/ip4//tcp/6665/`. - -Note that it is not a requirement to use Lotus as a client to the network to be fully reachable, as your node already connects to others directly. - - -### Environment variables - -Common to most Lotus binaries: - -* `LOTUS_FD_MAX`: Sets the file descriptor limit for the process -* `LOTUS_JAEGER`: Sets the Jaeger URL to send traces. See TODO. -* `LOTUS_DEV`: Any non-empty value will enable more verbose logging, useful only for developers. - -Specific to the *Lotus daemon*: - -* `LOTUS_PATH`: Location to store Lotus data (defaults to `~/.lotus`). -* `LOTUS_SKIP_GENESIS_CHECK=_yes_`: Set only if you wish to run a lotus network with a different genesis block. -* `LOTUS_CHAIN_TIPSET_CACHE`: Sets the size for the chainstore tipset cache. Defaults to `8192`. Increase if you perform frequent arbitrary tipset lookups. -* `LOTUS_CHAIN_INDEX_CACHE`: Sets the size for the epoch index cache. Defaults to `32768`. Increase if you perform frequent deep chain lookups for block heights far from the latest height. -* `LOTUS_BSYNC_MSG_WINDOW`: Set the initial maximum window size for message fetching blocksync request. Set to 10-20 if you have an internet connection with low bandwidth. - -Specific to the *Lotus miner*: - -* `LOTUS_MINER_PATH`: Location for the miner's on-disk repo. Defaults to `./lotusminer`. -* A number of environment variables are respected for configuring the behaviour of the Filecoin proving subsystem. [See here](en+miner-setup). - - diff --git a/documentation/en/getting-started/wallet.md b/documentation/en/getting-started/wallet.md deleted file mode 100644 index 25a67fb09..000000000 --- a/documentation/en/getting-started/wallet.md +++ /dev/null @@ -1,58 +0,0 @@ -# Obtaining and sending FIL - -In order to receive and send FIL with Lotus you will need to have installed the program and be running the Lotus daemon. - -## Creating a wallet - - -```sh -lotus wallet new bls -``` - -This will print your Filecoin address. - -Your wallet information is stored in the `~/.lotus/keystore` (or `$LOTUS_PATH/keystore`). For instructions on export/import, see below. - -You can create multiple wallets and list them with: - -```sh -lotus wallet list -``` - -## Obtaining FIL - -FIL can be obtained either by using one of the Faucets (available for the test networks) or by buying it from an exchange supporting FIL trading (once mainnet has launched). - -Once you have received some FIL you can check your balance with: - -```sh -lotus wallet balance -``` - -Remember that your will only see the latest balance when your daemon is fully synced to the chain. - -## Sending FIL - -Sending some FIL can be achieved by running: - -```sh -lotus wallet send
-``` - -Make sure to check `lotus wallet send --help` for additional options. - -## Exporting and importing a wallet - -You can export and re-import a wallet with: - -```sh -lotus wallet export
> wallet.private -``` - -and: - -```sh -lotus wallet import wallet.private -``` - -Keep your wallet's private key safe! diff --git a/documentation/en/installation/install-linux.md b/documentation/en/installation/install-linux.md deleted file mode 100644 index 6fe12996e..000000000 --- a/documentation/en/installation/install-linux.md +++ /dev/null @@ -1,129 +0,0 @@ -# Linux installation - -This page will show you the steps to build and install Lotus in your Linux computer. - -## Dependencies - -### System dependencies - -First of all, building Lotus will require installing some system dependencies, usually provided by your distribution. - -For Arch Linux: - -```sh -sudo pacman -Syu opencl-icd-loader gcc git bzr jq pkg-config opencl-icd-loader opencl-headers -``` - -For Ubuntu: - -```sh -sudo apt update -sudo apt install mesa-opencl-icd ocl-icd-opencl-dev gcc git bzr jq pkg-config curl -sudo apt upgrade -``` - -For Fedora: - -```sh -sudo dnf -y update -sudo dnf -y install gcc git bzr jq pkgconfig mesa-libOpenCL mesa-libOpenCL-devel opencl-headers ocl-icd ocl-icd-devel clang llvm -``` - -For OpenSUSE: - -```sh -sudo zypper in gcc git jq make libOpenCL1 opencl-headers ocl-icd-devel clang llvm -sudo ln -s /usr/lib64/libOpenCL.so.1 /usr/lib64/libOpenCL.so -``` - -### Rustup - -Lotus needs [rustup](https://rustup.rs/): - -```sh -curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -``` - -Please make sure your `$PATH` variable is correctly configured after the rustup installation so that `cargo` and `rustc` are found in their rustup-configured locations. - -### Go - -To build lotus you will need a working installation of **[Go1.14](https://golang.org/dl/)**. Follow the [installation instructions](https://golang.org/doc/install), which generally amount to: - -```sh -# Example! Check the installation instructions. -wget -c https://dl.google.com/go/go1.14.7.linux-amd64.tar.gz -O - | sudo tar -xz -C /usr/local -``` - -## Build and install Lotus - -With all the above, you are ready to build and install the Lotus suite (`lotus`, `lotus-miner` and `lotus-worker`): - -```sh -git clone https://github.com/filecoin-project/lotus.git -cd lotus/ -``` - -__IF YOU ARE IN CHINA__, set `export GOPROXY=https://goproxy.cn` before building - -Now, choose the network that you will be joining: - -* For `testnet`: `git checkout master` -* For `nerpa`: `git checkout ntwk-nerpa` -* For `butterfly`: `git checkout ntwk-butterfly` - -Once on the right branch, do: - -```sh -make clean install -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...). `lotus-miner` will use `$HOME/.lotusminer` respectively. See the *environment variables* section below for how to customize these. - -> Remeber to [move your Lotus folder](en+update) if you are switching between different networks, or there has been a network reset. - - -### Native Filecoin FFI - -Some newer processors (AMD Zen (and later), Intel Ice Lake) have support SHA extensions. To make full use of your processor's capabilities, make sure you set the following variables BEFORE building from source (as described above): - -```sh -export RUSTFLAGS="-C target-cpu=native -g" -export FFI_BUILD_FROM_SOURCE=1 -``` - -> __NOTE__: This method of building does not produce portable binaries! Make sure you run the binary in the same machine as you built it. - -### systemd service files - -Lotus provides Systemd service files. They can be installed with: - -```sh -make install-daemon-service -make install-miner-service -``` - -After that, you should be able to control Lotus using `systemctl`. - -## Troubleshooting - -This section mentions some of the common pitfalls for building Lotus. Check the [getting started](en+getting-started) section for more tips on issues when running the lotus daemon. - -### Build errors - -Please check the build logs closely. If you have a dirty state in your git branch make sure to: - -```sh -git checkout -git reset origin/ --hard -make clean -``` - -### Slow builds from China - -Users from China can speed up their builds by setting: - -```sh -export GOPROXY=https://goproxy.cn -``` diff --git a/documentation/en/installation/install-macos.md b/documentation/en/installation/install-macos.md deleted file mode 100644 index ea9ecb8ca..000000000 --- a/documentation/en/installation/install-macos.md +++ /dev/null @@ -1,62 +0,0 @@ -# MacOS Instructions - -## Get XCode Command Line Tools - -To check if you already have the XCode Command Line Tools installed via the CLI, run: - -```sh -xcode-select -p -``` - -If this command returns a path, you can move on to the next step. Otherwise, to install via the CLI, run: - -```sh -xcode-select --install -``` - -To update, run: - -```sh -sudo rm -rf /Library/Developer/CommandLineTools -xcode-select --install -``` - -## Get HomeBrew - -We recommend that MacOS users use [HomeBrew](https://brew.sh) to install each the necessary packages. - -Check if you have HomeBrew: - -```sh -brew -v -``` - -This command returns a version number if you have HomeBrew installed and nothing otherwise. - -In your terminal, enter this command to install Homebrew: - -```sh -/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" -``` - -Use the command `brew install` to install the following packages: - -```sh -brew install go bzr jq pkg-config rustup -``` - -Clone - -```sh -git clone https://github.com/filecoin-project/lotus.git -cd lotus/ -``` - -Build - -```sh -make clean && make all -sudo make install -``` - -After intalling Lotus you will be ready to [setup and run the daemon](en+setup.md). diff --git a/documentation/en/installation/installation.md b/documentation/en/installation/installation.md deleted file mode 100644 index 98534da92..000000000 --- a/documentation/en/installation/installation.md +++ /dev/null @@ -1,39 +0,0 @@ -# Installation - -Lotus can be installed in [Linux](en-install-linux) and [MacOS](en-install-macos) machines by building it from source. Windows is not supported yet. - -This section contains guides to install Lotus in the supported platforms. - -Lotus is made of 3 binaries: - -* `lotus`: the main [Lotus node](en+setup) (Lotus client) -* `lotus-miner`: an application specifically for [Filecoin mining](en+miner-setup) -* `lotus-worker`: an additional [application to offload some heavy-processing tasks](en+lotus-worker) from the Lotus Miner. - -These applications are written in Go, but also import several Rust libraries. Lotus does not distribute -pre-compiled builds. - -## Hardware requirements - -### For client nodes - -* 8GiB of RAM -* Recommended for syncing speed: CPU with support for *Intel SHA Extensions* (AMD since Zen microarchitecture, Intel since Ice Lake). -* Recommended for speed: SSD hard drive (the bigger the better) - -### For miners - -The following correspond to the latest testing configuration: - -* 2 TB of hard drive space -* 8 core CPU -* 128 GiB of RAM with 256 GiB of NVMe SSD storage for swap (or simply, more RAM). -* Recommended for speed: CPU with support for *Intel SHA Extensions* (AMD since Zen microarchitecture, Intel since Ice Lake). -* GPU for block mining. The following have been [confirmed to be fast enough](en+gpus): - -- GeForce RTX 2080 Ti -- GeForce RTX 2080 SUPER -- GeForce RTX 2080 -- GeForce GTX 1080 Ti -- GeForce GTX 1080 -- GeForce GTX 1060 diff --git a/documentation/en/installation/update.md b/documentation/en/installation/update.md deleted file mode 100644 index 5d76592c9..000000000 --- a/documentation/en/installation/update.md +++ /dev/null @@ -1,72 +0,0 @@ -# Updating and restarting Lotus - -Updating Lotus is as simple as rebuilding and re-installing the software as explained in the previous sections. - -You can verify which version of Lotus you are running with: - -```sh -lotus version -``` - -Make sure that you `git pull` the branch that corresponds to the network that your Lotus daemon is using: - -```sh -git pull origin -make clean -make all -sudo make install # if necessary -``` - -Finally, restart the Lotus Node and/or Lotus Miner(s). - -__CAVEAT__: If you are running miners: check if your miner is safe to shut down and restart: `lotus-miner proving info`. If any deadline shows a block height in the past, do not restart: - -In the following example, Deadline Open is 454 which is earlier than Current Epoch of 500. This miner should **not** be shut down or restarted. - -``` -$ sudo lotus-miner proving info -Miner: t01001 -Current Epoch: 500 -Proving Period Boundary: 154 -Proving Period Start: 154 (2h53m0s ago) -Next Period Start: 3034 (in 21h7m0s) -Faults: 768 (100.00%) -Recovering: 768 -Deadline Index: 5 -Deadline Sectors: 0 -Deadline Open: 454 (23m0s ago) -Deadline Close: 514 (in 7m0s) -Deadline Challenge: 434 (33m0s ago) -Deadline FaultCutoff: 384 (58m0s ago) -``` - -In this next example, the miner can be safely restarted because no Deadlines are earlier than Current Epoch of 497. You have ~45 minutes before the miner must be back online to declare faults (FaultCutoff). If the miner has no faults, you have about an hour. - -``` -$ sudo lotus-miner proving info -Miner: t01000 -Current Epoch: 497 -Proving Period Boundary: 658 -Proving Period Start: 658 (in 1h20m30s) -Next Period Start: 3538 (in 25h20m30s) -Faults: 0 (0.00%) -Recovering: 0 -Deadline Index: 0 -Deadline Sectors: 768 -Deadline Open: 658 (in 1h20m30s) -Deadline Close: 718 (in 1h50m30s) -Deadline Challenge: 638 (in 1h10m30s) -Deadline FaultCutoff: 588 (in 45m30s) -``` - -## Switching networks and network resets - -If you wish to switch to a different lotus network or there has been a network reset, you will need to: - -* Checkout the appropiate repository branch and rebuild -* Ensure you do not mix Lotus data (`LOTUS_PATH`, usually `~/.lotus`) from a previous or different network. For this, either: - * Rename the folder to something else or, - * Set a different `LOTUS_PATH` for the new network. -* Same for `~/.lotusminer` if you are running a miner. - -Note that deleting the Lotus data folder will wipe all the chain data, wallets and configuration, so think twice before taking any non-reversible action. diff --git a/documentation/en/mining/gpus.md b/documentation/en/mining/gpus.md deleted file mode 100644 index ad0ed4f66..000000000 --- a/documentation/en/mining/gpus.md +++ /dev/null @@ -1,17 +0,0 @@ -# Benchmarking additional GPUs - -If you want to test a GPU that is not explicitly supported, set the following *environment variable*: - -```sh -BELLMAN_CUSTOM_GPU=":" -``` - -Here is an example of trying a GeForce GTX 1660 Ti with 1536 cores. - -```sh -BELLMAN_CUSTOM_GPU="GeForce GTX 1660 Ti:1536" -``` - -To get the number of cores for your GPU, you will need to check your card’s specifications. - -To perform the benchmark you can use Lotus' [benchmarking tool](https://github.com/filecoin-project/lotus/tree/master/cmd/lotus-bench). Results and discussion are tracked in a [GitHub issue thread](https://github.com/filecoin-project/lotus/issues/694). diff --git a/documentation/en/mining/lotus-seal-worker.md b/documentation/en/mining/lotus-seal-worker.md deleted file mode 100644 index 47e201ca5..000000000 --- a/documentation/en/mining/lotus-seal-worker.md +++ /dev/null @@ -1,99 +0,0 @@ -# Lotus Worker - -The **Lotus Worker** is an extra process that can offload heavy processing tasks from your **Lotus Miner**. The sealing process automatically runs in the **Lotus Miner** process, but you can use the Worker on another machine communicating over a fast network to free up resources on the machine running the mining process. - -## Installation - -The `lotus-worker` application is installed along with the others when running `sudo make install` as shown in the [Installation section](en+install-linux). For simplicity, we recommend following the same procedure in the machines that will run the Lotus Workers (even if the Lotus miner and the Lotus daemon are not used there). - -## Setting up the Miner - -### Allow external connections to the miner API - -First, you will need to ensure your `lotus-miner`'s API is accessible over the network. - -To do this, open up `~/.lotusminer/config.toml` (Or if you manually set `LOTUS_MINER_PATH`, look under that directory) and look for the API field. - -Default config: - -```toml -[API] -ListenAddress = "/ip4/127.0.0.1/tcp/2345/http" -RemoteListenAddress = "127.0.0.1:2345" -``` - -To make your node accessible over the local area network, you will need to determine your machine's IP on the LAN (`ip a`), and change the `127.0.0.1` in the file to that address. - -A more permissive and less secure option is to change it to `0.0.0.0`. This will allow anyone who can connect to your computer on that port to access the miner's API, though they will still need an auth token. - -`RemoteListenAddress` must be set to an address which other nodes on your network will be able to reach. - -### Create an authentication token - -Write down the output of: - -```sh -lotus-miner auth api-info --perm admin -``` - -The Lotus Workers will need this token to connect to the miner. - -## Connecting the Lotus Workers - -On each machine that will run the `lotus-worker` application you will need to define the following *environment variable*: - -```sh -export MINER_API_INFO::/ip4//tcp/2345` -``` - -If you are trying to use `lotus-worker` from China. You should additionally set: - -```sh -export IPFS_GATEWAY="https://proof-parameters.s3.cn-south-1.jdcloud-oss.com/ipfs/" -``` - - -Once that is done, you can run the Worker with: - -```sh -lotus-worker run -``` - -> If you are running multiple workers on the same host, you will need to specify the `--listen` flag and ensure each worker is on a different port. - -On your Lotus miner, check that the workers are correctly connected: - -```sh -lotus-miner sealing workers -Worker 0, host computer - CPU: [ ] 0 core(s) in use - RAM: [|||||||||||||||||| ] 28% 18.1 GiB/62.7 GiB - VMEM: [|||||||||||||||||| ] 28% 18.1 GiB/62.7 GiB - GPU: GeForce RTX 2080, not used - -Worker 1, host othercomputer - CPU: [ ] 0 core(s) in use - RAM: [|||||||||||||| ] 23% 14 GiB/62.7 GiB - VMEM: [|||||||||||||| ] 23% 14 GiB/62.7 GiB - GPU: GeForce RTX 2080, not used -``` - -## Running locally for manually managing process priority - -You can also run the **Lotus Worker** on the same machine as your **Lotus Miner**, so you can manually manage the process priority. - -To do so you have to first __disable all seal task types__ in the miner config. This is important to prevent conflicts between the two processes: - -```toml -[Storage] - AllowPreCommit1 = false - AllowPreCommit2 = false - AllowCommit = false - AllowUnseal = false -``` - -You can then run the miner on your local-loopback interface; - -```sh -lotus-worker run -``` diff --git a/documentation/en/mining/managing-deals.md b/documentation/en/mining/managing-deals.md deleted file mode 100644 index 5f73a6a2d..000000000 --- a/documentation/en/mining/managing-deals.md +++ /dev/null @@ -1,19 +0,0 @@ -# Managing deals - - -While the Lotus Miner is running as a daemon, the `lotus-miner` application can be used to manage and configure the miner: - - -```sh -lotus-miner storage-deals --help -``` - -Running the above command will show the different options related to deals. For example, `lotus-miner storage-deals set-ask` allows to set the price for storage that your miner uses to respond ask requests from clients. - -If deals are ongoing, you can check the data transfers with: - -```sh -lotus-miner data-transfers list -``` - -Make sure you explore the `lotus-miner` CLI. Every command is self-documented and takes a `--help` flag that offers specific information about it. diff --git a/documentation/en/mining/miner-setup.md b/documentation/en/mining/miner-setup.md deleted file mode 100644 index cafa1e7b1..000000000 --- a/documentation/en/mining/miner-setup.md +++ /dev/null @@ -1,241 +0,0 @@ -# Miner setup - -This page will guide you through all you need to know to sucessfully run a **Lotus Miner**. Before proceeding, remember that you should be running the Lotus daemon on a fully synced chain. - -## Performance tweaks - -This is a list of performance tweaks to consider before starting the miner: - -### Building - -As [explained already](en+install-linux#native-filecoin-ffi-10) should have exported the following variables before building the Lotus applications: - -```sh -export RUSTFLAGS="-C target-cpu=native -g" -export FFI_BUILD_FROM_SOURCE=1 -``` - -### Environment - -For high performance mining, we recommend setting the following variables in your environment so that they are available when running any of the Lotus applications: - -```sh -# See https://github.com/filecoin-project/bellman -export BELLMAN_CPU_UTILIZATION=0.875 - -# See https://github.com/filecoin-project/rust-fil-proofs/ -export FIL_PROOFS_MAXIMIZE_CACHING=1 # More speed at RAM cost (1x sector-size of RAM - 32 GB). -export FIL_PROOFS_USE_GPU_COLUMN_BUILDER=1 # precommit2 GPU acceleration -export FIL_PROOFS_USE_GPU_TREE_BUILDER=1 -``` - -IF YOU ARE RUNNING FROM CHINA: - -```sh -export IPFS_GATEWAY="https://proof-parameters.s3.cn-south-1.jdcloud-oss.com/ipfs/" -``` - -IF YOUR MINER RUNS IN A DIFFERENT MACHINE AS THE LOTUS DAEMON: - -```sh -export FULLNODE_API_INFO=:/ip4//tcp//http -``` - -If you will be using systemd service files to run the Lotus daemon and miner, make sure you include these variables manually in the service files. - -### Adding swap - -If you have only 128GiB of RAM, you will need to make sure your system provides at least an extra 256GiB of fast swap (preferably NVMe SSD): - -```sh -sudo fallocate -l 256G /swapfile -sudo chmod 600 /swapfile -sudo mkswap /swapfile -sudo swapon /swapfile -# show current swap spaces and take note of the current highest priority -swapon --show -# append the following line to /etc/fstab (ensure highest priority) and then reboot -# /swapfile swap swap pri=50 0 0 -sudo reboot -# check a 256GB swap file is automatically mounted and has the highest priority -swapon --show -``` - -## Creating a new BLS wallet - -You will need a BLS wallet (`t3...`) for mining. To create it, if you don't have one already, run: - -```sh -lotus wallet new bls -``` - -Next make sure to [send some funds](en+wallet) to this address so that the miner setup can be completed. - -## Initializing the miner - -> SPACE RACE: -> To participate in the Space race, please register your miner: -> -> - Visit the [faucet](http://spacerace.faucet.glif.io/) -> - Paste the address you created under REQUEST. -> - Press the Request button. - -Now that you have a miner address you can initialize the Lotus Miner: - -```sh -lotus-miner init --owner= --no-local-storage -``` - -* The `--no-local-storage` flag is used so that we configure specific locations for storage later below. -* The init process will download over 100GiB of initialization parameters to /var/tmp/filecoin-proof-parameters. Make sure there is space or set `FIL_PROOFS_PARAMETER_CACHE` to somewhere else. -* The Lotus Miner configuration folder is created at `~/.lotusminer/` or `$LOTUS_MINER_PATH` if set. - -## Reachability - -Before you start your miner, it is __very important__ to configure it so that it is reachable from any peer in the Filecoin network. For this you will need a stable public IP and edit your `~/.lotusminer/config.toml` as follows: - -```toml -... -[Libp2p] - ListenAddresses = ["/ip4/0.0.0.0/tcp/24001"] # choose a fixed port - AnnounceAddresses = ["/ip4//tcp/24001"] # important! -... -``` - -Once you start your miner, make sure you can connect to its public IP/port (you can use `telnet`, `nc` for the task...). If you have an active firewall or some sort, you may need to additionally open ports in it. - - -## Starting the miner - -You are now ready to start your Lotus miner: - -```sh -lotus-miner run -``` - -or if you are using the systemd service file: - -```sh -systemctl start lotus-miner -``` - -> __Do not proceed__ from here until you have verified that your miner not only is running, but also __reachable on its public IP address__. - -## Publishing the miner addresses - -Once the miner is up and running, publish your miner address (which you configured above) on the chain (please ensure it is dialable): - -```sh -lotus-miner actor set-addrs /ip4//tcp/24001 -``` - -## Setting locations for sealing and long-term storage - -If you used the `--no-local-storage` flag during initialization, you can now specify the disk locations for sealing (SSD recommended) and long-term storage (otherwise you can skip this): - -``` -lotus-miner storage attach --init --seal -lotus-miner storage attach --init --store -lotus-miner storage list -``` - -## Pledging sectors - -If you would like to compete for block rewards by increasing your power in the network as soon as possible, you can optionally pledge one or several sectors, depending on your storage. It can also be used to test that the sealing process works correctly. Pledging is equivalent to storing random data instead of real data obtained through storage deals. - -> Note that pledging sectors to the mainnet network makes most sense when trying to obtain a reasonable amount of total power in the network, thus obtaining real chances to mine new blocks. Otherwise it is only useful for testing purposes. - -If you decide to go ahead, then do: - -```sh -lotus-miner sectors pledge -``` - -This will write data to `$TMPDIR` so make sure that there is enough space available. - -You shoud check that your sealing job has started with: - -```sh -lotus-miner sealing jobs -``` - -This will be accommpanied by a file in `/unsealed`. - -After some minutes, you can check the sealing progress with: - -```sh -lotus-miner sectors list -# and -lotus-miner sealing workers -``` - -When sealing for the new is complete, `pSet: NO` will become `pSet: YES`. - -Once the sealing is finished, you will want to configure how long it took your miner to seal this sector and configure the miner accordingly. To find out how long it took use: - -``` -lotus-miner sectors status --log 0 -``` - -Once you know, you can edit the Miner's `~/.lotusminer/config.toml` accordingly: - -``` -... -[Dealmaking] -... - ExpectedSealDuration = "12h0m0s" # The time it took your miner -``` - -You can also take the chance to edit other values, such as `WaitForDealsDelay` which specifies the delay between accepting the first deal and sealing, allowing to place multiple deals in the same sector. - -Once you are done editing the configuration, [restart your miner](en+update). - -If you wish to be able to re-use a pledged sector for real storage deals before the pledged period of 6 months ends, you will need to mark them for upgrade: - -```sh -lotus-miner sectors mark-for-upgrade -``` - -The sector should become inactive within 24 hours. From that point, the pledged storage can be re-used to store real data associated with real storage deals. - -## Separate address for windowPoSt messages - -WindowPoSt is the mechanism through which storage is verified in Filecoin. It requires miners to submit proofs for all sectors every 24h, which require sending messages to the chain. - -Because many other mining related actions require sending messages to the chain, and not all of those are "high value", it may be desirable to use a separate account to send PoSt messages from. This allows for setting lower GasFeeCaps on the lower value messages without creating head-of-line blocking problems for the PoSt messages in congested chain conditions - -To set this up, first create a new account, and send it some funds for gas fees: - -```sh -lotus wallet new bls -t3defg... - -lotus send t3defg... 100 -``` - -Next add the control address: - -```sh -lotus-miner actor control set --really-do-it t3defg... -Add t3defg... -Message CID: bafy2.. -``` - -Wait for the message to land on chain: - -```sh -lotus state wait-msg bafy2.. -... -Exit Code: 0 -... -``` - -Finally, check the miner control address list to make sure the address was correctly setup: - -```sh -lotus-miner actor control list -name ID key use balance -owner t01111 t3abcd... other 300 FIL -worker t01111 t3abcd... other 300 FIL -control-0 t02222 t3defg... post 100 FIL -``` diff --git a/documentation/en/mining/mining-troubleshooting.md b/documentation/en/mining/mining-troubleshooting.md deleted file mode 100644 index a9972c2bd..000000000 --- a/documentation/en/mining/mining-troubleshooting.md +++ /dev/null @@ -1,59 +0,0 @@ -# Mining Troubleshooting - -## Config: Filecoin Proof Parameters directory - -If you want to put the **Filecoin Proof Parameters** in a different directory, use the following environment variable: - -```sh -FIL_PROOFS_PARAMETER_CACHE -``` - -## Error: Can't acquire bellman.lock - -The **Bellman** lockfile is created to lock a GPU for a process. This bug can occur when this file isn't properly cleaned up: - -```sh -mining block failed: computing election proof: github.com/filecoin-project/lotus/miner.(*Miner).mineOne -``` - -This bug occurs when the miner can't acquire the `bellman.lock`. To fix it you need to stop the `lotus-miner` and remove `/tmp/bellman.lock`. - -## Error: Failed to get api endpoint - -```sh -lotus-miner info -# WARN main lotus-miner/main.go:73 failed to get api endpoint: (/Users/myrmidon/.lotusminer) %!w(*errors.errorString=&{API not running (no endpoint)}): -``` - -If you see this, that means your **Lotus Miner** isn't ready yet. You need to finish [syncing the chain](en+setup#waiting-to-sync-370). - -## Error: Your computer may not be fast enough - -```sh -CAUTION: block production took longer than the block delay. Your computer may not be fast enough to keep up -``` - -If you see this, that means your computer is too slow and your blocks are not included in the chain, and you will not receive any rewards. - -## Error: No space left on device - -```sh -lotus-miner sectors pledge -# No space left on device (os error 28) -``` - -If you see this, that means `pledge-sector` wrote too much data to `$TMPDIR` which by default is the root partition (This is common for Linux setups). Usually your root partition does not get the largest partition of storage so you will need to change the environment variable to something else. - -## Error: GPU unused - -If you suspect that your GPU is not being used, first make sure it is properly configured as described in the [testing configuration page](hardware-mining.md). Once you've done that (and set the `BELLMAN_CUSTOM_GPU` as appropriate if necessary) you can verify your GPU is being used by running a quick lotus-bench benchmark. - -First, to watch GPU utilization run `nvtop` in one terminal, then in a separate terminal, run: - -```sh -make bench -./bench sealing --sector-size=2KiB -``` - -This process uses a fair amount of GPU, and generally takes ~4 minutes to complete. If you do not see any activity in nvtop from lotus during the entire process, it is likely something is misconfigured with your GPU. - diff --git a/documentation/en/mining/mining.md b/documentation/en/mining/mining.md deleted file mode 100644 index b1b944c6e..000000000 --- a/documentation/en/mining/mining.md +++ /dev/null @@ -1,8 +0,0 @@ -# Storage Mining - -This section of the documentation explains how to do storage mining with Lotus. Please note that not everyone can do storage mining, and that you should not attempt it on on networks where sector sizes are 32GB+ unless you meet the [hardware requirements](en+install#hardware-requirements-1). - -From this point we assume that you have setup and are running the [Lotus Node](en+setup), that it has fully synced the Filecoin chain and that you are familiar with how to interact with it using the `lotus` command-line interface. - -In order to perform storage mining, apart from the Lotus daemon, you will be additionally interacting with the `lotus-miner` and potentially the `lotus-worker` applications (which you should have [installed](en+install-linux) along the `lotus` application already). - diff --git a/documentation/en/store/adding-from-ipfs.md b/documentation/en/store/adding-from-ipfs.md deleted file mode 100644 index 2f6b097cc..000000000 --- a/documentation/en/store/adding-from-ipfs.md +++ /dev/null @@ -1,20 +0,0 @@ -# Adding data from IPFS - -Lotus supports making deals with data stored in IPFS, without having to re-import it into lotus. - -To enable this integration, you need to have an IPFS daemon running in the background. - -Then, open up `~/.lotus/config.toml` (or if you manually set `LOTUS_PATH`, look under that directory) and look for the Client field, and set `UseIpfs` to `true`. - -```toml -[Client] -UseIpfs = true -``` - -After restarting the lotus daemon, you should be able to make deals with data in your IPFS node: - -```sh -$ ipfs add -r SomeData -QmSomeData -$ ./lotus client deal QmSomeData t01000 0.0000000001 80000 -``` diff --git a/documentation/en/store/making-deals.md b/documentation/en/store/making-deals.md deleted file mode 100644 index ca3a47182..000000000 --- a/documentation/en/store/making-deals.md +++ /dev/null @@ -1,71 +0,0 @@ -# Making storage deals - -## Adding a file to Lotus - -Before sending data to a Filecoin miner for storage, the data needs to be correctly formatted and packed. This can be achieved by locally importing the data into Lotus with: - -```sh -lotus client import ./your-example-file.txt -``` - -Upon success, this command will return a **Data CID**. This is a very important piece of information, as it will be used to make deals to both store and retrieve the data in the future. - -You can list the data CIDs of the files you locally imported with: - -```sh -lotus client local -``` - -## Storing data in the network - -To store data in the network you will need to: - -* Find a Filecoin miner willing to store it -* Make a deal with the miner agreeing on the price to pay and the duration for which the data should be stored. - -You can obtain a list of all miners in the network with: - -```sh -lotus state list-miners -t0xxxx -t0xxxy -t0xxxz -... -``` - -This will print a list of miner IDs. In order to ask for the terms offered by a particular miner, you can then run: - -```sh -lotus client query-ask -``` - -If you are satisfied with the terms, you can proceed to propose a deal to the miner, using the **Data CID** that you obtained during the import step: - - -```sh -lotus client deal -``` - -This command will interactively ask you for the CID, miner ID and duration in days for the deal. You can also call it with arguments: - -```sh -lotus client deal -``` - -where the `duration` is expressed in blocks (1 block is equivalent to 30s). - -## Checking the status of the deals - -You can list deals with: - -```sh -lotus client list-deals -``` - -Among other things, this will give you information about the current state on your deals, whether they have been published on chain (by the miners) and whether the miners have been slashed for not honoring them. - -For a deal to succeed, the miner needs to be correctly configured and running, accept the deal and *seal* the file correctly. Otherwise, the deal will appear in error state. - -You can make deals with multiple miners for the same data. - -Once a deal is sucessful and the data is *sealed*, it can be [retrieved](en+retrieving). diff --git a/documentation/en/store/retrieve.md b/documentation/en/store/retrieve.md deleted file mode 100644 index 1e8db65af..000000000 --- a/documentation/en/store/retrieve.md +++ /dev/null @@ -1,27 +0,0 @@ -# Retrieving Data - -Once data has been succesfully [stored](en+making-deals) and sealed by a Filecoin miner, it can be retrieved. - -In order to do this we will need to create a **retrieval deal**. - -## Finding data by CID - -In order to retrieve some data you will need the **Data CID** that was used to create the storage deal. - -You can find who is storing the data by running: - -```sh -lotus client find -``` - -## Making a retrieval deal - -You can then make a retrieval deal with: - -```sh -lotus client retrieve -``` - -This commands take other optional flags (check `--help`). - -If the outfile does not exist it will be created in the Lotus repository directory. This process may take 2 to 10 minutes. diff --git a/documentation/en/store/storage-troubleshooting.md b/documentation/en/store/storage-troubleshooting.md deleted file mode 100644 index 7087ec3d0..000000000 --- a/documentation/en/store/storage-troubleshooting.md +++ /dev/null @@ -1,30 +0,0 @@ -# Storage Troubleshooting - -## Error: Routing: not found - -``` -WARN main lotus/main.go:72 routing: not found -``` - -This error means that the miner is offline. - -## Error: Failed to start deal - -```sh -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 - -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: - -```sh -lotus-miner sectors list -``` - -When sealing is complete, `pSet: NO` will become `pSet: YES`. - diff --git a/documentation/en/store/store.md b/documentation/en/store/store.md deleted file mode 100644 index 205bd0e23..000000000 --- a/documentation/en/store/store.md +++ /dev/null @@ -1,11 +0,0 @@ -# Storing and retrieving data - -Lotus enables you to store any data on the Filecoin network and retrieve it later. This is achieved by making *deals* with miners. - -A *storage deal* specifies that a miner should store ceratin data for a previously agreed period and price. - -Once a deal is made, the data is then sent to the miners, which regularly proves that it is storing it. If they fail to do so, the miner is penalized (slashed). - -The data can be retrieved with a *retrieval deal*. - -This section explains how to use Lotus to [store](en+making-deals) and [retrieve](en+retrieving) data from the Filecoin network. From 591e32af487204f58d092015a8ce25439b884718 Mon Sep 17 00:00:00 2001 From: Hector Sanjuan Date: Thu, 17 Sep 2020 20:41:46 +0200 Subject: [PATCH 06/13] Remove circle_ci docs-check. --- .circleci/config.yml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index acd447f69..d8f149889 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -346,15 +346,6 @@ jobs: - run: git --no-pager diff - run: git --no-pager diff --quiet - docs-check: - executor: golang - steps: - - install-deps - - prepare - - run: make docsgen - - run: git --no-pager diff - - run: git --no-pager diff --quiet - lint: &lint description: | Run golangci-lint. @@ -424,7 +415,6 @@ workflows: - mod-tidy-check - gofmt - cbor-gen-check - - docs-check - test: codecov-upload: true test-suite-name: full From bc9232544c7f5d68c737b9d7887ae05f0232ff34 Mon Sep 17 00:00:00 2001 From: Hector Sanjuan Date: Thu, 17 Sep 2020 20:48:09 +0200 Subject: [PATCH 07/13] Remove faqs too --- documentation/en/faqs.md | 132 --------------------------------------- 1 file changed, 132 deletions(-) delete mode 100644 documentation/en/faqs.md diff --git a/documentation/en/faqs.md b/documentation/en/faqs.md deleted file mode 100644 index 74119a5b6..000000000 --- a/documentation/en/faqs.md +++ /dev/null @@ -1,132 +0,0 @@ -# Frequently Asked Questions - -Here are some FAQs concerning the Lotus implementation and participation in -Testnet. -For questions concerning the broader Filecoin project, please -go [here](https://filecoin.io/faqs/). - -## Introduction to Lotus - -### What is Lotus? - -Lotus is an implementation of the **Filecoin Distributed Storage Network**, written in Go. -It is designed to be modular and interoperable with any other implementation of the Filecoin Protocol. - -### What are the components of Lotus? - -Lotus is composed of two separate pieces that can talk to each other: - -The Lotus Node can sync the blockchain, validating all blocks, transfers, and deals -along the way. It can also facilitate the creation of new storage deals. If you are not -interested in providing your own storage to the network, and do not want to produce blocks -yourself, then the Lotus Node is all you need! - -The Lotus Miner does everything you need for the registration of storage, and the -production of new blocks. The Lotus Miner communicates with the network by talking -to a Lotus Node over the JSON-RPC API. - -## Setting up a Lotus Node - -### How do I set up a Lotus Node? - -Follow the instructions found [here](en+install) and [here](en+setup). - -### Where can I get the latest version of Lotus? - -Download the binary tagged as the `Latest Release` from the [Lotus Github repo](https://github.com/filecoin-project/lotus/releases) or checkout the `master` branch of the source repository. - -### What operating systems can Lotus run on? - -Lotus can build and run on most Linux and MacOS systems with [at least 8GB of RAM](en+install#hardware-requirements-1). Windows is not yet supported. - -### How can I update to the latest version of Lotus? - -To update Lotus, follow the instructions [here](en+update). - -### How do I prepare a fresh installation of Lotus? - -Stop the Lotus daemon, and delete all related files, including sealed and chain data by -running `rm ~/.lotus ~/.lotusminer`. - -Then, install Lotus afresh by following the instructions -found [here](en+install). - -### Can I configure where the node's config and data goes? - -Yes! The `LOTUS_PATH` variable sets the path for where the Lotus node's data is written. -The `LOTUS_MINER_PATH` variable does the same for miner-specific information. - -## Interacting with a Lotus Node - -### How can I communicate with a Lotus Node? - -Lotus Nodes have a command-line interface, as well as a JSON-RPC API. - -### What are the commands I can send using the command-line interface? - -The command-line interface is self-documenting, try running `lotus --help` from the `lotus` home -directory for more. - -### How can I send a request over the JSON-RPC API? - -Information on how to send a `cURL` request to the JSON-RPC API can be found -[here](en+api). - -### What are the requests I can send over the JSON-RPC API? - -Please have a look [here](en+api). - - -## The Test Network - -### What is Testnet? - -Testnet is a live network of Lotus Nodes run by the -community for testing purposes. - -### Is FIL on the Testnet worth anything? - -Nothing at all! - -### How can I see the status of Testnet? - -The [dashboard](https://stats.testnet.filecoin.io/) displays the status of the network as -well as a ton of other metrics you might find interesting. - -## Mining with a Lotus Node on Testnet - -### How do I get started mining with Lotus? - -Follow the instructions found [here](en+mining). - -### What are the minimum hardware requirements? - -An example test configuration, and minimum hardware requirements can be found -[here](en+install#hardware-requirements-8). - -Note that these might NOT be the minimum requirements for mining on Mainnet. - -### What are some GPUs that have been tested? - -See previous question. - -### Why is my GPU not being used when sealing a sector? - -Sealing a sector does not involve constant GPU operations. It's possible -that your GPU simply isn't necessary at the moment you checked. - -## Advanced questions - -### Is there a Docker image for lotus? - -Community-contributed Docker and Docker Compose examples are available -[here](https://github.com/filecoin-project/lotus/tree/master/tools/dockers/docker-examples). - -### How can I run two miners on the same machine? - -You can do so by changing the storage path variable for the second miner, e.g., -`LOTUS_MINER_PATH=~/.lotusminer2`. You will also need to make sure that no ports collide. - -### How do I setup my own local devnet? - -Follow the instructions found [here](en+local-devnet). From 784399738a49f282bc8002771e080d2eba5a33f9 Mon Sep 17 00:00:00 2001 From: Hector Sanjuan Date: Thu, 17 Sep 2020 20:50:37 +0200 Subject: [PATCH 08/13] Keep api-methods.md even if not part of the docs --- Makefile | 2 +- documentation/en/api-methods.md | 4567 +++++++++++++++++++++++++++++++ 2 files changed, 4568 insertions(+), 1 deletion(-) create mode 100644 documentation/en/api-methods.md diff --git a/Makefile b/Makefile index 245d8a9a0..56ab361ec 100644 --- a/Makefile +++ b/Makefile @@ -286,7 +286,7 @@ method-gen: gen: type-gen method-gen docsgen: - go run ./api/docgen > documentation/en/building/api-methods.md + go run ./api/docgen > documentation/en/api-methods.md print-%: @echo $*=$($*) diff --git a/documentation/en/api-methods.md b/documentation/en/api-methods.md new file mode 100644 index 000000000..2f3164bb7 --- /dev/null +++ b/documentation/en/api-methods.md @@ -0,0 +1,4567 @@ +# Groups +* [](#) + * [Closing](#Closing) + * [Shutdown](#Shutdown) + * [Version](#Version) +* [Auth](#Auth) + * [AuthNew](#AuthNew) + * [AuthVerify](#AuthVerify) +* [Beacon](#Beacon) + * [BeaconGetEntry](#BeaconGetEntry) +* [Chain](#Chain) + * [ChainExport](#ChainExport) + * [ChainGetBlock](#ChainGetBlock) + * [ChainGetBlockMessages](#ChainGetBlockMessages) + * [ChainGetGenesis](#ChainGetGenesis) + * [ChainGetMessage](#ChainGetMessage) + * [ChainGetNode](#ChainGetNode) + * [ChainGetParentMessages](#ChainGetParentMessages) + * [ChainGetParentReceipts](#ChainGetParentReceipts) + * [ChainGetPath](#ChainGetPath) + * [ChainGetRandomnessFromBeacon](#ChainGetRandomnessFromBeacon) + * [ChainGetRandomnessFromTickets](#ChainGetRandomnessFromTickets) + * [ChainGetTipSet](#ChainGetTipSet) + * [ChainGetTipSetByHeight](#ChainGetTipSetByHeight) + * [ChainHasObj](#ChainHasObj) + * [ChainHead](#ChainHead) + * [ChainNotify](#ChainNotify) + * [ChainReadObj](#ChainReadObj) + * [ChainSetHead](#ChainSetHead) + * [ChainStatObj](#ChainStatObj) + * [ChainTipSetWeight](#ChainTipSetWeight) +* [Client](#Client) + * [ClientCalcCommP](#ClientCalcCommP) + * [ClientDataTransferUpdates](#ClientDataTransferUpdates) + * [ClientDealSize](#ClientDealSize) + * [ClientFindData](#ClientFindData) + * [ClientGenCar](#ClientGenCar) + * [ClientGetDealInfo](#ClientGetDealInfo) + * [ClientGetDealUpdates](#ClientGetDealUpdates) + * [ClientHasLocal](#ClientHasLocal) + * [ClientImport](#ClientImport) + * [ClientListDataTransfers](#ClientListDataTransfers) + * [ClientListDeals](#ClientListDeals) + * [ClientListImports](#ClientListImports) + * [ClientMinerQueryOffer](#ClientMinerQueryOffer) + * [ClientQueryAsk](#ClientQueryAsk) + * [ClientRemoveImport](#ClientRemoveImport) + * [ClientRetrieve](#ClientRetrieve) + * [ClientRetrieveTryRestartInsufficientFunds](#ClientRetrieveTryRestartInsufficientFunds) + * [ClientRetrieveWithEvents](#ClientRetrieveWithEvents) + * [ClientStartDeal](#ClientStartDeal) +* [Gas](#Gas) + * [GasEstimateFeeCap](#GasEstimateFeeCap) + * [GasEstimateGasLimit](#GasEstimateGasLimit) + * [GasEstimateGasPremium](#GasEstimateGasPremium) + * [GasEstimateMessageGas](#GasEstimateMessageGas) +* [I](#I) + * [ID](#ID) +* [Log](#Log) + * [LogList](#LogList) + * [LogSetLevel](#LogSetLevel) +* [Market](#Market) + * [MarketEnsureAvailable](#MarketEnsureAvailable) +* [Miner](#Miner) + * [MinerCreateBlock](#MinerCreateBlock) + * [MinerGetBaseInfo](#MinerGetBaseInfo) +* [Mpool](#Mpool) + * [MpoolClear](#MpoolClear) + * [MpoolGetConfig](#MpoolGetConfig) + * [MpoolGetNonce](#MpoolGetNonce) + * [MpoolPending](#MpoolPending) + * [MpoolPush](#MpoolPush) + * [MpoolPushMessage](#MpoolPushMessage) + * [MpoolSelect](#MpoolSelect) + * [MpoolSetConfig](#MpoolSetConfig) + * [MpoolSub](#MpoolSub) +* [Msig](#Msig) + * [MsigAddApprove](#MsigAddApprove) + * [MsigAddCancel](#MsigAddCancel) + * [MsigAddPropose](#MsigAddPropose) + * [MsigApprove](#MsigApprove) + * [MsigCancel](#MsigCancel) + * [MsigCreate](#MsigCreate) + * [MsigGetAvailableBalance](#MsigGetAvailableBalance) + * [MsigGetVested](#MsigGetVested) + * [MsigPropose](#MsigPropose) + * [MsigSwapApprove](#MsigSwapApprove) + * [MsigSwapCancel](#MsigSwapCancel) + * [MsigSwapPropose](#MsigSwapPropose) +* [Net](#Net) + * [NetAddrsListen](#NetAddrsListen) + * [NetAgentVersion](#NetAgentVersion) + * [NetAutoNatStatus](#NetAutoNatStatus) + * [NetBandwidthStats](#NetBandwidthStats) + * [NetBandwidthStatsByPeer](#NetBandwidthStatsByPeer) + * [NetBandwidthStatsByProtocol](#NetBandwidthStatsByProtocol) + * [NetConnect](#NetConnect) + * [NetConnectedness](#NetConnectedness) + * [NetDisconnect](#NetDisconnect) + * [NetFindPeer](#NetFindPeer) + * [NetPeers](#NetPeers) + * [NetPubsubScores](#NetPubsubScores) +* [Paych](#Paych) + * [PaychAllocateLane](#PaychAllocateLane) + * [PaychAvailableFunds](#PaychAvailableFunds) + * [PaychAvailableFundsByFromTo](#PaychAvailableFundsByFromTo) + * [PaychCollect](#PaychCollect) + * [PaychGet](#PaychGet) + * [PaychGetWaitReady](#PaychGetWaitReady) + * [PaychList](#PaychList) + * [PaychNewPayment](#PaychNewPayment) + * [PaychSettle](#PaychSettle) + * [PaychStatus](#PaychStatus) + * [PaychVoucherAdd](#PaychVoucherAdd) + * [PaychVoucherCheckSpendable](#PaychVoucherCheckSpendable) + * [PaychVoucherCheckValid](#PaychVoucherCheckValid) + * [PaychVoucherCreate](#PaychVoucherCreate) + * [PaychVoucherList](#PaychVoucherList) + * [PaychVoucherSubmit](#PaychVoucherSubmit) +* [State](#State) + * [StateAccountKey](#StateAccountKey) + * [StateAllMinerFaults](#StateAllMinerFaults) + * [StateCall](#StateCall) + * [StateChangedActors](#StateChangedActors) + * [StateCirculatingSupply](#StateCirculatingSupply) + * [StateCompute](#StateCompute) + * [StateDealProviderCollateralBounds](#StateDealProviderCollateralBounds) + * [StateGetActor](#StateGetActor) + * [StateGetReceipt](#StateGetReceipt) + * [StateListActors](#StateListActors) + * [StateListMessages](#StateListMessages) + * [StateListMiners](#StateListMiners) + * [StateLookupID](#StateLookupID) + * [StateMarketBalance](#StateMarketBalance) + * [StateMarketDeals](#StateMarketDeals) + * [StateMarketParticipants](#StateMarketParticipants) + * [StateMarketStorageDeal](#StateMarketStorageDeal) + * [StateMinerActiveSectors](#StateMinerActiveSectors) + * [StateMinerAvailableBalance](#StateMinerAvailableBalance) + * [StateMinerDeadlines](#StateMinerDeadlines) + * [StateMinerFaults](#StateMinerFaults) + * [StateMinerInfo](#StateMinerInfo) + * [StateMinerInitialPledgeCollateral](#StateMinerInitialPledgeCollateral) + * [StateMinerPartitions](#StateMinerPartitions) + * [StateMinerPower](#StateMinerPower) + * [StateMinerPreCommitDepositForPower](#StateMinerPreCommitDepositForPower) + * [StateMinerProvingDeadline](#StateMinerProvingDeadline) + * [StateMinerRecoveries](#StateMinerRecoveries) + * [StateMinerSectorCount](#StateMinerSectorCount) + * [StateMinerSectors](#StateMinerSectors) + * [StateMsgGasCost](#StateMsgGasCost) + * [StateNetworkName](#StateNetworkName) + * [StateReadState](#StateReadState) + * [StateReplay](#StateReplay) + * [StateSearchMsg](#StateSearchMsg) + * [StateSectorExpiration](#StateSectorExpiration) + * [StateSectorGetInfo](#StateSectorGetInfo) + * [StateSectorPartition](#StateSectorPartition) + * [StateSectorPreCommitInfo](#StateSectorPreCommitInfo) + * [StateVerifiedClientStatus](#StateVerifiedClientStatus) + * [StateWaitMsg](#StateWaitMsg) +* [Sync](#Sync) + * [SyncCheckBad](#SyncCheckBad) + * [SyncCheckpoint](#SyncCheckpoint) + * [SyncIncomingBlocks](#SyncIncomingBlocks) + * [SyncMarkBad](#SyncMarkBad) + * [SyncState](#SyncState) + * [SyncSubmitBlock](#SyncSubmitBlock) + * [SyncUnmarkBad](#SyncUnmarkBad) +* [Wallet](#Wallet) + * [WalletBalance](#WalletBalance) + * [WalletDefaultAddress](#WalletDefaultAddress) + * [WalletDelete](#WalletDelete) + * [WalletExport](#WalletExport) + * [WalletHas](#WalletHas) + * [WalletImport](#WalletImport) + * [WalletList](#WalletList) + * [WalletNew](#WalletNew) + * [WalletSetDefault](#WalletSetDefault) + * [WalletSign](#WalletSign) + * [WalletSignMessage](#WalletSignMessage) + * [WalletVerify](#WalletVerify) +## + + +### Closing + + +Perms: read + +Inputs: `null` + +Response: `{}` + +### Shutdown + + +Perms: admin + +Inputs: `null` + +Response: `{}` + +### Version + + +Perms: read + +Inputs: `null` + +Response: +```json +{ + "Version": "string value", + "APIVersion": 3584, + "BlockDelay": 42 +} +``` + +## Auth + + +### AuthNew + + +Perms: admin + +Inputs: +```json +[ + null +] +``` + +Response: `"Ynl0ZSBhcnJheQ=="` + +### AuthVerify + + +Perms: read + +Inputs: +```json +[ + "string value" +] +``` + +Response: `null` + +## Beacon +The Beacon method group contains methods for interacting with the random beacon (DRAND) + + +### BeaconGetEntry +BeaconGetEntry returns the beacon entry for the given filecoin epoch. If +the entry has not yet been produced, the call will block until the entry +becomes available + + +Perms: read + +Inputs: +```json +[ + 10101 +] +``` + +Response: +```json +{ + "Round": 42, + "Data": "Ynl0ZSBhcnJheQ==" +} +``` + +## Chain +The Chain method group contains methods for interacting with the +blockchain, but that do not require any form of state computation. + + +### ChainExport +ChainExport returns a stream of bytes with CAR dump of chain data. +The exported chain data includes the header chain from the given tipset +back to genesis, the entire genesis state, and the most recent 'nroots' +state trees. +If oldmsgskip is set, messages from before the requested roots are also not included. + + +Perms: read + +Inputs: +```json +[ + 10101, + true, + [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" + } + ] +] +``` + +Response: `"Ynl0ZSBhcnJheQ=="` + +### ChainGetBlock +ChainGetBlock returns the block specified by the given CID. + + +Perms: read + +Inputs: +```json +[ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } +] +``` + +Response: +```json +{ + "Miner": "t01234", + "Ticket": { + "VRFProof": "Ynl0ZSBhcnJheQ==" + }, + "ElectionProof": { + "WinCount": 9, + "VRFProof": "Ynl0ZSBhcnJheQ==" + }, + "BeaconEntries": null, + "WinPoStProof": null, + "Parents": null, + "ParentWeight": "0", + "Height": 10101, + "ParentStateRoot": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "ParentMessageReceipts": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "Messages": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "BLSAggregate": { + "Type": 2, + "Data": "Ynl0ZSBhcnJheQ==" + }, + "Timestamp": 42, + "BlockSig": { + "Type": 2, + "Data": "Ynl0ZSBhcnJheQ==" + }, + "ForkSignaling": 42, + "ParentBaseFee": "0" +} +``` + +### ChainGetBlockMessages +ChainGetBlockMessages returns messages stored in the specified block. + + +Perms: read + +Inputs: +```json +[ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } +] +``` + +Response: +```json +{ + "BlsMessages": null, + "SecpkMessages": null, + "Cids": null +} +``` + +### ChainGetGenesis +ChainGetGenesis returns the genesis tipset. + + +Perms: read + +Inputs: `null` + +Response: +```json +{ + "Cids": null, + "Blocks": null, + "Height": 0 +} +``` + +### ChainGetMessage +ChainGetMessage reads a message referenced by the specified CID from the +chain blockstore. + + +Perms: read + +Inputs: +```json +[ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } +] +``` + +Response: +```json +{ + "Version": 42, + "To": "t01234", + "From": "t01234", + "Nonce": 42, + "Value": "0", + "GasLimit": 9, + "GasFeeCap": "0", + "GasPremium": "0", + "Method": 1, + "Params": "Ynl0ZSBhcnJheQ==" +} +``` + +### ChainGetNode +There are not yet any comments for this method. + +Perms: read + +Inputs: +```json +[ + "string value" +] +``` + +Response: +```json +{ + "Cid": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "Obj": {} +} +``` + +### ChainGetParentMessages +ChainGetParentMessages returns messages stored in parent tipset of the +specified block. + + +Perms: read + +Inputs: +```json +[ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } +] +``` + +Response: `null` + +### ChainGetParentReceipts +ChainGetParentReceipts returns receipts for messages in parent tipset of +the specified block. + + +Perms: read + +Inputs: +```json +[ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } +] +``` + +Response: `null` + +### ChainGetPath +ChainGetPath returns a set of revert/apply operations needed to get from +one tipset to another, for example: +``` + to + ^ +from tAA + ^ ^ +tBA tAB + ^---*--^ + ^ + tRR +``` +Would return `[revert(tBA), apply(tAB), apply(tAA)]` + + +Perms: read + +Inputs: +```json +[ + [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" + } + ], + [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" + } + ] +] +``` + +Response: `null` + +### ChainGetRandomnessFromBeacon +ChainGetRandomnessFromBeacon is used to sample the beacon for randomness. + + +Perms: read + +Inputs: +```json +[ + [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" + } + ], + 2, + 10101, + "Ynl0ZSBhcnJheQ==" +] +``` + +Response: `null` + +### ChainGetRandomnessFromTickets +ChainGetRandomnessFromTickets is used to sample the chain for randomness. + + +Perms: read + +Inputs: +```json +[ + [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" + } + ], + 2, + 10101, + "Ynl0ZSBhcnJheQ==" +] +``` + +Response: `null` + +### ChainGetTipSet +ChainGetTipSet returns the tipset specified by the given TipSetKey. + + +Perms: read + +Inputs: +```json +[ + [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" + } + ] +] +``` + +Response: +```json +{ + "Cids": null, + "Blocks": null, + "Height": 0 +} +``` + +### ChainGetTipSetByHeight +ChainGetTipSetByHeight looks back for a tipset at the specified epoch. +If there are no blocks at the specified epoch, a tipset at an earlier epoch +will be returned. + + +Perms: read + +Inputs: +```json +[ + 10101, + [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" + } + ] +] +``` + +Response: +```json +{ + "Cids": null, + "Blocks": null, + "Height": 0 +} +``` + +### ChainHasObj +ChainHasObj checks if a given CID exists in the chain blockstore. + + +Perms: read + +Inputs: +```json +[ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } +] +``` + +Response: `true` + +### ChainHead +ChainHead returns the current head of the chain. + + +Perms: read + +Inputs: `null` + +Response: +```json +{ + "Cids": null, + "Blocks": null, + "Height": 0 +} +``` + +### ChainNotify +ChainNotify returns channel with chain head updates. +First message is guaranteed to be of len == 1, and type == 'current'. + + +Perms: read + +Inputs: `null` + +Response: `null` + +### ChainReadObj +ChainReadObj reads ipld nodes referenced by the specified CID from chain +blockstore and returns raw bytes. + + +Perms: read + +Inputs: +```json +[ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } +] +``` + +Response: `"Ynl0ZSBhcnJheQ=="` + +### ChainSetHead +ChainSetHead forcefully sets current chain head. Use with caution. + + +Perms: admin + +Inputs: +```json +[ + [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" + } + ] +] +``` + +Response: `{}` + +### ChainStatObj +ChainStatObj returns statistics about the graph referenced by 'obj'. +If 'base' is also specified, then the returned stat will be a diff +between the two objects. + + +Perms: read + +Inputs: +```json +[ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } +] +``` + +Response: +```json +{ + "Size": 42, + "Links": 42 +} +``` + +### ChainTipSetWeight +ChainTipSetWeight computes weight for the specified tipset. + + +Perms: read + +Inputs: +```json +[ + [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" + } + ] +] +``` + +Response: `"0"` + +## Client +The Client methods all have to do with interacting with the storage and +retrieval markets as a client + + +### ClientCalcCommP +ClientCalcCommP calculates the CommP for a specified file + + +Perms: read + +Inputs: +```json +[ + "string value" +] +``` + +Response: +```json +{ + "Root": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "Size": 1024 +} +``` + +### ClientDataTransferUpdates +There are not yet any comments for this method. + +Perms: write + +Inputs: `null` + +Response: +```json +{ + "TransferID": 3, + "Status": 1, + "BaseCID": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "IsInitiator": true, + "IsSender": true, + "Voucher": "string value", + "Message": "string value", + "OtherPeer": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", + "Transferred": 42 +} +``` + +### ClientDealSize +ClientDealSize calculates real deal data size + + +Perms: read + +Inputs: +```json +[ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } +] +``` + +Response: +```json +{ + "PayloadSize": 9, + "PieceSize": 1032 +} +``` + +### ClientFindData +ClientFindData identifies peers that have a certain file, and returns QueryOffers (one per peer). + + +Perms: read + +Inputs: +```json +[ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + null +] +``` + +Response: `null` + +### ClientGenCar +ClientGenCar generates a CAR file for the specified file. + + +Perms: write + +Inputs: +```json +[ + { + "Path": "string value", + "IsCAR": true + }, + "string value" +] +``` + +Response: `{}` + +### ClientGetDealInfo +ClientGetDealInfo returns the latest information about a given deal. + + +Perms: read + +Inputs: +```json +[ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } +] +``` + +Response: +```json +{ + "ProposalCid": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "State": 42, + "Message": "string value", + "Provider": "t01234", + "DataRef": { + "TransferType": "string value", + "Root": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "PieceCid": null, + "PieceSize": 1024 + }, + "PieceCID": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "Size": 42, + "PricePerEpoch": "0", + "Duration": 42, + "DealID": 5432, + "CreationTime": "0001-01-01T00:00:00Z" +} +``` + +### ClientGetDealUpdates +ClientGetDealUpdates returns the status of updated deals + + +Perms: read + +Inputs: `null` + +Response: +```json +{ + "ProposalCid": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "State": 42, + "Message": "string value", + "Provider": "t01234", + "DataRef": { + "TransferType": "string value", + "Root": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "PieceCid": null, + "PieceSize": 1024 + }, + "PieceCID": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "Size": 42, + "PricePerEpoch": "0", + "Duration": 42, + "DealID": 5432, + "CreationTime": "0001-01-01T00:00:00Z" +} +``` + +### ClientHasLocal +ClientHasLocal indicates whether a certain CID is locally stored. + + +Perms: write + +Inputs: +```json +[ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } +] +``` + +Response: `true` + +### ClientImport +ClientImport imports file under the specified path into filestore. + + +Perms: admin + +Inputs: +```json +[ + { + "Path": "string value", + "IsCAR": true + } +] +``` + +Response: +```json +{ + "Root": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "ImportID": 50 +} +``` + +### ClientListDataTransfers +ClientListTransfers returns the status of all ongoing transfers of data + + +Perms: write + +Inputs: `null` + +Response: `null` + +### ClientListDeals +ClientListDeals returns information about the deals made by the local client. + + +Perms: write + +Inputs: `null` + +Response: `null` + +### ClientListImports +ClientListImports lists imported files and their root CIDs + + +Perms: write + +Inputs: `null` + +Response: `null` + +### ClientMinerQueryOffer +ClientMinerQueryOffer returns a QueryOffer for the specific miner and file. + + +Perms: read + +Inputs: +```json +[ + "t01234", + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + null +] +``` + +Response: +```json +{ + "Err": "string value", + "Root": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "Piece": null, + "Size": 42, + "MinPrice": "0", + "UnsealPrice": "0", + "PaymentInterval": 42, + "PaymentIntervalIncrease": 42, + "Miner": "t01234", + "MinerPeer": { + "Address": "t01234", + "ID": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", + "PieceCID": null + } +} +``` + +### ClientQueryAsk +ClientQueryAsk returns a signed StorageAsk from the specified miner. + + +Perms: read + +Inputs: +```json +[ + "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", + "t01234" +] +``` + +Response: +```json +{ + "Ask": { + "Price": "0", + "VerifiedPrice": "0", + "MinPieceSize": 1032, + "MaxPieceSize": 1032, + "Miner": "t01234", + "Timestamp": 10101, + "Expiry": 10101, + "SeqNo": 42 + }, + "Signature": { + "Type": 2, + "Data": "Ynl0ZSBhcnJheQ==" + } +} +``` + +### ClientRemoveImport +ClientRemoveImport removes file import + + +Perms: admin + +Inputs: +```json +[ + 50 +] +``` + +Response: `{}` + +### ClientRetrieve +ClientRetrieve initiates the retrieval of a file, as specified in the order. + + +Perms: admin + +Inputs: +```json +[ + { + "Root": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "Piece": null, + "Size": 42, + "Total": "0", + "UnsealPrice": "0", + "PaymentInterval": 42, + "PaymentIntervalIncrease": 42, + "Client": "t01234", + "Miner": "t01234", + "MinerPeer": { + "Address": "t01234", + "ID": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", + "PieceCID": null + } + }, + { + "Path": "string value", + "IsCAR": true + } +] +``` + +Response: `{}` + +### ClientRetrieveTryRestartInsufficientFunds +ClientRetrieveTryRestartInsufficientFunds attempts to restart stalled retrievals on a given payment channel +which are stuck due to insufficient funds + + +Perms: write + +Inputs: +```json +[ + "t01234" +] +``` + +Response: `{}` + +### ClientRetrieveWithEvents +ClientRetrieveWithEvents initiates the retrieval of a file, as specified in the order, and provides a channel +of status updates. + + +Perms: admin + +Inputs: +```json +[ + { + "Root": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "Piece": null, + "Size": 42, + "Total": "0", + "UnsealPrice": "0", + "PaymentInterval": 42, + "PaymentIntervalIncrease": 42, + "Client": "t01234", + "Miner": "t01234", + "MinerPeer": { + "Address": "t01234", + "ID": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", + "PieceCID": null + } + }, + { + "Path": "string value", + "IsCAR": true + } +] +``` + +Response: +```json +{ + "Event": 5, + "Status": 0, + "BytesReceived": 42, + "FundsSpent": "0", + "Err": "string value" +} +``` + +### ClientStartDeal +ClientStartDeal proposes a deal with a miner. + + +Perms: admin + +Inputs: +```json +[ + { + "Data": { + "TransferType": "string value", + "Root": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "PieceCid": null, + "PieceSize": 1024 + }, + "Wallet": "t01234", + "Miner": "t01234", + "EpochPrice": "0", + "MinBlocksDuration": 42, + "ProviderCollateral": "0", + "DealStartEpoch": 10101, + "FastRetrieval": true, + "VerifiedDeal": true + } +] +``` + +Response: `null` + +## Gas + + +### GasEstimateFeeCap +GasEstimateFeeCap estimates gas fee cap + + +Perms: read + +Inputs: +```json +[ + { + "Version": 42, + "To": "t01234", + "From": "t01234", + "Nonce": 42, + "Value": "0", + "GasLimit": 9, + "GasFeeCap": "0", + "GasPremium": "0", + "Method": 1, + "Params": "Ynl0ZSBhcnJheQ==" + }, + 9, + [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" + } + ] +] +``` + +Response: `"0"` + +### GasEstimateGasLimit +GasEstimateGasLimit estimates gas used by the message and returns it. +It fails if message fails to execute. + + +Perms: read + +Inputs: +```json +[ + { + "Version": 42, + "To": "t01234", + "From": "t01234", + "Nonce": 42, + "Value": "0", + "GasLimit": 9, + "GasFeeCap": "0", + "GasPremium": "0", + "Method": 1, + "Params": "Ynl0ZSBhcnJheQ==" + }, + [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" + } + ] +] +``` + +Response: `9` + +### GasEstimateGasPremium +GasEstimateGasPremium estimates what gas price should be used for a +message to have high likelihood of inclusion in `nblocksincl` epochs. + + +Perms: read + +Inputs: +```json +[ + 42, + "t01234", + 9, + [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" + } + ] +] +``` + +Response: `"0"` + +### GasEstimateMessageGas +GasEstimateMessageGas estimates gas values for unset message gas fields + + +Perms: read + +Inputs: +```json +[ + { + "Version": 42, + "To": "t01234", + "From": "t01234", + "Nonce": 42, + "Value": "0", + "GasLimit": 9, + "GasFeeCap": "0", + "GasPremium": "0", + "Method": 1, + "Params": "Ynl0ZSBhcnJheQ==" + }, + { + "MaxFee": "0" + }, + [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" + } + ] +] +``` + +Response: +```json +{ + "Version": 42, + "To": "t01234", + "From": "t01234", + "Nonce": 42, + "Value": "0", + "GasLimit": 9, + "GasFeeCap": "0", + "GasPremium": "0", + "Method": 1, + "Params": "Ynl0ZSBhcnJheQ==" +} +``` + +## I + + +### ID + + +Perms: read + +Inputs: `null` + +Response: `"12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf"` + +## Log + + +### LogList + + +Perms: write + +Inputs: `null` + +Response: `null` + +### LogSetLevel + + +Perms: write + +Inputs: +```json +[ + "string value", + "string value" +] +``` + +Response: `{}` + +## Market + + +### MarketEnsureAvailable +MarketFreeBalance + + +Perms: sign + +Inputs: +```json +[ + "t01234", + "t01234", + "0" +] +``` + +Response: +```json +{ + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" +} +``` + +## Miner + + +### MinerCreateBlock +There are not yet any comments for this method. + +Perms: write + +Inputs: +```json +[ + { + "Miner": "t01234", + "Parents": [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" + } + ], + "Ticket": { + "VRFProof": "Ynl0ZSBhcnJheQ==" + }, + "Eproof": { + "WinCount": 9, + "VRFProof": "Ynl0ZSBhcnJheQ==" + }, + "BeaconValues": null, + "Messages": null, + "Epoch": 10101, + "Timestamp": 42, + "WinningPoStProof": null + } +] +``` + +Response: +```json +{ + "Header": { + "Miner": "t01234", + "Ticket": { + "VRFProof": "Ynl0ZSBhcnJheQ==" + }, + "ElectionProof": { + "WinCount": 9, + "VRFProof": "Ynl0ZSBhcnJheQ==" + }, + "BeaconEntries": null, + "WinPoStProof": null, + "Parents": null, + "ParentWeight": "0", + "Height": 10101, + "ParentStateRoot": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "ParentMessageReceipts": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "Messages": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "BLSAggregate": { + "Type": 2, + "Data": "Ynl0ZSBhcnJheQ==" + }, + "Timestamp": 42, + "BlockSig": { + "Type": 2, + "Data": "Ynl0ZSBhcnJheQ==" + }, + "ForkSignaling": 42, + "ParentBaseFee": "0" + }, + "BlsMessages": null, + "SecpkMessages": null +} +``` + +### MinerGetBaseInfo +There are not yet any comments for this method. + +Perms: read + +Inputs: +```json +[ + "t01234", + 10101, + [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" + } + ] +] +``` + +Response: +```json +{ + "MinerPower": "0", + "NetworkPower": "0", + "Sectors": null, + "WorkerKey": "t01234", + "SectorSize": 34359738368, + "PrevBeaconEntry": { + "Round": 42, + "Data": "Ynl0ZSBhcnJheQ==" + }, + "BeaconEntries": null, + "HasMinPower": true +} +``` + +## Mpool +The Mpool methods are for interacting with the message pool. The message pool +manages all incoming and outgoing 'messages' going over the network. + + +### MpoolClear +MpoolClear clears pending messages from the mpool + + +Perms: write + +Inputs: +```json +[ + true +] +``` + +Response: `{}` + +### MpoolGetConfig +MpoolGetConfig returns (a copy of) the current mpool config + + +Perms: read + +Inputs: `null` + +Response: +```json +{ + "PriorityAddrs": null, + "SizeLimitHigh": 123, + "SizeLimitLow": 123, + "ReplaceByFeeRatio": 12.3, + "PruneCooldown": 60000000000, + "GasLimitOverestimation": 12.3 +} +``` + +### MpoolGetNonce +MpoolGetNonce gets next nonce for the specified sender. +Note that this method may not be atomic. Use MpoolPushMessage instead. + + +Perms: read + +Inputs: +```json +[ + "t01234" +] +``` + +Response: `42` + +### MpoolPending +MpoolPending returns pending mempool messages. + + +Perms: read + +Inputs: +```json +[ + [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" + } + ] +] +``` + +Response: `null` + +### MpoolPush +MpoolPush pushes a signed message to mempool. + + +Perms: write + +Inputs: +```json +[ + { + "Message": { + "Version": 42, + "To": "t01234", + "From": "t01234", + "Nonce": 42, + "Value": "0", + "GasLimit": 9, + "GasFeeCap": "0", + "GasPremium": "0", + "Method": 1, + "Params": "Ynl0ZSBhcnJheQ==" + }, + "Signature": { + "Type": 2, + "Data": "Ynl0ZSBhcnJheQ==" + } + } +] +``` + +Response: +```json +{ + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" +} +``` + +### MpoolPushMessage +MpoolPushMessage atomically assigns a nonce, signs, and pushes a message +to mempool. +maxFee is only used when GasFeeCap/GasPremium fields aren't specified + +When maxFee is set to 0, MpoolPushMessage will guess appropriate fee +based on current chain conditions + + +Perms: sign + +Inputs: +```json +[ + { + "Version": 42, + "To": "t01234", + "From": "t01234", + "Nonce": 42, + "Value": "0", + "GasLimit": 9, + "GasFeeCap": "0", + "GasPremium": "0", + "Method": 1, + "Params": "Ynl0ZSBhcnJheQ==" + }, + { + "MaxFee": "0" + } +] +``` + +Response: +```json +{ + "Message": { + "Version": 42, + "To": "t01234", + "From": "t01234", + "Nonce": 42, + "Value": "0", + "GasLimit": 9, + "GasFeeCap": "0", + "GasPremium": "0", + "Method": 1, + "Params": "Ynl0ZSBhcnJheQ==" + }, + "Signature": { + "Type": 2, + "Data": "Ynl0ZSBhcnJheQ==" + } +} +``` + +### MpoolSelect +MpoolSelect returns a list of pending messages for inclusion in the next block + + +Perms: read + +Inputs: +```json +[ + [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" + } + ], + 12.3 +] +``` + +Response: `null` + +### MpoolSetConfig +MpoolSetConfig sets the mpool config to (a copy of) the supplied config + + +Perms: write + +Inputs: +```json +[ + { + "PriorityAddrs": null, + "SizeLimitHigh": 123, + "SizeLimitLow": 123, + "ReplaceByFeeRatio": 12.3, + "PruneCooldown": 60000000000, + "GasLimitOverestimation": 12.3 + } +] +``` + +Response: `{}` + +### MpoolSub +There are not yet any comments for this method. + +Perms: read + +Inputs: `null` + +Response: +```json +{ + "Type": 0, + "Message": { + "Message": { + "Version": 42, + "To": "t01234", + "From": "t01234", + "Nonce": 42, + "Value": "0", + "GasLimit": 9, + "GasFeeCap": "0", + "GasPremium": "0", + "Method": 1, + "Params": "Ynl0ZSBhcnJheQ==" + }, + "Signature": { + "Type": 2, + "Data": "Ynl0ZSBhcnJheQ==" + } + } +} +``` + +## Msig +The Msig methods are used to interact with multisig wallets on the +filecoin network + + +### MsigAddApprove +MsigAddApprove approves a previously proposed AddSigner message +It takes the following params: , , , +, , + + +Perms: sign + +Inputs: +```json +[ + "t01234", + "t01234", + 42, + "t01234", + "t01234", + true +] +``` + +Response: +```json +{ + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" +} +``` + +### MsigAddCancel +MsigAddCancel cancels a previously proposed AddSigner message +It takes the following params: , , , +, + + +Perms: sign + +Inputs: +```json +[ + "t01234", + "t01234", + 42, + "t01234", + true +] +``` + +Response: +```json +{ + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" +} +``` + +### MsigAddPropose +MsigAddPropose proposes adding a signer in the multisig +It takes the following params: , , +, + + +Perms: sign + +Inputs: +```json +[ + "t01234", + "t01234", + "t01234", + true +] +``` + +Response: +```json +{ + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" +} +``` + +### MsigApprove +MsigApprove approves a previously-proposed multisig message +It takes the following params: , , , , , +, , + + +Perms: sign + +Inputs: +```json +[ + "t01234", + 42, + "t01234", + "t01234", + "0", + "t01234", + 42, + "Ynl0ZSBhcnJheQ==" +] +``` + +Response: +```json +{ + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" +} +``` + +### MsigCancel +MsigCancel cancels a previously-proposed multisig message +It takes the following params: , , , , +, , + + +Perms: sign + +Inputs: +```json +[ + "t01234", + 42, + "t01234", + "0", + "t01234", + 42, + "Ynl0ZSBhcnJheQ==" +] +``` + +Response: +```json +{ + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" +} +``` + +### MsigCreate +MsigCreate creates a multisig wallet +It takes the following params: , , +, , + + +Perms: sign + +Inputs: +```json +[ + 42, + null, + 10101, + "0", + "t01234", + "0" +] +``` + +Response: +```json +{ + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" +} +``` + +### MsigGetAvailableBalance +MsigGetAvailableBalance returns the portion of a multisig's balance that can be withdrawn or spent + + +Perms: read + +Inputs: +```json +[ + "t01234", + [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" + } + ] +] +``` + +Response: `"0"` + +### MsigGetVested +MsigGetVested returns the amount of FIL that vested in a multisig in a certain period. +It takes the following params: , , + + +Perms: read + +Inputs: +```json +[ + "t01234", + [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" + } + ], + [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" + } + ] +] +``` + +Response: `"0"` + +### MsigPropose +MsigPropose proposes a multisig message +It takes the following params: , , , +, , + + +Perms: sign + +Inputs: +```json +[ + "t01234", + "t01234", + "0", + "t01234", + 42, + "Ynl0ZSBhcnJheQ==" +] +``` + +Response: +```json +{ + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" +} +``` + +### MsigSwapApprove +MsigSwapApprove approves a previously proposed SwapSigner +It takes the following params: , , , +, , + + +Perms: sign + +Inputs: +```json +[ + "t01234", + "t01234", + 42, + "t01234", + "t01234", + "t01234" +] +``` + +Response: +```json +{ + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" +} +``` + +### MsigSwapCancel +MsigSwapCancel cancels a previously proposed SwapSigner message +It takes the following params: , , , +, + + +Perms: sign + +Inputs: +```json +[ + "t01234", + "t01234", + 42, + "t01234", + "t01234" +] +``` + +Response: +```json +{ + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" +} +``` + +### MsigSwapPropose +MsigSwapPropose proposes swapping 2 signers in the multisig +It takes the following params: , , +, + + +Perms: sign + +Inputs: +```json +[ + "t01234", + "t01234", + "t01234", + "t01234" +] +``` + +Response: +```json +{ + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" +} +``` + +## Net + + +### NetAddrsListen + + +Perms: read + +Inputs: `null` + +Response: +```json +{ + "Addrs": null, + "ID": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf" +} +``` + +### NetAgentVersion + + +Perms: read + +Inputs: +```json +[ + "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf" +] +``` + +Response: `"string value"` + +### NetAutoNatStatus + + +Perms: read + +Inputs: `null` + +Response: +```json +{ + "Reachability": 1, + "PublicAddr": "string value" +} +``` + +### NetBandwidthStats + + +Perms: read + +Inputs: `null` + +Response: +```json +{ + "TotalIn": 9, + "TotalOut": 9, + "RateIn": 12.3, + "RateOut": 12.3 +} +``` + +### NetBandwidthStatsByPeer + + +Perms: read + +Inputs: `null` + +Response: +```json +{ + "12D3KooWSXmXLJmBR1M7i9RW9GQPNUhZSzXKzxDHWtAgNuJAbyEJ": { + "TotalIn": 174000, + "TotalOut": 12500, + "RateIn": 100, + "RateOut": 50 + } +} +``` + +### NetBandwidthStatsByProtocol + + +Perms: read + +Inputs: `null` + +Response: +```json +{ + "/fil/hello/1.0.0": { + "TotalIn": 174000, + "TotalOut": 12500, + "RateIn": 100, + "RateOut": 50 + } +} +``` + +### NetConnect + + +Perms: write + +Inputs: +```json +[ + { + "Addrs": null, + "ID": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf" + } +] +``` + +Response: `{}` + +### NetConnectedness + + +Perms: read + +Inputs: +```json +[ + "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf" +] +``` + +Response: `1` + +### NetDisconnect + + +Perms: write + +Inputs: +```json +[ + "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf" +] +``` + +Response: `{}` + +### NetFindPeer + + +Perms: read + +Inputs: +```json +[ + "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf" +] +``` + +Response: +```json +{ + "Addrs": null, + "ID": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf" +} +``` + +### NetPeers + + +Perms: read + +Inputs: `null` + +Response: `null` + +### NetPubsubScores + + +Perms: read + +Inputs: `null` + +Response: `null` + +## Paych +The Paych methods are for interacting with and managing payment channels + + +### PaychAllocateLane +There are not yet any comments for this method. + +Perms: sign + +Inputs: +```json +[ + "t01234" +] +``` + +Response: `42` + +### PaychAvailableFunds +There are not yet any comments for this method. + +Perms: sign + +Inputs: +```json +[ + "t01234" +] +``` + +Response: +```json +{ + "Channel": "\u003cempty\u003e", + "From": "t01234", + "To": "t01234", + "ConfirmedAmt": "0", + "PendingAmt": "0", + "PendingWaitSentinel": null, + "QueuedAmt": "0", + "VoucherReedeemedAmt": "0" +} +``` + +### PaychAvailableFundsByFromTo +There are not yet any comments for this method. + +Perms: sign + +Inputs: +```json +[ + "t01234", + "t01234" +] +``` + +Response: +```json +{ + "Channel": "\u003cempty\u003e", + "From": "t01234", + "To": "t01234", + "ConfirmedAmt": "0", + "PendingAmt": "0", + "PendingWaitSentinel": null, + "QueuedAmt": "0", + "VoucherReedeemedAmt": "0" +} +``` + +### PaychCollect +There are not yet any comments for this method. + +Perms: sign + +Inputs: +```json +[ + "t01234" +] +``` + +Response: +```json +{ + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" +} +``` + +### PaychGet +There are not yet any comments for this method. + +Perms: sign + +Inputs: +```json +[ + "t01234", + "t01234", + "0" +] +``` + +Response: +```json +{ + "Channel": "t01234", + "WaitSentinel": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } +} +``` + +### PaychGetWaitReady +There are not yet any comments for this method. + +Perms: sign + +Inputs: +```json +[ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } +] +``` + +Response: `"t01234"` + +### PaychList +There are not yet any comments for this method. + +Perms: read + +Inputs: `null` + +Response: `null` + +### PaychNewPayment +There are not yet any comments for this method. + +Perms: sign + +Inputs: +```json +[ + "t01234", + "t01234", + null +] +``` + +Response: +```json +{ + "Channel": "t01234", + "WaitSentinel": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "Vouchers": null +} +``` + +### PaychSettle +There are not yet any comments for this method. + +Perms: sign + +Inputs: +```json +[ + "t01234" +] +``` + +Response: +```json +{ + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" +} +``` + +### PaychStatus +There are not yet any comments for this method. + +Perms: read + +Inputs: +```json +[ + "t01234" +] +``` + +Response: +```json +{ + "ControlAddr": "t01234", + "Direction": 1 +} +``` + +### PaychVoucherAdd +There are not yet any comments for this method. + +Perms: write + +Inputs: +```json +[ + "t01234", + { + "ChannelAddr": "t01234", + "TimeLockMin": 10101, + "TimeLockMax": 10101, + "SecretPreimage": "Ynl0ZSBhcnJheQ==", + "Extra": { + "Actor": "t01234", + "Method": 1, + "Data": "Ynl0ZSBhcnJheQ==" + }, + "Lane": 42, + "Nonce": 42, + "Amount": "0", + "MinSettleHeight": 10101, + "Merges": null, + "Signature": { + "Type": 2, + "Data": "Ynl0ZSBhcnJheQ==" + } + }, + "Ynl0ZSBhcnJheQ==", + "0" +] +``` + +Response: `"0"` + +### PaychVoucherCheckSpendable +There are not yet any comments for this method. + +Perms: read + +Inputs: +```json +[ + "t01234", + { + "ChannelAddr": "t01234", + "TimeLockMin": 10101, + "TimeLockMax": 10101, + "SecretPreimage": "Ynl0ZSBhcnJheQ==", + "Extra": { + "Actor": "t01234", + "Method": 1, + "Data": "Ynl0ZSBhcnJheQ==" + }, + "Lane": 42, + "Nonce": 42, + "Amount": "0", + "MinSettleHeight": 10101, + "Merges": null, + "Signature": { + "Type": 2, + "Data": "Ynl0ZSBhcnJheQ==" + } + }, + "Ynl0ZSBhcnJheQ==", + "Ynl0ZSBhcnJheQ==" +] +``` + +Response: `true` + +### PaychVoucherCheckValid +There are not yet any comments for this method. + +Perms: read + +Inputs: +```json +[ + "t01234", + { + "ChannelAddr": "t01234", + "TimeLockMin": 10101, + "TimeLockMax": 10101, + "SecretPreimage": "Ynl0ZSBhcnJheQ==", + "Extra": { + "Actor": "t01234", + "Method": 1, + "Data": "Ynl0ZSBhcnJheQ==" + }, + "Lane": 42, + "Nonce": 42, + "Amount": "0", + "MinSettleHeight": 10101, + "Merges": null, + "Signature": { + "Type": 2, + "Data": "Ynl0ZSBhcnJheQ==" + } + } +] +``` + +Response: `{}` + +### PaychVoucherCreate +There are not yet any comments for this method. + +Perms: sign + +Inputs: +```json +[ + "t01234", + "0", + 42 +] +``` + +Response: +```json +{ + "Voucher": { + "ChannelAddr": "t01234", + "TimeLockMin": 10101, + "TimeLockMax": 10101, + "SecretPreimage": "Ynl0ZSBhcnJheQ==", + "Extra": { + "Actor": "t01234", + "Method": 1, + "Data": "Ynl0ZSBhcnJheQ==" + }, + "Lane": 42, + "Nonce": 42, + "Amount": "0", + "MinSettleHeight": 10101, + "Merges": null, + "Signature": { + "Type": 2, + "Data": "Ynl0ZSBhcnJheQ==" + } + }, + "Shortfall": "0" +} +``` + +### PaychVoucherList +There are not yet any comments for this method. + +Perms: write + +Inputs: +```json +[ + "t01234" +] +``` + +Response: `null` + +### PaychVoucherSubmit +There are not yet any comments for this method. + +Perms: sign + +Inputs: +```json +[ + "t01234", + { + "ChannelAddr": "t01234", + "TimeLockMin": 10101, + "TimeLockMax": 10101, + "SecretPreimage": "Ynl0ZSBhcnJheQ==", + "Extra": { + "Actor": "t01234", + "Method": 1, + "Data": "Ynl0ZSBhcnJheQ==" + }, + "Lane": 42, + "Nonce": 42, + "Amount": "0", + "MinSettleHeight": 10101, + "Merges": null, + "Signature": { + "Type": 2, + "Data": "Ynl0ZSBhcnJheQ==" + } + }, + "Ynl0ZSBhcnJheQ==", + "Ynl0ZSBhcnJheQ==" +] +``` + +Response: +```json +{ + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" +} +``` + +## State +The State methods are used to query, inspect, and interact with chain state. +All methods take a TipSetKey as a parameter. The state looked up is the state at that tipset. +A nil TipSetKey can be provided as a param, this will cause the heaviest tipset in the chain to be used. + + +### StateAccountKey +StateAccountKey returns the public key address of the given ID address + + +Perms: read + +Inputs: +```json +[ + "t01234", + [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" + } + ] +] +``` + +Response: `"t01234"` + +### StateAllMinerFaults +StateAllMinerFaults returns all non-expired Faults that occur within lookback epochs of the given tipset + + +Perms: read + +Inputs: +```json +[ + 10101, + [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" + } + ] +] +``` + +Response: `null` + +### StateCall +StateCall runs the given message and returns its result without any persisted changes. + + +Perms: read + +Inputs: +```json +[ + { + "Version": 42, + "To": "t01234", + "From": "t01234", + "Nonce": 42, + "Value": "0", + "GasLimit": 9, + "GasFeeCap": "0", + "GasPremium": "0", + "Method": 1, + "Params": "Ynl0ZSBhcnJheQ==" + }, + [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" + } + ] +] +``` + +Response: +```json +{ + "Msg": { + "Version": 42, + "To": "t01234", + "From": "t01234", + "Nonce": 42, + "Value": "0", + "GasLimit": 9, + "GasFeeCap": "0", + "GasPremium": "0", + "Method": 1, + "Params": "Ynl0ZSBhcnJheQ==" + }, + "MsgRct": { + "ExitCode": 0, + "Return": "Ynl0ZSBhcnJheQ==", + "GasUsed": 9 + }, + "ExecutionTrace": { + "Msg": { + "Version": 42, + "To": "t01234", + "From": "t01234", + "Nonce": 42, + "Value": "0", + "GasLimit": 9, + "GasFeeCap": "0", + "GasPremium": "0", + "Method": 1, + "Params": "Ynl0ZSBhcnJheQ==" + }, + "MsgRct": { + "ExitCode": 0, + "Return": "Ynl0ZSBhcnJheQ==", + "GasUsed": 9 + }, + "Error": "string value", + "Duration": 60000000000, + "GasCharges": null, + "Subcalls": null + }, + "Error": "string value", + "Duration": 60000000000 +} +``` + +### StateChangedActors +StateChangedActors returns all the actors whose states change between the two given state CIDs +TODO: Should this take tipset keys instead? + + +Perms: read + +Inputs: +```json +[ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } +] +``` + +Response: +```json +{ + "t01236": { + "Code": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "Head": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "Nonce": 42, + "Balance": "0" + } +} +``` + +### StateCirculatingSupply +StateCirculatingSupply returns the circulating supply of Filecoin at the given tipset + + +Perms: read + +Inputs: +```json +[ + [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" + } + ] +] +``` + +Response: +```json +{ + "FilVested": "0", + "FilMined": "0", + "FilBurnt": "0", + "FilLocked": "0", + "FilCirculating": "0" +} +``` + +### StateCompute +StateCompute is a flexible command that applies the given messages on the given tipset. +The messages are run as though the VM were at the provided height. + + +Perms: read + +Inputs: +```json +[ + 10101, + null, + [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" + } + ] +] +``` + +Response: +```json +{ + "Root": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "Trace": null +} +``` + +### StateDealProviderCollateralBounds +StateDealProviderCollateralBounds returns the min and max collateral a storage provider +can issue. It takes the deal size and verified status as parameters. + + +Perms: read + +Inputs: +```json +[ + 1032, + true, + [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" + } + ] +] +``` + +Response: +```json +{ + "Min": "0", + "Max": "0" +} +``` + +### StateGetActor +StateGetActor returns the indicated actor's nonce and balance. + + +Perms: read + +Inputs: +```json +[ + "t01234", + [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" + } + ] +] +``` + +Response: +```json +{ + "Code": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "Head": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "Nonce": 42, + "Balance": "0" +} +``` + +### StateGetReceipt +StateGetReceipt returns the message receipt for the given message + + +Perms: read + +Inputs: +```json +[ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" + } + ] +] +``` + +Response: +```json +{ + "ExitCode": 0, + "Return": "Ynl0ZSBhcnJheQ==", + "GasUsed": 9 +} +``` + +### StateListActors +StateListActors returns the addresses of every actor in the state + + +Perms: read + +Inputs: +```json +[ + [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" + } + ] +] +``` + +Response: `null` + +### StateListMessages +StateListMessages looks back and returns all messages with a matching to or from address, stopping at the given height. + + +Perms: read + +Inputs: +```json +[ + { + "Version": 42, + "To": "t01234", + "From": "t01234", + "Nonce": 42, + "Value": "0", + "GasLimit": 9, + "GasFeeCap": "0", + "GasPremium": "0", + "Method": 1, + "Params": "Ynl0ZSBhcnJheQ==" + }, + [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" + } + ], + 10101 +] +``` + +Response: `null` + +### StateListMiners +StateListMiners returns the addresses of every miner that has claimed power in the Power Actor + + +Perms: read + +Inputs: +```json +[ + [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" + } + ] +] +``` + +Response: `null` + +### StateLookupID +StateLookupID retrieves the ID address of the given address + + +Perms: read + +Inputs: +```json +[ + "t01234", + [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" + } + ] +] +``` + +Response: `"t01234"` + +### StateMarketBalance +StateMarketBalance looks up the Escrow and Locked balances of the given address in the Storage Market + + +Perms: read + +Inputs: +```json +[ + "t01234", + [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" + } + ] +] +``` + +Response: +```json +{ + "Escrow": "0", + "Locked": "0" +} +``` + +### StateMarketDeals +StateMarketDeals returns information about every deal in the Storage Market + + +Perms: read + +Inputs: +```json +[ + [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" + } + ] +] +``` + +Response: +```json +{ + "t026363": { + "Proposal": { + "PieceCID": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "PieceSize": 1032, + "VerifiedDeal": true, + "Client": "t01234", + "Provider": "t01234", + "Label": "string value", + "StartEpoch": 10101, + "EndEpoch": 10101, + "StoragePricePerEpoch": "0", + "ProviderCollateral": "0", + "ClientCollateral": "0" + }, + "State": { + "SectorStartEpoch": 10101, + "LastUpdatedEpoch": 10101, + "SlashEpoch": 10101 + } + } +} +``` + +### StateMarketParticipants +StateMarketParticipants returns the Escrow and Locked balances of every participant in the Storage Market + + +Perms: read + +Inputs: +```json +[ + [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" + } + ] +] +``` + +Response: +```json +{ + "t026363": { + "Escrow": "0", + "Locked": "0" + } +} +``` + +### StateMarketStorageDeal +StateMarketStorageDeal returns information about the indicated deal + + +Perms: read + +Inputs: +```json +[ + 5432, + [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" + } + ] +] +``` + +Response: +```json +{ + "Proposal": { + "PieceCID": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "PieceSize": 1032, + "VerifiedDeal": true, + "Client": "t01234", + "Provider": "t01234", + "Label": "string value", + "StartEpoch": 10101, + "EndEpoch": 10101, + "StoragePricePerEpoch": "0", + "ProviderCollateral": "0", + "ClientCollateral": "0" + }, + "State": { + "SectorStartEpoch": 10101, + "LastUpdatedEpoch": 10101, + "SlashEpoch": 10101 + } +} +``` + +### StateMinerActiveSectors +StateMinerActiveSectors returns info about sectors that a given miner is actively proving. + + +Perms: read + +Inputs: +```json +[ + "t01234", + [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" + } + ] +] +``` + +Response: `null` + +### StateMinerAvailableBalance +StateMinerAvailableBalance returns the portion of a miner's balance that can be withdrawn or spent + + +Perms: read + +Inputs: +```json +[ + "t01234", + [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" + } + ] +] +``` + +Response: `"0"` + +### StateMinerDeadlines +StateMinerDeadlines returns all the proving deadlines for the given miner + + +Perms: read + +Inputs: +```json +[ + "t01234", + [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" + } + ] +] +``` + +Response: `null` + +### StateMinerFaults +StateMinerFaults returns a bitfield indicating the faulty sectors of the given miner + + +Perms: read + +Inputs: +```json +[ + "t01234", + [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" + } + ] +] +``` + +Response: +```json +[ + 5, + 1 +] +``` + +### StateMinerInfo +StateMinerInfo returns info about the indicated miner + + +Perms: read + +Inputs: +```json +[ + "t01234", + [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" + } + ] +] +``` + +Response: +```json +{ + "Owner": "t01234", + "Worker": "t01234", + "NewWorker": "t01234", + "ControlAddresses": null, + "WorkerChangeEpoch": 10101, + "PeerId": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", + "Multiaddrs": null, + "SealProofType": 3, + "SectorSize": 34359738368, + "WindowPoStPartitionSectors": 42 +} +``` + +### StateMinerInitialPledgeCollateral +StateMinerInitialPledgeCollateral returns the initial pledge collateral for the specified miner's sector + + +Perms: read + +Inputs: +```json +[ + "t01234", + { + "SealProof": 3, + "SectorNumber": 9, + "SealedCID": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "SealRandEpoch": 10101, + "DealIDs": null, + "Expiration": 10101, + "ReplaceCapacity": true, + "ReplaceSectorDeadline": 42, + "ReplaceSectorPartition": 42, + "ReplaceSectorNumber": 9 + }, + [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" + } + ] +] +``` + +Response: `"0"` + +### StateMinerPartitions +StateMinerPartitions loads miner partitions for the specified miner/deadline + + +Perms: read + +Inputs: +```json +[ + "t01234", + 42, + [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" + } + ] +] +``` + +Response: `null` + +### StateMinerPower +StateMinerPower returns the power of the indicated miner + + +Perms: read + +Inputs: +```json +[ + "t01234", + [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" + } + ] +] +``` + +Response: +```json +{ + "MinerPower": { + "RawBytePower": "0", + "QualityAdjPower": "0" + }, + "TotalPower": { + "RawBytePower": "0", + "QualityAdjPower": "0" + } +} +``` + +### StateMinerPreCommitDepositForPower +StateMinerInitialPledgeCollateral returns the precommit deposit for the specified miner's sector + + +Perms: read + +Inputs: +```json +[ + "t01234", + { + "SealProof": 3, + "SectorNumber": 9, + "SealedCID": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "SealRandEpoch": 10101, + "DealIDs": null, + "Expiration": 10101, + "ReplaceCapacity": true, + "ReplaceSectorDeadline": 42, + "ReplaceSectorPartition": 42, + "ReplaceSectorNumber": 9 + }, + [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" + } + ] +] +``` + +Response: `"0"` + +### StateMinerProvingDeadline +StateMinerProvingDeadline calculates the deadline at some epoch for a proving period +and returns the deadline-related calculations. + + +Perms: read + +Inputs: +```json +[ + "t01234", + [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" + } + ] +] +``` + +Response: +```json +{ + "CurrentEpoch": 10101, + "PeriodStart": 10101, + "Index": 42, + "Open": 10101, + "Close": 10101, + "Challenge": 10101, + "FaultCutoff": 10101, + "WPoStPeriodDeadlines": 42, + "WPoStProvingPeriod": 10101, + "WPoStChallengeWindow": 10101, + "WPoStChallengeLookback": 10101, + "FaultDeclarationCutoff": 10101 +} +``` + +### StateMinerRecoveries +StateMinerRecoveries returns a bitfield indicating the recovering sectors of the given miner + + +Perms: read + +Inputs: +```json +[ + "t01234", + [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" + } + ] +] +``` + +Response: +```json +[ + 5, + 1 +] +``` + +### StateMinerSectorCount +StateMinerSectorCount returns the number of sectors in a miner's sector set and proving set + + +Perms: read + +Inputs: +```json +[ + "t01234", + [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" + } + ] +] +``` + +Response: +```json +{ + "Sectors": 42, + "Active": 42 +} +``` + +### StateMinerSectors +StateMinerSectors returns info about the given miner's sectors. If the filter bitfield is nil, all sectors are included. +If the filterOut boolean is set to true, any sectors in the filter are excluded. +If false, only those sectors in the filter are included. + + +Perms: read + +Inputs: +```json +[ + "t01234", + [ + 0 + ], + true, + [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" + } + ] +] +``` + +Response: `null` + +### StateMsgGasCost +StateMsgGasCost searches for a message in the chain, and returns details of the messages gas costs, including the penalty and miner tip + + +Perms: read + +Inputs: +```json +[ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" + } + ] +] +``` + +Response: +```json +{ + "Message": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "GasUsed": "0", + "BaseFeeBurn": "0", + "OverEstimationBurn": "0", + "MinerPenalty": "0", + "MinerTip": "0", + "Refund": "0", + "TotalCost": "0" +} +``` + +### StateNetworkName +StateNetworkName returns the name of the network the node is synced to + + +Perms: read + +Inputs: `null` + +Response: `"lotus"` + +### StateReadState +StateReadState returns the indicated actor's state. + + +Perms: read + +Inputs: +```json +[ + "t01234", + [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" + } + ] +] +``` + +Response: +```json +{ + "Balance": "0", + "State": {} +} +``` + +### StateReplay +StateReplay returns the result of executing the indicated message, assuming it was executed in the indicated tipset. + + +Perms: read + +Inputs: +```json +[ + [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" + } + ], + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } +] +``` + +Response: +```json +{ + "Msg": { + "Version": 42, + "To": "t01234", + "From": "t01234", + "Nonce": 42, + "Value": "0", + "GasLimit": 9, + "GasFeeCap": "0", + "GasPremium": "0", + "Method": 1, + "Params": "Ynl0ZSBhcnJheQ==" + }, + "MsgRct": { + "ExitCode": 0, + "Return": "Ynl0ZSBhcnJheQ==", + "GasUsed": 9 + }, + "ExecutionTrace": { + "Msg": { + "Version": 42, + "To": "t01234", + "From": "t01234", + "Nonce": 42, + "Value": "0", + "GasLimit": 9, + "GasFeeCap": "0", + "GasPremium": "0", + "Method": 1, + "Params": "Ynl0ZSBhcnJheQ==" + }, + "MsgRct": { + "ExitCode": 0, + "Return": "Ynl0ZSBhcnJheQ==", + "GasUsed": 9 + }, + "Error": "string value", + "Duration": 60000000000, + "GasCharges": null, + "Subcalls": null + }, + "Error": "string value", + "Duration": 60000000000 +} +``` + +### StateSearchMsg +StateSearchMsg searches for a message in the chain, and returns its receipt and the tipset where it was executed + + +Perms: read + +Inputs: +```json +[ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } +] +``` + +Response: +```json +{ + "Message": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "Receipt": { + "ExitCode": 0, + "Return": "Ynl0ZSBhcnJheQ==", + "GasUsed": 9 + }, + "ReturnDec": {}, + "TipSet": [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" + } + ], + "Height": 10101 +} +``` + +### StateSectorExpiration +StateSectorExpiration returns epoch at which given sector will expire + + +Perms: read + +Inputs: +```json +[ + "t01234", + 9, + [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" + } + ] +] +``` + +Response: +```json +{ + "OnTime": 10101, + "Early": 10101 +} +``` + +### StateSectorGetInfo +StateSectorGetInfo returns the on-chain info for the specified miner's sector. Returns null in case the sector info isn't found +NOTE: returned info.Expiration may not be accurate in some cases, use StateSectorExpiration to get accurate +expiration epoch + + +Perms: read + +Inputs: +```json +[ + "t01234", + 9, + [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" + } + ] +] +``` + +Response: +```json +{ + "SectorNumber": 9, + "SealProof": 3, + "SealedCID": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "DealIDs": null, + "Activation": 10101, + "Expiration": 10101, + "DealWeight": "0", + "VerifiedDealWeight": "0", + "InitialPledge": "0", + "ExpectedDayReward": "0", + "ExpectedStoragePledge": "0" +} +``` + +### StateSectorPartition +StateSectorPartition finds deadline/partition with the specified sector + + +Perms: read + +Inputs: +```json +[ + "t01234", + 9, + [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" + } + ] +] +``` + +Response: +```json +{ + "Deadline": 42, + "Partition": 42 +} +``` + +### StateSectorPreCommitInfo +StateSectorPreCommitInfo returns the PreCommit info for the specified miner's sector + + +Perms: read + +Inputs: +```json +[ + "t01234", + 9, + [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" + } + ] +] +``` + +Response: +```json +{ + "Info": { + "SealProof": 3, + "SectorNumber": 9, + "SealedCID": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "SealRandEpoch": 10101, + "DealIDs": null, + "Expiration": 10101, + "ReplaceCapacity": true, + "ReplaceSectorDeadline": 42, + "ReplaceSectorPartition": 42, + "ReplaceSectorNumber": 9 + }, + "PreCommitDeposit": "0", + "PreCommitEpoch": 10101, + "DealWeight": "0", + "VerifiedDealWeight": "0" +} +``` + +### StateVerifiedClientStatus +StateVerifiedClientStatus returns the data cap for the given address. +Returns nil if there is no entry in the data cap table for the +address. + + +Perms: read + +Inputs: +```json +[ + "t01234", + [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" + } + ] +] +``` + +Response: `"0"` + +### StateWaitMsg +StateWaitMsg looks back in the chain for a message. If not found, it blocks until the +message arrives on chain, and gets to the indicated confidence depth. + + +Perms: read + +Inputs: +```json +[ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + 42 +] +``` + +Response: +```json +{ + "Message": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "Receipt": { + "ExitCode": 0, + "Return": "Ynl0ZSBhcnJheQ==", + "GasUsed": 9 + }, + "ReturnDec": {}, + "TipSet": [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" + } + ], + "Height": 10101 +} +``` + +## Sync +The Sync method group contains methods for interacting with and +observing the lotus sync service. + + +### SyncCheckBad +SyncCheckBad checks if a block was marked as bad, and if it was, returns +the reason. + + +Perms: read + +Inputs: +```json +[ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } +] +``` + +Response: `"string value"` + +### SyncCheckpoint +SyncCheckpoint marks a blocks as checkpointed, meaning that it won't ever fork away from it. + + +Perms: admin + +Inputs: +```json +[ + [ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + { + "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" + } + ] +] +``` + +Response: `{}` + +### SyncIncomingBlocks +SyncIncomingBlocks returns a channel streaming incoming, potentially not +yet synced block headers. + + +Perms: read + +Inputs: `null` + +Response: +```json +{ + "Miner": "t01234", + "Ticket": { + "VRFProof": "Ynl0ZSBhcnJheQ==" + }, + "ElectionProof": { + "WinCount": 9, + "VRFProof": "Ynl0ZSBhcnJheQ==" + }, + "BeaconEntries": null, + "WinPoStProof": null, + "Parents": null, + "ParentWeight": "0", + "Height": 10101, + "ParentStateRoot": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "ParentMessageReceipts": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "Messages": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "BLSAggregate": { + "Type": 2, + "Data": "Ynl0ZSBhcnJheQ==" + }, + "Timestamp": 42, + "BlockSig": { + "Type": 2, + "Data": "Ynl0ZSBhcnJheQ==" + }, + "ForkSignaling": 42, + "ParentBaseFee": "0" +} +``` + +### SyncMarkBad +SyncMarkBad marks a blocks as bad, meaning that it won't ever by synced. +Use with extreme caution. + + +Perms: admin + +Inputs: +```json +[ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } +] +``` + +Response: `{}` + +### SyncState +SyncState returns the current status of the lotus sync system. + + +Perms: read + +Inputs: `null` + +Response: +```json +{ + "ActiveSyncs": null +} +``` + +### SyncSubmitBlock +SyncSubmitBlock can be used to submit a newly created block to the. +network through this node + + +Perms: write + +Inputs: +```json +[ + { + "Header": { + "Miner": "t01234", + "Ticket": { + "VRFProof": "Ynl0ZSBhcnJheQ==" + }, + "ElectionProof": { + "WinCount": 9, + "VRFProof": "Ynl0ZSBhcnJheQ==" + }, + "BeaconEntries": null, + "WinPoStProof": null, + "Parents": null, + "ParentWeight": "0", + "Height": 10101, + "ParentStateRoot": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "ParentMessageReceipts": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "Messages": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "BLSAggregate": { + "Type": 2, + "Data": "Ynl0ZSBhcnJheQ==" + }, + "Timestamp": 42, + "BlockSig": { + "Type": 2, + "Data": "Ynl0ZSBhcnJheQ==" + }, + "ForkSignaling": 42, + "ParentBaseFee": "0" + }, + "BlsMessages": null, + "SecpkMessages": null + } +] +``` + +Response: `{}` + +### SyncUnmarkBad +SyncUnmarkBad unmarks a blocks as bad, making it possible to be validated and synced again. + + +Perms: admin + +Inputs: +```json +[ + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } +] +``` + +Response: `{}` + +## Wallet + + +### WalletBalance +WalletBalance returns the balance of the given address at the current head of the chain. + + +Perms: read + +Inputs: +```json +[ + "t01234" +] +``` + +Response: `"0"` + +### WalletDefaultAddress +WalletDefaultAddress returns the address marked as default in the wallet. + + +Perms: write + +Inputs: `null` + +Response: `"t01234"` + +### WalletDelete +WalletDelete deletes an address from the wallet. + + +Perms: write + +Inputs: +```json +[ + "t01234" +] +``` + +Response: `{}` + +### WalletExport +WalletExport returns the private key of an address in the wallet. + + +Perms: admin + +Inputs: +```json +[ + "t01234" +] +``` + +Response: +```json +{ + "Type": "string value", + "PrivateKey": "Ynl0ZSBhcnJheQ==" +} +``` + +### WalletHas +WalletHas indicates whether the given address is in the wallet. + + +Perms: write + +Inputs: +```json +[ + "t01234" +] +``` + +Response: `true` + +### WalletImport +WalletImport receives a KeyInfo, which includes a private key, and imports it into the wallet. + + +Perms: admin + +Inputs: +```json +[ + { + "Type": "string value", + "PrivateKey": "Ynl0ZSBhcnJheQ==" + } +] +``` + +Response: `"t01234"` + +### WalletList +WalletList lists all the addresses in the wallet. + + +Perms: write + +Inputs: `null` + +Response: `null` + +### WalletNew +WalletNew creates a new address in the wallet with the given sigType. + + +Perms: write + +Inputs: +```json +[ + 2 +] +``` + +Response: `"t01234"` + +### WalletSetDefault +WalletSetDefault marks the given address as as the default one. + + +Perms: admin + +Inputs: +```json +[ + "t01234" +] +``` + +Response: `{}` + +### WalletSign +WalletSign signs the given bytes using the given address. + + +Perms: sign + +Inputs: +```json +[ + "t01234", + "Ynl0ZSBhcnJheQ==" +] +``` + +Response: +```json +{ + "Type": 2, + "Data": "Ynl0ZSBhcnJheQ==" +} +``` + +### WalletSignMessage +WalletSignMessage signs the given message using the given address. + + +Perms: sign + +Inputs: +```json +[ + "t01234", + { + "Version": 42, + "To": "t01234", + "From": "t01234", + "Nonce": 42, + "Value": "0", + "GasLimit": 9, + "GasFeeCap": "0", + "GasPremium": "0", + "Method": 1, + "Params": "Ynl0ZSBhcnJheQ==" + } +] +``` + +Response: +```json +{ + "Message": { + "Version": 42, + "To": "t01234", + "From": "t01234", + "Nonce": 42, + "Value": "0", + "GasLimit": 9, + "GasFeeCap": "0", + "GasPremium": "0", + "Method": 1, + "Params": "Ynl0ZSBhcnJheQ==" + }, + "Signature": { + "Type": 2, + "Data": "Ynl0ZSBhcnJheQ==" + } +} +``` + +### WalletVerify +WalletVerify takes an address, a signature, and some bytes, and indicates whether the signature is valid. +The address does not have to be in the wallet. + + +Perms: read + +Inputs: +```json +[ + "t01234", + "Ynl0ZSBhcnJheQ==", + { + "Type": 2, + "Data": "Ynl0ZSBhcnJheQ==" + } +] +``` + +Response: `true` + From dfd28ab0c44d7f032d6dff4e994b38491268ff0e Mon Sep 17 00:00:00 2001 From: Hector Sanjuan Date: Thu, 17 Sep 2020 20:56:43 +0200 Subject: [PATCH 09/13] Fix links in READMEs. --- README.md | 4 ++-- tools/dockers/docker-examples/README.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 6c1e23efa..fa432bf7d 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@

- + Project Lotus Logo

@@ -18,7 +18,7 @@ Lotus is an implementation of the Filecoin Distributed Storage Network. For more ## Building & Documentation -For instructions on how to build lotus from source, please visit [https://lotu.sh](https://lotu.sh) or read the source [here](https://github.com/filecoin-project/lotus/tree/master/documentation). +For instructions on how to build, install and setup lotus, please visit [https://docs.filecoin.io/get-started/lotus](https://docs.filecoin.io/get-started/lotus/). ## Reporting a Vulnerability diff --git a/tools/dockers/docker-examples/README.md b/tools/dockers/docker-examples/README.md index 28553653c..3b8c34480 100644 --- a/tools/dockers/docker-examples/README.md +++ b/tools/dockers/docker-examples/README.md @@ -11,7 +11,7 @@ In this `docker-examples/` directory are community-contributed Docker and Docker - local node for a developer (`api-local-`) - hosted endpoint for apps / multiple developers (`api-hosted-`) - **For a local devnet or shared devnet** - - basic local devnet (also see [lotus docs on setting up a local devnet](https://lotu.sh/en+setup-local-dev-net)) + - basic local devnet (also see [lotus docs on setting up a local devnet](https://docs.filecoin.io/build/local-devnet/)) - shared devnet From a5e7fd8f5c0e8ed2c900bd23860e16d2336411f1 Mon Sep 17 00:00:00 2001 From: Hector Sanjuan Date: Mon, 21 Sep 2020 18:43:57 +0200 Subject: [PATCH 10/13] Re-add docs-check step to circle --- .circleci/config.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index d8f149889..acd447f69 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -346,6 +346,15 @@ jobs: - run: git --no-pager diff - run: git --no-pager diff --quiet + docs-check: + executor: golang + steps: + - install-deps + - prepare + - run: make docsgen + - run: git --no-pager diff + - run: git --no-pager diff --quiet + lint: &lint description: | Run golangci-lint. @@ -415,6 +424,7 @@ workflows: - mod-tidy-check - gofmt - cbor-gen-check + - docs-check - test: codecov-upload: true test-suite-name: full From ad3db0e83c5f6723573eec1464bc3bc48d29c001 Mon Sep 17 00:00:00 2001 From: Hector Sanjuan Date: Mon, 21 Sep 2020 19:05:39 +0200 Subject: [PATCH 11/13] Move unclassified docs back to the docs root --- .../en/{unclassified => }/WIP-arch-complementary-notes.md | 0 documentation/en/{unclassified => }/block-validation.md | 0 documentation/en/{unclassified => }/create-miner.md | 0 documentation/en/{unclassified => }/dev-tools-pond-ui.md | 0 documentation/en/{unclassified => }/sealing-procs.md | 0 5 files changed, 0 insertions(+), 0 deletions(-) rename documentation/en/{unclassified => }/WIP-arch-complementary-notes.md (100%) rename documentation/en/{unclassified => }/block-validation.md (100%) rename documentation/en/{unclassified => }/create-miner.md (100%) rename documentation/en/{unclassified => }/dev-tools-pond-ui.md (100%) rename documentation/en/{unclassified => }/sealing-procs.md (100%) diff --git a/documentation/en/unclassified/WIP-arch-complementary-notes.md b/documentation/en/WIP-arch-complementary-notes.md similarity index 100% rename from documentation/en/unclassified/WIP-arch-complementary-notes.md rename to documentation/en/WIP-arch-complementary-notes.md diff --git a/documentation/en/unclassified/block-validation.md b/documentation/en/block-validation.md similarity index 100% rename from documentation/en/unclassified/block-validation.md rename to documentation/en/block-validation.md diff --git a/documentation/en/unclassified/create-miner.md b/documentation/en/create-miner.md similarity index 100% rename from documentation/en/unclassified/create-miner.md rename to documentation/en/create-miner.md diff --git a/documentation/en/unclassified/dev-tools-pond-ui.md b/documentation/en/dev-tools-pond-ui.md similarity index 100% rename from documentation/en/unclassified/dev-tools-pond-ui.md rename to documentation/en/dev-tools-pond-ui.md diff --git a/documentation/en/unclassified/sealing-procs.md b/documentation/en/sealing-procs.md similarity index 100% rename from documentation/en/unclassified/sealing-procs.md rename to documentation/en/sealing-procs.md From e48c525053ada752041c4917a5c22d9610e8746d Mon Sep 17 00:00:00 2001 From: Hector Sanjuan Date: Thu, 24 Sep 2020 19:41:14 +0200 Subject: [PATCH 12/13] Re-add jaeger-tracing --- documentation/en/jaeger-tracing.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 documentation/en/jaeger-tracing.md diff --git a/documentation/en/jaeger-tracing.md b/documentation/en/jaeger-tracing.md new file mode 100644 index 000000000..bbe4d3052 --- /dev/null +++ b/documentation/en/jaeger-tracing.md @@ -0,0 +1,26 @@ +# Jaeger Tracing + +Lotus has tracing built into many of its internals. To view the traces, first download [Jaeger](https://www.jaegertracing.io/download/) (Choose the 'all-in-one' binary). Then run it somewhere, start up the lotus daemon, and open up localhost:16686 in your browser. + +## Open Census + +Lotus uses [OpenCensus](https://opencensus.io/) for tracing application flow. This generates spans through the execution of annotated code paths. + +Currently it is set up to use Jaeger, though other tracing backends should be fairly easy to swap in. + +## Running Locally + +To easily run and view tracing locally, first, install jaeger. The easiest way to do this is to [download the binaries](https://www.jaegertracing.io/download/) and then run the `jaeger-all-in-one` binary. This will start up jaeger, listen for spans on `localhost:6831`, and expose a web UI for viewing traces on `http://localhost:16686/`. + +Now, to start sending traces from Lotus to Jaeger, set the environment variable `LOTUS_JAEGER` to `localhost:6831`, and start the `lotus daemon`. + +Now, to view any generated traces, open up `http://localhost:16686/` in your browser. + +## Adding Spans + +To annotate a new codepath with spans, add the following lines to the top of the function you wish to trace: + +```go +ctx, span := trace.StartSpan(ctx, "put function name here") +defer span.End() +``` From 09e5cc90a40791b3139e5eac8912532246ca8058 Mon Sep 17 00:00:00 2001 From: Hector Sanjuan Date: Tue, 29 Sep 2020 14:45:55 +0200 Subject: [PATCH 13/13] Add README to documentation/en with explanations --- documentation/en/README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 documentation/en/README.md diff --git a/documentation/en/README.md b/documentation/en/README.md new file mode 100644 index 000000000..76f11ed90 --- /dev/null +++ b/documentation/en/README.md @@ -0,0 +1,16 @@ +# Lotus documentation + +This folder contains some Lotus documentation mostly intended for Lotus developers. + +User documentation (including documentation for miners) has been moved to specific Lotus sections in https://docs.filecoin.io: + +- https://docs.filecoin.io/get-started/lotus +- https://docs.filecoin.io/store/lotus +- https://docs.filecoin.io/mine/lotus +- https://docs.filecoin.io/build/lotus + +## The Lotu.sh site + +The https://lotu.sh and https://docs.lotu.sh sites are generated from this folder based on the index provided by [.library.json](.library.json). This is done at the [lotus-docs repository](https://github.com/filecoin-project/lotus-docs), which contains Lotus as a git submodule. + +To update the site, the lotus-docs repository should be updated with the desired version for the lotus git submodule. Once pushed to master, it will be auto-deployed.