Skip to content

Commit

Permalink
- new version 0.4.7-SNAPSHOT
Browse files Browse the repository at this point in the history
- removed optDevPool option
- limited number of parts per plotfile
- fixed amount of mem shown for openCl device
- cleanup and minor changes
  • Loading branch information
de-luxe committed Jan 28, 2017
1 parent f3baad6 commit f15e7f3
Show file tree
Hide file tree
Showing 16 changed files with 50 additions and 456 deletions.
3 changes: 0 additions & 3 deletions jminer.default.properties
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,6 @@ winnerRetryIntervalInMs=
devPool=
devPoolCommitsPerRound=

# NOT WORKING?! Try, but i fear it will find no deadlines, yet.
optDevPool=false

# -----------------------------------------------------------------------------------
# - MINING MODE - SOLO ---------------------------------- ONLY NEEDED 4 SOLO MINING -
# -----------------------------------------------------------------------------------
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.6-SNAPSHOT</version>
<version>0.4.7-SNAPSHOT</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.6-SNAPSHOT.jar
java -jar -d64 -XX:+UseG1GC burstcoin-jminer-0.4.7-SNAPSHOT.jar
5 changes: 1 addition & 4 deletions 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.6 | | Y Y \\ | | \\ ___/| | \\/");
LOG.info(" 0.4.7 | | Y Y \\ | | \\ ___/| | \\/");
LOG.info(" /\\__| |__|_| /__|___| /\\___ >__| ");
LOG.info(" \\______| \\/ \\/ \\/");
LOG.info(" mining engine: BURST-LUXE-RED2-G6JW-H4HG5");
Expand Down Expand Up @@ -193,9 +193,6 @@ public void onApplicationEvent(ReaderProgressChangedEvent event)
{
progressLogStep--;

// trigger garbage collection on every progress step
System.gc();

BigDecimal totalCapacity = new BigDecimal(event.getCapacity());
BigDecimal factor = BigDecimal.ONE.divide(totalCapacity, MathContext.DECIMAL32);
BigDecimal progress = factor.multiply(new BigDecimal(event.getCapacity() - event.getRemainingCapacity()));
Expand Down
19 changes: 0 additions & 19 deletions src/main/java/burstcoin/jminer/core/CoreProperties.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,6 @@ public class CoreProperties
private static final boolean DEFAULT_WRITE_LOG_FILE = false;
private static final String DEFAULT_LOG_FILE_PATH = "log/jminer.log.txt";

// there seams to be a issue on checker
private static final boolean DEFAULT_OPT_DEV_POOL = false;


static
{
try
Expand All @@ -89,7 +85,6 @@ public class CoreProperties
private static Long winnerRetryIntervalInMs;
private static Boolean scanPathsEveryRound;
private static Integer devPoolCommitsPerRound;
private static Boolean optDevPool;
private static Boolean devPool;
private static Boolean poolMining;
private static Long targetDeadline;
Expand Down Expand Up @@ -214,20 +209,6 @@ public static int getDevPoolCommitsPerRound()
return devPoolCommitsPerRound;
}

/**
* Is opt dev pool.
*
* @return the boolean
*/
public static boolean isOptDevPool()
{
if(optDevPool == null)
{
optDevPool = asBoolean("optDevPool", DEFAULT_OPT_DEV_POOL);
}
return optDevPool;
}

/**
* Is dev pool.
*
Expand Down
58 changes: 10 additions & 48 deletions src/main/java/burstcoin/jminer/core/checker/Checker.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@

package burstcoin.jminer.core.checker;

import burstcoin.jminer.core.CoreProperties;
import burstcoin.jminer.core.checker.task.OCLCheckerFindAllBelowTargetTask;
import burstcoin.jminer.core.checker.task.OCLCheckerTask;
import burstcoin.jminer.core.reader.event.ReaderLoadedPartEvent;
import org.slf4j.Logger;
Expand All @@ -35,8 +33,6 @@
import org.springframework.core.task.SyncTaskExecutor;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/**
* The type Checker.
*/
Expand All @@ -47,46 +43,23 @@ public class Checker
{
private static final Logger LOG = LoggerFactory.getLogger(Checker.class);

@Autowired
private ApplicationContext context;

@Autowired
private SyncTaskExecutor checkTaskExecutor;

// setting
private boolean devPool;
private boolean optDevPool;
private final ApplicationContext context;
private final SyncTaskExecutor checkTaskExecutor;

// data
private long blockNumber;
private long targetDeadline;
private long baseTarget;
private byte[] generationSignature;

/**
* Post construct.
*/
@PostConstruct
protected void postConstruct()
@Autowired
public Checker(ApplicationContext context, SyncTaskExecutor checkTaskExecutor)
{
this.devPool = CoreProperties.isDevPool();
this.optDevPool = CoreProperties.isOptDevPool();
this.targetDeadline = CoreProperties.getTargetDeadline();
this.context = context;
this.checkTaskExecutor = checkTaskExecutor;
}

/**
* Reconfigure void.
*
* @param blockNumber the block number
* @param baseTarget the base target
* @param targetDeadline the target deadline
* @param generationSignature the generation signature
*/
public void reconfigure(long blockNumber, long baseTarget, long targetDeadline, byte[] generationSignature)
public void reconfigure(long blockNumber, byte[] generationSignature)
{
this.blockNumber = blockNumber;
this.baseTarget = baseTarget;
this.targetDeadline = targetDeadline;
this.generationSignature = generationSignature;
}

Expand All @@ -96,20 +69,9 @@ public void handleMessage(ReaderLoadedPartEvent event)
{
if(blockNumber == event.getBlockNumber())
{
if(devPool && optDevPool)
{
// todo findTartget() does not work! optDevPool not supported yet!
OCLCheckerFindAllBelowTargetTask oclCheckerFindAllBelowTargetTask = context.getBean(OCLCheckerFindAllBelowTargetTask.class);
oclCheckerFindAllBelowTargetTask.init(event.getBlockNumber(), generationSignature, event.getScoops(), targetDeadline,
event.getChunkPartStartNonce(), baseTarget);
checkTaskExecutor.execute(oclCheckerFindAllBelowTargetTask);
}
else
{
OCLCheckerTask oclCheckerTask = context.getBean(OCLCheckerTask.class);
oclCheckerTask.init(event.getBlockNumber(), generationSignature, event.getScoops(), event.getChunkPartStartNonce());
checkTaskExecutor.execute(oclCheckerTask);
}
OCLCheckerTask oclCheckerTask = context.getBean(OCLCheckerTask.class);
oclCheckerTask.init(event.getBlockNumber(), generationSignature, event.getScoops(), event.getChunkPartStartNonce());
checkTaskExecutor.execute(oclCheckerTask);
}
else
{
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,6 @@ public class CheckerResultEvent
private BigInteger nonce;
private BigInteger result;

/**
* Instantiates a new Checker result event.
*
* @param blockNumber the block number
* @param chunkPartStartNonce the chunk part start nonce
* @param nonce the nonce
* @param result the result
*/
public CheckerResultEvent(long blockNumber, BigInteger chunkPartStartNonce, BigInteger nonce, BigInteger result)
{
this.chunkPartStartNonce = chunkPartStartNonce;
Expand All @@ -52,41 +44,21 @@ public CheckerResultEvent(long blockNumber, BigInteger chunkPartStartNonce, BigI
this.result = result;
}

/**
* Gets block number.
*
* @return the block number
*/
public long getBlockNumber()
{
return blockNumber;
}

/**
* Gets nonce.
*
* @return the nonce
*/
public BigInteger getNonce()
{
return nonce;
}

/**
* Gets result.
*
* @return the result
*/
public BigInteger getResult()
{
return result;
}

/**
* Gets chunk part start nonce.
*
* @return the chunk part start nonce
*/
public BigInteger getChunkPartStartNonce()
{
return chunkPartStartNonce;
Expand Down
Loading

0 comments on commit f15e7f3

Please sign in to comment.