elective-stereophonic
elective-stereophonic
NxtMint Java minter
singapore
Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest Nxt Client: Nxt 1.11.15

Pages: [1] 2 3 ... 20  All

Author Topic: NxtMint Java minter  (Read 49363 times)

ScripterRon

  • Hero Member
  • *****
  • Karma: +75/-2
  • Offline Offline
  • Posts: 523
    • View Profile
NxtMint Java minter
« on: January 16, 2015, 10:53:52 pm »

NxtMint 1.6.0

Download the latest version from NxtMint Releases
  • Unpack the files in a directory of your choice
  • Copy sample.NxtMint.conf to the application data directory and rename it to NxtMint.conf
    • Linux: <user-home>/.NxtMint/NxtMint.conf
    • Mac: <user-home>/Library/Application Support/NxtMint/NxtMint.conf
    • Windows: <user-home>\AppData\Roaming\NxtMint\NxtMint.conf
  • Copy sample.logging.properties to the application data directory and rename it to logging.properties
  • Edit NxtMint.conf to specify your desired NRS server (you can use scripterron.dyndns.biz if you don't run a local server) and your secret passphrase (the passphrase will not be sent to the server).  Update the other parameters as needed.
  • Install OpenCL if you want to use the GPU for minting
  • Rename and edit sample.mint.bat (Windows) or sample.mint.sh (Linux/Mac) as desired


NxtMint requires the Java 8 runtime since it uses language features that are not available in earlier versions of Java.
Nxt NRS works with Java 8, so you can upgrade without worrying that you will break the server.

NxtMint mints currencies defined by the Nxt Monetary System. A single currency can be minted as specified by the NxtMint configuration file. The minting algorithm is executed using one or more CPU threads or GPU devices. Newly-minted coins will be added to the account specified in the configuration file.

The NRS node used to create the mint transactions must accept API connections. This is done by specifying nxt.apiServerPort, nxt.apiServerHost and nxt.allowedBotHosts in nxt.properties. The account secret phrase is not sent to the Nxt server since the mint transactions are created and signed locally.

OpenCL is used to mint using the GPU and is not needed if you are using just the CPU. You will need to obtain OpenCL from your graphics card vendor (OpenCL may be automatically installed as part of the graphics card driver installation). The directory containing the OpenCL runtime library needs to be in either PATH (Windows) or LD_LIBRARY_PATH (Linux).  On Windows, OpenCL.dll is often placed in \Windows\system32 by the device driver installer, so it is always available and you won't need to update PATH.

Runtime Options
The following command-line options can be specified using -Dname=value

nxt.datadir=directory-path
Specifies the application data directory. Application data will be stored in a system-specific directory if this option is omitted:
  • Linux: user-home/.NxtMint
  • Mac: user-home/Library/Application Support/NxtMint
  • Windows: user-home\AppData\Roaming\NxtMint

java.util.logging.config.file=file-path
Specifies the logger configuration file. The logger properties will be read from 'logging.properties' in the application data directory. If this file is not found, the 'java.util.logging.config.file' system property will be used to locate the logger configuration file. If this property is not defined, the logger properties will be obtained from jre/lib/logging.properties.

JDK FINE corresponds to the SLF4J DEBUG level
JDK INFO corresponds to the SLF4J INFO level
JDK WARNING corresponds to the SLF4J WARN level
JDK SEVERE corresponds to the SLF4J ERROR level

Configuration options
The following configuration options can be specified in NxtMint.conf. This file is required and must be in the application data directory.

connect=host
Specifies the NRS host name and defaults to 'localhost'

apiPort=port
Specifies the NRS API port and defaults to 7876.

secretPhrase=phrase
Specifies the account secret phrase and must be specified. The secret phrase will not be sent to the NRS server.  Note that the configuration file is processed using the current user locale which can cause problems if the characters in the secret phrase aren't defined in the locale.

currency=code
Specifies the code for the currency to be minted.

units=count
Specifies the number of units to generate for each hash round and defaults to 1. The hash difficulty increases as the number of units increases but the transaction fee is 1 Nxt no matter how many units are generated. Thus you want to increase units as much as possible to reduce the cost of minting the currency but don't set it so high that you don't mint anything during a session. The count can be specified as an integer value or as a decimal value with a maximum number of digits following the decimal point as defined for the currency.

cpuThreads=count
Specifies the number of CPU threads to be used and defaults to 1. Specifying a thread count greater than the number of CPU processors will not improve minting since the mint algorithms are CPU-intensive and will drive each process to 100% utilization. Decrease the thread count if your computer becomes too hot or system response degrades significantly.

gpuIntensity=count
Specifies the GPU computation intensity and defaults to 0.  Your graphics card must support OpenCL in order to use the GPU.  You will need to try different values to determine an acceptable hash rate.  Specifying too large a value will result in performance degradation and GPU memory errors.  Start with an initial value of 10 and raise or lower needed.  A GPU will not be used if gpuIntensity is 0.   
   
gpuDevice=index,wsize,gcount
Specifies the GPU device number (0, 1, 2, ...), the work group size and the work group count.  The first GPU device will be used if this parameter is omitted.  This parameter can be repeated to use multiple GPU devices.  The GPU devices that are available are listed when NxtMint is started with a non-zero value for gpuIntensity. 

The work group size specifies the number of work items per work group and defaults to 256.  Performance can sometimes be improved by setting the work group size to the number of cores in a compute unit.  You can determine this value by dividing the number of cores on the card by the number of compute units.  For Scrypt, local memory contention can occur if the work group size is too large, so experiment with smaller values.   

The work group count specifies the number of work groups that will be executed by OpenCL before returning control to the application.  Specifying too large a value can result in adapter global storage being exceeded and can cause sluggish display performance as display work groups get delayed by mining work groups.

enableGUI=true|false
Specifies whether or not to enable the GUI and defaults to true. Disabling the GUI allows NxtMint to run in headless environments such as a disconnected service.
« Last Edit: February 17, 2015, 10:57:16 pm by ScripterRon »
Logged

coretechs

  • Sr. Member
  • ****
  • Karma: +161/-1
  • Offline Offline
  • Posts: 436
    • View Profile
Re: NxtMint Java minter
« Reply #1 on: January 16, 2015, 11:22:09 pm »

Really nice work.

After getting it to build I ran into problems with a class dependency issue with LoggingFactory.  I was able to resolve it by adding an entry for slf4j-log4j12 to the pom.xml file for NxtMint, but I've never used Maven before so I'm not sure if I missed some other step.
Logged
https://ardorportal.org - Ardor blockchain explorer | https://nxtportal.org - Nxt blockchain explorer | http://bitcoindoc.com - The Rise and Rise of Bitcoin
ARDOR-T43P-R2K9-8W79-9W2AL | NXT-WY9K-ZMTT-QQTT-3NBL7

colin012

  • Hero Member
  • *****
  • Karma: +65/-18
  • Offline Offline
  • Posts: 851
  • NXTOrganization Marketing
    • View Profile
Re: NxtMint Java minter
« Reply #2 on: January 16, 2015, 11:24:04 pm »

Cool!
Logged
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬  ▄▀▀▀▀▀▀▀▀▄  ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬●  nimirum  ●▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
▬▬▬ ◖ENDING CENSORSHIP ONLINE◗  ◖ ICO OPEN NOW◗ ▬▬▬

KrusherPT

  • Jr. Member
  • **
  • Karma: +1/-0
  • Offline Offline
  • Posts: 17
    • View Profile
    • KrusherPT Blog
Re: NxtMint Java minter
« Reply #3 on: January 16, 2015, 11:27:58 pm »

This is very good  :o
I'm trying to use it on windows but it says secret phrase not specified and i have all set, so i dont know my mistake

EDIT:
Nevermind i get it i need to get my conf file on appdata
« Last Edit: January 16, 2015, 11:32:56 pm by KrusherPT »
Logged
Donate to help me! NXT-HEWU-6KDT-BM8Q-6A9GY
My public nodes:
vps.krusherpt.com | node.krusherpt.com | node2.krusherpt.com

colin012

  • Hero Member
  • *****
  • Karma: +65/-18
  • Offline Offline
  • Posts: 851
  • NXTOrganization Marketing
    • View Profile
Re: NxtMint Java minter
« Reply #4 on: January 16, 2015, 11:43:28 pm »

Hmmm, needs Https support!
Logged
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬  ▄▀▀▀▀▀▀▀▀▄  ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬●  nimirum  ●▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
▬▬▬ ◖ENDING CENSORSHIP ONLINE◗  ◖ ICO OPEN NOW◗ ▬▬▬

faddat

  • Newbie
  • *
  • Karma: +1/-0
  • Offline Offline
  • Posts: 2
    • View Profile
Re: NxtMint Java minter
« Reply #5 on: January 17, 2015, 12:06:54 am »

I think I've things set, but I do not know any of the possible currency codes.  Thousand thanks to ScripterRon for taking the time to build this. 
Logged

coretechs

  • Sr. Member
  • ****
  • Karma: +161/-1
  • Offline Offline
  • Posts: 436
    • View Profile
Re: NxtMint Java minter
« Reply #6 on: January 17, 2015, 12:24:47 am »

I think I've things set, but I do not know any of the possible currency codes.  Thousand thanks to ScripterRon for taking the time to build this.

The most popular currency on the NXT MS right now is EGOLD which has the currency code EGOLD and is mintable using this GPU minter.

http://nxtportal.org/search/5775213290661997199
Logged
https://ardorportal.org - Ardor blockchain explorer | https://nxtportal.org - Nxt blockchain explorer | http://bitcoindoc.com - The Rise and Rise of Bitcoin
ARDOR-T43P-R2K9-8W79-9W2AL | NXT-WY9K-ZMTT-QQTT-3NBL7

bidji29

  • Sr. Member
  • ****
  • Karma: +53/-11
  • Offline Offline
  • Posts: 250
    • View Profile
Re: NxtMint Java minter
« Reply #7 on: January 17, 2015, 12:35:29 am »

WHat are the result in term of speed?

Modern cpu can do 1-2Mh/s on keccak with the default minter.
How many this one do with cpu and gpu?
Logged

ScripterRon

  • Hero Member
  • *****
  • Karma: +75/-2
  • Offline Offline
  • Posts: 523
    • View Profile
Re: NxtMint Java minter
« Reply #8 on: January 17, 2015, 01:05:36 am »

Really nice work.

After getting it to build I ran into problems with a class dependency issue with LoggingFactory.  I was able to resolve it by adding an entry for slf4j-log4j12 to the pom.xml file for NxtMint, but I've never used Maven before so I'm not sure if I missed some other step.
I use the JDK version of SLF4J (slf4j-api and slf4j-jdk14).  In order to use a different logger implementation, you should replace slf4j-jdk14 in the pom for both NxtCore and NxtMint and then package both of them.  Or you could just replace slf4j-jdk14.jar with slf4j-log4j12.jar in the lib subdirectory without recompiling anything (slf4j-api works with any slf4j logger implementation).  You will need to start NxtMint using -cp instead of -jar in this case since the NxtMint.jar file contains the classpath as part of the manifest.

For example,
  java -Xmx256m -cp "NxtMint-1.0.0.jar;lib" org.ScripterRon.NxtMint.Main

Logged

ScripterRon

  • Hero Member
  • *****
  • Karma: +75/-2
  • Offline Offline
  • Posts: 523
    • View Profile
Re: NxtMint Java minter
« Reply #9 on: January 17, 2015, 01:10:45 am »

This is very good  :o
I'm trying to use it on windows but it says secret phrase not specified and i have all set, so i dont know my mistake

EDIT:
Nevermind i get it i need to get my conf file on appdata
Yep - the default data directory is %APPDATA%\NxtMint

If you want to keep everything in one place, you can specify the application data directory on the command line.

For example, if you unpacked the zip into C:\NxtMint, then start it this way:
  java -Xmx256m -Dnxt.datadir="C:\NxtMint" -jar "C:\NxtMint\NxtMint-1.0.0.jar"

You should also set up logging.properties to control the output.  I forgot to include a sample in the first release, so I'll it on the forum.  If you set NxtMint logging to FINE, you will see the hashing rates every minute.
Logged

ScripterRon

  • Hero Member
  • *****
  • Karma: +75/-2
  • Offline Offline
  • Posts: 523
    • View Profile
Re: NxtMint Java minter
« Reply #10 on: January 17, 2015, 01:13:36 am »

I forgot to include a sample logging properties file for use with Java logging, so here it is.  Put it into the application data directory as logging.properties.

Code: [Select]
######################################
NxtMint Logging Configuration File                               #
#                                                                                      #
# Rename this file to logging.properties and place it in          #
# the NxtMint application directory.  Change the log             #
# file name as desired (java.util.logging.FileHandler.pattern) #
######################################

# Log to console and file
handlers = java.util.logging.FileHandler, java.util.logging.ConsoleHandler

# Default logging level (FINE, INFO, WARNING, SEVERE)
.level = SEVERE

# NxtMint logging level (FINE, INFO, WARNING, SEVERE)
org.ScripterRon.NxtMint.level = FINE

# NxtCore logging level (FINE, INFO, WARNING, SEVERE)
org.ScripterRon.NxtCore.level = INFO

# Create log file in temporary directory, accept FINE or higher messages,
# maximum file size is 500KB with a single file
java.util.logging.FileHandler.pattern = %t/NxtMint.log
java.util.logging.FileHandler.limit = 500000
java.util.logging.FileHandler.count = 1
java.util.logging.FileHandler.level = FINE

# Limit the message that are printed on the console to FINE and above
java.util.logging.ConsoleHandler.level = FINE
Logged

ScripterRon

  • Hero Member
  • *****
  • Karma: +75/-2
  • Offline Offline
  • Posts: 523
    • View Profile
Re: NxtMint Java minter
« Reply #11 on: January 17, 2015, 01:15:48 am »

Hmmm, needs Https support!
Why?  It doesn't send or receive confidential data.  The minting transaction is created and signed locally without any interaction with the server.  The signed transaction bytes are then sent to the server for broadcast.  Since these bytes will appear in the blockchain for all to see, it doesn't really make any sense to add the overhead of https.
Logged

ScripterRon

  • Hero Member
  • *****
  • Karma: +75/-2
  • Offline Offline
  • Posts: 523
    • View Profile
Re: NxtMint Java minter
« Reply #12 on: January 17, 2015, 01:19:24 am »

I think I've things set, but I do not know any of the possible currency codes.  Thousand thanks to ScripterRon for taking the time to build this.
The currency codes are listed on the Monetary System tab in the NRS UI.  For example, go to http://scripterron.dyndns.biz:7876 and login to the UI.  Then select the Monetary System tab on the left.  I've been mining EGOLD while testing out NxtMint.  Note that each minting transaction will cost you 1 NXT, so you need some NXT in your account before you can start minting.
Logged

ScripterRon

  • Hero Member
  • *****
  • Karma: +75/-2
  • Offline Offline
  • Posts: 523
    • View Profile
Re: NxtMint Java minter
« Reply #13 on: January 17, 2015, 01:25:55 am »

WHat are the result in term of speed?

Modern cpu can do 1-2Mh/s on keccak with the default minter.
How many this one do with cpu and gpu?
Here is an excerpt from the NxtMint log.  Workers 0-3 are using the CPU and worker 4 is using the GPU (NVIDIA GT 720).  If you have an AMD graphics card, you should get even better hash rates.  The GPU intensity determines how heavily the card is used (I have it set to 15 at the moment).  I have gotten rates as high as 16 MHash/s on my NVIDIA card but the video display becomes too sluggish for me to use it for anything else.  15 seems to be a good compromise but even then I get resource failures if I open a graphics-intensive application such as a browser.
Code: [Select]
08:03:06 INFO Main.main: Java Nxt Mint Version 1.0.0
08:03:06 INFO Main.main: Application data path: C:\Users\Ronald\Appdata\Roaming\NxtMint
08:03:06 INFO Main.main: Using Nxt node at scripterron.dyndns.biz:7876
08:03:06 INFO Main.main: Minting 25.000000 units of EGOLD for account NXT-XM86-4ZNA-65L5-CDWUE: 4 CPU threads, 15 GPU intensity
08:03:06 INFO Nxt.init: API node=scripterron.dyndns.biz, API port=7876
08:03:07 FINE MintWorker.run: Worker 4 starting on counter 166
08:03:07 FINE MintWorker.run: Worker 1 starting on counter 166
08:03:07 FINE MintWorker.run: Worker 0 starting on counter 166
08:03:07 FINE MintWorker.run: Worker 3 starting on counter 166
08:03:07 FINE MintWorker.run: Worker 2 starting on counter 166
08:04:07 FINE MintWorker.run: Worker 1 hash rate 1100 KH/s
08:04:07 FINE MintWorker.run: Worker 4 hash rate 12551 KH/s
08:04:07 FINE MintWorker.run: Worker 3 hash rate 1140 KH/s
08:04:07 FINE MintWorker.run: Worker 0 hash rate 1125 KH/s
08:04:07 FINE MintWorker.run: Worker 2 hash rate 1120 KH/s
08:05:07 FINE MintWorker.run: Worker 3 hash rate 1144 KH/s
08:05:07 FINE MintWorker.run: Worker 1 hash rate 1108 KH/s
08:05:07 FINE MintWorker.run: Worker 0 hash rate 1131 KH/s
08:05:07 FINE MintWorker.run: Worker 4 hash rate 12614 KH/s
08:05:07 FINE MintWorker.run: Worker 2 hash rate 1130 KH/s
08:06:07 FINE MintWorker.run: Worker 0 hash rate 1142 KH/s
08:06:07 FINE MintWorker.run: Worker 4 hash rate 12734 KH/s
08:06:07 FINE MintWorker.run: Worker 1 hash rate 1118 KH/s
08:06:07 FINE MintWorker.run: Worker 3 hash rate 1151 KH/s
08:06:07 FINE MintWorker.run: Worker 2 hash rate 1141 KH/s
08:07:07 FINE MintWorker.run: Worker 1 hash rate 1116 KH/s
08:07:07 FINE MintWorker.run: Worker 4 hash rate 12720 KH/s
Logged

achim

  • Hero Member
  • *****
  • Karma: +50/-6
  • Offline Offline
  • Posts: 648
    • View Profile
Re: NxtMint Java minter
« Reply #14 on: January 17, 2015, 02:13:29 am »

why not wait with this until tomorrow when we are all awake in europe?
 ;)
