Skip to content

Instantly share code, notes, and snippets.

@gertjaap
Last active July 22, 2019 11:06
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gertjaap/021018a5857fc877d7b4c8bee6dc3211 to your computer and use it in GitHub Desktop.
Save gertjaap/021018a5857fc877d7b4c8bee6dc3211 to your computer and use it in GitHub Desktop.
Vertcoin OCM Rewrite

Vertcoin OCM Rewrite

Vertcoin has had a one-click miner for a while now. There's actually a bunch of features included over time that have made the OCM less easy to use, and certainly not be one click anymore. My idea (based on suggestions of the Vertcoin community) is to rewrite the OCM which will make it super easy for first-timers to start mining.

Here's the list of milestones:

  • MVP (Minimum Viable Product) (~5 days)

    • Includes a (password protected) built-in wallet to immediately start mining
    • Uses Insight to fetch balance and send transactions
    • Uses P2Proxy by default
    • Allows sweeping your entire mining balance to another address
    • Works on Windows and Linux
  • Further milestones can include:

    • Support for other (centralized) pools
    • Support for built-in p2pool in stead of p2proxy
    • Support for built-in Electrum-style (or Neutrino-style) client over Insight
    • Support for using local Vertcoin node in stead of Insight
    • Suggestions from testing the MVP
    • Multi language support

Status & Updates

6/26/2019

Worked on the initial version of the new OCM. The code is committed to the new repository

Worked on the following items:

  • The app asks for a password on first startup, generates and encrypts a private key;
  • Address derived from this key is used for receiving mining funds (though there's no mining yet);
  • Tracks UTXOs in the wallet using Insight API, can detect immature balance (mining outputs need to mature 101 blocks);
  • Tracks pending payout from P2Proxy using its API
  • Contains initial GUI based on Wails for:
    • Welcome screen
    • Checks screen (dummy)
    • Mining screen (dummy, except for wallet balance)
    • Send screen (dummy)

6/27/2019

Worked on a bunch of stuff - the OCM is now functional under Linux for AMD cards, using lyclMiner.

The following items got implemented:

  • Downloading the miner binaries
  • Checking their SHA-256 hash for integrity
  • Unpacking the miner assemblies
  • (LyclMiner) generating a config file
  • (LyclMiner) parsing the output to determine current hashrate
  • Fetching difficulty from Insight
  • Calculate network hashrate and expected earnings
  • Display network hashrate in the front-end
  • Start the miner
  • Fetch pending payout from p2proxy (SSL certificate renewal needed to make it work)

7/1/2019

Worked on the wallet sweeping and UI.

  • You can now send the mining balance to another address (legacy V..., P2SH 3... and segwit vtc1... addresses supported)
  • When transaction sends succesfully, you can view it on Insight
  • Starts mining immediately when you restart it (if wallet is initialized)
  • Updated the UI based on new designs made by CryptoPlankton

7/2/2019

Worked on Windows compatibility.

  • Windows should now work, though there's been some bugreports that i'll have to further address
  • Tested on Windows 10 May 2019 with NVidia GTX 960
  • Debug logging now also works

7/3/2019

Worked on Windows/LyclMiner compatibility and usage statistics

  • Got a RX580 card for testing
  • Tested on Windows with RX580 and GTX960. Both cards are used by launching ccminer and lyclminer
  • Fixed issues with Lyclminer on windows (path resolving failed)
  • Added anonymous usage statistics based on Matomo. You can opt-out by clicking the notice in the bottom of the GUI. Usage statistics are helpful to see where people get stuck and don't report issues.

7/4/2019

Worked on various bugfixes reported by the community (thanks to everyone who helped testing!)

  • Proper hashrate parsing for multiple GPUs of the same type
  • Versioning and build scripts
  • Added link for issue reporting in the GUI
  • Fixed webfont issue on Windows (fell back to Arial, ugh..)
  • Fixed improper detection of non-GTX cards
  • Added sanity checks for the send screen
  • Added a pending state for when the miners started, but did not yet report hashrate

Posted a cool demo video on Twitter

7/10/2019

Worked on a couple bug fixes as well as support for closed-source miners

  • Fixed hashrate parsing in ccminer when it's reported in KH/s (or GH/s which i haven't been able to test :-) )
  • Added a flag -debugminers to the executable. You can enable it to log the raw output of the underlying miner assemblies to the log file
  • Added support for TeamRedMiner (Tested on Windows/Linux) for AMD and CryptoDredge (Tested on Windows only - should work on Linux too)
  • Added extra UI to enable closed source miners

7/18/2019

Fixed a bunch of reported issues. Mainly spent time on the monitoring of the miner process and restarting it when it crashes.

7/22/2019

Checkout the release notes of Alpha 27 to see what I worked on today.

Checkout the updated repo, and binary releases. Feel free to try this version on Windows or Linux, and report any issues to the Github Issues

@rvarbanov
Copy link

This is awesome! Thank you for doing that. My OCM hasn't been working for the past 6-12 mo(it used to but not anymore), so I really hoping this one will.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment