• Stars
    star
    2,663
  • Rank 17,022 (Top 0.4 %)
  • Language
    Go
  • License
    Other
  • Created about 5 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Reference implementation of the Filecoin protocol, written in Go

Project Lotus Logo

Project Lotus - ่Žฒ


Lotus is an implementation of the Filecoin Distributed Storage Network. For more details about Filecoin, check out the Filecoin Spec.

Building & Documentation

Note: The default master branch is the dev branch, please use with caution. For the latest stable version, checkout the most recent Latest release.

For complete instructions on how to build, install and setup lotus, please visit https://lotus.filecoin.io. Basic build instructions can be found further down in this readme.

Reporting a Vulnerability

Please send an email to [email protected]. See our security policy for more details.

Related packages

These repos are independent and reusable modules, but are tightly integrated into Lotus to make up a fully featured Filecoin implementation:

Contribute

Lotus is a universally open project and welcomes contributions of all kinds: code, docs, and more. However, before making a contribution, we ask you to heed these recommendations:

  1. If the proposal entails a protocol change, please first submit a Filecoin Improvement Proposal.
  2. If the change is complex and requires prior discussion, open an issue or a discussion to request feedback before you start working on a pull request. This is to avoid disappointment and sunk costs, in case the change is not actually needed or accepted.
  3. Please refrain from submitting PRs to adapt existing code to subjective preferences. The changeset should contain functional or technical improvements/enhancements, bug fixes, new features, or some other clear material contribution. Simple stylistic changes are likely to be rejected in order to reduce code churn.

When implementing a change:

  1. Adhere to the standard Go formatting guidelines, e.g. Effective Go. Run go fmt.
  2. Stick to the idioms and patterns used in the codebase. Familiar-looking code has a higher chance of being accepted than eerie code. Pay attention to commonly used variable and parameter names, avoidance of naked returns, error handling patterns, etc.
  3. Comments: follow the advice on the Commentary section of Effective Go.
  4. Minimize code churn. Modify only what is strictly necessary. Well-encapsulated changesets will get a quicker response from maintainers.
  5. Lint your code with golangci-lint (CI will reject your PR if unlinted).
  6. Add tests.
  7. Title the PR in a meaningful way and describe the rationale and the thought process in the PR description.
  8. Write clean, thoughtful, and detailed commit messages. This is even more important than the PR description, because commit messages are stored inside the Git history. One good rule is: if you are happy posting the commit message as the PR description, then it's a good commit message.

Basic Build Instructions

System-specific Software Dependencies:

Building Lotus requires some system dependencies, usually provided by your distribution.

Ubuntu/Debian:

sudo apt install mesa-opencl-icd ocl-icd-opencl-dev gcc git bzr jq pkg-config curl clang build-essential hwloc libhwloc-dev wget -y && sudo apt upgrade -y

Fedora:

sudo dnf -y install gcc make git bzr jq pkgconfig mesa-libOpenCL mesa-libOpenCL-devel opencl-headers ocl-icd ocl-icd-devel clang llvm wget hwloc hwloc-devel

For other distributions you can find the required dependencies here. For instructions specific to macOS, you can find them here.

Go

To build Lotus, you need a working installation of Go 1.19.12 or higher:

wget -c https://golang.org/dl/go1.19.12.linux-amd64.tar.gz -O - | sudo tar -xz -C /usr/local

TIP: You'll need to add /usr/local/go/bin to your path. For most Linux distributions you can run something like:

echo "export PATH=$PATH:/usr/local/go/bin" >> ~/.bashrc && source ~/.bashrc

See the official Golang installation instructions if you get stuck.

Build and install Lotus

Once all the dependencies are installed, you can build and install the Lotus suite (lotus, lotus-miner, and lotus-worker).

  1. Clone the repository:

    git clone https://github.com/filecoin-project/lotus.git
    cd lotus/

Note: The default branch master is the dev branch where the latest new features, bug fixes and improvement are in. However, if you want to run lotus on Filecoin mainnet and want to run a production-ready lotus, get the latest release here.

  1. To join mainnet, checkout the latest release.

    If you are changing networks from a previous Lotus installation or there has been a network reset, read the Switch networks guide before proceeding.

    For networks other than mainnet, look up the current branch or tag/commit for the network you want to join in the Filecoin networks dashboard, then build Lotus for your specific network below.

    git checkout <tag_or_branch>
    # For example:
    git checkout <vX.X.X> # tag for a release

    Currently, the latest code on the master branch corresponds to mainnet.

  2. If you are in China, see "Lotus: tips when running in China".

  3. This build instruction uses the prebuilt proofs binaries. If you want to build the proof binaries from source check the complete instructions. Note, if you are building the proof binaries from source, installing rustup is also needed.

  4. Build and install Lotus:

    make clean all #mainnet
    
    # Or to join a testnet or devnet:
    make clean calibnet # Calibration with min 32GiB sectors
    
    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, etc). See advanced options for information on how to customize the Lotus folder.

  5. You should now have Lotus installed. You can now start the Lotus daemon and sync the chain.

