Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update venus readme #4465

Merged
merged 3 commits into from
Jun 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
212 changes: 35 additions & 177 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,197 +1,55 @@
# Filecoin (venus)
<p align="center">
<a href="https://venus.filecoin.io/Overview.html" title="Filecoin Docs">
<img src="documentation/images/venus_logo_big2.jpg" alt="Project Venus Logo" width="330" />
</a>
</p>

[![CircleCI](https://circleci.com/gh/filecoin-project/venus.svg?style=svg)](https://circleci.com/gh/filecoin-project/venus)
[![User Devnet Release](https://img.shields.io/endpoint.svg?color=brightgreen&style=flat&logo=GitHub&url=https://raw.githubusercontent.com/filecoin-project/go-filecoin-badges/master/user-devnet.json)](https://github.com/filecoin-project/venus/releases/latest)
[![Nightly Devnet Release](https://img.shields.io/endpoint.svg?color=blue&style=flat&logo=GitHub&url=https://raw.githubusercontent.com/filecoin-project/go-filecoin-badges/master/nightly-devnet.json)](https://github.com/filecoin-project/venus/releases)
[![Staging Devnet Release](https://img.shields.io/endpoint.svg?color=brightgreen&style=flat&logo=GitHub&url=https://raw.githubusercontent.com/filecoin-project/go-filecoin-badges/master/staging-devnet.json)](https://github.com/filecoin-project/venus/releases)

venus is an implementation of the Filecoin Distributed Storage Network. For more details about Filecoin, checkout the [Filecoin Spec](https://spec.filecoin.io).

venus was the first Filecoin implementation originially initiated and developed by Protocol Labs, and now is maintained by the Filecoin community. See [maintenance](#maintenance) for more information.
<h1 align="center">Project Venus - 启明星</h1>

__Questions or problems with venus? [Ask the community first](#community)__. Your problem may already be solved.
<p align="center">
<a href="https://circleci.com/gh/filecoin-project/venus"><img src="https://circleci.com/gh/filecoin-project/venus.svg?style=svg"></a>
<a href="https://github.com/filecoin-project/venus/releases/latest"><img src="https://img.shields.io/endpoint.svg?color=brightgreen&style=flat&logo=GitHub&url=https://raw.githubusercontent.com/filecoin-project/go-filecoin-badges/master/user-devnet.json"></a>
<a href="https://github.com/filecoin-project/venus/releases"><img src="https://img.shields.io/endpoint.svg?color=blue&style=flat&logo=GitHub&url=https://raw.githubusercontent.com/filecoin-project/go-filecoin-badges/master/nightly-devnet.json" /></a>
<a href="https://github.com/filecoin-project/venus/releases"><img src="https://img.shields.io/endpoint.svg?color=brightgreen&style=flat&logo=GitHub&url=https://raw.githubusercontent.com/filecoin-project/go-filecoin-badges/master/staging-devnet.json" /></a>
<br>
</p>

## Table of Contents
<!--
TOC generated by https://github.com/thlorenz/doctoc
Install with `npm install -g doctoc`.
Regenerate with `doctoc README.md`.
It's ok to edit manually if you don't have/want doctoc.
-->
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
Venus is an implementation of the Filecoin Distributed Storage Network. For more details about Filecoin, check out the [Filecoin Spec](https://spec.filecoin.io).

## Building & Documentation

- [What is Filecoin?](#what-is-filecoin)
- [Install](#install)
- [System Requirements](#system-requirements)
- [Install from Source](#install-from-source)
- [Install Go](#install-go)
- [Install Dependencies](#install-dependencies)
- [Build and run tests](#build-and-run-tests)
- [Usage](#usage)
- [Advanced usage](#advanced-usage)
- [Setting up a localnet](#setting-up-a-localnet)
- [Contributing](#contributing)
- [Community](#community)
- [License](#license)
For instructions on how to build, install and join a Venus mining pool, please visit [here](https://venus.filecoin.io/Using-venus-Shared-Modules.html).

<!-- END doctoc generated TOC please keep comment here to allow auto update -->
## Venus architecture

## What is Filecoin?
Filecoin is a decentralized storage network that turns the world’s unused storage into an algorithmic market, creating a permanent, decentralized future for the web.
**Miners** earn the native protocol token (also called “Filecoin”) by providing data storage and/or retrieval.
**Clients** pay miners to store or distribute data and to retrieve it.
Check out the [Filecoin website](https://filecoin.io/) and [Filecoin Documentation](https://docs.filecoin.io/) for more.
With ideas like security, ease of use and distributed mining pool in mind, deployment of a mining operation using Venus is quite different from one using [Lotus](https://github.com/filecoin-project/lotus). Details of mining architecture can be found [here](https://venus.filecoin.io/Overview.html#architecture).

## Install
## Related modules

👋 Welcome to venus!
Venus loosely describes a collection of modules that work together to realize a fully featured Filecoin implementation. List of stand-alone venus modules repos can ben found [here](https://venus.filecoin.io/Using-venus-Shared-Modules.html#introducing-venus-modules), each assuming different roles in the functioning of Filecoin.

This README outlines the basics for building and running venus.
**For more background, configuration, and troubleshooting information check out the [venus Docs](https://go.filecoin.io/)**.
## Contribute

### System Requirements
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:

venus can build and run on most Linux and MacOS systems.
Windows is not yet supported.
1. If the proposal entails a protocol change, please first submit a [Filecoin Improvement Proposal](https://github.com/filecoin-project/FIPs).
2. If the change is complex and requires prior discussion, [open an issue](https://github.com/filecoin-project/venus/issues) or a [discussion](https://github.com/filecoin-project/venus/discussions) 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.

A validating node can run on most systems with at least 8GB of RAM.
A mining node requires significant RAM and GPU resources, depending on the sector configuration to be used.
When implementing a change:


### Install from Source
Clone this git repository to your machine:

```sh
mkdir -p /path/to/filecoin-project
git clone https://github.com/filecoin-project/venus.git /path/to/filecoin-project/venus
```

#### Install Go

The build process for venus requires [Go](https://golang.org/doc/install) >= v1.15.5

> Installing Go for the first time? We recommend [this tutorial](https://www.ardanlabs.com/blog/2016/05/installing-go-and-your-workspace.html) which includes environment setup.

Due to our use of `cgo`, you'll need a C compiler to build venus whether you're using a prebuilt library or building it yourself from source.
If you want to use `gcc` (e.g. `export CC=gcc`) when building venus, you will need to use v7.4.0 or higher.

The build process will download a static library containing the [Filecoin proofs implementation](https://github.com/filecoin-project/rust-fil-proofs) (which is written in Rust).

> If instead you wish to build proofs from source, you'll need (1) Rust development environment and (2) to set the environment variable `FFI_BUILD_FROM_SOURCE=1`.
More info at [filecoin-ffi](https://github.com/filecoin-project/filecoin-ffi).

#### Install Dependencies

First install components

```sh
sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm; sudo yum install -y git gcc bzr jq pkgconfig clang llvm mesa-libGL-devel opencl-headers ocl-icd ocl-icd-devel hwloc-devel
```

Initialize build dependencies.

```sh
make deps
```

Note: The first time you run `deps` can be **slow** as very large parameter files are either downloaded or generated locally in `/var/tmp/filecoin-proof-parameters`.
Have patience; future runs will be faster.

#### Build and run tests

```sh
# First, build the binary
make

# Then, run the unit tests.
go run ./build test

# Build and test can be combined!
go run ./build best
```

Other handy build commands include:

```sh
# Check the code for style and correctness issues
go run ./build lint

# Run different categories of tests by toggling their flags
go run ./build test -unit=false -integration=true -functional=true

# Test with a coverage report
go run ./build test -cover

# Test with Go's race-condition instrumentation and warnings (see https://blog.golang.org/race-detector)
go run ./build test -race

# Deps, Lint, Build, Test (any args will be passed to `test`)
go run ./build all
```

Note: Any flag passed to `go run ./build test` (e.g. `-cover`) will be passed on to `go test`.

If you have **problems with the build**, please consult the [Troubleshooting](https://go.filecoin.io/go-filecoin-tutorial/Troubleshooting-&-FAQ.html) section of the [venus Documentation](https://go.filecoin.io/).

## Usage

For a complete step-by-step tutorial, see [Getting Started](https://go.filecoin.io/venus-tutorial/Getting-Started.html).

#### Quick start:

```sh
# Remove any existing symlink to a repo directory
rm -rf ~/.venus

# Initialize a new repository, Start the daemon. It will block until it connects to at least one bootstrap peer.
./venus daemon #mainnet
./venus daemon --network cali #calibration
```

Your node should now be connected to some peers, and begin downloading and validating the blockchain.

Open a new terminal to interact with your node:

```sh
# Print the node's connection information
./venus swarm id

# Show chain sync status
./venus chain status
```

To see a full list of commands, run `./venus --help`.

## Contributing

We ❤️ all our contributors; this project wouldn’t be what it is without you! If you want to help out, please see [CONTRIBUTING.md](CONTRIBUTING.md).

Check out the [venus code overview](CODEWALK.md) for a brief tour of the code.

## Community

Here are a few places to get help and connect with the Filecoin community:
- [venus Documentation](http://go.filecoin.io/) — for tutorials, troubleshooting, and FAQs
- The `#fil-venus` channel on [Filecoin Project Slack](https://filecoinproject.slack.com/messages/CEHHJNJS3/) or [Matrix/Riot](https://riot.im/app/#/room/#fil-dev:matrix.org) - for live help and some dev discussions
- [Filecoin Community Forum](https://discuss.filecoin.io) - for talking about design decisions, use cases, implementation advice, and longer-running conversations
- [GitHub issues](https://github.com/filecoin-project/venus/issues) - to report bugs, and view or contribute to ongoing development.
- [Filecoin Specification](https://github.com/filecoin-project/specs) - how Filecoin is supposed to work

Looking for even more? See the full rundown at [filecoin-project/community](https://github.com/filecoin-project/community).

## Maintenance

Venus (previously called `go-filecoin`) is now maintained by [IPFS-Force Community](https://github.com/ipfs-force-community)

Maintainers: @steven004, @diwufeiwen, @hunjixin, @felix00000

This repo is open for anyone to submit issues and PRs.
1. Adhere to the standard Go formatting guidelines, e.g. [Effective Go](https://golang.org/doc/effective_go.html). 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](https://golang.org/doc/effective_go.html#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`](https://golangci-lint.run) (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](https://chris.beams.io/posts/git-commit/). 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.

## License

The Filecoin Project is dual-licensed under Apache 2.0 and MIT terms:
This project is dual-licensed under [Apache 2.0](https://github.com/filecoin-project/lotus/blob/master/LICENSE-APACHE) and [MIT](https://github.com/filecoin-project/lotus/blob/master/LICENSE-MIT).

- Apache License, Version 2.0, ([LICENSE-APACHE](https://github.com/filecoin-project/venus/blob/master/LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license ([LICENSE-MIT](https://github.com/filecoin-project/venus/blob/master/LICENSE-MIT) or http://opensource.org/licenses/MIT)
Binary file added documentation/.DS_Store
Binary file not shown.
Binary file added documentation/images/venus_logo_big2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.