All Projects → koinos → koinos-miner

koinos / koinos-miner

Licence: GPL-3.0 license
The Koinos Miner (CLI) provides a functional command line interface that allows users to mine the KOIN ERC-20 which will be used to deliver an equitable initial token distribution on the Koinos blockchain.

Programming Languages

javascript
184084 projects - #8 most used programming language
c
50402 projects - #5 most used programming language
CMake
9771 projects

Projects that are alternatives of or similar to koinos-miner

ethereum-erc20
Fungible token implementation for the Ethereum blockchain.
Stars: ✭ 27 (+80%)
Mutual labels:  erc20, smart-contract
ethereum-crowdsale
0xcert protocol crowdsale contracts for Ethereum blockchain.
Stars: ✭ 15 (+0%)
Mutual labels:  erc20, smart-contract
likecoin-contracts
Token contracts of Like Coin
Stars: ✭ 22 (+46.67%)
Mutual labels:  erc20, smart-contract
Cryptocurrency Icons
A set of icons for all the main cryptocurrencies and altcoins, in a range of styles and sizes.
Stars: ✭ 2,116 (+14006.67%)
Mutual labels:  erc20
Ico Contracts
Ethereum smart contracts that have been used during successful ICOs
Stars: ✭ 160 (+966.67%)
Mutual labels:  erc20
Tokensale
DOCK Tokensale Web App
Stars: ✭ 208 (+1286.67%)
Mutual labels:  erc20
QWallet
Blockchain Wallet for Coin & ERC20 Tokens
Stars: ✭ 11 (-26.67%)
Mutual labels:  erc20
Set Protocol Contracts
🎛 Set Protocol Smart Contracts
Stars: ✭ 151 (+906.67%)
Mutual labels:  erc20
Awesome Blockchain Kor
<블록체인의 정석>, <하이퍼레저 블록체인 개발> 소스코드 및 참고자료 저장소
Stars: ✭ 243 (+1520%)
Mutual labels:  erc20
Erc20 Generator
Create an ERC20 Token for FREE in less than a minute with the most used Smart Contract Generator for ERC20 Token. No login. No setup. No coding required.
Stars: ✭ 202 (+1246.67%)
Mutual labels:  erc20
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 (+1133.33%)
Mutual labels:  erc20
Basic Attention Token Crowdsale
Basic Attention Token
Stars: ✭ 160 (+966.67%)
Mutual labels:  erc20
Token Lists
📚 The Token Lists specification
Stars: ✭ 208 (+1286.67%)
Mutual labels:  erc20
Web3 By Example
Node.js with Web3 javascript examples for getting basic information (transactions, balances, network stats, and tokens) from the Ethereum blockchain.
Stars: ✭ 156 (+940%)
Mutual labels:  erc20
Erc20 Explorer
An explorer for ERC20 based Ethereum tokens
Stars: ✭ 248 (+1553.33%)
Mutual labels:  erc20
Tokenbase
A repository of ERC20 token information. Tokens listed are tradeable on https://forkdelta.github.io. We welcome contributions! 🎉
Stars: ✭ 152 (+913.33%)
Mutual labels:  erc20
Yieldfarming
🧑‍🌾 It ain't much, but it's an honest work
Stars: ✭ 235 (+1466.67%)
Mutual labels:  erc20
Universaltoken
Implementation of Universal Token for Assets and Payments
Stars: ✭ 176 (+1073.33%)
Mutual labels:  erc20
Trust Ray
☁️ API for the Trust Wallet. Project no longer supported and current version used as source of transactions and address tokens in Blockatlas https://github.com/trustwallet/blockatlas/blob/master/config.yml#L64
Stars: ✭ 172 (+1046.67%)
Mutual labels:  erc20
Eth Hot Wallet
Ethereum wallet with erc20 support / web wallet - built using react, web3, eth-lightwallet
Stars: ✭ 205 (+1266.67%)
Mutual labels:  erc20

Koinos Miner

GitHub Issues GitHub License

Table of Contents

Dependencies

Prior to installation, you'll need to install the necessary dependencies.

Linux (Debian based)

sudo apt-get install git cmake build-essential libssl-dev

macOS

On macOS, installing gcc is required to support OpenMP parallelization. Using the brew package manager, install OpenSSL and gcc.

brew install openssl gcc cmake

Windows

On Windows, ensure that you are using the MingW compiler and you have installed CMake. Using the cholocately package manager, install OpenSSL.

choco install openssl

Installation

For both Windows and Linux, you should be able to simply invoke the standard npm installer.

npm install

For macOS, you will need to specify the C compiler as gcc.

CC=gcc-10 npm install

Getting started

You can view the CLI miner arguments by using npm like so:

npm start -- --help

And get the following output:

❯ npm start -- --help

> [email protected] start /path/to/koinos-miner
> node app.js "--help"

Usage: app [OPTIONS]...

Options:
  -v, --version                      output the version number
  -a, --addr <addr>                  An ethereum address
  -e, --endpoint <endpoint>          An ethereum endpoint (default: "http://mining.koinos.io")
  -t, --tip <percent>                The percentage of mined coins to tip the developers (default: "5")
  -p, --proof-period <seconds>       How often you want to submit a proof on average (default: "86400")
  -k, --key-file <file>              AES encrypted file containing private key
  -m, --gas-multiplier <multiplier>  The multiplier to apply to the recommended gas price (default: "1")
  -l, --gas-price-limit <limit>      The maximum amount of gas to be spent on a proof submission (default: "1000000000000")
  --import                           Import a private key
  --export                           Export a private key
  -h, --help                         display help for command

