A Rust binary for file encryption to multiple participants.

Overview

Kaspa-miner

Build status Latest version License dependency status

A Rust binary for file encryption to multiple participants.

Installation

From Sources

With Rust's package manager cargo, you can install kaspa-miner via:

cargo install kaspa-miner

From Binaries

The release page includes precompiled binaries for Linux, macOS and Windows.

Usage

To start mining you need to run kaspad and have an address to send the rewards to. There's a guide here on how to run a full node and how to generate addresses: https://github.com/kaspanet/docs/blob/main/Getting%20Started/Full%20Node%20Installation.md

Help:

kaspa-miner 0.1.0
A Kaspa high performance CPU miner

USAGE:
    kaspa-miner [FLAGS] [OPTIONS] --mining-address 
   
    

FLAGS:
    -d, --debug      Enable debug logging level
    -h, --help       Prints help information
        --testnet    Use testnet instead of mainnet [default: false]
    -V, --version    Prints version information

OPTIONS:
    -s, --kaspad-address 
    
         The IP of the kaspad instance [default: 127.0.0.1]
    -a, --mining-address 
     
          The Kaspa address for the miner reward
    -t, --threads 
      
                     Amount of miner threads to launch [default: number of logical cpus]
                                             [default: 0]
    -p, --port 
       
         Kaspad port [default: Mainnet = 16111, Testnet = 16211] 
       
      
     
    
   

To start mining you just need to run the following:

./kaspa-miner --mining-addr kaspa:XXXXX

This will run the miner on all the available CPU cores.

