{"id":15146899,"url":"https://github.com/ragnaroek/mithril","last_synced_at":"2025-04-09T23:18:01.313Z","repository":{"id":44709664,"uuid":"98040491","full_name":"Ragnaroek/mithril","owner":"Ragnaroek","description":"Pure Rust Monero Miner","archived":false,"fork":false,"pushed_at":"2022-06-17T09:26:33.000Z","size":542,"stargazers_count":242,"open_issues_count":10,"forks_count":45,"subscribers_count":23,"default_branch":"master","last_synced_at":"2025-04-09T23:17:57.878Z","etag":null,"topics":["cryptocurrency","mining","monero","monero-mining","randomx","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ragnaroek.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-07-22T15:34:49.000Z","updated_at":"2025-03-29T14:36:34.000Z","dependencies_parsed_at":"2022-09-14T10:51:18.828Z","dependency_job_id":null,"html_url":"https://github.com/Ragnaroek/mithril","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ragnaroek%2Fmithril","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ragnaroek%2Fmithril/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ragnaroek%2Fmithril/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ragnaroek%2Fmithril/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ragnaroek","download_url":"https://codeload.github.com/Ragnaroek/mithril/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248125593,"owners_count":21051771,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cryptocurrency","mining","monero","monero-mining","randomx","rust"],"created_at":"2024-09-26T12:20:29.136Z","updated_at":"2025-04-09T23:18:01.284Z","avatar_url":"https://github.com/Ragnaroek.png","language":"Rust","funding_links":["https://img.shields.io/static/v1?label=Sponsor\u0026message=%E2%9D%A4\u0026logo=GitHub\u0026link=https://github.com/sponsors/Ragnaroek","https://github.com/sponsors/Ragnaroek","https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=A24SWQT3P5DY2\u0026source=url"],"categories":[],"sub_categories":[],"readme":"![Build Status](https://github.com/Ragnaroek/mithril/actions/workflows/rust.yml/badge.svg)\n[![codecov](https://codecov.io/gh/Ragnaroek/mithril/branch/master/graph/badge.svg)](https://codecov.io/gh/Ragnaroek/mithril)\n[![Github Sponsor](https://img.shields.io/static/v1?label=Sponsor\u0026message=%E2%9D%A4\u0026logo=GitHub\u0026link=https://github.com/sponsors/Ragnaroek)](https://github.com/sponsors/Ragnaroek)\n[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=A24SWQT3P5DY2\u0026source=url)\n\n# Mithril\n\n**Mithril v0.10.0 is Cryptonight v8 ready.**\n\nRust Monero Miner (pure Rust is the goal, but the project is not there yet, see help wanted section)\n\n## Current Status (2020-05-06)\n\nRandomX is implemented, but still some more testing is needed. It is now possible to mine with the implementation.\nOptimisations are next.\n\n## Unique Selling Points\n\n- Auto-Tuning: Finds the optimal setup for your hardware itself with a bandit algorithm\n- Easy to compile: inherited from the great rust toolchain\n- cross platform: should run on every (x86) platform supported by Rust\n- [Fast: should be as fast as the C-implementations] (I want to say that, but I currently cannot prove it)\n\n## Roadmap\n\nFeature Backlog:\n- [ ] API for statistic data (especially the hash-rate)\n- [ ] Simple statistic terminal UI\n- [ ] RandomX (compiled mode)\n- [ ] WebAssembler Support\n- [ ] integrate GPU Mining  (AMD)\n\nFuture Feature Backlog\n- [ ] ARM support (Raspberry, Pine64)\n- [ ] integrate GPU Mining (NVIDIA)\n\nDONE:\n- [x] RandomX update (interpreter mode)\n- [x] hard-fork v7 update\n- [x] auto-optimisation via bandit algorithms\n- [x] optimise cryptonight hashing function\n- [x] implement software AES (current work)\n- [x] measure hash performance\n- [x] implement stratum protocol (for pooled mining support)\n- [x] implement cryptonight hashing function\n\n# HowTo Compile, Configure and Run\n\nYou need the Rust nightly version to compile Mithril, since it uses inline assembler which is only available\nin the nightly version of Rust. The nightly version is best installed with [rustup](https://www.rustup.rs/).\nOnce you have the nightly version installed, type `cargo build --release` for an optimised binary.\nThe binary can be found in the `target/release/` folder.\n\nMithril expects a `config.toml` in the working directory. Copy the `default_config.toml` as `config.toml` to the Mithril\nworking directory. You need at least configure your Monero address in the `[pool]` section for the reward and the `num_threads` depending on your machine (a good start is to use 2x number of your cores on your machine).\n\nIf you get a `wrong instruction set` kind of error you can try to disable hardware AES with the `has_aes` flag in the\n`[hardware]` section.\n\nIf you find any issues, please report them here: [Mithril Issues](https://github.com/Ragnaroek/mithril/issues)\n\n## Auto-Tuning\n\n### Configuration\n\nAuto-Tuning is enabled by default in Mithril. You can disable and configure auto-tuning in the config.toml:\n\n```toml\n[worker]\nnum_threads = 8\nauto_tune = true\nauto_tune_interval_minutes = 15\nauto_tune_log = \"./bandit.log\"\n```\n\nIf you set `auto_tune` to `false`, Mithril will honour your `num_threads` and will use the number of threads configured\nthere. The other options are only relevant if you set `auto_tune` to `true`. The config `auto_tune_interval_minutes` controls, how often a new bandit arm will be drawn and a new thread count setup will be tried. I suggest picking a longer interval, to average-out some spikes on loads on the machine the miner is running on.\n\nYou can enable detailed logging by setting a path to a file in `auto_tune_log`. Each step in the bandit algorithm\nwill be logged there. You can evaluate the performance of the bandit algorithm on your machine with the Bandit-Tools that have been created for exactly this purpose. You find them here: [Bandit-Tools](https://github.com/Ragnaroek/bandit-tools).\n\nThe current state of the bandit algorithm will always be saved to `~/.mithril/bandit_state.json`.\nYou can stop the miner and on the next startup it will continue the arm evaluation on the point were it stopped last.\n\n## Evaluation\n\nAs mentioned you can use the [Bandit-Tools Web-App](https://ragnaroek.github.io/bandit-tools/) to evaluate\nthe evaluation/exploitation phases of the bandit algorithm. You can upload the `bandit_state.json` and `bandit.log`\nfile and get a visualisation of the information present in these two files.\n\nIf you want to share publicly your log and state files, please open a pull request on the bandit_data branch of this project. Discussing results should be done on Reddit: [Reddit Post](https://www.reddit.com/r/MoneroMining/comments/8vp873/mithril_miner_and_autotuning_with_a/).\n\n## Hash-Rate Logging\n\nMithril has basic support for logging the hash rate of the miner (in order to tune it). Hash-Rate Logging has to be\nenabled in the `[metric]` section and is disabled in the default configuration:\n\n```toml\nenabled = false\nresolution = 100 #determines how often a hash result is reported\nsample_interval_seconds = 60\nreport_file = \"/path/to/hash/report/file.csv\"\n```\nThe most important configuration option is `report_file`. You can configure an absolute path to a csv file where the hash rate is logged. Each `sample_interval_seconds` a new line with `\u003cunix-timestamp\u003e;\u003c#hashes since last sample\u003e` is appended to this file. You can calculate the average hash rate (for a given time interval) from this file with external tools (e.g. Google Drive).\n\nThe `resolution` option determines how often a hash count is measured internally. Every `resolution` hashes the result is published to a metric sub-thread in the program. Setting this to a low value will increase the overhead for measuring.\n\n## Supported Platforms\nMithril was tested on this Platform/architecture combinations so far:\n- macOS 10.13/x64\n- Windows/x64\n- Linux\n  - CentOS 7 64bit\n\nPlease notify me, if you tested mithril on one other platform and it is running stable.\n\nARM support (Raspberry, Pine64) is a short term goal I am working on.\n\n# Help Wanted\n\nThe goal of this project is to build a `pure` Rust monero miner implementation. Currently the\nSkein and JH hash functions are used as FFI C-Bindings, because there is not Rust implementation available (or I have not found any). A pure Skein or JH Rust implentation would be very welcomed. Notify me if you did implement one of these hashing\nfunctions and I will gladly use them in mithril!\n\n# Support\n\nIf you want to donate directly to support further development, this is my Monero donation address:\n```\n48y3RCT5SzSS4jumHm9rRL91eWWzd6xcVGSCF1KUZGWYJ6npqwFxHee4xkLLNUqY4NjiswdJhxFALeRqzncHoToeJMg2bhL\n```\n\nor support the project on Github Sponsors:\n\n[![Github Sponsor](https://img.shields.io/static/v1?label=Sponsor\u0026message=%E2%9D%A4\u0026logo=GitHub\u0026link=https://github.com/sponsors/Ragnaroek)](https://github.com/sponsors/Ragnaroek)\n\nor Paypal:\n\n[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=A24SWQT3P5DY2\u0026source=url)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fragnaroek%2Fmithril","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fragnaroek%2Fmithril","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fragnaroek%2Fmithril/lists"}