Skip to content

Commit

Permalink
- new version 0.4.8-RELEASE
Browse files Browse the repository at this point in the history
- made triggerServer on solo optional and disabled by default (prevent annoying error logs on busy server)
- using haitch suggestion for fallback on calculate parts https://forums.burst-team.us/topic/3600/part-calculation-algorithm-for-jminer/14
  • Loading branch information
de-luxe committed Feb 22, 2017
1 parent f15e7f3 commit f9b43fe
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 14 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,12 @@ min. deadline to be committed.

targetDeadline=750000

### triggerServer (default: false)
on 'true' miner emulates open wallet gui, to prevent wallet server from
falling asleep (not sure if needed at all)

triggerServer=true




Expand Down
4 changes: 4 additions & 0 deletions jminer.default.properties
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,14 @@ devPoolCommitsPerRound=
#
# targetDeadline - min. deadline to be committed. e.g. 750000
# (optinal)
#
# triggerServer - emulates open wallet, to prevent it from
# (default: false) falling asleep (not sure if needed at all)
# -----------------------------------------------------------------------------------
soloServer=http://localhost:8125
passPhrase=xxxxxxxxxxxxxx
targetDeadline=
triggerServer=

# -----------------------------------------------------------------------------------
# - OpenCL -----------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>burstcoin</groupId>
<artifactId>burstcoin-jminer</artifactId>
<version>0.4.7-SNAPSHOT</version>
<version>0.4.8-RELEASE</version>
<packaging>jar</packaging>

<name>burstcoin-jminer</name>
Expand Down
2 changes: 1 addition & 1 deletion run.bat
Original file line number Diff line number Diff line change
@@ -1 +1 @@
java -jar -d64 -XX:+UseG1GC burstcoin-jminer-0.4.7-SNAPSHOT.jar
java -jar -d64 -XX:+UseG1GC burstcoin-jminer-0.4.8-RELEASE.jar
2 changes: 1 addition & 1 deletion src/main/java/burstcoin/jminer/JMinerCommandLine.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public void run(String... args)
LOG.info(" __ __ GPU assisted PoC-Miner");
LOG.info(" |__| _____ |__| ____ ___________ ");
LOG.info(" version | |/ \\| |/ \\_/ __ \\_ __ \\");
LOG.info(" 0.4.7 | | Y Y \\ | | \\ ___/| | \\/");
LOG.info(" 0.4.8 | | Y Y \\ | | \\ ___/| | \\/");
LOG.info(" /\\__| |__|_| /__|___| /\\___ >__| ");
LOG.info(" \\______| \\/ \\/ \\/");
LOG.info(" mining engine: BURST-LUXE-RED2-G6JW-H4HG5");
Expand Down
10 changes: 10 additions & 0 deletions src/main/java/burstcoin/jminer/core/CoreProperties.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ public class CoreProperties
private static final boolean DEFAULT_SHOW_DRIVE_INFO = false;
private static final int DEFAULT_READER_THREADS = 0;
private static final boolean DEFAULT_DEBUG = false;
private static final boolean DEFAULT_TRIGGER_SERVER = false;
private static final boolean DEFAULT_WRITE_LOG_FILE = false;
private static final String DEFAULT_LOG_FILE_PATH = "log/jminer.log.txt";

Expand Down Expand Up @@ -450,6 +451,15 @@ public static boolean isWriteLogFile()
return writeLogFile;
}

public static boolean isTriggerServer()
{
if(writeLogFile == null)
{
writeLogFile = asBoolean("triggerServer", DEFAULT_TRIGGER_SERVER);
}
return writeLogFile;
}

public static boolean isDebug()
{
if(debug == null)
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/burstcoin/jminer/core/network/Network.java
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ public void run()
}, 100, CoreProperties.getRefreshInterval());

// on solo mining
if(!CoreProperties.isPoolMining())
if(!CoreProperties.isPoolMining() && CoreProperties.isTriggerServer())
{
timer.schedule(new TimerTask()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ private BlockchainStatus getBlockChainStatus()
}
catch(Exception e)
{
LOG.warn("Error: Failed to 'getBlockchainStatus' from 'soloServer' to trigger server.");
LOG.debug("Error: Failed to 'getBlockchainStatus' from 'soloServer' to trigger server.");
}
return blockchainStatus;
}
Expand All @@ -105,7 +105,7 @@ private void getUnconfirmedTransactions(String numericAccountId)
}
catch(Exception e)
{
LOG.warn("Error: Failed to 'getUnconfirmedTransactions' to trigger server.");
LOG.debug("Error: Failed to 'getUnconfirmedTransactions' to trigger server.");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public class NetworkSubmitPoolNonceTask
implements Runnable
{
private static final Logger LOG = LoggerFactory.getLogger(NetworkSubmitPoolNonceTask.class);
private static final String HEADER_MINER_NAME = "burstcoin-jminer-0.4.7";
private static final String HEADER_MINER_NAME = "burstcoin-jminer-0.4.8";

@Autowired
private ApplicationEventPublisher publisher;
Expand Down
10 changes: 3 additions & 7 deletions src/main/java/burstcoin/jminer/core/reader/data/PlotFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -233,14 +233,10 @@ private int calculateNumberOfParts(long staggeramt)
// fallback if number of parts could not be calculated in acceptable range
if(suggestedNumberOfParts >= maxNumberOfParts)
{
// as stagger has to be a multiple of 8 we can at least use 8 parts
if(staggeramt % 8 == 0)
suggestedNumberOfParts = (int) Math.floor(Math.sqrt(staggeramt));
while(staggeramt % suggestedNumberOfParts != 0)
{
suggestedNumberOfParts = 8;
}
else
{
LOG.warn("staggersize '" + staggeramt + "' is not dividable by 8.");
suggestedNumberOfParts--;
}
}
return suggestedNumberOfParts;
Expand Down

0 comments on commit f9b43fe

Please sign in to comment.