Comments
  • Replacing mpsc

    Replacing mpsc

    Using mpsc to send blocks to threads might cause a backlog if threads are slow to poll the channel. As a result, threads might try to solve outdated blocks, and in the extreme case, the channel will fill up, and this affected the RPC behavior

    This mostly affected GPU threads, where polling was slower

    opened by tmrlvi 3
  • command not found

    command not found

    I run the command sudo ./kaspa-miner --mining-address XXX in terminal, show "command not found", but I run the official miner ,no error, I'm confus with this problem

    ubuntu@ubuntu01:~/kaspa/bin$ sudo ./kaspaminer --miningaddr kaspa:qpfa96cgmdqlptpv2k22ew0rjvn6jpf28jzdfpz62s6yf8yhumt86vq.........
    2022-02-24 22:57:22.563 [INF] KSMN: Version 0.11.11
    2022-02-24 22:57:22.570 [INF] KSMN: Connected to localhost:16110
    2022-02-24 22:57:22.570 [INF] KSMN: Minimum average time per 10 blocks: 5s, smaller minimum time per block: 50ms
    2022-02-24 22:57:22.571 [INF] KSMN: Waiting for the initial template
    2022-02-24 22:57:32.571 [INF] KSMN: Current hash rate is 51.51 Khash/s
    2022-02-24 22:57:42.571 [INF] KSMN: Current hash rate is 53.71 Khash/s
    
    
    ubuntu@ubuntu01:~/kaspa/bin$ sudo ./kaspa-miner --mining-address kaspa:qpfa96cgmdqlptpv2k22ew0rjvn6jpf28jzdfpz62s6yf8yhumt86vq........
    sudo: ./kaspa-miner: command not found
    
    opened by laga-bu 2
  •  The miner creates blocks, without being connected to the chain

    The miner creates blocks, without being connected to the chain

    Connect the new miner 0.1.1 and began to create blocks many blocks and closed, the kaspa client says that they are orphans and you have no parents and keeps looking.

    opened by kalekoi 2
  • Speedup suggestion

    Speedup suggestion

    I don't speak rust so it'll take me forever to implement, but if you pass the target to heavy_hash then you you can stop populating the result as soon as it becomes clearly larger

    let data: [u8; 32] = array_from_fn(|i| hash[i] ^ ((product[i * 2] << 4) as u8 | product[2 * i + 1] as u8));

    Same for matrix multiplication right above it. So overall - do one row multiplication, then calculate one byte of data, compare to byte in target and continue only if necessary.

    opened by orik-foxface 1
  • Change --mining-addr to --mining-address in Usage

    Change --mining-addr to --mining-address in Usage

    Please fix this part of a "Usage":

    To start mining you just need to run the following: ./kaspa-miner --mining-address kaspa:XXXXX This will run the miner on all the available CPU cores.

    opened by DJPatron 1
  • Handroll a single producer multi receiver implementation (watch channel)

    Handroll a single producer multi receiver implementation (watch channel)

    The watch channel is kept inside regular CPU threads, not async tasks. so because of that using a tokio::watch channel required keeping a runtime for each CPU worker, which kinda sucks. also the block_on implementation had a lot of overhead.

    This implementation assumes T: Clone (which is true for our case), and allows you to block on new states using non-async regular sync primitives.

    opened by elichai 0
  • Error: tonic::transport::Error after Start kaspa-miner from cargo in Ubuntu 22.04

    Error: tonic::transport::Error after Start kaspa-miner from cargo in Ubuntu 22.04

    Hello, i get this error after try to start kaspa-miner in ubuntu 22.04:

    Error: tonic::transport::Error(Transport, hyper::Error(Connect, ConnectError("tcp connect error", Os { code: 111, kind: ConnectionRefused, message: "Connection refused" })))

    any solutions?

    opened by jkdi 0
  • Config Error on HiveOS

    Config Error on HiveOS

    Miner won't work like descripted with the acc-pool.pw Don't know the problem. Using wallet from the kdx.app. It's also not starting when connecting a mining rig to the Kaspa Node from KDX app.

    Screenshot_20220307-072637_Hive OS

    opened by franklin8412 1
  • Error compiling on mac m1

    Error compiling on mac m1

    Compiling hyper v0.14.16 Compiling hyper-timeout v0.4.1 Compiling tonic v0.6.2 error[E0433]: failed to resolve: use of undeclared crate or module keccak --> src/pow/keccak.rs:3:5 | 3 | keccak::f1600(state); | ^^^^^^ use of undeclared crate or module keccak

    opened by andynet62 1
  • IPv6 compatibility

    IPv6 compatibility

    Using an IPv6 address results in: Error: tonic::transport::Error(Transport, InvalidUri(InvalidAuthority)) I think the address is not being enclosed in square brackets when forming the url, however my knowledge of rust is basically zero so I don't feel like patching it myself.

    opened by darknight7 0
  • Add restart if 0.00 KH/s is displayed

    Add restart if 0.00 KH/s is displayed

    Miner stops if synchronization stops. Miner is not working even sync is going OK later. Please add flag such as -r for restarting miner automatically if node sync was lost.

    opened by DJPatron 1
Releases(v0.2.1)
Owner
Elichai Turkel
Elichai Turkel
Authenticated Encryption with Associated Data Algorithms: high-level encryption ciphers

RustCrypto: Authenticated Encryption with Associated Data (AEAD) Algorithms Collection of Authenticated Encryption with Associated Data (AEAD) algorit

Rust Crypto 457 Jan 4, 2023
A secure file encryption utility, written in rust.

Dexios Dexios What is it? Building notes Checksums Performance Output file sizes Environment Variables Key Inputs Usage Examples To Do What is it? Dex

brxken 156 Dec 22, 2022
DexiosGUI - Simple cross-platform drag-and-drop Dexios file encryption

DexiosGUI Simple cross-platform drag-and-drop Dexios file encryption. Latest Windows x64 release is here. DexiosGUI is a Qt/C++ app for encrypt and de

Fabrice Corraire 4 Jul 25, 2022
Chargo is a tool for file encryption/decryption. It's based on Argon2 and ChaCha20Poly1305 algorithms.

| Documentation Chargo is a tool for file encryption/decryption with password. It's based on Argon2 and ChaCha20Poly1305 algorithms. From arg2u with ♥

Airat Galiullin 7 Jan 1, 2023
rabe is an Attribute Based Encryption library, written in Rust

