All Projects → input-output-hk → Mantis

input-output-hk / Mantis

Licence: apache-2.0
A Scala based client for Ethereum-like Blockchains.

Programming Languages

scala
5932 projects

Labels

Projects that are alternatives of or similar to Mantis

Dagger.js
Simple library to connect with dagger server and manage subscriptions for Ethereum Blockchain.
Stars: ✭ 179 (-6.28%)
Mutual labels:  ethereum
Blockchain Security Contacts
Directory of security contacts for blockchain companies
Stars: ✭ 186 (-2.62%)
Mutual labels:  ethereum
Ethwallet
A ethereum wallet like imToken
Stars: ✭ 190 (-0.52%)
Mutual labels:  ethereum
Tbtc
Trustlessly tokenized Bitcoin on Ethereum ;)
Stars: ✭ 182 (-4.71%)
Mutual labels:  ethereum
Use Wallet
👛 useWallet() · All-in-one solution to connect a dapp to an Ethereum provider.
Stars: ✭ 182 (-4.71%)
Mutual labels:  ethereum
Multisender
Token Multisender Dapp smart contract. Airdrop tokens. Batch sending ERC20, ETH, Ethereum tokens. Send thousands of transfers in a few transactions. It can help user to save more tx fee and time than sending one by one
Stars: ✭ 185 (-3.14%)
Mutual labels:  ethereum
Eth Utils
Utility functions for working with ethereum related codebases.
Stars: ✭ 179 (-6.28%)
Mutual labels:  ethereum
Uniswap Python
🦄 The unofficial Python client for the Uniswap exchange.
Stars: ✭ 191 (+0%)
Mutual labels:  ethereum
Armors Solidity
Armors-solidity is a framework to build secure smart contracts on Ethereum.
Stars: ✭ 184 (-3.66%)
Mutual labels:  ethereum
Claymore Dual Miner
Download Ethereum Miner (Updated 2020)
Stars: ✭ 186 (-2.62%)
Mutual labels:  ethereum
Blockchainwallet Crypto
比特币、以太坊公私钥生成以及签名,长时间不维护可移步 https://github.com/QuincySx/ChainWallet
Stars: ✭ 183 (-4.19%)
Mutual labels:  ethereum
Ultimateicocalendar
The ICO calendar to end all ICO calendars
Stars: ✭ 183 (-4.19%)
Mutual labels:  ethereum
Learning Blockchain
Tidy up Blockchain ecosystem and tutorial
Stars: ✭ 188 (-1.57%)
Mutual labels:  ethereum
Civil
The Main Monorepo and entry-point of all things Civil
Stars: ✭ 181 (-5.24%)
Mutual labels:  ethereum
Loom Js
JS library for building browser apps & NodeJS services that interact with Loom DAppChains
Stars: ✭ 189 (-1.05%)
Mutual labels:  ethereum
Unstoppable Wallet Ios
A secure and decentralized Bitcoin and other cryptocurrency wallet for iPhone. Supports Bitcoin, Ethereum, EOS, Binance Chain, Bitcoin Cash, DASH, ...
Stars: ✭ 180 (-5.76%)
Mutual labels:  ethereum
Monorepo
Home for all packages related to the Counterfactual project
Stars: ✭ 187 (-2.09%)
Mutual labels:  ethereum
Ethereum
以太坊开发 HelloWorld for Java
Stars: ✭ 191 (+0%)
Mutual labels:  ethereum
Arc
Arc is an operating system for DAOs.
Stars: ✭ 190 (-0.52%)
Mutual labels:  ethereum
Chainbook
📚 区块链上的纸质书交易平台,为未来而构建!
Stars: ✭ 189 (-1.05%)
Mutual labels:  ethereum

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 Build status
  • 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 website and documentation

Download the client

The latest release can be downloaded from here

Command line version

