Skip to content
This repository was archived by the owner on Aug 23, 2020. It is now read-only.

Commit

Permalink
Merge pull request #335 from alfredch/public-testnet-1.4.1.1
Browse files Browse the repository at this point in the history
Public testnet 1.4.1.1
  • Loading branch information
alfredch authored Oct 28, 2017
2 parents 40f27ae + 8acd3f0 commit b4c161c
Show file tree
Hide file tree
Showing 8 changed files with 5,834 additions and 65,631 deletions.
2 changes: 1 addition & 1 deletion src/main/java/com/iota/iri/Milestone.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class Milestone {
public Hash latestMilestone = Hash.NULL_HASH;
public Hash latestSolidSubtangleMilestone = latestMilestone;

public static final int MILESTONE_START_INDEX = 243000;
public static final int MILESTONE_START_INDEX = 320300;
private static final int NUMBER_OF_KEYS_IN_A_MILESTONE = 20;

public int latestMilestoneIndex = MILESTONE_START_INDEX;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/iota/iri/Snapshot.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public class Snapshot {
root = ISS.address(mode, digests);
}
if(!Arrays.equals(Converter.trits(SNAPSHOT_PUBKEY), root)) {
throw new RuntimeException("Snapshot signature failed.");
//throw new RuntimeException("Snapshot signature failed.");
}
}
} catch (IOException e) {
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/com/iota/iri/TransactionValidator.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ public void init(boolean testnet,int MAINNET_MWM, int TESTNET_MWM) {
} else {
MIN_WEIGHT_MAGNITUDE = MAINNET_MWM;
}
//lowest allowed MWM encoded in 46 bytes.
if (MIN_WEIGHT_MAGNITUDE<13){
MIN_WEIGHT_MAGNITUDE = 13;
//lowest allowed MWM encoded in 49 bytes.
if (MIN_WEIGHT_MAGNITUDE<9){
MIN_WEIGHT_MAGNITUDE = 9;
}

newSolidThread = new Thread(spawnSolidTransactionsPropagation(), "Solid TX cascader");
Expand All @@ -70,7 +70,7 @@ public int getMinWeightMagnitude() {

private static void runValidation(TransactionViewModel transactionViewModel, final int minWeightMagnitude) {
transactionViewModel.setMetadata();
if(transactionViewModel.getTimestamp() < 1508760000 && !transactionViewModel.getHash().equals(Hash.NULL_HASH)) {
if(transactionViewModel.getTimestamp() < 1509195600 && !transactionViewModel.getHash().equals(Hash.NULL_HASH)) {
throw new RuntimeException("Invalid transaction timestamp.");
}
for (int i = VALUE_TRINARY_OFFSET + VALUE_USABLE_TRINARY_SIZE; i < VALUE_TRINARY_OFFSET + VALUE_TRINARY_SIZE; i++) {
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/com/iota/iri/conf/Configuration.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,15 @@ public enum DefaultConfSettings {
conf.put(DefaultConfSettings.REMOTE_AUTH.name(), "");
conf.put(DefaultConfSettings.NEIGHBORS.name(), "");
conf.put(DefaultConfSettings.IXI_DIR.name(), "ixi");
conf.put(DefaultConfSettings.DB_PATH.name(), "mainnetdb");
conf.put(DefaultConfSettings.DB_LOG_PATH.name(), "mainnet.log");
conf.put(DefaultConfSettings.DB_PATH.name(), "testnetdb");
conf.put(DefaultConfSettings.DB_LOG_PATH.name(), "testnet.log");
conf.put(DefaultConfSettings.DB_CACHE_SIZE.name(), "100000"); //KB
conf.put(DefaultConfSettings.CONFIG.name(), "iota.ini");
conf.put(DefaultConfSettings.P_REMOVE_REQUEST.name(), "0.01");
conf.put(DefaultConfSettings.P_DROP_TRANSACTION.name(), "0.0");
conf.put(DefaultConfSettings.P_SELECT_MILESTONE_CHILD.name(), "0.7");
conf.put(DefaultConfSettings.P_SEND_MILESTONE.name(), "0.02");
conf.put(DefaultConfSettings.P_REPLY_RANDOM_TIP.name(), "0.66");
conf.put(DefaultConfSettings.P_REPLY_RANDOM_TIP.name(), "1.00");
conf.put(DefaultConfSettings.P_PROPAGATE_REQUEST.name(), "0.01");
conf.put(DefaultConfSettings.MAIN_DB.name(), "rocksdb");
conf.put(DefaultConfSettings.EXPORT.name(), "false");
Expand All @@ -95,7 +95,7 @@ public enum DefaultConfSettings {
conf.put(DefaultConfSettings.REVALIDATE.name(), "false");
conf.put(DefaultConfSettings.RESCAN_DB.name(), "false");
conf.put(DefaultConfSettings.MAINNET_MWM.name(), "14");
conf.put(DefaultConfSettings.TESTNET_MWM.name(), "13");
conf.put(DefaultConfSettings.TESTNET_MWM.name(), "9");

// Pick a number based on best performance
conf.put(DefaultConfSettings.MIN_RANDOM_WALKS.name(), "5");
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/iota/iri/network/Node.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ public class Node {
private static final Logger log = LoggerFactory.getLogger(Node.class);


public static final int TRANSACTION_PACKET_SIZE = 1650;
public static final int TRANSACTION_PACKET_SIZE = 1653;
private static final int QUEUE_SIZE = 1000;
private static final int RECV_QUEUE_SIZE = 1000;
private static final int REPLY_QUEUE_SIZE = 1000;
private static final int PAUSE_BETWEEN_TRANSACTIONS = 1;
public static final int REQUEST_HASH_SIZE = 46;
public static final int REQUEST_HASH_SIZE = 49;
private static double P_SELECT_MILESTONE;

private final AtomicBoolean shuttingDown = new AtomicBoolean(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class TransactionRequester {
private final Set<Hash> milestoneTransactionsToRequest = new LinkedHashSet<>();
private final Set<Hash> transactionsToRequest = new LinkedHashSet<>();
private static volatile long lastTime = System.currentTimeMillis();
public static final int REQUEST_HASH_SIZE = 46;
public static final int REQUEST_HASH_SIZE = 49;
private static final byte[] NULL_REQUEST_HASH_BYTES = new byte[REQUEST_HASH_SIZE];

private static double P_REMOVE_REQUEST;
Expand Down
Loading

0 comments on commit b4c161c

Please sign in to comment.