Arionum Java Miner

Post Reply
Posts: 8
Joined: Fri Jan 26, 2018 8:38 pm

Arionum Java Miner

Post by ProgrammerDan » Fri Feb 16, 2018 10:46 pm

Figured it was time to talk shop for the Arionum Java Miner's featureset.

Little bit of genesis:

Ran across this coin from a link drop in a BTC exchange, fell in love with simplicity and directness of the code, and figured it'd be a fun challenge to replicate the PHP miner. From this was born the Arionum Java Miner!

What's different about the Java Miner?

At its heart it's the same; it generates hashes from nonces + salt and tries to find a pairing for a particular block's ID string that is below the 240 DL threshold. Here, the similarities end.

The Java miner was designed to give deep insights into running miners while maximizing your hashes per second. It does this by leveraging a custom argon2 library that exposes a few more features of the reference argon implementation, making it possible to send stable memory frames for use by argon2, while still encoding the hash results in a stable way (also leveraging the C++ library).

It also allows many simultaneous hashing workers to run, and will attempt to "affine" them to specific CPU cores.

It leverages many, many microoptimizations so that as much time as possible is spent inside the argon hashing function, and as little as possible is spent outside.

These include:

1) Nonce is only recomputed on new block or share submission. Because of how hashing functions (like argon2i and sha512) work, tiny changes in input result in large variability in output. This optimization has been tested with nearly 48 hours of execution time and demonstrates identical distribution and random outcome expectation as when nonce is regenerated for every hashing attempt. Instead, 16 bytes of "salt" data are randomly regenerated for each hashing attempt. This data is kept as "raw bytes" and not encoded until after the argon2i hash is complete, saving thousands of nanoseconds on each hash attempt. Depending on hardware, the savings could be even more.

2) Raw byte representations of encoded data are leveraged in several places, including while constructing the sha512 hashes, to prevent wasteful "encode to String" "decode to byte" patterns in reference implementation.

3) Extraction of DL bytes is pulled straight from the backing byte data, in as efficient a fashion as possible. BCD conversion is roughly as expensive as full encoding; since I only encode the specific bytes necessary this is as efficient as it gets without custom BCD circuit paths...

4) Threads never stop hashing. The control thread updates each worker thread on changes to block data, including DL submission changes, and more; these updates are non-blocking, so this comes at a risk of momentary inconsistency and the potential for _slightly_ increased "bad submissions" -- recent pool changes have removed any penalty for this behavior.

5) External operations don't block hashers. Nonce/Argon2i pair submissions are tossed into a queue, and a separate worker thread picks them up and executes submission. Similarly, all statistics updates and stats reports are done asynchronously via work queues. Even the stats display that scrolls on screen is managed by the control thread and does not impact Worker threads.

6) Worker threads work on a kernel basis -- each "execution loop" consists of a certain number of completed hashes or a certain time limit. If Affinity doesn't work, this ensures that each kernel gets CPU specific execution for as long as possible; if Affinity is working, it just ensures that Operating System scheduling deadlocks don't occur.

7) Worker threads leverage kerneling to have easy percolation of stats reporting back to the control thread; at the end of each kernel, the work thread sends a stats package back to a queue, for processing by the scrolling display manager.

Other features of the Java Miner include:

1) One click releases -- just run the .exe file and get started -- follow the config prompts to create a persistent, easily managed configuration.

2) Hardware affinity -- multiple versions are released, or can be compiled locally, to support the best features of your CPU.

3) Colors in the output screen -- no boring display to watch, but rather colors to improve clarity.

4) Remote statistics reporting -- with version, statistics on worker health and hashrate can be sent periodically to a properly augmented node, so that you can watch your workers from an easy to install, central location.

5) Custom worker names -- Although the pool does not report these yet, they help stabilize the pool's understanding of your hashrate, and are visible in the worker dashboard extension for nodes.

6) Highly reactive to AroDev's recommendations -- version 0.2.4 has several specifically requested changes from AroDev, to improve pool performance at scale. We all benefit!

7) Highly portable and easy to install -- All releases come with easy to run installation instructions so deploying the java miner to a large set of computers is very easy to script

8) Big future plans -- I'm nowhere near done. There is much to be done, including a vanity GPU port, additional CPU improvements from streamlining and optimizing the argon2i library, and more.

To download the latest version of the Java Miner, go here:

To download the statistics / worker tracking augment for your php node, go here: (it's a drop in -- either use the fork or just uncompress the tarball in your node directory!)

Happy hashing!

Posts: 2
Joined: Fri Feb 23, 2018 6:08 am

Re: Arionum Java Miner

Post by alby1976 » Fri Feb 23, 2018 6:13 am

I have no idea on how to get this working, running the java exe redirects me to the java runtime download page.

Posts: 8
Joined: Fri Jan 26, 2018 8:38 pm

Re: Arionum Java Miner

Post by ProgrammerDan » Fri Feb 23, 2018 3:29 pm

Download Java JRE "Offline" 64 bit! Install that -- then run the EXE again.

It took you there b/c you need Java before you can run a Java program :)

Posts: 3
Joined: Wed Jun 27, 2018 2:06 pm

Re: Arionum Java Miner

Post by dignityinside » Wed Jun 27, 2018 8:49 pm

Thanks, work fine! 8-)

Posts: 1
Joined: Tue Jul 31, 2018 1:12 pm

Re: Arionum Java Miner

Post by Brondal » Tue Jul 31, 2018 1:16 pm

Hello AROians :-)

I love this Miner and the Coin. With my i5-6600 i become by 3 threats about 10 H/s.

Thx for the great work and the coin. I love CPU Coins so much. Not only because they save vs. ASIC and GPU energie.

Posts: 1
Joined: Tue Mar 12, 2019 6:51 am

Re: Arionum Java Miner

Post by samairahsethi » Tue Mar 12, 2019 6:52 am

Excellent thread! Great learning here. Thank you!

Post Reply