• Stars
    star
    126
  • Rank 284,543 (Top 6 %)
  • Language
    C++
  • License
    GNU General Publi...
  • Created about 5 years ago
  • Updated over 1 year ago

Reviews

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

Repository Details

C++17 implementation of Filecoin

Filecoin (cpp-filecoin)

C++17 implementation of blockchain based digital storage

Filecoin is a decentralized protocol described in spec

Minimal hardware requirements

Node minimal parameters:

Hard disk space: at least 200 GB
RAM: 8 GB
OS: Linux(Ubuntu), macOS. Other operating systems builds are not supported yet, so running on them may be unstable.

Miner minimal parameters:

CPU: 8+ cores
Hard Disk space: 256 GiB of very fast NVMe SSD memory space + 1 TiB of slow HDD memory space
RAM: 16 GB
GPU: GPU is highly recommended, it will speed up computations, but Mixing AMD CPUs and Nvidia GPUs should be avoided.

You can also read about lotus minimal requirements in filecoin-docs

Dependencies

All C++ dependencies are managed using Hunter. It uses cmake to download required libraries and do not require downloading and installing packages manually.

Target C++ compilers are:

  • GCC 9.3.0
  • Clang 9.0.1
  • AppleClang 12.0.0

Lotus CLI

fuhon-node supports subset of lotus CLI commands.
You may download pre-built binaries or build lotus from source.
Lotus CLI introduction.

Rust

filecoin-ffi provides pre-built binaries for some platforms.
If they are unavailable, you need Rust compiler to build them.
Rust installation instruction.

Build

# clone project
git clone --recursive https://github.com/filecoin-project/cpp-filecoin
# configure cmake
cmake cpp-filecoin -B cpp-filecoin/build
# build and install fuhon-node and fuhon-miner
cmake --build cpp-filecoin/build --target install
# check that fuhon-node and fuhon-miner are now available
fuhon-node --help
fuhon-miner --help

Usage

Interopnet node

Create the following fuhon-interopnet/config.cfg file

# use interopnet profile, corresponds to "make interopnet" lotus target
profile=interopnet

# enable debug logs to see sync progress
log=d

# bootstrap peers from https://github.com/filecoin-project/lotus/blob/master/build/bootstrap/interopnet.pi
bootstrap=/dns4/bootstrap-0.interop.fildev.network/tcp/1347/p2p/12D3KooWLGPq9JL1xwL6gHok7HSNxtK1Q5kyfg4Hk69ifRPghn4i
bootstrap=/dns4/bootstrap-1.interop.fildev.network/tcp/1347/p2p/12D3KooWFYS1f31zafv8mqqYu8U3hEqYvaZ6avWzYU3BmZdpyH3h

Start node

fuhon-node --repo fuhon-interopnet --genesis docker/interopnet/genesis.car
# you can omit --genesis flag after first run
fuhon-node --repo fuhon-interopnet

To use lotus CLI add --repo flag

lotus --repo fuhon-interopnet net peers

Mainnet node (from snapshot)

Download mainnet snapshot (docs).

LATEST_SNAPSHOT=$(curl -sI https://fil-chain-snapshots-fallback.s3.amazonaws.com/mainnet/minimal_finality_stateroots_latest.car | perl -ne '/x-amz-website-redirect-location:\s(.+\.car)/ && print $1')
curl -o mainnet-snapshot.car $LATEST_SNAPSHOT

Create following fuhon-mainnet/config.cfg file

# use downloaded snapshot file (do not delete that file)
use-snapshot=mainnet-snapshot.car

# bootstrap peers from https://github.com/filecoin-project/lotus/blob/master/build/bootstrap/mainnet.pi
bootstrap=/dns4/node.glif.io/tcp/1235/p2p/12D3KooWBF8cpp65hp2u9LK5mh19x67ftAam84z9LsfaquTDSBpt

Start node (first run may take some time)

fuhon-node --repo fuhon-mainnet --genesis cpp-filecoin/core/docker/mainnet/genesis.car

Docker-compose example

docker-compose up

CodeStyle

We follow CppCoreGuidelines.

Please use clang-format 11.0.0 with provided .clang-format file to autoformat the code.

Maintenance

Maintainers: @zuiris, @turuslan, @Elestrias, @ortyomka, @wer1st, @Alexey-N-Chernyshov

Tickets: Can be opened in GitHub Issues.

Hunter cache upload

If you have access and want to upload to hunter-binary-cache, you need to add your GitHub token with read:packages and write:packages permissions.
To generate GitHub token follow the instructions.

export GITHUB_HUNTER_USERNAME=<github account name>
export GITHUB_HUNTER_TOKEN=<github token>

More Repositories

1

lotus

Reference implementation of the Filecoin protocol, written in Go
Go
2,839
star
2

venus

Filecoin Full Node Implementation in Go
Go
2,057
star
3

slate

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

rust-fil-proofs

Proofs for Filecoin in Rust
Rust
490
star
5

community

Filecoin community and ecosystem channels, discussion forums, and more
478
star
6

community-china

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

ref-fvm

Reference implementation of the Filecoin Virtual Machine
Rust
378
star
8

devgrants

πŸ‘Ÿ Apply for a Filecoin devgrant. Help build the Filecoin ecosystem!
375
star
9

specs

The Filecoin protocol specification
SCSS
367
star
10

FIPs

The Filecoin Improvement Proposal repository
Jupyter Notebook
288
star
11

filecoin-docs

Filecoin Docs
Shell
220
star
12

fevm-hardhat-kit

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

fvm-specs

home of the FVM (Filecoin Virtual Machine) project βš™οΈ
168
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
109
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

79
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
74
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

lily

capturing on-chain state for the filecoin network
Go
49
star
34

venus-docs

Content for Venus tutorial
Shell
49
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

storetheindex

A storethehash based directory of CIDs
Go
36
star
42

fvm-starter-kit-deal-making

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

go-statemachine

Go
34
star
44

dealbot

πŸ€–πŸ€ A bot for making deals
Go
32
star
45

benchmarks

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

core-devs

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

lotus-docs

Documentation for Lotus
HTML
29
star
48

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
49

go-hamt-ipld

An implementation of a HAMT using ipld
Go
28
star
50

sentinel

Filecoin Network monitoring and analysis tools.
27
star
51

filecoin-explorer

Filecoin block explorer
JavaScript
26
star
52

motion

🏍️ Accelerating Data onto FileCoin
Go
25
star
53

rust-fil-nse-gpu

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

testnet-hyperspace

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

sector-storage

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

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
57

testnet-wallaby

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

go-legs

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

filecoin-client-tutorial

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

go-leb128

LEB128 integer encoding
Go
20
star
61

awesome-filecoin

Curated list of useful resources for Filecoin
19
star
62

venus-wallet

a remote wallet for provider sign service
Go
19
star
63

eudico

lotus, but also other things
Go
19
star
64

go-state-types

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

designdocs

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

neptune-triton

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

orient

↻Observe-Orient-Decide-Act↩
Common Lisp
18
star
68

test-vectors

πŸ’Ž VM and Chain test vectors for Filecoin implementations
Go
18
star
69

filecoin-solidity

Filecoin Solidity API Library
Solidity
17
star
70

filsnap

MetaMask snap for interacting with Filecoin dapps.
TypeScript
17
star
71

go-address

Go
17
star
72

venus-sealer

Go
17
star
73

data-prep-tools

Python
17
star
74

fvm-evm

EVM runtime for the Filecoin Virtual Machine
Rust
15
star
75

actors-utils

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

filecoin-network-viz

Filecoin Network Visualization Frontend
JavaScript
14
star
77

rust-fil-sector-builder

Rust
13
star
78

filecoin-fvm-localnet

A complete filecoin lotus and boost docker image to spin up a localnet for smart contract development
Shell
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

go-dagaggregator-unixfs

Go
10
star
84

go-fil-commp-hashhash

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

lua-filecoin

Prototype of Filecoin in Lua
Lua
10
star
86

statediff

State Inspector πŸ•΅οΈβ€
Go
10
star
87

go-amt-ipld

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

fil-blst

Assembly
9
star
89

go-sectorbuilder

Go
8
star
90

sp-automation

Jinja
8
star
91

go-f3

Golang implementation of Fast Finality in Filecoin (F3)
Go
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

fvm-example-actors

A collection of actors, created and maintained by the FVM community.
Solidity
6
star