In the bin directory, you can find the generic launcher. To connect to a pre-configured network just pass the network name as a parameter.

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-allocs --balance=42 --address=8b196738d90cf3d9fc299e0ec28e15ebdcbb0bdcb281d9d5084182c9c66d5d12 --key=00b11c32957057651d56cd83085ef3b259319057e0e887bd0fdaee657e6f75d1`
  • generate multiple key-pairs (following example generate 5 key-pairs)
./bin/mantis cli generate-key-pairs 5
  • encrypt private key (default passphrase is empty string)
./bin/mantis cli encrypt-key --passphrase=pass 00b11c32957057651d56cd83085ef3b259319057e0e887bd0fdaee657e6f75d0

The command output uses the same format as the keystore so it could be used ex. to setup private faucet

ex.

{
  "id":"3038d914-c4cd-43b7-9e91-3391ea443f95",
  "address":"c28e15ebdcbb0bdcb281d9d5084182c9c66d5d12",
  "version":3,
  "crypto":{
    "cipher":"aes-128-ctr",
    "ciphertext":"6ecdb74b2a33dc3c016b460dccc96843d9d050aea3df27a3ae5348e85b3adc3e",
    "cipherparams":{
      "iv":"096b6490fe29e42e68e2db902920cad6"
    },
    "kdf":"scrypt",
    "kdfparams":{
      "salt":"cdcc875e116e2824ab02f387210c2f4ad7fd6fa1a4fc791cc92b981e3062a23e",
      "n":262144,
      "r":8,
      "p":1,
      "dklen":32
    },
    "mac":"8388ae431198d31d57e4c17f44335c2f15959b0d08d1145234d82f0d253fa593"
  }
}

Building the client

SBT

Prerequisites to build
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
Update sbt+nix dependencies

When updating project dependencies, the nix fixed-output-derivation will need to be updated so that it includes the new dependency state.

To do so, please run:

./update-nix.sh
git add ./nix/pkgs/mantis.nix
git commit -m "Update nix-sbt sha"

NOTE: This should only be necessary when updating dependencies (For example, edits to build.sbt or project/plugins.sbt will likely need to be regenerated)

Monitoring

Locally build & run monitoring client

A docker-compose setup using Prometheus and Grafana, and a preconfigured dashboard, is available. As a precondition you need to have docker and sbt installed. Before running the script, you need to enable metrics by editing the file metrics.conf and setting mantis.metrics.enabled=true

To build the monitoring, run the following script at ./docker/mantis/build.sh. This script builds a docker image of mantis using the local sources and starts the docker-compose.

Grafana will be available at http://localhost:3000 (using user and password: admin and admin) with a dashboard called Mantis.

TLS setup

Both the JSON RPC (on the node and faucet) can be additionally protected using TLS. The development environment it 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

  1. Configure the certificate and password file to be used at mantis.network.rpc.http.certificate key on the application.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")

  2. Enable TLS in specific config:

    • For JSON RPC: mantis.network.rpc.http.mode=https

Configuring the faucet

  1. Configure the certificate and password file to be used at mantis.network.rpc.http.certificate key on the faucet.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")

  2. Enable TLS in specific config:

    • For JSON RPC: mantis.network.rpc.http.mode=https
  3. 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 the faucet.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

Faucet setup and testing

  1. First start a client node using the docker-compose, by running the script found at ./docker/mantis/build.sh Modify the script before running it by adding the volumes and command sections to mantis configuration:
mantis:
image: mantis:latest
ports:
- 8546:8546
- 13798:13798
- 9095:9095
networks:
- mantis-net
volumes:
- $HOME/.mantis:/home/demiourgos728/.mantis/
command: -Dconfig.file=./conf/sagano.conf
  1. Create a wallet address. Run the following curl command, replacing <password> by a password of your choice:
curl --request POST \
  --url http://127.0.0.1:8546/ \
  --header 'Cache-Control: no-cache' \
  --header 'Content-Type: application/json' \
  --data '{
	"jsonrpc": "2.0",
  "method": "personal_newAccount", 
  "params": ["<password>"],
  "id": 1
}'

You will receive a response like this:

{"jsonrpc":"2.0","result":"<address>","id":1}
  1. Modify src/universal/conf/faucet.conf file, config your account address created in the previous step. with the password choosen by you:
wallet-address = "<address>"
wallet-password = "<password>"
  1. Now check the keystore folder in ~/.mantis/testnet-internal-nomad/keystore. Inside you will find a key generate with the curl request sent in step 2.. Copy that file to ~/.mantis-faucet/keystore/:
cp UTC--<date>--<key> ~/.mantis-faucet/keystore/
  1. Start the faucet in command line:
sbt -Dconfig.file=src/universal/conf/faucet.conf "run faucet"
  1. Run the following curl command to send tokens from your faucet to a wallet address:
curl --request POST \
  --url http://127.0.0.1:8099/ \
  --header 'Content-Type: application/json' \
  --data '{
	"jsonrpc": "2.0",
  "method": "faucet_sendFunds", 
  "params": ["<address>"],
  "id": 1
}'

Happy transfer!

Note: In order for the transfer transaction be persisted, a faucet needs sufficient founds in its account and in this test case a new faucet, without ETC tokens, is being created.

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].