Logged

Jimmy2011

  • Sr. Member
  • ****
  • Karma: +24/-19
  • Offline Offline
  • Posts: 329
    • View Profile
Re: NxtMint Java minter
« Reply #15 on: January 17, 2015, 02:16:13 am »

I got an error as following. Seems that I need to compile it myself  ???

Code: [Select]
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/ScripterR
on/NxtMint/Main : Unsupported major.minor version 52.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at java.security.SecureClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.access$100(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
Logged
NXT-LX5G-L63N-ST8S-9LVZY

ScripterRon

  • Hero Member
  • *****
  • Karma: +75/-2
  • Offline Offline
  • Posts: 523
    • View Profile
Re: NxtMint Java minter
« Reply #16 on: January 17, 2015, 02:39:43 am »

I got an error as following. Seems that I need to compile it myself  ???
What Java runtime is installed?  You must have Java 8 since I use language features that are not available in earlier versions.  You won't be able to recompile it on an earlier JDK since that compiler won't recognize the new language constructs.

I'll update the README to make the requirement more prominent. 
Logged

qqNxt

  • Full Member
  • ***
  • Karma: +18/-1
  • Offline Offline
  • Posts: 174
    • View Profile
    • http://www.myfreenxt.com/
Re: NxtMint Java minter
« Reply #17 on: January 17, 2015, 02:41:20 am »

Thank YOU!! been waiting for this!  :)
Logged
http://www.myfreenxt.com/
NXT-8PGJ-JWZM-BRN9-59Y3L

