This repo is where the first of MVP for the IPC (InterPlanetary Consensus) framework and other consensus-related experiments by ConsensusLab were implemented and tested. This fork of Lotus is no longer maintained and a lot of the features and protocol tested here are being productionized in a new and improved version of Eudico.
We keep this repo archived for historical relevance and future reference (it still includes a lot of valuable code that haven't been merged and implemented in production). If you are looking to test Eudico in a testnet refer to Spacenet. You can also learn more about all of our ongoing projects and research at https://consensuslab.world.
Eudico is a modularised implementation of Lotus, itself an implementation of the Filecoin Distributed Storage Network. For more details about Filecoin, check out the Filecoin Spec. This is a work-in-progress, intended to enable easier experimentation with future protocol features, and is not meant to be used in the production network.
Note: The default
eudico
branch is the dev branch, please use with caution.
For complete instructions on how to build, install and setup eudico, please visit the Lotus documentation at https://docs.filecoin.io/get-started/lotus. Basic build instructions can be found further down in this readme.
Please send an email to security@filecoin.org. See our security policy for more details.
These repos are independent and reusable modules, but are tightly integrated into Lotus/Eudico to make up a fully featured Filecoin implementation:
Eudico is an open project and welcomes contributions of all kinds: code, docs, and more. However, before making a contribution, we ask you to heed these recommendations.
When implementing a change:
go fmt
.golangci-lint
(CI will reject your PR if unlinted).System-specific Software Dependencies:
Building Eudico 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 libhwloc-dev
For other distributions you can find the required dependencies here. For instructions specific to macOS, you can find them here.
To build Eudico, you need a working installation of Go 1.17.9 or higher:
wget -c https://golang.org/dl/go1.17.9.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.
Once all the dependencies are installed, you can build and install Eudico.
Clone the repository:
git clone https://github.com/filecoin-project/eudico.git
cd eudico/
Note: The default branch eudico
is the dev branch where the latest new features, bug fixes and improvement are in.
Build Eudico:
make eudico
This will create the eudico
executable in the current directory.
Note: eudico
uses the $HOME/.eudico
folder by default for storage (configuration, chain data, wallets, etc). See advanced options for information on how to customize the folder.
If you want to run more than one Eudico node the same host, you need to tell the nodes to use different folders (see FAQ)
Make sure that this directory does not exist when you are starting a new network.
First, a key needs to be generated. In order to do that, compile the Lotus key generator:
make lotus-keygen
Then, generate a key:
./lotus-keygen -t secp256k1
This creates a key file, with the name f1[...].key
(e.g. f16dv4rlp3b33d5deasf3lxkrbfwhi4q4a5uw5scy.key
) in the local directory.
The file name, without the .key
extension, is the corresponding Filecoin address.
If this is the only key you generated so far, you can obtain the address, for example, by running
ADDR=$(echo f1* | tr '.' ' ' | awk '{print $1}')
Use this address to create a genesis block for the system and start the Eudico daemon.
The following command uses the delegated
consensus.
./eudico delegated genesis $ADDR gen.gen
./eudico delegated daemon --genesis=gen.gen
The daemon will continue running until you stop it.
To start a miner, first import a wallet, using the generated key
(replacing f1*.key
by the generated key file if more than one key is present in the directory).
./eudico wallet import --format=json-lotus f1*.key
Then, start the miner.
./eudico delegated miner
Dual-licensed under MIT + Apache 2.0