License

Dual-licensed under MIT + Apache 2.0

More Repositories

1

venus

Filecoin Full Node Implementation in Go
Go
2,054
star
2

slate

WIP - We're building the place you go to discover, share, and sell files on the web.
JavaScript
526
star
3

rust-fil-proofs

Proofs for Filecoin in Rust
Rust
487
star
4

community

Filecoin community and ecosystem channels, discussion forums, and more
474
star
5

community-china

Resources and forum for the Chinese community, maintained and moderated by CoinSummer & PL.
C
436
star
6

ref-fvm

Reference implementation of the Filecoin Virtual Machine
Rust
378
star
7

devgrants

๐Ÿ‘Ÿ Apply for a Filecoin devgrant. Help build the Filecoin ecosystem!
371
star
8

specs

The Filecoin protocol specification
SCSS
368
star
9

FIPs

The Filecoin Improvement Proposal repository
Jupyter Notebook
288
star
10

filecoin-docs

Filecoin Docs
Shell
218
star
11

fevm-hardhat-kit

A starter hardhat project for developing, deploying, and testing Solidity smart contracts on the FEVM (Ethereum Virtual Machine on Filecoin)
Solidity
183
star
12

fvm-specs

home of the FVM (Filecoin Virtual Machine) project โš™๏ธ
168
star
13

cpp-filecoin

C++17 implementation of Filecoin
C++
126
star
14

neptune

Rust Poseidon implementation.
Rust
125
star
15

notary-governance

114
star
16

filecoin-plus-large-datasets

Hub for client applications for DataCap at a large scale
110
star
17

boost

Boost is a tool for Filecoin storage providers to manage data storage and retrievals on Filecoin.
Go
110
star
18

lassie

A minimal universal retrieval client library for IPFS and Filecoin
Go
106
star
19

filecoin-ffi

C and CGO bindings for Filecoin's Rust libraries
Rust
94
star
20

specs-actors

DEPRECATED Specification of builtin actors, in the form of executable code.
Go
86
star
21

filecoin-plus-client-onboarding

80
star
22

builtin-actors

The Filecoin built-in actors
Rust
78
star
23

go-fil-markets

Shared Implementation of Storage and Retrieval Markets for Filecoin Node Implementations
Go
78
star
24

research

Home for Filecoin Research
74
star
25

go-jsonrpc

Low Boilerplate JSON-RPC 2.0 library
Go
74
star
26

bls-signatures

BLS Signatures in Rust
Rust
72
star
27

ec-gpu

OpenCL code generator for finite-field arithmetic over arbitrary prime fields
Rust
69
star
28

rust-gpu-tools

Rust tools for OpenCL and GPU management.
Rust
66
star
29

replication-game

Compete on the fastest replication algorithm
Rust
59
star
30

slingshot

Official repository for Filecoin's Space Race 2: Slingshot
58
star
31

filecoin

GitHub home for the Filecoin Project
52
star
32

starling

Demo storage client for archival video data
JavaScript
51
star
33

venus-docs

Content for Venus tutorial
Shell
49
star
34

lily

capturing on-chain state for the filecoin network
Go
48
star
35

rust-filecoin-proofs-api

Rust
43
star
36

consensus

Filecoin consensus work
Python
42
star
37

blstrs

Rust
40
star
38

mir

Go
40
star
39

go-data-transfer

Data Transfer Shared Component for go-filecoin & go-lotus
Go
39
star
40

dagstore

a sharded store to hold large IPLD graphs efficiently, packaged as location-transparent attachable CAR files, with mechanical sympathy
Go
39
star
41

merkletree

_merkle_ is a lightweight Rust implementation of a Merkle tree, external dependencies agnostic, std::hash compatible with efficient memory layout
Rust
37
star
42

storetheindex

A storethehash based directory of CIDs
Go
36
star
43

fvm-starter-kit-deal-making

Full dapp starter kit for automating Filecoin deal making
JavaScript
36
star
44

go-statemachine

Go
34
star
45

dealbot

๐Ÿค–๐Ÿค A bot for making deals
Go
32
star
46

benchmarks

A place for community-submitted Filecoin benchmarks
JavaScript
32
star
47

core-devs

Technical Project Management: Meeting notes and agenda items
32
star
48

lotus-docs