Jimmy2011

  • Sr. Member
  • ****
  • Karma: +24/-19
  • Offline Offline
  • Posts: 329
    • View Profile
Re: NxtMint Java minter
« Reply #18 on: January 17, 2015, 02:48:36 am »

I got an error as following. Seems that I need to compile it myself  ???
What Java runtime is installed?  You must have Java 8 since I use language features that are not available in earlier versions.  You won't be able to recompile it on an earlier JDK since that compiler won't recognize the new language constructs.

I'll update the README to make the requirement more prominent.

Thanks for the quick response. I installed Java 8. Could you please write a detailed guide for us to compile or install the program?
Logged
NXT-LX5G-L63N-ST8S-9LVZY

qqNxt

  • Full Member
  • ***
  • Karma: +18/-1
  • Offline Offline
  • Posts: 174
    • View Profile
    • http://www.myfreenxt.com/
Re: NxtMint Java minter
« Reply #19 on: January 17, 2015, 02:58:31 am »

I think we need a easy mint.bat to help us computer dumbs.
I have no clue how to run .jar extension  ;D

I better go grab those dusty miners out of my closet and connect them up!
« Last Edit: January 17, 2015, 03:00:39 am by qqNxt »
Logged
http://www.myfreenxt.com/
NXT-8PGJ-JWZM-BRN9-59Y3L
Pages: [1] 2 3 ... 20  All
 

elective-stereophonic
elective-stereophonic
assembly
assembly