Awesome
Mantis
Ethereum-like Blockchain Scala client built by IOHK's Team Grothendieck.
Status - Release
For continuous integration we're using:
- Buildkite to run all the Scala build steps
- Hydra to test that the Nix build steps work and run each of the Ops test suites.
You can check the latest build results of the current branch by clicking the status icon in the header of the Github file browser.
Unit Test Code Coverage Status - TBD
Docs - FIXME: Update docs!
For more details on configuration and functionality check out our wiki (also at wiki)
Download the client
The latest release can be downloaded from here
Command line version
You can use generic launcher with appropriate parameter to connect with pre-configured network, it can be found in bin
directory.
Example:
./bin/mantis-launcher etc
- for joining Ethereum Classic network
Possible networks: etc
, eth
, mordor
, testnet-internal
Command Line Interface
cli
is a tool that can be used to:
- generate a new private key
./bin/mantis cli generate-private-key
- derive an address from private key
./bin/mantis cli derive-address 00b11c32957057651d56cd83085ef3b259319057e0e887bd0fdaee657e6f75d0
- generate genesis allocs (using private keys and/or addresses)
`./bin/mantis cli generate-alloc --balance=42 --address=8b196738d90cf3d9fc299e0ec28e15ebdcbb0bdcb281d9d5084182c9c66d5d12 --key=00b11c32957057651d56cd83085ef3b259319057e0e887bd0fdaee657e6f75d1`
- generate multiple key-pairs (following example generate 5 key-pairs)
./bin/mantis cli generate-key-pairs 5
Building the client
SBT
Prerequisites to build
- JDK 1.8 (download from java.com)
- sbt (download sbt)
- python 2.7.15 (download from python.org)
Build the client
As an alternative to downloading the client build the client from source.
git submodule update --recursive --init
sbt dist
in the root of the project.
This updates all submodules and creates a distribution zip in ~/target/universal/
.
Nix
In the root of the project:
Build the client
nix-build
Regenerate lock files
nix-shell
sbtix-gen-all2
OR
If the "ensure Nix expressions are up-to-date" step of your CI build has failed, check the artifacts of that step. There should be a patch provided, which you can apply locally with:
patch -p1 < downloaded.patch
This patch will update the lock files for you.
Why so many lock files?
repo.nix
: generated by thesbtix-gen
command and includes only the build dependencies for the project.project/repo.nix
: generated by thesbtix-gen-all
command and includes only the plugin dependencies. Also generatesrepo.nix
.project/project/repo.nix
: generated by thesbtix-gen-all2
command and includes only the plugin dependencies. Also generatesrepo.nix
andproject/repo.nix
.
error: unsupported argument 'submodules' to 'fetchGit'
You get this error when you aren't using a new-enough version of Nix (fetchGit support for submodules is recent).
To fix this, update the version of Nix you are using, or in a pinch:
- Remove the "submodules = true;" argument from fetchGit (in
./nix/pkgs/mantis/default.nix
). git submodule update --recursive --init
nix-build
Monitoring
Locally build & run monitoring client
# Build monitoring client docker image
projectRoot $ docker build -f ./docker/monitoring-client.Dockerfile -t mantis-monitoring-client ./docker/
# Run monitoring client in http://localhost:9090
projectRoot $ docker run --network=host mantis-monitoring-client
TLS setup
Both the JSON RPC (on the node and faucet) can be additionally protected using TLS. On the development environment it's already properly configured with a development certificate.
Generating a new certificate
If a new certificate is required, create a new keystore with a certificate by running ./tls/gen-cert.sh
Configuring the node
-
Configure the certificate and password file to be used at
mantis.network.rpc.http.certificate
key on theapplication.conf
file:keystore-path: path to the keystore storing the certificates (if generated through our script they are by default located in "./tls/mantisCA.p12") keystore-type: type of certificate keystore being used (if generated through our script use "pkcs12") password-file: path to the file with the password used for accessing the certificate keystore (if generated through our script they are by default located in "./tls/password")
-
Enable TLS in specific config:
- For JSON RPC:
mantis.network.rpc.http.mode=https
- For JSON RPC:
Configuring the faucet
-
Configure the certificate and password file to be used at
mantis.network.rpc.http.certificate
key on thefaucet.conf
file:keystore-path: path to the keystore storing the certificates (if generated through our script they are by default located in "./tls/mantisCA.p12") keystore-type: type of certificate keystore being used (if generated through our script use "pkcs12") password-file: path to the file with the password used for accessing the certificate keystore (if generated through our script they are by default located in "./tls/password")
-
Enable TLS in specific config:
- For JSON RPC:
mantis.network.rpc.http.mode=https
- For JSON RPC:
-
Configure the certificate used from RpcClient to connect with the node. Necessary if the node uses http secure. This certificate and password file to be used at
faucet.rpc-client.certificate
key on thefaucet.conf
file:keystore-path: path to the keystore storing the certificates keystore-type: type of certificate keystore being used (if generated through our script use "pkcs12") password-file: path to the file with the password used for accessing the certificate keystore
Feedback
Feedback gratefully received through the Ethereum Classic Forum (http://forum.ethereumclassic.org/)
Known Issues
There is a list of known issues in the 'RELEASE' file located in the root of the installation.