Documentation for Lotus
HTML
29
star
49

fevm-data-dao-kit

A kit to demonstrate the basics of getting a DataDAO up and running on the Filecoin Virtual Machine (FVM).
JavaScript
29
star
50

go-hamt-ipld

An implementation of a HAMT using ipld
Go
28
star
51

sentinel

Filecoin Network monitoring and analysis tools.
27
star
52

filecoin-explorer

Filecoin block explorer
JavaScript
26
star
53

motion

๐Ÿ๏ธ Accelerating Data onto FileCoin
Go
25
star
54

rust-fil-nse-gpu

Rust interface to GPU implementation of Filecoin's Narrow Stacked Expander (NSE) sealing algorithm
Rust
24
star
55

testnet-hyperspace

Meta info about the developer-focused Hyperspace testnet for Filecoin developers
24
star
56

sector-storage

A concrete implementation of the specs-storage interface
Go
24
star
57

fevm-foundry-kit

A starter foundry project for developing, deploying, and testing Solidity smart contracts on the FEVM (Ethereum Virtual Machine on Filecoin)
Solidity
23
star
58

testnet-wallaby

Meta info about the Wallaby testnet for FVM developers
20
star
59

go-legs

Does the legwork for go-data-transfer
Go
20
star
60

filecoin-client-tutorial

Store data on the Filecoin Network in under 5 minutes.
JavaScript
20
star
61

go-leb128

LEB128 integer encoding
Go
20
star
62

awesome-filecoin

Curated list of useful resources for Filecoin
19
star
63

venus-wallet

a remote wallet for provider sign service
Go
19
star
64

eudico

lotus, but also other things
Go
19
star
65

go-state-types

Primitive and low level types used in chain state and actor method parameters
Go
19
star
66

designdocs

Docs that capture the design intent for important components
18
star
67

neptune-triton

Futhark implementation of neptune-compatible Poseidon.
C
18
star
68

orient

โ†ปObserve-Orient-Decide-Actโ†ฉ
Common Lisp
18
star
69

test-vectors

๐Ÿ’Ž VM and Chain test vectors for Filecoin implementations
Go
18
star
70

filecoin-solidity

Filecoin Solidity API Library
Solidity
17
star
71

go-address

Go
17
star
72

venus-sealer

Go
17
star
73

filsnap

MetaMask snap for interacting with Filecoin dapps.
TypeScript
16
star
74

data-prep-tools

Python
16
star
75

fvm-evm

EVM runtime for the Filecoin Virtual Machine
Rust
15
star
76

actors-utils

Collection of libraries to implement common patterns and standards on the Filecoin Virtual Machine
Rust
15
star
77

filecoin-network-viz

Filecoin Network Visualization Frontend
JavaScript
14
star
78

rust-fil-sector-builder

Rust
13
star
79

fvm-docs

Documentation and website build scripts for the Filecoin Virtual Machine (FVM) project.
HTML
12
star
80

chain-validation

(DEPRECATED) See https://github.com/filecoin-project/test-vectors instead. (was: chain validation tools)
Go
11
star
81

fvm-runtime-experiment

Rust
11
star
82

fungi

A distributed task runner
Go
11
star
83

filecoin-fvm-localnet

A complete filecoin lotus and boost docker image to spin up a localnet for smart contract development
Shell
11
star
84

go-dagaggregator-unixfs

Go
10
star
85

go-fil-commp-hashhash

A hash.Hash implementation of fil-commitment-unsealed
Go
10
star
86

statediff

State Inspector ๐Ÿ•ต๏ธโ€
Go
10
star
87

lua-filecoin

Prototype of Filecoin in Lua
Lua
10
star
88

go-amt-ipld

Implementation of an array mapped trie using go and ipld
Go
9
star
89

fil-blst

Assembly
9
star
90

go-sectorbuilder

Go
8
star
91

sp-automation

Jinja
8
star
92

oni

๐Ÿ‘น (DEPRECATED; see README) Project Oni | Network Validation
Go
7
star
93

helm-charts

Smarty
7
star
94

boost-docs

Documentation for Boost
7
star
95

slate-react-system

A component, constants, and experience library for the Filecoin Network / Textile Services
7
star
96

go-storage-miner

A Filecoin storage miner
Go
7
star
97

system-test-matrix

The Filecoin System Test Matrix is a dashboard with a detailed list of Filecoin features and behaviors and a mapping between those features and test suites, systems and subsystems that those features are related to.
TypeScript
7
star
98

go-data-segment

Go
6
star
99

raas-starter-kit

JavaScript
6
star
100

go-f3

Golang implementation of Fast Finality in Filecoin (F3)
Go
6
star