Reference implementation of the Filecoin protocol, written in Go
Go to file
Steven Allen b5148ac61a mod: fix versions for go 1.13
Go 1.13 is much pickier about versions. This patch also updates go-log the
latest master (where zap has been merged) and updates go-bitswap to
master (where the custom protocol patches have been merged).
2019-09-05 14:27:03 -07:00
.circleci Simpler paramfetch 2019-09-04 12:10:07 +02:00
api retrieval: resolve some TODOs 2019-08-29 17:51:52 +02:00
build Merge pull request #179 from filecoin-project/feat/events 2019-09-05 11:25:24 +02:00
chain Merge pull request #179 from filecoin-project/feat/events 2019-09-05 11:25:24 +02:00
cli retrieval: Address review 2019-08-29 17:51:52 +02:00
cmd retrieval: Way to get the data 2019-08-29 17:50:19 +02:00
docs Add tracing doc 2019-07-26 11:08:48 +02:00
extern Simpler paramfetch 2019-09-04 12:10:07 +02:00
gen Replace most marshaling with codegen 2019-08-22 12:53:32 -07:00
lib retrieval: Make types more spec complaiant 2019-08-29 17:54:35 +02:00
lotuspond Use BLS in more places 2019-08-22 00:47:44 +02:00
miner Merge pull request #162 from filecoin-project/feat/retrieval 2019-08-31 00:29:00 +02:00
node Merge pull request #162 from filecoin-project/feat/retrieval 2019-08-31 00:29:00 +02:00
paych address review feedback 2019-08-13 11:47:40 -07:00
retrieval retrieval: address some review comments 2019-08-29 20:55:20 +02:00
scripts Fix build 2019-07-08 13:00:52 +02:00
storage Merge remote-tracking branch 'origin/master' into feat/retrieval 2019-08-29 20:59:03 +02:00
tracing Implement RPC tracing 2019-07-26 08:50:21 +02:00
.codecov.yml Disable codecov comments 2019-07-02 11:55:12 +02:00
.gitignore Fuzz message 2019-09-02 15:36:31 +02:00
.gitmodules Simpler paramfetch 2019-09-04 12:10:07 +02:00
.golangci.yml Remove doc lint 2019-07-11 10:00:24 +02:00
go.mod mod: fix versions for go 1.13 2019-09-05 14:27:03 -07:00
go.sum mod: fix versions for go 1.13 2019-09-05 14:27:03 -07:00
LICENSE-APACHE Add basic readme and licenses 2019-08-01 21:26:11 -07:00
LICENSE-MIT Add basic readme and licenses 2019-08-01 21:26:11 -07:00
Makefile Simpler paramfetch 2019-09-04 12:10:07 +02:00
README.md pond: subcommands to run cmds on nodes 2019-08-13 01:09:08 +02:00

project lotus - 莲

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

Development

All work is tracked via issues, and an attempt to keep an up to date view on this exists in the lotus testnet github project board.

Building

Dependencies:

  • go1.12 or higher
  • rust (version?)
  • git
  • bzr (some go dependency needs this)

Building:

$ make

Architecture

Lotus is architected modularly, and aims to keep clean api boundaries between everything, even if they are in the same process. Notably, the 'lotus full node' software, and the 'lotus storage miner' software are two separate programs.

The lotus storage miner is intended to be run on the machine that manages a single storage miner instance, and is meant to communicate with the full node via the websockets api for all of its chain interaction needs. This way, a mining operation may easily run one or many storage miners, connected to one or many full node instances.

Notable Modules

Api

The systems api is defined in here. The rpc maps directly to the api defined here using the jsonrpc package in lib/jsonrpc.

Chain/Types

Implementation of data structures used by Filecoin and their serializations.

Chain/Store

The chainstore manages all local chain state, including block headers, messages, and state.

Chain/State

A package for dealing with the filecoin state tree. Wraps the HAMT.

Chain/Actors

Implementations of the builtin Filecoin network actors.

Chain/Vm

The filecoin state machine 'vm'. Implemented here are utilities to invoke filecoin actor methods.

Miner

The block producer logic. This package interfaces with the full node through the api, despite currently being implented in the same process (very likely to be extracted as its own separate process in the near future).

Storage

The storage miner logic. This package also interfaces with the full node through a subset of the api. This code is used to implement the lotus-storage-miner process.

Pond

Pond is a graphical testbed for lotus. It can be used to spin up nodes, connect them in a given topology, start them mining, and observe how they function over time.

To try it out, run make pond, then run ./pond run. Once it is running, visit localhost:2222 in your browser.

Tracing

Lotus has tracing built into many of its internals. To view the traces, first download jaeger (Choose the 'all-in-one' binary). Then run it somewhere, start up the lotus daemon, and open up localhost:16686 in your browser.

For more details, see this document.

License

MIT + Apache