Recipient Address: The --addr argument specifies the recipient address, this is where KOIN will be rewarded.

Ethereum Endpoint: The --endpoint argument specifies the Ethereum node to be used when querying contract information and submitting proofs.

Developer Tip: The --tip argument specifies the percentage of rewarded KOIN to donate to the development team, thank you!

Proof Period: The --proof-period argument specifies the number of seconds on average the miner will attempt to mine and submit proofs.

Gas Multiplier: The --gas-multiplier argument specifies a multiplier to apply to the calculated gas price. This can be used to get your proofs submitted when the Ethereum network gas fees are spiking or are unpredictable.

Gas Price Limit: The --gas-price-limit argument specifies a cap in the acceptable gas price for a proof submission.

A more detailed explanation of the different miner configurations can be found in the Koinos GUI Miner README.md.

Key Management

The CLI miner provides the arguments --import, --export, and --key-file. These are used in handling the private key of the funding address. The user may import a private key and optionally store it in a key file in which case exporting the key is now possible.

Example Run

A simple example of running the miner:

❯ npm start -- --endpoint http://167.172.118.40:8545 --addr 0x98047645bf61644caa0c24daabd118cc1d640f62 --import

> [email protected] start /path/to/koinos-miner
> node app.js "--endpoint" "http://167.172.118.40:8545" "--addr" "0x98047645bf61644caa0c24daabd118cc1d640f62" "--import"

 _  __     _                   __  __ _
| |/ /    (_)                 |  \/  (_)
| ' / ___  _ _ __   ___  ___  | \  / |_ _ __   ___ _ __
|  < / _ \| | '_ \ / _ \/ __| | |\/| | | '_ \ / _ \ '__|
| . \ (_) | | | | | (_) \__ \ | |  | | | | | |  __/ |
|_|\_\___/|_|_| |_|\___/|___/ |_|  |_|_|_| |_|\___|_|

[JS](app.js) Mining with the following arguments:
[JS](app.js) Ethereum Address: 0x98047645bf61644caa0c24daabd118cc1d640f62
[JS](app.js) Ethereum Endpoint: http://167.172.118.40:8545
[JS](app.js) Developer Tip: 5%
[JS](app.js) Proof Period: 86400

Enter private key:
Reinput a same one to confirm it:
Do you want to store your private key encrypted on disk? [y/n]: n
Imported Ethereum address: 0x98047645BF61644CAA0c24dAABD118cC1D640F62
[JS] Starting miner

FAQ

What is “Proof Frequency?”

The key to understanding the proof frequency is that this number isn’t a “real” setting in the miner. Instead what you are modifying is the difficulty of the problem your miner is trying to solve. Harder problems take longer to solve, but the time it takes to solve them is just a guesstimation. The miner might solve the problem right away, or take an unusually long time. It will only rarely take exactly the time you expect it to take.

Why Set a Low Frequency?

In the case of PoW KOIN mining, increased difficulty results in a higher potential KOIN reward. But again, there is randomness here too. The KOIN reward might be large, but it might also be small. So a lower number (e.g. 1 per day or 2 per day) is likely to win you larger KOIN rewards. But an added benefit is that it minimizes your Ethereum fees as well.

Why Set a High Frequency?

Low frequency proofs (i.e. high difficulty) give you bigger potential rewards, so why would you increase the frequency especially considering it will result in higher Ethereum fees? One way to think about mining is like it’s a lottery (except it has slightly better odds ;) ). If you buy enough tickets, you can expect to win an approximate number of times. But you know that your odds of winning with any single ticket is very low. So what do you do? You increase the number of tickets you buy. You make sure that you’re playing the game enough times so that over the long run you receive the rewards that the probabilities say you should.

What Happens if I Shut Down the Miner?

Note that setting a higher frequency doesn’t help you beat someone else to the punch. Your computer is solving hundreds of thousands (or millions) of “losing” hashes every second that it is throwing in the trash, just as you would a losing lottery ticket. It is not saving those hashes, it is searching for one “winning” hash and when it finds that hash it immediately submits a proof to the Ethereum network. This is why it doesn’t matter if your computer loses access to the internet or you just turn off the miner for a moment. You don’t “lose” anything other than the opportunity costs associated with the time that could have been spent mining.

Why Mine?

It’s important to remember that our mission is to give everyone ownership and control over their digital selves. The foundational product we are releasing to serve that mission is the Koinos mainnet and the purpose of this mining phase is to decentralize the token distribution and ensure that when it launches, the Koinos mainnet is as decentralized as any blockchain out there, if not more!

KOIN will be the cryptocurrency that powers a decentralized computer built from the ground up to enable developers to offer delightful user experiences while protecting the user’s digital information through blockchain integration. The purpose of this phase is to get KOIN into the hands of developers and users who want be able to use the types of applications that Koinos is capable of powering.

License

Copyright 2020 Open Orchard, Inc.

Koinos Miner is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Koinos Miner is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Koinos Miner. If not, see https://www.gnu.org/licenses/.

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].