Rabe rabe is a rust library implementing several Attribute Based Encryption (ABE) schemes using a modified version of the bn library of zcash (type-3

Fraunhofer AISEC 52 Dec 15, 2022
A Rust library for lattice-based additive homomorphic encryption.

Cupcake Cupcake is an efficient Rust library for the (additive version of) Fan-Vercauteren homomorphic encryption scheme, offering capabilities to enc

Facebook Research 365 Dec 11, 2022
A Rust Library of China's Standards of Encryption Algorithms (SM2/3/4)

Libsm Libsm is an open source pure rust library of China Cryptographic Algorithm Standards. It is completed by a collaborative effort between the Cryp

CITAHub 149 Dec 23, 2022
In addition to encryption library, pure RUST implementation of SSH-2.0 client protocol

In addition to encryption library, pure RUST implementation of SSH-2.0 client protocol

陈年旧事。 73 Jan 1, 2023
A Rust Implementation of China's Standards of Encryption Algorithms(SM2/SM3/SM4)

gm-rs A Pure Rust High-Performance Implementation of China's Standards of Encryption Algorithms(SM2/SM3/SM4) Usage Add this to your Cargo.toml: [depen

null 2 Oct 27, 2022
Simple to use CLI tool that makes encryption easy! Written in Rust.

?? eme: Encryption Made Easy an extremely simple AES-256 encryption tool written in Rust Usage: # To encrypt: eme --encrypt secret.png # To decrypt: e

null 5 Jan 3, 2023
Rust library for practical time-lock encryption using `drand` threshold network

tlock-rs: Practical Timelock Encryption/Decryption in Rust This repo contains pure Rust implementation of drand/tlock scheme. It provides time-based e

Timofey 32 Jan 8, 2023
WebAssembly wrapper of the rage encryption library

rage-wasm: WebAssembly wrapper of rage rage is a simple, modern, and secure file encryption tool, using the age format. It features small explicit key

Kan-Ru Chen 35 Dec 16, 2022
End-to-end encryption and mutual authentication for distributed applications.

✨ Hands-on Introduction: Build end-to-end encrypted, mutually-authenticated, secure messaging in Rust ✨ Rust and Elixir libraries for end-to-end encry

Ockam | Trust for Data-in-Motion 2.8k Jan 2, 2023
Meta-repository for Miscreant: misuse-resistant symmetric encryption library with AES-SIV (RFC 5297) and AES-PMAC-SIV support

The best crypto you've never heard of, brought to you by Phil Rogaway A misuse resistant symmetric encryption library designed to support authenticate

miscreant. 480 Dec 8, 2022
The Hybrid Public Key Encryption (HPKE) standard in Python

Hybrid PKE The Hybrid Public Key Encryption (HPKE) standard in Python. hybrid_pke = hpke-rs ➕ PyO3 This library provides Python bindings to the hpke-r

Cape Privacy 4 Nov 7, 2022
Project Masterpass is a deterministic databaseless key management algorithm, aimed to help those who cannot protect their encryption keys in storage

Project Masterpass (working title) Attention! This project is still under heavy development, and SHOULD NOT be used in practice, as the algorithms cou

Gyorgy Wang 2 Sep 11, 2022
A simple to use, cross-platform aes encryption

About Project End to End encryption (AES) for multiple languages (cross-platform) with CBC Icon Item ?? Upcoming ⚖️ License ?? ChangeLog Usage (rust)

Zot Cryptography 2 Dec 15, 2022
Arkworks circuits for verifiable time-lock encryption

zk-timelock This repo contains arithmetic circuits for verifiable time-lock encryption made using arkworks-rs toolkit. For more details on such an enc

Timofey 68 Apr 5, 2023
This is a Order-preserving encryption (OPE) lib inspired by cryptdb's ope implementation.

Ope in rust This is an Order-preserving encryption (OPE) lib inspired by cryptdb's ope implementation. It is a pure rust implementation, no c dependen

Sentclose 8 Jul 19, 2023