Sur cette page vous trouverez le code source en RUST (https://www.rust-lang.org/fr/) pour compiler le logiciel pour  calculer la rentabilité du mining solo par rapport au mining en pool.

Commencer par installer “text_io” en tapant “cargo add text_io”

Lancez le soft en tapant “cargo run”. Amusez vous bien !

/*
*****************************************************************************
*
*                                CALC SOLO
*
*  **************************************************************************
*/
// Exemple de formule
// network hashrate / personalrate * blocktime                 = time to find a block
// (921.6       GH/s / 63      MH/s * 15 s)                     = 219428.571 seconds
// (921600000000 H/s / 63000000 H/s * 15 s) / (24h * 60m * 60s) = 2.54 days
// btc :
// average time to find a block = (difficulty * 32 ** 2)/ hash rate
use text_io::read;
fn main() {
    print!(“{}[2J”, 27 as char);
    println!(“░▒█▀▀▀█░▄▀▀▄░█░░▄▀▀▄░░░█▀▄░█▀▀▄░█░░█▀▄”);
    println!(“░░▀▀▀▄▄░█░░█░█░░█░░█░░░█░░░█▄▄█░█░░█░░”);
    println!(“░▒█▄▄▄█░░▀▀░░▀▀░░▀▀░░░░▀▀▀░▀░░▀░▀▀░▀▀▀”);
    println!(“Makertronic ——————— v1.0”);
    println!(“”);
    print!(“Enter network hashrate (Ghs) :”);
    let mut network_hashrate: f64 = read!();
    print!(“Enter your farm hashrate (Mhs) :”);
    let mut personnal_hashrate: f64 = read!();
    print!(“Enter blocktime (sec) :”);
    let blocktime: f64 = read!();
    print!(“Enter block reward (number of coins):”);
    let blockreward: f64 = read!();
    let temps_seconde: f64 = 24.0 * 60.0 * 60.0; // 24h en secondes
    //println!(” > temps_seconde :  {} Hs”, temps_seconde);
    network_hashrate =  network_hashrate * 1000000000.0; // en Hs
    //println!(” > network_hashrate :  {} Hs”, network_hashrate);
    personnal_hashrate = personnal_hashrate * 1000000.0; // en Hs
    //println!(” > personnal_hashrate : {} Hs”, personnal_hashrate);
    let result: f64 = ((network_hashrate / personnal_hashrate ) * blocktime ) / temps_seconde;
    let result_jours: f64 = (result * 24.0) / 1.0; // Affichage en heures
    let number_of_coins: f64 = (24.0 / result_jours) * blockreward;
    println!(” > Average time           : {} days”, result);
    println!(” > Every                  : {} hours”, result_jours);
    println!(” > Estimated coins in 24h : {}”, number_of_coins);
    println!(“this is an estimate … will you have more or less luck?”);
    println!(“— Merci de suivre ma chaine Youtube —-“);
}