- rust 1.35
- clang
- ncurses and libs (ncurses, ncursesw5)
- zlib libs (zlib1g-dev or zlib-devel)
- pkg-config
- libssl-dev
- linux-headers (reported needed on Alpine linux)
- llvm
For Debian-based distributions (Debian, Ubuntu, Mint, etc), all in one line (except Rust):
sudo apt install build-essential cmake git libgit2-dev clang libncurses5-dev libncursesw5-dev zlib1g-dev pkg-config libssl-dev llvmFor Mac using brew:
brew install pkg-config
brew install openssl
brew install cmake
brew install rustupInstructions of how to install rust can be found here.
During installation rustup will attempt to configure the PATH. Because of differences between platforms, command shells, and bugs in rustup, the modifications to PATH may not take effect until the console is restarted, or the user is logged out, or it may not succeed at all. So, restart your console before proceeding to the next steps.
After you have rust installed, execute the following command in the terminal:
rustup default 1.35.0And then, check if you are using the correct version by typing the following command in the terminal:
rustc --versionThe output should be something like this:
rustc 1.35.0 (3c235d560 2019-05-20)git clone https://gitlab.com/epiccash/epic
cd epic
git submodule update --init --recursive
cargo build --releaseEpic can also be built in debug mode (without the --release flag, but using the --debug or the --verbose flag) but this will render fast sync prohibitively slow due to the large overhead of cryptographic operations.
A successful build gets you:
target/release/epic- the main epic binary
If you want to execute the epic server, in the root directory of your Epic installation open a new terminal session and execute the following steps:
-
Navigate to where your epic binary was generated using the followed command:
cd target/release -
Configuring the $PATH environment variable
export LD_LIBRARY_PATH=$(find . -iname librandomx.so | head -n 1 | xargs dirname | xargs realpath)
-
Execute the epic server using the following command:
./epic
If the directory that you are starting the epic server doesn't have epic-server.toml file, the epic server will be executed with the default file ~/.epic/main/epic-server.toml. More information can be found on the topic Configuring your Epic node.
The following steps describe how to execute epic from any location in the current terminal session:
-
Open the terminal in the root directory of your Epic installation, and execute the following command to put the epic binary on your path:
export PATH=`pwd`/target/release:$PATH
-
After you set the path, you can run
epicdirectly by typing in the terminal:epic
If the directory that you are starting the epic server doesn't have epic-server.toml file, the epic server will be executed with the default file ~/.epic/main/epic-server.toml. More information can be found on the topic Configuring your Epic node.
All mining functions for Epic are in a separate project called epic-miner.
If the testnet is restarted or there's a new version of the epic server, you will need to remove the directory called /chain/data. This directory is where the epic cash blockchain stores its data. Therefore, if the testnet is restarted, all this data needs to be removed in order to run and store the newest version of the blockchain. The following steps explain how to erase this data using the terminal:
-
Open a new terminal window in the directory where you saved the epic server data. If you used the default configuration, this folder should be under ~/.epic/main in you home directory.
-
Then execute the following command:
rm -rf chain_data/
Deb package is binary-based package manager. We have build scripts .deb packages in the following repos:
- RandomX
- Epic
- Epic Wallet
- Epic Miner
In order to build one, you need to first clone the repos:
git clone --recursive git@gitlab.com:epiccash/Epic.git
git clone --recursive git@gitlab.com:epiccash/EpicWallet.git
git clone --recursive git@gitlab.com:epiccash/epic-miner.git
git clone --recursive git@gitlab.com:epiccash/randomx.gitThen install all the package listed under the Build-Depends section in the debian/control file of the respective repository. To be safe, these are all the needed packages in all the repositories:
sudo apt-get install build-essential debhelper cmake libclang-dev libncurses5-dev clang libncursesw5-dev cargo rustc opencl-headers libssl-dev pkg-config ocl-icd-opencl-devThere's some special commands needed in order to install CUDA (which is necessary for epic-miner-cuda). Follow the instructions in this link.
Finally, run from the respective project root the following command:
fakeroot make -f debian/rules binaryIn the next few days we will need to adjust the difficulties in order to reach an ideal point. In order to change that manually access the file core/src/genesis.rs from epic root directory. Look for the functions genesis_floo and genesis_main and search for the lines that look like the following:
diff.insert(PoWType::Cuckaroo, 2_u64.pow(1));
diff.insert(PoWType::Cuckatoo, 2_u64.pow(1));
diff.insert(PoWType::RandomX, 2_u64.pow(16));
diff.insert(PoWType::ProgPow, 2_u64.pow(8));And change the values under .pow().
After you did those things you will need to rebuild the package, the testnet and everybody participating in the network will need to install the new package and restart all the services. More instruction of how to that can be found in the topic Testnet Reset.